This commit is contained in:
joylink_cuiweidong 2020-09-03 18:17:40 +08:00
commit b6c39918e0
11 changed files with 246 additions and 96 deletions

View File

@ -646,7 +646,7 @@ export function generateCI (mapId) {
/** 创建目的码 */ /** 创建目的码 */
export function createStationDestination(data) { export function createStationDestination(data) {
return request({ return request({
url: `/api/mapBuild/stationParkTime`, url: `/api/mapBuild/${data.mapId}/operationDefinition`,
method: 'post', method: 'post',
data data
}); });
@ -655,8 +655,33 @@ export function createStationDestination(data) {
/** 更新目的码 */ /** 更新目的码 */
export function updateStationDestination(data) { export function updateStationDestination(data) {
return request({ return request({
url: `/api/mapBuild/stationParkTime`, url: `/api/mapBuild/${data.mapId}/operationDefinition`,
method: 'post', method: 'put',
data data
}); });
} }
/** 目的码列表分页查询 */
export function getStationDestinationList(mapId, params) {
return request({
url: `/api/mapBuild/${mapId}/operationDefinition`,
method: 'get',
params
});
}
/** 目的码查询 */
export function getStationDestinationDetail(mapId, code) {
return request({
url: `/api/mapBuild/${mapId}/${code}/operationDefinition`,
method: 'get'
});
}
/** 目的码查询 */
export function deleteStationDestination(mapId, code) {
return request({
url: `/api/mapBuild/${mapId}/${code}/operationDefinition`,
method: 'delete'
});
}

View File

@ -250,7 +250,6 @@ export default {
markPointData: [] markPointData: []
}, Object.assign({ color: hexColor.toCreate() }, lineStyle))); }, Object.assign({ color: hexColor.toCreate() }, lineStyle)));
} }
/** 添加数据*/ /** 添加数据*/
series.forEach(serie => { series.forEach(serie => {
/** 找到服务号所在图数据的位置*/ /** 找到服务号所在图数据的位置*/
@ -259,7 +258,6 @@ export default {
if (!runPlanData[elem.serviceNumber][elem.tripNumber]) { if (!runPlanData[elem.serviceNumber][elem.tripNumber]) {
runPlanData[elem.serviceNumber][elem.tripNumber] = []; runPlanData[elem.serviceNumber][elem.tripNumber] = [];
} }
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem); runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => { runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime) - parseInt(b.secondTime); return parseInt(a.secondTime) - parseInt(b.secondTime);

View File

@ -411,19 +411,19 @@ export default {
children: [ children: [
{ {
title: '开放', title: '开放',
click: this.undeveloped click: this.handleOpenSection
}, },
{ {
title: '关闭', title: '关闭',
click: this.undeveloped click: this.handleCloseSection
}, },
{ {
title: '临时限速', title: '临时限速',
click: this.undeveloped click: this.handleLimitSpeed
}, },
{ {
title: '显示', title: '显示',
click: this.undeveloped click: this.handleSectionShow
} }
] ]
}, },
@ -433,23 +433,23 @@ export default {
children: [ children: [
{ {
title: '取消转换锁闭', title: '取消转换锁闭',
click: this.undeveloped click: this.handleLock
}, },
{ {
title: '取消过岔锁闭', title: '取消过岔锁闭',
click: this.undeveloped click: this.handleUnLock
}, },
{ {
title: '远程预复位使能', title: '远程预复位使能',
click: this.undeveloped click: this.handleRestoration
}, },
{ {
title: '复位', title: '复位',
click: this.undeveloped click: this.handleSectionRestoration
}, },
{ {
title: '显示', title: '显示',
click: this.undeveloped click: this.handleSectionStopShow
} }
] ]
}, },
@ -855,11 +855,11 @@ export default {
}, },
{ {
title: '复位', title: '复位',
click: this.undeveloped click: this.handleSectionRestoration
}, },
{ {
title: '显示', title: '显示',
click: this.undeveloped click: this.handleSectionStopShow
} }
] ]
}, },
@ -1472,6 +1472,19 @@ export default {
} }
}); });
}, },
handleSectionRestoration() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionLock.doShow();
}
});
},
setSignalModel() { setSignalModel() {
const operate = { const operate = {
type: 'bar', type: 'bar',
@ -1485,6 +1498,19 @@ export default {
} }
}); });
}, },
handleSectionStopShow() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionLock.doShow();
}
});
},
setSignalBlock() { setSignalBlock() {
const operate = { const operate = {
type: 'bar', type: 'bar',

View File

@ -67,7 +67,7 @@ export default {
tempData: [], tempData: [],
radio: '1', radio: '1',
spanCol: 24, spanCol: 24,
lock: false, lock: true,
restoration: false restoration: false
}; };
}, },

View File

@ -101,7 +101,8 @@ export default {
seriesMap: {}, seriesMap: {},
staticSeries: [], staticSeries: [],
runSeries: [], runSeries: [],
selectSeries: [] selectSeries: [],
runPlanData: {}
}; };
}, },
computed: { computed: {
@ -128,7 +129,7 @@ export default {
'$store.state.runPlan.planLoadedCount': async function () { '$store.state.runPlan.planLoadedCount': async function () {
try { try {
await this.loadChartPage(); await this.loadChartPage();
this.selectSeries = []; this.runSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) { if (this.dialogShow) {
await this.loadInitData(); await this.loadInitData();
} }
@ -138,6 +139,12 @@ export default {
this.loading = false; this.loading = false;
} }
}, },
'$store.state.socket.simulationReset': function (val) {
this.selectSeries = []; this.runSeries = [];
if (this.dialogShow) {
this.loadInitData();
}
},
'$store.state.runPlan.planSizeCount': function () { '$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height }); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
}, },
@ -148,8 +155,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode); this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode);
this.loadChartPage();
EventBus.$on('clearRunSeries', () => { EventBus.$on('clearRunSeries', () => {
this.runSeries = []; this.runSeries = [];
}); });
@ -221,7 +229,6 @@ export default {
}, },
updateRunPlanData(data) { updateRunPlanData(data) {
const stations = this.$store.state.runPlan.stations; const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
const initialPlanData = this.$store.state.runPlan.initialPlanData; const initialPlanData = this.$store.state.runPlan.initialPlanData;
data.forEach(item => { data.forEach(item => {
if (item && initialPlanData[item.serviceNumber]) { if (item && initialPlanData[item.serviceNumber]) {
@ -235,7 +242,7 @@ export default {
}); });
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations); this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap, this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
planData, this.runSeries, { color: '#FF00DE', width: 2 } this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
); );
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries]; const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
this.myChart && this.myChart.setOption({series: series}); this.myChart && this.myChart.setOption({series: series});

View File

@ -107,16 +107,16 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.training.switchcount': async function () { // '$store.state.training.switchcount': async function () {
if (this.group) { // if (this.group) {
if (this.$store.state.training.started && !this.firstLoad) { // if (this.$store.state.training.started && !this.firstLoad) {
await this.loadRunData(); // await this.loadRunData();
} else if (this.firstLoad) { // } else if (this.firstLoad) {
await this.loadRunData(this.$route.query); // await this.loadRunData(this.$route.query);
} // }
this.firstLoad = false; // this.firstLoad = false;
} // }
}, // },
'$store.state.scriptRecord.bgSet':function (val) { '$store.state.scriptRecord.bgSet':function (val) {
this.isScriptCommand = val; this.isScriptCommand = val;
if (!val) { if (!val) {
@ -128,6 +128,9 @@ export default {
}, },
'$store.state.training.prdType':function(val) { '$store.state.training.prdType':function(val) {
if (val == '01') { this.switchModeInner('01'); } else { this.switchModeInner('02'); } if (val == '01') { this.switchModeInner('01'); } else { this.switchModeInner('02'); }
},
'$store.state.map.mapDataLoadedCount': function () {
this.loadRunData();
} }
}, },
methods: { methods: {

View File

@ -105,17 +105,6 @@ export default {
}, },
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.setWindowSize(); this.setWindowSize();
},
'$store.state.training.switchcount': async function () {
if (this.group && this.firstLoad) {
await this.loadRunData();
// if (this.$store.state.training.started && !this.firstLoad) {
// } else if (this.firstLoad) {
// await this.loadRunData(this.$route.query);
// }
}
this.firstLoad = false;
} }
}, },
async mounted() { async mounted() {
@ -163,6 +152,7 @@ export default {
if (this.group) { if (this.group) {
await this.loadNewMapDataByGroup(this.group); await this.loadNewMapDataByGroup(this.group);
await this.getDraftScriptByGroupNew(this.group); await this.getDraftScriptByGroupNew(this.group);
await this.loadRunData();
this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setPrdType', '02');
} else { } else {
this.endViewLoading(); this.endViewLoading();

View File

@ -355,6 +355,7 @@ export default {
async simulationReset() { async simulationReset() {
await this.$store.dispatch('map/clearJlmapTrainView'); await this.$store.dispatch('map/clearJlmapTrainView');
await this.$store.dispatch('map/setTrainWindowShow', false); await this.$store.dispatch('map/setTrainWindowShow', false);
await this.$store.dispatch('training/over');
await this.$store.dispatch('map/resetActiveTrainList'); await this.$store.dispatch('map/resetActiveTrainList');
await this.$store.dispatch('socket/setSimulationReset'); // await this.$store.dispatch('socket/setSimulationReset'); //
await this.$store.dispatch('socket/setSimulationStart'); await this.$store.dispatch('socket/setSimulationStart');

View File

@ -107,15 +107,18 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.training.switchcount': async function () { // '$store.state.training.switchcount': async function () {
if (this.group) { // if (this.group) {
const started = this.$store.state.training.started; // const started = this.$store.state.training.started;
if (started && !this.firstLoad) { // if (started && !this.firstLoad) {
await this.loadRunData(this.$route.query); // await this.loadRunData(this.$route.query);
} else if (this.firstLoad) { // } else if (this.firstLoad) {
await this.loadRunData(this.$route.query); // await this.loadRunData(this.$route.query);
} // }
} // }
// }
'$store.state.map.mapDataLoadedCount': function () {
this.loadRunData(this.$route.query);
} }
}, },
async mounted() { async mounted() {

View File

@ -13,7 +13,7 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getStationParkTimeList, deleteStationParkTime, getStationParkTime } from '@/api/jmap/mapdraft'; import { getStationDestinationList, deleteStationDestination, getStationDestinationDetail } from '@/api/jmap/mapdraft';
export default { export default {
name: 'RouteDetail', name: 'RouteDetail',
@ -32,6 +32,11 @@ export default {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
}, },
typeList: [
{ name: '正常运营(环路)', value: 'NORMAL_OPERATION' },
{ name: '末班运营(交路)', value: 'LAST_OPERATION' },
{ name: '非运营(交路)', value: 'NON_OPERATION' }
],
queryForm: { queryForm: {
labelWidth: '120px', labelWidth: '120px',
queryObject: { queryObject: {
@ -51,30 +56,73 @@ export default {
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: '停站车站', title: '编码',
prop: 'stationCode', prop: 'code'
type: 'tag',
columnValue: (row) => { return this.formatName(row.stationCode); },
tagType: (row) => { return ''; }
}, },
{ {
title: '停站时间', title: '描述',
prop: 'parkingTimeVOList', prop: 'description'
type: 'tagMore',
columnValue: (row) => { return this.handelParkingTime(row.parkingTimeVOList); },
tagType: (row) => { return ''; }
}, },
{
title: '运营类型',
prop: 'type',
type: 'tag',
columnValue: (row) => { return this.translate(row.type, this.typeList); },
tagType: (row) => { return 'success'; }
},
{
title: '目标区段',
prop: 'sectionCode',
type: 'tag',
columnValue: (row) => { return this.translateSection(row.sectionCode, this.sectionList); },
tagType: (row) => { return 'success'; }
},
{
title: '车站A',
prop: 'stationACode',
type: 'tag',
columnValue: (row) => { return this.translateSection(row.stationACode, this.stationList, false); },
tagType: (row) => { return 'success'; }
},
{
title: '是否折返至车站A',
prop: 'stationAFrontTurnBack',
type: 'tag',
columnValue: (row) => { return this.translateTurn(row.stationAFrontTurnBack); },
tagType: (row) => { return 'success'; }
},
{
title: '车站B',
prop: 'stationBCode',
type: 'tag',
columnValue: (row) => { return this.translateSection(row.stationBCode, this.stationList, false); },
tagType: (row) => { return 'success'; }
},
{
title: '是否折返至车站B',
prop: 'stationBFrontTurnBack',
type: 'tag',
columnValue: (row) => { return this.translateTurn(row.stationBFrontTurnBack); },
tagType: (row) => { return 'success'; }
},
// {
// title: '',
// prop: 'sectionCode',
// type: 'tagMore',
// columnValue: (row) => { return this.handelParkingTime(row.parkingTimeVOList); },
// tagType: (row) => { return ''; }
// },
{ {
type: 'button', type: 'button',
title: this.$t('map.operation'), title: this.$t('map.operation'),
width: '200', width: '200',
buttons: [ buttons: [
{ {
name: this.$t('map.compile'), name: '编辑',
handleClick: this.editObj handleClick: this.editObj
}, },
{ {
name: this.$t('map.deleteObj'), name: '删除',
handleClick: this.deleteObj, handleClick: this.deleteObj,
type: 'danger' type: 'danger'
} }
@ -86,7 +134,8 @@ export default {
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList' 'stationList',
'sectionList'
]) ])
}, },
mounted() { mounted() {
@ -119,16 +168,44 @@ export default {
if (device) { if (device) {
name = device.uniqueName || device.name; name = device.uniqueName || device.name;
} }
console.log(code, name, device);
return name; return name;
}, },
translate(type, list) {
let name = '';
list.forEach(item => {
if (item.value == type) {
name = item.name;
}
});
return name;
},
translateSection(code, list, flag = true) {
let name = '';
list.forEach(item => {
if (item.code == code) {
if (flag) {
name = `${item.name}(${code})`;
} else {
name = `${item.name}`;
}
}
});
return name;
},
translateTurn(data) {
if (data) {
return '是';
} else {
return '否';
}
},
queryFunction(params) { queryFunction(params) {
if (this.mapInfo && this.mapInfo.id) { if (this.mapInfo && this.mapInfo.id) {
return getStationParkTimeList(this.mapInfo.id, params); return getStationDestinationList(this.mapInfo.id, params);
} }
}, },
editObj(index, row) { editObj(index, row) {
getStationParkTime(row.id).then(response => { getStationDestinationDetail(this.mapInfo.id, row.code).then(response => {
const data = response.data; const data = response.data;
this.$emit('autoMaticoSelected', data); this.$emit('autoMaticoSelected', data);
this.doClose(); this.doClose();
@ -137,7 +214,7 @@ export default {
deleteObj(index, row) { deleteObj(index, row) {
if (this.mapInfo && this.mapInfo.id && row) { if (this.mapInfo && this.mapInfo.id && row) {
// //
deleteStationParkTime(row.id).then(response => { deleteStationDestination(this.mapInfo.id, row.code).then(response => {
this.$message.success(this.$t('map.successfullyDelete')); this.$message.success(this.$t('map.successfullyDelete'));
this.reloadTable(); this.reloadTable();
}).catch(() => { }).catch(() => {

View File

@ -7,7 +7,7 @@
<el-input v-model="addModel.code" style="width: 180px;" /> <el-input v-model="addModel.code" style="width: 180px;" />
</el-form-item> </el-form-item>
<el-form-item label="运营类型" prop="type"> <el-form-item label="运营类型" prop="type">
<el-select v-model="addModel.type" clearable :filterable="true" :disabled="editShow"> <el-select v-model="addModel.type" clearable :filterable="true">
<el-option <el-option
v-for="item in typeList" v-for="item in typeList"
:key="item.value" :key="item.value"
@ -20,7 +20,7 @@
<el-input v-model="addModel.description" type="textarea" style="width: 330px;" /> <el-input v-model="addModel.description" type="textarea" style="width: 330px;" />
</el-form-item> </el-form-item>
<el-form-item label="目标区段" prop="sectionCode"> <el-form-item label="目标区段" prop="sectionCode">
<el-select v-model="addModel.sectionCode" clearable :filterable="true" :disabled="editShow"> <el-select v-model="addModel.sectionCode" clearable :filterable="true">
<el-option <el-option
v-for="item in sectionList" v-for="item in sectionList"
:key="item.code" :key="item.code"
@ -29,13 +29,22 @@
/> />
</el-select> </el-select>
<el-button <el-button
:disabled="editShow"
:type=" field === 'sectionCode1' ? 'danger' : 'primary'" :type=" field === 'sectionCode1' ? 'danger' : 'primary'"
@click="hover('sectionCode1')" @click="hover('sectionCode1')"
>{{ $t('map.activate') }}</el-button> >{{ $t('map.activate') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item label="是否右行" prop="right">
<el-select v-model="addModel.right" clearable :filterable="true">
<el-option
v-for="item in directionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="途径区段" prop="runPath"> <el-form-item label="途径区段" prop="runPath">
<el-select v-model="addModel.runPath" clearable multiple :filterable="true" :disabled="editShow"> <el-select v-model="addModel.runPath" clearable multiple :filterable="true">
<el-option <el-option
v-for="item in sectionList" v-for="item in sectionList"
:key="item.code" :key="item.code"
@ -44,13 +53,12 @@
/> />
</el-select> </el-select>
<el-button <el-button
:disabled="editShow"
:type=" field === 'sectionCode2' ? 'danger' : 'primary'" :type=" field === 'sectionCode2' ? 'danger' : 'primary'"
@click="hover('sectionCode2')" @click="hover('sectionCode2')"
>{{ $t('map.activate') }}</el-button> >{{ $t('map.activate') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item label="车站A" prop="stationACode"> <el-form-item label="车站A" prop="stationACode">
<el-select v-model="addModel.stationACode" clearable :filterable="true" :disabled="editShow"> <el-select v-model="addModel.stationACode" clearable :filterable="true">
<el-option <el-option
v-for="item in stationList" v-for="item in stationList"
:key="item.code" :key="item.code"
@ -59,7 +67,6 @@
/> />
</el-select> </el-select>
<el-button <el-button
:disabled="editShow"
:type=" field === 'stationCode1' ? 'danger' : 'primary'" :type=" field === 'stationCode1' ? 'danger' : 'primary'"
@click="hover('stationCode1')" @click="hover('stationCode1')"
>{{ $t('map.activate') }}</el-button> >{{ $t('map.activate') }}</el-button>
@ -68,7 +75,7 @@
<el-checkbox v-model="addModel.stationAFrontTurnBack" /> <el-checkbox v-model="addModel.stationAFrontTurnBack" />
</el-form-item> </el-form-item>
<el-form-item label="车站B" prop="stationBCode"> <el-form-item label="车站B" prop="stationBCode">
<el-select v-model="addModel.stationBCode" clearable :filterable="true" :disabled="editShow"> <el-select v-model="addModel.stationBCode" clearable :filterable="true">
<el-option <el-option
v-for="item in stationList" v-for="item in stationList"
:key="item.code" :key="item.code"
@ -77,7 +84,6 @@
/> />
</el-select> </el-select>
<el-button <el-button
:disabled="editShow"
:type=" field === 'stationCode2' ? 'danger' : 'primary'" :type=" field === 'stationCode2' ? 'danger' : 'primary'"
@click="hover('stationCode2')" @click="hover('stationCode2')"
>{{ $t('map.activate') }}</el-button> >{{ $t('map.activate') }}</el-button>
@ -134,33 +140,45 @@ export default {
isSave: true, isSave: true,
loading: false, loading: false,
addModel: { addModel: {
mapId: '',
id: '', id: '',
code: '', code: '',
description: '', description: '',
type: '', type: '',
sectionCode: '', sectionCode: '',
runPath: [], runPath: [],
right: '',
stationACode: '', stationACode: '',
stationBCode: '', stationBCode: '',
stationAFrontTurnBack: false, stationAFrontTurnBack: false,
stationBFrontTurnBack: false stationBFrontTurnBack: false
}, },
editShow: false,
rules: { rules: {
code: [ code: [
{ required: true, message: '请输入编号', trigger: 'change' } { required: true, message: '请输入编号', trigger: 'change' }
], ],
sectionACode: [ type: [
{ required: true, message: '请选择运营类型', trigger: 'change' }
],
sectionCode: [
{ required: true, message: '请选择目标区段', trigger: 'change' }
],
stationACode: [
{ required: true, message: '请选择车站A', trigger: 'change' } { required: true, message: '请选择车站A', trigger: 'change' }
], ],
sectionBCode: [ stationBCode: [
{ required: true, message: '请选择车站B', trigger: 'change' } { required: true, message: '请选择车站B', trigger: 'change' }
] ]
}, },
typeList: [ typeList: [
{ name: '正常运营(环路)', value: 'NORMAL_OPERATION' }, { name: '正常运营(环路)', value: 'NORMAL_OPERATION' },
{ name: '末班运营(交路)', value: 'LAST_OPERATION' }, { name: '末班运营(交路)', value: 'LAST_OPERATION' },
{ name: '非运营(交路)', value: 'NON_OPERATION' } { name: '非运营(交路)', value: 'NON_OPERATION' },
{ name: '末班非运营(交路)', value: 'LAST_NON_OPERATION' }
],
directionList: [
{label: '右行', value: true},
{label: '左行', value: false}
] ]
}; };
}, },
@ -171,13 +189,22 @@ export default {
]) ])
}, },
watch: { watch: {
// mapInfo(val) { mapInfo(val) {
// if (val) { if (val) {
// this.addModel.mapId = val.id; this.addModel.mapId = val.id;
// } }
// }, },
routeData(val, old) {
if (val) {
this.addModel = val;
this.addModel.mapId = this.mapInfo.id;
}
}
}, },
mounted() { mounted() {
if (this.mapInfo.id) {
this.addModel.mapId = this.mapInfo.id;
}
}, },
methods: { methods: {
hover(field) { hover(field) {
@ -188,15 +215,12 @@ export default {
}, },
editData() { editData() {
this.isSave = false; this.isSave = false;
this.editShow = true;
}, },
setSelected(selected) { setSelected(selected) {
if (selected) { if (selected) {
if (selected._type == 'Section' && this.field == 'sectionCode1') { if (selected._type == 'Section' && this.field == 'sectionCode1') {
console.log(selected);
this.addModel.sectionCode = selected.code; this.addModel.sectionCode = selected.code;
} else if (selected._type == 'Section' && this.field == 'sectionCode2') { } else if (selected._type == 'Section' && this.field == 'sectionCode2') {
console.log(this.addModel.runPath, selected);
if (!this.addModel.runPath.includes(selected.code)) { if (!this.addModel.runPath.includes(selected.code)) {
this.addModel.runPath.push(selected.code); this.addModel.runPath.push(selected.code);
} }
@ -245,12 +269,8 @@ export default {
if (this.$refs && this.$refs.form && this.mapInfo) { if (this.$refs && this.$refs.form && this.mapInfo) {
delete this.addModel.id; delete this.addModel.id;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
// this.addModel.mapId = this.mapInfo.id; this.addModel.mapId = this.mapInfo.id;
// this.addModel.stationCode = '';
// this.addModel.parkingTimeVOList = [];
// this.addModel.code = '';
this.isSave = true; this.isSave = true;
this.editShow = false;
} }
} }
} }