|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view class="box"> | 
|---|
|  |  |  | <view class="box" :class="{ popupShow: showFilter }"> | 
|---|
|  |  |  | <scroll-view scroll-x class="box_head"> | 
|---|
|  |  |  | <view class="box_head_search"> | 
|---|
|  |  |  | <view class="box_head_search_ipt"> | 
|---|
|  |  |  | 
|---|
|  |  |  | @click="statusClick(0)" | 
|---|
|  |  |  | :class="{ active: search.queryType === 0 }" | 
|---|
|  |  |  | class="box_head_item" | 
|---|
|  |  |  | >待处理 {{ headData.noticeWaitNum || '' }}</view | 
|---|
|  |  |  | >待处理 {{ headData.noticeWaitNum || "" }}</view | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <view | 
|---|
|  |  |  | @click="statusClick(1)" | 
|---|
|  |  |  | 
|---|
|  |  |  | @click="statusClick(3)" | 
|---|
|  |  |  | :class="{ active: search.queryType === 3 }" | 
|---|
|  |  |  | class="box_head_item" | 
|---|
|  |  |  | >抄送我的 {{ headData.noticeCopyNum || '' }}</view | 
|---|
|  |  |  | >抄送我的 {{ headData.noticeCopyNum || "" }}</view | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <text>仅看未读</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="right">全部标记已读</view> | 
|---|
|  |  |  | <view class="right" @click="handleReady">全部标记已读</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view | 
|---|
|  |  |  | class="box_list_item" | 
|---|
|  |  |  | v-for="(item, index) in dataList" | 
|---|
|  |  |  | @click="handleAppr(item)" | 
|---|
|  |  |  | :key="index" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <view class="box_list_item_head"> | 
|---|
|  |  |  | <view class="df_ac"> | 
|---|
|  |  |  | <text v-if="item.readed == 0" class="readed"></text> | 
|---|
|  |  |  | <text v-if="item.readed == 0 && search.queryType === 3" class="readed"></text> | 
|---|
|  |  |  | <text class="tt">{{ item.title }}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="info loading">{{ item.info }}</view> | 
|---|
|  |  |  | <view class="info" :class="{ loading: search.queryType === 0 }">{{ item.info }}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="box_list_item_nr"> | 
|---|
|  |  |  | <view v-if="item.param1.arriveDate" class="box_list_item_nr_item"> | 
|---|
|  |  |  | <text></text> | 
|---|
|  |  |  | <text>{{ item.param1.arriveDate }}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view v-if="item.param1.inType" class="box_list_item_nr_item"> | 
|---|
|  |  |  | <text></text> | 
|---|
|  |  |  | <text>{{ item.param1.inType }}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view v-if="item.param1.totalNum" class="box_list_item_nr_item"> | 
|---|
|  |  |  | <text></text> | 
|---|
|  |  |  | <text>{{ item.param1.totalNum }}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view v-if="item.param1.carNum" class="box_list_item_nr_item"> | 
|---|
|  |  |  | <text></text> | 
|---|
|  |  |  | <text>{{ item.param1.carNum }}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view v-if="item.param1.name" class="box_list_item_nr_item"> | 
|---|
|  |  |  | <text></text> | 
|---|
|  |  |  | <text>{{ item.param1.name }}</text> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view class="box_list_item_nr_x"></view> | 
|---|
|  |  |  | <view class="box_list_item_nr_text"> | 
|---|
|  |  |  | <text class="time">{{ item.createDate }}提交</text> | 
|---|
|  |  |  | <text | 
|---|
|  |  |  | v-if="item.status == '0'" | 
|---|
|  |  |  | class="btn" | 
|---|
|  |  |  | @click="handleAppr(item)" | 
|---|
|  |  |  | >去处理</text | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <text v-if="search.queryType === 0" class="btn">去处理</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | @close="showFilter = false" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <view class="search"> | 
|---|
|  |  |  | <view class="search_head">任务筛选</view> | 
|---|
|  |  |  | <view class="search_head">筛选</view> | 
|---|
|  |  |  | <view class="search_list"> | 
|---|
|  |  |  | <view class="search_list_item"> | 
|---|
|  |  |  | <view class="search_list_item_label">创建日期</view> | 
|---|
|  |  |  | <view class="search_list_item_label">创建时间</view> | 
|---|
|  |  |  | <view class="search_list_item_val"> | 
|---|
|  |  |  | <view | 
|---|
|  |  |  | class="search_list_item_val_row" | 
|---|
|  |  |  | @click="tiemShow = true" | 
|---|
|  |  |  | :style="{ color: modelParam.startDate ? '#000' : '' }" | 
|---|
|  |  |  | >{{ | 
|---|
|  |  |  | modelParam.startDate ? modelParam.startDate : "开始日期" | 
|---|
|  |  |  | modelParam.startDate ? modelParam.startDate : "开始时间" | 
|---|
|  |  |  | }}</view | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <view class="search_list_item_val_z">-</view> | 
|---|
|  |  |  | 
|---|
|  |  |  | @click="tiemShow1 = true" | 
|---|
|  |  |  | :style="{ color: modelParam.endDate ? '#000' : '' }" | 
|---|
|  |  |  | >{{ | 
|---|
|  |  |  | modelParam.endDate ? modelParam.endDate : "结束日期" | 
|---|
|  |  |  | modelParam.endDate ? modelParam.endDate : "结束时间" | 
|---|
|  |  |  | }}</view | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="search_list_item"> | 
|---|
|  |  |  | <view class="search_list_item_label">订单来源</view> | 
|---|
|  |  |  | <view class="search_list_item_label">任务类型</view> | 
|---|
|  |  |  | <view class="search_list_item_cates"> | 
|---|
|  |  |  | <view | 
|---|
|  |  |  | :class=" | 
|---|
|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="search_footer"> | 
|---|
|  |  |  | <view class="search_footer_item" @click="showFilter = false" | 
|---|
|  |  |  | >取消</view | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <view class="search_footer_item" @click="modalReset">重置</view> | 
|---|
|  |  |  | <view class="search_footer_item t" @click="modalSub">提交</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </u-popup> | 
|---|
|  |  |  | <u-datetime-picker | 
|---|
|  |  |  | :show="tiemShow" | 
|---|
|  |  |  | v-model="modelParam.startDate" | 
|---|
|  |  |  | v-model="startDate" | 
|---|
|  |  |  | mode="date" | 
|---|
|  |  |  | @confirm="confirmLeft" | 
|---|
|  |  |  | @cancel="tiemShow = false" | 
|---|
|  |  |  | ></u-datetime-picker> | 
|---|
|  |  |  | <u-datetime-picker | 
|---|
|  |  |  | :show="tiemShow1" | 
|---|
|  |  |  | v-model="modelParam.endDate" | 
|---|
|  |  |  | :minDate=" | 
|---|
|  |  |  | modelParam.startDate ? new Date(modelParam.startDate).getTime() : null | 
|---|
|  |  |  | " | 
|---|
|  |  |  | v-model="startDate" | 
|---|
|  |  |  | mode="date" | 
|---|
|  |  |  | @confirm="confirmRight" | 
|---|
|  |  |  | @cancel="tiemShow1 = false" | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import { stagingHead, stagingTaskPage } from '@/api' | 
|---|
|  |  |  | import { stagingHead, stagingTaskPage, signReadTask } from '@/api' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | 
|---|
|  |  |  | search: { | 
|---|
|  |  |  | queryType: 0 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | modelParam: { | 
|---|
|  |  |  | startDate: dayjs().format('YYYY-MM-DD'), | 
|---|
|  |  |  | endDate: dayjs().format('YYYY-MM-DD'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | modelParam: {}, | 
|---|
|  |  |  | tiemShow: false, | 
|---|
|  |  |  | tiemShow1: false, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | headData: {}, | 
|---|
|  |  |  | dataList: [], | 
|---|
|  |  |  | total: 0, | 
|---|
|  |  |  | cateList: [ | 
|---|
|  |  |  | { name: '访客申请', id: 0 }, | 
|---|
|  |  |  | { name: '访客报备', id: 1 }, | 
|---|
|  |  |  | { name: '用车申请', id: 2 }, | 
|---|
|  |  |  | { name: '隐患随手拍', id: 3 }, | 
|---|
|  |  |  | { name: '物流车申请', id: 4 }, | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | startDate: dayjs().format('YYYY-MM-DD'), | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // onLoad() { | 
|---|
|  |  |  | 
|---|
|  |  |  | //   this.getList() | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | onReachBottom() { | 
|---|
|  |  |  | // this.pagination.page = 0 | 
|---|
|  |  |  | // this.dataList = [] | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | const { total,  dataList} = this | 
|---|
|  |  |  | if(dataList.length < total){ | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.showToast('暂无更多数据') | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onBackPress(options) { | 
|---|
|  |  |  | setTimeout(()=>{ | 
|---|
|  |  |  | this.$eventBus.$emit('taskBack') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | this.pagination.page = 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | this.pagination.page = 0 | 
|---|
|  |  |  | this.dataList = [] | 
|---|
|  |  |  | this.$set(this.search, 'noRead', val) | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | modalReset() { | 
|---|
|  |  |  | this.modelParam = {} | 
|---|
|  |  |  | this.pagination.page = 0 | 
|---|
|  |  |  | this.dataList = [] | 
|---|
|  |  |  | this.showFilter = false | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | modalSub() { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.dataList = [...this.dataList, ...res.data.records] | 
|---|
|  |  |  | this.total = res.data.total | 
|---|
|  |  |  | this.dataList.forEach(i => { | 
|---|
|  |  |  | if (i.param1) { | 
|---|
|  |  |  | i.param1 = JSON.parse(i.param1) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | console.log('dataList', this.dataList) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getHeadList() { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.headData = res.data | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleReady() { | 
|---|
|  |  |  | signReadTask({ | 
|---|
|  |  |  | signType: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.getHeadList() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleAppr(item) { | 
|---|
|  |  |  | const { objType, objId } = item | 
|---|
|  |  |  | const { objType, objId, info, readed } = item | 
|---|
|  |  |  | if (readed === 0) { | 
|---|
|  |  |  | signReadTask({ | 
|---|
|  |  |  | noticesId: item.id, | 
|---|
|  |  |  | signType: 0 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.getHeadList() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (objType === 2) { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/staff/vehicle/sendACarDetail?id=${objId}&appr=1` | 
|---|
|  |  |  | url: `/pages/staff/vehicle/sendACarDetail?id=${objId}&appr=1&info=${info}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else if (objType === 1) { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/staff/task/visitorReport?id=${objId}&objType=${objType}` | 
|---|
|  |  |  | url: `/pages/staff/task/visitorReport?id=${objId}&objType=${objType}&info=${info}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else if (objType === 3) { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/staff/task/vDangetAppr?id=${objId}&objType=${objType}` | 
|---|
|  |  |  | url: `/pages/staff/task/vDangetAppr?id=${objId}&objType=${objType}&info=${info}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | } else if (objType === 6 || objType === 5) { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/staff/task/visitorApprove?id=${objId}&objType=${objType}` | 
|---|
|  |  |  | url: `/pages/staff/task/driver?id=${objId}&objType=${objType}&info=${info}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/staff/task/visitorApprove?id=${objId}&objType=${objType}&info=${info}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | clickItem(index) { | 
|---|
|  |  |  | this.$set(this.modelParam, 'type', this.cateList[index].id) | 
|---|
|  |  |  | if (this.cateList[index].id === this.modelParam.type) { | 
|---|
|  |  |  | this.$set(this.modelParam, 'type', null) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$set(this.modelParam, 'type', this.cateList[index].id) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | confirmLeft(e) { | 
|---|
|  |  |  | console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd')) | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.modelParam.startDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') | 
|---|
|  |  |  | this.$set(this.modelParam, 'startDate', uni.$u.timeFormat(e.value, 'yyyy-mm-dd')) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.tiemShow = false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | confirmRight(e) { | 
|---|
|  |  |  | // this.modelParam.endDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.modelParam.endDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') | 
|---|
|  |  |  | this.$set(this.modelParam, 'endDate', uni.$u.timeFormat(e.value, 'yyyy-mm-dd')) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.tiemShow1 = false | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: space-between; | 
|---|
|  |  |  | .readed { | 
|---|
|  |  |  | width: 12rpx; | 
|---|
|  |  |  | height: 12rpx; | 
|---|
|  |  |  | width: 16rpx; | 
|---|
|  |  |  | height: 16rpx; | 
|---|
|  |  |  | border-radius: 50%; | 
|---|
|  |  |  | background-color: #e0312a; | 
|---|
|  |  |  | margin-right: 16rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .info { | 
|---|
|  |  |  | font-size: 26rpx; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #999999; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .loading { | 
|---|
|  |  |  | color: #4c99a8; | 
|---|
|  |  |  | color: $uni-color-primary; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .success { | 
|---|
|  |  |  | color: #03c68f; | 
|---|
|  |  |  | 
|---|
|  |  |  | font-size: 32rpx; | 
|---|
|  |  |  | font-weight: 600; | 
|---|
|  |  |  | color: #222222; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .info { | 
|---|
|  |  |  | font-size: 26rpx; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .box_list_item_nr { | 
|---|
|  |  |  | 
|---|
|  |  |  | color: #ffffff !important; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .search_list_item_cates_row { | 
|---|
|  |  |  | padding: 0 26rpx; | 
|---|
|  |  |  | width: 216rpx; | 
|---|
|  |  |  | height: 64rpx; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | line-height: 64rpx; | 
|---|
|  |  |  | background: #f7f7f7; | 
|---|
|  |  |  | border-radius: 36rpx; | 
|---|
|  |  |  | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #333333; | 
|---|
|  |  |  | margin-bottom: 20rpx; | 
|---|
|  |  |  | &:last-child { | 
|---|
|  |  |  | margin: 0; | 
|---|
|  |  |  | &:nth-of-type(3n) { | 
|---|
|  |  |  | margin-right: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|