|
|
|
@ -135,14 +135,17 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.formInfo = val;
|
|
|
|
|
let channelnr = []
|
|
|
|
|
val.list.forEach(item => {
|
|
|
|
|
channelnr.push(item.id)
|
|
|
|
|
});
|
|
|
|
|
this.$set(this.formInfo,'channelVal',channelnr)
|
|
|
|
|
},
|
|
|
|
|
// 保存确定操作
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs.formgrapInfo.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
console.log(valid);
|
|
|
|
|
if (this.photoDialogTitle == "新增") {
|
|
|
|
|
console.log(this.formInfo);
|
|
|
|
|
this.formInfo = {
|
|
|
|
|
channelid: this.formInfo.channelVal,
|
|
|
|
|
cmdid: this.formInfo.cmdid,
|
|
|
|
@ -159,7 +162,6 @@ export default {
|
|
|
|
|
this.$parent.terminalList(); //刷新
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
this.$message.error("添加失败");
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
@ -171,6 +173,7 @@ export default {
|
|
|
|
|
sim: this.formInfo.simCard,
|
|
|
|
|
displayName: this.formInfo.cmdid,
|
|
|
|
|
towerid: this.formInfo.towerVal,
|
|
|
|
|
id: this.formInfo.id
|
|
|
|
|
};
|
|
|
|
|
updateTerminalJoggle(this.formInfo)
|
|
|
|
|
.then((res) => {
|
|
|
|
@ -183,7 +186,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log("error submit!!");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -192,7 +194,6 @@ export default {
|
|
|
|
|
//获取所有线路
|
|
|
|
|
getLine() {
|
|
|
|
|
getSearchInfo({ type: 2 }).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.lineOptions = res.data.list;
|
|
|
|
|
if (res.data.list.length == 0) {
|
|
|
|
|
this.lineOptions = [];
|
|
|
|
@ -210,7 +211,6 @@ export default {
|
|
|
|
|
getTower() {
|
|
|
|
|
getSearchInfo({ type: 3, id: this.formInfo.lineVal })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.data.list.length == 0) {
|
|
|
|
|
this.toweridOptions = [];
|
|
|
|
|
this.formInfo.towerVal = "";
|
|
|
|
@ -226,10 +226,8 @@ export default {
|
|
|
|
|
getAllChannelListJoggle()
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.channelOptions = res.data.list;
|
|
|
|
|
console.log(this.channelOptions);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
display() {
|
|
|
|
|