zxr 3 жил өмнө
parent
commit
3be4129e6f

+ 1 - 1
src/components/look_word/bdgldiary.vue

@@ -206,7 +206,7 @@
           "
         >
           <td class="JR_right" height="70">{{ items.dateline }}</td>
-          <td colspan="9" v-html="items.contents"></td>
+          <td colspan="9" v-html="items.contents+(items.organizer)"></td>
           <td class="JR_right" height="70">{{ items.shouldArrive }}</td>
           <td class="JR_right" height="70">{{ items.realTo }}</td>
           <td class="JR_right" height="70">{{ items.percentage }}</td>

+ 1 - 1
src/main.js

@@ -131,7 +131,7 @@ Vue.prototype.$on = function (event, func) {
       clearTimeout(timer)
       timer = setTimeout(function () {
         flag = true
-      }, 1000)
+      }, 3000)
     }
   }
   on.call(this, event, newFunc)

+ 83 - 68
src/views/grassrootsregistration/bdgldiary/index.vue

@@ -113,8 +113,8 @@
           <template scope="scope">
             <span>{{
               (queryParams.pageNum - 1) * queryParams.pageSize +
-              scope.$index +
-              1
+                scope.$index +
+                1
             }}</span>
           </template>
         </el-table-column>
@@ -353,7 +353,7 @@
                       type="textarea"
                       :rows="1"
                       placeholder="请输入内容"
-                      v-model="item.contents"
+                      v-model="item.centertext"
                       :autosize="true"
                       resize="none"
                     >
@@ -659,7 +659,7 @@
                     <el-time-picker
                       v-model="item1.examineDate"
                       :picker-options="{
-                        selectableRange: '00:00:00 - 23:59:59',
+                        selectableRange: '00:00:00 - 23:59:59'
                       }"
                       placeholder="选择日期时间"
                       value-format="hh:mm:ss"
@@ -732,7 +732,7 @@
                     <el-time-picker
                       v-model="item1.comeDate"
                       :picker-options="{
-                        selectableRange: '00:00:00 - 23:59:59',
+                        selectableRange: '00:00:00 - 23:59:59'
                       }"
                       placeholder="来队时间"
                       value-format="hh:mm:ss"
@@ -752,7 +752,7 @@
                     <el-time-picker
                       v-model="item1.leaveDate"
                       :picker-options="{
-                        selectableRange: '00:00:00 - 23:59:59',
+                        selectableRange: '00:00:00 - 23:59:59'
                       }"
                       placeholder="离队时间"
                       value-format="hh:mm:ss"
@@ -843,7 +843,7 @@ import {
   updateBdgldiary,
   exportBdgldiary,
   exportBdgShuju,
-  updateBdglShenPi,
+  updateBdglShenPi
 } from "@/api/grassrootsregistration/bdgldiary";
 
 import {
@@ -852,7 +852,7 @@ import {
   getUser,
   getShiLi,
   getXunLian,
-  getWeiShu,
+  getWeiShu
 } from "@/api/grassrootsregistration/bdglmeeting";
 
 import { getDicts } from "@/api/system/dict/data";
@@ -932,50 +932,50 @@ export default {
         weekwork: null,
         examine: null,
         peopleId1: null,
-        contents: null,
+        contents: null
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         unitId: [
-          { required: true, message: "单位名称不能为空", trigger: "blur" },
+          { required: true, message: "单位名称不能为空", trigger: "blur" }
         ],
         peopleId: [
           // { required: true, message: "值班人员不能为空", trigger: "blur" },
         ],
         blogDate: [
-          { required: true, message: "值班日期不能为空", trigger: "blur" },
+          { required: true, message: "值班日期不能为空", trigger: "blur" }
         ],
         weather: [{ required: true, message: "天气不能为空", trigger: "blur" }],
         lead: [
-          { required: true, message: "值班首长不能为空", trigger: "change" },
+          { required: true, message: "值班首长不能为空", trigger: "change" }
         ],
         orgcadre: [
-          { required: true, message: "编制干部不能为空", trigger: "blur" },
+          { required: true, message: "编制干部不能为空", trigger: "blur" }
         ],
         orgsoldier: [
-          { required: true, message: "编制战士不能为空", trigger: "blur" },
+          { required: true, message: "编制战士不能为空", trigger: "blur" }
         ],
         orgcivilian: [
-          { required: true, message: "编制文职不能为空", trigger: "blur" },
+          { required: true, message: "编制文职不能为空", trigger: "blur" }
         ],
         nowcadre: [
-          { required: true, message: "现有干部不能为空", trigger: "blur" },
+          { required: true, message: "现有干部不能为空", trigger: "blur" }
         ],
         nowsoldier: [
-          { required: true, message: "现有战士不能为空", trigger: "blur" },
+          { required: true, message: "现有战士不能为空", trigger: "blur" }
         ],
         nowcivilian: [
-          { required: true, message: "现有文职不能为空", trigger: "blur" },
-        ],
+          { required: true, message: "现有文职不能为空", trigger: "blur" }
+        ]
       },
       BdgDay: [],
       // 搜索人员
       Renyuan: [],
       // 字典类型查询
       dictType: {
-        dictType: "yssp",
+        dictType: "yssp"
       },
       // 字典数据
       ziDian: [],
