Эх сурвалжийг харах

Merge branch 'master' of http://101.43.194.146:10101/root/supervision-ui

liangjiahao 3 жил өмнө
parent
commit
de416b9359

+ 10 - 1
src/api/grassrootsregistration/bdgldiary.js

@@ -51,4 +51,13 @@ export function exportBdgldiary(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 选择页面时间查询当前数据
+export function exportBdgShuju(query) {
+  return request({
+    url: '/grassrootsregistration/bdgldiary/getNumber',
+    method: 'get',
+    params: { date: query }
+  })
+}

+ 8 - 0
src/api/grassrootsregistration/bdglmeeting.js

@@ -172,3 +172,11 @@ export function getAll() {
   })
 }
 
+// 获取人员名册
+export function getXiangQi(query) {
+  return request({
+    url: '/grassrootsregistration/personnelRoster/getDeptXiangQi',
+    method: 'get',
+    params: { deptId: query }
+  })
+}

+ 9 - 0
src/api/grassrootsregistration/bdglweekwork.js

@@ -50,4 +50,13 @@ export function exportBdglweekwork(query) {
     method: 'get',
     params: query
   })
+}
+
+// 判断当前部门该时段是否有工资安排
+export function exportBdglgetWeekWork(query) {
+  return request({
+    url: '/grassrootsregistration/bdglweekwork/getWeekWork',
+    method: 'get',
+    params: query
+  })
 }

+ 71 - 29
src/views/grassrootsregistration/bdgldiary/index.vue

@@ -52,6 +52,15 @@
             >新增</el-button
           >
         </el-col>
+        <div class="shuJu">
+          <span class="box4 public"> 当前数据为 : {{ DataTime }}</span>
+          <span class="box5 public">
+            已登记部门 : {{ registrationData.yiShenPi }}</span
+          >
+          <span class="box6">
+            未登记部门 : {{ registrationData.weiShenPi }}</span
+          >
+        </div>
         <!-- <el-col :span="1.5">
           <el-button
             type="success"
@@ -101,7 +110,11 @@
         <!-- <el-table-column label="序号" align="center" prop="id" /> -->
         <el-table-column label="序号" type="index" width="50" align="center">
           <template scope="scope">
-            <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
+            <span>{{
+              (queryParams.pageNum - 1) * queryParams.pageSize +
+              scope.$index +
+              1
+            }}</span>
           </template>
         </el-table-column>
         <el-table-column label="单位" align="center" prop="unitName" />
@@ -109,12 +122,12 @@
         <el-table-column
           label="值班日期"
           align="center"
-          prop="blogDate"
+          prop="diaryTime"
           width="180"
           :editable="false"
         >
           <template slot-scope="scope">
-            <span>{{ parseTime(scope.row.blogDate, "{y}-{m}-{d}") }}</span>
+            <span>{{ parseTime(scope.row.diaryTime, "{y}-{m}-{d}") }}</span>
           </template>
         </el-table-column>
         <el-table-column label="编制干部" align="center" prop="orgcadre" />
@@ -671,6 +684,7 @@
           <el-button type="primary" @click="submitForm(1)">确 定</el-button>
         </div>
       </el-dialog>
+      <!-- 查看 -->
       <el-dialog
         :visible.sync="menuRoleVisible"
         :title="title"
@@ -692,7 +706,6 @@
 
 <script>
 import bdgldiary from "@/components/look_word/bdgldiary.vue";
-
 import {
   listBdgldiary,
   getBdgldiary,
@@ -700,6 +713,7 @@ import {
   addBdgldiary,
   updateBdgldiary,
   exportBdgldiary,
+  exportBdgShuju,
 } from "@/api/grassrootsregistration/bdgldiary";
 
 import {
@@ -896,6 +910,10 @@ export default {
           percentage: null,
         },
       ],
+      // 数据时间
+      DataTime: "",
+      //  右边登记数据
+      registrationData: {},
     };
   },
 
