luojun пре 2 година
родитељ
комит
324f2bcc8d
2 измењених фајлова са 15 додато и 11 уклоњено
  1. 13 10
      src/views/check/dialog.edit.vue
  2. 2 1
      src/views/resumption/plan/dialog.edit.vue

+ 13 - 10
src/views/check/dialog.edit.vue

@@ -466,19 +466,22 @@ export default {
       this.isShow = false;
     },
     getIteamF() {
-      if (this.id == null) {
-        this.defaultSelect = [];
-        return;
-      }else{
-        api.getPointIds(this.id).then((res) => {
-        this.defaultSelect = res.data;
-      });
+      // if (this.id == null) {
+      //   this.defaultSelect = [];
+      //   return;
+      // }else{
+      //   api.getPointIds(this.id).then((res) => {
+      //   this.defaultSelect = res.data;
+      // });
+      // }
+      if (!this.tableData) {
+        return [];
+      } else {
+        return this.tableData.map((d) => d.id);
       }
-   
     },
     openSelect() {
-      this.getIteamF();
-      this.$refs.DialogSelect.show();
+      this.$refs.DialogSelect.show(this.getIteamF());
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {

+ 2 - 1
src/views/resumption/plan/dialog.edit.vue

@@ -203,7 +203,6 @@
     </DialogCom>
     <DialogSelect
       ref="DialogSelect"
-      :defaultSelect="defaultSelect"
       :orgType="formData.execOrgType"
       @select="onSelect"
     ></DialogSelect>
@@ -386,6 +385,7 @@ export default {
         await api.get(id).then((res) => {
           console.log(res);
           this.tableData = res.data.itemList;
+
         });
       }
 
@@ -410,6 +410,7 @@ export default {
       if (!this.tableData) {
         return [];
       } else {
+        console.log()
         return this.tableData.map((d) => d.id);
       }
     },