Kaynağa Gözat

Merge remote-tracking branch 'origin/V0.0.2' into V0.0.2

jingyuanchao 2 yıl önce
ebeveyn
işleme
3cefdd02ba

+ 2 - 2
.env.development

@@ -8,12 +8,12 @@ ENV = 'development'
 #测试地址
 #VUE_APP_BASE_API = 'http://10.87.10.91:8080'
 #罗俊
-VUE_APP_BASE_API = 'http://10.87.10.49:8080'
+#VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
 # 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
 

+ 10 - 1
src/api/resumption/configuration.js

@@ -7,4 +7,13 @@ export function insertConfiguration(data) {
       method: 'post',
       data: data
     })
-  }
+  }
+
+  // 回显【请填写功能名称】
+export function getInfo() {
+  return request({
+    url: '/core/configuration',
+    method: 'get',
+  
+  })
+}

+ 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) {

+ 10 - 7
src/views/information/configuration/index.vue

@@ -144,13 +144,13 @@
 </template>
 
 <script>
-import { insertConfiguration } from "@/api/resumption/configuration";
+import { insertConfiguration ,getInfo} from "@/api/resumption/configuration";
 export default {
   props: [],
   components: {},
   data() {
     return {
-
+      coreResumptionConfigurationDTO:[],
       num: 1,
       day: {
         resumptionCycle: 1,
@@ -252,20 +252,23 @@ export default {
   watch: {},
   computed: {},
   beforeCreate() { },
-  created() { },
+
   beforeMount() { },
   mounted() { },
   beforeUpdate() { },
   updated() { },
   destroyed() { },
-
+  created() {
+    this.selectInfo();
+  },
   methods: {
     request() { },
     handleChange(value) { },
-    hello() {
-      alert("来自预设逻辑代码的问候")
+    selectInfo(){
+      getInfo().then(response=>{
+        this.coreResumptionConfigurationDTO = response.rows;
+      })
     },
-
     checkForm(form) {
       let val
       this.$refs[form].validate(valid => {

+ 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>