浏览代码

解决设备维保页面传参切换Bug

oyq28 3 年之前
父节点
当前提交
f96110308e

+ 1 - 1
imcs-ui/src/views/zuihou/machiningClient/personConf/Index.vue

@@ -5,7 +5,7 @@
       :model="tenant"
       :rules="rules"
       label-position="right"
-      label-width="150px"
+      label-width="200px"
     >
       <el-form-item
         :label="station.stationName + ':'"

+ 10 - 0
imcs-ui/src/views/zuihou/repairManger/maintenanceLog/Index.vue

@@ -216,6 +216,15 @@
         return this.$store.state.account.user
       }
     },
+    watch: {
+	  	// 如果rowData.id的值改变了
+	  	'maintenanceId': {
+	  		handler(val, oldVal) {
+	        // 加载列表数据
+	  			this.fetch()
+	      }
+	  	}
+	  },
     // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
     created() {
       // 调用常量-设备维保后状态
@@ -346,6 +355,7 @@
         this.queryParams.current = params.current ? params.current : this.queryParams.current
         this.queryParams.size = params.size ? params.size : this.queryParams.size
         this.queryParams.model.repairId = this.maintenanceId
+        
         repairDetailApi.page(this.queryParams).then(response => {
           const res = response.data
           if (res.isSuccess) {

+ 6 - 7
imcs-ui/src/views/zuihou/repairManger/repair/Index.vue

@@ -152,7 +152,7 @@
             :text-inside="true"
             :stroke-width="24"
             :percentage="row.process"
-            show-text="true"
+            :show-text="true"
             :format="setItemText(row)"
             :color="setItemColor(row)"
           />
@@ -283,9 +283,8 @@
       @close="editEquipmentClose"
     >
       <!--【	维保】 -->
-      <maintenanceLog
-        :row-data="rowData"
-        :maintenance-id="maintenanceId"
+      <maintenanceLog       
+        :maintenance-id="maintenanceId"       
         @close="editEquipmentClose"
         @success="editEquipmentSuccess"
       />
@@ -380,7 +379,7 @@
     methods: {
       //【设备维保记录】按钮-事件
       equipment(row){
-        this.maintenanceId = row.id
+        this.maintenanceId = row.id        
         this.equipmentVisible = true
       },
       editEquipmentClose(){
@@ -507,10 +506,10 @@
         }
         this.edit(this.selection[0]);
       },
-      edit(row) {
+      edit(row) {        
         this.$refs.edit.setTenant(row, this.dicts)
         this.$refs.edit.type = "edit"
-        this.dialog.title = this.$t("common.edit")
+        this.dialog.title = this.$t("common.edit")        
         this.dialog.isVisible = true
       },
       eventRow(row){