自动信号接口修改
This commit is contained in:
parent
f6e0221b88
commit
98c7e1105f
@ -231,7 +231,7 @@ export function updateRouting(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建自动信号
|
// 创建自动信号 old(旧数据)
|
||||||
export function postAutoSignal(data) {
|
export function postAutoSignal(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/autoSignal`,
|
url: `/api/mapBuild/autoSignal`,
|
||||||
@ -240,7 +240,7 @@ export function postAutoSignal(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除自动信号
|
// 删除自动信号 old(旧数据)
|
||||||
export function delAutoSignal(autoSignalId) {
|
export function delAutoSignal(autoSignalId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/autoSignal/${autoSignalId}`,
|
url: `/api/mapBuild/autoSignal/${autoSignalId}`,
|
||||||
@ -248,7 +248,7 @@ export function delAutoSignal(autoSignalId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除自动信号
|
// 分页获取自动信号列表 old(旧数据)
|
||||||
export function getAutoSignalList(mapId, params) {
|
export function getAutoSignalList(mapId, params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/${mapId}/autoSignal`,
|
url: `/api/mapBuild/${mapId}/autoSignal`,
|
||||||
@ -257,7 +257,7 @@ export function getAutoSignalList(mapId, params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取自动信号
|
// 获取自动信号详情 old(旧数据)
|
||||||
export function getAutoSignalDetail(autoSignalId) {
|
export function getAutoSignalDetail(autoSignalId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/autoSignal/${autoSignalId}`,
|
url: `/api/mapBuild/autoSignal/${autoSignalId}`,
|
||||||
@ -265,7 +265,7 @@ export function getAutoSignalDetail(autoSignalId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新自动信号
|
// 更新自动信号 old(旧数据)
|
||||||
export function putAutoSignal(data) {
|
export function putAutoSignal(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/autoSignal/${data.autoSignalId}`,
|
url: `/api/mapBuild/autoSignal/${data.autoSignalId}`,
|
||||||
@ -274,6 +274,49 @@ export function putAutoSignal(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分页获取自动信号列表 new(新数据)
|
||||||
|
export function getAutoSignalListNew(mapId, params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapBuild/${mapId}/autoSignalNew`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除自动信号 new(新数据)
|
||||||
|
export function delAutoSignalNew(autoSignalId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapBuild/autoSignalNew/${autoSignalId}`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取自动信号详情 new(新数据)
|
||||||
|
export function getAutoSignalDetailNew(autoSignalId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapBuild/autoSignalNew/${autoSignalId}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建自动信号 new(新数据)
|
||||||
|
export function postAutoSignalNew(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapBuild/autoSignalNew`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新自动信号 new(新数据)
|
||||||
|
export function putAutoSignalNew(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapBuild/autoSignalNew/${data.autoSignalId}`,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function getListByCityCode(cityCode) {
|
export function getListByCityCode(cityCode) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/${cityCode}/list`,
|
url: `/api/mapBuild/${cityCode}/list`,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { listMap } from '@/api/jmap/mapdraft';
|
import { listMap } from '@/api/jmap/mapdraft';
|
||||||
import { getAutoSignalList, delAutoSignal, getAutoSignalDetail } from '@/api/jmap/mapdraft';
|
import { getAutoSignalListNew, delAutoSignalNew, getAutoSignalDetailNew } from '@/api/jmap/mapdraft';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteDetail',
|
name: 'RouteDetail',
|
||||||
@ -138,7 +138,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
if (this.mapInfo && this.mapInfo.id) {
|
if (this.mapInfo && this.mapInfo.id) {
|
||||||
return getAutoSignalList(this.mapInfo.id, params);
|
return getAutoSignalListNew(this.mapInfo.id, params);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
@ -162,7 +162,7 @@ export default {
|
|||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
editObj(index, row) {
|
editObj(index, row) {
|
||||||
getAutoSignalDetail(row.id).then(response => {
|
getAutoSignalDetailNew(row.id).then(response => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
this.$emit('autoMaticoSelected', data);
|
this.$emit('autoMaticoSelected', data);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -171,7 +171,7 @@ export default {
|
|||||||
deleteObj(index, row) {
|
deleteObj(index, row) {
|
||||||
if (this.mapInfo && this.mapInfo.id && row) {
|
if (this.mapInfo && this.mapInfo.id && row) {
|
||||||
// 删除
|
// 删除
|
||||||
delAutoSignal(row.id).then(response => {
|
delAutoSignalNew(row.id).then(response => {
|
||||||
this.$message.success(this.$t('map.successfullyDelete'));
|
this.$message.success(this.$t('map.successfullyDelete'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmap/utils/Uid';
|
import { getUID } from '@/jmap/utils/Uid';
|
||||||
import { postAutoSignal, putAutoSignal } from '@/api/jmap/mapdraft';
|
import { postAutoSignalNew, putAutoSignalNew } from '@/api/jmap/mapdraft';
|
||||||
import { ViewMode } from '@/scripts/ConstDic';
|
import { ViewMode } from '@/scripts/ConstDic';
|
||||||
import { formatName } from '@/utils/runPlan';
|
import { formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ export default {
|
|||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
postAutoSignal(this.buildModel(getUID('autoSingle'))).then(resp => {
|
postAutoSignalNew(this.buildModel(getUID('autoSingle'))).then(resp => {
|
||||||
this.$message.success(this.$t('map.automaticSignalSuccessful'));
|
this.$message.success(this.$t('map.automaticSignalSuccessful'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.clear();
|
this.clear();
|
||||||
@ -191,7 +191,7 @@ export default {
|
|||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
putAutoSignal(this.buildModel()).then(resp => {
|
putAutoSignalNew(this.buildModel()).then(resp => {
|
||||||
this.$message.success(this.$t('map.automaticSignalUpdateSucceeded'));
|
this.$message.success(this.$t('map.automaticSignalUpdateSucceeded'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.clear();
|
this.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user