浏览代码

修改日期选择添加年月日

coys 1 年之前
父节点
当前提交
9e8f3f0f49

+ 2 - 0
src/router/index.js

@@ -49,6 +49,8 @@ router.beforeEach((to, from, next) => {
       next('/works') 
     case '/wbpj':
       next('/works') 
+    case '/wtzg':
+      next('/works') 
       break
   }
   if (to.path === '/login' || to.path === '/tokenlogin') return next()

+ 3 - 1
src/utils/globalMixins.js

@@ -19,6 +19,7 @@ export default {
 
   methods: {
     ...mapActions(['setDict']),
+
     setDicts() {
       this.dicts.forEach(item => {
         this.setDict(item)
@@ -173,6 +174,7 @@ export default {
         return 2
       }
       return 3
-    }
+    },
+    
   }
 }

+ 87 - 64
src/views/home/works.vue

@@ -11,70 +11,66 @@
         :key="i.taskType"
         :badge="i.nums"
       >
+        <template v-for="item in workList">
+          <!-- 列表 -->
+          <div class="cellMargin" v-if="item.taskType == i.taskType" :key="item.taskType">
+            <!-- 标题区域 -->
+            <!-- lz -->
+            <van-cell
+              :value="item.nums"
+              is-link
+              :to="{ path: worksLink(3, item.taskType) }"
+              :id="worksLink(1, item.taskType)"
+            >
+              <!-- 使用 title 插槽来自定义标题 -->
+              <template #title>
+                <span class="titleLeft"> </span>
+                <span class="custom-title">{{ item.taskTypeText }} </span>
+              </template>
+            </van-cell>
+            <!-- 待办区域 -->
+            <div class="marginCls" v-if="item.taskType == i.taskType">
+              <!-- <van-empty description="暂无数据" /> -->
+              <van-cell-group>
+                <van-cell
+                  @click.stop="isFalgHandler(i, item.taskType, item.id)"
+                  v-for="(i, index) in item.dataList"
+                  :key="index"
+                  class="mainTitle"
+                  :value="worksLink(2, item.taskType, i.recStatus ? i.recStatus : i.status)"
+                  :label="
+                    i.startTime.substring(5, i.startTime.length - 3) +
+                    '至' +
+                    i.endTime.substring(5, i.endTime.length - 3)
+                  "
+                  :value-class="iColorClas(item.taskType, i.status)"
+                >
+                  <template #title>
+                    <span class="custom-title"
+                      >{{ i.taskName }}
+                      <van-tag
+                        class="resetDy"
+                        @click.stop="resetHandler(i.id)"
+                        v-if="i.status == 1 && item.taskType == 3"
+                        type="primary"
+                        >重新调阅</van-tag
+                      ></span
+                    >
+                  </template>
 
-      <template v-for="item in workList" >
-        <!-- 列表 -->
-        <div class="cellMargin"  v-if="item.taskType==i.taskType" :key="item.taskType">
-          <!-- 标题区域 -->
-          <!-- lz -->
-          <van-cell
-            :value="item.nums"
-            is-link
-            :to="{ path: worksLink(3, item.taskType) }"
-            :id="worksLink(1, item.taskType)"
-
-          >
-            <!-- 使用 title 插槽来自定义标题 -->
-            <template #title>
-              <span class="titleLeft"> </span>
-              <span class="custom-title">{{ item.taskTypeText }} </span>
-            </template>
-          </van-cell>
-          <!-- 待办区域 -->
-          <div class="marginCls" v-if="item.taskType==i.taskType">
-            <!-- <van-empty description="暂无数据" /> -->
-            <van-cell-group >
-              <van-cell
-
-                @click.stop="isFalgHandler(i, item.taskType, item.id)"
-                v-for="(i, index) in item.dataList"
-                :key="index"
-                class="mainTitle"
-                :value="worksLink(2, item.taskType, i.recStatus ? i.recStatus : i.status)"
-                :label="
-                  i.startTime.substring(5, i.startTime.length - 3) + '至' + i.endTime.substring(5, i.endTime.length - 3)
-                "
-                :value-class="iColorClas(item.taskType, i.status)"
-              >
-                <template #title>
-                  <span class="custom-title"
-                    >{{ i.taskName }}
-                    <van-tag
-                      class="resetDy"
-                      @click.stop="resetHandler(i.id)"
-                      v-if="i.status == 1 && item.taskType == 3"
-                      type="primary"
-                      >重新调阅</van-tag
-                    ></span
-                  >
-                </template>
-
-                <template #right-icon>
-                  <van-icon name="arrow" class="rightIcon" />
-                </template>
-              </van-cell>
-            </van-cell-group>
+                  <template #right-icon>
+                    <van-icon name="arrow" class="rightIcon" />
+                  </template>
+                </van-cell>
+              </van-cell-group>
+            </div>
           </div>
-        </div>
-      </template>
-
+        </template>
       </van-tab>
     </van-tabs>
 
-
-      <!-- 扫描弹框 -->
-      <scandialog ref="scandialog" @input="resultImg" @changeNFC="getNFC"></scandialog>
-
+    <!-- 扫描弹框 -->
+    <scandialog ref="scandialog" @input="resultImg" @changeNFC="getNFC"></scandialog>
   </div>
 </template>
 
@@ -112,7 +108,7 @@ export default {
   },
   methods: {
     iColorClas(type, status) {
-      if (status == 0 || (type == 0 && status == 1) || (type == 2 && status == 1)) {
+      if (status == 0|| (type == 9 && status == 1)|| (type == 9 && status == 10) || (type == 0 && status == 1) || (type == 2 && status == 1)) {
         return 'wj-title-blue'
       } else {
         return 'wj-title-orange'
@@ -130,7 +126,7 @@ export default {
         this.falg = false
         this.taskId = i.id
         this.$refs.scandialog.visible = true
-        this.globalLoading=true
+        this.globalLoading = true
       } else {
         this.falg = true
         this.$router.push({ path: this.worksLink(4, taskType, i.status, i.id, i) })
@@ -192,7 +188,14 @@ export default {
           str = '/wbpj'
           strName = '待评价'
           path = '/resumptionEvaluate'
-          pathInfo = '/evaluate/' + id+'_add'
+          pathInfo = '/evaluate/' + id + '_add'
+
+          break
+        case 9:
+          str = '/wtzg'
+          strName = '待确认'
+          path = '/problemItem'
+          pathInfo = '/problemDetail?id=' + id + '&type=confirm'
 
           break
         case '/qt':
@@ -235,13 +238,33 @@ export default {
         } else if (val == 5 && taskType == 4) {
           strName = '待提交'
         }
+          //问题整改
+          if (val == 9 && taskType == 0) {
+          strName = '待确认'
+        } else if (val == 9 && taskType == 10) {
+          strName = '待整改'
+        } else if (val == 9 && taskType == 1) {
+          strName = '待审批'
+        } 
         return strName
       } else if (type == 3) {
         //返回列表路径
         return path
       } else {
         //返回详情路径
-        // taskType==status
+
+        //问题整改
+        if (val == 9 && taskType == 1) {
+          strName = '待审批'
+          // pathInfo = '/consultInfo/' + id + '_1'
+          pathInfo = '/problemDetail?id=' + id + '&type=confirmDissent'
+          
+        }
+        if (val == 9 && taskType == 10) {
+          strName = '待整改'
+          pathInfo = '/problemDetail?id=' + id + '&type=reform'
+        
+        }
         //监控调阅
         if (val == 3 && taskType == 1) {
           strName = '调阅中'
@@ -371,7 +394,7 @@ export default {
 }
 .cellMargin {
   margin: 20px;
-  margin-top:0px;
+  margin-top: 0px;
   height: calc(100vh - 380px);
   box-shadow: 0 1px 4px #ccc;
   background-color: #fff;

+ 9 - 6
src/views/menu/cockpit/components/overviewCom.vue

@@ -6,6 +6,7 @@
         <template #title>
           <span class="custom-title">{{ i.name }}</span>
         </template>
+       
         <span class="itemNum" v-for="(item, index) in allData[i.key]" :key="index">{{ item }}</span>
       </van-cell>
     </div>
@@ -193,13 +194,15 @@ export default {
     },
     //自动补0
     remedyZero(val) {
-      let newVal = val + ''
-      let num = 6 - newVal.length
+      let newVal=val||0
+      // let newVal = val + ''
+      // let num = 6 - newVal.length
 
-      for (let index = 0; index < num; index++) {
-        newVal = '0' + newVal
-      }
-      return ('' + newVal).split('')
+      // for (let index = 0; index < num; index++) {
+      //   newVal = '0' + newVal
+      // }
+      // return ('' + newVal).split('')
+      return newVal
     }
   }
 }

+ 11 - 9
src/views/menu/drillStatistics/index.vue

@@ -6,15 +6,7 @@
       <van-row>
         <van-col span="24"
           >
-          <!-- <van-field
-            v-model="fieldValue"
-            label-width="6em"
-            :disabled="showStatus"
-            label="演练计划名称"
-            placeholder=""
-            @click="showStatus = true"
-            ><van-icon name="arrow-down" slot="button"
-          /></van-field> -->
+         
           <van-cell title="演练计划名称" @click="showStatus = true" is-link arrow-direction="down" :value="fieldValue" />
 
           <van-popup v-model="showStatus" round position="bottom">
@@ -55,6 +47,7 @@
               confirm-button-text="确定"
               :default-index="yearSelect"
               title="开始月份"
+              :formatter="formatter"
             />
           </van-popup>
         </van-col>
@@ -78,6 +71,7 @@
               show-toolbar
               @cancel="onCancel"
               type="year-month"
+              :formatter="formatter"
               @confirm="onEndDateConfirm"
               confirm-button-text="确定"
               :default-index="yearSelect"
@@ -173,6 +167,14 @@ export default {
   },
   computed: {},
   methods: {
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      }  else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     // getNewMonth() {
     //   //获取当前月份
     //   let date = new Date().getMonth() + 1

+ 25 - 12
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -26,6 +26,7 @@
         <van-datetime-picker
           v-model="startDateTime"
           type="datetime"
+          :formatter="formatter"
           confirm-button-text="确定"
           @confirm="onConfirmDate"
           @cancel="showStartDate = false"
@@ -47,6 +48,7 @@
         <van-datetime-picker
           v-model="endDateTime"
           type="datetime"
+          :formatter="formatter"
           confirm-button-text="确定"
           @confirm="onConfirmEndDate"
           @cancel="showEndDate = false"
@@ -87,11 +89,11 @@
         placeholder="请选择演练项目"
         @click="showPicker = true"
       />
-    
+
       <van-popup v-model="showPicker" position="bottom">
         <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
       </van-popup>
-        <!-- 演练类型 -->
+      <!-- 演练类型 -->
       <!-- <van-field
         readonly
         clickable
@@ -126,10 +128,9 @@
         row="3"
         maxlength="2000"
         show-word-limit
-       
         placeholder="请填写预设案由"
       />
-      
+
       <!-- 演练情况 -->
       <van-field
         required
@@ -153,7 +154,6 @@
         row="3"
         maxlength="2000"
         show-word-limit
-       
         placeholder="请填写点评总结"
       />
       <!-- 参与人员 -->
@@ -192,7 +192,7 @@
 import NavBar from '@/components/NavBar'
 import CheckPeople from '@/components/peopleList/index.vue'
 import Upload from '@/components/upload/index.vue'
-import {onresizeHandler} from '@/utils/onresizeMixins.js'
+import { onresizeHandler } from '@/utils/onresizeMixins.js'
 import { getrehearsalInfo, drillInfo } from '@/api/drillTask.js'
 import { newDateTimeMin } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
@@ -201,7 +201,7 @@ import VuePdf from '@/components/pdfCom/index.vue'
 
 export default {
   name: 'SocAppAddTraining',
-  mixins:[onresizeHandler],
+  mixins: [onresizeHandler],
   components: {
     VuePdf,
     yldialog,
@@ -228,7 +228,7 @@ export default {
         note: '', //演练总结
         taskUserList: [], //人员数组
         imageList: [], //图片数组
-        comment:'',
+        comment: '',
         presetCase: '', //预设案由
         drillSituation: '', //演练情况
         drillEndTime: '', //结束时间
@@ -244,7 +244,7 @@ export default {
       columns: [],
       columnsType: [],
       columnsList: [],
-      columnsListType: [],
+      columnsListType: []
     }
   },
   created() {
@@ -319,6 +319,21 @@ export default {
   mounted() {},
 
   methods: {
+    //日期选择组件formatter
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`
+      } else if (type === 'day') {
+        return `${val}日`
+      } else if (type === 'year') {
+        return `${val}年`
+      } else if (type === 'hour') {
+        return `${val}时`
+      } else if (type === 'minute') {
+        return `${val}分`
+      }
+      return val
+    },
     //预案演练选中数据
     checkList(list) {
       this.form.presetCase = list[0].defaultCause
@@ -476,8 +491,6 @@ export default {
 
       obj.drillEndTime = obj.drillEndTime ? obj.drillEndTime + ':00' : ''
 
-     
-
       drillInfo({
         id: this.trainingData.id,
         submitType: type,
@@ -559,7 +572,7 @@ export default {
   background-color: #fff;
   // margin: 16px;
   display: flex;
-  
+
   justify-content: space-around;
   .van-button {
     width: 300px;

+ 7 - 2
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -637,15 +637,18 @@ export default {
 .van-row {
   background-color: #f0f0f0;
   display: flex;
+  border-bottom: 1px solid #ccc;
   align-items: center;
-  margin-top: -1px;
-  border: 1px solid #ccc;
+  // margin-top: -1px;
+  // border: 1px solid #ccc;
   .van-col--8 {
     min-height: 100px;
     display: flex;
     justify-content: center;
     align-items: center;
     padding: 10px;
+    background-color: rgb(230, 230, 230,0.4);
+    opacity: 1;
   }
   .van-col{
     text-align: justify;
@@ -663,6 +666,8 @@ export default {
     padding-left: 10px;
     background-color: #fff;
     padding: 10px;
+    
+    opacity: 0.9;
   }
   .tagCls {
     margin-top: 10px;

+ 17 - 6
src/views/menu/rehearsalTask/index.vue

@@ -20,6 +20,8 @@
               @confirm="onConfirm"
               confirm-button-text="确定"
               @cancel="onCancel"
+             
+
               :close-on-click-overlay="false"
             />
           </van-popup>
@@ -47,6 +49,7 @@
               @confirm="onDateConfirm"
               :default-index="yearSelect"
               title="年份"
+              :formatter="formatter"
               type="year-month"
             />
           </van-popup>
@@ -199,6 +202,14 @@ export default {
     this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
   },
   methods: {
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      }  else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     //getNewDate
     // getNewMonth() {
     //   //获取当前月份
@@ -259,19 +270,19 @@ export default {
     },
     //判断评价按钮是否展示
     evaluateTure(item) {
-      let roleId=null;
+      let roleId = null
       if (item.orgType == 4) {
-        roleId = 120;
+        roleId = 120
       }
       if (item.orgType == 3) {
-        roleId = 118;
+        roleId = 118
       }
       if (item.orgType == 2 || item.orgType == 1) {
-        roleId = 116;
+        roleId = 116
       }
 
-     // if (item.status == 2 &&this.$store.getters.roleList.some((item) => item.roleId == roleId) && window.sessionStorage.getItem('SET_USER_ORGTYPE') != 4) {
-      if (item.status == 2 &&this.$store.getters.roleList.some((item) => item.roleId == roleId)) {
+      // if (item.status == 2 &&this.$store.getters.roleList.some((item) => item.roleId == roleId) && window.sessionStorage.getItem('SET_USER_ORGTYPE') != 4) {
+      if (item.status == 2 && this.$store.getters.roleList.some(item => item.roleId == roleId)) {
         return true
       }
     },

+ 10 - 0
src/views/menu/rehearsalTask/learning.vue

@@ -29,6 +29,7 @@
               v-model="presentDate"
               show-toolbar
               @cancel="onCancel"
+              :formatter="formatter"
               type="year-month"
               @confirm="onDateConfirm"
               confirm-button-text="确定"
@@ -57,6 +58,7 @@
               show-toolbar
               @cancel="onCancel"
               type="year-month"
+              :formatter="formatter"
               @confirm="onEndDateConfirm"
               confirm-button-text="确定"
               :default-index="yearSelect"
@@ -198,6 +200,14 @@ export default {
     this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
   },
   methods: {
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      }  else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     //机构搜索
     getDataList(val) {
       this.cascaderValue = val.id

+ 10 - 0
src/views/menu/rehearsalTask/optimal.vue

@@ -57,6 +57,7 @@
               show-toolbar
               @cancel="onCancel"
               type="year-month"
+              :formatter="formatter"
               @confirm="onDateConfirm"
               confirm-button-text="确定"
               :default-index="yearSelect"
@@ -84,6 +85,7 @@
               show-toolbar
               @cancel="onCancel"
               type="year-month"
+              :formatter="formatter"
               @confirm="onEndDateConfirm"
               confirm-button-text="确定"
               :default-index="yearSelect"
@@ -215,6 +217,14 @@ export default {
     this.init()
   },
   methods: {
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      }  else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     // getNewMonth() {
     //   //获取当前月份
     //   let date = new Date().getMonth() + 1

+ 12 - 0
src/views/menu/resumptionEvaluate/index.vue

@@ -66,6 +66,7 @@
               type="date"
               title="选择年月日"
               @cancel="onCancel"
+              :formatter="formatter"
               @confirm="onDateConfirm"
               confirm-button-text="确定"
             />
@@ -179,6 +180,17 @@ export default {
     }
   },
   methods: {
+     //日期选择组件formatter
+     formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      } else if (type === 'day') {
+        return `${val}日`;
+      } else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     //机构搜索
     getDataList(val) {
       this.cascaderValue = val.id

+ 17 - 0
src/views/menu/training/components/addTraining.vue

@@ -42,6 +42,7 @@
           type="datetime"
           @confirm="onConfirmDate"
           @cancel="showStartDate = false"
+          :formatter="formatter"
         />
       </van-popup>
       <!-- 培训结束时间 -->
@@ -60,6 +61,7 @@
         <van-datetime-picker
           v-model="endDateTime"
           type="datetime"
+          :formatter="formatter"
           @confirm="onConfirmEndDate"
           @cancel="showEndDate = false"
         />
@@ -267,6 +269,21 @@ export default {
   mounted() {},
 
   methods: {
+    //日期选择组件formatter
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      } else if (type === 'day') {
+        return `${val}日`;
+      } else if (type === 'year') {
+        return `${val}年`;
+      }else if (type === 'hour') {
+        return `${val}时`;
+      }else if (type === 'minute') {
+        return `${val}分`;
+      }
+      return val;
+    },
     //从资料里选取
     selectData() {
       this.$refs.SelectData.show = true

+ 8 - 4
src/views/menu/training/components/personnelSignature.vue

@@ -391,16 +391,19 @@ export default {
   height: 45%;
 }
 .van-row {
-  margin-top: -1px;
-  border: 1px solid #ccc;
-  background-color: #f0f0f0;
+  // margin-top: -1px;
+  border-bottom: 1px solid #ccc;
+ 
   display: flex;
   align-items: center;
+  
   .van-col--8 {
     min-height: 100px;
     display: flex;
     justify-content: center;
     align-items: center;
+    background-color: rgb(230, 230, 230,0.4);
+    opacity: 1;
     padding: 10px;
   }
 
@@ -416,7 +419,8 @@ export default {
     padding-left: 10px;
     background-color: #fff;
     padding: 10px;
-    
+ 
+    opacity: 0.9;
   }
   .tagCls {
     margin-top: 10px;

+ 10 - 0
src/views/menu/training/index.vue

@@ -57,6 +57,7 @@
               @confirm="onDateConfirm"
               confirm-button-text="确定"
               type="year-month"
+              :formatter="formatter"
               title="月份"
             />
           </van-popup>
@@ -224,6 +225,15 @@ export default {
  
   
   methods: {
+    //日期选择组件formatter
+    formatter(type, val) {
+      if (type === 'month') {
+        return `${val}月`;
+      } else if (type === 'year') {
+        return `${val}年`;
+      }
+      return val;
+    },
     //机构搜索
     getDataList(val) {
       this.cascaderValue = val.id