|
@@ -62,6 +62,8 @@
|
|
|
v-model="spotData.principleOne"
|
|
|
placeholder="请选择责任人"
|
|
|
style="width: 100%"
|
|
|
+ @visible-change="getPrincipleInfo(1)"
|
|
|
+ @change="getPrincipleData"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in principleData"
|
|
@@ -79,6 +81,8 @@
|
|
|
v-model="spotData.principleTwo"
|
|
|
placeholder="请选择责任人"
|
|
|
style="width: 100%"
|
|
|
+ @visible-change="getPrincipleInfo(0)"
|
|
|
+ @change="getPrincipleData"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in principleData"
|
|
@@ -128,6 +132,24 @@
|
|
|
</el-date-picker>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row class="info-full">
|
|
|
+ <el-col :span="spanSIX">
|
|
|
+ <div class="info-style">操作人</div>
|
|
|
+ <el-select
|
|
|
+ size="medium"
|
|
|
+ v-model="spotData.operator"
|
|
|
+ placeholder="请选择操作人"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in operatorData"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-card>
|
|
|
<el-card v-for="(item, index) in procedures" :key="index">
|
|
|
<div slot="header" style="font-size: 20px; display: flex">
|
|
@@ -241,6 +263,7 @@ import {
|
|
|
getPrinciple,
|
|
|
getTour,
|
|
|
updateProofing,
|
|
|
+ getOperator
|
|
|
} from "@/api/project";
|
|
|
import { getYyMmDdTimeStamp, getNowDay } from "@/utils/datetime";
|
|
|
export default {
|
|
@@ -256,7 +279,10 @@ export default {
|
|
|
tourId: "",
|
|
|
nos: "",
|
|
|
beginDate: "",
|
|
|
+ operator: ""
|
|
|
},
|
|
|
+ // 设备操作人
|
|
|
+ operatorData: [],
|
|
|
procedures: [
|
|
|
{
|
|
|
flow: "",
|
|
@@ -278,6 +304,7 @@ export default {
|
|
|
spanTWELVE: 12,
|
|
|
// 频次
|
|
|
frequencys: [
|
|
|
+ { id: 6, value: "每班", show: true },
|
|
|
{ id: 1, value: "每日", show: true },
|
|
|
{ id: 2, value: "每周", show: true },
|
|
|
{ id: 3, value: "每月", show: true },
|
|
@@ -309,6 +336,7 @@ export default {
|
|
|
created() {
|
|
|
this.getPrincipleData();
|
|
|
this.getTourData();
|
|
|
+ this.getOperatorData()
|
|
|
if (this.$route.query.id) {
|
|
|
this.versionId = this.$route.query.id;
|
|
|
this.buttonStatus = 0;
|
|
@@ -349,6 +377,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ getPrincipleInfo(index) {
|
|
|
+ if(index){
|
|
|
+ if(this.spotData.principleTwo){
|
|
|
+ this.principleData = this.principleData.filter( item => item.id !== this.spotData.principleTwo)
|
|
|
+ } else {
|
|
|
+ this.getPrincipleData()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if(this.spotData.principleOne){
|
|
|
+ this.principleData = this.principleData.filter( item => item.id !== this.spotData.principleOne)
|
|
|
+ } else {
|
|
|
+ this.getPrincipleData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取巡检人
|
|
|
getTourData() {
|
|
|
getTour().then((res) => {
|
|
@@ -357,6 +400,12 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 获取设备操作人
|
|
|
+ getOperatorData() {
|
|
|
+ getOperator().then(res=> {
|
|
|
+ this.operatorData = res.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
// 提交
|
|
|
submit(index) {
|
|
|
this.loading = true;
|
|
@@ -431,54 +480,6 @@ export default {
|
|
|
// this.frequencys.find((item) => item.id === e).show = false;
|
|
|
console.log(e);
|
|
|
},
|
|
|
- // 添加频次
|
|
|
- addFrequency() {
|
|
|
- this.proofingSubReqs.push({
|
|
|
- frequency: "",
|
|
|
- proofingSubOpReqs: [
|
|
|
- {
|
|
|
- checkContent: [""],
|
|
|
- manual: 1,
|
|
|
- op: "",
|
|
|
- },
|
|
|
- ],
|
|
|
- reqStartTime: "",
|
|
|
- responseDayNum: "",
|
|
|
- responseEndTime: "",
|
|
|
- });
|
|
|
- },
|
|
|
- // 删除频次
|
|
|
- removeFrequency(index) {
|
|
|
- // this.proofingSubReqs.pop();
|
|
|
- this.proofingSubReqs.splice(index, 1);
|
|
|
- },
|
|
|
- // 增加op
|
|
|
- addOP(index) {
|
|
|
- this.proofingSubReqs[index].proofingSubOpReqs.push({
|
|
|
- checkContent: [""],
|
|
|
- manual: 1,
|
|
|
- op: "",
|
|
|
- });
|
|
|
- },
|
|
|
- // 删除OP
|
|
|
- removeOP(index, indey) {
|
|
|
- // this.proofingSubReqs[index].proofingSubOpReqs.pop();
|
|
|
- this.proofingSubReqs[index].proofingSubOpReqs.splice(indey, 1);
|
|
|
- },
|
|
|
- // 增加校验工具 [indey].children().push({ num: 1 });
|
|
|
- addCheckToolsInfo(index, indey) {
|
|
|
- this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.push(
|
|
|
- ""
|
|
|
- );
|
|
|
- },
|
|
|
- // 删除校验工具
|
|
|
- removeCheckToolsInfo(index, indey, indez) {
|
|
|
- // this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.pop();
|
|
|
- this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.splice(
|
|
|
- indez,
|
|
|
- 1
|
|
|
- );
|
|
|
- },
|
|
|
// 上传图片前
|
|
|
beforeAvatarUpload(file) {
|
|
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
|
@@ -535,18 +536,6 @@ export default {
|
|
|
// }
|
|
|
});
|
|
|
},
|
|
|
- // 执行添加
|
|
|
- addVerifyPeople(val, index) {
|
|
|
- if (index) {
|
|
|
- this.twoChange = true;
|
|
|
- } else {
|
|
|
- this.oneChange = true;
|
|
|
- }
|
|
|
- this.verifyPeopleList[index].userId = val;
|
|
|
- this.verifyPeopleList[index].userName = this.userList.find(
|
|
|
- (item) => item.id === val
|
|
|
- ).name;
|
|
|
- },
|
|
|
// 获取当前天的下一天
|
|
|
getNextDay() {
|
|
|
let date = getNowDay();
|