Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
46d95bf715
@ -189,7 +189,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
@ -204,7 +205,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 激活
|
// 激活
|
||||||
active() {
|
active() {
|
||||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
@ -226,7 +228,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// 设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
@ -182,7 +183,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
@ -206,7 +208,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
|
||||||
|
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
|
@ -64,25 +64,26 @@ export default {
|
|||||||
// this.validateText = this.$t('rules.pleaseEnterMapName');
|
// this.validateText = this.$t('rules.pleaseEnterMapName');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
// lock: true,
|
lock: true,
|
||||||
// text: '正在导入中...',
|
text: '正在导入中...',
|
||||||
// spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
// background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
// });
|
});
|
||||||
const that = this;
|
const that = this;
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
this.jsonData.name = this.editModel.name;
|
this.jsonData.name = this.editModel.name;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.validateText = '';
|
||||||
postBuildMapImport(this.jsonData).then(res => {
|
postBuildMapImport(this.jsonData).then(res => {
|
||||||
// loading.close();
|
loading.close();
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.$message.success('导入成功!');
|
that.$message.success('导入成功!');
|
||||||
// that.loadInitData();
|
|
||||||
this.$emit('loadInitData');
|
this.$emit('loadInitData');
|
||||||
// loading.close();
|
// loading.close();
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// loading.close();
|
loading.close();
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
this.close();
|
this.close();
|
||||||
that.$message.error('导入失败' + error.message);
|
that.$message.error('导入失败' + error.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user