소스 검색

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_web into V0.0.2

luojun 2 년 전
부모
커밋
e165519ba9
3개의 변경된 파일22개의 추가작업 그리고 22개의 파일을 삭제
  1. 10 15
      src/components/orgTreeSelect/index.vue
  2. 11 5
      src/views/core/edu/plan/index.vue
  3. 1 2
      src/views/system/workTimeSet/workTime.vue

+ 10 - 15
src/components/orgTreeSelect/index.vue

@@ -139,6 +139,7 @@ export default {
     defaultNode: {
       immediate: true,
       handler(n) {
+        if(!n || n.length === 0)return;
         this.nodes = this.defaultNode;
         this.$nextTick(() => {
           let arr = [];
@@ -147,7 +148,6 @@ export default {
             arr.push(node.data)
           })
           this.sNodeList = arr;
-          console.log(arr,'arr')
         });
       },
     },
@@ -160,12 +160,6 @@ export default {
         }
       },
     },
-    sNodeList:{
-      deep: true,
-      handler(){
-        this.$emit("selectNode", JSON.stringify(this.sNodeList));
-      },
-    },
     queryData: {
       handler(n) {
         if (n) {
@@ -190,17 +184,15 @@ export default {
     //   defaultNode:
     //   //pv: sync("value"),
     // },
-    model: {
-      prop: "defaultNode",
-      event: "change",
-    },
+
   },
-    methods: {
+  methods: {
       clear() {
         this.sNodeList = [];
         this.$refs.tree.setCheckedKeys([]);
         this.$refs.tree.setCurrentKey(null);
-        //this.$emit("selectNode", JSON.stringify(this.sNodeList));
+        this.nodes = [];
+        this.$emit("selectNode", JSON.stringify(this.sNodeList));
       },
       //筛选条件变化
       serchTreeHandler() {
@@ -246,7 +238,7 @@ export default {
         }
         // debugger;
         this.sNodeList = this.$refs.tree.getCheckedNodes();
-        //this.$emit("selectNode", JSON.stringify(this.sNodeList));
+        this.$emit("selectNode", JSON.stringify(this.sNodeList));
       },
       recursionTreeHandler(type, tree) {
         tree.forEach((item) => {
@@ -273,7 +265,10 @@ export default {
         }
       },
     },
-
+  model: {
+    prop: "defaultNode",
+    event: "selectNode",
+  },
 };
 </script>
 

+ 11 - 5
src/views/core/edu/plan/index.vue

@@ -219,9 +219,13 @@
                                        placeholder="请选择培训机构"/>
                         </el-form-item>-->
             <el-form-item v-show="form.execOrgType" label="培训机构" prop="planExecOrgIdList">
-<!--              <p>{{form.planExecOrgIdList}}</p>-->
-              <org-tree-select :default-node="form.planExecOrgIdList"  :queryData="form.execOrgType" ref="orgTreeSelect"
-                               @selectNode="queryNode" :disable="true">
+              <p>{{form.planExecOrgIdList}}</p>
+              <org-tree-select
+                v-model="form.planExecOrgIdList"
+                :queryData="form.execOrgType"
+                ref="orgTreeSelect"
+                @selectNode="queryNode"
+                :disable="true">
               </org-tree-select>
             </el-form-item>
           </el-col>
@@ -528,10 +532,12 @@ export default {
       const id = row.id || this.ids
       getPlan(id).then(response => {
         this.form = response.data;
-        console.log(this.form,'ffffff')
+
        //将 this.form.planExecOrgIdList中的元素转为字符串
+        if(this.form.planExecOrgIdList == null){
+          this.form.planExecOrgIdList = [];
+        }
         this.form.planExecOrgIdList = this.form.planExecOrgIdList.map(element => element.toString());
-        console.log("this.form.planExecOrgIdList", this.form.planExecOrgIdList);
         this.formFileListDefualtValue = this.form.fileList;
         this.open = true;
         this.title = "修改教育培训计划";

+ 1 - 2
src/views/system/workTimeSet/workTime.vue

@@ -59,8 +59,7 @@
                 v-model="queryParams.isEnable"
                 placeholder="请选择"
                 clearable
-                style="width: 240px"
-              >
+                style="width: 240px">
                 <el-option
                   v-for="dict in dict.type.sys_business_type"
                   :key="dict.value"