@@ -985,12 +985,12 @@ export default {
       pickerOptions: {
         disabledDate(time) {
           return time.getTime() > Date.now();
-        },
+        }
       },
       // 树形配置
       defaultProps: {
         children: "children",
-        label: "label",
+        label: "label"
       },
       // 组织人搜索列表00
       list: [],
@@ -1003,8 +1003,8 @@ export default {
           foremanName: null,
           sentryName: null,
           examineDate: null,
-          dialogue: null,
-        },
+          dialogue: null
+        }
       ],
       //添加对话框来访人员表格为空
       relatives: [
@@ -1013,8 +1013,8 @@ export default {
           name: null,
           relation: null,
           comeDate: null,
-          leaveDate: null,
-        },
+          leaveDate: null
+        }
       ],
       // 临时来队亲属
       relatives: [
@@ -1023,8 +1023,8 @@ export default {
           name: null,
           relation: null,
           comeDate: null,
-          leaveDate: null,
-        },
+          leaveDate: null
+        }
       ],
       // 搜索时间保存
       tiem: null,
@@ -1036,8 +1036,8 @@ export default {
           shouldArrive: null,
           realTo: null,
           percentage: null,
-          organizer:null
-        },
+          organizer: null
+        }
       ],
       // 数据时间
       DataTime: "",
@@ -1057,6 +1057,7 @@ export default {
       weishenpi: "",
       // 数据时间的保存
       tiems: "",
+      centertext: null
     };
   },
   // updated() {