@@ -926,7 +944,6 @@ export default {
     queDing() {
       console.log(1);
       this.wordInfo.examine = "1";
-
       if (this.wordInfo.id != null) {
         updateBdgldiary(this.wordInfo).then((response) => {
           console.log(response);
@@ -935,11 +952,18 @@ export default {
         });
       }
     },
+    // 获取部门数据
+    getShuJu(data) {
+      exportBdgShuju(data).then((res) => {
+        this.DataTime = data;
+        this.registrationData = res;
+      });
+    },
     // 搜索时间触发
     shiJian(data) {
-      console.log(data);
       this.queryParams.diaryTime = data;
       this.getList();
+      this.getShuJu(data);
     },
     // 应到人数失去焦点触发
     yinDao() {
@@ -950,17 +974,6 @@ export default {
           item.percentage = str;
         }
       });
-      // if (
-      //   this.xunlian[0].shouldArrive != null &&
-      //   this.xunlian[0].realTo != null
-      // ) {
-      //   var str = (
-      //     (this.xunlian[0].realTo / this.xunlian[0].shouldArrive) *
-      //     100
-      //   ).toFixed(2);
-      //   str += "%";
-      //   this.xunlian[0].percentage = str;
-      // }
     },
     // 实到人数失去焦点触发
     shiDao() {
@@ -971,18 +984,6 @@ export default {
           item.percentage = str;
         }
       });
-
-      // if (
-      //   this.xunlian[0].shouldArrive != null &&
-      //   this.xunlian[0].realTo != null
-      // ) {
-      //   var str = (
-      //     (this.xunlian[0].realTo / this.xunlian[0].shouldArrive) *
-      //     100
-      //   ).toFixed(2);
-      //   str += "%";
-      //   this.xunlian[0].percentage = str;
-      // }
     },
     // 获取训练
     XunLian(id, tiem) {
@@ -1071,6 +1072,7 @@ export default {
     },
     // 当点击完成值班时间的选择发起请求
     blogDate() {
+      console.log(this.form.blogDate);
       // 判断是否全部选择
       if (this.form.unitId !== null && this.form.blogDate !== null) {
         this.XunLian(this.form.unitId, this.form.blogDate);
@@ -1694,4 +1696,44 @@ export default {
 ::v-deep input:-moz-placeholder {
   color: #bdbdbd4f !important;
 }
+.shuJu {
+  height: 16px;
+  margin-top: 13px;
+  margin-right: 90px;
+  float: right;
+  /* background-color: red; */
+  color: #fff;
+  font-size: 14px;
+}
+/* .public {
+  margin-right: 40px;
+} */
+
+.box4::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  border-radius: 50%;
+  background-color: #1d96ff;
+  margin-left: 26px;
+}
+.box5::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  border-radius: 50%;
+  background-color: #67c23a;
+  margin-left: 26px;
+}
+.box6::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  border-radius: 50%;
+  background-color: #ff4949;
+  margin-left: 26px;
+}
 </style>

+ 49 - 18
src/views/grassrootsregistration/bdglweekwork/index.vue

@@ -259,18 +259,6 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item label="时间" prop="time">
-          <el-date-picker
-            clearable
-            size="small"
-            :editable="false"
-            v-model="form.time"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择时间"
-          >
-          </el-date-picker>
-        </el-form-item> -->
         <el-form-item label="工作标题" prop="name">
           <el-input v-model="form.name" placeholder="请输入工作标题" />
         </el-form-item>
@@ -283,6 +271,7 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择开始时间"
+            @change="startTimes"
           >
           </el-date-picker>
         </el-form-item>
@@ -295,6 +284,7 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择结束时间"
+            @change="endTimes"
           >
           </el-date-picker>
         </el-form-item>
@@ -465,6 +455,7 @@ import {
   addBdglweekwork,
   updateBdglweekwork,
   exportBdglweekwork,
+  exportBdglgetWeekWork,
 } from "@/api/grassrootsregistration/bdglweekwork";
 
 import Treeselect from "@riophae/vue-treeselect";
@@ -602,6 +593,8 @@ export default {
       ],
       // 搜索单位列表
       deptOptionss: [],
+      // 已有时间不能发送
+      msg: 1,
     };
   },
   created() {
@@ -679,9 +672,45 @@ export default {
       this.form.unitName = data.label;
       this.ZhuChiRen(this.form.unitId);
       this.tomList.forEach((item, i) => {
-        console.log(item);
         this.tomList[i].unitId1 = data.label;
       });
+      if (
+        this.form.unitId != null &&
+        this.form.startTime != null &&
+        this.form.endTime != null
+      ) {
+        exportBdglgetWeekWork(this.form).then((res) => {
+          this.$modal.msgWarning(res.msg);
+          this.msg = null;
+        });
+      }
+    },
+    // 开始时间触发
+    startTimes() {
+      if (
+        this.form.unitId != null &&
+        this.form.startTime != null &&
+        this.form.endTime != null
+      ) {
+        exportBdglgetWeekWork(this.form).then((res) => {
+          this.$modal.msgWarning(res.msg);
+          this.msg = null;
+        });
+      }
+    },
+    // 结束时间触发
+    endTimes() {
+      if (
+        this.form.unitId != null &&
+        this.form.startTime != null &&
+        this.form.endTime != null
+      ) {
+        this.form.unitName = null;
+        exportBdglgetWeekWork(this.form).then((res) => {
+          this.$modal.msgWarning(res.msg);
+          this.msg = null;
+        });
+      }
     },
     /** 查询部门下拉树结构 */
     getTreeselect() {
@@ -821,11 +850,13 @@ export default {
             });
           } else {
             this.form.bdglWeekworkRegisterList = this.tomList;
-            addBdglweekwork(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+            if (this.msg) {
+              addBdglweekwork(this.form).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           }
         }
       });

