Преглед на файлове

feat(巡检工作列表): 添加路由参数判断自动打开编辑功能

liujt преди 2 месеца
родител
ревизия
4cd374f1bf
променени са 1 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. 16 0
      src/views/inspectionWork/components/inspectionWorkList.vue

+ 16 - 0
src/views/inspectionWork/components/inspectionWorkList.vue

@@ -664,6 +664,22 @@
       this.requestDict('取样类型');
       this.getCode();
       this.getReportTemplateList();
+
+    },
+    mounted() {
+      const isWt = this.$route.query?.isWt;
+      
+      if (isWt) {
+        const id = JSON.parse(this.$route.query?.businessId);
+        console.log(id);
+        getList({qualityWorkerId: id}).then(res => {
+          const rowData = res.list[0];
+          this.$nextTick(() => {
+            this.openEdit('edit', rowData)
+          })
+        
+        })
+      }
     },
     computed: {
       seekList() {