Commit f7357d54 authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

parents 2ed66b2a b0a5815a
...@@ -12,6 +12,51 @@ ...@@ -12,6 +12,51 @@
</div> </div>
</div> </div>
<div style="width: 100%;height: 200px;">
<!-- <div style="color: #31EAEA;width: 30%;height: 30px;">
<ul><li>详细信息</li></ul>
</div> -->
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="设备类型:" prop="deviceType">
<font v-if="form.deviceType == 0">管道</font>
<font v-if="form.deviceType == 1">调压阀</font>
<font v-if="form.deviceType == 2">阀门井</font>
<font v-if="form.deviceType == 3">流量计</font>
<font v-if="form.deviceType == 4">压力表</font>
</el-form-item>
<el-form-item label="设备编号:" prop="deviceCode">
<font>{{form.deviceCode}}</font>
</el-form-item>
</el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="报警类型:" prop="alarmType">
<font>{{form.alarmType}}</font>
</el-form-item>
<el-form-item label="报警值:" prop="alarmValue">
<font>{{form.alarmValue}}</font>
</el-form-item>
</el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="报警开始时间:" prop="startTime">
<font>{{form.startTime}}</font>
</el-form-item>
<el-form-item label="报警结束时间:" prop="updateTime">
<font>{{form.endTime}}</font>
</el-form-item>
</el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="处理状态:" prop="dealStatus">
<font v-if="form.dealStatus == 1">不需要处理</font>
<font v-if="form.dealStatus == 2">已处理完成</font>
<font v-if="form.dealStatus == 3">未处理完成</font>
</el-form-item>
</el-form>
</div>
<el-divider></el-divider>
<div style="width: 100%;height: 350px;padding: 10px;height: 300px;"> <div style="width: 100%;height: 350px;padding: 10px;height: 300px;">
<div style="width: 66.6%;float: left;height: 100%;"> <div style="width: 66.6%;float: left;height: 100%;">
<el-table <el-table
...@@ -69,7 +114,7 @@ ...@@ -69,7 +114,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div id="marbox" style="width: 33%;height: 350px; border: 1px solid rgb(218, 213, 213);float: right;margin-top: -45px;"> <div id="marbox" style="width: 33%;height: 304px; border: 1px solid rgb(218, 213, 213);float: right;">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="container"></div>
</div> </div>
</div> </div>
...@@ -91,13 +136,13 @@ ...@@ -91,13 +136,13 @@
<script> <script>
import { listBasicsInfo, getBasicsInfo, delBasicsInfo, addBasicsInfo, updateBasicsInfo, exportBasicsInfo } from "@/api/workOrder/basicsInfo"; import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import echarts from 'echarts'; import echarts from 'echarts';
// Vue.prototype.$echarts = echarts; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
export default { export default {
name: "BasicsInfo", name: "BasicsInfo",
...@@ -111,11 +156,6 @@ export default { ...@@ -111,11 +156,6 @@ export default {
address: '上海市普陀区金沙江路 1518 弄' address: '上海市普陀区金沙江路 1518 弄'
},], },],
inspector: [], inspector: [],
isDisplay:false,
dialogImageUrl: '',
dialogVisible: false,
disabled: false,
imageUrl: '',
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -130,51 +170,42 @@ export default { ...@@ -130,51 +170,42 @@ export default {
showSearch: true, showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 工单基础信息表格数据 rules:{},
basicsInfoList: [], // 报警信息表格数据
// feedbackList: [], deviceAlarmList: [],
// 报警类型字典
typeOptions: [],
// 设备级联
options: [],
props: {
multiple: true,
value: "id",
label: "name",
level: "level",
children: "childList",
},
devices: null,
// 巡检员列表
inspector: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 工单状态字典
typeOptions: [],
pickerOptions:[],
// 工单类型字典
ordertypeOptions: [],
// 设备树选项
deviceOptions: [
{
label: "设备列表",
childList: []
}
],
defaultProps: {
children: "childList",
label: "label"
},
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderType: null, deviceId: null,
orderName: null, orderId: null,
orderStatus: null, alarmType: null,
appointInspector: null, alarmValue: null,
allotTime: null, startTime: null,
actualInspector: null, endTime: null,
actualTime: null, dealStatus: null
remarks: null
}, },
// 表单参数 // 表单参数
form: {}, form: { },
activity: {},
// 表单校验
rules: {
},
active : 0,
orderId : "",
showAndHide : false
}; };
}, },
...@@ -189,12 +220,12 @@ export default { ...@@ -189,12 +220,12 @@ export default {
this.getDicts("t_order_type").then(response => { this.getDicts("t_order_type").then(response => {
this.ordertypeOptions = response.data; this.ordertypeOptions = response.data;
}); });
this.getBasicsInfo(); this.getDeviceAlarm();
}, },
mounted(){ mounted(){
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.getBasicsInfo(); this.getDeviceAlarm();
this.initData(); this.initData();
this.drawPieChart(); this.drawPieChart();
this.main3(); this.main3();
...@@ -752,14 +783,14 @@ export default { ...@@ -752,14 +783,14 @@ export default {
/** 查询工单基础信息列表 */ /** 查询工单基础信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listBasicsInfo(this.queryParams).then(response => { listDeviceAlarm(this.queryParams).then(response => {
this.basicsInfoList = response.rows; this.deviceAlarmList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
getBasicsInfo (){ getDeviceAlarm (){
getBasicsInfo(this.orderId).then(response =>{ getDeviceAlarm(this.orderId).then(response =>{
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ if(this.form.deviceInfoList.length>0){
...@@ -837,7 +868,7 @@ export default { ...@@ -837,7 +868,7 @@ export default {
/** 归档按钮操作 */ /** 归档按钮操作 */
handleFinish(res) { handleFinish(res) {
// this.reset(); // this.reset();
getBasicsInfo(res).then(response => { getDeviceAlarm(res).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "工单信息归档"; this.title = "工单信息归档";
...@@ -847,7 +878,7 @@ export default { ...@@ -847,7 +878,7 @@ export default {
handleUpdate(res) { handleUpdate(res) {
// this.reset(); // this.reset();
this.getInspectorList(); this.getInspectorList();
getBasicsInfo(this.orderId).then(response => { getInspectorList(this.orderId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "工单信息修改"; this.title = "工单信息修改";
......
...@@ -243,6 +243,7 @@ export default { ...@@ -243,6 +243,7 @@ export default {
this.deviceAlarmList = response.rows; this.deviceAlarmList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
console.log("this.deviceAlarmList",this.deviceAlarmList)
}); });
}, },
getInspectorList(){ getInspectorList(){
......
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
// 表单校验 // 表单校验
rules: { rules: {
planName: [ planName: [
{ required: true, message: "计划名称不能为空", trigger: "blur" } { required: true, message: " 计划名称不能为空", trigger: "blur" }
], ],
orderName: [ orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" } { required: true, message: "工单名称不能为空", trigger: "blur" }
...@@ -321,6 +321,7 @@ ...@@ -321,6 +321,7 @@
this.inspectionPlanList = response.rows; this.inspectionPlanList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
console.log("this.inspectionPlanList",this.inspectionPlanList)
}); });
}, },
/** 详细信息跳转 */ /** 详细信息跳转 */
...@@ -328,7 +329,7 @@ ...@@ -328,7 +329,7 @@
this.$router.push({ this.$router.push({
path: '/inspectionPlan/inspectiondetail', path: '/inspectionPlan/inspectiondetail',
query:{ query:{
orderId : row.orderId planId : row.planId
} }
}) //带参跳转 }) //带参跳转
}, },
......
...@@ -26,38 +26,22 @@ ...@@ -26,38 +26,22 @@
<ul><li>详细信息</li></ul> <ul><li>详细信息</li></ul>
</div> </div>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<!-- <el-form-item label="工单类型:" prop="orderType"> <el-form-item label="巡检名称:" prop="planName">
<font v-if="form.orderType == 1">巡检信息</font> <font>{{form.planName}}</font>
<font v-if="form.orderType == 2">隐患信息</font>
<font v-if="form.orderType == 3">报警信息</font>
</el-form-item> </el-form-item>
<el-form-item label="工单编号:" prop="orderId"> <el-form-item label="检测地点:" prop="address">
<font>{{form.orderId}}</font> <font>{{form.address}}</font>
</el-form-item> -->
<el-form-item label="巡检名称:" prop="orderName">
<font>{{form.orderName}}</font>
</el-form-item>
<!-- <el-form-item label="工单状态:" prop="orderStatus">
<font v-if="form.orderStatus == 0">未接收</font>
<font v-if="form.orderStatus == 1">已接收</font>
<font v-if="form.orderStatus == 2">已反馈</font>
<font v-if="form.orderStatus == 3">已归档</font>
</el-form-item> -->
<el-form-item label="选择人员:" prop="appointInspectorName">
<font>{{form.appointInspectorName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="检测地点:" prop="appointInspectorName">
<font>{{form.appointInspectorName}}</font> <el-form-item label="计划执行时间:" prop="startTime">
<font>{{form.startTime}}{{form.endTime}}</font>
</el-form-item> </el-form-item>
<el-form-item label="计划描述:" prop="appointInspectorName"> <el-form-item label="计划描述:" prop="remarks">
<div style="height: 90px;border: 1px solid rgb(187, 183, 183);margin-top: 10px;overflow-y: auto;padding: 5px;border-radius: 5px;"> <div style="height: 90px;width: 250px; border: 1px solid rgb(187, 183, 183);margin-top: 10px;overflow-y: auto;padding: 5px;border-radius: 5px;">
<font>{{form.appointInspectorName}} <font>{{form.remarks}}
</font> </font>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-form-item label="工单描述:" prop="remarks">
<font>{{form.remarks}}</font>
</el-form-item> -->
</el-form> </el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;width: 25%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;width: 25%;">
<el-form-item label="设备类型:" prop="deviceType" v-if="form.orderType != 1"> <el-form-item label="设备类型:" prop="deviceType" v-if="form.orderType != 1">
...@@ -68,211 +52,75 @@ ...@@ -68,211 +52,75 @@
<font v-if="form.deviceType == 4">压力表</font> <font v-if="form.deviceType == 4">压力表</font>
</el-form-item> </el-form-item>
<el-form-item label="设备名称:" prop="deviceName"> <el-form-item label="设备名称:" prop="deviceName">
<font v-if="form.orderType != 1">{{form.deviceName}}</font> <!-- <font v-if="form.orderType != 1">{{form.deviceName}}</font> -->
<el-tree <el-tree
:data="deviceOptions" :data="deviceOptions"
:props="defaultProps" :props="defaultProps"
:expand-on-click-node="false" :expand-on-click-node="false"
ref="tree" ref="tree"
@node-click="handleNodeClick" @node-click="handleNodeClick"
v-if="form.orderType == 1"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="设备位置:" v-if="form.orderType != 1">
<font>{{form.address}}</font>
</el-form-item>
<el-form-item label="工单进度:" v-if="form.orderType == 1">
<font>{{form.finishNum}}/{{form.deviceNum}}</font>
</el-form-item> -->
<el-form-item label="计划执行时间:" prop="allotTime">
<font>{{form.allotTime}}-{{form.allotTime}}</font>
</el-form-item>
<!-- <el-form-item label="接收时间:" prop="actualTime">
<font>{{form.actualTime}}</font>
</el-form-item> -->
</el-form> </el-form>
<div id="marbox" style="width: 700px;height: 250px;float: left;margin-top: -35px; border: 1px solid rgb(218, 213, 213);"> <div id="marbox" style="width: 700px;height: 250px;float: left;margin-top: -35px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="container"></div>
</div> </div>
</div> </div>
<!-- 接单信息 --> <!-- 接单信息 -->
<div v-if="form.actualTime != '' && form.actualTime != null"> <div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="color: #31EAEA;width: 100%;height: 40px;"> <div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>接单信息</li></ul> <ul><li>接单信息</li></ul>
</div> </div>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="margin-left: 50px;height: 30px;width: 100%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="margin-left: 50px;height: 30px;width: 100%;">
<el-form-item label="下发人员:" prop="actualInspectorName" style="float: left;width: 15%;"> <el-form-item label="下发人员:" prop="appointInspectorName" style="float: left;width: 15%;">
<font>{{form.actualInspectorName}}</font> <font>{{form.appointInspectorName}}</font>
</el-form-item>
<el-form-item label="下发时间:" prop="actualTime" style="float: left;width: 20%;">
<font>{{form.actualTime}}</font>
</el-form-item>
<el-form-item label="工单编号:" prop="actualTime" style="float: left;">
<font>{{form.actualTime}}</font>
</el-form-item>
</el-form>
</div>
<el-divider></el-divider>
<!-- 反馈信息 -->
<!-- <div style="width: 100%;font-weight: 600;" v-if="form.feedbackList != null">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>反馈信息</li></ul>
</div>
<div class="block" style="width: 95%;margin-left: 2%;">
<el-timeline ref="timeline">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index" :timestamp="activity.feedbackTime">
<el-card>
<div style="width: 600px;float: left;">
<div style=" width: 600px;">
<div style="float: left;margin-left: 50px; width: 250px;">
<p>设备类型:
<span v-if="activity.deviceType == 0">管道</span>
<span v-if="activity.deviceType == 1">调压箱</span>
<span v-if="activity.deviceType == 2">阀门井</span>
<span v-if="activity.deviceType == 3">流量计</span>
<span v-if="activity.deviceType == 4">压力表</span>
</p>
<p>是否有隐患:
<span v-if="activity.isHiddenDanger == 1"></span>
<span v-if="activity.isHiddenDanger == 2"></span>
</p>
<p v-if="activity.isHiddenDanger == 1">处理状态:
<span v-if="activity.dealStatus == 1">不需要处理</span>
<span v-if="activity.dealStatus == 2">已处理完成</span>
<span v-if="activity.dealStatus == 3">未处理完成</span>
</p>
<div style="width: 600px;">
<p>反馈信息:
<span>{{activity.contents}}</span>
</p>
</div>
</div>
<div style="float: left;margin-left: 50px; width: 250px;">
<p>设备名称:{{activity.deviceName}}</p>
<p>反馈时间:{{activity.feedbackTime}}</p>
</div>
</div>
</div>
<div class="feedbackTime-div">
<div class="feedbackTime">
<el-image :src="activity.pictureUrl1" :preview-src-list="[activity.pictureUrl1]" v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl2" :preview-src-list="[activity.pictureUrl2]" v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl3" :preview-src-list="[activity.pictureUrl3]" v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 90px;"></el-image>
</div>
</div>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div style="width: 95%;position: relative;" @click="changeDisplay(scope)">
<i class="el-icon-arrow-down" v-if="isDisplay==false" style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
</div>
<el-divider></el-divider>
</div> -->
<!-- 归档 -->
<!-- <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleUpdate(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:edit']"
>修改</el-button>
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleFinish(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:editStatus']"
>归档</el-button>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div v-if="this.title == '工单信息修改'">
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspectorName" placeholder="请选择执行人员" clearable size="small" @change="setUserId">
<el-option
v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入工单描述" />
</el-form-item>
</div>
<div v-if="this.title == '工单信息归档'">
<el-form-item label="工单名称" prop="orderName">
<font>{{form.orderName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="工单类型" prop="orderType"> <el-form-item label="下发时间:" prop="allotTime" style="float: left;width: 20%;">
<span type="primary" v-if="form.orderType == 1">巡检信息</span> <font>{{form.allotTime}}</font>
<span type="primary" v-if="form.orderType == 2">隐患信息</span>
<span type="primary" v-if="form.orderType == 3">报警信息</span>
</el-form-item> </el-form-item>
<el-form-item label="工单编号" prop="orderId"> <el-form-item label="工单编号:" prop="orderId" style="float: left;">
<font>{{form.orderId}}</font> <font>{{form.orderId}}</font>
</el-form-item> </el-form-item>
<el-form-item label="归档信息" prop="archiving">
<el-input v-model="form.archiving" type="textarea" placeholder="请输入归档信息" />
</el-form-item>
</div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> <el-divider></el-divider>
</div> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { listBasicsInfo, getBasicsInfo, delBasicsInfo, addBasicsInfo, updateBasicsInfo, exportBasicsInfo } from "@/api/workOrder/basicsInfo"; import { listInspectionPlan, getInspectionPlan, addInspectionPlan, updateInspectionPlan } from "@/api/deviceInspection/inspectionPlan";
import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import { deviceNodeTree } from "@/api/device/deviceInfo";
export default { export default {
name: "BasicsInfo", name: "InspectionPlan",
components: { components: {
}, },
data() { data() {
return { return {
inspector: [],
isDisplay:false,
dialogImageUrl: '',
dialogVisible: false,
disabled: false,
imageUrl: '',
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 选中数组 // 选中数组
ids: [], ids: [],
// 设备树选项
defaultProps: {
children: "childList",
label: "label"
},
deviceOptions: [
{
label: "设备列表",
childList: []
}
],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
...@@ -281,57 +129,67 @@ export default { ...@@ -281,57 +129,67 @@ export default {
showSearch: true, showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 工单基础信息表格数据 // 巡检计划表格数据
basicsInfoList: [], inspectionPlanList: [],
// feedbackList: [], // 计划状态字典
typeOptions: [],
// 设备级联
options: [],
plansName: '',
props: {
multiple: true,
value: "id",
label: "name",
level: "level",
children: "childList",
},
devices: null,
// 巡检员列表
inspector: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 工单状态字典
typeOptions: [],
pickerOptions:[],
// 工单类型字典
ordertypeOptions: [],
// 设备树选项
deviceOptions: [
{
label: "设备列表",
childList: []
}
],
defaultProps: {
children: "childList",
label: "label"
},
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderType: null, planName: null,
orderName: null, orderId: null,
orderStatus: null, startTime: null,
appointInspector: null, endTime: null,
allotTime: null, planStatus: null,
actualInspector: null,
actualTime: null,
remarks: null remarks: null
}, },
// 表单参数 // 表单参数
form: {}, form: { },
activity: {},
// 表单校验 // 表单校验
rules: { rules: {
}, // planName: [
active : 0, // { required: true, message: " 计划名称不能为空", trigger: "blur" }
orderId : "", // ],
showAndHide : false // orderName: [
// { required: true, message: "工单名称不能为空", trigger: "blur" }
// ],
// devices: [
// { required: true, message: "请选择巡检设备", trigger: "blur" }
// ],
// startTime: [
// { required: true, message: "请选择开始时间", trigger: "blur" }
// ],
// endTime: [
// { required: true, message: "请选择结束时间", trigger: "blur" }
// ],
// appointInspector: [
// { required: true, message: "请选择巡检人员", trigger: "blur" }
// ],
}
}; };
}, },
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.orderId = this.$route.query.orderId; this.planId = this.$route.query.planId;
this.getList(); this.getList();
this.getDicts("t_order_status").then(response => { this.getDicts("t_order_status").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
...@@ -339,12 +197,12 @@ export default { ...@@ -339,12 +197,12 @@ export default {
this.getDicts("t_order_type").then(response => { this.getDicts("t_order_type").then(response => {
this.ordertypeOptions = response.data; this.ordertypeOptions = response.data;
}); });
this.getBasicsInfo(); this.getInspectionPlan();
}, },
mounted(){ mounted(){
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.getBasicsInfo(); this.getInspectionPlan();
}, },
methods: { methods: {
getInspectorList(){ getInspectorList(){
...@@ -392,28 +250,29 @@ export default { ...@@ -392,28 +250,29 @@ export default {
/** 查询工单基础信息列表 */ /** 查询工单基础信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listBasicsInfo(this.queryParams).then(response => { listInspectionPlan(this.queryParams).then(response => {
this.basicsInfoList = response.rows; this.inspectionPlanList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
getBasicsInfo (){ getInspectionPlan (){
getBasicsInfo(this.orderId).then(response =>{ getInspectionPlan(this.planId).then(response =>{
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ console.log("this.form",this.form)
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]); if(this.form.inspectionPlanList.length>0){
this.gaoMap.resetMapCenter([this.form.inspectionPlanList[0].longitude,this.form.inspectionPlanList[0].latitude]);
} }
for(var i = 0; i < this.form.deviceInfoList.length; i++){ for(var i = 0; i < this.form.inspectionPlanList.length; i++){
let obj = this.form.deviceInfoList[i]; let obj = this.form.inspectionPlanList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
} }
if(this.form.orderType == '1') { if(this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
key1:this.form.deviceInfoList, key1:this.form.inspectionPlanList,
key2:this.form.pipeList key2:this.form.pipeList
}; };
deviceTree(data).then(response => { deviceTree(data).then(response => {
...@@ -439,6 +298,7 @@ export default { ...@@ -439,6 +298,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
planId: null,
orderId: null, orderId: null,
orderType: null, orderType: null,
orderName: null, orderName: null,
...@@ -477,20 +337,24 @@ export default { ...@@ -477,20 +337,24 @@ export default {
/** 归档按钮操作 */ /** 归档按钮操作 */
handleFinish(res) { handleFinish(res) {
// this.reset(); // this.reset();
getBasicsInfo(res).then(response => { getInspectionPlan(res).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "工单信息归档"; this.title = "工单信息归档";
}); });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(res) { handleUpdate(row) {
// this.reset(); this.reset();
this.getInspectorList(); deviceNodeTree().then(response => {
getBasicsInfo(res).then(response => { this.options = response.data;
});
const planId = row.planId || this.ids
getInspectionPlan(planId).then(response => {
this.form = response.data; this.form = response.data;
this.form.devices = eval(this.form.deviceIds);
this.open = true; this.open = true;
this.title = "工单信息修改"; this.title = "修改巡检计划";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
......
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