@@ -1084,7 +1085,7 @@ export default {
       this.opens = false;
       this.statusShen = true;
       const id = row.id || this.ids;
-      getBdgldiary(id).then((response) => {
+      getBdgldiary(id).then(response => {
         this.wordInfo = response.data;
         this.title = "审批要事日记";
         this.menuRoleVisible = true;
@@ -1094,7 +1095,7 @@ export default {
     queDing() {
       this.wordInfo.examine = "1";
       if (this.wordInfo.id != null) {
-        updateBdglShenPi(this.wordInfo).then((response) => {
+        updateBdglShenPi(this.wordInfo).then(response => {
           this.menuRoleVisible = false;
           this.getList();
           this.getShuJu(this.timeDate);
@@ -1104,7 +1105,7 @@ export default {
     },
     // 获取部门数据
     getShuJu(data) {
-      exportBdgShuju(data).then((res) => {
+      exportBdgShuju(data).then(res => {
         this.DataTime = data;
         this.registrationData = res;
         this.cg = res.cg;
@@ -1123,7 +1124,7 @@ export default {
     },
     // 应到人数失去焦点触发
     yinDao() {
-      this.xunlian.forEach((item) => {
+      this.xunlian.forEach(item => {
         if (item.shouldArrive != null && item.realTo != null) {
           var str = ((item.realTo / item.shouldArrive) * 100).toFixed(2);
           str += "%";
@@ -1133,7 +1134,7 @@ export default {
     },
     // 实到人数失去焦点触发
     shiDao() {
-      this.xunlian.forEach((item) => {
+      this.xunlian.forEach(item => {
         if (item.shouldArrive != null && item.realTo != null) {
           var str = ((item.realTo / item.shouldArrive) * 100).toFixed(2);
           str += "%";
@@ -1155,16 +1156,19 @@ export default {
       let s = tiem.getSeconds();
       s = s < 10 ? "0" + s : s;
       let dateTime = y + "-" + m + "-" + d + " " + h + ":" + M + ":" + s;
-      getXunLian(id, dateTime).then((res) => {
+      getXunLian(id, dateTime).then(res => {
         console.log(res.data);
         this.xunlian = res.data;
         for (var i = 0; i < res.data.length; i++) {
-          this.xunlian[i].contents =
+          res.data[i].centertext =
             res.data[i].startTime +
             "-" +
             res.data[i].endTime +
             "  " +
-            this.xunlian[i].contents+'('+this.xunlian[i].organizer+')';
+            this.xunlian[i].contents +
+            "(" +
+            this.xunlian[i].organizer +
+            ")";
         }
       });
     },
@@ -1175,7 +1179,7 @@ export default {
     },
     /** 新增查询部门下拉树结构 */
     getTreeselect() {
-      getDept().then((response) => {
+      getDept().then(response => {
         this.rese = response.data;
       });
     },
@@ -1187,7 +1191,7 @@ export default {
         foremanName: null,
         sentryName: null,
         examineDate: null,
-        dialogue: null,
+        dialogue: null
       });
     },
 
@@ -1203,7 +1207,7 @@ export default {
         name: null,
         relation: null,
         comeDate: null,
-        leaveDate: null,
+        leaveDate: null
       });
     },
     //删除对话框临时来访人员
@@ -1213,7 +1217,7 @@ export default {
 
     // 获取外面部门树形
     treeselect() {
-      getWeiShu().then((res) => {
+      getWeiShu().then(res => {
         this.deptOptions = res.data;
       });
     },
@@ -1239,12 +1243,12 @@ export default {
         dutyD: null,
         dutyE: null,
         dutyF: null,
-        dutylead: null,
+        dutylead: null
       }),
         (this.relatives = [
           {
-            peopleId: null,
-          },
+            peopleId: null
+          }
         ]);
     },
     // 当点击完成值班时间的选择发起请求
@@ -1256,7 +1260,7 @@ export default {
     },
     // 获取实力情况
     getShiLiRen(id) {
-      getShiLi(id).then((res) => {
+      getShiLi(id).then(res => {
         this.form.orgcadre = res.data.ganbu;
         this.form.orgsoldier = res.data.shiBin;
         this.form.orgcivilian = res.data.wenZhi;
@@ -1281,19 +1285,19 @@ export default {
     },
     // 根据部门获取人员
     getRenYuan(id) {
-      getZhuChiRen(id).then((res) => {
+      getZhuChiRen(id).then(res => {
         this.renYuan = res.data;
       });
     },
     // 获取首长
     getShou(id) {
-      getUser(id).then((res) => {
+      getUser(id).then(res => {
         this.shouZhang = res.data;
       });
     },
     // 搜索第一个选中触发
     search() {
-      getZhuChiRen(this.queryParams.deptId).then((res) => {
+      getZhuChiRen(this.queryParams.deptId).then(res => {
         this.Renyuan = res.data;
       });
       this.getList();
@@ -1305,7 +1309,7 @@ export default {
     },
     // 字典查询
     getdict() {
-      getDicts(this.dictType.dictType).then((res) => {
+      getDicts(this.dictType.dictType).then(res => {
         // console.log(res);
         this.ziDian = res.data;
       });
@@ -1313,7 +1317,7 @@ export default {
     /** 查询要事日记列表 */
     getList() {
       this.loading = true;
-      listBdgldiary(this.queryParams).then((response) => {
+      listBdgldiary(this.queryParams).then(response => {
         this.bdgldiaryList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -1366,7 +1370,7 @@ export default {
         peopleId1: null,
         contents: null,
         createId: null,
-        createName: null,
+        createName: null
       };
       (this.relatives = [
         {
@@ -1375,8 +1379,8 @@ export default {
           comeDate: null,
           leaveDate: null,
           peopleId: null,
-          peopleName: null,
-        },
+          peopleName: null
+        }
       ]),
         (this.checkShop = [
           {
@@ -1384,8 +1388,8 @@ export default {
             foremanName: null,
             sentryName: null,
             examineDate: null,
-            dialogue: null,
-          },
+            dialogue: null
+          }
         ]),
         (this.xunlian = [
           {
@@ -1394,8 +1398,8 @@ export default {
             shouldArrive: null,
             realTo: null,
             percentage: null,
-            organizer:null
-          },
+            organizer: null
+          }
         ]),
         this.resetForm("form");
     },
@@ -1416,7 +1420,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -1438,9 +1442,20 @@ export default {
       this.getTreeselect();
       this.reset();
       const id = row.id || this.ids;
-      getBdgldiary(id).then((response) => {
+      getBdgldiary(id).then(response => {
         this.form = response.data;
         this.xunlian = response.data.weekworkRegisters;
+        for (var i = 0; i < this.xunlian.length; i++) {
+          this.xunlian[i].centertext =
+            this.xunlian[i].startTime +
+            "-" +
+            this.xunlian[i].endTime +
+            "  " +
+            this.xunlian[i].contents +
+            "(" +
+            this.xunlian[i].organizer +
+            ")";
+        }
         // 请求人员
         this.getRenYuan(this.form.unitId);
         //  请求首长
@@ -1469,7 +1484,7 @@ export default {
       this.opens = false;
       this.statusShen = false;
       const id = row.id || this.ids;
-      getBdgldiary(id).then((response) => {
+      getBdgldiary(id).then(response => {
         this.wordInfo = response.data;
         this.title = "查看要事日记";
         this.menuRoleVisible = true;
@@ -1479,7 +1494,7 @@ export default {
     /** 提交按钮 */
     submitForm(style) {
       this.style = style;
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
           if (
             (this.relatives[0].name ||
@@ -1498,7 +1513,7 @@ export default {
             this.form.inspect = this.checkShop;
           }
           if (this.form.id != null) {
-            updateBdgldiary(this.form).then((response) => {
+            updateBdgldiary(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
@@ -1520,7 +1535,7 @@ export default {
             }
             // 训练计划
             this.form.weekworkRegisters = this.xunlian;
-            addBdgldiary(this.form).then((response) => {
+            addBdgldiary(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -1546,7 +1561,7 @@ export default {
       this.$modal
         // .confirm('是否确认删除要事日记编号为"' + ids + '"的数据项?')
         .confirm("是否确认删除该数据?")
-        .then(function () {
+        .then(function() {
           return delBdgldiary(ids);
         })
         .then(() => {
@@ -1564,13 +1579,13 @@ export default {
           this.exportLoading = true;
           return exportBdgldiary(queryParams);
         })
-        .then((response) => {
+        .then(response => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
         .catch(() => {});
-    },
-  },
+    }
+  }
 };
 </script>