liang hace 3 años
padre
commit
a181bba1b1

+ 11 - 2
src/api/bdglSecret/secret.js

@@ -17,6 +17,15 @@ export function getSecret(id) {
   })
 }
 
+// 查询统计详细
+export function getNumber(query) {
+  return request({
+    url: '/bdglSecret/secret/getNumber',
+    method: 'get',
+    params: query
+  })
+}
+
 // 新增保密设备外借记录
 export function addSecret(data) {
   return request({
@@ -52,11 +61,11 @@ export function exportSecret(query) {
   })
 }
 
-// 查询部门 
+// 查询部门
 export function getDepts(query) {
   return request({
     url: '/system/dept/list',
     method: 'get',
     params: query
   })
-}
+}

+ 11 - 3
src/api/workingArrangements/workTask.js

@@ -35,6 +35,14 @@ export function updateWorkTask(data) {
   })
 }
 
+// 获取多选单位下的人员
+export function getUnitUsers(data) {
+  return request({
+    url: '/grassrootsregistration/common/getUnitUsers?deptIds='+data,
+    method: 'get',
+  })
+}
+
 // 删除工作任务
 export function delWorkTask(id) {
   return request({
@@ -76,7 +84,7 @@ export function allUser() {
   })
 }
 
-// 查询部门 
+// 查询部门
 export function getDept(query) {
   return request({
     url: '/grassrootsregistration/common/getDept',
@@ -100,10 +108,10 @@ export function moreProgress(id) {
   })
 }
 // 进度录入上传数据接口
-export function uploadProgress(obj) { 
+export function uploadProgress(obj) {
   return request({
     url:"/workingArrangements/workProgress",
     method:"put",
     data:obj
   })
-}
+}

+ 77 - 0
src/views/bdglSecret/secret/index.vue

@@ -97,6 +97,42 @@
       </el-col> -->
     </el-row>
 
+    <div class="hezi">
+    <div  class="tji">涉密物品统计</div>
+    <div style="display: flex;
+                    justify-content:space-evenly;
+                    padding: 41px 20px;">
+    <div style="width: 173px;
+                    display: flex;
+                    justify-content: space-evenly;
+                    align-items: center;">
+     <span>移动载体</span>
+     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[3]}}</span>台</span>
+        </div>
+        <div  style="width: 173px;
+                         display: flex;
+                           justify-content:space-between;
+                          align-items: center;">
+        <span>军用手机</span>
+             <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[0]}}</span>台</span>
+            </div>
+            <div  style="width: 173px;
+       display: flex;
+        justify-content: space-evenly;
+       align-items: center;">
+<span>电脑</span>
+     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[1]}}</span>台</span>
+                </div>
+                <div  style="width: 173px;
+ display: flex;
+   justify-content: space-evenly;
+ align-items: center;">
+<span>相机</span>
+     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[2]}}</span>台</span>
+                    </div>
+    </div>
+    </div>
+
     <el-table
       v-loading="loading"
       :data="bdglsecrecyList"
@@ -391,6 +427,7 @@ import {
   updateSecret,
   exportSecret,
   getDepts,
+  getNumber
 } from "@/api/bdglSecret/secret";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -490,6 +527,8 @@ export default {
         label: "label",
       },
       unitId: [],
+      //获取统计数据
+      tongJiList:{}
     };
   },
   created() {
@@ -500,11 +539,19 @@ export default {
     getDepts().then((res) => {
       this.unitId = res.data;
     });
+    this.tongJi()
   },
   methods: {
+  //获取统计数量
+  tongJi(unitids){
+  getNumber(unitids).then(res=>{
+  this.tongJiList=res.data
+  })
+  },
     selectshou(data) {
       this.queryParams.unitId = data.id;
       this.getList();
+      this.tongJi({unitid:this.queryParams.unitId})
     },
     //单位翻译
     deptIdformatter(row, column) {
@@ -638,6 +685,7 @@ export default {
       this.reset();
       this.resetForm("queryForm");
       this.queryParams.unitId = null;
+    this.tongJi({unitid:this.queryParams.unitId})
       this.handleQuery();
     },
     /** 对话框重置按钮操作 */
@@ -705,12 +753,15 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+           this.tongJi({unitid:this.queryParams.unitId})
             });
           } else {
             addSecret(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
+              this.tongJi({unitid:this.queryParams.unitId})
+
             });
           }
         }
@@ -729,6 +780,7 @@ export default {
         })
         .then(() => {
           this.getList();
+           this.tongJi({unitid:this.queryParams.unitId})
           this.$modal.msgSuccess("删除成功");
         })
         .catch(() => {});
