预警
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<view class="top-line"/>
|
||||
<view class="top-line" />
|
||||
<!-- 工单状态进度 -->
|
||||
<view class="repair-detail-progress-box">
|
||||
<view class="repair-detail-progress">
|
||||
@@ -29,63 +29,83 @@
|
||||
<view class="detail-value remark"><text>备注:</text>{{ detail.remark }}</view>
|
||||
<view class="detail-value"><text class="detail-key">工单图片:</text></view>
|
||||
<view class="image-list" v-if="detail.orderImgUrl">
|
||||
<u-image
|
||||
v-for="(imgUrl, index) in detail.orderImgUrl.split(',')"
|
||||
:key="index"
|
||||
:src="imgUrl"
|
||||
width="200rpx"
|
||||
height="200rpx"
|
||||
border-radius="10rpx"
|
||||
<u-image v-for="(imgUrl, index) in detail.orderImgUrl.split(',')" :key="index" :src="imgUrl"
|
||||
width="200rpx" height="200rpx" border-radius="10rpx"
|
||||
@click="previewImage(detail.orderImgUrl.split(','), index)"
|
||||
style="margin-right: 20rpx; margin-bottom: 20rpx;"
|
||||
></u-image>
|
||||
style="margin-right: 20rpx; margin-bottom: 20rpx;"></u-image>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="btn-group">
|
||||
<button class="btn ghost" @click="transfer">转派</button>
|
||||
<button class="btn primary" @click="complete">完成</button>
|
||||
<view v-if="(!this.isManager&&this.detailStep == 2) || this.detailStep == 0" class="btn-group">
|
||||
<button class="btn ghost"
|
||||
@click="transfer">{{this.isManager ? '指派':this.detailStep == 0 ? '拒绝':'转派'}}</button>
|
||||
<button v-if="!this.isManager" class="btn primary"
|
||||
@click="complete">{{this.detailStep == 0 ? '接单':'完成'}}</button>
|
||||
</view>
|
||||
|
||||
<SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
<script>
|
||||
import SelectUser from '@/components/SelectUser.vue'
|
||||
export default {
|
||||
components: {
|
||||
SelectUser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailStep: 0,
|
||||
detailStatus: '',
|
||||
progressSteps: ['创建工单','已接单', '处理中', '已结束'],
|
||||
progressSteps: ['创建工单', '已接单', '处理中', '已结束'],
|
||||
currentStatus: 2, // 0: 待分配,1: 已接单,2: 处理中,3: 已完成
|
||||
detail: {
|
||||
}
|
||||
|
||||
detail: {},
|
||||
isManager: false,
|
||||
showSelect: false,
|
||||
users: [{
|
||||
id: '1',
|
||||
name: '秦玉兰',
|
||||
department: '物业修维部'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '秦桂花',
|
||||
department: '物业修维部'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '李小明',
|
||||
department: '物业修维部'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
const item = JSON.parse(decodeURIComponent(options.item));
|
||||
this.detail = item;
|
||||
this.detail.orderImgUrl = "https://picsum.photos/80/80?random=3,https://picsum.photos/80/80?random=3,https://picsum.photos/80/80?random=3";
|
||||
console.log("t1",this.detail)
|
||||
// 现在可以使用item对象了
|
||||
// 进度映射
|
||||
if (item.status == 0) {
|
||||
this.detailStep = 0;
|
||||
this.detailStatus = '创建工单';
|
||||
} else if (item.status == 4) {
|
||||
this.detailStep = 3;
|
||||
this.detailStatus = '已结束';
|
||||
} else if(item.status == 3){
|
||||
this.detailStep = 2;
|
||||
this.detailStatus = '处理中';
|
||||
}else {
|
||||
this.detailStep = 1;
|
||||
this.detailStatus = '已接单';
|
||||
this.isManager = this.vuex_user.roles[0].roleId == 1
|
||||
if (options.item) {
|
||||
const item = JSON.parse(decodeURIComponent(options.item));
|
||||
this.detail = item;
|
||||
this.detail.orderImgUrl =
|
||||
"https://picsum.photos/80/80?random=3,https://picsum.photos/80/80?random=3,https://picsum.photos/80/80?random=3";
|
||||
console.log("t1", this.detail)
|
||||
// 现在可以使用item对象了
|
||||
// 进度映射
|
||||
if (item.status == 0) {
|
||||
this.detailStep = 0;
|
||||
this.detailStatus = '创建工单';
|
||||
} else if (item.status == 4) {
|
||||
this.detailStep = 3;
|
||||
this.detailStatus = '已结束';
|
||||
} else if (item.status == 3) {
|
||||
this.detailStep = 2;
|
||||
this.detailStatus = '处理中';
|
||||
} else {
|
||||
this.detailStep = 1;
|
||||
this.detailStatus = '已接单';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
@@ -98,11 +118,10 @@
|
||||
current: index
|
||||
});
|
||||
},
|
||||
onConfirm(selected) {
|
||||
},
|
||||
transfer() {
|
||||
uni.showToast({
|
||||
title: '转派功能开发中',
|
||||
icon: 'none'
|
||||
});
|
||||
this.showSelect = true
|
||||
},
|
||||
complete() {
|
||||
uni.showToast({
|
||||
@@ -110,18 +129,7 @@
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
downloadFile() {
|
||||
uni.downloadFile({
|
||||
url: this.detail.attachment,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -130,11 +138,13 @@
|
||||
.page-container {
|
||||
background: #fff;
|
||||
}
|
||||
.top-line{
|
||||
|
||||
.top-line {
|
||||
width: 100vw;
|
||||
height: 3rpx;
|
||||
background: #ECECEC;
|
||||
}
|
||||
|
||||
.repair-detail-progress-box {
|
||||
height: 107rpx;
|
||||
margin-bottom: 41rpx;
|
||||
@@ -214,10 +224,10 @@
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.detail-key{
|
||||
.detail-key {
|
||||
color: #595858;
|
||||
}
|
||||
|
||||
|
||||
.detail-value {
|
||||
margin-bottom: 30rpx;
|
||||
color: ##2F2F2F;
|
||||
@@ -237,7 +247,7 @@
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.image-item {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
|
Reference in New Issue
Block a user