maxiaoxiao il y a 1 semaine
Parent
commit
cbcd1a6ec5
2 fichiers modifiés avec 35 ajouts et 24 suppressions
  1. 2 1
      src/views/pageCode/dataEntry/config.js
  2. 33 23
      src/views/remote/farmland/details.vue

+ 2 - 1
src/views/pageCode/dataEntry/config.js

@@ -38,7 +38,8 @@ export const FormConfig = [
 
 export const TableHeader = [
   { label: "文件名称", prop: "name", align: 'center' },
-  { label: "区县名称", prop: "dkmj", align: 'center' },
+  // { label: "区县名称", prop: "dkmj", align: 'center' },
+  { label: "业务类型", prop: "dataType", align: 'center' },
   { label: "图斑个数", prop: "geomNumber", align: 'center' },
   { label: "监测面积(亩)", prop: "geomArea", align: 'center' },
   { label: "数据量", prop: "qlx", align: 'center' },

+ 33 - 23
src/views/remote/farmland/details.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="details">
-    <!-- @tab-click="handleClick" -->
-    <el-tabs v-model="activeName">
+    <!--  -->
+    <el-tabs v-model="activeName" @tab-click="handleClick(nowObj)">
       <el-tab-pane
         label="基本信息"
         name="jbxx"
@@ -159,7 +159,7 @@
       >
       <el-button
         type="success"
-        v-show="['XJ', 'SJ','SJJ'].includes(route.query.dataType)"
+        v-show="['XJ', 'SJ', 'SJJ'].includes(route.query.dataType)"
         :disabled="
           !steps.find((x) =>
             x.auditflowStep.includes(route.query.dataType + 'TJ')
@@ -210,7 +210,7 @@ const route = useRoute();
 const router = useRouter();
 const formde = ref(route.query.form == "dataEntry");
 const props = defineProps({});
-let nowObj = {};
+let nowObj = ref({});
 const shdiaRef = ref(null);
 const hgxdiaRef = ref(null);
 const tjdiaRef = ref(null);
@@ -240,27 +240,37 @@ function handleClick({ id, auditflowId }) {
   if (formde.value) {
     getDetailsDk(id).then((res) => {
       infoObj.value = res.data;
-    });
-  } else {
-    // if (activeName.value == "jbxx")
-    getDkjbxx(id).then((res) => {
-      infoObj.value = res.data;
-    });
-    getDkjbywy(id).then((res) => {
-      sheets.value = JSON.parse(res.data.sheetJson);
-      ywyptab.value = sheets.value[0].sheet;
+      if (res.data.sheetJson) {
+        sheets.value = JSON.parse(res.data.sheetJson);
+        ywyptab.value = sheets.value[0].sheet;
+      }
+
       console.log(sheets.value);
     });
-    // else if (activeName.value == "ywjl")
-    getAuditflow({ dkjdxxId: id }).then((res) => {
-      activities.value = res.data;
-    });
-    getHcInfo({ dkid: id, auditflowStep: "WYDC", auditflowId }).then((res) => {
-      hcxxList.value = res.data;
-      nextTick(() => {
-        hcxxRef.value[0].init(hcxxList.value[0].sdfjs);
+  } else {
+    if (activeName.value == "jbxx")
+      getDkjbxx(id).then((res) => {
+        infoObj.value = res.data;
       });
-    });
+    else if (activeName.value == "ywyp")
+      getDkjbywy(id).then((res) => {
+        sheets.value = JSON.parse(res.data.sheetJson);
+        ywyptab.value = sheets.value[0].sheet;
+        console.log(sheets.value);
+      });
+    else if (activeName.value == "ywjl")
+      getAuditflow({ dkjdxxId: id }).then((res) => {
+        activities.value = res.data;
+      });
+    else if (activeName.value == "hcxx")
+      getHcInfo({ dkid: id, auditflowStep: "WYDC", auditflowId }).then(
+        (res) => {
+          hcxxList.value = res.data;
+          nextTick(() => {
+            hcxxRef.value[0].init(hcxxList.value[0].sdfjs);
+          });
+        }
+      );
   }
   getStep({ dkjdxxId: id }).then((res) => {
     steps.value = res.data;
@@ -275,7 +285,7 @@ function getDetails({ pcsjid, id, auditflowId }) {
   activeName.value = "jbxx";
   infoObj.value = {};
   activities.value = [];
-  // nowObj = { pcsjid, id };
+  nowObj.value = { pcsjid, id, auditflowId };
   handleClick({ pcsjid, id, auditflowId });
 }
 function moreAct(actitem) {