ソースを参照

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.5

coys 1 年間 前
コミット
b391c312f7

+ 10 - 9
src/components/Calendar/index.vue

@@ -25,7 +25,7 @@ export default {
     orgId: null,
   },
   data() {
-    let date = dayjs().subtract(1, 'day').format('YYYY-MM-DD');
+    let date = new Date();
     return {
       legend:[
         // {
@@ -52,13 +52,13 @@ export default {
       }
     };
   },
-  computed:{
-    disabledDate(time) {
-      const date = new Date();
-      date.setTime(date.getTime()- 3600 * 1000 * 24 );
-      return time.getTime() < date;
-    },
-  },
+  // computed:{
+  //   disabledDate(time) {
+  //     const date = new Date();
+  //     date.setTime(date.getTime()- 3600 * 1000 * 24 );
+  //     return time.getTime() < date;
+  //   },
+  // },
   watch:{
     //监听机构id初始化
     orgId:{
@@ -122,6 +122,7 @@ export default {
               color: v.isEnable == 1 ? 'green' : v.isEnable == 0 ? 'yellow' : v.isEnable == null ? 'red' : 'indigo',
               fillMode: 'outline',
             },
+            dot:dayjs(v.ymdDate).format('YYYY-MM-DD') === dayjs(new Date()).format('YYYY-MM-DD'),
             dates: dayjs(v.ymdDate).format('YYYY-MM-DD'),
           }
         });
