Explorar el Código

调整检查计划

luojun hace 2 años
padre
commit
181fb5edca
Se han modificado 2 ficheros con 6 adiciones y 24 borrados
  1. 1 1
      src/api/safetycheck/plan.js
  2. 5 23
      src/views/check/dialog.edit.vue

+ 1 - 1
src/api/safetycheck/plan.js

@@ -26,7 +26,7 @@ export function distribute(query) {
 }
 export function getPointIds(id) {
   return request({
-    url: '/core/api/plan/getPointIds/' + id,
+    url: '/core/checkplan/getPointIds/' + id,
     method: 'get'
   })
 }

+ 5 - 23
src/views/check/dialog.edit.vue

@@ -273,10 +273,6 @@ import DialogSelect from "@/views/safetycheck/ruleManager/dialog.select.point.vu
 export default {
   dicts: ["sys_org_type", "check_type", "check_cycle", "check_status","point_data_source"],
   data() {
-    // const params = this.$route.params;
-    // let o1=options;
-    // let o=statusOptions;
-    // debugger
     return {
       defaultSelect: [],
       selectedValues: [],
@@ -345,13 +341,6 @@ export default {
       };
     },
     handleCheckboxChange() {
-      console.log(this.formData.buildTaskNow,"this.formData.buildTaskNow");
-    },
-    onexecOrgSelect(node) {
-      this.formData.execOrgIds = node.val;
-    },
-    oncheckOrgSelect(node) {
-      this.formData.checkOrg = node.id;
     },
     reset() {
       return {
@@ -460,9 +449,7 @@ export default {
         this.tableData.push(tem);
       }
     },
-    onOrgTypeChanged() {
-      this.getRolesByOrg();
-    },
+
     async show(id, other = {}) {
       this.id = id;
       this.tableData = null;
@@ -482,10 +469,12 @@ export default {
       if (this.id == null) {
         this.defaultSelect = [];
         return;
-      }
-      api.getPointIds(this.id).then((res) => {
+      }else{
+        api.getPointIds(this.id).then((res) => {
         this.defaultSelect = res.data;
       });
+      }
+   
     },
     openSelect() {
       this.getIteamF();
@@ -498,16 +487,9 @@ export default {
         if (!isValidate) return;
         this.formData.rulePointList = this.tableData == null ? [] : this.tableData;
         this.formData.roleList = null;
-        // console.log(this.selectedValues,"selectedValues");
         this.formData.roleIds =
           this.selectedValues.length == 0 ? null : this.selectedValues;
-        // this.formData.buildTaskNow = this.formData.buildTaskNow ? 1 : 0;
-        // if (this.id == undefined) {
         await api.add(this.formData);
-        // } else {
-        // await api.update(this.formData);
-        // }
-
         this.$emit("success");
         this.onHide();
       });