大铁线路调整24 指示灯关联联锁数据调整
This commit is contained in:
parent
89642964bf
commit
af2ffa23f3
@ -3,22 +3,25 @@ import request from '@/utils/request';
|
||||
// 查询指示灯关联信息列表
|
||||
export function queryAssistListPaged(params, mapId) {
|
||||
return request({
|
||||
url: `/api/assist/indicator/section/list/${mapId}`,
|
||||
// url: `/api/assist/indicator/section/list/${mapId}`,
|
||||
url: `/api/station/direction/list/${mapId}`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
// 根据id查询单个指示灯关联信息
|
||||
export function queryAssistById(id){
|
||||
export function queryAssistById(mapId){
|
||||
return request({
|
||||
url: `/api/assist/indicator/section/${id}`,
|
||||
// url: `/api/assist/indicator/section/${id}`,
|
||||
url: `/api/station/direction/${mapId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 保存指示灯关联信息
|
||||
export function saveAssist(data, mapId) {
|
||||
return request({
|
||||
url: `/api/assist/indicator/section/save/${mapId}`,
|
||||
// url: `/api/assist/indicator/section/save/${mapId}`,
|
||||
url: `/api/station/direction/save/${mapId}`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@ -26,7 +29,8 @@ export function saveAssist(data, mapId) {
|
||||
// 删除指示灯关联关系
|
||||
export function deleteAssist(id) {
|
||||
return request({
|
||||
url: `/api/assist/indicator/section/delete/${id}`,
|
||||
// url: `/api/assist/indicator/section/delete/${id}`,
|
||||
url: `/api/station/direction/delete/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ export default class SignalButton extends Group {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x - 1,
|
||||
y2: model.position.y + 16
|
||||
y2: model.position.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
@ -93,7 +93,7 @@ export default class SignalButton extends Group {
|
||||
shape: {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x + 16,
|
||||
x2: model.position.x + 15,
|
||||
y2: model.position.y - 1
|
||||
},
|
||||
style: {
|
||||
@ -107,10 +107,10 @@ export default class SignalButton extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x + 16,
|
||||
x1: model.position.x + 15,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x + 16,
|
||||
y2: model.position.y + 16
|
||||
x2: model.position.x + 15,
|
||||
y2: model.position.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
@ -124,9 +124,9 @@ export default class SignalButton extends Group {
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y + 16,
|
||||
x2: model.position.x + 16,
|
||||
y2: model.position.y + 16,
|
||||
y1: model.position.y + 15,
|
||||
x2: model.position.x + 15,
|
||||
y2: model.position.y + 15,
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
@ -204,9 +204,10 @@ export default class SignalButton extends Group {
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rectButton && this.rectButton.show();
|
||||
this.buttonText && this.buttonText.show();
|
||||
// this.leftBoard && this.leftBoard.show();
|
||||
// this.rightBoard && this.rightBoard.show();
|
||||
// this.top
|
||||
this.leftBoard && this.leftBoard.hide();
|
||||
this.rightBoard && this.rightBoard.hide();
|
||||
this.topBoard && this.topBoard.hide();
|
||||
this.bottomBoard && this.bottomBoard.hide();
|
||||
}
|
||||
blockShow() {
|
||||
this.rightLine && this.rightLine.show();
|
||||
|
@ -117,7 +117,7 @@
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
import CenterConfig from '../../../../views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';564
|
||||
// import { OperateMode } from '@/scripts/ConstDic';48
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
|
@ -241,6 +241,14 @@ export default {
|
||||
{ label: '默认', value: 'DEFAULT' },
|
||||
{ label: '自动换端', value: 'AUTO' },
|
||||
{ label: '无人折返', value: 'UNMANNED' }
|
||||
]
|
||||
],
|
||||
directionLabelList: [
|
||||
{ label: 'X', value: 'X' },
|
||||
{ label: 'XF', value: 'XF' },
|
||||
{ label: 'XD', value: 'XD' },
|
||||
{ label: 'S', value: 'S' },
|
||||
{ label: 'SF', value: 'SF' },
|
||||
{ label: 'SD', value: 'SD' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -28,9 +28,9 @@ export function handlerUrl(data) {
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||
BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -34,17 +34,6 @@
|
||||
queryForm: {
|
||||
show:false
|
||||
},
|
||||
modelTypeList: [{value: 'indicator', label: '指示灯'}, {value: 'button', label: '按钮'}],
|
||||
typeList: [
|
||||
{value: 'receive', label:'接'},
|
||||
{value: 'deliver', label: '发'},
|
||||
{value: 'section', label: '区间'},
|
||||
{value: 'assist', label: '辅助'},
|
||||
{value: 'main_assist', label: '总辅助'},
|
||||
{value: 'receive_assist', label: '接辅助'},
|
||||
{value: 'deliver_assist', label: '发辅助'},
|
||||
{value: 'change_direction', label: '换方'}
|
||||
],
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
height:'500px',
|
||||
@ -52,28 +41,15 @@
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '主设备',
|
||||
prop: 'code',
|
||||
width: 150,
|
||||
title: '关联车站',
|
||||
prop: 'stationCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getMainDeviceName(row.code); },
|
||||
columnValue: (row) => { return this.getDeviceName(row.stationCode); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '设备分型',
|
||||
prop: 'modelType',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getModelType(row.modelType); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
prop: 'type',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getType(row.type); },
|
||||
tagType: (row) => { return ''; }
|
||||
title: '运行方向',
|
||||
prop: 'labelEnum'
|
||||
},
|
||||
{
|
||||
title: '关联区段列表',
|
||||
@ -83,19 +59,10 @@
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '关联进路',
|
||||
prop: 'routeCode',
|
||||
width: 200,
|
||||
title: '关联信号机',
|
||||
prop: 'signalCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getRouteName(row.routeCode); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '关联站台',
|
||||
prop: 'standCode',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getStandName(row.standCode); },
|
||||
columnValue: (row) => { return this.getDeviceName(row.code); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -139,34 +106,8 @@
|
||||
return queryAssistListPaged(params, this.mapInfo.id);
|
||||
}
|
||||
},
|
||||
getMainDeviceName(code) {
|
||||
getDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device){
|
||||
return device.name + '[' + code + ']';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getModelType(modelType) {
|
||||
if (modelType === 'indicator') {
|
||||
return '指示灯';
|
||||
} else if (modelType === 'button') {
|
||||
return '按钮';
|
||||
}
|
||||
},
|
||||
getType(type) {
|
||||
const typeElem = this.typeList.find(item => item.value === type);
|
||||
return typeElem.label;
|
||||
},
|
||||
getRouteName(routeCode) {
|
||||
if (routeCode) {
|
||||
return this.filterRouteMap[routeCode] + '[' + routeCode + ']'
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getStandName(standCode) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](standCode);
|
||||
return device ? device.name : '';
|
||||
},
|
||||
getSectionName(sectionList) {
|
||||
|
@ -4,7 +4,6 @@
|
||||
ref="routeEdit"
|
||||
:selected="selected"
|
||||
:map-info="mapInfo"
|
||||
:route-data="routeData"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
<indicator-associated-info-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" />
|
||||
|
@ -4,44 +4,31 @@
|
||||
<el-form-item v-if="isModify" label="编号:" prop="code">
|
||||
<el-input v-model="addModel.code" style="width: 220px;" disabled />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="名称:" prop="name">-->
|
||||
<!--<el-input v-model="addModel.name" style="width: 220px;" />-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="主设备:" prop="code">
|
||||
<el-select v-model="addModel.code" clearable filterable :placeholder="$t('map.pleaseSelect')">
|
||||
<el-form-item label="关联车站:" prop="stationCode">
|
||||
<el-select v-model="addModel.stationCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in mainDeviceList"
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="`${item.name}(${item.code})`"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'code' ? 'danger' : 'primary'"
|
||||
@click="hover('code')"
|
||||
:type=" field === 'stationCode' ? 'danger' : 'primary'"
|
||||
@click="hover('stationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备分型:" prop="modelType">
|
||||
<el-select v-model="addModel.modelType">
|
||||
<el-form-item label="运行方向" prop="labelEnum">
|
||||
<el-select v-model="addModel.labelEnum">
|
||||
<el-option
|
||||
v-for="item in modelTypeList"
|
||||
v-for="item in directionLabelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型:" prop="type">
|
||||
<el-select v-model="addModel.type">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="addModel.type === 'section'" label="关联区段:" prop="sectionList">
|
||||
<el-form-item label="关联区段:" prop="sectionList">
|
||||
<el-select v-model="addModel.sectionList" multiple :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
@ -55,30 +42,16 @@
|
||||
@click="hover('sectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['assist', 'main_assist', 'receive_assist', 'deliver_assist', 'change_direction'].includes(addModel.type)" label="关联站台:" prop="standCode">
|
||||
<el-select v-model="addModel.standCode" clearable filterable>
|
||||
<el-form-item label="关心信号机:" prop="signalCode">
|
||||
<el-select v-model="addModel.signalCode" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
v-for="item in signalList"
|
||||
:key="item.code"
|
||||
:label="`${item.name}(${item.code})`"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'standCode' ? 'danger' : 'primary'"
|
||||
@click="hover('standCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="addModel.type === 'receive' || addModel.type === 'deliver'" label="关联进路:" prop="routeCode">
|
||||
<el-select v-model="addModel.routeCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.code"
|
||||
:label="`${item.name}(${item.code})`"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<!--<el-button type="primary" @click="pushRouteAspect">查看</el-button>-->
|
||||
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{$t('map.activate')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="bigDraft">
|
||||
@ -90,11 +63,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getBigRouteList } from '@/api/jmap/mapdraft';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { saveAssist } from '@/api/assist';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
export default {
|
||||
name:'BigRouteInfo',
|
||||
props: {
|
||||
@ -109,46 +82,43 @@
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
routeData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var checkSectionList = (rule, value, callback) => {
|
||||
if (!value || value.length === 0){
|
||||
callback(new Error('请选择关联区段!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
field: '',
|
||||
loading: false,
|
||||
isModify:false,
|
||||
mainDeviceList: [],
|
||||
modelTypeList: [{value: 'indicator', label: '指示灯'}, {value: 'button', label: '按钮'}],
|
||||
typeList: [
|
||||
{value: 'receive', label:'接'},
|
||||
{value: 'deliver', label: '发'},
|
||||
{value: 'section', label: '区间'},
|
||||
{value: 'assist', label: '辅助'},
|
||||
{value: 'main_assist', label: '总辅助'},
|
||||
{value: 'receive_assist', label: '接辅助'},
|
||||
{value: 'deliver_assist', label: '发辅助'},
|
||||
{value: 'change_direction', label: '换方'}
|
||||
],
|
||||
routeList:[],
|
||||
directionLabelList: ConstConfig.ConstSelect.directionLabelList,
|
||||
addModel:{
|
||||
id: '',
|
||||
code:'',
|
||||
type: '',
|
||||
modelType: '',
|
||||
stationCode: '',
|
||||
labelEnum:'',
|
||||
sectionList: [],
|
||||
routeCode: '',
|
||||
standCode: ''
|
||||
signalCode: ''
|
||||
},
|
||||
rules: {
|
||||
|
||||
'code':[
|
||||
{ required: true, message: '请选择主设备', trigger: 'blur' },
|
||||
{ required: true, message: '请选择主设备', trigger: 'change' }
|
||||
'stationCode':[
|
||||
{ required: true, message: '请选择关联车站', trigger: 'blur' },
|
||||
{ required: true, message: '请选择关联车站', trigger: 'change' },
|
||||
],
|
||||
'labelEnum': [
|
||||
{ required: true, message: '请选择运行方向', trigger: 'change' }
|
||||
],
|
||||
'signalCode': [
|
||||
{ required: true, message: '请选择关联信号机', trigger: 'change' }
|
||||
],
|
||||
'sectionList': [
|
||||
{ validator: checkSectionList, trigger: 'change' },
|
||||
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -156,26 +126,14 @@
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'stationStandList',
|
||||
'signalButtonList'
|
||||
]),
|
||||
btnList() {
|
||||
return [...this.signalList, ...this.signalButtonList];
|
||||
}
|
||||
'stationList',
|
||||
'signalButtonList',
|
||||
'signalList'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.initPage();
|
||||
},
|
||||
methods:{
|
||||
initPage() {
|
||||
this.routeList = [];
|
||||
getBigRouteList(this.$route.params.mapId).then(response => {
|
||||
response.data.forEach(route=>{
|
||||
this.routeList.push({code:route.code, name:route.name});
|
||||
});
|
||||
}).catch(()=>{
|
||||
});
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
},
|
||||
@ -184,18 +142,15 @@
|
||||
},
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
const deviceTypeList = ['SectionOccupied'.toUpperCase(), 'AssistStatus'.toUpperCase(), 'TotalAssist'.toUpperCase(), 'DepartAssist'.toUpperCase(),
|
||||
'PickAssist'.toUpperCase(), 'DepartArrow'.toUpperCase(),'PickArrow'.toUpperCase(),
|
||||
'SignalButton'.toUpperCase()];
|
||||
if (deviceTypeList.includes(selected._type.toUpperCase()) && this.field.toUpperCase() === 'code'.toUpperCase()) {
|
||||
this.addModel.code = selected.code;
|
||||
this.field = '';
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
|
||||
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
|
||||
this.addModel.sectionList.push(selected.code);
|
||||
} else if (selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'standCode'.toUpperCase()) {
|
||||
this.addModel.standCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
|
||||
this.addModel.stationCode = selected.code;
|
||||
this.field = '';
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()){
|
||||
this.addModel.signalCode = selected.code;
|
||||
this.field = '';
|
||||
} ;
|
||||
}
|
||||
},
|
||||
save() {
|
||||
@ -222,20 +177,12 @@
|
||||
this.addModel = {
|
||||
id: '',
|
||||
code:'',
|
||||
type: '',
|
||||
modelType: '',
|
||||
sectionList: [],
|
||||
routeCode: '',
|
||||
standCode: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
// pushRouteAspect() {
|
||||
// if (this.routeCode && this.signalAspect) {
|
||||
// const index = this.addModel.routeAspectList.findIndex(routeAspect=>{ return routeAspect.routeCode == this.routeCode && routeAspect.signalAspect == this.signalAspect; });
|
||||
// index < 0 && this.addModel.routeAspectList.push({routeCode:this.routeCode, signalAspect:this.signalAspect});
|
||||
// }
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user