Răsfoiți Sursa

重写履职执行

gaoxiong 2 ani în urmă
părinte
comite
0b2d6ced58

+ 12 - 0
src/router/router.config.js

@@ -238,6 +238,18 @@ export let routers = [
         component: () => import('@/views/menu/message/index'),
         meta: { title: '消息中心', keepAlive: false }
       },
+      {
+        path: '/resumption',
+        name: 'resumption',
+        component: () => import('@/views/menu/resumption/list.vue'),
+        meta: { title: '履职任务', keepAlive: false }
+      },
+      {
+        path: '/resumption_detail',
+        name: 'resumption_detail',
+        component: () => import('@/views/menu/resumption/detail.vue'),
+        meta: { title: '履职登记', keepAlive: false ,hideTabBar:true}
+      },
     ],
   },
 ]

+ 25 - 0
src/views/menu/resumption/api.js

@@ -0,0 +1,25 @@
+import request from "@/utils/request";
+
+export function taskDetail(data) {
+  return request({
+    url: "/core/gx/resumption/getTask",
+    method: "post",
+    data,
+  });
+}
+
+export function saveTask(data) {
+  return request({
+    url: "/core/gx/resumption/saveTask",
+    method: "post",
+    data,
+  });
+}
+
+export function dataList(data) {
+  return request({
+    url: "/core/api/resumption/newTaskList",
+    method: "post",
+    data,
+  });
+}

+ 691 - 0
src/views/menu/resumption/detail.vue

