|
|
|
@ -13,11 +13,25 @@
|
|
|
|
|
:rules="rules"
|
|
|
|
|
:model="formInfo"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="电压等级:" prop="dyId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formInfo.dyId"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
@change="getSearchxl"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in dyOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="线路名称:" prop="lineId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formInfo.lineId"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
@change="getTowerchange"
|
|
|
|
|
@change="getSearchgt"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in lineOptions"
|
|
|
|
@ -189,8 +203,8 @@ import {
|
|
|
|
|
addTerminalJoggle,
|
|
|
|
|
updateTerminalJoggle,
|
|
|
|
|
getAllChannelListJoggle,
|
|
|
|
|
getLineAndGtInfo,
|
|
|
|
|
getProtocolList,
|
|
|
|
|
getSearchInfo,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
@ -205,9 +219,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
let validCmid = (rule, value, callback) => {
|
|
|
|
|
let reg = /^[0-9A-Za-z_/\\/-]{17}$/;
|
|
|
|
|
let reg = /^([0-9A-Za-z_\/\\-]{17}|[0-9A-Za-z_\/\\-]{6})$/;
|
|
|
|
|
if (!reg.test(value)) {
|
|
|
|
|
callback(new Error("装置id为17位编码"));
|
|
|
|
|
callback(new Error("装置id为17位编码或者6位编码"));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
@ -217,8 +231,10 @@ export default {
|
|
|
|
|
formInfo: {},
|
|
|
|
|
channelOptions: [], //所有通道列表
|
|
|
|
|
filterOption: [], //筛选后的通道列表
|
|
|
|
|
|
|
|
|
|
lineOptions: [], //线路
|
|
|
|
|
toweridOptions: [], //杆塔
|
|
|
|
|
dyOptions: [], //电压
|
|
|
|
|
//装置类型
|
|
|
|
|
devTypeOptions: [
|
|
|
|
|
{
|
|
|
|
@ -300,10 +316,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//判断
|
|
|
|
|
getdataform(val) {
|
|
|
|
|
this.getLine();
|
|
|
|
|
this.getSearchdy();
|
|
|
|
|
this.getChannel();
|
|
|
|
|
if (val == null) {
|
|
|
|
|
return (this.formInfo = {
|
|
|
|
|
dyId: "",
|
|
|
|
|
lineId: "",
|
|
|
|
|
towerId: "",
|
|
|
|
|
cmdid: "",
|
|
|
|
@ -340,7 +357,8 @@ export default {
|
|
|
|
|
"workingDate",
|
|
|
|
|
new Date(this.formInfo.workingDate).getTime()
|
|
|
|
|
);
|
|
|
|
|
console.log(this.formInfo.workingDate);
|
|
|
|
|
|
|
|
|
|
console.log(this.formInfo);
|
|
|
|
|
},
|
|
|
|
|
//通道号值改变
|
|
|
|
|
changeHandle() {
|
|
|
|
@ -441,49 +459,55 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取所有线路
|
|
|
|
|
getLine() {
|
|
|
|
|
getLineAndGtInfo({ type: 1 }).then((res) => {
|
|
|
|
|
this.lineOptions = res.data.list;
|
|
|
|
|
if (res.data.list.length == 0) {
|
|
|
|
|
this.lineOptions = [];
|
|
|
|
|
this.formInfo.lineId = "";
|
|
|
|
|
} else {
|
|
|
|
|
//获取电压信息
|
|
|
|
|
getSearchdy() {
|
|
|
|
|
getSearchInfo({ type: 1 })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.dyOptions = res.data.list;
|
|
|
|
|
if (res.data.list.length == 0) {
|
|
|
|
|
this.dyOptions = [];
|
|
|
|
|
this.formInfo.dyId = "";
|
|
|
|
|
} else {
|
|
|
|
|
this.dyOptions = res.data.list;
|
|
|
|
|
|
|
|
|
|
if (this.photoDialogTitle == "新增") {
|
|
|
|
|
// this.formInfo.lineId = res.data.list[0].id;
|
|
|
|
|
this.$set(this.formInfo, "dyId", res.data.list[0].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getSearchxl();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//获取线路数据
|
|
|
|
|
getSearchxl() {
|
|
|
|
|
getSearchInfo({ type: 2, id: this.formInfo.dyId })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.lineOptions = res.data.list;
|
|
|
|
|
|
|
|
|
|
if (this.photoDialogTitle == "新增") {
|
|
|
|
|
// this.formInfo.lineId = res.data.list[0].id;
|
|
|
|
|
this.$set(this.formInfo, "lineId", res.data.list[0].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// this.dyOptions = res.data.list;
|
|
|
|
|
// this.formdata.dyid = res.data.list == [] ? "" : res.data.list[0].id;
|
|
|
|
|
this.getTower();
|
|
|
|
|
});
|
|
|
|
|
this.getSearchgt();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//获取所有杆塔
|
|
|
|
|
getTower() {
|
|
|
|
|
getLineAndGtInfo({ type: 2, id: this.formInfo.lineId })
|
|
|
|
|
//获取杆塔数据
|
|
|
|
|
getSearchgt() {
|
|
|
|
|
getSearchInfo({ type: 3, id: this.formInfo.lineId })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.data.list.length == 0) {
|
|
|
|
|
this.toweridOptions = [];
|
|
|
|
|
this.formInfo.towerId = "";
|
|
|
|
|
} else {
|
|
|
|
|
this.toweridOptions = res.data.list;
|
|
|
|
|
if (this.photoDialogTitle == "新增" || this.photoDialogtype == 1) {
|
|
|
|
|
// this.formInfo.towerId = res.data.list[0].id;
|
|
|
|
|
this.$set(this.formInfo, "towerId", res.data.list[0].id);
|
|
|
|
|
this.photoDialogtype = 0;
|
|
|
|
|
}
|
|
|
|
|
this.toweridOptions = res.data.list;
|
|
|
|
|
|
|
|
|
|
if (this.photoDialogTitle == "新增") {
|
|
|
|
|
// this.formInfo.lineId = res.data.list[0].id;
|
|
|
|
|
this.$set(this.formInfo, "towerId", res.data.list[0].id);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
getTowerchange() {
|
|
|
|
|
if (this.photoDialogTitle == "修改") {
|
|
|
|
|
this.photoDialogtype = 1;
|
|
|
|
|
}
|
|
|
|
|
this.getTower();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取所有通道
|
|
|
|
|
getChannel() {
|
|
|
|
|
getAllChannelListJoggle()
|
|
|
|
|