Merge branch 'xy-ly' into fly

master
fanluyan 2 years ago
commit 3836bbce6a

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

Loading…
Cancel
Save