Commit 73152ebd authored by Administrator's avatar Administrator

Merge branch 'master' into develop

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