Просмотр исходного кода

fix(巡检): 优化检查卡片状态选择逻辑,修复manifest.json端口配置

yusheng 5 месяцев назад
Родитель
Сommit
219802d819

+ 2 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.40",
+    "versionName" : "V1.0.3.41",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -12,7 +12,7 @@
                     // "target" : "http://192.168.1.110:18086/",
                     // "target" : "http://192.168.1.251:18086/",
                     // "target" : "http://192.168.1.251:18086/",
-                    "target" : "http://192.168.1.251:18086",
+                    "target" : "http://192.168.1.251:18186",
                     // "target": "http://116.63.185.248:80/api",
                     "changeOrigin" : true,
                     "secure" : false,

+ 4 - 3
pages/maintenanceWorkorder/sparepart/sparepart.vue

@@ -265,7 +265,8 @@
 		},
 		async onLoad(data) {
 			const obj = JSON.parse(data.data)
-			console.log(obj,'obj ----')
+			this.userInfo = uni.getStorageSync('userInfo')
+			console.log(this.userInfo,'this.userInfo')
 			this.type = obj.pageType
 			this.getDept()
 			if (this.type == 'add') {
@@ -273,8 +274,8 @@
 				this.addForm.repairName = obj.planName;
 				this.addForm.repairId = obj.id;
 				this.deviceList = obj.deviceList;
-				this.addForm.receivingDeptName = obj.createGroupName;
-				this.addForm.recipientName = obj.executeUserName;
+				this.addForm.receivingDeptName = this.userInfo.groupName;
+				this.addForm.recipientName = this.userInfo.name;
 				// if (!obj.sparePartsApplyList) {
 				// 	this.addForm.deviceName = obj.deviceName;
 				// 	this.addForm.fixCode = obj.fixCode;

+ 2 - 1
pages/qms/inspectionWork/inspectionProjectReport.vue

@@ -199,9 +199,10 @@
 				let params = JSON.parse(JSON.stringify(this.workData))
 				let index= params.templateList.findIndex(item=>item.id==this.form.id)
 				params.templateList[index]=this.form
+				params.
 				update(params)
 					.then((msg) => {
-						
+						 
 					})
 					.catch((e) => {
 					});

+ 29 - 11
pages/tour_tally/check/components/CheckCard.vue

@@ -27,14 +27,23 @@
 			<view class="cell-content" v-else>无</view>
 		</view> -->
 		<view class="card-cell">
-			<text class="label">结果</text>
-			<view class="cell-content">
-				<view class="content-status">
-					<!-- {{ item.executeStatus?'正常':'异常' }} -->
+			<text class="label">状态</text>
+			<text class="cell-content">
 
+				<view v-if="type == 'view'">
 					<div v-if="item.status == -1" style="color: red">异常</div>
 					<div v-else style="color: green">正常</div>
 				</view>
+				<view v-else>
+					<uni-data-picker @change="statusChange" style="width:100%" v-model="item.status" placeholder="请选择" :localdata="statusList" :clear-icon="false">
+					</uni-data-picker>
+				</view>
+			</text>
+		</view>
+		<view class="card-cell">
+			<text class="label">结果</text>
+			<view class="cell-content">
+
 				<textarea v-if="type !== 'view'" placeholder="请输入" v-model="item.result"
 					@input="inputChange($event, item)" />
 				<view class="result-text" v-else>{{ item.result }}</view>
@@ -112,12 +121,12 @@
 		data() {
 			return {
 				statusList: [{
-						label: '正常',
-						status: 1
+						text: '正常',
+						value: 1
 					},
 					{
-						label: '异常',
-						status: -1
+						text: '异常',
+						value: -1
 					}
 				]
 			}
@@ -131,14 +140,19 @@
 		},
 		methods: {
 			inputChange(obj, item) {
-				if (obj.target.value.length > 0&&obj.target.value!='正常') {
+				if (obj.target.value.length > 0 && obj.target.value != '正常') {
 					item.status = -1
 				} else {
 					item.status = 1
 				}
 			},
-			changeStatus(item, it) {
-				item.status = it.status
+			statusChange() {
+				if(this.item.status==1){
+					this.item.result='正常'
+				}else{
+					this.item.result='异常'
+				}
+				
 			},
 
 			// *** 新增拍照功能
@@ -259,6 +273,10 @@
 		.cell-content {
 			flex: 1;
 
+			/deep/span {
+				width: 100%;
+			}
+
 			.content-status {
 				width: 100%;
 				height: 50rpx;