Commit 73152ebd authored by Administrator's avatar Administrator

Merge branch 'master' into develop

parents f7b4232c 1c52ab5a
......@@ -65,6 +65,7 @@ class AlarmOrderController extends Controller
->where($where)
->whereBetween('alarm_order.created_at',$whereBetween)
->limit($limit)
->orderByDesc('id')
->get()->toArray();
$count = AlarmOrder::leftjoin('reportpolice AS r', 'r.id', '=', 'alarm_order.reportpolice_id')
->leftjoin('users AS u', 'alarm_order.user_id', '=', 'u.id')
......@@ -97,6 +98,7 @@ class AlarmOrderController extends Controller
->leftjoin('device_type AS t', 'r.policestatus', '=', 't.tid')
->whereIn('alarm_order.state',explode(',',$request->input('userstate')))
->where('u.id','=',Auth::id())
->orderByDesc('id')
->get()->toArray();
return $this->jsonSuccessData($orders);
}
......
......@@ -66,17 +66,17 @@
>
</el-pagination>
<el-table :key="tableKey" :data="alarmOrders" border fit highlight-current-rows>
<el-table-column label="工单号" width="209">
<el-table-column label="工单号" width="180">
<template slot-scope="scope">
<span @click="handleCopy(scope.row.order_num,$event)">{{ scope.row.order_num }}</span>
</template>
</el-table-column>
<el-table-column label="设备编号" width="209">
<el-table-column label="设备编号" width="180">
<template slot-scope="scope">
<span @click="handleCopy(scope.row.devicenumber,$event)">{{ scope.row.devicenumber }}</span>
</template>
</el-table-column>
<el-table-column label="接单人" width="140">
<el-table-column label="接单人" width="100">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
......@@ -91,7 +91,7 @@
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="报警类型" width="130">
<el-table-column label="报警类型" width="80">
<template slot-scope="scope">
<span>{{ scope.row.status_name }}</span>
</template>
......@@ -113,7 +113,7 @@
<span>{{ scope.row.updated_at }}</span>
</template>
</el-table-column>
<el-table-column label="--">
<el-table-column label="--" width="140">
<template slot-scope="scope">
<el-button @click="alarmShow(scope.row)">详细信息</el-button>
</template>
......@@ -135,7 +135,7 @@
</el-steps>
<el-row :gutter="20">
<el-col :span="8">
<div class="amap-page-container" style="height: 350px; width: 350px;">
<div class="amap-page-container" style="height: 350px;">
<el-amap
ref="map"
vid="amapDemo"
......@@ -187,7 +187,7 @@
<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-button type="primary" :disabled="order_content.isorderone < 4 || order_content.state === 2 ? true : false" @click="onSubmitDetail(order_content.id)">确认</el-button>
<el-button type="primary" :disabled="buttonStatus" @click="onSubmitDetail(order_content.id)">确认</el-button>
</el-form-item>
</el-form>
</el-col>
......@@ -274,6 +274,7 @@ export default {
data() {
const _this = this;
return {
buttonStatus: true,
order_content: {},
order_step: [],
marker: {
......@@ -384,6 +385,7 @@ export default {
onSubmitDetail(id) {
const data = {
state: 2,
isorderone: 4,
schedule: JSON.stringify({
'schedule': 5, 'content': '恭喜,你的工单完成啦!',
}),
......@@ -422,6 +424,7 @@ export default {
steps[2] = '等待';
steps[3] = '检修';
steps[4] = '完成';
steps[5] = '审核通过';
return steps[id];
},
stepFilter(step) {
......@@ -458,6 +461,7 @@ export default {
},
// 工单详情
orderDetail(id) {
this.buttonStatus = true;
alarmOrderDetail(id).then(response => {
const all_steps = [{
schedule: 1, content: '', created_at: '', finish_status: 'finish',
......@@ -485,6 +489,10 @@ export default {
}
}
this.order_step = all_steps;
console.log((this.order_content.isorderone === 4) && (this.order_content.state === 4));
if ((this.order_content.isorderone === 3) && (this.order_content.state === 4)) {
this.buttonStatus = false;
}
if (response.data.state === 2) {
this.order_content.isorderone = 5;
}
......
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