凉纪 2 éve
szülő
commit
62f8fbcc91

+ 1 - 4
src/components/orgTree/index.vue

@@ -43,12 +43,9 @@
 </template>
 
 <script>
-import tableListMixins from "@/mixins/tableList";
-import { deptTreeSelect, handsheDeptTreeSelect } from "@/api/system/public";
 
 export default {
   name: "orgTree",
-  mixins: [tableListMixins],
   data() {
     return {
       //过滤信息
@@ -96,7 +93,7 @@ export default {
       this.defaultProps = { ...val };
     },
   },
-  mounted() {
+  created() {
     this.getDeptTree();
   },
   methods: {

+ 17 - 14
src/components/orgTreeSelect/index.vue

@@ -81,7 +81,7 @@ export default {
     // 机构树上能选择的机构类型
     enabledCheckOrgTypes: {
       type: [Number,Array],
-      default: [],
+      default: ()=>[],
       required: false,
     }
   },
@@ -118,7 +118,14 @@ export default {
     defaultNode: {
       immediate: true,
       handler(n) {
-        if (!n || n.length === 0) return;
+        if(!n || n.length == 0){
+          this.nodes = [];
+          this.sNodeList = [];
+          this.$nextTick(() => {
+            this.$refs.tree.setCheckedKeys([]);
+          });
+          return
+        }
         this.nodes = this.defaultNode;
         this.$nextTick(() => {
           let arr = [];
@@ -166,7 +173,8 @@ export default {
       this.$refs.tree.setCheckedKeys([]);
       this.$refs.tree.setCurrentKey(null);
       this.nodes = [];
-      this.$emit("selectNode", JSON.stringify(this.sNodeList));
+      this.$emit("selectNode",[]);
+      this.$emit("selectNodeId", []);
     },
     //筛选条件变化
     serchTreeHandler() {
@@ -186,12 +194,9 @@ export default {
       }
     },
     getNodedisabled(node) {
-      //console.log("getNodedisabled",node,this.enabledCheckOrgTypes)
-      return false;
       if (this.enabledCheckOrgTypes) {
-        if (Array.isArray(node)) {
-          debugger;
-          if (this.params.enabledOrgTypeList.findIndex((x) => x === node.type) == -1) {
+        if (Array.isArray(this.enabledCheckOrgTypes)) {
+          if (this.enabledCheckOrgTypes.length>0 && this.enabledCheckOrgTypes.findIndex((x) => x === node.type) == -1) {
             return true;
           }
         }
@@ -251,7 +256,9 @@ export default {
       }
       // debugger;
       this.sNodeList = this.$refs.tree.getCheckedNodes();
-      this.$emit("selectNode", JSON.stringify(this.sNodeList));
+      this.$emit("selectNode", this.sNodeList);
+      let arr = this.sNodeList.map(v=>{return v.id});
+      this.$emit("selectNodeId", arr);
     },
 
     getSubOrgIdsByOrgType(topOrg, orgType, orgIdList) {
@@ -290,18 +297,15 @@ export default {
   text-overflow: ellipsis;
   white-space: nowrap;
   cursor: pointer;
-
-  >span {
+  > span {
     margin: 5px 10px;
   }
-
   &:hover {
     .close-icon {
       display: block;
       color: #666;
     }
   }
-
   .close-icon {
     position: absolute;
     top: 30%;
@@ -310,7 +314,6 @@ export default {
     cursor: pointer;
   }
 }
-
 .tree-box {
   margin-top: 20px;
   max-height: 300px;

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

@@ -232,7 +232,7 @@
                 v-model="form.planExecOrgIdList"
                 :queryData="form.execOrgType"
                 ref="orgTreeSelect"
-                @selectNode="queryNode"
+                :enabledCheckOrgTypes="form.execOrgType"
                 :disable="true">
               </org-tree-select>
             </el-form-item>

+ 13 - 13
src/views/core/edu/task/dialog.info.vue

@@ -222,20 +222,20 @@ export default {
             if (window.navigator.msSaveOrOpenBlob) {
                 navigator.msSaveBlob(blob, filename);
             } else {
-               var link = document.createElement("a");
-                var body = document.querySelector("body");
+                let link = document.createElement("a");
+                let body = document.querySelector("body");
 
-                link.href = window.URL.createObjectURL(blob);
-                link.download = filename;
-                
-                // fix Firefox
-                link.style.display = "none";
-                body.appendChild(link);
-                
-                link.click();
-                body.removeChild(link);
-
-               window.URL.revokeObjectURL(link.href);
+               //  link.href = URL.createObjectURL(blob);
+               //  link.download = filename;
+               //
+               //  // fix Firefox
+               //  link.style.display = "none";
+               //  body.appendChild(link);
+               //
+               //  link.click();
+               //  body.removeChild(link);
+               //
+               // window.URL.revokeObjectURL(link.href);
            }
         },
         // 事件

+ 2 - 2
src/views/dashboard/PanelGroup.vue

@@ -33,7 +33,7 @@
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            金额
+            履职率
           </div>
           <count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
         </div>
@@ -46,7 +46,7 @@
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            订单
+            隐患
           </div>
           <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
         </div>

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

@@ -6,7 +6,7 @@
         <el-form label-width="90px" label-suffix="" label-position="right">
 
           <el-form-item label="分配机构">
-            <org-tree-select ref="orgTreeSelect" @selectNode="queryNode"></org-tree-select>
+            <org-tree-select ref="orgTreeSelect" v-model="orgIdList"></org-tree-select>
           </el-form-item >
           <el-form-item label="调整日期">
             <el-button type="primary" @click="addData">新增日期</el-button>
@@ -173,11 +173,10 @@ export default {
     },
   },
   methods: {
-    queryNode(nodes){
-      console.log(JSON.parse(nodes),'nodes')
-      this.orgIdList = JSON.parse(nodes).map(v=>{return v.id});
-      console.log(this.orgIdList);
-    },
+    // queryNode(nodes){
+    //   console.log(JSON.parse(nodes),'nodes')
+    //   this.orgIdList = JSON.parse(nodes).map(v=>{return v.id});
+    // },
     add(){
       this.isShow = true;
     },
@@ -320,8 +319,9 @@ export default {
           return;
         }
       }
+      let orgIdList = this.orgIdList.map(v=>{return v.id});
       let data = {
-        orgIdList:this.orgIdList,
+        orgIdList,
         workTimeList:workTimeList
       }
       addWorkTimeDay(data).then(res=>{

+ 4 - 19
src/views/system/workTimeSet/dialog.template.vue

@@ -6,12 +6,11 @@
         <el-form
             :disabled="title === '查看作息模版'"
             label-width="140px"
-            :rules="rules"
             label-suffix=":"
             label-position="left">
           <el-form-item>
             <span slot="label"> <span style="color: red"> * </span>机构 </span>
-            <org-tree-select v-model="tagsList" :disabled="data.disabled" @selectNode="queryNode"></org-tree-select>
+            <org-tree-select v-model="data.orgIdList" :disabled="data.disabled" ></org-tree-select>
           </el-form-item>
           <el-form-item >
             <span slot="label"> <span style="color: red"> * </span>生效日期 </span>
@@ -181,15 +180,6 @@ export default {
         orgIdList: [],
         disabled: false,
       },
-      rules: {
-        orgIdList: [
-          {
-            required: true,
-            message: "请选择机构",
-            trigger: "change",
-          },
-        ],
-      },
       startDatepickerOptions: {
         disabledDate(time) {
           const date = new Date();
@@ -218,10 +208,7 @@ export default {
     },
   },
   methods: {
-    queryNode(json){
-      this.data.orgIdList = JSON.parse(json);
-      console.log(this.orgIdList,'orgIdList')
-    },
+
     edit(row){
       this.title = '编辑作息模版';
       this.isShow = true;
@@ -242,7 +229,7 @@ export default {
       this.formData.orgIds = this.data.orgIdList.map(v=>{
         return v.id
       });
-      if (this.data.orgIdList.length < 1) {
+      if (this.formData.orgIds.length < 1) {
         this.$message.error("机构不能为空");
         return;
       }
@@ -261,8 +248,8 @@ export default {
         }
       }
       addTimeWeek(this.formData).then(res=>{
-        this.$emit("ok");
         this.handleClose();
+        this.$emit("ok");
       })
     },
     checkItem(dayOfWeek){
@@ -306,10 +293,8 @@ export default {
           ];
           this.data.disabled = true;
           this.data.orgIdList = [this.formData.orgId];
-          console.log(this.formData.orgIdList);
           if (this.orgId) {
             this.data.orgIdList = [this.formData.orgId];
-            console.log(this.data.orgIdList);
           }
         } else {
           this.data.orgIdList = [];

+ 5 - 40
src/views/system/workTimeSet/workTime.vue

@@ -3,33 +3,6 @@
       <el-row :gutter="20">
         <!--机构数据-->
         <el-col :span="4" :xs="24">
-  <!--        <div class="head-container">-->
-  <!--          <el-input-->
-  <!--            v-model="deptName"-->
-  <!--            placeholder="请输入机构名称"-->
-  <!--            clearable-->
-  <!--            size="small"-->
-  <!--            prefix-icon="el-icon-search"-->
-  <!--            style="margin-bottom: 20px"-->
-  <!--          />-->
-  <!--        </div>-->
-  <!--        <div class="tree-container">-->
-  <!--          <div style="margin-bottom: 10px;">-->
-  <!--            <el-checkbox v-model="queryParams.checkSub" @change="changeCheckBox">关联下级</el-checkbox>-->
-  <!--          </div>-->
-  <!--          <el-tree-->
-  <!--            :data="deptOptions"-->
-  <!--            :props="defaultProps"-->
-  <!--            :expand-on-click-node="false"-->
-  <!--            :filter-node-method="filterNode"-->
-  <!--            ref="tree"-->
-  <!--            node-key="id"-->
-  <!--            highlight-current-->
-  <!--            :default-expanded-keys="defaultKeys"-->
-  <!--            :default-checked-keys="defaultKeys"-->
-  <!--            @node-click="handleNodeClick"-->
-  <!--          />-->
-  <!--        </div>-->
           <org-tree
             v-model="queryParams.orgId"
             @defaultKey="getDefaultKey"
@@ -105,7 +78,7 @@
             style="width: auto;"
             border
             :data="tableList">
-            <el-table-column fixed label="序号" type="index" align="center" width="50"></el-table-column>
+            <el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
             <el-table-column v-if="columns[0].visible" prop="orgName" label="机构"  :show-overflow-tooltip="true"></el-table-column>
             <el-table-column v-if="columns[1].visible" label="日期" >
               <span slot-scope="scope">{{scope.row.ymdDate}}</span>
@@ -231,13 +204,6 @@ export default {
       },
     };
   },
-  // watch: {
-  //   // 根据名称筛选机构树
-  //   deptName(val) {
-  //     this.$refs.tree.filter(val);
-  //   }
-  // },
-
   methods: {
     getDefaultKey(key) {
       this.queryParams.orgId = key;
@@ -302,11 +268,10 @@ export default {
     },
     /* 重置搜索 */
     resetForm(name){
-      this.queryParams = {
-        orgId: null,
-        isEnable:'1',
-        range: [formatTime(timeb), formatTime(timea)],
-      };
+      this.queryParams.isEnable = '1';
+      this.queryParams.pageNum= 1;
+      this.queryParams.pageSize=10;
+      this.queryParams.range = [formatTime(timeb), formatTime(timea)];
       this.getList();
     },
     /** 搜索按钮操作 */

+ 5 - 8
src/views/system/workTimeSet/workTimeWeek.vue

@@ -47,7 +47,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="addTemplate"
-              v-hasPermi="['system:user:add']"
+              v-hasPermi="['system:time:add']"
             >新增作息模板</el-button>
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
@@ -71,7 +71,7 @@
 <!--                <el-button type="text" v-if="r.row.timeCheck===0||r.row.timeCheck===3" @click="onEdit(r.row)">编辑</el-button>-->
 <!--                <el-button type="text" v-if="r.row.timeCheck===0" @click="onDelete(r.row.id)">删除</el-button>-->
 <!--                <el-button type="text" v-if="r.row.timeCheck===1||r.row.timeCheck===2" @click="info(r.row)">查看</el-button>-->
-                <el-button type="text"  v-hasPermi="['system:user:details']" @click="lookItem(r.row)">查看</el-button>
+                <el-button type="text" v-hasPermi="['system:time:details']" @click="lookItem(r.row)">查看</el-button>
             </template>
 
           </el-table-column>
@@ -233,12 +233,9 @@ export default {
     },
     /* 重置搜索 */
     resetForm(name){
-      this.queryParams = {
-          pageNum: 1,
-          pageSize: 10,
-          orgId: null,
-          isEnable:false,
-      }
+      this.queryParams.isEnable = false;
+      this.queryParams.pageNum= 1;
+      this.queryParams.pageSize=10;
       this.dateRange = [];
       this.getList();
     },