소스 검색

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

luowei 2 년 전
부모
커밋
cfa799120f

+ 1 - 1
.env.development

@@ -13,7 +13,7 @@ ENV = 'development'
  VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
-#VUE_APP_BASE_API = 'http://localhost:8080'
+VUE_APP_BASE_API = 'http://localhost:8080'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 

+ 9 - 7
src/components/orgTree/index.vue

@@ -110,18 +110,20 @@ export default {
         this.customRequest().then((response) => {
           this.treeList = response.data;
           this.dataFn(response.data);
-          return
+          return;
         });
+      } else {
+        if (this.hangsheTree) {
+          this.treeList = this.$store.getters.depTree;
+        } else {
+          this.treeList = this.$store.getters.orgTree;
+        }
+        this.dataFn(this.treeList);
       }
-      this.treeList = this.$store.getters.orgTree;
-      if (this.hangsheTree) {
-        this.treeList = this.$store.getters.depTree;
-      }
-      this.dataFn(this.treeList);
     },
     dataFn(arr){
+      if(!arr||arr.length===0) return;
       console.log(arr,'arrr')
-      if(arr.length==0)return
       this.defaultKeys.push(arr[0].id);
       this.$emit("defaultKey", arr[0].id);
       this.$emit("defaultOrg", arr[0]);

+ 28 - 38
src/components/orgTreeSelect/index.vue

@@ -15,7 +15,7 @@
       style="width: 100%; margin-bottom: 20px"
       v-model="queryForm.value"
       @input="serchTreeHandler"
-      placeholder="请输入过滤值"
+      placeholder="请输入查询机构名称"
     ></el-input>
     <!--  下拉框   -->
     <el-row :gutter="20" type="flex" align="middle">
@@ -36,7 +36,7 @@
         </el-select>
       </el-col>
       <el-col :span="10" :xs="24">
-        <el-checkbox v-if="!disable" v-model="checked">按过滤机构类型勾选</el-checkbox>
+        <el-checkbox v-if="queryForm.type" :disabled="disable" v-model="checked">按过滤机构类型勾选</el-checkbox>
       </el-col>
     </el-row>
     <!--  机构树   -->
@@ -107,8 +107,6 @@ export default {
   },
   data() {
     return {
-      //是否取消关联父子级
-      strictly: true,
       //清除图标
       showClearable: false,
       //弹窗显示
@@ -122,19 +120,15 @@ export default {
       },
       //受否全选
       checked: false,
-      //默认展示的node
-      //defaultNode:[],
       //已选中的node
       sNodeList: [],
+      //默认显示及展开的node
       nodes: [],
     };
   },
   mounted() {
     this.getDeptTree();
   },
-  computed:{
-
-  },
   watch: {
     defaultNode: {
       immediate: true,
@@ -151,15 +145,6 @@ export default {
         });
       },
     },
-    checked: {
-      handler(v) {
-        if (v) {
-          this.strictly = false;
-        } else {
-          this.strictly = true;
-        }
-      },
-    },
     queryData: {
       handler(n) {
         if (n) {
@@ -180,10 +165,7 @@ export default {
       //   },
       // },
     },
-    // computed: {
-    //   defaultNode:
-    //   //pv: sync("value"),
-    // },
+
 
   },
   methods: {
@@ -231,28 +213,36 @@ export default {
       },
       onCheck(data, checked, tree) {
         if (this.checked) {
-          //当前按过滤机构类型勾选
-
-          //递归查询
-          this.recursionTreeHandler(this.queryForm.type, [data]);
+          let checkNodes = this.$refs.tree.getCheckedNodes();
+          let type = this.queryForm.type;
+          let recursionFn = function(tree) {
+            tree.forEach((item) => {
+              if (type == item.type) {
+                checkNodes.push(item);
+                //console.log('name',checkNodes.indexOf(item))
+                //checkNodes.indexOf(item) >= 0? checkNodes.splice(checkNodes.indexOf(item),1):checkNodes.push(item);
+              }
+              if (item.children?.length > 0) {
+                recursionFn(item.children)
+              } else {
+                return;
+              }
+            });
+          }
+         // 递归查询
+          recursionFn(data.children);
+          let arr = checkNodes.filter(v=>{
+            return v.type == this.queryForm.type}
+          );
+          this.$refs.tree.setCheckedNodes(arr);
+          this.sNodeList = this.$refs.tree.getCheckedNodes();
+          return
         }
         // debugger;
         this.sNodeList = this.$refs.tree.getCheckedNodes();
         this.$emit("selectNode", JSON.stringify(this.sNodeList));
       },
-      recursionTreeHandler(type, tree) {
-        tree.forEach((item) => {
-          if (type == item.type) {
-            this.$refs.tree.setCheckedKeys([item.id])
 
-          }
-        });
-        if (tree.children && tree.children.length > 0) {
-          this.recursionTreeHandler(type, tree.children)
-        } else {
-          return;
-        }
-      },
       getSubOrgIdsByOrgType(topOrg, orgType, orgIdList) {
         if (!topOrg) return;
         if (topOrg.type == orgType) {

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

@@ -600,7 +600,6 @@ export default {
       }, `plan_${new Date().getTime()}.xlsx`)
     },
     showSelectFile() {
-      // this.$refs.DialogSelectFile.show();
       this.$refs["DialogSelectFile"].show();
     },
     fileSelected(list) {
@@ -609,21 +608,12 @@ export default {
       list.forEach(x => {
         tempArry=tempArry.concat(x.fileList);
       })
-      console.log("fileSelected",tempArry);
-      //this.form.fileList=this.form.fileList.concat(tempArry);
       this.formFileListDefualtValue =this.form.fileList.concat(tempArry);
     },
   },
   mounted() {
 
   },
-  updated(){
-    this.filterOrtTypeOptions=JSON.parse(JSON.stringify(this.dict.type.sys_org_type)).filter(element => {
-      if(element.value > 3){
-        return JSON.parse(JSON.stringify(element))
-      }
-    });
-    console.log('this.filterOrtTypeOptions',this.filterOrtTypeOptions);
-  }
+
 };
 </script>

+ 2 - 2
src/views/core/knowledge/index.vue

@@ -196,7 +196,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加标签";
+      this.title = "新增标签";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -205,7 +205,7 @@ export default {
       getKnowledge(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改标签";
+        this.title = "编辑标签";
       });
     },
     /** 提交按钮 */

+ 1 - 1
src/views/core/materials/index.vue

@@ -198,7 +198,7 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-show="title!='学习资料详情'" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </DialogCom>

+ 1 - 1
src/views/system/workTimeSet/dialog.add.vue

@@ -3,7 +3,7 @@
     <DialogCom title="新增作息" @close="handleClose" :visible.sync="isShow" :close-on-click-modal="false"
       custom-class="gxDialog" width="911px" append-to-body>
 <!--      <div class="p-5 work-time">-->
-        <el-form label-width="90px" label-suffix=":" label-position="right">
+        <el-form label-width="90px" label-suffix="" label-position="right">
 
           <el-form-item label="分配机构">
             <org-tree-select ref="orgTreeSelect" @selectNode="queryNode"></org-tree-select>