Переглянути джерело

完成了文档的查询要事日记,完成了一周工作安排

sunyanqiang 3 роки тому
батько
коміт
f481b9004f

+ 167 - 59
src/components/look_word/bdgldiary.vue

@@ -47,13 +47,26 @@
           align="center"
           style="border: none; font-family: 'songti'"
         >
-          <td colspan="3" height="40" style="border: none;font-family: 'fangsong'">
+          <td
+            colspan="3"
+            height="40"
+            style="border: none; font-family: 'fangsong'"
+          >
             {{ message.blogDate | dataFormat }}
           </td>
-          <td colspan="2" style="border: none;font-family: 'songti'"><span style="font-family: 'fangsong'">{{ week }}</span> </td>
-          <td colspan="6" style="border: none;font-family: 'songti'">天气:<span style="font-family: 'fangsong'">{{ message.weather }}</span></td>
-          <td colspan="3" style="border: none;font-family: 'songti'">
-            值班员: <span style="font-family: 'fangsong'">{{ message.peopleName }}</span> 
+          <td colspan="2" style="border: none; font-family: 'songti'">
+            <span style="font-family: 'fangsong'">{{ week }}</span>
+          </td>
+          <td colspan="6" style="border: none; font-family: 'songti'">
+            天气:<span style="font-family: 'fangsong'">{{
+              message.weather
+            }}</span>
+          </td>
+          <td colspan="3" style="border: none; font-family: 'songti'">
+            值班员:
+            <span style="font-family: 'fangsong'">{{
+              message.peopleName
+            }}</span>
           </td>
         </tr>
       </table>
@@ -84,11 +97,26 @@
           align="center"
           style="font-family: 'songti'"
         >
-          <td colspan="2" rowspan="2" class="JR_left" style="font-family: 'songti'">实力</td>
-          <td colspan="6" style="letter-spacing: 20px;font-family: 'songti'" class="JR_left">
+          <td
+            colspan="2"
+            rowspan="2"
+            class="JR_left"
+            style="font-family: 'songti'"
+          >
+            实力
+          </td>
+          <td
+            colspan="6"
+            style="letter-spacing: 20px; font-family: 'songti'"
+            class="JR_left"
+          >
             编制人数
           </td>
-          <td colspan="6" style="letter-spacing: 20px;font-family: 'songti'" class="JR_left">
+          <td
+            colspan="6"
+            style="letter-spacing: 20px; font-family: 'songti'"
+            class="JR_left"
+          >
             现有人数
           </td>
         </tr>
@@ -152,14 +180,11 @@
           >
             内容
           </td>
-          <td colspan="3" class="JR_left" style="font-family: 'songti'">人数</td>
+          <td colspan="3" class="JR_left" style="font-family: 'songti'">
+            人数
+          </td>
         </tr>
-        <tr
-          class="JR_tr"
-          height="30"
-          align="center"
-          
-        >
+        <tr class="JR_tr" height="30" align="center">
           <td class="JR_left" style="font-family: 'songti'">应到</td>
           <td class="JR_left" style="font-family: 'songti'">实到</td>
           <td class="JR_left" style="font-family: 'songti'">到课率</td>
@@ -171,7 +196,10 @@
           align="center"
           v-for="(items, index) in message.weekworkRegisters"
           :key="index"
-          v-show="message.weekworkRegisters.length > 0"
+          v-show="
+            message.weekworkRegisters != null ||
+            message.weekworkRegisters.length > 0
+          "
         >
           <td class="JR_right" height="70">{{ items.dateline }}</td>
           <td colspan="9" v-html="items.contents"></td>
@@ -183,9 +211,14 @@
           class="JR_tr"
           height="70"
           align="center"
-          v-if="message.weekworkRegisters == null"
+          v-if="
+            message.weekworkRegisters == null ||
+            message.weekworkRegisters.length == 0
+          "
         >
-          <td class="JR_left" height="70" style="font-family: 'songti'">早晨</td>
+          <td class="JR_left" height="70" style="font-family: 'songti'">
+            早晨
+          </td>
           <td class="JR_right" colspan="9"></td>
           <td class="JR_right"></td>
           <td class="JR_right"></td>
