|
|
|
@ -12,10 +12,10 @@
|
|
|
|
|
<el-select v-model="inspectTake.deptCode" placeholder="请选择部门" clearable="true"
|
|
|
|
|
:disabled="inspectTake.id !== null" @change="deptChange" style="width: 90%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in deptList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
v-for="item in deptList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -27,10 +27,10 @@
|
|
|
|
|
<el-select v-model="inspectTake.invCode" :disabled="inspectTake.id !== null" placeholder="请选择仓库"
|
|
|
|
|
clearable="true" style="width: 90%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -70,10 +70,10 @@
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="项目类型:" prop="type">
|
|
|
|
|
<el-form-item label="任务类型:" prop="type">
|
|
|
|
|
<el-select v-model="inspectTake.type" style="width: 90%"
|
|
|
|
|
@change="repairType"
|
|
|
|
|
disabled placeholder="请选择项目类型" clearable="true">
|
|
|
|
|
disabled placeholder="请选择任务类型" clearable="true">
|
|
|
|
|
<el-option label="巡检" :value="1"></el-option>
|
|
|
|
|
<el-option label="养护" :value="2"></el-option>
|
|
|
|
|
<el-option label="报修" :value="3"></el-option>
|
|
|
|
@ -83,14 +83,14 @@
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="巡检人:" prop="inspectUser">
|
|
|
|
|
<el-select v-model="inspectTake.inspectUser" disabled placeholder="委托验收人" clearable
|
|
|
|
|
<el-form-item label="负责人:" prop="inspectUser">
|
|
|
|
|
<el-select v-model="inspectTake.inspectUser" disabled placeholder="请选择负责人" clearable
|
|
|
|
|
style="width: 90%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in userList"
|
|
|
|
|
:key="item.userid"
|
|
|
|
|
:label="item.employeeName"
|
|
|
|
|
:value="item.userid">
|
|
|
|
|
v-for="item in userList"
|
|
|
|
|
:key="item.userid"
|
|
|
|
|
:label="item.employeeName"
|
|
|
|
|
:value="item.userid">
|
|
|
|
|
<span style="float: left">{{ item.employeeName }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -102,7 +102,7 @@
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item class="query-form-item" label="维修类型:" prop="repairType">
|
|
|
|
|
<el-select v-model="inspectTake.repairType"
|
|
|
|
|
disabled
|
|
|
|
|
disabled
|
|
|
|
|
placeholder="请选择维修类型" style="width: 90%" clearable>
|
|
|
|
|
<el-option label="自行维修" :value=1></el-option>
|
|
|
|
|
<el-option label="外部维修" :value=2></el-option>
|
|
|
|
@ -139,10 +139,13 @@
|
|
|
|
|
|
|
|
|
|
<el-row type="flex" justify="end">
|
|
|
|
|
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px">
|
|
|
|
|
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" v-if="type != 5" :loading="loading">选入</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" v-if="type != 5" :loading="loading">
|
|
|
|
|
选入
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
|
|
|
|
|
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading" v-if="type != 5">新增</el-button>
|
|
|
|
|
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading" v-if="type != 5">新增
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -155,7 +158,7 @@
|
|
|
|
|
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="巡检图片" prop="inspectImage" width="250">
|
|
|
|
|
<el-table-column label="现场照片" prop="inspectImage" width="250">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.inspectImage }}</div>
|
|
|
|
|
</template>
|
|
|
|
@ -173,35 +176,35 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="name"
|
|
|
|
|
:visible.sync="inspectTakeSetVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="45%"
|
|
|
|
|
append-to-body
|
|
|
|
|
v-if="inspectTakeSetVisible"
|
|
|
|
|
:title="name"
|
|
|
|
|
:visible.sync="inspectTakeSetVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="45%"
|
|
|
|
|
append-to-body
|
|
|
|
|
v-if="inspectTakeSetVisible"
|
|
|
|
|
>
|
|
|
|
|
<DeviceInspectTakeProjectSet
|
|
|
|
|
:inputQuery="inputQuery"
|
|
|
|
|
:editType="editType"
|
|
|
|
|
:type="type"
|
|
|
|
|
:closeDialog="inspectTakeSetCloseDialog"
|
|
|
|
|
:inputQuery="inputQuery"
|
|
|
|
|
:editType="editType"
|
|
|
|
|
:type="type"
|
|
|
|
|
:closeDialog="inspectTakeSetCloseDialog"
|
|
|
|
|
></DeviceInspectTakeProjectSet>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="巡检任务选入"
|
|
|
|
|
:visible.sync="inspectSelectPlanSetVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="80%"
|
|
|
|
|
append-to-body
|
|
|
|
|
v-if="inspectSelectPlanSetVisible"
|
|
|
|
|
title="项目选入"
|
|
|
|
|
:visible.sync="inspectSelectPlanSetVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="80%"
|
|
|
|
|
append-to-body
|
|
|
|
|
v-if="inspectSelectPlanSetVisible"
|
|
|
|
|
>
|
|
|
|
|
<DeviceProjectSelectTake
|
|
|
|
|
:inputQuery="inputQuery"
|
|
|
|
|
:type="inspectTake.type"
|
|
|
|
|
:closeDialog="inspectTakeSetCloseDialog"
|
|
|
|
|
:inputQuery="inputQuery"
|
|
|
|
|
:type="inspectTake.type"
|
|
|
|
|
:closeDialog="inspectTakeSetCloseDialog"
|
|
|
|
|
></DeviceProjectSelectTake>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
@ -249,7 +252,7 @@ export default {
|
|
|
|
|
invList: [],
|
|
|
|
|
userList: [],
|
|
|
|
|
imgList: [],
|
|
|
|
|
name:'',
|
|
|
|
|
name: '',
|
|
|
|
|
isColse: false,
|
|
|
|
|
BASE_URL: process.env.VUE_APP_BASE_API,
|
|
|
|
|
editType: null,
|
|
|
|
@ -274,7 +277,7 @@ export default {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
taskOrderIdFk: null
|
|
|
|
|
},
|
|
|
|
|
ischeck:false,
|
|
|
|
|
ischeck: false,
|
|
|
|
|
deviceList: [],
|
|
|
|
|
delectList: [],
|
|
|
|
|
deviceTotal: 0,
|
|
|
|
@ -307,12 +310,12 @@ export default {
|
|
|
|
|
getInvList() {
|
|
|
|
|
let params = {deptCode: this.inspectTake.deptCode};
|
|
|
|
|
getInvListByUser(params)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
submit(status) {
|
|
|
|
|
//判断状态
|
|
|
|
@ -342,11 +345,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//!-------------------------------------------------------------- 新加方法 --------------------------------------------------------- //
|
|
|
|
|
repairType(val){
|
|
|
|
|
if(val == 3){
|
|
|
|
|
repairType(val) {
|
|
|
|
|
if (val == 3) {
|
|
|
|
|
//报修
|
|
|
|
|
this.ischeck = true;
|
|
|
|
|
}else
|
|
|
|
|
} else
|
|
|
|
|
this.ischeck = false;
|
|
|
|
|
},
|
|
|
|
|
delectPlanFunction(row) {
|
|
|
|
@ -403,7 +406,7 @@ export default {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
taskOrderIdFk: null
|
|
|
|
|
},
|
|
|
|
|
this.inputQuery.status = 1
|
|
|
|
|
this.inputQuery.status = 1
|
|
|
|
|
this.inputQuery.inspectUser = this.inspectTake.inspectUser
|
|
|
|
|
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
|
|
|
|
|
} else {
|
|
|
|
@ -415,9 +418,9 @@ export default {
|
|
|
|
|
this.inspectTakeSetVisible = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectPlanFunction(row){
|
|
|
|
|
selectPlanFunction(row) {
|
|
|
|
|
if (this.inspectTake.orderId != null) { //edit
|
|
|
|
|
if(isBlank(row)){
|
|
|
|
|
if (isBlank(row)) {
|
|
|
|
|
this.inputQuery = {
|
|
|
|
|
id: null,
|
|
|
|
|
projectCode: null,
|
|
|
|
@ -429,12 +432,12 @@ export default {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
taskOrderIdFk: null
|
|
|
|
|
},
|
|
|
|
|
this.inputQuery.inspectUser = this.inspectTake.inspectUser
|
|
|
|
|
this.inputQuery.inspectUser = this.inspectTake.inspectUser
|
|
|
|
|
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.inputQuery = row
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
|
|
|
|
|
}
|
|
|
|
|
this.inspectSelectPlanSetVisible = true;
|
|
|
|
@ -485,16 +488,16 @@ export default {
|
|
|
|
|
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
|
|
|
|
|
this.inspectTakeSetVisible = false
|
|
|
|
|
this.inspectSelectPlanSetVisible = false
|
|
|
|
|
if(isBlank(obj)){
|
|
|
|
|
var count=0;
|
|
|
|
|
if (isBlank(obj)) {
|
|
|
|
|
var count = 0;
|
|
|
|
|
if (this.type == 4) {
|
|
|
|
|
for (var i = 0; i < this.delectList.length; i++) {
|
|
|
|
|
if (this.delectList[i].status != 2) {
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(count == 0){
|
|
|
|
|
return this.$message.success("任务已全部完成")
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
return this.$message.success("任务已全部完成")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -502,7 +505,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
components: {
|
|
|
|
|
DeviceInspectTakeProjectSet, ElImageViewer ,DeviceProjectSelectTake
|
|
|
|
|
DeviceInspectTakeProjectSet, ElImageViewer, DeviceProjectSelectTake
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
created() {
|
|
|
|
@ -510,8 +513,8 @@ export default {
|
|
|
|
|
this.getUserBus();
|
|
|
|
|
if (!isBlank(this.inspectTake.id)) {
|
|
|
|
|
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
|
|
|
|
|
if(this.inspectTake.type == 3){
|
|
|
|
|
this.ischeck =true
|
|
|
|
|
if (this.inspectTake.type == 3) {
|
|
|
|
|
this.ischeck = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|