Ver código fonte

1.1 耗材随新风设备 balabalbal

64060764@qq.com 1 ano atrás
pai
commit
9f9750b3f1
1 arquivos alterados com 42 adições e 11 exclusões
  1. 42 11
      src/views/oa-management/consumble-watch/index.vue

+ 42 - 11
src/views/oa-management/consumble-watch/index.vue

@@ -223,19 +223,25 @@
               style="color: #2ed573;"
             	@click="resetConsumableFnc(scope.row)"
             >重置</el-button>
-            <el-button
-            	type="text"
-            	size="mini"
-            	@click="showEditConsumbleDialog(scope.row)"
-            >编辑</el-button>
 						<el-button
 								type="text"
-								style="color: #FF4949;"
 								size="mini"
+								style="color: #2ed573;"
 								@click="resumeConsumableFnc(scope.row)"
 						>恢复</el-button>
             <el-button
             	type="text"
+            	size="mini"
+            	@click="showEditConsumbleDialog(scope.row)"
+            >编辑</el-button>
+<!--						<el-button-->
+<!--								type="text"-->
+<!--								style="color: #FF4949;"-->
+<!--								size="mini"-->
+<!--								@click="resumeConsumableFnc(scope.row)"-->
+<!--						>恢复</el-button>-->
+            <el-button
+            	type="text"
               style="color: #FF4949;"
             	size="mini"
             	@click="deleteConsumableFnc(scope.row)"
@@ -512,6 +518,8 @@ export default {
 				cancelButtonText: "取消",
 				type: "warning"
 			}).then(async () => {
+				//下发mqtt,value=0给盒子
+
 				const res = await resetConsumable({
 					box_auto_id: row.box_auto_id,
 					id: row.id,
@@ -527,6 +535,29 @@ export default {
 				}
 			});
 		},
+		async resumeConsumableFnc(row) {
+			this.$confirm("确定恢复耗材使用率吗", "警告", {
+				confirmButtonText: "确定",
+				cancelButtonText: "取消",
+				type: "warning"
+			}).then(async () => {
+				//下发mqtt,value=!0给盒子
+
+				// const res = await resetConsumable({
+				// 	box_auto_id: row.box_auto_id,
+				// 	id: row.id,
+				// 	newtrend_order:row.newtrend_order,
+				// });
+				// if (res.code === 200) {
+				// 	this.$notify({
+				// 		message: "重置耗材使用率成功",
+				// 		type: "success"
+				// 	});
+				// 	await this.consumablesListFunc();
+				// 	//1.1下发mqtt给盒子 value=0
+				// }
+			});
+		},
 		async consumablesDetail(row) {
 			const res = await consumableDetail({
 				box_auto_id: row.box_auto_id,
@@ -616,11 +647,11 @@ export default {
 			]);
 			this.operateLoading = false;
 		},
-		async resumeConsumableFnc(row) {
-			//1.1 mqtt下发耗材已消费给盒子 value=已消耗占比
-
-
-		}
+		// async resumeConsumableFnc(row) {
+		// 	//1.1 mqtt下发耗材已消费给盒子 value=已消耗占比
+		//
+		//
+		// }
 	}
 };
 </script>