@@ -135,7 +136,7 @@ export default {
       day.attributes.forEach(v=>{
         if(v.key != 'select-drag'){
           dayInfo = JSON.parse(JSON.stringify(v.customData));
-          dayInfo.isDisabled = !!day.isDisabled;
+          dayInfo.isDisabled = !!day.isDisabled;  //转换布尔值
         }
       })
       this.$emit('change',dayInfo)

+ 4 - 4
src/components/OrgPicker/index.vue

@@ -18,7 +18,7 @@
       <div class="lists">
         <tree
           v-bind="$attrs"
-          :data="commonTree"
+          :data="orgTree"
           v-model='selected'
           :filter="searchValue"
           :options="options"
@@ -66,16 +66,16 @@ export default {
         keyboardNavigation:false,
         deletion: false,
         propertyNames:{
-          text:'name'
+          text:'shortName'
         }
       }
     }
   },
   computed:{
-    ...mapGetters(['commonTree']),
+    ...mapGetters(['orgTree']),
   },
   created() {
-    this.$store.dispatch('getCommonTree')
+    this.$store.dispatch('getOrgTree')
   },
   methods:{
     clickOverlay(){

+ 4 - 1
src/components/TabBar.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <van-tabbar route v-model="active" @change="handleChange">
-      <van-tabbar-item v-for="(item, index) in data" :to="item.to" :icon="item.icon" :key="index">
+      <van-tabbar-item v-for="(item, index) in data" :dot="item.dot" :to="item.to" :icon="item.icon" :key="index">
         {{ item.title }}
       </van-tabbar-item>
     </van-tabbar>
@@ -27,6 +27,9 @@ export default {
       active: this.defaultActive
     }
   },
+  mounted() {
+
+  },
   methods: {
     handleChange(value) {
       this.$emit('change', value)

+ 4 - 128
src/components/TopBar.vue

@@ -19,118 +19,19 @@
       </div>
     </div>
 
-  <!--  天气消息  -->
-    <div v-if="showNotice" class="notice-box">
-      <div>
-        <van-notice-bar v-if="lists.length > 0" left-icon="volume-o" mode="closeable"  :color="color" :background="background">
-          <van-swipe
-            @change="onChange"
-            vertical
-            class="notice-swipe"
-            :autoplay="8000"
-            :show-indicators="false">
-            <van-swipe-item v-for="item in lists" :key="item.id" @click="clickHandler(item)" >
-              {{item.alarmTitle}}
-            </van-swipe-item>
-          </van-swipe>
-        </van-notice-bar>
-      </div>
-    </div>
-
-    <!-- 弹窗 -->
-    <van-dialog v-model="show" title="标题" :message="info.alarmContent" messageAlign="left">
-      <template #title>
-        <p class="dialog-title" :style="{color:background}">{{info.alarmTitle}}</p>
-      </template>
-    </van-dialog>
-
-
-<!--    &lt;!&ndash; 天气预警 &ndash;&gt;-->
-<!--    <van-swipe v-if="list.length > 0" style="height: 50px" vertical autoplay="2000">-->
-<!--      <van-swipe-item v-for="item in list" :key="item.id" @click="clickHandler(item)">-->
-<!--        <div class="color" :style="{ color: item.bgc, backgroundColor: '#fff' }">-->
-<!--          <van-icon name="warn-o" /> {{ item.alarmTitle }}-->
-<!--        </div>-->
-<!--      </van-swipe-item>-->
-
-<!--      <template #indicator>-->
-<!--        <div class="custom-indicator"></div>-->
-<!--      </template>-->
-<!--    </van-swipe>-->
   </div>
 </template>
 <script>
-import { Icon } from 'vant'
 import { mapGetters } from 'vuex'
-import { logout, getTheAreaWeather } from '@/api/public'
+import { logout } from '@/api/public'
 export default {
-  components: {
-    [Icon.name]: Icon
-  },
-  props:{
-    showNotice:{
-      type:Boolean,
-      default:true
-    },
-  },
   data() {
-    return {
-      show: false,
-      info: '',
-      lists:[],
-      active: this.defaultActive,
-      color: '#ecf9ff',
-      background: 'rgba(78,162,248,0.63)'
-    }
-  },
-  mounted() {
-    this.getList();
+    return {}
   },
   computed: {
     ...mapGetters(['userName', 'orgName','roleList', 'orgId']),
   },
   methods: {
-    //获取天气数据
-    getList() {
-      if(!this.orgId)return [];
-      getTheAreaWeather(this.orgId).then(res => {
-        this.lists = res.data || [];
-        // let str = {
-        //   alarmContent:"周宁县气象台2023年12月13日10时27分继续发布大雾黄色预警信号:预计未来12小时,我县部分乡镇将出现能见度小于500米的雾。请注意防范!(预警信息来源:国家预警信息发布中心)",
-        //   alarmLevel:"黄色",
-        //   alarmTime:"2023-12-13 14:00:10",
-        //   alarmTitle:"周宁县气象台2023年12月13日10时27分继续发布大雾黄色预警信号",
-        //   alarmType:"大雾",
-        //   area:"周宁",
-        //   city:"宁德",
-        //   code:"101230305",
-        //   createTime:"2023-12-13 10:27:00",
-        //   id:"8",
-        //   province:"福建"
-        // }
-        // this.lists.push(str)
-      })
-    },
-    onChange(index){
-      let alarmLevel = this.list[index].alarmLevel;
-      switch (alarmLevel){
-        case '蓝色':
-          this.background = 'rgba(78,162,248,0.62)';
-          //this.color = '#fff';
-          break;
-        case '黄色':
-          this.background = 'rgba(238,227,103,0.63)';
-          //this.color = '#fff';
-          break;
-        case '橙色':
-          this.background = 'rgba(246,181,104,0.62)';
-          //this.color = '#fff';
-          break;
-        case '红色':
-          this.background = 'rgba(239,70,74,0.65)';
-          //this.color = '#fff';
-      }
-    },
     clickOutLogin() {
       logout().then(res => {
         sessionStorage.clear();
@@ -138,27 +39,10 @@ export default {
         this.$toast('退出登录');
       })
     },
-    clickHandler(item) {
-      console.log(121212)
-      this.info = item;
-      this.show = true;
-    },
   }
 }
 </script>
-<style lang="scss">
-.van-notice-bar{
-  line-height:60px;
-  height: 60px;
-}
-.notice-swipe {
-  height: 30px;
-  line-height: 30px;
-}
-.van-swipe-item{
-  text-shadow: 0 0 3px #888;
-}
-</style>
+
 <style scoped lang="scss">
 .top-bar-box{
   position: relative;
@@ -176,9 +60,7 @@ export default {
     width: 100%;
   }
 }
-.dialog-title{
-  padding: 0 30px;
-}
+
 .top-box {
   display: flex;
   justify-content: space-between;
@@ -187,12 +69,6 @@ export default {
     font-size: 40px;
   }
 }
-.notice-box{
-  width: 100%;
-  position: absolute;
-  bottom: -80;
-  z-index: 1000;
-}
 .bottom-box {
   padding-top: 30px;
   > div {

+ 41 - 19
src/components/orgTree/index.vue

@@ -1,22 +1,29 @@
 <template>
   <div class="orgTree van-hairline--bottom">
-   
-    <tree-select
-      :addendToBody="true"
-      @input="onInput"
-      @select="onSelect"
-      v-model="selected"
-      :options="isHangsheTree? orgTreeHangshe:orgTree"
-      :clearable="clearable"
-      label='检查机构'
-      :backspaceRemoves="false"
-      :placeholder="placeholder"
-      :normalizer="tenantIdnormalizer"
-      :show-count="true"
-      :noChildrenText="''"
-      noResultsText="暂无符合条件的数据">
-    </tree-select>
-    <!-- <van-checkbox v-model="checked" shape="square">复选框</van-checkbox> -->
+    <van-row >
+      <van-col  :span="showChecked?18:24">
+        <tree-select
+          :addendToBody="true"
+          @input="onInput"
+          @select="onSelect"
+          v-model="selected"
+          :options="isHangsheTree? orgTreeHangshe:orgTree"
+          :clearable="clearable"
+          label='检查机构'
+          :backspaceRemoves="false"
+          :placeholder="placeholder"
+          :normalizer="tenantIdnormalizer"
+          :show-count="true"
+          :noChildrenText="''"
+          noResultsText="暂无符合条件的数据">
+        </tree-select>
+      </van-col>
+      <van-col v-if="showChecked" span="6">
+        <div class="check-box">
+          <van-checkbox v-model="checked" shape="square" @change="changeChecked">显示下级</van-checkbox>
+        </div>
+      </van-col>
+    </van-row>
   </div>
 </template>
 <script>
@@ -50,6 +57,10 @@ export default  {
     clearable:{
       type:Boolean,
       default:false
+    },
+    showChecked:{
+      type:Boolean,
+      default:false
     }
   },
   data() {
@@ -60,7 +71,7 @@ export default  {
     }
   },
   // mounted(){
- 
+
   //   this.treeData=isHangsheTree? this.orgTreeHangshe:this.orgTree
   // },
   computed: {
@@ -90,6 +101,9 @@ export default  {
         children: node.children
       }
     },
+    changeChecked(checked){
+      this.$emit('checked', checked);
+    },
     onInput(value){
       this.$emit('change', value);
     },
@@ -111,7 +125,12 @@ export default  {
     width: 22px;
     height: 22px;
   }
-
+  .check-box{
+    height: 90px;
+    display: flex;
+    align-items: center;
+    background-color: #fff;
+  }
   .vue-treeselect__control {
     width: 100%;
     height: 90px;
@@ -153,5 +172,8 @@ export default  {
     border-color: #fff;
     box-shadow: none;
   }
+  .van-checkbox__label {
+    line-height: initial;
+  }
 }
 </style>

+ 152 - 0
src/components/weatherBox/index.vue

@@ -0,0 +1,152 @@
+<template>
+  <div>
+    <!--  天气消息  -->
+    <div v-if="showNotice" class="notice-box">
+      <div>
+        <van-notice-bar v-if="lists.length > 0" left-icon="volume-o" mode="closeable"  :color="color" :background="background">
+          <van-swipe
+            @change="changeColor"
+            vertical
+            class="notice-swipe"
+            :autoplay="8000"
+            :show-indicators="false">
+            <van-swipe-item v-for="item in lists" :key="item.id" @click="clickHandler(item)" >
+              {{item.alarmTitle}}
+            </van-swipe-item>
+          </van-swipe>
+        </van-notice-bar>
+      </div>
+    </div>
+
+    <!-- 弹窗 -->
+    <van-dialog v-model="show" title="标题" :message="info.alarmContent" messageAlign="left">
+      <template #title>
+        <p class="dialog-title" :style="{color:info.color}">
+          {{info.alarmTitle}}
+        </p>
+      </template>
+    </van-dialog>
+
+  </div>
+</template>
+
+<script >
+import { mapGetters } from 'vuex'
+import { getTheAreaWeather } from '@/api/public'
+export default {
+  props:{
+    showNotice:{
+      type:Boolean,
+      default:true
+    },
+  },
+  data() {
+    return {
+      show: false,
+      info: '',
+      lists:[],
+      active: this.defaultActive,
+      color: '#ecf9ff',
+      background: null
+    }
+  },
+  mounted() {
+    this.getList();
+  },
+  computed: {
+    ...mapGetters(['orgId']),
+  },
+  methods: {
+    //获取天气数据
+    getList() {
+      if(!this.orgId)return [];
+      getTheAreaWeather(this.orgId).then(res => {
+        this.lists = res.data || [];
+        //模拟数据
+        // let str = [
+        //   {
+        //     alarmContent:"周宁县气象台2023年12月13日10时27分继续发布大雾黄色预警信号:预计未来12小时,我县部分乡镇将出现能见度小于500米的雾。请注意防范!(预警信息来源:国家预警信息发布中心)",
+        //     alarmLevel:"黄色",
+        //     alarmTime:"2023-12-13 14:00:10",
+        //     alarmTitle:"周宁县气象台2023年12月13日10时27分继续发布大雾黄色预警信号",
+        //     alarmType:"大雾",
+        //     area:"周宁",
+        //     city:"宁德",
+        //     code:"101230305",
+        //     createTime:"2023-12-13 10:27:00",
+        //     id:"8",
+        //     province:"福建"
+        //   },
+        //   {
+        //     alarmContent:"YY县气象台2023年12月13日10时27分继续发布大雾黄色预警信号:预计未来12小时,我县部分乡镇将出现能见度小于500米的雾。请注意防范!(预警信息来源:国家预警信息发布中心)",
+        //     alarmLevel:"红色",
+        //     alarmTime:"2023-12-13 14:00:10",
+        //     alarmTitle:"YY县气象台2023年12月13日10时27分继续发布大雾黄色预警信号",
+        //     alarmType:"大雾",
+        //     area:"周宁",
+        //     city:"宁德",
+        //     code:"101230305",
+        //     createTime:"2023-12-13 10:27:00",
+        //     id:"9",
+        //     province:"福建"
+        //   },
+        // ]
+        //this.lists = str;
+        this.changeColor(0);
+      })
+    },
+    changeColor(index){
+      console.log(this.lists,'alarmLevel')
+      let alarmLevel = this.lists[index].alarmLevel;
+      switch (alarmLevel){
+        case '蓝色':
+          this.background = 'rgba(78,162,248,0.62)';
+          //this.color = '#fff';
+          break;
+        case '黄色':
+          this.background = 'rgba(238,227,103,0.63)';
+          //this.color = '#fdb0b1';
+          break;
+        case '橙色':
+          this.background = 'rgba(246,181,104,0.62)';
+          //this.color = '#fff';
+          break;
+        case '红色':
+          this.background = 'rgba(239,70,74,0.65)';
+        //this.color = '#fff';
+      }
+    },
+    clickHandler(item) {
+      this.info = item;
+      this.info.color = this.background;
+      this.show = true;
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.van-notice-bar{
+  line-height:60px;
+  height: 60px;
+}
+.notice-swipe {
+  height: 30px;
+  line-height: 30px;
+}
+.van-swipe-item{
+  text-shadow: 0 0 3px #888;
+}
+</style>
+<style scoped lang="scss">
+
+.dialog-title{
+  padding: 0 30px;
+}
+.notice-box{
+  width: 100%;
+  position: absolute;
+  bottom: -80;
+  z-index: 1000;
+}
+</style>

+ 10 - 2
src/views/home/isMy.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="about-container">
     <top-bar></top-bar>
+    <div  class="item-list">
+
+    </div>
   </div>
 </template>
 
@@ -23,9 +26,14 @@ export default {
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .about-container {
   /* 你的命名空间 */
-
+  .item-list {
+    -padding: 30px 0 0 0;
+    height: calc(100vh - 400px);
+    overflow: auto;
+    border:1px solid red;
+  }
 }
 </style>

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

@@ -1,8 +1,7 @@
 <template>
   <div class="index-container">
-    
     <nav-bar :leftArrow="false"></nav-bar>
-
+    <weather-box></weather-box>
     <!-- 步骤条 -->
     <van-tabs class="tab-tabs" color="#008cd6" @click="tabClickHandler" v-if="workList && workList.length > 0">
       <van-tab
@@ -78,6 +77,7 @@
 <script>
 import scandialog from '@/components/nfcPopup/alone.vue'
 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'
@@ -85,7 +85,7 @@ import { upload } from '@/api/public'
 import { getPanelList } from '@/api/drillTask.js'
 export default {
   name: 'works',
-  components: { TopBar, scandialog },
+  components: { TopBar, scandialog ,WeatherBox},
   data() {
     return {
       big_box: 'big_box',
@@ -205,7 +205,7 @@ export default {
           str = '/lfsp'
           strName = '待审批'
           path = '/visitCheck'
-          pathInfo = '/visitCheckDetail?id=' + id 
+          pathInfo = '/visitCheckDetail?id=' + id
           break
       }
 
@@ -251,7 +251,7 @@ export default {
           strName = '待整改'
         } else if (val == 9 && taskType == 1) {
           strName = '待审批'
-        } 
+        }
         return strName
       } else if (type == 3) {
         //返回列表路径
@@ -264,12 +264,12 @@ export default {
           strName = '待审批'
           // pathInfo = '/consultInfo/' + id + '_1'
           pathInfo = '/problemDetail?id=' + id + '&type=confirmDissent'
-          
+
         }
         if (val == 9 && taskType == 10) {
           strName = '待整改'
           pathInfo = '/problemDetail?id=' + id + '&type=reform'
-        
+
         }
         //监控调阅
         if (val == 3 && taskType == 1) {
@@ -400,8 +400,8 @@ export default {
 }
 .cellMargin {
   margin: 20px;
-  margin-top: 0px;
-  height: calc(100vh - 380px);
+  -margin-top: 0px;
+  height: calc(100vh - 376px);
   box-shadow: 0 1px 4px #ccc;
   background-color: #fff;
   overflow-y: scroll;

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

@@ -254,7 +254,7 @@ export default {
   display: none;
   &.active{
     display: block;
-    background-color: #03a5ff;
+    background-color: #D7000F;
   }
 }
 .message-detail{

+ 3 - 2
src/views/menu/problemItem/detail.vue

@@ -296,7 +296,7 @@
       <div class="card edit-panel" v-if="type === 'reform'">
         <van-panel title="整改情况">
           <div class="panel-box">
-            <date-cell required :max-date="maxDate" is-row title="整改日期" v-model="reformData.reformDate" dateType="date" />
+            <date-cell required :min-date="dayjs(taskInfo.submitTime).toDate()" :max-date="maxDate" is-row title="整改日期" v-model="reformData.reformDate" dateType="date" />
             <van-field
               required
               v-model="reformData.description"
@@ -331,6 +331,7 @@ import {formatDate} from "@/filters/filter";
 import { ImagePreview } from 'vant';
 import {mapGetters} from "vuex";
 import {imgUrl} from "@/utils";
+import dayjs from "dayjs";
 export default {
   components:{NavBar,SelectCell,DateCell,Uploader},
   data(){
@@ -368,7 +369,7 @@ export default {
     ...mapGetters(['orgId','id','dictionary'])
   },
   methods:{
-    formatDate,
+    dayjs,formatDate,
     getState(state){
       switch (state){
         case '待整改':

+ 3 - 2
src/views/menu/problemItem/edit.vue

@@ -154,7 +154,7 @@
       <div class="card" v-if="type === 'reform'">
         <van-panel title="整改情况">
           <div class="panel-box">
-            <date-cell required :max-date="maxDate" is-row title="整改日期" v-model="reformData.reformDate" dateType="date" />
+            <date-cell required :min-date="dayjs(taskInfo.submitTime).toDate()" :max-date="maxDate" is-row title="整改日期" v-model="reformData.reformDate" dateType="date" />
             <van-field
               required
               v-model="reformData.description"
@@ -189,6 +189,7 @@ import {formatDate} from "@/filters/filter";
 import { ImagePreview } from 'vant';
 import {mapGetters} from "vuex";
 import {imgUrl} from "@/utils";
+import dayjs from "dayjs";
 export default {
   components:{NavBar,SelectCell,DateCell,Uploader},
   data(){
@@ -226,7 +227,7 @@ export default {
     ...mapGetters(['orgId','id','dictionary'])
   },
   methods:{
-    formatDate,
+    dayjs,formatDate,
     getState(state){
       switch (state){
         case '待整改':

+ 5 - 1
src/views/menu/problemItem/index.vue

@@ -3,7 +3,7 @@
     <NavBar />
     <div class="page-container">
       <van-search v-model="query.searchKey" class="van-hairline--bottom" placeholder="请输入搜索关键词" @search="refreshData" />
-      <org-tree v-model="query.orgId"  @change="refreshData"></org-tree>
+      <org-tree v-model="query.orgId"  @change="refreshData" showChecked @checked="checked"></org-tree>
       <div class="search-flex">
         <select-cell
           style="border-right: 1px solid #f5f5f5;"
@@ -162,6 +162,10 @@ export default {
           return '#D7000F';
       }
     },
+    checked(checked){
+      this.query.checkSub = checked;
+      this.refreshData();
+    },
     refreshData(){
       this.pullup = true;
       this.query.pageNum = 1;

+ 23 - 10
src/views/menu/visitCheck/detail.vue

@@ -116,15 +116,28 @@ export default {
         }
         visitCheck(data).then(res=>{
           this.$toast('操作成功');
-          this.$router.replace({
-            name:'visitCheck',
-            path:'/visitCheck',
-            params:{event:'refresh'}
-          });
+          this.toPagesFcn();
+        }).catch(error=>{
+          if( error === '任务已完成'){
+            this.toPagesFcn();
+          }
         })
       }
       this.showInput = true;
     },
+    //页面跳转逻辑
+    toPagesFcn(){
+      this.getRouter();
+      if(this.fromPage.name === "works"){
+        this.$router.go(-1)
+      }else {
+        this.$router.replace({
+          name:'visitCheck',
+          path:'/visitCheck',
+          params:{event:'refresh'}
+        });
+      }
+    },
     // 同意
     accredit(){
       let data = {
@@ -133,11 +146,11 @@ export default {
       }
       visitCheck(data).then(res=>{
         this.$toast('操作成功');
-        this.$router.replace({
-          name:'visitCheck',
-          path:'/visitCheck',
-          params:{event:'refresh'}
-        });
+        this.toPagesFcn();
+      }).catch(error=>{
+        if( error === '任务已完成'){
+          this.toPagesFcn();
+        }
       })
     },
     getState(state){