daiqisheng 3 vuotta sitten
vanhempi
commit
3e3acb3388

+ 38 - 34
src/pages/main/gridDivision/approvalExamination.vue

@@ -66,7 +66,7 @@
           >
           <el-button @click="handleConsent" type="primary">同意</el-button>
         </div> -->
-          <el-button @click="handleConsent" type="primary">确定</el-button>
+        <el-button @click="handleConsent" type="primary">确定</el-button>
       </template>
     </simple-dialog>
   </div>
@@ -92,7 +92,7 @@ export default {
       opinion_form: {},
       isAgree: false,
       // 单条审批id
-      ids: '',
+      ids: "",
       parentId: "",
       adoptIds: [],
       page: 1,
@@ -122,28 +122,9 @@ export default {
         },
       ],
       table_loading: false,
-      table_handle: [
-        {
-          label: "审批轨迹",
-          props: "track",
-        },
-        {
-          label: "批量审批",
-          props: "batch",
-        },
-      ],
+      table_handle: [],
       // 列表数据
-      table_list: [
-        {
-          number: 1,
-          cpmName: "xq",
-          person: "mll",
-          phone: 132548648844,
-          need: "xxxxxxxx",
-          file: "附件1",
-          status: 0,
-        },
-      ],
+      table_list: [],
       // 表头配置
       table_config: [
         {
@@ -169,7 +150,7 @@ export default {
         {
           label: "附件",
           props: "fileNames",
-          type:'file'
+          type: "file",
         },
         {
           label: "状态",
@@ -222,9 +203,13 @@ export default {
       ],
     };
   },
+  watch: {
+    parentId() {
+      this.handleInit();
+    },
+  },
   mounted() {
     this.parentId = this.$route.query.parentId;
-    this.handleInit();
   },
   methods: {
     // 表格数据初始化
@@ -246,10 +231,29 @@ export default {
       }).then(({ data: { count, data } }) => {
         this.table_loading = false;
         this.total = count;
-        this.table_list = data ? data.map((element,index) => ({
-          ...element,
-          No: index + 1,
-        })) : []
+        this.table_list = data
+          ? data.map((element, index) => ({
+              ...element,
+              No: index + 1,
+            }))
+          : [];
+        this.table_list[0].sts === "1"
+          ? (this.table_handle = [
+              {
+                label: "审批轨迹",
+                props: "track",
+              },
+            ])
+          : this.table_handle = [
+              {
+                label: "审批轨迹",
+                props: "track",
+              },
+              {
+                label: "批量审批",
+                props: "batch",
+              },
+            ];
         data.forEach((item) => {
           this.adoptIds.push(item.id.toString());
         });
@@ -268,8 +272,8 @@ export default {
       this.page = page;
       this.handleInit();
     },
-    handleDownload(data){
-      console.log(data,'data');
+    handleDownload(data) {
+      console.log(data, "data");
     },
     handleVisible(props) {
       switch (props) {
@@ -328,17 +332,17 @@ export default {
     // 审批意见提交
     handleOpinion(type) {
       let reqdata = {};
-      if (type === '1') {
+      if (type === "1") {
         // 批量退回
         reqdata = {
           parentId: this.parentId,
           mkWanggeList: [
             {
               id: this.ids,
-              remark: this.opinion_form.opinion
+              remark: this.opinion_form.opinion,
             },
           ],
-        }
+        };
         console.log(reqdata);
         this.$http({
           url: "/market/mkWangge/backList",

+ 2 - 1
src/pages/main/gridDivision/workersList.vue

@@ -188,6 +188,7 @@ export default {
         {
           label: "新建",
           props: "add",
+          
         },
       ],
       table_form: [
@@ -303,7 +304,7 @@ export default {
   methods: {
     // 表格数据初始化
     handleInit() {
-      // this.table_loading = true;
+      this.table_loading = true;
       // console.log(data);
       let reqdata = {
         ...this.table_search,