Browse Source

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_app into V0.0.2

coys 2 years ago
parent
commit
b3174563e9

+ 1 - 4
src/assets/css/index.scss

@@ -36,10 +36,7 @@ pre{
 
 .van-button--info{
   -background-color: #008cd6;
-}
-
-.van-button--info{
-  -background-color: #008cd6;
+  -border: 1px solid #008cd6;
 }
 
 .van-picker__confirm{

+ 22 - 0
src/components/HoursCell/index.vue

@@ -98,3 +98,25 @@ export default {
   margin: 0;
 }
 </style>
+<!--<style lang="scss" scoped>-->
+<!--.date-cell{-->
+<!--  position: relative;-->
+<!--  box-sizing: border-box;-->
+<!--  width: 100%;-->
+<!--  overflow: hidden;-->
+<!--  color: #323233;-->
+<!--  background-color: #fff;-->
+<!--}-->
+<!--.date-cell::after{-->
+<!--  position: absolute;-->
+<!--  box-sizing: border-box;-->
+<!--  content: ' ';-->
+<!--  pointer-events: none;-->
+<!--  right: 30px;-->
+<!--  bottom: 0;-->
+<!--  left: 30px;-->
+<!--  border-bottom: 1px solid #ebedf0;-->
+<!--  -webkit-transform: scaleY(.5);-->
+<!--  transform: scaleY(.5);-->
+<!--}-->
+<!--</style>-->

+ 28 - 2
src/components/dateCell/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="date-cell" >
-    <van-cell v-if="disabled" :title="title" :label="label" />
-    <van-cell v-else :title="title" :label="label" @click="clickItem">
+    <van-cell v-if="disabled" :required="required" :title="title" :label="label" />
+    <van-cell v-else :title="title" :required="required" :label="label" @click="clickItem">
       <template #right-icon>
         <van-icon name="notes-o" class="date-icon"/>
       </template>
@@ -47,6 +47,10 @@ export default {
       type: String,
       default: 'date',
     },
+    required:{
+      type: [Boolean,String],
+      default: false,
+    },
   },
   data(){
     return{
@@ -116,3 +120,25 @@ export default {
   margin: 0;
 }
 </style>
+<style lang="scss" scoped>
+.date-cell{
+  position: relative;
+  box-sizing: border-box;
+  width: 100%;
+  overflow: hidden;
+  color: #323233;
+  background-color: #fff;
+}
+.date-cell::after{
+  position: absolute;
+  box-sizing: border-box;
+  content: ' ';
+  pointer-events: none;
+  right: 30px;
+  bottom: 0;
+  left: 30px;
+  border-bottom: 1px solid #ebedf0;
+  -webkit-transform: scaleY(.5);
+  transform: scaleY(.5);
+}
+</style>

+ 1 - 1
src/components/nfcPopup/more.vue

@@ -152,7 +152,7 @@ export default {
         nfcCode:this.selectNFC,
         url: this.nfcImage,
       }
-      alert(JSON.stringify(data));
+      //alert(JSON.stringify(data));
       this.$emit('change',data);
       this.visible = false;
       this.clear();

+ 5 - 2
src/components/scroll/scroll.vue

@@ -128,10 +128,13 @@ export default {
       console.log(this.pullupUp,'pullingUp2')
       if(this.pullupUp) {
         this.showLoadMoreText = true;
-        this.loadMoreText = '正在加载...';
+        //this.loadMoreText = '正在加载...';
         this.$emit('loadMore');
         await this.upFn();
         // 加载完成后,调用 this.loadMoreFinish() 结束加载更多
+        setTimeout(()=>{
+          this.loadMoreFinish();
+        },500)
       }else {
         setTimeout(() => {
           this.loadMoreFinish();
@@ -157,7 +160,7 @@ export default {
 
     // 结束上拉加载更多
     loadMoreFinish() {
-      this.loadMoreText = '加载更多';
+      //this.loadMoreText = '加载更多';
       this.showLoadMoreText = false;
     },
   },

+ 1 - 1
src/views/home/menu.vue

@@ -101,7 +101,7 @@ export default {
   margin: 30px;
   > p {
     font-size: 30px;
-    padding: 10px 10px 10px 20px;
+    padding: 0 10px 20px 0;
   }
   > ul {
     display: flex;

+ 2 - 1
src/views/menu/NFCmanage/index.vue

@@ -98,8 +98,9 @@ export default {
       //alert(data)
       this.nfcMsg = '读取中...';
       if(!data) {
-        this.$toast('扫描失败');
+        this.$toast('扫描失败,请重试');
         //this.showPopup = false;
+        this.nfcMsg = '将NFC贴至手机背部';
         return
       }
       let code = JSON.parse(data).content;

+ 1 - 1
src/views/menu/educationStatistics/index.vue

@@ -5,7 +5,7 @@
       <org-tree v-model="query.orgId" @change="getDataList"></org-tree>
       <div class="search-flex">
         <select-cell
-          class="van-hairline--right"
+          style="border-right:1px solid #f5f5f5;"
           title="教育计划名称"
           v-model="query.planId"
           :dataList="planList"

+ 8 - 3
src/views/menu/message/api.js

@@ -1,5 +1,4 @@
 import request from "@/utils/request";
-import day from 'dayjs'
 //获取消息列表
 export function dataList(params) {
   return request({
@@ -16,6 +15,12 @@ export function msgList(data){
     data
   });
 }
-
-
+//设置已读接口
+export function setRead(data){
+  return request({
+    url: "/core/notification/markIsRead",
+    method: "post",
+    data
+  });
+}
 

+ 13 - 9
src/views/menu/message/index.vue

@@ -16,7 +16,7 @@
         <card class="list-item" v-else v-for="(v,i) in dataList" :key="i">
           <van-cell :title="v.title" :label="v.content" @click="clickItem(v)">
             <template #right-icon>
-              <i  class="point-icon" :class="{'active':v.isRead}" />
+              <i  class="point-icon" :class="{'active':!v.isRead}" />
             </template>
             <template #label>
               <div class="cell-label">
@@ -62,7 +62,7 @@
 
 <script>
 import Scroll from '@/components/scroll/scroll'
-import {msgList,dataList} from './api'
+import {msgList,dataList,setRead} from './api'
 import {mapGetters} from "vuex"
 
 export default {
@@ -98,14 +98,18 @@ export default {
       this.show = false;
     },
     clickItem(v){
-      if(v.fileList && v.fileList.length > 0){
-        v.fileList.forEach(v=>{
-          //p:获取url中的后缀名
-          let p = v.url.split('.');
-          console.log(p,'pppppppp')
-          //v.type = url.
-        })
+      let data = {
+        announcementNotificationId:v.id,
+        orgId:this.orgId,
+        userId:this.id,
       }
+      setRead(data).then(res=>{
+        this.dataList.forEach(item=>{
+          if(item.id === v.id){
+            item.isRead = true;
+          }
+        })
+      })
       this.selected = v;
       this.show = true;
     },

+ 24 - 9
src/views/menu/problemItem/detail.vue

@@ -97,6 +97,8 @@
               v-model="confirmData.description"
               rows="1"
               autosize
+              required
+              :maxlength="200"
               label="异议内容"
               type="textarea"
               placeholder="请输入"/>
@@ -130,7 +132,10 @@
               v-model="confirmDissentData.description"
               rows="1"
               autosize
+              required
+              :maxlength="200"
               label="原因"
+              :rules="[{ required: true, message: '请输入' }]"
               type="textarea"
               placeholder="请输入"/>
             <div class="big-btn-box" v-if="taskInfo.submitorId == id && taskInfo.confirmStatus==1">
@@ -149,6 +154,7 @@
               v-model="reformData.description"
               rows="1"
               autosize
+              :maxlength="200"
               label="整改描述:"
               type="textarea"
               placeholder="请输入"/>
@@ -236,8 +242,8 @@ export default {
           queryMethod = reform;
       }
       if(type === '确认' || type === '审核'){
-        if(!data && !data.description) {
-          return this.$toast("请填写完整信息");
+        if(data.status == 1 && !data.description) {
+          return this.$toast("请填写信息");
         }
       }else {
         if(!data.reformDate || !data.description){
@@ -281,14 +287,23 @@ export default {
 
     //清空数据
     clearData(){
-      this.areaList = [];
       this.taskInfo= [];
-      this.selectArea = [];
-      this.NFCList = [];
-      this.checkList = [];
-      this.checkItemList = [];
-      this.NFCNum = 0;
-      this.enable = false;
+      //确认
+      this.confirmData = {
+        status: 0,
+        description: null,
+      }
+      //审核
+      this.confirmDissentData = {
+        status: 0,
+        description: null,
+      }
+      //整改
+      this.reformData = {
+        reformDate: null,
+        description: null,
+        images: null,
+      }
     },
   }
 }

+ 3 - 3
src/views/menu/protection/components/item.vue

@@ -23,9 +23,9 @@
       </van-cell>
       <van-cell title="布撤防状态" >
         <template #right-icon>
-            <span v-if="data.status==1" style="color:rgb(0,164,46)">布防</span>
-            <span v-else-if="data.status==0" style="color:rgb(215,0,15)">撤防</span>
-            <span v-else>{{getDictLabel(data.status, 'protection_status', '未上报')}}</span>
+            <!-- <span v-if="data.status==1" style="color:rgb(0,164,46)">布防</span>
+            <span v-else-if="data.status==0" style="color:rgb(215,0,15)">撤防</span> -->
+            <span >{{getDictLabel(data.status, 'protection_status', '未上报')}}</span>
         </template>
       </van-cell>
       <van-cell

+ 9 - 4
src/views/menu/protection/detail.vue

@@ -21,9 +21,9 @@
           </template>
           <template slot-scope="{ data }">
             <div class="datarow">
-              <span v-if="data.status == 1" style="color: rgb(0, 164, 46)">布防</span>
-              <span v-else-if="data.status == 0" style="color: rgb(215, 0, 15)">撤防</span>
-              <span v-else>{{ getLabel(data.status, 'protection_status', '未上报') }}</span>
+              <!-- <span v-if="data.status == 1" style="color: rgb(0, 164, 46)">布防</span>
+              <span v-else-if="data.status == 0" style="color: rgb(215, 0, 15)">撤防</span> -->
+              <span >{{ getDictLabel(data.status,  'protection_status', '未上报') }}</span>
               <span>{{ data.updateTime }}</span>
               <span>{{ data.statusUpdatorName }}</span>
             </div>
@@ -39,6 +39,7 @@ import { get, history } from '@/api/protection.js'
 import Card from '@/components/card/index.vue'
 import { getLabel } from '@/utils/optionEx'
 import NavBar from '@/components/NavBar'
+import { mapGetters } from 'vuex'
 export default {
   data() {
     return {
@@ -51,10 +52,14 @@ export default {
         { value: '0', text: '撤防' },
         { value: '1', text: '布防' },
         { value: '2', text: '未知' }
-      ]
+      ],
+      dicts: ["protection_status"]
     }
   },
   components: { NavBar, KList, Card },
+  computed: {
+    ...mapGetters(['dictionary'])
+  },
   mounted() {
     this.getInfo()
   },

+ 10 - 13
src/views/menu/resumption/list.vue

@@ -6,9 +6,8 @@
       <div class="lz-list">
         <div class="list-item">
           <p>每日履职</p>
-          <van-tabs >
-            <van-tab title="待完成">
-              <template #title>待完成 {{dayList.unfinished.length}} </template>
+          <van-tabs>
+            <van-tab title="待完成" :badge="dayList.unfinished.length">
               <Empty v-if="!dayList.unfinished.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -27,8 +26,7 @@
                   </van-cell>
               </div>
             </van-tab>
-            <van-tab title="未完成">
-              <template #title>未完成 {{dayList.proceed.length}} </template>
+            <van-tab title="未完成" :badge="dayList.proceed.length">
               <Empty v-if="!dayList.proceed.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -45,8 +43,7 @@
                   </van-cell>
               </div>
             </van-tab>
-            <van-tab title="已完成">
-              <template #title>已完成 {{dayList.finished.length}} </template>
+            <van-tab title="已完成" :badge="dayList.finished.length">
               <Empty v-if="!dayList.finished.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -70,8 +67,7 @@
         <div class="list-item">
           <p>周期履职</p>
           <van-tabs >
-            <van-tab title="待完成">
-              <template #title>待完成 {{otherList.unfinished.length}} </template>
+            <van-tab title="待完成" :badge="otherList.unfinished.length">
               <Empty v-if="!otherList.unfinished.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -90,8 +86,7 @@
                   </van-cell>
               </div>
             </van-tab>
-            <van-tab title="未完成">
-              <template #title>未完成 {{otherList.proceed.length}} </template>
+            <van-tab title="未完成" :badge="otherList.proceed.length">
               <Empty v-if="!otherList.proceed.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -108,8 +103,7 @@
                   </van-cell>
               </div>
             </van-tab>
-            <van-tab title="已完成">
-              <template #title>已完成 {{otherList.finished.length}} </template>
+            <van-tab title="已完成" :badge="otherList.finished.length">
               <Empty v-if="!otherList.finished.length"/>
               <div class="list-container" v-else>
                   <van-cell
@@ -284,6 +278,9 @@ export default {
   .van-tabs__line{
     background-color: #008cd6;
   }
+  .van-info {
+    background-color: #008cd6;
+  }
 }
 </style>
 <style lang="scss" scoped>

+ 6 - 6
src/views/menu/securityCheckRegister/detail.vue

@@ -39,7 +39,7 @@
                   </template>
                   <template #right-icon>
                     <span v-if="item.nfcList && item.nfcList.length">
-                        <span>{{ getNfcState(item.nfcList) }}</span>/<span >{{item.nfcList.length}}</span>
+                        <span style="color:#009240;">{{ getNfcState(item.nfcList) }}</span>/<span >{{item.nfcList.length}}</span>
                     </span>
                     <img
                       v-if="enable && item.nfcList && item.nfcList.length"
@@ -249,10 +249,10 @@ export default {
             this.$toast.fail('NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!');
             throw new Error('NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!');
           }
-          v.status = 1
-          v.scanMethod = 2
-          v.submitTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
-          v.submitBy = this.id
+          v.status = 1;
+          v.scanMethod = 0;
+          v.submitTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
+          v.submitBy = this.id;
           this.$toast.success('NFC点位:' + v.nfcName + '扫描成功!');
           checkOk = true;
         }
@@ -330,7 +330,7 @@ export default {
         case '待检查':
           return '#008cd6';
         case '进行中':
-          return '#e39218';
+          return '#bc9f71';
         case '完成':
           return '#009240';
         case '已过期':

+ 1 - 1
src/views/menu/securityCheckRegister/index.vue

@@ -144,7 +144,7 @@ export default {
         case '待检查':
           return '#008cd6';
         case '进行中':
-          return '#e39218';
+          return '#bc9f71';
         case '完成':
           return '#009240';
         case '已过期':

+ 9 - 7
src/views/menu/workTime/index.vue

@@ -27,16 +27,18 @@
       </van-radio-group>
 
       <!--  选择时间    -->
-      <van-cell-group >
-        <hours-cell :disabled="formData.isDisabled || !formData.isEnable || formData.isEnable =='0'" title="营业开始" v-model="formData.openTime"></hours-cell>
+      <van-cell-group>
+        <hours-cell  :disabled="formData.isDisabled || !formData.isEnable || formData.isEnable =='0'" title="营业开始" v-model="formData.openTime"></hours-cell>
         <hours-cell :disabled="formData.isDisabled || !formData.isEnable || formData.isEnable =='0'" title="营业结束" v-model="formData.closeTime"></hours-cell>
       <!--   操作     -->
       </van-cell-group>
-      <van-cell center title="是否复制到全月" v-if="!formData.isDisabled">
-        <template #right-icon>
-          <van-button size="mini" type="info" @click="copyMouth">点击复制</van-button>
-        </template>
-      </van-cell>
+      <van-cell-group>
+        <van-cell center title="是否复制到全月" v-if="!formData.isDisabled">
+          <template #right-icon>
+            <van-button size="mini" type="info" @click="copyMouth">点击复制</van-button>
+          </template>
+        </van-cell>
+      </van-cell-group>
 
       <div class="button-box">
         <van-button type="info" size="large" v-show="!formData.isDisabled" @click="onsubmit">提交</van-button>