路票调整
This commit is contained in:
parent
026395d982
commit
a692ae3aa7
@ -24,17 +24,17 @@ export function handlerUrl(data) {
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// const data = null;
|
// const data = null;
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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://192.168.3.233/rtss-server';
|
||||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.94: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.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://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.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 ? 'https://' + data.domainName : BASE_API;
|
||||||
BASE_API = data && data.domainName ? 'http://' + 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';
|
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import OperateProperty from './components/operateProperty';
|
import OperateProperty from './components/operateProperty';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'Device',
|
name: 'Device',
|
||||||
components: {
|
components: {
|
||||||
@ -22,19 +23,50 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editModel: {},
|
editModel: {
|
||||||
rules: {},
|
code: '',
|
||||||
typeList: []
|
pictureHide: false,
|
||||||
|
position: { x: 0, y: 0 }
|
||||||
|
},
|
||||||
|
rules: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList',
|
'arrowList',
|
||||||
|
'automaticRouteButtonList',
|
||||||
|
'axleCounterResetButtonList',
|
||||||
|
'cycleButtonList',
|
||||||
|
'directionRodList',
|
||||||
|
'espList',
|
||||||
|
'indicatorLightList',
|
||||||
|
'lcList',
|
||||||
|
'lineList',
|
||||||
|
'outerFrameList',
|
||||||
|
'psdList',
|
||||||
|
'resourceList',
|
||||||
|
'responderList',
|
||||||
'sectionList',
|
'sectionList',
|
||||||
'switchList',
|
'signalButtonList',
|
||||||
|
'signalList',
|
||||||
|
'splitStationList',
|
||||||
'stationList',
|
'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 () {
|
form () {
|
||||||
return {
|
return {
|
||||||
labelWidth: '130px',
|
labelWidth: '130px',
|
||||||
@ -46,34 +78,45 @@ export default {
|
|||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'type', label: '类型', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
|
{ prop: 'code', label: '设备:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.deviceList, deviceChange: this.deviceChange },
|
||||||
{ prop: 'code', label: this.$t('map.textCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.textList, deviceChange: this.deviceChange },
|
{ prop: 'pictureHide', label: '隐藏:', type: 'checkbox' },
|
||||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
|
{ 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.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 }
|
{ 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: {
|
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() {
|
clearDeviceSelect() {
|
||||||
|
this.editModel = { code: '', pictureHide: false, position: {x:0, y:0} };
|
||||||
},
|
},
|
||||||
deviceChange() {
|
deviceChange(val) {
|
||||||
|
this.deviceSelect(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -49,11 +49,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
lazy: true,
|
lazy: true,
|
||||||
tabList:[
|
tabList:[
|
||||||
{label: '设备', name: 'device', menus: DeviceDraft},
|
{label: '设备', name: 'Device', menus: DeviceDraft},
|
||||||
{label: '多选', name: 'multiSelect', menus: MultiSelect}
|
{label: '多选', name: 'MultiSelect', menus: MultiSelect}
|
||||||
],
|
],
|
||||||
selectDevice:'',
|
selectDevice:'',
|
||||||
enabledTab: 'Line'
|
enabledTab: 'Device'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -62,12 +62,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.updateCount': function () {
|
|
||||||
this.$refs[this.enabledTab][0].edit();
|
|
||||||
},
|
|
||||||
selected(val) {
|
selected(val) {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
console.log(this.$refs[this.enabledTab]);
|
||||||
this.$refs[this.enabledTab][0].deviceSelect(val);
|
this.$refs[this.enabledTab][0].deviceSelect(val);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -76,11 +74,12 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelectControlPage(device) {
|
handleSelectControlPage(device) {
|
||||||
const type = device._type;
|
|
||||||
if (this.selectDevice) {
|
if (this.selectDevice) {
|
||||||
this.enabledTab = this.selectDevice;
|
this.enabledTab = this.selectDevice;
|
||||||
|
} else if (device._type === 'CheckBox') {
|
||||||
|
this.enabledTab = 'MultiSelect';
|
||||||
} else {
|
} else {
|
||||||
this.enabledTab = type;
|
this.enabledTab = 'Device';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deviceSelect(type) {
|
deviceSelect(type) {
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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 class="list-box">
|
||||||
<div
|
<div
|
||||||
v-for="nor in item.list"
|
v-for="nor in deviceList"
|
||||||
:key="nor.code"
|
:key="nor.code"
|
||||||
class="list-content"
|
class="list-content"
|
||||||
@mouseenter="mouseenter(nor)"
|
@mouseenter="mouseenter(nor)"
|
||||||
@ -14,9 +12,7 @@
|
|||||||
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div></template>
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex';
|
import {mapGetters} from 'vuex';
|
||||||
@ -25,13 +21,19 @@ export default {
|
|||||||
name: 'MultiSelect',
|
name: 'MultiSelect',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modelList: []
|
modelList: [],
|
||||||
|
deviceList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', ['seclectDeviceList'])
|
...mapGetters('map', ['seclectDeviceList'])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deviceSelect(selected) {
|
||||||
|
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||||
|
this.deviceList = [...this.seclectDeviceList];
|
||||||
|
}
|
||||||
|
},
|
||||||
mouseenter(model) {
|
mouseenter(model) {
|
||||||
if (model._type == 'Section') {
|
if (model._type == 'Section') {
|
||||||
model.instance.mouseover();
|
model.instance.mouseover();
|
||||||
@ -54,11 +56,45 @@ export default {
|
|||||||
this.seclectDeviceList.splice(index, 1);
|
this.seclectDeviceList.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
clearData() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</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>
|
</style>
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
v-for="item in giveMemberList"
|
v-for="item in giveMemberList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.labelName"
|
:label="item.labelName"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -69,6 +70,11 @@ export default {
|
|||||||
memberId: ''
|
memberId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
giveTicket() {
|
giveTicket() {
|
||||||
if (this.memberId) {
|
if (this.memberId) {
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
|
||||||
<span>次列车,邻站到达通知</span>
|
<span>次列车,邻站到达通知</span>
|
||||||
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
|
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
|
||||||
<el-radio label="已">已</el-radio>
|
<el-radio :label="true">已</el-radio>
|
||||||
<el-radio label="未" style="margin-left: 5px;">未</el-radio>
|
<el-radio :label="false" style="margin-left: 5px;">未</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<span>收到</span>
|
<span>收到</span>
|
||||||
</div>
|
</div>
|
||||||
@ -65,6 +65,7 @@
|
|||||||
v-for="item in giveMemberList"
|
v-for="item in giveMemberList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.labelName"
|
:label="item.labelName"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -97,6 +98,11 @@ export default {
|
|||||||
memberId: ''
|
memberId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
giveTicket() {
|
giveTicket() {
|
||||||
if (this.memberId) {
|
if (this.memberId) {
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
center
|
center
|
||||||
>
|
>
|
||||||
<train-ticket v-if="trainTicket.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
<div v-for="(item, index) in trainTicketList" :key="index">
|
||||||
<green-licence v-else-if="trainTicket.type === 'GREEN_LICENCE'" :switch-flag="true" :green-license-form="trainTicket" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
|
<train-ticket v-if="item.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="item" :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" />
|
<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>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -32,7 +34,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
trainTicketShow: false,
|
trainTicketShow: false,
|
||||||
trainTicket: {},
|
trainTicketList: [],
|
||||||
giveMemberList: []
|
giveMemberList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -48,16 +50,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doClose() {
|
doClose() {
|
||||||
|
this.trainTicketList = [];
|
||||||
this.trainTicketShow = false;
|
this.trainTicketShow = false;
|
||||||
},
|
},
|
||||||
doShow(info) {
|
doShow(info) {
|
||||||
this.trainTicketShow = true;
|
this.trainTicketShow = true;
|
||||||
this.trainTicket = info;
|
this.trainTicketList.push(info);
|
||||||
},
|
},
|
||||||
giveTicket(params) {
|
giveTicket(params) {
|
||||||
|
const index = this.trainTicketList.findIndex(item => item.id === params.ticketId);
|
||||||
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
|
||||||
this.$message.success('给予路票成功!');
|
this.$message.success('给予路票成功!');
|
||||||
this.doClose();
|
// this.doClose();
|
||||||
|
this.trainTicketList.splice(index, 1);
|
||||||
}).catch(()=> {
|
}).catch(()=> {
|
||||||
this.$message.error('给予路票失败!');
|
this.$message.error('给予路票失败!');
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
v-for="item in giveMemberList"
|
v-for="item in giveMemberList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.labelName"
|
:label="item.labelName"
|
||||||
|
:disabled="item.userId == userId"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -73,6 +74,11 @@ export default {
|
|||||||
memberId: ''
|
memberId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
giveTicket() {
|
giveTicket() {
|
||||||
if (this.memberId) {
|
if (this.memberId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user