Commit aa63ca10 authored by Administrator's avatar Administrator

Merge branch 'release/alarm_order'

parents 45ed0789 3fd7c9d5
Pipeline #219 failed with stage
...@@ -124,7 +124,14 @@ ...@@ -124,7 +124,14 @@
</el-tooltip> </el-tooltip>
<el-dialog title="工单详细信息" :visible.sync="dialogTableVisible" width="70%"> <el-dialog title="工单详细信息" :visible.sync="dialogTableVisible" width="70%">
<el-steps :active="order_content.isorderone" align-center style="margin-bottom: 40px;"> <el-steps :active="order_content.isorderone" align-center style="margin-bottom: 40px;">
<el-step v-for="(item, oindex) in order_step" :key="oindex + '1o'" :title="stepFilter(item.schedule)" :description="item.created_at + item.content"></el-step> <el-step
v-for="(item, oindex) in order_step"
:key="oindex + '1o'"
:title="stepFilter(item.schedule)"
:description="item.created_at + item.content"
:finish-status="item.finish_status"
>
</el-step>
</el-steps> </el-steps>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
...@@ -155,38 +162,41 @@ ...@@ -155,38 +162,41 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form size="mini"> <el-form size="mini">
<el-form-item label="订单编号">{{ order_content.order_num }}</el-form-item>
<el-form-item label="订单创建时间">{{ order_content.created_at }}</el-form-item>
<el-form-item label="订单更新时间">{{ order_content.updated_at }}</el-form-item>
<el-form-item label="设备编号">{{ order_content.devicenumber }}</el-form-item> <el-form-item label="设备编号">{{ order_content.devicenumber }}</el-form-item>
<el-form-item label="设备名称">{{ order_content.username }}</el-form-item> <el-form-item label="设备名称">{{ order_content.username }}</el-form-item>
<el-form-item label="类型">{{ order_content.tname }}</el-form-item> <el-form-item label="类型">{{ order_content.tname }}</el-form-item>
<el-form-item label="检测介质">{{ order_content.gas }}</el-form-item> <el-form-item label="检测介质">{{ order_content.gas }}</el-form-item>
<el-form-item label="位置">{{ order_content.deviceinfo }}</el-form-item> <el-form-item label="位置">{{ order_content.deviceinfo }}</el-form-item>
<el-form-item label="坐标">{{ order_content.devicecoord }}</el-form-item> <el-form-item label="坐标">{{ order_content.devicecoord }}</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form size="mini">
<el-form-item label="检测值">{{ order_content.concentration + order_content.danwei }}</el-form-item> <el-form-item label="检测值">{{ order_content.concentration + order_content.danwei }}</el-form-item>
<el-form-item label="报警类型">{{ order_content.status_name }}</el-form-item> <el-form-item label="报警类型">{{ order_content.status_name }}</el-form-item>
<el-form-item label="报警开始时间">{{ order_content.start_time }}</el-form-item> <el-form-item label="报警开始时间">{{ order_content.start_time }}</el-form-item>
<el-form-item label="报警结束时间">{{ order_content.end_time }}</el-form-item> <el-form-item label="报警结束时间">{{ order_content.end_time }}</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form size="mini">
<el-form-item label="订单编号">{{ order_content.order_num }}</el-form-item>
<el-form-item label="订单创建时间">{{ order_content.created_at }}</el-form-item>
<el-form-item label="订单更新时间">{{ order_content.updated_at }}</el-form-item>
<el-form-item label="接单人">{{ order_content.name }}</el-form-item> <el-form-item label="接单人">{{ order_content.name }}</el-form-item>
<el-form-item label="联系电话">{{ order_content.phone_number }}</el-form-item>
<el-form-item label="是否到达现场">{{ isLiveFilter(order_content.is_live) }}</el-form-item> <el-form-item label="是否到达现场">{{ isLiveFilter(order_content.is_live) }}</el-form-item>
<el-form-item label="是否属实">{{ isVerifiedFilter(order_content.is_verified) }}</el-form-item> <el-form-item label="是否属实">{{ isVerifiedFilter(order_content.is_verified) }}</el-form-item>
<el-form-item label="维修状态">{{ isRepairedFilter(order_content.isrepaired) }}</el-form-item>
<el-form-item label="进度">{{ isOrderOneFilter(order_content.isorderone) }}</el-form-item> <el-form-item label="进度">{{ isOrderOneFilter(order_content.isorderone) }}</el-form-item>
<el-form-item label="反馈内容">{{ order_content.content }}</el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" :disabled="order_content.isorderone < 4 ? true : false" @click="onSubmitDetail(order_content.id)">确认</el-button> <el-button type="primary" :disabled="order_content.isorderone < 4 || order_content.state === 2 ? true : false" @click="onSubmitDetail(order_content.id)">确认</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<div class="demo-image__preview"> <div class="demo-image">
<el-image <el-image
v-for="(item, index) in order_content.images" v-for="(item, index) in order_content.images"
:key="index + '1m'" :key="index + '1m'"
style="width: 100px; height: 100px" style="width: 100px; height: 100px; margin-right: 10px;"
:src="item.path" :src="item.path"
:preview-src-list="order_content.srcList" :preview-src-list="order_content.srcList"
> >
...@@ -375,7 +385,7 @@ export default { ...@@ -375,7 +385,7 @@ export default {
const data = { const data = {
state: 2, state: 2,
schedule: JSON.stringify({ schedule: JSON.stringify({
'schedule': 1, 'content': '恭喜,你的工单完成啦!', 'schedule': 5, 'content': '恭喜,你的工单完成啦!',
}), }),
}; };
alarmOrderUpdate(data, id).then(response => { alarmOrderUpdate(data, id).then(response => {
...@@ -400,6 +410,12 @@ export default { ...@@ -400,6 +410,12 @@ export default {
steps[2] = '不属实'; steps[2] = '不属实';
return steps[id]; return steps[id];
}, },
isRepairedFilter(id) {
const status = [];
status[1] = '已修好';
status[2] = '未修好';
return status[id];
},
isOrderOneFilter(id) { isOrderOneFilter(id) {
const steps = []; const steps = [];
steps[1] = '开始'; steps[1] = '开始';
...@@ -414,6 +430,7 @@ export default { ...@@ -414,6 +430,7 @@ export default {
steps[2] = '已接单'; steps[2] = '已接单';
steps[3] = '进行中'; steps[3] = '进行中';
steps[4] = '已完成'; steps[4] = '已完成';
steps[5] = '审核';
return steps[step]; return steps[step];
}, },
alarmShow(data) { alarmShow(data) {
...@@ -431,6 +448,7 @@ export default { ...@@ -431,6 +448,7 @@ export default {
status[1] = { content: '进行中', type: 'warning' }; status[1] = { content: '进行中', type: 'warning' };
status[2] = { content: '完成', type: 'success' }; status[2] = { content: '完成', type: 'success' };
status[3] = { content: '异常终止', type: 'info' }; status[3] = { content: '异常终止', type: 'info' };
status[4] = { content: '已提交未审核', type: 'warning' };
if (type === 'type') { if (type === 'type') {
return status[state].type; return status[state].type;
} }
...@@ -442,13 +460,15 @@ export default { ...@@ -442,13 +460,15 @@ export default {
orderDetail(id) { orderDetail(id) {
alarmOrderDetail(id).then(response => { alarmOrderDetail(id).then(response => {
const all_steps = [{ const all_steps = [{
schedule: 1, content: '', created_at: '', schedule: 1, content: '', created_at: '', finish_status: 'finish',
}, { }, {
schedule: 2, content: '', created_at: '', schedule: 2, content: '', created_at: '', finish_status: 'finish',
}, { }, {
schedule: 3, content: '', created_at: '', schedule: 3, content: '', created_at: '', finish_status: 'finish',
}, { }, {
schedule: 4, content: '', created_at: '', schedule: 4, content: '', created_at: '', finish_status: 'finish',
}, {
schedule: 5, content: '', created_at: '', finish_status: 'finish',
}]; }];
if (response.code === 200) { if (response.code === 200) {
console.log(response.data); console.log(response.data);
...@@ -465,6 +485,9 @@ export default { ...@@ -465,6 +485,9 @@ export default {
} }
} }
this.order_step = all_steps; this.order_step = all_steps;
if (response.data.state === 2) {
this.order_content.isorderone = 5;
}
console.log(this.order_step); console.log(this.order_step);
} }
}).catch(err => { }).catch(err => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment