路票调整
This commit is contained in:
parent
026395d982
commit
a692ae3aa7
@ -51,15 +51,15 @@ const deviceType = {
|
||||
DirectionRod: 'DirectionRod',
|
||||
Responder: 'Responder',
|
||||
SignalButton: 'SignalButton',
|
||||
PickArrow: 'PickArrow',
|
||||
DepartArrow: 'DepartArrow',
|
||||
Occlusion: 'Occlusion',
|
||||
Accident: 'Accident',
|
||||
Recovery: 'Recovery',
|
||||
PickAssist: 'PickAssist',
|
||||
DepartAssist: 'DepartAssist',
|
||||
TotalAssist: 'TotalAssist',
|
||||
AssistStatus: 'AssistStatus',
|
||||
SectionOccupied: 'SectionOccupied'
|
||||
PickArrow: 'PickArrow',
|
||||
DepartArrow: 'DepartArrow',
|
||||
Occlusion: 'Occlusion',
|
||||
Accident: 'Accident',
|
||||
Recovery: 'Recovery',
|
||||
PickAssist: 'PickAssist',
|
||||
DepartAssist: 'DepartAssist',
|
||||
TotalAssist: 'TotalAssist',
|
||||
AssistStatus: 'AssistStatus',
|
||||
SectionOccupied: 'SectionOccupied'
|
||||
};
|
||||
export default deviceType;
|
||||
|
@ -24,17 +24,17 @@ export function handlerUrl(data) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// const data = null;
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.233/rtss-server';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.201:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140: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'; // 张赛
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
// BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API;
|
||||
BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API;
|
||||
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
|
||||
|
@ -15,6 +15,7 @@
|
||||
<script>
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: {
|
||||
@ -22,19 +23,50 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editModel: {},
|
||||
rules: {},
|
||||
typeList: []
|
||||
editModel: {
|
||||
code: '',
|
||||
pictureHide: false,
|
||||
position: { x: 0, y: 0 }
|
||||
},
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'arrowList',
|
||||
'automaticRouteButtonList',
|
||||
'axleCounterResetButtonList',
|
||||
'cycleButtonList',
|
||||
'directionRodList',
|
||||
'espList',
|
||||
'indicatorLightList',
|
||||
'lcList',
|
||||
'lineList',
|
||||
'outerFrameList',
|
||||
'psdList',
|
||||
'resourceList',
|
||||
'responderList',
|
||||
'sectionList',
|
||||
'switchList',
|
||||
'signalButtonList',
|
||||
'signalList',
|
||||
'splitStationList',
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
'stationStandList',
|
||||
'switchList',
|
||||
'tbStrategyList',
|
||||
'tempSpeedLimitList',
|
||||
'textList',
|
||||
'totalGuideLockButtonVOList',
|
||||
'trainWindowList',
|
||||
'zcList'
|
||||
]),
|
||||
deviceList () {
|
||||
return [...this.sectionList, ...this.signalList, ...this.switchList, ...this.psdList, ...this.stationStandList, ...this.stationList, ...this.trainWindowList,
|
||||
...this.arrowList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.directionRodList, ...this.espList,
|
||||
...this.indicatorLightList, ...this.lcList, ...this.lineList, ...this.outerFrameList, ...this.psdList, ...this.resourceList, ...this.responderList,
|
||||
...this.signalButtonList, ...this.splitStationList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList,
|
||||
...this.trainWindowList, ...this.zcList];
|
||||
},
|
||||
form () {
|
||||
return {
|
||||
labelWidth: '130px',
|
||||
@ -46,34 +78,45 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'type', label: '类型', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
|
||||
{ prop: 'code', label: this.$t('map.textCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.textList, deviceChange: this.deviceChange },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'code', label: '设备:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.deviceList, deviceChange: this.deviceChange },
|
||||
{ prop: 'pictureHide', label: '隐藏:', type: 'checkbox' },
|
||||
{ prop: 'position', label: '位置:', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: []
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
deviceList () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateMapModel() {
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
const pointsDevice = ['LINE', 'POWER', 'SECTION'];
|
||||
const pointDevice = ['OVERAP', 'TRAINWINDOW'];
|
||||
this.editModel.code = selected.code;
|
||||
this.editModel.name = selected.name;
|
||||
if (selected && pointsDevice.includes(selected._type.toUpperCase())) {
|
||||
this.editModel.position.x = selected.points[0].x;
|
||||
this.editModel.position.y = selected.points[0].y;
|
||||
} else if (selected && pointDevice.includes(selected._type.toUpperCase())) {
|
||||
this.editModel.position.x = selected.point.x;
|
||||
this.editModel.position.y = selected.point.y;
|
||||
} else {
|
||||
|
||||
this.editModel.position.x = selected.position.x;
|
||||
this.editModel.position.y = selected.position.y;
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
|
||||
this.editModel = { code: '', pictureHide: false, position: {x:0, y:0} };
|
||||
},
|
||||
deviceChange() {
|
||||
|
||||
deviceChange(val) {
|
||||
this.deviceSelect(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -49,11 +49,11 @@ export default {
|
||||
return {
|
||||
lazy: true,
|
||||
tabList:[
|
||||
{label: '设备', name: 'device', menus: DeviceDraft},
|
||||
{label: '多选', name: 'multiSelect', menus: MultiSelect}
|
||||
{label: '设备', name: 'Device', menus: DeviceDraft},
|
||||
{label: '多选', name: 'MultiSelect', menus: MultiSelect}
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Line'
|
||||
enabledTab: 'Device'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -62,12 +62,10 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.updateCount': function () {
|
||||
this.$refs[this.enabledTab][0].edit();
|
||||
},
|
||||
selected(val) {
|
||||
if (this.selected) {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.$refs[this.enabledTab]);
|
||||
this.$refs[this.enabledTab][0].deviceSelect(val);
|
||||
});
|
||||
}
|
||||
@ -76,11 +74,12 @@ export default {
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleSelectControlPage(device) {
|
||||
const type = device._type;
|
||||
if (this.selectDevice) {
|
||||
this.enabledTab = this.selectDevice;
|
||||
} else if (device._type === 'CheckBox') {
|
||||
this.enabledTab = 'MultiSelect';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
this.enabledTab = 'Device';
|
||||
}
|
||||
},
|
||||
deviceSelect(type) {
|
||||
|
@ -1,22 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="item in modelList" :key="item.type" class="content-box-list" style="margin-top: 10px">
|
||||
<div class="title-box">{{ item.name }}</div>
|
||||
<div class="list-box">
|
||||
<div
|
||||
v-for="nor in item.list"
|
||||
:key="nor.code"
|
||||
class="list-content"
|
||||
@mouseenter="mouseenter(nor)"
|
||||
@mouseleave="mouseleave(nor)"
|
||||
>
|
||||
<div class="name">{{ nor.name || nor.code }}</div>
|
||||
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
<div class="list-box">
|
||||
<div
|
||||
v-for="nor in deviceList"
|
||||
:key="nor.code"
|
||||
class="list-content"
|
||||
@mouseenter="mouseenter(nor)"
|
||||
@mouseleave="mouseleave(nor)"
|
||||
>
|
||||
<div class="name">{{ nor.name || nor.code }}</div>
|
||||
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div></template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
@ -25,13 +21,19 @@ export default {
|
||||
name: 'MultiSelect',
|
||||
data() {
|
||||
return {
|
||||
modelList: []
|
||||
modelList: [],
|
||||
deviceList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', ['seclectDeviceList'])
|
||||
},
|
||||
methods: {
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||
this.deviceList = [...this.seclectDeviceList];
|
||||
}
|
||||
},
|
||||
mouseenter(model) {
|
||||
if (model._type == 'Section') {
|
||||
model.instance.mouseover();
|
||||
@ -54,11 +56,45 @@ export default {
|
||||
this.seclectDeviceList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
clearData() {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.list-box {
|
||||
overflow: hidden;
|
||||
.list-content {
|
||||
float: left;
|
||||
background: #e2e2e2;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
padding-right: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
.name {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.close {
|
||||
float: left;
|
||||
width: 23px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title-box {
|
||||
padding-left: 10px;
|
||||
border-left: 4px solid red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -37,6 +37,7 @@
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:disabled="item.userId == userId"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -69,6 +70,11 @@ export default {
|
||||
memberId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
giveTicket() {
|
||||
if (this.memberId) {
|
||||
|
@ -21,8 +21,8 @@
|
||||
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||
<span>次列车,邻站到达通知</span>
|
||||
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
|
||||
<el-radio label="已">已</el-radio>
|
||||
<el-radio label="未" style="margin-left: 5px;">未</el-radio>
|
||||
<el-radio :label="true">已</el-radio>
|
||||
<el-radio :label="false" style="margin-left: 5px;">未</el-radio>
|
||||
</el-radio-group>
|
||||
<span>收到</span>
|
||||
</div>
|
||||
@ -65,6 +65,7 @@
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:disabled="item.userId == userId"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -97,6 +98,11 @@ export default {
|
||||
memberId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
giveTicket() {
|
||||
if (this.memberId) {
|
||||
|
@ -9,9 +9,11 @@
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
>
|
||||
<train-ticket v-if="trainTicket.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<green-licence v-else-if="trainTicket.type === 'GREEN_LICENCE'" :switch-flag="true" :green-license-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<red-licence v-else-if="trainTicket.type === 'RED_LICENCE'" :switch-flag="true" :red-license-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<div v-for="(item, index) in trainTicketList" :key="index">
|
||||
<train-ticket v-if="item.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<green-licence v-else-if="item.type === 'GREEN_LICENCE'" :switch-flag="true" :green-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
<red-licence v-else-if="item.type === 'RED_LICENCE'" :switch-flag="true" :red-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -32,7 +34,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
trainTicketShow: false,
|
||||
trainTicket: {},
|
||||
trainTicketList: [],
|
||||
giveMemberList: []
|
||||
};
|
||||
},
|
||||
@ -48,16 +50,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
this.trainTicketList = [];
|
||||
this.trainTicketShow = false;
|
||||
},
|
||||
doShow(info) {
|
||||
this.trainTicketShow = true;
|
||||
this.trainTicket = info;
|
||||
this.trainTicketList.push(info);
|
||||
},
|
||||
giveTicket(params) {
|
||||
const index = this.trainTicketList.findIndex(item => item.id === params.ticketId);
|
||||
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
||||
this.$message.success('给予路票成功!');
|
||||
this.doClose();
|
||||
// this.doClose();
|
||||
this.trainTicketList.splice(index, 1);
|
||||
}).catch(()=> {
|
||||
this.$message.error('给予路票失败!');
|
||||
});
|
||||
|
@ -37,6 +37,7 @@
|
||||
v-for="item in giveMemberList"
|
||||
:key="item.id"
|
||||
:label="item.labelName"
|
||||
:disabled="item.userId == userId"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -73,6 +74,11 @@ export default {
|
||||
memberId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
giveTicket() {
|
||||
if (this.memberId) {
|
||||
|
Loading…
Reference in New Issue
Block a user