Commit 39910790 authored by Administrator's avatar Administrator

工单详情

parent 68363ce4
...@@ -21,8 +21,8 @@ export function alarmOrderStore(data) { ...@@ -21,8 +21,8 @@ export function alarmOrderStore(data) {
// 更新 // 更新
export function alarmOrderUpdate(data, id) { export function alarmOrderUpdate(data, id) {
return request({ return request({
url: '/alarm_order/' + id, url: '/alarm_order/order_ok?id=' + id,
method: 'patch', method: 'post',
data, data,
}); });
} }
......
...@@ -176,10 +176,8 @@ ...@@ -176,10 +176,8 @@
<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="进度">{{ isOrderOneFilter(order_content.isorderone) }}</el-form-item> <el-form-item label="进度">{{ isOrderOneFilter(order_content.isorderone) }}</el-form-item>
<el-form-item> <el-form-item size="large">
<template slot="scope"> <el-button type="primary" @click="onSubmitDetail(order_content.id)">确认</el-button>
<el-button>完成</el-button>
</template>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -193,7 +191,7 @@ ...@@ -193,7 +191,7 @@
<script> <script>
import clip from '@/utils/clipboard'; import clip from '@/utils/clipboard';
import BackToTop from '@/components/BackToTop'; import BackToTop from '@/components/BackToTop';
import { alarmOrderUsers, alarmOrderList, alarmOrderDetail } from '@/api/alarmOrder'; import { alarmOrderUsers, alarmOrderList, alarmOrderDetail, alarmOrderUpdate } from '@/api/alarmOrder';
import Vue from 'vue'; import Vue from 'vue';
import VueAMap from 'vue-amap'; import VueAMap from 'vue-amap';
import { AMapManager } from 'vue-amap'; import { AMapManager } from 'vue-amap';
...@@ -363,6 +361,22 @@ export default { ...@@ -363,6 +361,22 @@ export default {
this.alarmOrdersData(); this.alarmOrdersData();
}, },
methods: { methods: {
onSubmitDetail(id) {
const data = {
state: 2,
isorderone: 4,
schedule: JSON.stringify({
'schedule': 1, 'content': '恭喜,你的工单完成啦!',
}),
};
alarmOrderUpdate(data, id).then(response => {
if (response.code === 200) {
this.$message.success('恭喜,你的工单完成啦!');
}
}).catch(err => {
console.log(err);
});
},
isLiveFilter(id) { isLiveFilter(id) {
const steps = []; const steps = [];
steps[1] = '到达现场'; steps[1] = '到达现场';
...@@ -411,13 +425,13 @@ export default { ...@@ -411,13 +425,13 @@ 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: '',
}, { }, {
schedule: 2, content: '进行中', created_at: '', schedule: 2, content: '', created_at: '',
}, { }, {
schedule: 3, content: '完成', created_at: '', schedule: 3, content: '', created_at: '',
}, { }, {
schedule: 4, content: '异常终止', created_at: '', schedule: 4, content: '', created_at: '',
}]; }];
if (response.code === 200) { if (response.code === 200) {
console.log(response.data); console.log(response.data);
......
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