xujie 1 рік тому
батько
коміт
49425e27c1
34 змінених файлів з 1644 додано та 310 видалено
  1. 21 0
      src/api/toConsult.js
  2. 85 26
      src/components/TopBar.vue
  3. 31 0
      src/components/dateCell/index.vue
  4. 183 0
      src/components/dateCell/search.vue
  5. 1 1
      src/components/nfcPopup/alone.vue
  6. 46 6
      src/components/peopleList/index.vue
  7. 226 0
      src/components/peopleList/index_bak.vue
  8. 178 0
      src/components/selectCell/search.vue
  9. 4 2
      src/router/router.config.js
  10. 26 18
      src/utils/onresizeMixins.js
  11. 35 9
      src/views/home/works.vue
  12. 6 6
      src/views/menu/iot/alarmCenter/index.vue
  13. 3 3
      src/views/menu/iot/envMonitor/detail.vue
  14. 1 1
      src/views/menu/iot/envMonitor/index.vue
  15. 2 2
      src/views/menu/iot/smartOpration/components/item.vue
  16. 12 12
      src/views/menu/iot/smartOpration/videocheckdetail.vue
  17. 25 14
      src/views/menu/iot/smartOpration/videodiagnosisdetail.vue
  18. 50 48
      src/views/menu/monitoringCall/components/consultInfo.vue
  19. 140 51
      src/views/menu/monitoringCall/index.vue
  20. 7 3
      src/views/menu/problemItem/index.vue
  21. 2 1
      src/views/menu/rehearsalTask/components/addRehearsalTask.vue
  22. 9 22
      src/views/menu/rehearsalTask/components/dialog.vue
  23. 223 0
      src/views/menu/rehearsalTask/components/dialog_bak.vue
  24. 51 51
      src/views/menu/safeCheckStatistics/index.vue
  25. 3 1
      src/views/menu/securityCheckRegister/index.vue
  26. 13 14
      src/views/menu/training/components/selectData.vue
  27. 232 0
      src/views/menu/training/components/selectData_bak.vue
  28. 1 1
      src/views/menu/visitCheck/detail.vue
  29. 2 2
      src/views/menu/visitRecord/add.vue
  30. 8 8
      src/views/menu/visitRecord/detail.vue
  31. 15 5
      src/views/menu/visitRegister/add.vue
  32. 1 1
      src/views/menu/visitRegister/addOutInRequest.vue
  33. 1 1
      src/views/menu/visitRegister/detail.vue
  34. 1 1
      src/views/menu/visitRegister/index.vue

+ 21 - 0
src/api/toConsult.js

@@ -119,6 +119,13 @@ export function finishRegistration(data) {
     data
   })
 }
+export function storageTask(data) {
+  return request({
+    url: `/core/registration/storageTask`,
+    method: 'post',
+    data
+  })
+}
 
 // 获取调阅统计情况表
 export function selectMonitorReport(data) {
@@ -129,4 +136,18 @@ export function selectMonitorReport(data) {
   })
 }
 
+/**
+ * 判断是否有开始未结束的调阅数据
+ * @param data
+ * @returns {*}
+ */
+export function getMonitorStart(data) {
+  return request({
+    url: `/core/registration/storageStart`,
+    method: 'post',
+    data
+  })
+}
+
+
 ///system/device/getHostByOrgId/{orgId}

+ 85 - 26
src/components/TopBar.vue

@@ -28,19 +28,19 @@
           :src="require('@/assets/img/my/header.png')"
         />
         <div class="user-name">
-         {{ getShowUserName() }}    
+         {{ getShowUserName() }}
         </div>
         <!-- <div style="line-height: 11vw;" v-if="subUserActions && subUserActions.length>0">
-            <van-popover v-model="showPopover" placement="left-end" trigger="click" 
-              :actions="subUserActions"          
-              @select="onSelect">         
+            <van-popover v-model="showPopover" placement="left-end" trigger="click"
+              :actions="subUserActions"
+              @select="onSelect">
               <template #reference>
                 <van-button size="mini" icon="exchange" round  type="info">切换机构</van-button>
               </template>
           </van-popover>
         </div> -->
-        
-      
+
+
       </div>
       <div class="top-card-line" style="display: flex;">
         <div style="-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;">
@@ -55,13 +55,36 @@
         </p>
        </div>
         <div  v-if="subUserActions && subUserActions.length>0">
-            <van-popover v-model="showPopover" placement="left-end" trigger="click" class="xxxx"
-              :actions="subUserActions"          
-              @select="onSelect">         
+
+          <van-dialog v-model="showPopover" title="切换机构" width="95%" @confirm="onSelect" show-cancel-button>
+            <van-row class="rowclss">
+              <van-col span="24">
+                <van-radio-group  v-model="peoplesId">
+                  <van-cell-group>
+                    <van-cell v-for="item in subUserActions" clickable :key="item.subUserId"  :name="item.subUserId">
+                      <template #title>
+                        <span :class="item.haveUnDoTask ? 'custom-required-indicator' : 'custom-no-indicator'">
+                          {{item.text}}
+                        </span>
+                      </template>
+                      <template #right-icon>
+                        <van-radio :name="item.subUserId" />
+                      </template>
+                    </van-cell>
+
+                  </van-cell-group>
+                </van-radio-group >
+              </van-col>
+            </van-row>
+          </van-dialog>
+          <van-button size="mini" round icon="exchange"  type="default" @click="showDailog">切换机构</van-button>
+<!--            <van-popover v-model="showPopover" placement="left-end" trigger="click" class="xxxx"
+              :actions="subUserActions"
+              @select="onSelect">
               <template #reference>
                 <van-button size="mini" round icon="exchange"  type="default">切换机构</van-button>
               </template>
-          </van-popover>
+          </van-popover>-->
         </div>
       </div>
       <div class="top-card-line">
@@ -78,7 +101,7 @@
       <div style="height: 2vw;"></div>
     </div>
     <div class="card-footer"></div>
-    
+
   </div>
 </template>
 <script>
@@ -88,13 +111,14 @@
     data() {
       return {
         showPopover:false,
+        peoplesId:null,
         subUserActions: [],
       }
     },
     created(){
     },
     mounted(){
-      
+
     },
     watch:{
       subUserList:{
@@ -111,6 +135,9 @@
       ...mapGetters(['userName', 'orgName','roleList', 'orgId','subUserList','masterUserName','masterUserId']),
     },
     methods: {
+      showDailog(){
+        this.showPopover=true;
+      },
       getShowUserName()
       {
         // console.log("getShowUserName",this.masterUserName ,this.masterUserId)
@@ -124,14 +151,14 @@
         }
       },
       initSubUserActions(){
-         console.log("initSubUserActions",this.subUserList)        
+         console.log("initSubUserActions",this.subUserList)
         if(this.subUserList && this.subUserList.length>0)
         {
           this.getSubUserUnDoTaskList();
         }
       },
       clickSwitchUser(subUserId)
-      {        
+      {
         switchUser(subUserId).then(res => {
           // console.log(res, 'res')
           sessionStorage.clear();
@@ -147,7 +174,7 @@
       onSelect(action)
       {
         // console.log("onSelect",action,action.text);
-        this.clickSwitchUser(action.subUserId);
+        this.clickSwitchUser(this.peoplesId);
       },
       getSubUserUnDoTaskList()
       {
@@ -157,7 +184,7 @@
             return {userId:i.subUserId,orgId:i.subUserOrgId};
           } );
           userUnDoList(users).then(res => {
-            
+
           // console.log("initSubUserActions2",this.subUserList)
           this.subUserActions=[];
           this.subUserList.forEach(sUser => {
@@ -168,15 +195,15 @@
               {
                 haveUnDoTask=true;
               }
-            }            
-            // let tempText= `${sUser.subUserOrgName}`; 
-            let tempAction={ text: sUser.subUserOrgName,subUserId:sUser.subUserId};
+            }
+            // let tempText= `${sUser.subUserOrgName}`;
+            let tempAction={ text: sUser.subUserOrgName,subUserId:sUser.subUserId,haveUnDoTask:haveUnDoTask};
             if(haveUnDoTask)
             {
               tempAction={className:"haveUnDoTask",...tempAction};
             }
             this.subUserActions.push(tempAction)
-          
+
           });
           // console.log("xxx",this.subUserActions)
           })
@@ -188,7 +215,7 @@
           this.$router.replace('/login');
           this.$toast('退出登录');
         })
-      }      
+      }
     }
   }
 </script>
@@ -199,11 +226,11 @@
       flex:none !important;
     }
   }
- 
+
   .haveUnDoTask
   {
     .van-popover__action-text::before{
-      content: "";      
+      content: "";
       width:10px;
       height:10px;
       background-color: red;
@@ -213,9 +240,9 @@
     }
   }
 </style>
-<style scoped lang="scss"> 
-  
-  
+<style scoped lang="scss">
+
+
   .card-footer{
     height: 3vw;
   }
@@ -292,4 +319,36 @@
       }
     }
   }
+  .rowclss {
+    // height: 1050px;
+    max-height: calc(80vh - 180px);
+    min-height: 200px;
+    // height: calc(100vh - 490px);
+    overflow: scroll;
+
+  }
+
+  .custom-required-indicator::before {
+    content: '';
+    display: inline-block;
+    width: 10px;
+    height: 10px;
+    margin-right: 4px;
+    background-color: red;
+    border-radius: 50%;
+    vertical-align: middle;
+  }
+  .custom-no-indicator::before {
+    content: '';
+    display: inline-block;
+    width: 6px;
+    height: 6px;
+    margin-right: 4px;
+    background-color: #ffffff;
+    border-radius: 50%;
+    vertical-align: middle;
+  }
+  ::v-deep .van-dialog{
+    top: 50% !important;
+  }
 </style>

+ 31 - 0
src/components/dateCell/index.vue

@@ -16,6 +16,7 @@
         :type="dateType"
         :columns="columns"
         :formatter="formatter"
+        :max-date="dataMaxDate"
         @cancel="cancelPicker"
         @confirm="pickerConfirm"
         confirm-button-text="确定"
@@ -64,9 +65,21 @@ export default {
       type: [Boolean,String],
       default: false,
     },
+    updateMaxDateNow:{
+      type: Boolean,
+      default: false,
+    },
+    MaxDate:{
+      type:Date,
+      default:function(){
+        let time =new Date();
+        return new Date(time.setFullYear(time.getFullYear()+10))
+      },
+    }
   },
   data(){
     return{
+      dataMaxDate:this.getDeafultMaxDate(),
       showPicker:false,
       selected:null,
       columns: [],
@@ -97,6 +110,15 @@ export default {
         }
       },
       immediate: true
+    },
+    MaxDate:{
+      handler (val) {
+        if(val)
+        {
+          this.dataMaxDate=val;
+        }
+      },
+      immediate: true
     }
   },
   created() {
@@ -132,8 +154,17 @@ export default {
       this.$emit('change',this.label)
     },
     clickItem(){
+      if(this.updateMaxDateNow)
+      {
+        this.dataMaxDate=new Date();
+      }
       this.showPicker = true;
     },
+    getDeafultMaxDate()
+    {
+      let time =new Date();
+      return time.setFullYear(time.getFullYear()+10)
+    }
   },
   model:{
     prop: 'value',

+ 183 - 0
src/components/dateCell/search.vue

@@ -0,0 +1,183 @@
+<template>
+  <div class="date-cell" >
+    <van-cell :title="title" clickable  :label="!isRow?label:''" :center="true" @click="clickItem">
+      <template #right-icon>
+        <van-icon name="notes-o" class="date-icon"/>
+      </template>
+    </van-cell>
+    <van-popup v-model="showPicker" round  position="bottom" :close-on-popstate="true" get-container="#app">
+      <!--格式化日期-->
+      <!--:formatter="formatter"-->
+      <van-datetime-picker
+        v-bind="$attrs"
+        show-toolbar
+        v-model="selected"
+        :type="dateType"
+        :columns="columns"
+        :formatter="formatter"
+        @cancel="cancelPicker"
+        @confirm="pickerConfirm"
+        confirm-button-text="确定"
+      />
+
+    </van-popup>
+  </div>
+</template>
+
+<script>
+
+import dayjs from "dayjs";
+import {formatDate} from "@/filters/filter";
+
+export default {
+  props:{
+    disabled:{
+      type: [Boolean,String],
+      default: false,
+    },
+    //默认值
+    value:{
+      type: String,
+      default: null,
+    },
+    //标题
+    title:{
+      type: String,
+      default: null,
+    },
+    //时间类型,见van-datetime-picker
+    dateType:{
+      type: String,
+      default: 'date',
+    },
+    //单行显示或者多行显示
+    isRow:{
+      type: Boolean,
+      default: false,
+    },
+    isAll:{
+      type: Boolean,
+      default: false,
+    },
+    required:{
+      type: [Boolean,String],
+      default: false,
+    },
+  },
+  data(){
+    return{
+      showPicker:false,
+      selected:null,
+      columns: [],
+      defaultTime:null,
+      type: {
+        'date': {value: 'YYYY-MM-DD'},
+        'year-month':{ value: 'YYYY-MM'},
+        'month-day': {value: 'MM-DD'},
+        'datetime':{ value: 'YYYY-MM-DD HH:mm:ss'},
+      },
+      label:'',
+    }
+  },
+  watch:{
+    value:{
+      handler (val) {
+        console.log(val,'valllll')
+        if(!val){
+          if(this.isAll){
+            this.label = '全部';
+          }else {
+            this.label = '';
+          }
+          this.selected = null;
+        }else{
+          this.selected = dayjs(val).toDate();
+          this.label = formatDate(val,this.type[this.dateType].value);
+        }
+      },
+      immediate: true
+    }
+  },
+  created() {
+    //初始化时间
+    this.selected = new Date();
+  },
+  methods:{
+    formatter(type, val) {
+      if (type === 'year') {
+        return val + '年';
+      }
+      if (type === 'month') {
+        return val + '月';
+      }
+      if (type === 'day') {
+        return val + '日';
+      }
+      if (type === 'hour') {
+        return val + '时';
+      }
+      if (type === 'minute') {
+        return val + '分';
+      }
+      return val;
+    },
+    cancelPicker(){
+      this.showPicker = false;
+    },
+    pickerConfirm(val){
+      this.selected = val;
+      this.label = formatDate(val,this.type[this.dateType].value);
+      this.showPicker = false;
+      this.$emit('change',this.label)
+    },
+    clickItem(){
+      this.showPicker = true;
+    },
+  },
+  model:{
+    prop: 'value',
+    event: 'change',
+  }
+}
+</script>
+
+<style lang="scss">
+.date-cell{
+  .date-icon{
+    font-weight: 500;
+    width: 42px;
+    height: 6.4vw;
+    color: #969799;
+    font-size: 42px;
+    line-height: 6.4vw;
+  }
+  .van-cell__label{
+    margin: 0;
+  }
+  .van-cell__value{
+    padding-right: 10px;
+  }
+}
+</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/alone.vue

@@ -64,7 +64,7 @@ export default {
     submitNFC() {
       // window.openNFCScanCallBack=null
       window.openNFCScanCallBack = this.openNFCScanCallBack
-      
+
       this.useNFC()
       this.$toast.loading({
         duration: 0, // 持续展示 toast

+ 46 - 6
src/components/peopleList/index.vue

@@ -7,10 +7,13 @@
       v-model="peoples"
       :required="isRequired"
       :label="inpitLabel"
+      rows="3"
       placeholder="请选择人员"
       @click="show = true"
+      :type="peoples&&peoples.length>=15?'textarea':''"
     />
-    <van-action-sheet class="bigsheetbox" @closed="closedHandler" v-model="show" safe-area-inset-bottom position="bottom" title="选择人员">
+
+    <van-dialog v-model="show" width="95%" title="选择人员" @confirm="submitHandler" confirm-button-color="#1989fa" show-cancel-button>
       <van-row>
         <van-col span="24">
           <!-- <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> -->
@@ -29,7 +32,38 @@
                   <van-checkbox :name="item.id" />
                 </template>
               </van-cell>
-            
+
+            </van-cell-group>
+          </van-checkbox-group>
+        </van-col>
+      </van-row>
+<!--      <van-row class="bottomdiv">
+        <van-col span="24">
+          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
+        </van-col>
+      </van-row>-->
+    </van-dialog>
+
+<!--    <van-action-sheet class="bigsheetbox" @closed="closedHandler" v-model="show" safe-area-inset-bottom position="bottom" title="选择人员">
+      <van-row>
+        <van-col span="24">
+          &lt;!&ndash; <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> &ndash;&gt;
+          <form action="/">
+            <van-search v-model="searchVal" placeholder="请输入搜索关键词" clearable @input="onSearch" />
+          </form>
+        </van-col>
+      </van-row>
+
+      <van-row class="rowclss">
+        <van-col span="24">
+          <van-checkbox-group v-model="peoplesId">
+            <van-cell-group>
+              <van-cell v-for="item in peopleListCpoy" clickable :key="item.id" :title="`${item.name}`">
+                <template #right-icon>
+                  <van-checkbox :name="item.id" />
+                </template>
+              </van-cell>
+
             </van-cell-group>
           </van-checkbox-group>
         </van-col>
@@ -39,7 +73,7 @@
           <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
         </van-col>
       </van-row>
-    </van-action-sheet>
+    </van-action-sheet>-->
   </div>
 </template>
 <script>
@@ -203,14 +237,17 @@ export default {
   position: absolute;
   margin-top: 20px;
   z-index: 2000;
+  padding-bottom:calc(0 + env(safe-area-inset-bottom));
 }
 .rowclss {
-  height: 1050px;
+  // height: 1050px;
+  height: calc(80vh - 180px);
+  // height: calc(100vh - 490px);
   overflow: scroll;
-  
+
 }
 .bigsheetbox {
-   height: calc(100vh - 100px);
+  height: calc(80vh - 200px);
 }
 .van-field__control {
   padding-right: 20px;
@@ -220,4 +257,7 @@ export default {
   height: 3px;
   background-color: #1989fa;
 }
+::v-deep .van-dialog{
+  top: 50% !important;
+}
 </style>

+ 226 - 0
src/components/peopleList/index_bak.vue

@@ -0,0 +1,226 @@
+<template>
+  <div>
+    <van-field
+      readonly
+      clickable
+      name="datetimePicker"
+      v-model="peoples"
+      :required="isRequired"
+      :label="inpitLabel"
+      placeholder="请选择人员"
+      @click="show = true"
+    />
+    <van-action-sheet class="bigsheetbox" @closed="closedHandler" v-model="show" safe-area-inset-bottom position="top" title="选择人员">
+      <van-row>
+        <van-col span="24">
+          <!-- <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> -->
+          <form action="/">
+            <van-search v-model="searchVal" placeholder="请输入搜索关键词" clearable @input="onSearch" />
+          </form>
+        </van-col>
+      </van-row>
+
+      <van-row class="rowclss">
+        <van-col span="24">
+          <van-checkbox-group v-model="peoplesId">
+            <van-cell-group>
+              <van-cell v-for="item in peopleListCpoy" clickable :key="item.id" :title="`${item.name}`">
+                <template #right-icon>
+                  <van-checkbox :name="item.id" />
+                </template>
+              </van-cell>
+
+            </van-cell-group>
+          </van-checkbox-group>
+        </van-col>
+      </van-row>
+      <van-row class="bottomdiv">
+        <van-col span="24">
+          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
+        </van-col>
+      </van-row>
+    </van-action-sheet>
+  </div>
+</template>
+<script>
+import { deptTreeList } from '@/api/toConsult.js'
+import { getOrgPeople } from '@/api/public.js'
+import OrgTree from '@/components/orgTree'
+export default {
+  name: 'SocAppIndex',
+  components: {
+    OrgTree
+  },
+
+  props: {
+    organizationId: {
+      //机构ID
+    },
+    userList: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    isRequired: {
+      //是否必填
+      type: Boolean,
+      default: false
+    },
+    inpitLabel: {
+      type: String,
+      default: '参与人员'
+    },
+    fieldNames: {
+      //树行配置映射项
+      type: Object,
+      default: () => {
+        return {
+          text: 'name',
+          value: 'id',
+          children: 'children'
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      orgId: this.organizationId || '',
+      show: false,
+      value1: '',
+      showcascader: false,
+      cascaderValue: '',
+      loading: false,
+      options: [], //机构列表
+      peoplesId: [], //人员ID集合
+      searchVal: '', //搜索值
+      peopleList: [], //人员列表
+      peopleListCpoy: [], //人员列表2
+      orgName: '', //机构名称
+      peoples: '' //人员列表
+    }
+  },
+  watch: {
+    organizationId(val) {
+      this.orgId = val + ''
+      this.getpeople()
+    },
+    //监听弹框是否打开
+    show(val) {
+      if (val) {
+        this.getpeople()
+      }
+    },
+    //监听人员数组变化
+    userList(val) {
+      this.peoplesId = []
+      this.$set(this.$data, 'peoples', val.map(item => item.userName).join(','))
+
+      val.map(item => {
+        this.peoplesId.push(item.userId)
+      })
+    }
+  },
+
+  created() {},
+  mounted() {},
+
+  methods: {
+    // 弹框关闭动画
+    closedHandler() {
+      this.searchVal = ''
+    },
+    onLoad() {},
+    getpeople() {
+      getOrgPeople(this.orgId).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          this.peopleList = data
+          this.peopleList.forEach(item => {
+            item.userName = item.name
+            item.username = item.name
+            item.userId = item.id
+          })
+          this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
+
+          this.peopleListCpoy.forEach(item => {
+            this.peoplesId.forEach(i => {
+              console.log(this.peoplesId)
+              if (item.userId === i) {
+                this.$set(item, 'checked', true)
+              } else {
+                this.$set(item, 'checked', false)
+              }
+            })
+          })
+        }
+      })
+    },
+
+    onSearch(val) {
+      this.peopleListCpoy = this.peopleList.filter(item => {
+        if (item.name.indexOf(val) != -1) {
+          return item
+        }
+      })
+    },
+
+    onCancel() {
+      this.searchVal = ''
+      this.peopleListCpoy = this.peopleList
+    },
+    submitHandler() {
+      let list = []
+      this.peopleListCpoy.filter(item => {
+        this.peoplesId.forEach(r => {
+          if (r == item.id) {
+            list.push(item)
+          }
+        })
+      })
+
+      // this.peoples = list.map(item => item.name).join(',')
+
+      this.$set(this.$data, 'peoples', list.map(item => item.name).join(','))
+      // 抛出已选择人员信息
+      this.$emit('userList', list)
+      this.show = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.van-action-sheet {
+  min-height: 90%;
+}
+.btns {
+  width: 100%;
+  height: 90px;
+}
+.bottomdiv {
+  width: 100%;
+  bottom: 0%;
+  position: absolute;
+  margin-top: 20px;
+  z-index: 2000;
+  padding-bottom:calc(0 + env(safe-area-inset-bottom));
+}
+.rowclss {
+  // height: 1050px;
+  height: calc(100vh - 180px);
+  // height: calc(100vh - 490px);
+  overflow: scroll;
+
+}
+.bigsheetbox {
+   height: calc(80vh - 300px);
+}
+.van-field__control {
+  padding-right: 20px;
+}
+.line {
+  width: 100%;
+  height: 3px;
+  background-color: #1989fa;
+}
+</style>

+ 178 - 0
src/components/selectCell/search.vue

@@ -0,0 +1,178 @@
+<template>
+  <div class="select-cell">
+    <van-cell
+      :required="required"
+      :title="title"
+      :border="border"
+      :value="isRow?label:null"
+      :label="!isRow?label:null"
+      :center="true"
+      is-link
+      @click="clickItem"/>
+    <!-- :label="!isRow?label:null" -->
+    <van-popup v-model="showPicker" round lazy-render position="bottom" :close-on-popstate="true" get-container="#app">
+      <van-picker
+        v-bind="$attrs"
+        show-toolbar
+        :value-key="prop.label"
+        v-model="selected"
+        :columns="columns"
+        @confirm="pickerConfirm"
+        confirm-button-text="确定"
+        @cancel="cancelPicker"
+      />
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import {getDict} from "@/api/toConsult";
+export default {
+  props:{
+    //禁用
+    disabled:{
+      type: [Boolean,String],
+      default: false,
+    },
+    //双向绑定的数据
+    value:{
+      type: [String,Number],
+      default: null,
+    },
+    required:{
+      type: [Boolean,String],
+      default: false,
+    },
+    border:{
+      type: [Boolean,String],
+      default: false,
+    },
+    //标题
+    title:{
+      type: String,
+      default: null,
+    },
+    //父组件给的列表数据
+    dataList:{
+      type: Array,
+      default: ()=>[],
+    },
+    //是否显示全部选项
+    isAll:{
+      type: Boolean,
+      default: false,
+    },
+    //单行显示或者多行显示
+    isRow:{
+      type: Boolean,
+      default: false,
+    },
+    //自定义字段
+    prop:{
+      type: Object,
+      default: ()=>(
+        {
+          label:'dictLabel',
+          value:'dictValue'
+        }
+      ) ,
+    }
+  },
+  data(){
+    return{
+      showPicker:false,
+      label:'无',
+    }
+  },
+  computed:{
+    columns(){
+      console.log(this.dataList,'datalist')
+      if(this.isAll){
+        let obj = {};
+        obj[this.prop.label] = '全部';
+        obj[this.prop.value] = null;
+        if(this.dataList)
+        { // 如果 this.dataList 为null undefine 解构会报错
+          return [obj,...this.dataList];
+        }
+        else
+        {
+          return [obj]
+        }
+      }
+      return this.dataList;
+    },
+    selected(){
+      if(!this.value) {
+        if(this.isAll){
+          this.label = '全部';
+          return null;
+        }
+        this.label = '无';
+        return null;
+      }
+      let val;
+      console.log(this.label,'label1111');
+      this.columns.forEach(v=> {
+        if (v[this.prop.value] === this.value) {
+          val = v;
+          this.label = v[this.prop.label];
+          console.log(this.label,'label2222');
+        }
+      });
+      return val;
+    },
+  },
+  methods:{
+    cancelPicker(){
+      this.showPicker = false;
+    },
+    pickerConfirm(val){
+      console.log(val,'val')
+      if(!val) return;
+      this.label = val[this.prop.label];
+      console.log(this.label,'label')
+      this.showPicker = false;
+      this.$emit('change',val[this.prop.value]);
+      this.$emit('itemInfo',val)
+    },
+    clickItem(){
+      this.showPicker = true;
+    },
+  },
+  model:{
+    prop: 'value',
+    event: 'change',
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.select-cell{
+  position: relative;
+  box-sizing: border-box;
+  width: 100%;
+  overflow: hidden;
+  color: #323233;
+  background-color: #fff;
+}
+.select-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);
+}
+.van-cell__label{
+  margin: 0;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  width: 260px;
+}
+</style>

+ 4 - 2
src/router/router.config.js

@@ -420,13 +420,13 @@ export let routers = [
         path: '/visitAdd',
         name: 'visitAdd',
         component: () => import('@/views/menu/visitRegister/add.vue'),
-        meta: { title: '新增申请', keepAlive: false, hideTabBar: true, deep: 2 }
+        meta: { title: '录入介绍信', keepAlive: false, hideTabBar: true, deep: 2 }
       },
       {
         path: '/visitAddOutInRequset',
         name: 'visitAddOutInRequset',
         component: () => import('@/views/menu/visitRegister/addOutInRequest.vue'),
-        meta: { title: '出入申请', keepAlive: false, hideTabBar: true, deep: 2 }
+        meta: { title: '提交出入申请', keepAlive: false, hideTabBar: true, deep: 2 }
       },
       {
         path: '/visitDetail',
@@ -513,6 +513,8 @@ export let routers = [
         component: () => import('@/views/menu/inspection/history.vue'),
         meta: { title: '详情', keepAlive: false }
       }
+      ,
+
       // {
       //   path: '/addOrder',
       //   name: 'addOrder',

+ 26 - 18
src/utils/onresizeMixins.js

@@ -1,31 +1,39 @@
+import { debounce } from 'lodash';
 export const onresizeHandler = {
-  
   data() {
     return {
-      docmHeight: document.documentElement.clientHeight || document.body.clientHeight,
-      showHeight: document.documentElement.clientHeight || document.body.clientHeight,
-      isBtn: true //是否显示隐藏保存提交按钮(演练登记&教育培训)
+      docmHeight: this.getDocumentHeight(),
+      showHeight: this.getDocumentHeight(),
+      isBtn: true // 是否显示隐藏保存提交按钮(演练登记&教育培训)
     }
   },
   created() {},
   watch: {
-    //监听显示高度
-    showHeight: function () {
-      if (this.docmHeight > this.showHeight) {
-        //隐藏
-        this.isBtn = false
-      } else {
-        //显示
-        this.isBtn = true
-      }
+    // 监听显示高度
+    showHeight: function() {
+      this.updateButtonVisibility();
     }
   },
   mounted() {
-    //监听事件
-    window.onresize = () => {
-      return (() => {
-        this.showHeight = document.documentElement.clientHeight || document.body.clientHeight
-      })()
+    // 添加事件监听器,并使用防抖处理函数
+    window.addEventListener('resize', this.handleResize);
+  },
+  beforeDestroy() {
+    // 移除事件监听器,避免内存泄漏
+    window.removeEventListener('resize', this.handleResize);
+  },
+  methods: {
+    handleResize: debounce(function() {
+      this.showHeight = this.getDocumentHeight();
+    }, 100), // 使用防抖,确保不频繁调用
+
+    updateButtonVisibility() {
+      this.isBtn = this.docmHeight <= this.showHeight;
+    },
+
+    // 获取文档高度的工具函数
+    getDocumentHeight() {
+      return document.documentElement.clientHeight || document.body.clientHeight;
     }
   }
 }

+ 35 - 9
src/views/home/works.vue

@@ -47,13 +47,13 @@
                 >
                   <template #title>
                     <span class="custom-title">{{ i.taskName }}
-                      <van-tag
+<!--                      <van-tag
                         class="resetDy"
                         @click.stop="resetHandler(i.id)"
                         v-if="i.status == 1 && item.taskType == 3"
                         type="primary"
                       >重新调阅</van-tag
-                      >
+                      >-->
                     </span>
                     <div class="org-name-class">
                       {{ i.orgName}}
@@ -118,7 +118,7 @@ import TopBar from '@/components/TopBar'
 import WeatherBox from "@/components/weatherBox/index.vue";
 import {Toast, Dialog} from 'vant'
 import {base64ToBlob} from '@/utils/base64TurnImg.js'
-import {registration, resetTask} from '@/api/toConsult.js'
+import {registration, resetTask,getMonitorStart} from '@/api/toConsult.js'
 import {upload} from '@/api/public'
 import {getPanelList} from '@/api/drillTask.js'
 
@@ -169,11 +169,36 @@ export default {
       //   })
       // }
       //如果当前是待调阅任务 当前页面处理之后再跳转 不是则正常跳转
-      if (i.status == 0 && taskType == 3) {
-        this.falg = false
-        this.taskId = i.id
-        this.$refs.scandialog.visible = true
-        this.globalLoading = true
+      if (taskType == 3) {
+        let obj = {taskId: i.id}
+        getMonitorStart(obj).then(res => {
+          let {code, data, msg} = res
+          let dayNums = data.dayNums;
+          let noComplete = data.noComplete;
+          if (noComplete > 0) {
+            this.falg = true
+            this.$router.push({path: this.worksLink(4, taskType, i.status, i.id, i)})
+          } else {
+
+            if (dayNums >= 5) {
+              //提醒确认
+              Dialog.confirm({
+                title: '提示',
+                message: `当前调阅任务今日调阅已达到${dayNums}次,是否继续调阅?`,
+              }).then(() => {
+                this.falg = false
+                this.taskId = i.id
+                this.$refs.scandialog.visible = true
+                this.globalLoading = true
+              })
+            } else {
+              this.falg = false
+              this.taskId = i.id
+              this.$refs.scandialog.visible = true
+              this.globalLoading = true
+            }
+          }
+        })
       } else {
         this.falg = true
         this.$router.push({path: this.worksLink(4, taskType, i.status, i.id, i)})
@@ -371,7 +396,8 @@ export default {
       let obj = {
         startPicture: img,
         startNfc: nfc,
-        taskId: this.taskId
+        taskId: this.taskId,
+        monitorFlag: 0
       }
       registration(obj).then(res => {
         let {code, data, msg} = res

+ 6 - 6
src/views/menu/iot/alarmCenter/index.vue

@@ -14,7 +14,7 @@
     </van-row>
     <van-row>
       <van-col span="24">
-        <van-search v-model="search.deviceName" @clear="search.deviceName=null" maxlength="50" placeholder="请输入搜索关键词" />        
+        <van-search v-model="search.deviceName" @clear="search.deviceName=null" maxlength="50" placeholder="请输入搜索关键词" />
       </van-col>
     </van-row>
     <van-row>
@@ -76,7 +76,7 @@ export default {
   name: 'iot_alarmCenter',
   data() {
     return {
-      search: {        
+      search: {
         orgId: this.orgId,
         checkSub: true,
         alarmType: null,
@@ -117,7 +117,7 @@ export default {
         },
         {
           value: '41881',
-          text: '盗告警'
+          text: '盗告警'
         },
         {
           value: '4188',
@@ -179,8 +179,8 @@ export default {
   beforeRouteEnter(to,from,next){
     next(vm=>{
       console.log("beforeRouteEnter",to.params.event,to)
-      if(to.params.event === 'refresh'){        
-        vm.reSet()     
+      if(to.params.event === 'refresh'){
+        vm.reSet()
       }
     })
   },
@@ -199,7 +199,7 @@ export default {
         this.defaultAlarmType= '全部'
         this.showState = false;
         this.defaultAlarmType= '全部'
-      this.search= {        
+      this.search= {
           orgId: this.orgId,
           checkSub: true,
           alarmType: null,

+ 3 - 3
src/views/menu/iot/envMonitor/detail.vue

@@ -77,9 +77,9 @@ export default {
         case '4188': //门窗磁
           text = `门窗磁${array[0].val == 0 ? '关门' : '开门'}`
           break
-        case '41881': //
-          text = `盗${array[0].val == 0 ? '正常' : '告警'}`
-          break          
+        case '41881': //
+          text = `盗${array[0].val == 0 ? '正常' : '告警'}`
+          break
       }
 
       return text;

+ 1 - 1
src/views/menu/iot/envMonitor/index.vue

@@ -15,7 +15,7 @@
     <van-row>
       <van-col span="24">
         <van-tabs @click="tabActiveHandler">
-          <van-tab name="thiefCheck" title="盗" :badge="thiefCheckBadge"></van-tab>
+          <van-tab name="thiefCheck" title="盗" :badge="thiefCheckBadge"></van-tab>
           <van-tab name="infraredCheck" title="红外" :badge="infraredCheckBadge"></van-tab>
           <van-tab name="doorCheck" title="门窗磁" :badge="doorCheckBadge"></van-tab>
           <van-tab name="waterCheck" title="水浸" :badge="waterCheckBadge"></van-tab>

+ 2 - 2
src/views/menu/iot/smartOpration/components/item.vue

@@ -5,7 +5,7 @@
         <template #title>
           <span>{{data.orgName}}</span>
           <van-tag type="success" v-if="getNormalChannelCount>0" @click="showNormalChannel()" class="custom-title-tag">正常通道:{{getNormalChannelCount}}</van-tag>
-          <van-tag type="warning" v-if="getExceptionChannelCount>0" @click="showExceptionChannel()"  class="custom-title-tag">异常通道:{{getExceptionChannelCount}}</van-tag>
+          <van-tag type="danger" v-if="getExceptionChannelCount>0" @click="showExceptionChannel()"  class="custom-title-tag">异常通道:{{getExceptionChannelCount}}</van-tag>
         </template>
         <template #right-icon v-if="data.channels && data.channels.length > 0">
           <van-icon
@@ -43,7 +43,7 @@
               style="width: 80%"
               size="small"
               v-else-if="channel.state == 1"
-              type="warning"
+              type="danger"
               @click="itemClick(data.hostCode, channel.channelCode)"
             >
               {{  channel.channelName}}</van-button

+ 12 - 12
src/views/menu/iot/smartOpration/videocheckdetail.vue

@@ -42,19 +42,19 @@
         </van-cell>
       </van-cell-group>
     </card> -->
-    <card v-if="!info.storage">
+<!--    <card v-if="!info.storage">
       <van-cell title="录像存储情况" value="未上报"  title-style="font-weight:700;"> </van-cell>
-    </card>
-    <card v-else>
+    </card>-->
+    <card>
       <van-cell-group>
-        <van-cell title="录像存储情况"  title-style="font-weight:700;">
-          <!-- <template #default>
+<!--        <van-cell title="录像存储情况"  title-style="font-weight:700;">
+          &lt;!&ndash; <template #default>
             <van-tag type="success" v-if="info.storage.planDays === info.storage.realDays">正常</van-tag>
             <van-tag type="warning" v-else>异常</van-tag>
-          </template> -->
+          </template> &ndash;&gt;
         </van-cell>
         <van-cell title="计划存储天数" :value="`${info.storage.planDays}天`"></van-cell>
-        <van-cell title="实际存储天数" :value="`${info.storage.realDays}天`"></van-cell>        
+        <van-cell title="实际存储天数" :value="`${info.storage.realDays}天`"></van-cell>
         <van-cell value-class="cell-calender-value" title-class="cell-calender-title">
           <template #title></template>
           <template #default>
@@ -66,7 +66,7 @@
               @change="onChange"
             ></calendar>
           </template>
-        </van-cell>
+        </van-cell>-->
         <van-cell title="录像完整性" title-style="font-weight:500;"></van-cell>
         <van-cell title="日期" :value="dayjs(selectDate).format('YYYY年M月D日')" v-if="selectDate"
         ></van-cell>
@@ -143,15 +143,15 @@ export default {
 
       return str
     },
-    imgUrl(img) { 
+    imgUrl(img) {
           // let path="http://localhost:8080/iot/VideoDiagnosis/img?path=";
 
-        
+
       let path = process.env.NODE_ENV === "development"
-      
+
           ? "/dev/iot/VideoDiagnosis/img?path="
           : window.origin+ "/iot/VideoDiagnosis/img?path="
-      
+
       if (img) path += `${encodeURIComponent(img)}`;
       return path;
     }

+ 25 - 14
src/views/menu/iot/smartOpration/videodiagnosisdetail.vue

@@ -31,11 +31,7 @@
             <van-image
               height="20vh"
               :src="imgUrl(info.quality.image)"
-              @click="
-                () => {
-                  showImage = true
-                }
-              "
+              @click="() => {showImage = true}"
             ></van-image>
             <van-image-preview v-model="showImage" :images="[imgUrl(info.quality.image)]"></van-image-preview
           ></template>
@@ -48,10 +44,10 @@
     <card v-else>
       <van-cell-group>
         <van-cell title="录像存储情况"  title-style="font-weight:700;">
-          
+
         </van-cell>
         <van-cell title="计划存储天数" :value="`${info.storage.planDays}天`"></van-cell>
-        <van-cell title="实际存储天数" :value="`${info.storage.realDays}天`"></van-cell>        
+        <van-cell title="实际存储天数" :value="`${info.storage.realDays}天`"></van-cell>
         <van-cell value-class="cell-calender-value" title-class="cell-calender-title">
           <template #title></template>
           <template #default>
@@ -140,18 +136,33 @@ export default {
 
       return str
     },
-    imgUrl(img) { 
+    imgUrl(base64) {
           // let path="http://localhost:8080/iot/VideoDiagnosis/img?path=";
 
-        
-      let path = process.env.NODE_ENV === "development"
-      
+      if (base64) {
+        const blob = this.dataURLtoBlob(base64);
+        return URL.createObjectURL(blob);
+      }
+      /*let path = process.env.NODE_ENV === "development"
+
           ? "/dev/iot/VideoDiagnosis/img?path="
           : window.origin+ "/iot/VideoDiagnosis/img?path="
-      
+
       if (img) path += `${encodeURIComponent(img)}`;
-      return path;
-    }
+      return path;*/
+    },
+
+    dataURLtoBlob(dataURL) {
+      const arr = dataURL.split(',');
+      const mime = arr[0].match(/:(.*?);/)[1];
+      const bstr = atob(arr[1]);
+      let n = bstr.length;
+      const u8arr = new Uint8Array(n);
+      while (n--) {
+        u8arr[n] = bstr.charCodeAt(n);
+      }
+      return new Blob([u8arr], { type: mime });
+    },
   }
 }
 </script>

+ 50 - 48
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -21,22 +21,6 @@
         </div>
 
         <div class="topBox" v-else>
-          <!-- <van-collapse-item :name="item.hostId" v-for="item in hostList" :key="item.hostId">
-            <template #title>
-              <div class="textTitle">{{ item.hostName }}</div>
-            </template>
-            <passage
-              ref="passage"
-              :list="item.deviceVOS"
-              :taskId="$route.params.id.split('_')[0]"
-              :hostId="item.hostId"
-              @resetList="getHostHandlerA"
-            ></passage>
-          </van-collapse-item> -->
-          <!-- <van-collapse-item>
-            <template #title>
-              <div class="textTitle">区域列表</div>
-            </template> -->
           <areaPassage
               ref="passage"
               :list="retrievalAreaList"
@@ -54,14 +38,20 @@
             <van-button type="info" @click="addInfoHandler">添加调阅记录</van-button>
           </van-col>
         </van-row> -->
-        <van-row v-if="retrievalAreaList && retrievalAreaList.length > 0">
-          <van-col span="24">
+        <van-row v-if="retrievalAreaList && retrievalAreaList.length > 0" gutter="10">
+          <van-col span="12">
+            <van-button type="default" @click="storagMontor">保存</van-button>
+          </van-col>
+          <van-col span="12">
             <van-button type="info" @click="endMontor">结束调阅</van-button>
           </van-col>
         </van-row>
       </div>
     </div>
-    <van-action-sheet v-model="showSign" :title="shwoSignTitle" class="sheet">
+    <van-action-sheet v-model="showSign" title="结束调阅" class="sheet">
+        <template #description >
+          <span>{{shwoSignTitle}}</span>
+        </template>
         <writingPad ref="esign" :old-signature-seal="oldSignatureSeal" @resultImg="resultSignImg" @cancelSign="cancelSign"></writingPad>
     </van-action-sheet>
     <!-- 扫描弹框 -->
@@ -83,7 +73,7 @@ import areaMonitoringList from './areaMonitoringList.vue'
 
 import { upload } from '@/api/public'
 import { Col, Row, Dialog, Toast, Icon, Picker } from 'vant'
-import { registrationList, finishRegistration, login, getSysDeviceByTaskId, registration } from '@/api/toConsult.js'
+import { registrationList, finishRegistration, login, getSysDeviceByTaskId, registration,storageTask } from '@/api/toConsult.js'
 import scandialog from '@/components/nfcPopup/alone.vue'
 import writingPad from '@/components/writingPad/index.vue'
 import imgCom from '@/components/imgCom/index.vue'
@@ -150,19 +140,6 @@ export default {
       this.init(num)
     },
     getHostHandler(num = 0) {
-      // num//判断是不是第一次初始化
-      // getSysDeviceByTaskId({ taskId: this.$route.params.id.split('_')[0] }).then(res => {
-      //   let { code, data, msg } = res
-      //   if (code == 200) {
-      //     this.hostList = data
-      //     if (num == 1) {
-      //       this.activeNames = [this.hostList[0].hostId]
-      //     } else {
-      //       console.log(this.activeNames, '////')
-      //     }
-      //   }
-      // })
-
        //获取调阅字典
        this.getDictHandler('video_retrieval_area', res => {
            let areaList = JSON.parse(JSON.stringify(res));
@@ -220,21 +197,10 @@ export default {
         }
         let endDate = Date.parse(new Date())
 
+        let taskTotalTime = this.taskData.taskTotalTime  + (endDate - startDate) ;
         if (endDate - startDate) {
-          this.shwoSignTitle= `调阅时长为${this.dateTime(endDate - startDate)},是否结束调阅?`;
+          this.shwoSignTitle= `本次调阅时长为${this.dateTime(endDate - startDate)},调阅总时长为:${this.dateTime(taskTotalTime)},是否提交调阅任务?`;
           this.showSign=true;
-
-
-          // Dialog.confirm({
-          //   title: '提示',
-          //   message: `当前调阅时长为${this.dateTime(endDate - startDate)},是否结束调阅?`
-          // }).then(() => {
-          //     this.$refs.scandialog.visible = true
-          //     this.globalLoading = true
-          //   })
-          //   .catch(() => {
-          //     // on cancel
-          //   })
         }
 
       } else {
@@ -248,6 +214,42 @@ export default {
       //   startDate = new Date(startDate)
       // }
     },
+    storagMontor(){
+      //暂存数据
+      let falg = this.taskData.coreMonitoringTaskRegistrationMonitorVOList
+      if (falg && falg.length > 0) {
+        let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
+        let obj=startDate.replace(/-/g,"/");
+
+        startDate = Date.parse(new Date(startDate))
+        if(!startDate){
+          startDate = Date.parse(new Date(obj));
+        }
+        let endDate = Date.parse(new Date())
+        let taskTotalTime = this.taskData.taskTotalTime  + (endDate - startDate);
+        if (endDate - startDate) {
+          let msg = `本次调阅时长为${this.dateTime(endDate - startDate)},调阅总时长为:${this.dateTime(taskTotalTime)},是否暂存调阅?`;
+          Dialog.confirm({
+            message: msg,
+          }).then(() => {
+            storageTask({
+              id: this.taskData.id,
+              signImgUrl:this.signImgUrl,
+              taskId: this.$route.params.id.split('_')[0]
+            }).then(res => {
+              this.$router.go(-1)
+            })
+          }).catch(() => {
+            // on cancel
+          });
+        }
+
+      } else {
+        Dialog({ message: '调阅项目登记不能为全空!' })
+        return
+      }
+
+    },
     dateTime(msd) {
       //将毫秒秒转化为xx小时xx分钟xx秒
 
@@ -341,10 +343,10 @@ export default {
       finishRegistration({
         id: this.taskData.id,
         signImgUrl:this.signImgUrl,
-        taskId: this.$route.params.id.split('_')[0]
+        taskId: this.$route.params.id.split('_')[0],
+        monitorFlag:1,
       }).then(res => {
         this.$router.go(-1)
-
       })
     },
     addActiveNames() {

+ 140 - 51
src/views/menu/monitoringCall/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar  />
+    <NavBar/>
     <van-row>
       <van-col span="24">
         <org-tree v-model="cascaderValue" @change="getDataList"></org-tree>
@@ -8,9 +8,9 @@
     </van-row>
     <van-row>
       <van-col span="12"
-        >
+      >
 
-        <van-cell title="状态" @click="showStatus = true" is-link arrow-direction="down" :value="fieldValue" />
+        <van-cell title="状态" @click="showStatus = true" is-link arrow-direction="down" :value="fieldValue"/>
         <van-popup v-model="showStatus" round position="bottom">
           <van-picker
             title="调阅状态"
@@ -21,11 +21,13 @@
             @cancel="onCancel"
             @change="onChange"
             :close-on-click-overlay="false"
-          /> </van-popup
-      ></van-col>
+          />
+        </van-popup
+        >
+      </van-col>
       <van-col span="12">
-        
-        <van-cell title="月份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate" />
+
+        <van-cell title="月份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate"/>
 
         <van-popup v-model="showDate" round position="bottom">
           <van-datetime-picker
@@ -61,14 +63,12 @@
           >
             <template #title>
               <span class="custom-title">
-                {{ item.taskName
-                }}<van-tag class="resetDy" @click.stop="resetHandler(item.id)" v-if="item.status == 1" type="primary"
-                  >重新调阅</van-tag
-                ></span
-              >
-             
-
-              <span :class="monitor[item.status]">{{ item.status | statusFilter(this_) }}</span>
+                {{item.taskName}}
+<!--                <van-tag class="resetDy" @click.stop="resetHandler(item)" v-if="item.status == 1" type="primary">重新调阅</van-tag>-->
+              </span>
+
+
+              <span :class="monitor[item.status]">{{item.status | statusFilter(this_)}}</span>
             </template>
           </van-cell>
         </van-cell-group>
@@ -81,14 +81,15 @@
 </template>
 <script>
 import NavBar from '@/components/NavBar'
-import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
-import { deptTreeList, selectListApp, registration, resetTask } from '@/api/toConsult.js'
-import { Toast } from 'vant'
+import {Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker} from 'vant'
+import {deptTreeList, selectListApp, registration, resetTask, getMonitorStart} from '@/api/toConsult.js'
+import {Toast} from 'vant'
 import OrgTree from '@/components/orgTree'
-import { newDateMonth } from '@/utils/date.js'
+import {newDateMonth} from '@/utils/date.js'
 import scandialog from '@/components/nfcPopup/alone.vue'
-import { base64ToBlob } from '@/utils/base64TurnImg.js'
-import { upload } from '@/api/public'
+import {base64ToBlob} from '@/utils/base64TurnImg.js'
+import {upload} from '@/api/public'
+import dayjs from "dayjs";
 export default {
   data() {
     return {
@@ -160,27 +161,30 @@ export default {
     this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
   },
   methods: {
+    dayjs,
     //单元格点击事件
     linkHandler(status, id, item) {
-      // if (item.isExist == 0 && status == 0) {
-      //   Dialog.alert({
-      //     message: '机构下没有主机摄像头,不能开启调阅任务!',
-      //     confirmButtonText: '关闭'
-      //   })
-      //   return
-      // }
+      /*if (!this.checkIsCurrentOrgTask()){
+        return ;
+      }*/
       if (status == 0) {
         //判断当前时间是否小于开始时间 小于则不能进行操作
-        let date = new Date().getTime()
-        let startDate = Date.parse(new Date(item.planStartTime))
-
-        if (date <= startDate) {
+        if (!this.checkDate(item.planStartTime)) {
           Toast.success('当前调阅任务还未开始,不能进行调阅')
         } else {
           this.startMonitorHandler(id)
         }
       }
 
+      if (status == 1) {
+        if (!this.checkDate(item.planStartTime)) {
+          Toast.success('当前调阅任务还未开始,不能进行调阅');
+          return ;
+        }
+        this.startMonitorHandler(id);
+        return;
+      }
+
       if (status == 3) {
         return Toast('当前监控调阅任务已逾期,无法操作!')
       }
@@ -189,7 +193,15 @@ export default {
       }
     },
     //重新调阅
-    resetHandler(id) {
+    resetHandler(item) {
+      let id = item.id;
+      if (!this.checkDate(item.planStartTime)) {
+        Toast.success('当前调阅任务还未开始,不能进行调阅');
+        return ;
+      }
+      /*if (!this.checkIsCurrentOrgTask()){
+        return ;
+      }*/
       Dialog.confirm({
         title: '提示',
         message: '确认要对该任务进行重新调阅吗?'
@@ -227,6 +239,14 @@ export default {
       this.fieldValue = ''
       this.selectListAppHandler()
     },
+
+    checkDate(startTime){
+      //未到开始时间不能调阅
+      let currentDate = new Date().getTime();
+      let startDate = dayjs(startTime).valueOf();
+      return currentDate >= startDate;
+
+    },
     //nfc拍照功能完成
     change(img) {
       console.log(img)
@@ -242,7 +262,8 @@ export default {
       })
       // this.selectListAppHandler()
     },
-    selectListAppHandler(type = 0, callBack = () => {}) {
+    selectListAppHandler(type = 0, callBack = () => {
+    }) {
       if (!type) {
         this.pageNum = 1
         this.taskList = []
@@ -256,7 +277,7 @@ export default {
         orgId: this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || '',
         moth: this.currentDate || ''
       }).then(res => {
-        let { code, rows, total } = res
+        let {code, rows, total} = res
         if (code == 200) {
           if (type) {
             this.taskList.push(...rows)
@@ -268,7 +289,7 @@ export default {
               callBack()
             }
           } else {
-            
+
             this.taskList.push(...rows)
             this.finished = false
             this.loading = false
@@ -276,7 +297,7 @@ export default {
               //已加载完全部数据
               this.finished = true
             }
-            
+
 
             // this.taskList = rows || []
           }
@@ -295,13 +316,13 @@ export default {
         taskId: this.taskId
       }
       registration(obj).then(res => {
-        
-        let { code, data, msg } = res
+
+        let {code, data, msg} = res
         if (code == 200) {
           Toast.success('扫描成功')
-          this.$router.push('/consultInfo/' + this.taskId)
-        }else{
-          Toast.error({ message: msg, position: 'top' })
+          this.$router.push('/consultInfo/' + this.taskId )
+        } else {
+          Toast.error({message: msg, position: 'top'})
 
         }
       })
@@ -313,10 +334,11 @@ export default {
       let obj = {
         startPicture: img,
         startNfc: nfc,
-        taskId: this.taskId
+        taskId: this.taskId,
+        monitorFlag: 0
       }
       registration(obj).then(res => {
-        let { code, data, msg } = res
+        let {code, data, msg} = res
         if (code == 200) {
           Toast.success('扫描成功')
           this.$router.push('/consultInfo/' + this.taskId)
@@ -336,11 +358,43 @@ export default {
       this.show = false
       this.selectListAppHandler()
     },
+    checkIsCurrentOrgTask() {
+      //判断是否当前用户所属机构的任务, 用户仅允许执行自己机构的任务
+      let orgId = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID'));
+      if (orgId == this.cascaderValue) {
+        return true;
+      }
+      console.log('非当前用户所属机构任务,无法执行;')
+      return false;
+    },
     // 开始调阅事件
     startMonitorHandler(taskId) {
-      this.taskId = taskId
-      this.$refs.scandialog.visible = true
-      this.globalLoading=true
+      this.taskId = taskId;
+      let obj = {taskId: taskId}
+      getMonitorStart(obj).then(res => {
+        let {code, data, msg} = res
+        let dayNums = data.dayNums;
+        let noComplete = data.noComplete;
+        if (noComplete > 0) {
+          this.$router.push('/consultInfo/' + this.taskId)
+        } else {
+
+          if (dayNums >= 5) {
+            //提醒确认
+            Dialog.confirm({
+              title: '提示',
+              message: `当前调阅任务今日调阅已达到${dayNums}次,是否继续调阅?`,
+            }).then(() => {
+              this.$refs.scandialog.visible = true;
+              this.globalLoading = true;
+            })
+          } else {
+            this.$refs.scandialog.visible = true;
+            this.globalLoading = true;
+          }
+        }
+      })
+
     },
 
     //查看调阅详情
@@ -351,13 +405,14 @@ export default {
     //级联选择当前任意层级触发
     changeCascader(val) {
       console.log(val)
-      let { selectedOptions } = val
+      let {selectedOptions} = val
       //级联值
       this.cascaderValue = selectedOptions[selectedOptions.length - 1].id
       //输入框值
       this.value1 = selectedOptions[selectedOptions.length - 1].name
     },
-    onFinish() {},
+    onFinish() {
+    },
     //搜索选择状态时触发
     onConfirm(value, index) {
       this.fieldValue = value
@@ -388,7 +443,8 @@ export default {
       d = d < 10 ? '0' + d : d
       return y + '-' + m
     },
-    onChange(picker, value, index) {},
+    onChange(picker, value, index) {
+    },
     onCancel() {
       this.show = false
       this.showStatus = false
@@ -403,18 +459,22 @@ export default {
   margin: 20px;
 
   display: flex;
+
   .sonLeftBox {
     padding: 10px;
     flex: 1;
     background-color: #fff;
   }
 }
+
 .custom-title {
   font-weight: bold;
 }
+
 .van-cell__label {
   font-size: 25px;
 }
+
 .monitor {
   color: #008cd6;
   padding-left: 10px;
@@ -425,6 +485,7 @@ export default {
   // border-radius: 10px;
   // background-color: #8cb585;
 }
+
 .monitored {
   color: #bc9f71;
 
@@ -436,6 +497,7 @@ export default {
   // border-radius: 10px;
   // background-color: #1989fa;
 }
+
 .monitoring {
   color: #009240;
   padding-left: 10px;
@@ -445,6 +507,7 @@ export default {
   // border-radius: 10px;
   // background-color: #25da0b;
 }
+
 .waringtoring {
   color: #d7000f;
 
@@ -456,14 +519,17 @@ export default {
   // border-radius: 10px;
   // background-color: #e46962;
 }
+
 .title {
   margin: 10px;
   margin-left: 0px;
   font-size: 40px;
 }
+
 .time {
   font-size: 32px;
 }
+
 .startMonitor {
   background-color: #f5f5f9;
   color: #1989fa;
@@ -472,6 +538,7 @@ export default {
   font-size: 36px;
   text-align: center;
 }
+
 .endMonitor {
   background-color: #f5f5f9;
   color: #1989fa;
@@ -480,52 +547,64 @@ export default {
   font-size: 36px;
   text-align: center;
 }
+
 .img_box {
   text-align: center;
+
   .img {
     width: 200px;
     height: 200px;
   }
 }
+
 .text {
   text-align: center;
   font-size: 30px;
   margin-top: 30px;
   margin-bottom: 100px;
 }
+
 .btns {
   margin-top: 40px;
   margin-bottom: 40px;
   display: flex;
   justify-content: space-around;
+
   .nfcPhoto {
     color: #409bf2;
+
     div {
       width: 100%;
       text-align: center;
     }
   }
 }
+
 .btnf_box {
   background-color: #fff;
 }
+
 .van-dialog {
   padding: 30px;
 }
+
 .spanimg {
   display: flex;
   justify-content: flex-end;
+
   .close {
     width: 50px;
     height: 50px;
   }
 }
+
 .btn {
   float: right;
   margin-top: 24px;
   margin-right: 20px;
   box-sizing: border-box;
 }
+
 .bigbox {
   height: calc(100vh - 400px);
   overflow: scroll;
@@ -534,11 +613,13 @@ export default {
   margin-right: 20px;
   background-color: #fff;
 }
+
 .card {
   margin: 20px;
   margin-bottom: 0px;
   box-shadow: 0 8px 12px #ebedf0;
 }
+
 .titleClass {
   display: flex;
   align-items: center;
@@ -553,19 +634,23 @@ export default {
     line-height: 50px;
   }
 }
+
 .mainItem {
   display: flex;
   font-size: 28px;
   padding: 20px;
   justify-content: revert;
+
   .date {
     margin-left: 30px;
   }
+
   .condition {
     color: #1989fa;
     text-decoration: underline;
   }
 }
+
 .bttons {
   color: #1989fa;
   border: none;
@@ -574,17 +659,21 @@ export default {
 :deep.van-field--disabled {
   color: #323233;
 }
+
 :deep.van-field--disabled .van-field__label {
   color: #323233;
 }
+
 :deep .van-field__control[disabled] {
   color: #323233;
   -webkit-text-fill-color: #323233;
 }
+
 .resetDy {
   margin-left: 20px;
 }
-.van-cell__value{
+
+.van-cell__value {
   color: black;
   text-align: left;
 }

+ 7 - 3
src/views/menu/problemItem/index.vue

@@ -5,7 +5,7 @@
       <van-search v-model="query.searchKey" class="van-hairline--bottom" placeholder="请输入搜索关键词" @search="refreshData" />
       <org-tree v-model="query.orgId"  @change="refreshData" showChecked @checked="checked"></org-tree>
       <div class="search-flex">
-        <select-cell
+        <search-select-cell
           style="border-right: 1px solid #f5f5f5;"
           title="问题状态"
           :isAll="true"
@@ -13,7 +13,7 @@
           v-model="query.status"
           :data-list="getDictItem('app_question_status')"
           @change="refreshData"/>
-        <date-cell title="截止日期"  v-model="query.reformDate" @change="refreshData"/>
+        <search-date-cell title="截止日期"  v-model="query.reformDate" @change="refreshData"/>
       </div>
       <div class="card-list">
         <Scroll
@@ -94,7 +94,9 @@ import OrgTree from '@/components/orgTree'
 import Scroll from '@/components/scroll/scroll'
 import Card from '@/components/card'
 import dateCell from '@/components/dateCell'
+import searchDateCell from '@/components/dateCell/search.vue'
 import selectCell from '@/components/selectCell'
+import searchSelectCell from '@/components/selectCell/search.vue'
 import {dataList} from './api'
 import {mapGetters} from "vuex";
 import {formatDate} from "@/filters/filter";
@@ -107,6 +109,8 @@ export default {
     Card,
     dateCell,
     selectCell,
+    searchDateCell,
+    searchSelectCell,
   },
   data() {
     return {
@@ -211,7 +215,7 @@ export default {
       setTimeout(() => {
         if(!this.query.orgId){
           this.query.orgId = this.orgId;
-        }        
+        }
       }, 200);
     },
     clickItem(id,type){

+ 2 - 1
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -287,7 +287,8 @@ export default {
       let { code, data, msg } = res
       if (code == 200) {
         this.branchList = data
-        if (this.branchList.length === 0){
+        let orgType = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGTYPE')) + '';
+        if (this.branchList.length === 0&& orgType =='4'){
           //Toast('本网点还未编制预案,请及时到网页端网点预案管理菜单维护')
           Dialog.alert({
             message: '本网点还未编制预案,请及时到网页端网点预案管理菜单维护',

+ 9 - 22
src/views/menu/rehearsalTask/components/dialog.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <van-action-sheet class="bigsheetbox" @closed="closedHandler" v-model="show" safe-area-inset-bottom position="bottom" title="选择演练库">
+    <van-dialog v-model="show" title="选择演练库" width="95%" @confirm="submitHandler" show-cancel-button>
       <van-row>
         <van-col span="24">
           <div class="line"></div>
@@ -36,12 +36,7 @@
           </van-collapse>
         </van-col>
       </van-row>
-      <van-row class="bottomdiv">
-        <van-col span="24">
-          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
-        </van-col>
-      </van-row>
-    </van-action-sheet>
+    </van-dialog>
   </div>
 </template>
 <script>
@@ -187,21 +182,10 @@ export default {
   z-index: 999;
 }
 .van-action-sheet {
-  min-height: 90%;
-}
-.btns {
-  width: 100%;
-  height: 90px;
-}
-.bottomdiv {
-  width: 100%;
-  bottom: 0%;
-  position: absolute;
-  margin-top: 20px;
-  z-index: 2000;
+  min-height: 70%;
 }
 .bigsheetbox {
-  height: calc(100vh - 100px);
+  height: calc(90vh - 200px);
 }
 .line {
   width: 100%;
@@ -210,8 +194,8 @@ export default {
 }
 .rowclss {
   // margin-bottom: 100px;
-  // height: calc(90vh - 200px);
-  height: 1050px;
+  height: calc(80vh - 180px);
+  // height: 1050px;
   overflow: scroll;
 }
 .lddq {
@@ -219,4 +203,7 @@ export default {
   white-space: pre-wrap;
   // text-align: left;
 }
+::v-deep .van-dialog{
+  top: 50% !important;
+}
 </style>

+ 223 - 0
src/views/menu/rehearsalTask/components/dialog_bak.vue

@@ -0,0 +1,223 @@
+<template>
+  <div>
+    <van-action-sheet class="bigsheetbox" @closed="closedHandler" v-model="show" safe-area-inset-bottom position="bottom" title="选择演练库">
+      <van-row>
+        <van-col span="24">
+          <div class="line"></div>
+        </van-col>
+      </van-row>
+
+      <van-row>
+        <van-col span="24">
+          <van-search v-model="searchVal" placeholder="请输入搜索关键词" @input="onSearch" @cancel="onCancel" />
+        </van-col>
+      </van-row>
+
+      <van-row class="rowclss">
+        <van-col span="24">
+          <van-collapse v-model="activeNames" @change="checkedHandler" accordion>
+            <van-checkbox-group v-model="result" @change="changeCheckBox">
+              <van-collapse-item
+                :ref="item.id"
+                :name="item.id"
+                v-for="item in peopleListCpoy"
+                :key="item.id"
+                :title="item.drillProjects"
+              >
+                <!-- :title="item.defaultCause" -->
+                <template #right-icon>
+                  <van-checkbox :name="item.id" ref="checkboxes" class="checkboxList" />
+                </template>
+                <div class="lddq">
+                  {{ item.defaultCause }}
+                </div>
+              </van-collapse-item>
+            </van-checkbox-group>
+          </van-collapse>
+        </van-col>
+      </van-row>
+      <van-row class="bottomdiv">
+        <van-col span="24">
+          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
+        </van-col>
+      </van-row>      
+    </van-action-sheet>
+  </div>
+</template>
+<script>
+import { deptTreeList } from '@/api/toConsult.js'
+import { drillDictionaryList,drillDictionaryBranchList } from '@/api/drillTask.js'
+import OrgTree from '@/components/orgTree'
+import { list } from '@/api/protection'
+export default {
+  name: 'SocAppIndex',
+  components: {
+    OrgTree
+  },
+  props: {
+    userList: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    dictValue: {},
+    organizationId: {
+      //机构ID
+      type: String,
+      default: JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+    },
+
+    inpitLabel: {
+      type: String,
+      default: '参演人员'
+    },
+    fieldNames: {
+      //树行配置映射项
+      type: Object,
+      default: () => {
+        return {
+          text: 'name',
+          value: 'id',
+          children: 'children'
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      activeNames: [],
+      orgId: this.organizationId || '',
+      show: false,
+      value1: '',
+      showcascader: false,
+      cascaderValue: '',
+      loading: false,
+      options: [], //机构列表
+      result: [], //人员ID集合
+      searchVal: '', //搜索值
+      peopleList: [], //人员列表
+      peopleListCpoy: [], //人员列表2
+      orgName: '' //机构名称
+    }
+  },
+  created() {},
+  mounted() {},
+
+  methods: {
+    // 弹框关闭动画
+    closedHandler() {
+      this.searchVal = ''
+    },
+    //复选框发生变化
+    changeCheckBox(list) {
+      if (list && list.length > 1) {
+        this.result = [list[list.length - 1]]
+      }
+    },
+    init() {
+      this.show = true
+      this.getpeople()
+    },
+    onLoad() {},
+    getpeople() {
+      drillDictionaryList({ orgId: this.orgId, dictValue: this.dictValue }).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          console.log(res)
+          this.peopleList = data
+          this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
+          this.peopleListCpoy.forEach(item => {
+            this.$set(item, 'checked', false)
+          })
+        }
+      })
+    },
+    initBranch() {
+      this.show = true
+      this.getBranchPeople()
+    },
+    getBranchPeople() {
+      drillDictionaryBranchList({ orgId: this.orgId, dictValue: this.dictValue }).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          console.log(res)
+          this.peopleList = data
+          this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
+          this.peopleListCpoy.forEach(item => {
+            this.$set(item, 'checked', false)
+          })
+        }
+      })
+    },
+
+    onSearch(val) {
+      this.peopleListCpoy = this.peopleList.filter(item => {
+        if (item.defaultCause.indexOf(val) != -1) {
+          return item
+        }
+      })
+    },
+    onCancel() {
+      this.searchVal = ''
+      this.peopleListCpoy = this.peopleList
+    },
+    submitHandler() {
+      let list = []
+      this.peopleListCpoy.filter(item => {
+        this.result.forEach(r => {
+          if (r == item.id) {
+            list.push(item)
+          }
+        })
+      })
+      this.show = false
+
+      // 抛出已选择人员信息
+      this.$emit('checkList', list)
+    },
+    checkedHandler(id) {
+      this.result.push(id)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.checkboxList {
+  z-index: 999;
+}
+.van-action-sheet {
+  min-height: 90%;
+}
+.btns {
+  width: 100%;
+  height: 90px;
+}
+.bottomdiv {
+  width: 100%;
+  bottom: 0%;
+  position: absolute;
+  margin-top: 20px;
+  z-index: 2000;
+  padding-bottom:calc(0 + env(safe-area-inset-bottom));
+}
+.bigsheetbox {
+  height: calc(100vh - 100px);
+}
+.line {
+  width: 100%;
+  height: 3px;
+  background-color: #1989fa;
+}
+.rowclss {
+  // margin-bottom: 100px;
+  height: calc(100vh - 180px);
+  // height: 1050px;
+  overflow: scroll;
+}
+.lddq {
+  text-align: justify;
+  white-space: pre-wrap;
+  // text-align: left;
+}
+</style>

+ 51 - 51
src/views/menu/safeCheckStatistics/index.vue

@@ -56,6 +56,7 @@
     </div>
   </div>
 </template>
+
 <script>
 import NavBar from '@/components/NavBar'
 import OrgTree from '@/components/orgTree'
@@ -78,23 +79,14 @@ export default {
   },
   data() {
     return {
-      // active: '',
       orgId: '',
-      showStatus: false, //状态显示隐藏
-      // yearColumns: [],
-      showStartMonth: false, //月份显示隐藏
-      showEndMonth: false, //月份显示隐藏
-      fieldValue: '', //状态名称
-      startMonth: newDateMonth(), //年份
-      endMonth: newDateMonth(), //年份
-      showStartSelectTimeText: this.getDayStr(new Date(), 'YYYY-MM'),
-      showEndSelectTimeText: this.getDayStr(new Date(), 'YYYY-MM'),
+      showStartMonth: false,
+      showEndMonth: false,
+      startMonth: null,
+      endMonth: null,
+      showStartSelectTimeText: '',
+      showEndSelectTimeText: '',
       yearSelect: null,
-      prop: {
-        label: 'name',
-        value: 'id'
-      },
-      loading: false,
       columns: [
         {
           field: 'index',
@@ -115,14 +107,32 @@ export default {
     }
   },
   created() {
-    this.startMonth = new Date(newDateMonth())
-    this.endMonth = new Date(newDateMonth())
+    this.initQuery();
   },
   mounted() {
     this.initData()
   },
-  computed: {},
   methods: {
+    dayjs,
+    initQuery() {
+      const now = new Date();
+      const month = now.getMonth() + 1;
+      let start, end;
+
+      if (month >= 1 && month <= 6) {
+        start = `${now.getFullYear()}-01-01`;
+        end = `${now.getFullYear()}-06-30`;
+      } else {
+        start = `${now.getFullYear()}-07-01`;
+        end = `${now.getFullYear()}-12-31`;
+      }
+
+      this.startMonth = new Date(start);
+      this.endMonth = new Date(end);
+
+      this.showStartSelectTimeText = this.getDayStr(this.startMonth, 'YYYY-MM');
+      this.showEndSelectTimeText = this.getDayStr(this.endMonth, 'YYYY-MM');
+    },
     formatter(type, val) {
       if (type === 'month') {
         return `${val}月`;
@@ -136,39 +146,32 @@ export default {
     },
     initData() {
       this.orgId = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
-
     },
-    //机构搜索
     getOrgDataList(val) {
       this.orgId = val
-
       this.getDataList()
     },
     getDataList() {
       let data = {
         orgId: this.orgId || '',
-        startTime: this.showStartSelectTimeText + '-01',
-        endTime: this.showEndSelectTimeText + '-01',
-        appSelect : 1,
+        startTime: dayjs(this.startMonth).format('YYYY-MM-DD'),
+        endTime: dayjs(this.endMonth).format('YYYY-MM-DD'),
+        appSelect: 1,
       }
 
       safeCheckReport(data).then(res => {
-        if (res.data.length > 0){
-          let arr=res.data;
-          // 将百分比字符串转换为数字
+        if (res.data.length > 0) {
+          let arr = res.data;
           arr.forEach(item => {
             item.inspectRate = parseFloat(item.inspectRate).toFixed(2);
           });
 
-          // 根据percentage字段进行降序排列
           arr.sort((a, b) => b.inspectRate - a.inspectRate);
-          // 将排序后的数字转换回带有百分比符号的字符串
           arr.forEach(item => {
             item.inspectRate = `${item.inspectRate}%`;
           });
-          // 重新赋值给dataList
           this.dataList = arr;
-        }else {
+        } else {
           this.dataList = []
         }
       })
@@ -177,40 +180,36 @@ export default {
       this.showStartMonth = false
       this.showEndMonth = false
     },
-
-    //日期格式
-    formatDate(date) {
-      return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
-    },
-    //日期选中触发
     onStartMonthConfirm(val) {
-      let st = dayjs(this.startMonth).month()+1;
-      let ed = dayjs(val).month()+1;
-      console.log("123",st,ed)
-      if (ed < st) {
-        return Toast('结束月份不能小于开始月份')
+      const startMonth = dayjs(this.startMonth).startOf('month');
+      const selectedMonth = dayjs(val).startOf('month');
+
+      if (selectedMonth.isBefore(startMonth)) {
+        return Toast('结束月份不能小于开始月份');
       }
+
       this.showStartSelectTimeText = this.getDayStr(val, 'YYYY-MM');
       this.startMonth = val;
       this.showStartMonth = false;
       this.showEndMonth = true;
     },
-    //年份选中触发
     onEndMonthConfirm(val) {
-      let st = dayjs(this.startMonth).month()+1;
-      let ed = dayjs(val).month()+1;
-      console.log("123",st,ed)
-      if (ed < st) {
-        return Toast('结束月份不能小于开始月份')
+      const startMonth = dayjs(this.startMonth).startOf('month');
+      const selectedMonth = dayjs(val).startOf('month');
+
+      if (selectedMonth.isBefore(startMonth)) {
+        return Toast('结束月份不能小于开始月份');
       }
+
       this.showEndSelectTimeText = this.getDayStr(val, 'YYYY-MM');
-      this.endMonth = val
-      this.showEndMonth = false
-      this.getDataList()
+      this.endMonth = val;
+      this.showEndMonth = false;
+      this.getDataList();
     },
   }
 }
 </script>
+
 <style lang="scss">
 .van-cell-group {
   margin-bottom: 20px;
@@ -229,6 +228,7 @@ export default {
   }
 }
 </style>
+
 <style lang="scss" scoped>
 .educationStatistics {
 }

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

@@ -73,7 +73,7 @@
                 <div :class="{'active':v.active==1}" @click.stop="changeList(v,1)">
                   <p>{{v.completed.length}}</p>
                   <p>已检查</p>
-                </div>  
+                </div>
                 </div>
               </div>
             </template>
@@ -106,6 +106,7 @@ import NavBar from '@/components/NavBar'
 import OrgTree from '@/components/orgTree'
 import Card from '@/components/card'
 import DateCell from '@/components/dateCell'
+import SearchDateCell from '@/components/dateCell/search.vue'
 import SelectCell from '@/components/selectCell'
 import SearchSelectCell from '@/components/SearchSelectCell'
 import Scroll from '@/components/scroll/scroll'
@@ -121,6 +122,7 @@ export default {
     DateCell,
     SelectCell,
     SearchSelectCell,
+    SearchDateCell,
     Scroll
   },
   data() {

+ 13 - 14
src/views/menu/training/components/selectData.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <van-action-sheet class="bigsheetbox" v-model="show" position="bottom" title="选择资料">
+    <van-dialog v-model="show" title="选择资料" width="95%" @confirm="submitHandler" show-cancel-button>
       <van-row>
         <van-col span="24">
           <!-- <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> -->
@@ -35,12 +35,7 @@
           </van-collapse>
         </van-col>
       </van-row>
-      <van-row class="bottomdiv">
-        <van-col span="24">
-          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
-        </van-col>
-      </van-row>
-    </van-action-sheet>
+    </van-dialog>
   </div>
 </template>
 <script>
@@ -167,12 +162,12 @@ export default {
     //   }
     // },
     checkedHandler(id) {
-     
+
       this.result=id
-      
+
     },
     tagHandler(i) {
-     
+
       this.openFilePreview(i)
       // const filePath = `${process.env.NODE_ENV === 'development' ? '/dev' : window.origin}${i.url}`
       // const tempLink = document.createElement('a')
@@ -192,7 +187,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 .van-action-sheet {
-  min-height: 90%;
+  min-height: 70%;
 }
 .btns {
   width: 100%;
@@ -204,15 +199,16 @@ export default {
   position: absolute;
   margin-top: 20px;
   z-index: 2000;
-
+  padding-bottom:calc(0 + env(safe-area-inset-bottom));
 }
 .rowclss{
-  height: 1050px;
+  // height: 1050px;
+  height: calc(80vh - 180px);
   overflow: scroll;
 }
 .bigsheetbox {
 
-  height: calc(100vh - 100px);
+  height: calc(80vh - 200px);
 }
 .van-field__control {
   padding-right: 20px;
@@ -228,4 +224,7 @@ export default {
     margin-top: 10px;
   }
 }
+::v-deep .van-dialog{
+  top: 50% !important;
+}
 </style>

+ 232 - 0
src/views/menu/training/components/selectData_bak.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <van-action-sheet class="bigsheetbox" v-model="show" position="bottom" title="选择资料">
+      <van-row>
+        <van-col span="24">
+          <!-- <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> -->
+          <form action="/">
+
+            <van-search v-model="searchVal" placeholder="请输入搜索关键词" clearable @input="onSearch" />
+          </form>
+        </van-col>
+      </van-row>
+
+      <van-row class="rowclss">
+        <van-col span="24">
+          <van-collapse v-model="activeNames" @change="checkedHandler">
+            <van-checkbox-group v-model="result" >
+              <van-collapse-item
+                v-for="item in peopleListCpoy"
+                :name="item.id"
+                :key="item.id"
+                :title="`${item.title}-(${item.orgName})`"
+              >
+                <!-- :title="item.defaultCause" -->
+                <template #right-icon>
+                  <van-checkbox :name="item.id" > </van-checkbox>
+                </template>
+                <van-row>
+                  <van-col class="colCls" span="24" v-for="i in item.fileList" :key="i.name">
+                    <van-tag type="primary" class="tagCls" plain @click="tagHandler(i)">{{ i.name }}</van-tag>
+                  </van-col>
+                </van-row>
+              </van-collapse-item>
+            </van-checkbox-group>
+          </van-collapse>
+        </van-col>
+      </van-row>
+      <van-row class="bottomdiv">
+        <van-col span="24">
+          <van-button class="btns" size="large" type="info" @click="submitHandler">确定</van-button>
+        </van-col>
+      </van-row>
+    </van-action-sheet>
+  </div>
+</template>
+<script>
+import { deptTreeList } from '@/api/toConsult.js'
+import { materialsFileList } from '@/api/training.js'
+import OrgTree from '@/components/orgTree'
+import { Toast } from 'vant'
+export default {
+  name: 'SocAppIndex',
+  components: {
+    OrgTree
+  },
+
+  props: {
+    organizationId: {
+      //机构ID
+    },
+    //培训资料数量
+    listLength: {
+      type: Number
+    }
+  },
+  data() {
+    return {
+      activeNames: [],
+      result: [],
+      orgId: this.organizationId || '',
+      show: false,
+      value1: '',
+      showcascader: false,
+      cascaderValue: '',
+      loading: false,
+      options: [], //机构列表
+      peoplesId: [], //资料ID集合
+      searchVal: '', //搜索值
+      peopleList: [], //资料列表
+      peopleListCpoy: [], //资料列表2
+      orgName: '', //机构名称
+      peoples: '' //资料列表
+    }
+  },
+  watch: {
+    organizationId(val) {
+      this.orgId = val + ''
+      this.getSelectData()
+    },
+    //监听弹框是否打开
+    show(val) {
+      if (val) {
+        this.getSelectData()
+      }
+    },
+    //监听资料数组变化
+    userList(val) {
+      this.peoplesId = []
+      this.$set(this.$data, 'peoples', val.map(item => item.userName).join(','))
+
+      val.map(item => {
+        this.peoplesId.push(item.userId)
+      })
+    }
+  },
+
+  created() {},
+  mounted() {},
+
+  methods: {
+    onLoad() {},
+    //获取资料
+    getSelectData() {
+      materialsFileList({ orgId: this.orgId, pageNum: 1, pageSize: 100000 }).then(res => {
+        let { code, rows, msg } = res
+        if (code == 200) {
+          rows.forEach(item => {
+            if (item.fileList && item.fileList.length > 0) {
+              item.fileList = item.fileList.map(i => {
+                i = JSON.parse(i)
+                return i
+              })
+            }
+          })
+
+          this.peopleList = rows
+          this.peopleListCpoy = JSON.parse(JSON.stringify(rows))
+        }
+      })
+    },
+
+    onSearch(val) {
+      this.peopleListCpoy = this.peopleList.filter(item => {
+        if (item.title.indexOf(val) != -1 || item.orgName.indexOf(val) != -1) {
+          return item
+        }
+      })
+    },
+
+    onCancel() {
+      this.searchVal = ''
+      this.peopleListCpoy = this.peopleList
+    },
+    submitHandler() {
+      let list = []
+      this.peopleListCpoy.filter(item => {
+        this.result.forEach(r => {
+          if (r == item.id) {
+            list.push(...item.fileList)
+          }
+        })
+      })
+
+      // this.peoples = list.map(item => item.name).join(',')
+      if (list.length + this.listLength > 5) {
+        return Toast('资料附件数量不能超过5个,请修改!')
+      }
+      this.$set(this.$data, 'peoples', list.map(item => item.name).join(','))
+      // 抛出已选择资料信息
+      this.$emit('dataList', list)
+      this.show = false
+    },
+    //复选框单选
+    // changeCheckBox(list) {
+    //   if (list && list.length > 1) {
+    //     this.result = [list[list.length - 1]]
+    //   }
+    // },
+    checkedHandler(id) {
+     
+      this.result=id
+      
+    },
+    tagHandler(i) {
+     
+      this.openFilePreview(i)
+      // const filePath = `${process.env.NODE_ENV === 'development' ? '/dev' : window.origin}${i.url}`
+      // const tempLink = document.createElement('a')
+      // tempLink.style.display = 'none'
+      // tempLink.href = filePath
+      // tempLink.setAttribute('download', i.name)
+      // tempLink.setAttribute('target', '_blank')
+      // document.body.appendChild(tempLink)
+      // tempLink.click()
+      // document.body.removeChild(tempLink)
+    },
+    clickHandler() {
+      console.log('哈哈哈哈')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.van-action-sheet {
+  min-height: 90%;
+}
+.btns {
+  width: 100%;
+  height: 90px;
+}
+.bottomdiv {
+  width: 100%;
+  bottom: 0%;
+  position: absolute;
+  margin-top: 20px;
+  z-index: 2000;
+  padding-bottom:calc(0 + env(safe-area-inset-bottom));
+}
+.rowclss{
+  // height: 1050px;
+  height: calc(100vh - 180px);
+  overflow: scroll;
+}
+.bigsheetbox {
+
+  height: calc(100vh - 100px);
+}
+.van-field__control {
+  padding-right: 20px;
+}
+.line {
+  width: 100%;
+  height: 3px;
+  background-color: #1989fa;
+}
+.colCls {
+  display: flex;
+  .tagCls {
+    margin-top: 10px;
+  }
+}
+</style>

+ 1 - 1
src/views/menu/visitCheck/detail.vue

@@ -57,7 +57,7 @@
             <img :src="imgUrl(v.imgFile[0])" alt="">
           </div>
           <div class="card-cell-box">
-            <van-cell title="所在单位" :value="v.companyName"></van-cell>
+            <van-cell title="申请单位" :value="v.companyName"></van-cell>
             <van-cell title="出入人员" :value="v.userName"></van-cell>
             <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="v.idCard"></van-cell>

+ 2 - 2
src/views/menu/visitRecord/add.vue

@@ -57,7 +57,7 @@
               placeholder="请输入人员姓名"
               label="陪同人员"></van-field>
             <div class="upload-box" >
-              <span class="required">核验结果</span>
+              <span class="required">联网核查结果</span>
               <van-cell>
                 <uploader :maxCount="2" v-model="formData.checkImage"/>
               </van-cell>
@@ -344,7 +344,7 @@ export default {
   >span{
     display: inline-block;
     height: 160px;
-    width: 200px;
+    width: 250px;
     line-height: 160px;
     font-size: 28px;
     color:#999;

+ 8 - 8
src/views/menu/visitRecord/detail.vue

@@ -12,7 +12,7 @@
             <van-cell title="出入人员" :value="selectedUser.userName"></van-cell>
             <van-cell title="介绍信类型" :value="getDictLabel(selectedUser.letterType,'out_in_type')"></van-cell>
             <van-cell title="出入事由" :value="selectedUser.letterReasons"></van-cell>
-            <van-cell title="所在单位" :value="selectedUser.companyName"></van-cell>
+            <van-cell title="申请单位" :value="selectedUser.companyName"></van-cell>
             <van-cell title="证件类型" :value="getDictLabel(selectedUser.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="selectedUser.idCard"></van-cell>
             <div class="upload-box" v-if="selectedUser.imgFile && selectedUser.imgFile.length > 0">
@@ -42,7 +42,7 @@
             </div>
 
             <div class="upload-box" v-if="selectedUser.checkImage && selectedUser.checkImage.length > 0">
-              <span>核验结果</span>
+              <span>联网核查结果</span>
               <van-cell >
                 <div
                   class="nfc-img van-hairline--surround"
@@ -54,7 +54,7 @@
               </van-cell>
             </div>
             <div class="upload-box" v-if="canRecord() && !selectedUser.departureTime && !selectedUser.checkImage">
-              <span class="required">核验结果</span>
+              <span class="required">联网核查结果</span>
               <van-cell>
                 <uploader :maxCount="2" v-model="formData.checkImage"/>
               </van-cell>
@@ -83,11 +83,11 @@
                 </div>
               </van-cell>
             </div>
-            <date-cell v-if="canRecord() && !selectedUser.arrivalTime" required title="进入时间" :max-date="maxData" :min-date='minDate' :is-row="true"  v-model="formData.arrivalTime" date-type="datetime" />
-            <date-cell v-if="canRecord() && selectedUser.arrivalTime && !selectedUser.departureTime" required title="离开时间" :max-date="maxData" :min-date='minDate' :is-row="true"  v-model="formData.departureTime" date-type="datetime" />
+            <date-cell v-if="canRecord() && !selectedUser.arrivalTime" required title="进入时间" :max-date="maxDate" :min-date='minDate' :is-row="true"  v-model="formData.arrivalTime" date-type="datetime" />
+            <date-cell v-if="canRecord() && selectedUser.arrivalTime && !selectedUser.departureTime" required title="离开时间" :max-date.sync="maxDate" :updateMaxDateNow="true" :min-date='minDate' :is-row="true"  v-model="formData.departureTime" date-type="datetime" />
           </div>
 
-          <van-action-sheet v-model="showSign" title="签名" class="sheet">
+          <van-action-sheet v-model="showSign" title="安全员签名" class="sheet">
             <writingPad ref="esign" :old-signature-seal="oldSignatureSeal" @resultImg="resultImg" @cancelSign="cancelSign"></writingPad>
           </van-action-sheet>
           <div v-if="canRecord() &&!selectedUser.departureTime" class="big-btn-box" >
@@ -122,7 +122,7 @@ export default {
   components: {Uploader, DateCell,writingPad,imgCom},
   data(){
     return {
-      maxData:new Date(),
+      maxDate:new Date(),
       minDate:null,
       visitId:null,
       userList:[],
@@ -404,7 +404,7 @@ export default {
   >span{
     display: inline-block;
     height: 160px;
-    width: 200px;
+    width: 250px;
     line-height: 160px;
     font-size: 28px;
     color:#999;

+ 15 - 5
src/views/menu/visitRegister/add.vue

@@ -6,7 +6,7 @@
       <div class="card">
         <van-panel >
           <template #header>
-            <van-cell title="申请信息"></van-cell>
+            <van-cell title="介绍信信息"></van-cell>
           </template>
           <div class="panel-box">
             <select-cell
@@ -63,7 +63,7 @@
             <div class="upload-box">
               <span :class="{'required':visitType == 2}">上传介绍信</span>
               <van-cell>
-                <uploader :maxCount="1" v-model="formData.letterFile"/>
+                <uploader :maxCount="5" v-model="formData.letterFile"/>
               </van-cell>
             </div>
             <van-field
@@ -94,7 +94,7 @@
              <img :src="imgUrl(v.imgFile[0].imgPath)" alt="">
            </div>
            <div class="card-cell-box">
-            <van-cell title="所在单位" :value="v.companyName"></van-cell>
+            <van-cell title="申请单位" :value="v.companyName"></van-cell>
             <van-cell title="出入人员" :value="v.userName"></van-cell>
             <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="v.idCard"></van-cell>
@@ -110,7 +110,7 @@
       </div>
 
       <div class="big-btn-box" >
-        <van-button  type="info" size="large" @click="onSubmit">提交申请</van-button>
+        <van-button  type="info" size="large" @click="onSubmit">提交</van-button>
       </div>
     </div>
 <!--    <van-calendar-->
@@ -150,7 +150,7 @@
                 rows="1"
                 autosize
                 :maxlength="20"
-                label="所在单位"
+                label="申请单位"
                 :rules="[{ pattern:/^(.+)$/, message: '请输入' }]"
                 placeholder="请输入"/>
             <van-field
@@ -337,6 +337,16 @@ export default {
             return;
           }
         }
+
+        //判断介绍信是否过期
+        const inputDate = dayjs(this.formData.startTime);
+        const newDate = inputDate.add(this.formData.effectiveDays,'day').startOf('day');
+        const currentDate = dayjs();
+        if (!dayjs(newDate).isAfter(dayjs(currentDate))){
+          this.$toast("介绍信已过有效期,请重新选择开具日期或有效天数!");
+          return;
+        }
+
         this.formData.status = 1;
         this.formData.type = this.visitType;
         this.formData.receptionOrgIds = [this.orgId];

+ 1 - 1
src/views/menu/visitRegister/addOutInRequest.vue

@@ -44,7 +44,7 @@
             <img :src="imgUrl(v.imgFile[0])" alt="">
           </div>
           <div class="card-cell-box">
-            <van-cell title="所在单位" :value="v.companyName"></van-cell>
+            <van-cell title="申请单位" :value="v.companyName"></van-cell>
             <van-cell title="出入人员" :value="v.userName"></van-cell>
             <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
             <van-cell title="证件号码" :value="v.idCard"></van-cell>

+ 1 - 1
src/views/menu/visitRegister/detail.vue

@@ -45,7 +45,7 @@
              <img :src="imgUrl(v.imgFile[0])" alt="">
            </div>
            <div class="card-cell-box">
-             <van-cell title="所在单位" :value="v.companyName"></van-cell>
+             <van-cell title="申请单位" :value="v.companyName"></van-cell>
              <van-cell title="出入人员" :value="v.userName"></van-cell>
              <van-cell title="证件类型" :value="getDictLabel(v.idType,'letter_id_type')"></van-cell>
              <van-cell title="证件号码" :value="v.idCard"></van-cell>

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

@@ -30,7 +30,7 @@
                     <span v-if="v.status==2" :style="{color:getState(getDictLabel(v.status,'letter_status'))}">
                       {{getDictLabel(v.status,'letter_status') }}
                     </span>
-                   <van-button v-if="v.status==1" @click.stop="clickItem(v.id,true)" type="info" size="mini">出入申请</van-button>
+                   <van-button v-if="v.status==1" @click.stop="clickItem(v.id,true)" type="info" size="mini">提交出入申请</van-button>
                   </template>
               </van-cell>
               <van-cell :border="false" @click="clickItem(v.id)">