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() {
|
||||
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) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -204,7 +205,8 @@ export default {
|
||||
},
|
||||
// 激活
|
||||
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) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -226,7 +228,8 @@ export default {
|
||||
// },
|
||||
// 设置速度
|
||||
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) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -166,7 +166,8 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
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) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -182,7 +183,8 @@ export default {
|
||||
},
|
||||
// 区段激活
|
||||
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) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -206,7 +208,8 @@ export default {
|
||||
},
|
||||
// 设置速度
|
||||
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) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -64,25 +64,26 @@ export default {
|
||||
// this.validateText = this.$t('rules.pleaseEnterMapName');
|
||||
return false;
|
||||
}
|
||||
// const loading = this.$loading({
|
||||
// lock: true,
|
||||
// text: '正在导入中...',
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
// });
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const that = this;
|
||||
that.loading = true;
|
||||
this.jsonData.name = this.editModel.name;
|
||||
this.dialogShow = false;
|
||||
this.validateText = '';
|
||||
postBuildMapImport(this.jsonData).then(res => {
|
||||
// loading.close();
|
||||
loading.close();
|
||||
that.loading = false;
|
||||
that.$message.success('导入成功!');
|
||||
// that.loadInitData();
|
||||
this.$emit('loadInitData');
|
||||
// loading.close();
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
// loading.close();
|
||||
loading.close();
|
||||
that.loading = false;
|
||||
this.close();
|
||||
that.$message.error('导入失败' + error.message);
|
||||
|
Loading…
Reference in New Issue
Block a user