Browse Source

1.1 18:项目详情修改增加二次确认 【ok】
19:二级地址 末端 ,有的显示 有的不显示 非0情况下 【ok】
20:删除盒子时候 异常做物理删除 ,耗材等同样 【ok】
14:主机控制器 文本编辑支持<br>换行 【ok】

64060764@qq.com 1 year ago
parent
commit
f4361f9de3

+ 4 - 0
src/api/consumble.js

@@ -79,3 +79,7 @@ export async function updateConsumptionAlgorithmType(data) {
 export async function deleteConsumptionAlgorithmType(data) {
   return post(base + "consumables_management/type/delete", data);
 }
+
+export async function syncRunTime(data) {
+  return post('http://linksee-box-api.linkseeiot.com/api/transport/syncRunTime', data);
+}

+ 21 - 16
src/views/eng-management/eng-pro-list/add.vue

@@ -1002,23 +1002,28 @@ export default {
         console.log(this.operateSubjectForm.operator_id)
         console.log(this.operateSubjectForm.distributor_id)
         console.log(this.operateSubjectForm.project_auto_id)
-      const res = await changeProjBelong({
-        OperatorId: this.operateSubjectForm.operator_id,
-        DistributorId:this.operateSubjectForm.distributor_id,
-        ProjectAutoId: this.operateSubjectForm.project_auto_id,
-      });
-      if (res.code === 200) {
-        this.$notify({
-          message: "操作成功",
-          type: "success"
-        });
-      }else{
-        this.$notify({
-          message: "操作失败",
-          type: "error"
+      this.$confirm("确定修改吗", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(async () => {
+        const res = await changeProjBelong({
+          OperatorId: this.operateSubjectForm.operator_id,
+          DistributorId:this.operateSubjectForm.distributor_id,
+          ProjectAutoId: this.operateSubjectForm.project_auto_id,
         });
-      }
-
+        if (res.code === 200) {
+          this.$notify({
+            message: "操作成功",
+            type: "success"
+          });
+        }else{
+          this.$notify({
+            message: "操作失败",
+            type: "error"
+          });
+        }
+      });
     },
     async makeSureOperateButton () {
       this.operateSubjectForm.room_number = `${this.operateSubjectForm.room_block}-${this.operateSubjectForm.room_unit}-${this.operateSubjectForm.room_score}`;

+ 4 - 4
src/views/equip-lib/equip-manager/operate-model.vue

@@ -254,7 +254,7 @@ export default {
                 cbCoEquipCtrl: 0,
 				cbHeEquipCtrl: 0,
 				specsName:"",
-				consumption_cycle:0,
+				consumption_cycle:"",
 			},
 			supportAssistOptions: [
 				{
@@ -300,7 +300,7 @@ export default {
 							cbCoEquipCtrl: 0,
 							cbHeEquipCtrl: 0,
 							specsName:"",
-							consumption_cycle:0,
+							consumption_cycle:"",
 						};
 					} else {
 						this.opreateModelForm = {
@@ -317,7 +317,7 @@ export default {
 							cbCoEquipCtrl: 0,
 							cbHeEquipCtrl: 0,
 							specsName:"",
-							consumption_cycle:0,
+							consumption_cycle:"",
 						};
 					}
 				}
@@ -343,7 +343,7 @@ export default {
 						cbCoEquipCtrl: n.cbCoEquipCtrl || 0,
 						cbHeEquipCtrl: n.cbHeEquipCtrl || 0,
 						specsName: n.specsName || "",
-						consumption_cycle: n.consumption_cycle || 0,
+						consumption_cycle: n.consumption_cycle.toString() || "",
 
 					};
 				}

+ 1 - 1
src/views/equip-lib/equip-manager/opreate-pannel.vue

@@ -79,7 +79,7 @@
             </el-form-item>
           </div>
         </div>
-        <div class="form-item" v-show="conShow">
+        <div class="form-item" v-show="conShow" style="visibility: hidden">
           <div class="label">滤网规格</div>
           <div class="content">
             <el-form-item prop="specs_id">

File diff suppressed because it is too large
+ 10877 - 10062
src/views/equip-management/add-box/index.vue


+ 2 - 1
src/views/equip-management/edit-box/index.vue

@@ -2375,7 +2375,7 @@
                       </el-form-item>
                     </el-col>
                     <el-col class="w-percent-20">
-                      <el-form-item label="地址">
+                      <el-form-item label="地址1111">
                         <custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbMainComAdd" v-model="activeOperateEnd.cbMainComAdd" :precision="0"></custom-input-number>
                       </el-form-item>
                     </el-col>
@@ -2387,6 +2387,7 @@
 
                   </el-row>
                 </div>
+
                 <div class="form-row bg-white">
                   <el-row>
                     <el-col class="w-percent-20" v-if="Array.isArray(this.activeOperateEnd.endDeviceOption) && this.activeOperateEnd.endDeviceOption.length > 0 && this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>=0">

+ 1 - 1
src/views/equip-management/online-box/index.vue

@@ -148,7 +148,7 @@
 					label="上线日期"
 					align="center"
           width="160"
-					sortable
+
 					prop="connect_at"
 				>
 					<template slot-scope="scope">{{ scope.row.connect_at | timeFilter }}</template>

+ 6 - 6
src/views/equip-management/report/list.vue

@@ -87,10 +87,10 @@
 					</el-row>
 				</div>
 				<el-table
-					:data="pageData" 
-					@sort-change="changeSort" 
+					:data="pageData"
+					@sort-change="changeSort"
 					:span-method="objectSpanMethod"
-					@selection-change="handleSelectionChange" 
+					@selection-change="handleSelectionChange"
 					v-fixed-scroll="handleScroll"
 					border
 				>
@@ -372,7 +372,7 @@
 						:columns="dialog.tableColumns"></pop-more-table>
 				</el-dialog>
 				<el-dialog :title="titleTxt" :visible.sync="showTitle" width="60%">
-					<div style="margin: 20px">{{ this.Title }}</div>
+					<div style="margin: 20px" v-html="this.Title"></div>
 				</el-dialog>
 				<el-dialog :title="endPop.title" :visible.sync="endPop.show" width="50%">
 					<pop-end-info :visible="endPop.show" :data="endPop.row"></pop-end-info>
@@ -736,7 +736,7 @@ export default {
 			// 先排序
 			// this.sortDataSource(data, sort);
 			// console.log("排序后的数据: ", data);
-			
+
 			/**
 			 * 使用filter()方法过滤不满足条件的数据
 			 */
@@ -746,7 +746,7 @@ export default {
 			let filterData = data.filter(box => {
 				let hasFilter1 = false;  // 主机供水温度是否把盒子过滤掉了
 				let hasFilter2 = false;  // 新风送风露点是否把盒子过滤掉了
-				
+
 				// 根据主机供水温度过滤盒子
 				if (filterHpSuTemp) {
 					const hostCtrl = box.hostCtrl || [];

+ 28 - 18
src/views/oa-management/consumble-watch/index.vue

@@ -114,10 +114,12 @@
 				>
 					<template slot-scope="scope">
 
-					<span>
-{{scope.row.name}}{{scope.row.newtrend_order}}
+					<span v-if="scope.row.newtrend_order.length>0">
+{{scope.row.name}}[{{scope.row.newtrend_order}}]
+					</span>
+						<span v-else="scope.row.newtrend_order.length>0">
+{{scope.row.name}}
 					</span>
-
 
 					</template>
 
@@ -329,14 +331,14 @@
 	</div>
 </template>
 <script>
-import {
-	consumablesList,
-	deleteConsumable,
-	resetConsumable,
-	consumableDetail,
-	consumptionAlgorithmTypeList,
-  toWorkOrder
-} from "@/api/consumble";
+	import {
+		consumablesList,
+		deleteConsumable,
+		resetConsumable,
+		consumableDetail,
+		consumptionAlgorithmTypeList,
+		toWorkOrder, syncRunTime
+	} from "@/api/consumble";
 import { currentUserName } from "@/utils/trace";
 import { getBoxDetail, getProjectList } from "@/api/box";
 import OperateConsumble from "./operate-consumble";
@@ -567,19 +569,27 @@ export default {
 				cancelButtonText: "取消",
 				type: "warning"
 			}).then(async () => {
-				const res = await sendCtrlMessage(
-						row.box_id,
-						row.newtrend_order,
-						"newtrend",
-						[{ key: 'consumables', value: row.utilization_rate }]
-				);
-				if (res.code === 200) {
+				const r = await syncRunTime({
+					box_id: row.box_id,
+				});
+				if (r.code === 200) {
+					console.log('////////////r is:',r)
+					const res = await sendCtrlMessage(
+							row.box_id,
+							row.newtrend_order,
+							"newtrend",
+							[{ key: 'consumables', value: r.result[0].count }]
+					);
+					if (res.code === 200) {
 						this.$notify({
 							message: "恢复耗材使用率成功",
 							type: "success"
 						});
 						await this.consumablesListFunc();
+					}
 				}
+
+
 				//下发mqtt,value=!0给盒子
 				// 	const req = {
 				// 		box_id:row.box_id,

+ 2 - 2
src/views/oa-management/consumble-watch/operate-consumble/index.vue

@@ -232,7 +232,7 @@ export default {
         ascription: "",
         consumption_algorithm_id: "",
         remark: "",
-        consumption_cycle: 0,
+        consumption_cycle: "",
         box_auto_id: -1,
         utilization_rate: 0,
         box_id: "",
@@ -395,4 +395,4 @@ export default {
     }
   }
 }
-</style>
+</style>