@@ -195,9 +228,14 @@
           class="JR_tr"
           height="70"
           align="center"
-          v-if="message.weekworkRegisters == null"
+          v-if="
+            message.weekworkRegisters == null ||
+            message.weekworkRegisters.length == 0
+          "
         >
-          <td class="JR_left" height="70" style="font-family: 'songti'">上午</td>
+          <td class="JR_left" height="70" style="font-family: 'songti'">
+            上午
+          </td>
           <td class="JR_right" colspan="9"></td>
           <td class="JR_right"></td>
           <td class="JR_right"></td>
@@ -207,9 +245,14 @@
           class="JR_tr"
           height="70"
           align="center"
-          v-if="message.weekworkRegisters == null"
+          v-if="
+            message.weekworkRegisters == null ||
+            message.weekworkRegisters.length == 0
+          "
         >
-          <td class="JR_left" height="70" style="font-family: 'songti'">下午</td>
+          <td class="JR_left" height="70" style="font-family: 'songti'">
+            下午
+          </td>
           <td class="JR_right" colspan="9"></td>
           <td class="JR_right"></td>
           <td class="JR_right"></td>
@@ -219,9 +262,14 @@
           class="JR_tr"
           height="70"
           align="center"
-          v-if="message.weekworkRegisters == null"
+          v-if="
+            message.weekworkRegisters == null ||
+            message.weekworkRegisters.length == 0
+          "
         >
-          <td class="JR_left" height="70" style="font-family: 'songti'">晚上</td>
+          <td class="JR_left" height="70" style="font-family: 'songti'">
+            晚上
+          </td>
           <td class="JR_right" colspan="9"></td>
           <td class="JR_right"></td>
           <td class="JR_right"></td>
@@ -283,7 +331,7 @@
           </td>
         </tr>
         <!-- 查铺查哨 -->
-        <tr class="JR_tr" style="font-family: 'songti'" >
+        <tr class="JR_tr" style="font-family: 'songti'">
           <td :rowspan="chapu" class="JR_left">
             <p align="center" style="font-family: 'songti'">
               查 <br />
@@ -292,12 +340,25 @@
             </p>
           </td>
-          <td class="JR_left" ><p align="center" style="font-family: 'songti'">检查人</p></td>
-          <td class="JR_left"><p align="center" style="font-family: 'songti'">时 间</p></td>
-          <td class="JR_left"><p align="center" style="font-family: 'songti'">领班员</p></td>
-          <td class="JR_left" colspan="2"><p align="center" style="font-family: 'songti'">卫兵姓名</p></td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">检查人</p>
+          </td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">时 间</p>
+          </td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">领班员</p>
+          </td>
+          <td class="JR_left" colspan="2">
+            <p align="center" style="font-family: 'songti'">卫兵姓名</p>
+          </td>
           <td class="JR_left" colspan="8">
-            <p align="center" style="letter-spacing: 20px;font-family: 'songti'" >检 查 情 况</p>
+            <p
+              align="center"
+              style="letter-spacing: 20px; font-family: 'songti'"
+            >
+              检 查 情 况
+            </p>
           </td>
         </tr>
         <tr
@@ -346,12 +407,25 @@
             </p>
           </td>
-          <td class="JR_left"><p align="center" style="font-family: 'songti'">职务</p></td>
-          <td class="JR_left"><p align="center" style="font-family: 'songti'">交班者</p></td>
-          <td class="JR_left"><p align="center" style="font-family: 'songti'">接班者</p></td>
-          <td class="JR_left" colspan="2"><p align="center" style="font-family: 'songti'">组织者</p></td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">职务</p>
+          </td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">交班者</p>
+          </td>
+          <td class="JR_left">
+            <p align="center" style="font-family: 'songti'">接班者</p>
+          </td>
+          <td class="JR_left" colspan="2">
+            <p align="center" style="font-family: 'songti'">组织者</p>
+          </td>
           <td class="JR_left" colspan="8">
-            <p align="center" style="letter-spacing: 20px;font-family: 'songti'" >交 接 情 况</p>
+            <p
+              align="center"
+              style="letter-spacing: 20px; font-family: 'songti'"
+            >
+              交 接 情 况
+            </p>
           </td>
         </tr>
         <tr class="JR_tr" height="30" align="center">