+ 19 - 7
src/views/grassrootsregistration/personnelRoster/index.vue

@@ -27,10 +27,14 @@
           <el-table-column type="selection" width="55" align="center" />
           <!-- <el-table-column label="序号" align="center" type="index" /> -->
           <el-table-column label="序号" type="index" width="50" align="center">
-          <template scope="scope">
-            <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
-          </template>
-        </el-table-column>
+            <template scope="scope">
+              <span>{{
+                (queryParams.pageNum - 1) * queryParams.pageSize +
+                scope.$index +
+                1
+              }}</span>
+            </template>
+          </el-table-column>
           <!-- <el-table-column label="备用手机号" align="center" prop="id" /> -->
           <el-table-column label="姓名" align="center" prop="name" />
           <el-table-column label="性别" align="center" prop="sex">
@@ -167,7 +171,7 @@
                 v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
                 ><span class="chakan">查看</span></el-button
               >
-              <el-button
+              <!-- <el-button
                 size="btu"
                 type="text"
                 @click="handleUpdate(scope.row)"
@@ -180,7 +184,7 @@
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['peopleManage:people:remove']"
                 >删除</el-button
-              >
+              > -->
             </template>
           </el-table-column>
         </el-table>
@@ -647,9 +651,9 @@ import {
   updatePeople,
   exportPeople,
   getDept,
-  listDept,
   treeselect,
 } from "@/api/peopleManage/people";
+import { getXiangQi } from "@/api/grassrootsregistration/bdglmeeting";
 
 export default {
   name: "People",
@@ -963,6 +967,13 @@ export default {
     });
   },
   methods: {
+    // 查询人员名册
+    xiangQi(id) {
+      // console.log(id);
+      getXiangQi(id).then((res) => {
+        console.log(res);
+      });
+    },
     /** 查询人员管理列表 */
     getList() {
       this.loading = true;
@@ -1110,6 +1121,7 @@ export default {
     },
     //查看按钮操作
     handleChakan(row) {
+      this.xiangQi(row.deptId);
       // 是否隐藏按钮
       this.opens = false;
       const id = row.id || this.ids;