@@ -0,0 +1,691 @@
+<template>
+  <div class="page_box">
+    <div class="panel">
+      <NavBar :go="{ type: 'push', path: '/resumption' }"/>
+      <van-panel :title="resumptionData.taskName">
+        <div class="tts">
+          <van-row>
+            <van-col span="12">
+              <div class="total_panel">
+                <div class="title">履职项</div>
+                <div class="content">
+                  <span class="con_num ok">已查 {{ resumptionData.yesPointNums }}</span>
+                  <span class="con_num no">未查 {{ resumptionData.noPointNums }}</span>
+                </div>
+              </div>
+            </van-col>
+            <van-col span="12">
+              <div class="total_panel" @click="showDetail()">
+                <div class="title">NFC</div>
+                <div class="content">
+                  <span class="con_num ok">已扫 {{ resumptionData.yesNFCNums }}</span>
+                  <span class="con_num no">未扫 {{ resumptionData.noNFCNums }}</span>
+                </div>
+              </div>
+
+            </van-col>
+          </van-row>
+        </div>
+      </van-panel>
+    </div>
+    <div class="progress">
+      <van-progress
+        :percentage="((resumptionData.yesPointNums + resumptionData.yesNFCNums)/ (resumptionData.yesPointNums + resumptionData.noPointNums + resumptionData.yesNFCNums + resumptionData.noNFCNums) * 100).toFixed(2)"/>
+    </div>
+    <!--   检查区域   -->
+    <div class="card">
+      <van-panel title="巡检区域">
+        <div style="padding: 5px;">
+          <van-row>
+            <van-col span="8" v-for="(va,i) in areas" :key="va.areaId">
+              <div :class="{'active': i === 0 } " class="check-area" @click="clickArea(va,i)">
+                <div class="ysj">
+                  <van-icon name="checked" :color="areaColor.complete" v-if="va.areaStatus === '1'"/>
+                  <van-icon name="info" :color="areaColor.loading" v-if="va.areaStatus === '2'"/>
+                  <van-icon name="info" :color="areaColor.noOpen" v-if="va.areaStatus === '0'"/>
+                </div>
+                {{ va.areaName }}
+              </div>
+            </van-col>
+          </van-row>
+        </div>
+      </van-panel>
+    </div>
+    <van-action-sheet v-model="total_show">
+      <div class="content">
+
+        <van-tabs>
+          <van-tab title="已扫描" name="a">
+            <van-list
+              finished-text="没有更多了"
+              @load="onLoad"
+            >
+              <van-cell v-for="item in yesList" :key="item.nfcCode" :title="item.nfcName">
+
+              </van-cell>
+            </van-list>
+          </van-tab>
+          <van-tab title="未扫描" name="b">
+            <van-list
+              finished-text="没有更多了"
+              @load="onLoad"
+            >
+              <van-cell v-for="item in noList" :key="item.nfcCode" :title="item.nfcName">
+                <img :src="require('../../../assets/svg/NFC.svg')" class="nfc-icon" @click="clickNFC"/>
+              </van-cell>
+            </van-list>
+          </van-tab>
+        </van-tabs>
+
+      </div>
+    </van-action-sheet>
+
+    <div class="card">
+      <van-row>
+        <van-col span="16">
+          <van-cell>
+            <template #title>
+              <span>NFC</span>
+            </template>
+            <template #extra>
+              <span style="display: inline-block;color:#26850c;">{{ yesNFCnums }}</span>
+              <span style="display: inline-block;color:#0e0e0e;">/</span>
+              <span style="display: inline-block;color:#0e0e0e;">{{ NFCnums }}</span>
+              <img :src="require('../../../assets/svg/NFC.svg')" class="nfc-icon" @click="clickNFC"/>
+            </template>
+          </van-cell>
+        </van-col>
+        <van-col span="8">
+          <van-cell>
+            <div class="okAll">
+              <van-radio-group v-if="enable" v-model="selectRadio" @change="changeSwitch">
+                <van-radio name="1" icon-size="20px">一键填充</van-radio>
+              </van-radio-group>
+            </div>
+          </van-cell>
+        </van-col>
+      </van-row>
+      <van-row>
+        <van-col span="24">
+          <van-cell v-show="currentImgNFC.length > 0" :border="false">
+            <div v-if="v.areaId === areaId && v.img" class="nfc-img" v-for="(v,i) in nfcs" :key="v.img"
+                 @click="preViewNFC(i)">
+              <img :src="imgUrl(v.img)" alt="">
+              <span>{{ v.nfcName }}</span>
+              <div v-if="enable" class="cancel_icon" @click="cancelImg(v)">
+                <van-icon name="clear"/>
+              </div>
+
+            </div>
+          </van-cell>
+        </van-col>
+      </van-row>
+
+      <van-collapse v-model="activeNames">
+        <van-collapse-item v-show="areaId === item.areaId" v-for="(item) in checks"
+                           :title="item.itemName + '(' + (item.points.length) + ')'"
+                           :name="item.itemName">
+          <div v-for="(point,index) in item.points">
+            <van-cell :title="point.pointName">
+              <template #right-icon>
+                <van-switch
+                  style="margin-left: 10px;"
+                  v-model="point.resValue"
+                  v-show="point.dataStatus === 2"
+                  v-if="enable"
+                  :active-value="1"
+                  :inactive-value="0"
+                  inactive-color="#4fc08d"
+                  active-color="#ee0a24"
+                  size="18"
+                />
+                <span v-else>
+                      <van-tag v-if="item.resvalue" type="warning">隐患</van-tag>
+                      <van-tag v-else type="success">正常</van-tag>
+                    </span>
+                <van-switch
+                  style="margin-left: 10px;"
+                  v-model="point.dataStatus"
+                  v-show="point.dataStatus === 1"
+                  :active-value="2"
+                  :inactive-value="1"
+                  inactive-color="#fcfcfc"
+                  active-color="#ee0a24"
+                  size="18"
+                  @change="changeCurrentSwitch(item.areaId)"
+                />
+              </template>
+            </van-cell>
+            <van-cell-group v-show="point.resValue">
+              <select-cell :required = enable :disabled="!enable" title="整改期限" v-model="point.rectificationDeadline"
+                           :data-list="dayList"/>
+              <van-field
+                :required = enable
+                v-model="point.resRemark"
+                rows="1"
+                autosize
+                label="情况描述:"
+                type="textarea"
+                placeholder="请输入"/>
+              <div class="upload-box">
+                <uploader :maxCount="5" v-if="enable" v-model="point.imgs"/>
+                <van-cell v-else>
+                      <div class="nfc-img van-hairline--surround" v-for="(v,i) in item.imgData" :key="v.imgPath" @click="clickWarnImage(item.imgData,i)">
+                        <img :src="imgUrl(v.imgPath)" alt="" >
+                        <span>{{v.checkName}}</span>
+                      </div>
+                </van-cell>
+              </div>
+            </van-cell-group>
+          </div>
+        </van-collapse-item>
+      </van-collapse>
+    </div>
+
+
+    <div class="bottomClass" v-if="enable">
+      <van-row>
+        <van-col span="12">
+          <van-button type="default" @click="resumptionDataSave">保存</van-button>
+        </van-col>
+        <van-col span="12">
+          <van-button type="info" @click="submitResumptionData">提交</van-button>
+        </van-col>
+      </van-row>
+    </div>
+    <!--  nfc弹窗  -->
+    <nfc-popup v-if="enable" ref="NfcPopup" @change="changeNfcImg"></nfc-popup>
+  </div>
+
+
+</template>
+
+<script>
+import { ImagePreview, Dialog } from 'vant'
+import NavBar from '@/components/NavBar/index.vue'
+import Uploader from '@/components/upload/uploader.vue'
+import SelectCell from '@/components/selectCell/index.vue'
+import { getDict } from '@/api/toConsult'
+import { saveTask, taskDetail } from '@/views/menu/resumption/api'
+import NfcPopup from '@/components/nfcPopup/more'
+import { imgUrl } from '@/utils'
+
+export default {
+  components: {
+    SelectCell,
+    Uploader,
+    NavBar,
+    NfcPopup,
+    imgUrl,
+    [Dialog.Component.name]: Dialog.Component
+  },
+  data() {
+    return {
+      areaColor: {
+        // 已完成
+        complete: '#26850c',
+        // 未开始
+        noOpen: '#1989fa',
+        // 进行中
+        loading: '#ffa500'
+      },
+      NFCnums: 0,
+      yesNFCnums: 0,
+      currentImgNFC: [],
+      areaId: null,
+      resumptionData: {},
+      areas: [],
+      checks: [],
+      nfcs: [],
+      selectRadio: 0,
+      total_show: false,
+      enable: false,
+      activeNames: [],
+      dayList: [15, 30, 90, 180],
+      yesList: [],
+      noList: [],
+      loading: false,
+      finished: false,
+      selectArea: null,
+      preViewImages: {
+        images: [],
+        startPosition: 0
+      }
+    }
+  },
+  mounted() {
+    this.getResumptionData()
+  },
+  created() {
+    getDict('rectification_deadline').then(res => {
+      let { data } = res
+      this.dayList = data
+    })
+  },
+  methods: {
+    preViewNFC(i) {
+      this.preViewImages.images = this.currentImgNFC.map(v => imgUrl(v.img))
+      this.preViewImages.startPosition = i
+      ImagePreview(this.preViewImages)
+    },
+    getResumptionData() {
+      let data = {
+        taskId: this.$route.query.id,
+        taskDate:this.$route.query.taskDate
+      }
+      taskDetail(data).then(res => {
+        let { taskId, taskName, yesPointNums, noPointNums, yesNFCNums, noNFCNums,status } = res.data
+        this.resumptionData = {
+          taskId, taskName, yesPointNums, noPointNums, yesNFCNums, noNFCNums,status
+        }
+        this.enable = this.resumptionData.status === 1 || this.resumptionData.status === 2;
+        this.checks = res.data.checks
+        this.nfcs = res.data.nfcs
+        this.areas = res.data.areas
+        this.activeArea(this.areas[0], 0)
+
+        if(!this.enable){
+          this.openCollapseItems();
+        }
+      })
+    },
+    openCollapseItems() {
+      let len = this.checks.length
+      for (let i = 0; i < len; i++) {
+        let title = this.checks[i].itemName
+        this.activeNames.push(title)
+      }
+    },
+    changeSwitch() {
+      let num = 0
+      for (let i = 0; i < this.checks.length; i++) {
+        for (let j = 0; j < this.checks[i].points.length; j++) {
+          this.checks[i].points[j].dataStatus = 2
+          num++
+        }
+      }
+      this.resumptionData.yesPointNums = num
+      this.resumptionData.noPointNums = 0
+      this.areas.forEach((item, index) => {
+        this.validateArea(item.areaId)
+      })
+      this.openCollapseItems()
+    },
+    changeCurrentSwitch(areaId) {
+      this.resumptionData.yesPointNums = this.resumptionData.yesPointNums + 1
+      this.resumptionData.noPointNums = this.resumptionData.noPointNums - 1
+      this.validateArea(areaId)
+    },
+    validateArea(areaId) {
+      let total = 0
+      let yes = 0
+      this.checks.forEach((item) => {
+        let pointList = item.points
+
+        pointList.forEach((point) => {
+          if (item.areaId === areaId) {
+            total++
+            if (point.dataStatus === 2) {
+              yes++
+            }
+          }
+        })
+      })
+
+
+      let noNfc = this.nfcs.filter((item, index) => {
+        return item.areaId === areaId && item.status === 0
+      })
+
+      let areaStatus = '0'
+      if (total === yes && noNfc.length === 0) {
+        areaStatus = '1'
+      } else if( yes === 0 && noNfc.length ===  this.NFCnums){
+        areaStatus = '0'
+      }else{
+        areaStatus = '2';
+      }
+
+      this.areas.forEach((item, index) => {
+        if (item.areaId === areaId) {
+          this.areas[index].areaStatus = areaStatus
+        }
+      })
+    },
+    clickNFC() {
+      let arr = this.nfcs.filter(item => {
+        return item.areaId === this.areaId && item.status === 0
+      })
+
+      if (arr.length > 0) {
+        let nfcs = []
+        for (const nfc of arr) {
+          let pro = {}
+          pro.checkName = nfc.nfcName
+          pro.nfccdoe = nfc.nfcCode
+          nfcs.push(pro)
+        }
+        this.$refs.NfcPopup.show(nfcs)
+      }
+    },
+    cancelImg(imgItem) {
+      let areaId = null
+      this.nfcs.forEach(v => {
+        if (v.nfcCode === imgItem.nfcCode) {
+          areaId = v.areaId
+          v.img = imgItem.url
+          v.status = 0
+          v.scanMethod = null
+        }
+      })
+      let now = this.currentImgNFC.filter((v) => {
+        return v.nfcCode !== imgItem.nfcCode
+      })
+      this.currentImgNFC = now
+
+      this.yesNFCnums--
+      this.resumptionData.yesNFCNums--
+      this.resumptionData.noNFCNums++
+      this.validateArea(areaId)
+    },
+    changeNfcImg(imgItem) {
+      let areaId = null
+      this.nfcs.forEach(v => {
+        if (v.nfcCode === imgItem.nfcCode) {
+          areaId = v.areaId
+          v.img = imgItem.url
+          v.status = 1
+          v.scanMethod = 1
+          this.currentImgNFC.push(v)
+        }
+      })
+      this.yesNFCnums++
+      this.resumptionData.yesNFCNums++
+      this.resumptionData.noNFCNums--
+      this.validateArea(areaId)
+    },
+    showDetail() {
+      this.total_show = true
+    },
+    onLoad() {
+      // 异步更新数据
+      // setTimeout 仅做示例,真实场景中一般为 ajax 请求
+      this.yesList = []
+      this.noList = []
+      this.nfcs.forEach((item, index) => {
+        if (item.status === 1) {
+          this.yesList.push(item)
+        } else {
+          this.noList.push(item)
+        }
+      })
+    },
+    //点击区域
+    clickArea(area, index) {
+      this.activeArea(area, index)
+    },
+    //选中区域时数据变更
+    activeArea(area, index) {
+      //获取当前选中区域
+      this.areaId = area.areaId
+      //设置选中样式
+      this.$nextTick(() => {
+        let doms = document.getElementsByClassName('check-area')
+        Array.prototype.forEach.call(doms, item => {
+          item.classList.remove('active')
+        })
+        doms[index].classList.add('active')
+      })
+      let nfcs = 0
+      let yesNfc = 0
+      let current = []
+      for (let i = 0; i < this.nfcs.length; i++) {
+        let nfc = this.nfcs[i]
+        let areaId = nfc.areaId
+        if (areaId === area.areaId) {
+          nfcs++
+          if (nfc.status === 1) {
+            yesNfc++
+          }
+          if (nfc.img) {
+            current.push(nfc)
+          }
+        }
+      }
+      this.currentImgNFC = current
+      this.yesNFCnums = yesNfc
+      this.NFCnums = nfcs
+      this.selectArea = area
+    },
+    //保存数据
+    resumptionDataSave() {
+      //组装数据
+      let data = {}
+      data.taskId = this.resumptionData.taskId
+      data.checks = this.checks
+      data.nfcs = this.nfcs
+      data.subType = 1
+
+      saveTask(data).then(res => {
+        this.$toast('保存成功')
+        this.$router.go(-1)
+      })
+
+    },
+    submitResumptionData() {
+      //验证数据
+      let noNfc = this.nfcs.filter((item, index) => {
+        return item.status === 0
+      })
+      if (noNfc.length > 0) {
+        Dialog.alert({
+          message: 'NFC标签还未扫描完成,请完成后提交!'
+        })
+        return
+      }
+      let isOk = true
+      this.checks.forEach((item) => {
+        let pointList = item.points
+        pointList.forEach((point) => {
+          if (point.dataStatus === 1) {
+            isOk = false
+          }
+        })
+      })
+
+      let data = {}
+      data.taskId = this.resumptionData.taskId
+      data.checks = this.checks
+      data.nfcs = this.nfcs
+      data.subType = 2
+      if (!isOk) {
+        Dialog.confirm({
+          message: '还有未完成的内容,是否提交?'
+        })
+          .then(() => {
+            saveTask(data).then(res => {
+              this.$toast('提交成功')
+              this.$router.to("/resumption")
+            })
+          })
+          .catch(() => {
+
+          })
+      } else {
+        saveTask(data).then(res => {
+          this.$toast('提交成功')
+          this.$router.to("/resumption")
+        })
+      }
+
+    }
+  }
+
+}
+</script>
+
+<style lang="scss" scoped>
+.van-progress {
+  z-index: 999;
+  width: 98%;
+  left: 6px;
+  right: 6px;
+}
+
+.page_box {
+  height: calc(100vh - 60px);
+  overflow: scroll;
+}
+
+.content {
+  padding: 16px 16px 10px;
+
+}
+
+.panel {
+  background-color: white;
+  border-radius: 10px;
+  border: 1px solid #ffffff;
+  display: flex;
+  flex-direction: column;
+  box-shadow: 0 8px 12px #ebedf0;
+  margin-bottom: 10px;
+
+  .van-cell__title {
+    font-weight: bold;
+  }
+}
+
+.total_panel {
+  text-align: center;
+
+  .title {
+    padding-top: 10px;
+
+  }
+
+  .content {
+    padding-top: 10px;
+    padding-bottom: 10px;
+
+    .con_num {
+      padding: 15px;
+    }
+
+    .ok {
+      color: #26850c;
+    }
+
+    .no {
+      color: #98632d;
+    }
+  }
+}
+
+.card {
+  box-shadow: 0 10px 10px #eaeaea;
+  height: 50px;
+
+}
+
+.van-popup {
+  height: 50%;
+}
+
+.check-area {
+  //background-color: #f1f1f1;
+  text-align: center;
+  margin: 10px;
+  padding: 20px;
+  //color: #aaa;
+  border-radius: 6px;
+  justify-content: space-between;
+  align-items: center;
+  box-shadow: 0 2px 6px #ddd;
+  position: relative;
+
+  .ysj {
+    position: absolute;
+    right: 5px;
+    top: 5px;
+  }
+}
+
+.active {
+  background-color: #bdbdbd;
+  color: #333;
+}
+
+.complete {
+  color: #fff;
+  background-color: #1989fa;
+}
+
+.nfc-icon {
+  width: 50px;
+  height: 50px;
+  margin-left: 20px;
+}
+
+.bottomClass {
+  position: fixed;
+  width: 100%;
+  bottom: 0;
+  z-index: 999;
+  background: #ebedf0;
+  text-align: center;
+
+  .van-button {
+    width: 95%;
+    margin-top: 10px;
+  }
+}
+
+
+.okAll {
+  background-color: #fff;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 50px
+}
+
+.nfc-img {
+  display: inline-block;
+  width: 160px;
+  height: 160px;
+  margin: 0 10px;
+  position: relative;
+
+  > img {
+    width: 100%;
+    height: 100%;
+    border: none;
+  }
+
+  > span {
+    position: absolute;
+    padding: 0 10px;
+    bottom: 0;
+    left: 0;
+    display: block;
+    width: 100%;
+    background-color: rgba(0, 0, 0, .2);
+    color: #eaeaea;
+    font-size: 5px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    line-height: 30px;
+    white-space: break-spaces;
+    height: 30px;
+  }
+
+  .cancel_icon {
+    position: absolute;
+    font-size: 30px;
+    right: 5px;
+    top: 2px;
+  }
+}
+
+</style>