@@ -413,7 +487,7 @@
         <!-- 临时来队亲属 -->
         <tr class="JR_tr" height="30" style="font-family: 'songti'">
           <td :rowspan="qinshu" class="JR_left">
-            <p align="center" style="margin: 0 15px;font-family: 'songti'">
+            <p align="center" style="margin: 0 15px; font-family: 'songti'">
               临 <br />
               时 <br />
               来 <br />
@@ -435,14 +509,21 @@
             <p align="center" style="font-family: 'songti'">时 间</p>
           </td>
           <td class="JR_left" height="30" colspan="8">
-            <p align="center" style="letter-spacing: 10px;font-family: 'songti'">
+            <p
+              align="center"
+              style="letter-spacing: 10px; font-family: 'songti'"
+            >
               病 号 及 处 理 情 况
             </p>
           </td>
         </tr>
         <tr class="JR_tr" height="30" align="center">
-          <td class="JR_left" height="30" style="font-family: 'songti'">来队</td>
-          <td class="JR_left" height="30" style="font-family: 'songti'">离队</td>
+          <td class="JR_left" height="30" style="font-family: 'songti'">
+            来队
+          </td>
+          <td class="JR_left" height="30" style="font-family: 'songti'">
+            离队
+          </td>
           <td
             style="font-family: 'fangsong'"
             class="JR_right"
@@ -459,7 +540,7 @@
           class="JR_tr"
           v-for="(item1, i) in message.kinsfolk"
           :key="i"
-          v-show="message.kinsfolk.length > 0"
+          v-show="message.kinsfolk != null || message.kinsfolk.length > 0"
         >
           <td class="JR_right" height="30">
             <p align="center">{{ item1.peopleName }}</p>
@@ -501,8 +582,29 @@
             <p align="center"></p>
           </td>
         </tr>
+        <tr
+          style="font-family: 'fangsong'"
+          class="JR_tr"
+          v-if="message.kinsfolk == null || message.kinsfolk.length == 0"
+        >
+          <td class="JR_right" height="30">
+            <p align="center"></p>
+          </td>
+          <td class="JR_right" height="30">
+            <p align="center"></p>
+          </td>
 
-        <tr></tr>
+          <td class="JR_right" height="30">
+            <p align="center"></p>
+          </td>
+          <td class="JR_right" height="30">
+            <p align="center"></p>
+          </td>
+          <td class="JR_right" height="30">
+            <p align="center"></p>
+          </td>
+        </tr>
+        <!-- <tr></tr> -->
         <!-- <tr class="JR_tr" height="30">
           <td class="JR_right" height="30"><p align="center"></p></td>
           <td class="JR_right" height="30"><p align="center"></p></td>
@@ -518,7 +620,7 @@
           style="font-family: 'songti'"
         >
           <td rowspan="6" class="JR_left">
-            <p align="center" style="margin: 0 15px;font-family: 'songti'">
+            <p align="center" style="margin: 0 15px; font-family: 'songti'">
               请 <br />
               假 <br />
               外 <br />
@@ -532,7 +634,9 @@
           </td>
           <td class="JR_left" style="font-family: 'songti'">姓&nbsp; 名</td>
           <td class="JR_left" style="font-family: 'songti'">职&nbsp; 务</td>
-          <td class="JR_left" colspan="2" style="font-family: 'songti'">事&nbsp;&nbsp;&nbsp; 由</td>
+          <td class="JR_left" colspan="2" style="font-family: 'songti'">
+            事&nbsp;&nbsp;&nbsp; 由
+          </td>
           <td class="JR_left" colspan="2" style="font-family: 'songti'">
             时数或 <br />
             天&nbsp; 数
@@ -607,7 +711,7 @@
         <!-- 上级通知 -->
         <tr class="JR_tr">
           <td class="JR_left" width="101" style="font-family: 'songti'">
-            <p align="center" style="margin: 0 15px;font-family: 'songti'">
+            <p align="center" style="margin: 0 15px; font-family: 'songti'">
               上 <br />
               级 <br />
               通 <br />
@@ -652,18 +756,17 @@
           border: none;
         "
       >
