地图绘制 停站时间/运行等级 代码调整
This commit is contained in:
parent
13af28467c
commit
e17104f537
@ -91,17 +91,22 @@ export default {
|
||||
},
|
||||
save(index, row) {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
row.loading = true;
|
||||
updateStationParkTime(this.mapInfo.id, row.id, {parkingTime:row.parkingTimeNew}).then(resp => {
|
||||
this.$message.success(this.$t('tip.updateDwellTimeSuccessful'));
|
||||
row.parkingTime = row.parkingTimeNew;
|
||||
row.parkingTimeNew = '';
|
||||
row.edit = false;
|
||||
row.loading = false;
|
||||
}).catch(() => {
|
||||
row.loading = false;
|
||||
this.$messageBox(this.$t('tip.updateDwellTimeFailed'));
|
||||
});
|
||||
if (row.parkingTimeNew > 0) {
|
||||
row.loading = true;
|
||||
updateStationParkTime(this.mapInfo.id, row.id, {parkingTime:row.parkingTimeNew}).then(resp => {
|
||||
this.$message.success(this.$t('tip.updateDwellTimeSuccessful'));
|
||||
row.parkingTime = row.parkingTimeNew;
|
||||
row.parkingTimeNew = '';
|
||||
row.edit = false;
|
||||
row.loading = false;
|
||||
}).catch(() => {
|
||||
row.loading = false;
|
||||
this.$messageBox(this.$t('tip.updateDwellTimeFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请输入有效的停站时间');
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// deleteObj(index, row) {
|
||||
|
@ -158,20 +158,25 @@ export default {
|
||||
},
|
||||
save(index, row) {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
row.loading = true;
|
||||
putUploadLevel(this.mapInfo.id, row.id, {l1:row.l1New, l2:row.l2New, l3:row.l3New, l4:row.l1New, l5:row.l5New }).then(resp => {
|
||||
this.$message.success('更新运行等级成功');
|
||||
row.l1 = row.l1New;
|
||||
row.l2 = row.l2New;
|
||||
row.l3 = row.l3New;
|
||||
row.l4 = row.l4New;
|
||||
row.l5 = row.l5New;
|
||||
row.edit = false;
|
||||
row.loading = false;
|
||||
}).catch(() => {
|
||||
row.loading = false;
|
||||
this.$messageBox('更新运行等级失败');
|
||||
});
|
||||
if (row.l1New > 0 && row.l2New > 0 && row.l3New > 0 && row.l4New > 0 && row.l5New > 0) {
|
||||
row.loading = true;
|
||||
putUploadLevel(this.mapInfo.id, row.id, {l1:row.l1New, l2:row.l2New, l3:row.l3New, l4:row.l1New, l5:row.l5New }).then(resp => {
|
||||
this.$message.success('更新运行等级成功');
|
||||
row.l1 = row.l1New;
|
||||
row.l2 = row.l2New;
|
||||
row.l3 = row.l3New;
|
||||
row.l4 = row.l4New;
|
||||
row.l5 = row.l5New;
|
||||
row.edit = false;
|
||||
row.loading = false;
|
||||
}).catch(() => {
|
||||
row.loading = false;
|
||||
this.$messageBox('更新运行等级失败');
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请输入有效的运行等级');
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// deleteObj(index, row) {
|
||||
|
Loading…
Reference in New Issue
Block a user