@@ -899,4 +951,29 @@ export default {
 ::v-deep input:-moz-placeholder {
   color: #bdbdbd4f !important;
 }
+.hezi{
+      height: 100px;
+        margin-bottom: 13px;
+        margin-top: 15px;
+      position: relative;
+       background:rgb(0, 60, 105);
+       color: #fff;
+      font-size: 18px;
+      font-weight: 600;
+
+
+}
+.tji{
+    width: 176px;
+    height: 36px;
+    text-align: center;
+    line-height: 36px;
+    position: absolute;
+    top: -18px;
+   right: 87px;
+     color: #fff;
+     font-size: 18px;
+     font-weight: 600;
+     background: #004D86;
+}
 </style>

+ 74 - 21
src/views/workingArrangements/workTask/index.vue

@@ -69,7 +69,7 @@
       </el-form-item>
       <el-form-item prop="adminId" class="plantypes" label-width="80px">
         <treeselect
-          v-model="queryParams.unitId"
+          v-model="queryParams.adminId"
           :options="users"
           placeholder="请选择发布单位"
           class="threeselects"
@@ -308,15 +308,6 @@
             placeholder="请选择发布单位"
           />
         </el-form-item>
-        <el-form-item label="执行单位" prop="unitId">
-          <treeselect
-            v-model="form.unitId"
-            :options="users"
-            class="threeselects"
-            @select="selectPeo1"
-            placeholder="请选择执行单位"
-          />
-        </el-form-item>
         <el-form-item label="任务类型" prop="type">
           <!-- <el-select
             v-model="form.type"
@@ -347,11 +338,36 @@
             class="ipt"
           ></el-input>
         </el-form-item>
+        <div>
+        <el-form-item label="执行单位" prop="unitId" label-width="100px">
+                    <div>
+                      <el-select
+                        multiple
+                         filterable
+                        v-model="form.unitId"
+                        id="execute"
+                        ref="peoplenames"
+                        placeholder="请选择执行单位"
+                        @remove-tag="selent"
+                      >
+                        <el-option
+                          v-for="(item,i) in danWeisList"
+                          :label="item.deptName"
+                          :value="item.deptId"
+                          id="execute"
+                          @click.native="danFn()"
+                        />
+                      </el-select>
+                    </div>
+                  </el-form-item>
+                </div>
+
         <div>
           <el-form-item label="执行人" prop="peopleName" label-width="100px">
             <div>
               <el-select
                 multiple
+                 filterable
                 v-model="form.peopleName"
                 id="execute"
                 ref="peoplenames"
@@ -359,11 +375,9 @@
               >
                 <el-option
                   v-for="item in executor"
-                  :key="item.deptId"
                   :label="item.nickName"
                   :value="item.userId"
                   id="execute"
-                  @click.native="returnExecutor(item.deptId, item.nickName)"
                 />
               </el-select>
             </div>
@@ -764,7 +778,7 @@
             >
               <el-option
                 v-for="item in executor"
-                :key="item.deptId"
+                :key="item.userId"
                 :label="item.nickName"
                 :value="item.userId"
                 @click.native="returnExecutor(item.deptId, item.nickName)"
@@ -976,6 +990,7 @@ import {
   singProgress,
   moreProgress,
   uploadProgress,
+  getUnitUsers
 } from "@/api/workingArrangements/workTask";
 import {
   deptUser,
@@ -984,6 +999,7 @@ import {
   getDeptList,
 } from "@/api/workingArrangements/workTask";
 import { getDicts } from "@/api/system/dict/data";
+import { listDept } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
@@ -1149,6 +1165,8 @@ export default {
       },
       // 导出文件的路径
       daoChu: "",
+      //获取单位所有不是树形结构
+      danWeisList:[]
     };
   },
   created() {
@@ -1167,6 +1185,30 @@ export default {
     });
   },
   methods: {
+  //点击多选单位
+  danFn(){
+  this.renyuanEs();
+  },
+  //获取多选单位下的人员
+  renyuanEs(){
+  if(this.form.unitId.length>0){
+    var ids=this.form.unitId.join(',');
+getUnitUsers(ids).then(res=>{
+this.executor=res.data
+})
+  }
+  },
+  //删除所有单位的某一个触发
+  selent(){
+   this.renyuanEs();
+
+  },
+  //获取所有单位
+  danWeis(){
+  listDept().then(res=>{
+  this.danWeisList=res.data
+  })
+  },
     // 导出重置
     resets() {
       this.queryParamsTime = {
@@ -1335,9 +1377,10 @@ export default {
     },
     // 发布单位选中触发
     selectPeo3(val) {
-      this.queryParams.unitId = val.id;
-      this.getZhuChi(this.queryParams.unitId);
+      this.queryParams.adminId = val.id;
       this.getList();
+      // this.queryParams.unitId = val.id;
+       //this.getZhuChi(this.queryParams.unitId);
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -1387,6 +1430,7 @@ export default {
       this.reset();
       this.open = true;
       this.title = "添加工作任务";
+      this.danWeis();
       this.form.adminId = Cookies.get("deptId");
       this.form.username = Cookies.get("nickName");
       this.form.userId = Cookies.get("userId");
@@ -1432,8 +1476,11 @@ export default {
         this.form = response.data;
         // this.form.type = parseInt(this.form.type);
         // this.getDept2()
-        this.getZhuChi(this.form.unitId);
+        //this.getZhuChi(this.form.unitId);
         this.form.peopleName = this.form.peopleName.split(",").map(Number);
+        this.form.unitId =this.form.unitId.split(",").map(Number);
+        this.danWeis();
+        this.renyuanEs()
         this.open = true;
         this.title = "修改工作计划";
       });
@@ -1510,6 +1557,9 @@ export default {
             this.form.peopleId = this.form.peopleName;
 
             if (this.form.id != null) {
+             if(this.form.unitId.length>0){
+                        this.form.unitId =this.form.unitId.join(',')
+                        }
               updateWorkTask(this.form).then((response) => {
                 this.$modal.msgSuccess("修改成功");
                 this.queryParams.type = "";
@@ -1517,11 +1567,14 @@ export default {
                 this.getList();
               });
             } else {
-              addWorkTask(this.form).then((response) => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
+            if(this.form.unitId.length>0){
+            this.form.unitId =this.form.unitId.join(',')
+            }
+             addWorkTask(this.form).then((response) => {
+                            this.$modal.msgSuccess("新增成功");
+                            this.open = false;
+                            this.getList();
+                          });
             }
           }
         }