123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <template>
- <view class="task-page">
- <div class="title">
- <text>{{item.taskTitle}}</text>
- <!-- #ifndef H5 -->
- <text class="icon-saoma iconfont" @click="onScanCode" v-if="item.status!==1"></text>
- <!-- #endif -->
- </div>
- <div class="info">
- <div class="item">
- <view class="name">执行人</view>
- <view class="cont">{{item.handleAccountName}}</view>
- </div>
- <div class="item">
- <view class="name">执行部门</view>
- <view class="cont">{{item.handleGroupName}}</view>
- </div>
- <div class="item">
- <view class="name">检查时间</view>
- <view class="cont">{{item.checkTime}}</view>
- </div>
- </div>
- <div class="status">
- <template v-if="item.status===0">
- <image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
- <p>暂无处置信息</p>
- <!-- #ifdef H5 -->
- <image class="add" @click="add" src="/static/icon/add.png" mode="widthFix"></image>
- <!-- #endif -->
- </template>
- <div class="head" v-if="item.status===1">处置过程</div>
- <h3 v-if="checkItemPass.length>0">通过项</h3>
- <ul style="padding-bottom: 10px;">
- <li v-for="(item,index) in checkItemPass">{{item}}</li>
- </ul>
- <h3 v-if="checkItemNopass.length>0">不通过项</h3>
- <ul>
- <li v-for="(item,index) in checkItemNopass">{{item}}</li>
- </ul>
- <!-- <template v-else>
- <view class="flow-head">
- <div class="flow-status" :class="flow.status===1?'success':'error'">{{flow.status===0?'异常':(flow.status===1?'正常':'')}}</div>
- <view class="flow-time">{{parseTime(flow.time)}}</view>
- </view>
- <div class="desc">{{flow.desc}}</div>
- <div class="attach">
- <view class="attach-item" v-for="(attach,index) in flow.attachList" :key="'attach-'+index">
- <image class="image" :src="attach.url" mode="widthFix"></image>
- </view>
- </div>
- </template> -->
- </div>
- </view>
- </template>
- <script>
- import {parseTime} from '@/libs/index.js'
- import {scanCode} from '@/api/goaf.js'
- export default {
- data() {
- return {
- item:{
- title:"水位预{2号-770-32002}:采空区封堵完好,无渗水情况。"
- },
- checkItemNopass:[],
- checkItemPass:[]
- }
- },
- onLoad() {
- this.init()
- },
- onPullDownRefresh (){
- this.init()
- },
- methods: {
- parseTime,
- init(){
- this.getTask()
- },
- getTask(){
- let data=uni.getStorageSync('task-item')
- let checkItemPass=data.checkItemPass
- let checkItemNopass=data.checkItemNopass
- this.item=data
- if(checkItemPass){
- this.checkItemPass=checkItemPass.split('通过;')
- }
- if(checkItemNopass){
- this.checkItemNopass=checkItemNopass.split('不通过;')
- }
- },
- add(){
- uni.navigateTo({
- url:'/pages/task/taskList/taskList'
- })
- },
- onScanCode(){
- let data=uni.getStorageSync('task-item')
- let checklistId=data.checklistId
- let goafId=data.goafId;
- uni.scanCode({
- success: function (res) {
- scanCode(res.result).then((res)=>{
- goafId
- let qrcode_goafId=res.data.goafId;
- let qrcode_ChecklistId=res.data.goafChecklistId;
- if(checklistId===qrcode_ChecklistId&&goafId===qrcode_goafId){
- uni.navigateTo({
- url:'/pages/task/taskList/taskList'
- })
- }else{
- uni.showToast({
- icon:'none',
- title:"任务跟二维码不符"
- })
- }
- })
- },
- fail(){
- uni.showToast({
- icon:'none',
- title:"扫码失败!"
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .task-page{
- background-color: #F3F5FB;
- .title{
- font-family: 'Source Han Sans CN';
- font-style: normal;
- font-weight: 700;
- font-size: 36rpx;
- line-height: 54rpx;
- color: #212121;
- padding-left: 32rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .iconfont{
- font-size: 42rpx;
- line-height: 1;
- padding: 12rpx 32rpx;
- font-weight: normal;
- color: #333;
- }
- }
- .info{
- padding: 0 32rpx;
- margin: 20rpx 0;
- background: #FFFFFF;
- border-radius: 32rpx 32rpx 0px 0px;
- .item{
- border-bottom: 1rpx solid #EFF1F3;
- padding: 40rpx 32rpx;
- .name{
- font-size: 28rpx;
- color: #999999;
- line-height: 1;
- }
- .cont{
- font-size: 30rpx;
- color: #212121;
- line-height: 1.5;
- padding-top: 12rpx;
- }
- &:last-child{
- border-bottom:none;
- }
- }
- }
- .status{
- background: #FFFFFF;
- border-radius: 32rpx 32rpx 0px 0px;
- padding: 48rpx 32rpx;
- .head{
- color: #212121;
- font-size: 34rpx;
- line-height:1;
- font-weight: 700;
- padding-bottom: 20rpx;
- }
- h3{
- color: #424242;
- padding: 10rpx 10rpx;
- background-color: #EFF1F3;
- line-height: 1;
- margin-bottom: 10rpx;
- }
- ul{
- list-style: decimal;
- }
- .icon-empty{
- display: block;
- width: 160rpx;
- margin: 64rpx auto 0;
- }
- p{
- font-size: 28rpx;
- line-height: 1.8;
- color: #666;
- text-align: center;
- }
- .flow-head{
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-family: 'Abhaya Libre';
- font-style: normal;
- font-weight: 400;
- font-size: 24rpx;
- line-height: 48rpx;
- padding: 30rpx 0 24rpx 0;
- .flow-status{
- color: #27DFA8;
- &.error{
- color: #F54545;
- }
- }
- .flow-time{
- color: #999999;
- }
- }
- .desc{
- font-family: 'SF Pro Text';
- font-style: normal;
- font-weight: 500;
- font-size: 30rpx;
- line-height: 42rpx;
- color: #434343;
- padding-bottom: 24rpx;
- }
- .attach{
- display: flex;
- flex-wrap: wrap;
- .attach-item{
- width: 224rpx;
- overflow: hidden;
- margin-right: 7rpx;
- margin-bottom: 20rpx;
- &:nth-child(3n){
- margin-right: 0;
- }
- .image{
- display: block;
- width: 224rpx;
- border-radius: 8px;
- }
- }
- }
- }
- .add{
- display: block;
- width: 96rpx;
- position: fixed;
- bottom: 186rpx;
- right: 32rpx;
- }
- }
- </style>
|