-        <tr
-          height="30"
-          style="border: none; font-family: 'songti'"
-        ><td colspan="3" style="border: none"></td>
+        <tr height="30" style="border: none; font-family: 'songti'">
+          <td colspan="3" style="border: none"></td>
           <td colspan="6" style="border: none"></td>
-          <td colspan="2" height="40" style="border:none">
-           <p style="border: none;font-family: 'songti'">连队首长签字:</p> 
+          <td colspan="2" height="40" style="border: none">
+            <p style="border: none; font-family: 'songti'">连队首长签字:</p>
           </td>
-          
-          <td colspan="3" style="border: none;font-family: 'songti'" >
-            <p style="border: none;font-family: 'songti'">&nbsp;&nbsp;时&nbsp;&nbsp;&nbsp;&nbsp;分</p>
-            
+
+          <td colspan="3" style="border: none; font-family: 'songti'">
+            <p style="border: none; font-family: 'songti'">
+              &nbsp;&nbsp;时&nbsp;&nbsp;&nbsp;&nbsp;分
+            </p>
           </td>
         </tr>
       </table>
@@ -705,7 +808,7 @@ export default {
       chapu: 4,
       qinshu: 4,
       week: "",
-      qinshu2: 2,
+      qinshu2: 3,
     };
   },
   created() {
@@ -719,14 +822,20 @@ export default {
       lookWord(this.title, "#contents", this.style, true);
     },
     chapus() {
-      return this.message.inspect.length + 1;
+      if (this.message.inspect != null) return this.message.inspect.length + 1;
     },
     qinshus() {
-      return this.message.kinsfolk.length + 2;
+      if (this.message.kinsfolk != null) {
+        return this.message.kinsfolk.length + 2;
+      }
+      return (this.message.kinsfolk.length = 4);
     },
 
     qinshus2() {
-      return this.message.kinsfolk.length + 2;
+      if (this.message.kinsfolk != null) {
+        return this.message.kinsfolk.length + 1;
+      }
+      return (this.message.kinsfolk.length = 3);
     },
 
     /*
@@ -783,5 +892,4 @@ tr:last-child {
   border: 1px solid rgb(129, 130, 131);
   border-radius: 5px;
 }
-
 </style>

+ 9 - 2
src/views/grassrootsregistration/bdgldiary/index.vue

@@ -1355,16 +1355,17 @@ export default {
       this.reset();
       const id = row.id || this.ids;
       getBdgldiary(id).then((response) => {
+        console.log(response.data);
         this.form = response.data;
         this.xunlian = response.data.weekworkRegisters;
         // 请求人员
         this.getRenYuan(this.form.unitId);
         //  请求首长
         this.getShou(this.form.unitId);
-
         this.open = true;
         this.checkShop = response.data.inspect;
         if (response.data.kinsfolk[0].peopleId != null) {
+          console.log(response.data.kinsfolk, 2);
           this.relatives = response.data.kinsfolk;
         }
         this.title = "修改要事日记";
@@ -1389,7 +1390,13 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           this.form.inspect = this.checkShop;
-          this.form.kinsfolk = this.relatives;
+          if (
+            (this.relatives[0].name ||
+              this.relatives[0].peopleId ||
+              this.relatives[0].peopleName) != null
+          ) {
+            this.form.kinsfolk = this.relatives;
+          }
           if (this.form.id != null) {
             updateBdgldiary(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");

+ 4 - 2
src/views/grassrootsregistration/bdglweekwork/index.vue

@@ -604,6 +604,8 @@ export default {
       deptOptionss: [],
       // 已有时间不能发送
       code: 0,
+      // 单位的保存
+      names: "",
     };
   },
   created() {
@@ -620,7 +622,7 @@ export default {
         deteline: null,
         startTime: null,
         endTime: null,
-        unitId1: this.form.unitName,
+        unitId1: this.names,
         peopleIds: null,
         address: null,
         contents: null,
@@ -679,7 +681,7 @@ export default {
       this.ChongZhi();
       this.form.unitId = data.id;
       this.form.unitName = data.label;
-      console.log(data);
+      this.names = data.label;
       this.ZhuChiRen(this.form.unitId);
       this.tomList.forEach((item, i) => {
         this.tomList[i].unitId1 = this.form.unitName;