+ 275 - 0
src/views/menu/resumption/list.vue

@@ -0,0 +1,275 @@
+<template>
+  <div class="lvzhi" ref="container">
+    <NavBar :go="{ type: 'push', path: '/menu' }"/>
+    <van-sticky :container="container">
+      <DatePicker ref="DatePicker" @change="changeDate"></DatePicker>
+    </van-sticky>
+    <div class="lz-container" id="lz-container" @scroll="handleScroll">
+      <div class="lz-list">
+        <div class="list-item">
+          <p>每日履职</p>
+          <van-tabs >
+            <van-tab title="待完成">
+              <template #title>待完成 {{dayList.unfinished.length}} </template>
+              <van-empty description="暂无数据" v-if="!dayList.unfinished.length"/>
+              <van-cell-group  v-else>
+                <van-cell
+                  v-for="v in dayList.unfinished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+            <van-tab title="未完成">
+              <template #title>未完成 {{dayList.proceed.length}} </template>
+              <van-empty description="暂无数据" v-if="!dayList.proceed.length"/>
+              <van-cell-group v-else>
+                <van-cell
+                  v-for="v in dayList.proceed"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+            <van-tab title="已完成">
+              <template #title>已完成 {{dayList.finished.length}} </template>
+              <van-empty description="暂无数据" v-if="!dayList.finished.length"/>
+              <van-cell-group v-else>
+                <van-cell
+                  v-for="v in dayList.finished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+          </van-tabs>
+        </div>
+
+
+        <div class="list-item">
+          <p>周期履职</p>
+          <van-tabs >
+            <van-tab title="待完成">
+              <template #title>待完成 {{otherList.unfinished.length}} </template>
+              <van-empty description="暂无数据" v-if="!otherList.unfinished.length"/>
+              <van-cell-group v-else>
+                <van-cell
+                  v-for="v in otherList.unfinished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,enable:1,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+            <van-tab title="未完成">
+              <template #title>未完成 {{otherList.proceed.length}} </template>
+              <van-empty description="暂无数据" v-if="!otherList.proceed.length"/>
+              <van-cell-group v-else>
+                <van-cell
+                  v-for="v in otherList.proceed"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+            <van-tab title="已完成">
+              <template #title>已完成 {{otherList.finished.length}} </template>
+              <van-empty description="暂无数据" v-if="!otherList.finished.length"/>
+              <van-cell-group v-else>
+                <van-cell
+                  v-for="v in otherList.finished"
+                  :key="v.id"
+                  :title="v.planName"
+                  :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
+                  is-link
+                  :to="{path:path,query:{id:v.id,taskDate:date}}"
+                  :value="getDicts(v.status,'resumption_status')"
+                  :value-class="`title-orange`"/>
+              </van-cell-group>
+            </van-tab>
+          </van-tabs>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/components/NavBar';
+import DatePicker from '@/components/DatePicker';
+import {mapGetters} from "vuex";
+import {dataList} from "./api";
+import dayjs from "dayjs";
+import {getDict} from "@/api/toConsult";
+
+export default {
+  name: 'lvzhi',
+  components:{NavBar,DatePicker},
+  data(){
+    return{
+      //绑定的日期
+      date:new Date(),
+      //设置浮动的容器
+      container: null,
+      //今日履职
+      dayList: {
+        unfinished:[],
+        proceed:[],
+        finished:[],
+      },
+      //周期履职
+      otherList:{
+        unfinished:[],
+        proceed:[],
+        finished:[],
+      },
+      //配置子页面路径
+      path:'/resumption_detail',
+
+    }
+  },
+  created() {
+    getDict( 'resumption_status' ).then(res => {
+      let { data } = res
+      this.stateList = data;
+    })
+  },
+  mounted() {
+    this.container = this.$refs.container;
+    this.initDatalist();
+    document.getElementById('lz-container')
+  },
+  computed:{
+    ...mapGetters(['orgName','orgId','roleList']),
+  },
+  beforeRouteEnter(to,from,next){
+    next(vm=>{
+      vm.getDatalist();
+    })
+  },
+  methods:{
+    getDicts(s){
+      return this.stateList.find(v=> s == v.dictValue).dictLabel;
+    },
+    handleScroll(e){
+      let scrollTop = document.getElementById('lz-container').scrollTop;
+      this.$refs.DatePicker.showPicker = false;
+    },
+    //格式化时间范围
+    formatTime(start,end,format){
+      return `${dayjs(start).format(format)}-${dayjs(end).format(format)}`;
+    },
+    //页面第一次加载
+    initDatalist(){
+      let roleIds = this.roleList.map(v=>{return v.roleId})
+      let data = {
+        dateTime: dayjs(new Date()).format('YYYY-MM-DD'),
+        orgId: this.orgId,
+        roleId:roleIds,
+      }
+      dataList(data).then(res=>{
+        this.setData(res);
+      })
+    },
+    //点击日期获取数据
+    getDatalist(){
+      let roleIds = this.roleList.map(v=>{return v.roleId})
+      let data = {
+        dateTime: this.date,
+        orgId: this.orgId,
+        roleId:roleIds,
+      }
+      dataList(data).then(res=>{
+        this.setData(res);
+      })
+    },
+    //给本地数据赋值
+    setData(res){
+      //今日
+      this.dayList.unfinished = res.data.day['1'];
+      this.dayList.proceed = res.data.day['3']
+      this.dayList.finished = res.data.day['2'];
+      //周期
+      this.otherList.unfinished = res.data.noDay['1'];
+      this.otherList.proceed = res.data.noDay['3']
+      this.otherList.finished = res.data.noDay['2'];
+    },
+    queryMoth(){
+
+    },
+    //点击时间
+    changeDate(val){
+      console.log(val,'val')
+      this.date = val;
+      this.getDatalist();
+    },
+  }
+}
+</script>
+<style lang="scss">
+.lvzhi{
+  .van-empty{
+    background-color: #fff;
+  }
+  .van-cell-group{
+    background-color: #fff;
+  }
+  .van-tabs__line{
+    background-color: #008cd6;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.lvzhi{
+  height: 100%;
+  overflow: hidden;
+}
+.lz-container{
+  height: calc(100vh - 190px);
+  overflow: scroll;
+}
+.top-date-box{
+  padding: 0 20px;
+}
+.lz-list{
+  box-sizing: border-box;
+  overflow: auto;
+}
+.list-item{
+  margin: 20px;
+  >p{
+    color:#999;
+    font-size: 30px;
+    height: 60px;
+    line-height: 60px;
+  }
+}
+.title-red{
+  color: #f16363;
+}
+.title-red{
+  color: #58dc33;
+}
+.title-orange{
+  color: #fd8104;
+}
+</style>

+ 166 - 0
src/views/menu/resumption/resumption.json

@@ -0,0 +1,166 @@
+{
+  "taskId": "1703564728293072898",
+  "taskName": "营业网点营业前履职",
+  "yesPointNums": 0,
+  "noPointNums": 0,
+  "yesNFCNums": 2,
+  "noNFCNums": 2,
+  "areas": [
+    {
+      "areaId": "1703090993870123009",
+      "areaName": "设备间",
+      "areaStatus": "0"
+    },
+    {
+      "areaId": "1703090951667036162",
+      "areaName": "营业网点",
+      "areaStatus": "0"
+    }
+  ],
+  "checks": [
+    {
+      "itemId": "1703109061254037505",
+      "itemName": "营业场所环境",
+      "areaId": "1703090951667036162",
+      "areaName": "营业网点",
+      "points": [
+        {
+          "pointId": "1703109061262426114",
+          "pointName": "所有门窗防护装置是否遭破坏,周围有无特殊装置和异物等。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703109061266620417",
+          "pointName": "营业场所照明是否正常。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703109061275009026",
+          "pointName": "玻璃幕墙/护栏有无损坏、老化,墙体、楼板是否有破损",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        }
+      ]
+    },
+    {
+      "itemId": "1703108674228830210",
+      "itemName": "检查报警设备",
+      "areaId": "1703090951667036162",
+      "areaName": "营业网点",
+      "points": [
+        {
+          "pointId": "1703108674258190337",
+          "pointName": "电动卷帘(栅) 门开关盒是否上锁",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703108674270773249",
+          "pointName": "防盗安全门或卷帘门是否正常开启。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703108674274967553",
+          "pointName": "报警设施、报警键盘的指示灯状态是否正常。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        }
+      ]
+    },
+    {
+      "itemId": "1703109456772710402",
+      "itemName": "检查监控设备",
+      "areaId": "1703090993870123009",
+      "areaName": "设备间",
+      "points": [
+        {
+          "pointId": "1703109456776904706",
+          "pointName": "视频监控画面是否模糊不清晰或视频丢失。",
+          "resValue": 1,
+          "resRemark": "buqingxi ",
+          "rectificationDeadline": "15",
+          "imgs": [
+            "/statics/2023/09/18/20230918092934A070.jpg"
+          ]
+        },
+        {
+          "pointId": "1703109456785293313",
+          "pointName": "回放前一天视频监控系统的运行情况及录像是否满足管理规定: 图像清晰、连续:能清断显示柜员操作及客户脸部特征,无丢包现象,录音系统良好,图像声音复合记录完整,图像覆盖范围准确。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703109456781099009",
+          "pointName": "视频监控画面角度是否偏移,录像时间显示是否校时。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        },
+        {
+          "pointId": "1703109456797876225",
+          "pointName": "检查全部视频通道录像存储时间不得少于30天(业务库等重要部位不少90天)。",
+          "resValue": 0,
+          "resRemark": "",
+          "rectificationDeadline": null,
+          "imgs": []
+        }
+      ]
+    }
+  ],
+  "nfcs": [
+    {
+      "areaId": "1703090993870123009",
+      "nfcId": "1703092777632116737",
+      "nfcName": "设备间-空调位",
+      "nfcCode": "11223311",
+      "status": 1,
+      "scanMethod": 1,
+      "img": "/statics/2023/09/18/20230918092820A068.jpg"
+    },
+    {
+      "areaId": "1703090993870123009",
+      "nfcId": "1703092828588716034",
+      "nfcName": "设备间-电箱位",
+      "nfcCode": "11223344",
+      "status": 1,
+      "scanMethod": 1,
+      "img": "/statics/2023/09/18/20230918092854A069.jpg"
+    },
+    {
+      "areaId": "1703090951667036162",
+      "nfcId": "1703092645956136962",
+      "nfcName": "网点正大门",
+      "nfcCode": "123321",
+      "status": null,
+      "scanMethod": null,
+      "img": null
+    },
+    {
+      "areaId": "1703090951667036162",
+      "nfcId": "1703092713148887042",
+      "nfcName": "网点侧门",
+      "nfcCode": "111222",
+      "status": null,
+      "scanMethod": null,
+      "img": null
+    }
+  ]
+}