Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into yly
This commit is contained in:
commit
e0e64340fc
@ -154,7 +154,7 @@ export default class Station extends Group {
|
||||
return item.includes('ctc');
|
||||
});
|
||||
if (queryCtc) {
|
||||
this.createCtcControlMode()
|
||||
this.createCtcControlMode();
|
||||
} else if (this.style.Station.StationControl.special) {
|
||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||
this.createControlModeAU();
|
||||
@ -512,7 +512,7 @@ export default class Station extends Group {
|
||||
textAlign: this.style.Station.StationControl.text.textAlign,
|
||||
textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign
|
||||
},
|
||||
pop: false,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.veryControlButtonText);
|
||||
}
|
||||
|
@ -58,6 +58,7 @@
|
||||
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
|
||||
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<cmdManage v-if="isCtc" ref="cmdManage" />
|
||||
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -102,6 +103,7 @@ import CtcBarIcon16 from '@/assets/ctc_icon/pic16.png';
|
||||
import CtcBarIcon17 from '@/assets/ctc_icon/pic17.png';
|
||||
import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
|
||||
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
|
||||
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
@ -124,7 +126,8 @@ export default {
|
||||
// DispatcherLoger,
|
||||
BottomTable,
|
||||
MenuPanel,
|
||||
cmdManage
|
||||
cmdManage,
|
||||
signedCmd
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -243,8 +246,19 @@ export default {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods: {
|
||||
changeSignedStatus(info) {
|
||||
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
|
||||
},
|
||||
signedCmdClose() {
|
||||
this.isCtc && this.$refs.cmdManage.doShow();
|
||||
},
|
||||
showCmdManage() {
|
||||
if (!this.isCtc) { return; }
|
||||
if (this.hasCommandMsg) {
|
||||
this.$refs.signedCmd.doShow();
|
||||
} else {
|
||||
this.$refs.cmdManage.doShow();
|
||||
}
|
||||
},
|
||||
getRailwaySimulationRunplanSend() {
|
||||
const stationCode = this.$store.state.training.roleDeviceCode;
|
||||
|
113
src/jmapNew/theme/datie_tky/menus/menuSection.vue
Normal file
113
src/jmapNew/theme/datie_tky/menus/menuSection.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
// handler: this.setStoppage,
|
||||
handler: this.cancelStoppage,
|
||||
// cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
// console.log(this.buttonOperation, '***********');
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -76,6 +76,7 @@ const IscsStationConfig = () => import('@/views/iscs/iscsSystem/stationConfig/in
|
||||
|
||||
const NewMapDraft = () => import('@/views/newMap/newMapdraft/index');
|
||||
const NewMapDraftSystem = () => import('@/views/newMap/newMapdraftSystem/index');
|
||||
const MapDraftPicture = () => import('@/views/newMap/mapDraftPicture/index');
|
||||
const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index');
|
||||
|
||||
const Taskmanage = () => import('@/views/lesson/taskmanage/list');
|
||||
@ -1356,6 +1357,11 @@ export const asyncRouter = [
|
||||
component: NewMapDraftSystem,
|
||||
hidden: true
|
||||
},
|
||||
{ // 地图画面管理
|
||||
path: 'usermap/map/pictureDraw/:mapId/:view',
|
||||
component: MapDraftPicture,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path:'iscs/design',
|
||||
redirect: '/iscs/design',
|
||||
|
@ -73,7 +73,8 @@ export default {
|
||||
{label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
|
||||
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
||||
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'},
|
||||
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'}
|
||||
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant'}
|
||||
],
|
||||
|
||||
releaseReview: [
|
||||
|
@ -143,7 +143,7 @@ export const IbpOperation = {
|
||||
PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复位'},
|
||||
SD: {operate: '15', event: 'SD', name: '试灯'},
|
||||
XXGM: {operate: '16', event: 'XXGM', name: '下行屏蔽门开门'},
|
||||
SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'},
|
||||
SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -167,7 +167,8 @@ export const SimulationType = {
|
||||
DISPATCHER: '行调',
|
||||
STATION_SUPERVISOR: '车站值班员',
|
||||
DRIVER: '司机',
|
||||
MAINTAINER: '通号'
|
||||
MAINTAINER: '通号',
|
||||
STATION_ASSISTANT: '车站助理'
|
||||
};
|
||||
export const UrlConfig = {
|
||||
displayNew: '/displayNew',
|
||||
|
@ -24,10 +24,11 @@ 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.94: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'; // 卫志宏
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div class="box-top">
|
||||
<div class="top-title">收令箱</div>
|
||||
<div class="top-table">
|
||||
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row @current-change="handleCurrentChange">
|
||||
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
|
||||
<el-table-column prop="title" label="标题" />
|
||||
<el-table-column prop="number" label="号码" width="80" />
|
||||
<el-table-column label="命令类型" width="100">
|
||||
@ -193,6 +193,13 @@ export default {
|
||||
this.searchCmd();
|
||||
},
|
||||
methods:{
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
const status = this.getSignInfo(row.receiverInfos).signedStatus;
|
||||
if (status === 'SIGNED') {
|
||||
return 'signed-row';
|
||||
}
|
||||
return 'unsigned-row';
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$store.commit('socket/clearDispatchCommandMsg');
|
||||
@ -219,27 +226,14 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status };
|
||||
const data = {
|
||||
signInfo: {
|
||||
commandId: this.commandId,
|
||||
signedBy: this.getActiveUser.memberId,
|
||||
signedStatus: status
|
||||
}
|
||||
signInfo: signInfo
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
if (res.code == 200) {
|
||||
const index = this.cmdTableData.findIndex(item => {
|
||||
return item.id == this.commandId;
|
||||
});
|
||||
if (index >= 0) {
|
||||
const obj = this.cmdTableData[index];
|
||||
const mId = this.getActiveUser.memberId;
|
||||
obj.receiverInfos[mId].signedBy = mId;
|
||||
obj.receiverInfos[mId].signedStatus = status;
|
||||
obj.receiverInfos[mId].time = parseTime(this.initTime);
|
||||
this.cmdTableData.splice(index, 1, obj);
|
||||
}
|
||||
this.changeSignedStatus(signInfo);
|
||||
} else {
|
||||
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${res.message}`);
|
||||
}
|
||||
@ -247,6 +241,19 @@ export default {
|
||||
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${error.message}`);
|
||||
});
|
||||
},
|
||||
changeSignedStatus(signInfo) {
|
||||
const index = this.cmdTableData.findIndex(item => {
|
||||
return item.id == signInfo.commandId;
|
||||
});
|
||||
if (index >= 0) {
|
||||
const obj = this.cmdTableData[index];
|
||||
const mId = signInfo.signedBy;
|
||||
obj.receiverInfos[mId].signedBy = mId;
|
||||
obj.receiverInfos[mId].signedStatus = signInfo.signedStatus;
|
||||
obj.receiverInfos[mId].time = parseTime(this.initTime);
|
||||
this.cmdTableData.splice(index, 1, obj);
|
||||
}
|
||||
},
|
||||
searchCmd() {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
||||
console.log(res, '---res');
|
||||
@ -298,6 +305,16 @@ export default {
|
||||
.content-box {
|
||||
width: calc(100% - 150px);
|
||||
padding-left: 10px;
|
||||
.box-top {
|
||||
.el-table {
|
||||
/deep/ .signed-row {
|
||||
color: red;
|
||||
}
|
||||
/deep/ .unsigned-row {
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box-middle {
|
||||
padding-top: 10px;
|
||||
display: flex;
|
||||
|
@ -19,7 +19,7 @@
|
||||
<el-tab-pane label="操作" name="operate">
|
||||
<div class="operate-box">
|
||||
<div class="create-cmd">
|
||||
<el-button type="primary" @click="initData">新建调度命令</el-button>
|
||||
<el-button type="primary" @click="createCmd">新建调度命令</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@ -253,6 +253,16 @@ export default {
|
||||
beforeDestroy() {},
|
||||
mounted() {},
|
||||
methods:{
|
||||
createCmd() {
|
||||
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
|
||||
confirmButtonText: '是',
|
||||
cancelButtonText: '否'
|
||||
}).then(() => {
|
||||
this.initData();
|
||||
}).catch(() => {
|
||||
console.log('取消新建调度命令!');
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
this.command = {
|
||||
title: '',
|
||||
@ -284,6 +294,7 @@ export default {
|
||||
}
|
||||
},
|
||||
getSenderName() {
|
||||
this.memberDataList = Object.values(this.memberData);
|
||||
const activeUser = this.memberDataList.find(item => {
|
||||
return item.userId == this.$store.state.user.id;
|
||||
});
|
||||
@ -293,7 +304,6 @@ export default {
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.memberDataList = Object.values(this.memberData);
|
||||
this.getSenderName();
|
||||
this.dialogShow = true;
|
||||
},
|
||||
|
275
src/views/dispatcherStationManage/signedCmd.vue
Normal file
275
src/views/dispatcherStationManage/signedCmd.vue
Normal file
@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="cmd-manage chengdou-03__systerm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="1000px"
|
||||
:before-close="doClose"
|
||||
:z-index="2010"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="main">
|
||||
<div class="top">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div>
|
||||
<span>命令类型名称:</span>
|
||||
<span>{{ typeObj[signedData.type] }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div>
|
||||
<span>命令号码:</span>
|
||||
<span>{{ signedData.number }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div>
|
||||
<span>日期:</span>
|
||||
<span>{{ getParseTime(signedData.sendTime, '{y}-{m}-{d}') }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div>
|
||||
<span>发令时刻:</span>
|
||||
<span>{{ getParseTime(signedData.sendTime, '{h}:{i}:{s}') }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<div>
|
||||
<span>发令单位:</span>
|
||||
<span>{{ signedData.companyOfSender }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<div>
|
||||
<span>调度员姓名:</span>
|
||||
<span>{{ signedData.senderName }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="box-title">命令内容</div>
|
||||
<div class="box-top">
|
||||
<el-input v-model="signedData.content" readonly type="textarea" rows="9" resize="none" placeholder="请输入内容" />
|
||||
</div>
|
||||
<div class="box-table">
|
||||
<el-table :data="getTableData" style="width: 100%" height="200">
|
||||
<el-table-column type="index" label="序" width="50" />
|
||||
<el-table-column prop="deviceName" label="受令单位" />
|
||||
<el-table-column prop="copyers" label="抄知处所" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="box-bottom">
|
||||
<div>
|
||||
<el-checkbox v-model="needprint">签收后打印</el-checkbox>
|
||||
<el-checkbox v-model="needRead">需他人阅读</el-checkbox>
|
||||
</div>
|
||||
<div class="bottom-signed">
|
||||
<span>签收人姓名:</span>
|
||||
<el-input v-model="signedBy" readonly style="width: 150px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
|
||||
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import { mapState } from 'vuex';
|
||||
import { parseTime } from '@/utils/index';
|
||||
export default {
|
||||
name:'CmdManage',
|
||||
data() {
|
||||
return {
|
||||
signedData: {},
|
||||
needRead: false,
|
||||
needprint: false,
|
||||
dialogShow: false,
|
||||
signedId: '',
|
||||
signedBy: '',
|
||||
typeObj: {
|
||||
NORMAL: '正常调度命令'
|
||||
},
|
||||
signedStatusObj: {
|
||||
UNSIGNED: '未签收',
|
||||
SIGNED: '签收',
|
||||
REFUSE: '拒签'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState('training', [
|
||||
'memberList', 'simulationUserList', 'initTime'
|
||||
]),
|
||||
...mapState('socket', [
|
||||
'dispatchCommandMsg'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
title() {
|
||||
return '调度命令管理';
|
||||
},
|
||||
commandId() {
|
||||
return this.signedData.id || '';
|
||||
},
|
||||
currentHasSigned() {
|
||||
let hasSigned = false;
|
||||
if (this.signedData.receiverInfos) {
|
||||
const obj = this.getSignInfo(this.signedData.receiverInfos);
|
||||
if (obj && obj.signedStatus != 'UNSIGNED') {
|
||||
hasSigned = true;
|
||||
}
|
||||
}
|
||||
return hasSigned;
|
||||
},
|
||||
getActiveUser() {
|
||||
const userInfo = this.simulationUserList.find(item => {
|
||||
return item.userId == this.$store.state.user.id;
|
||||
});
|
||||
const activeUser = userInfo || {};
|
||||
return activeUser;
|
||||
},
|
||||
getTableData() {
|
||||
const receiverList = Object.values(this.signedData.receiverInfos || {});
|
||||
const mList = [];
|
||||
receiverList.forEach(ii => {
|
||||
const obj = this.memberList.find(item => {
|
||||
return item.id == ii.receiverId;
|
||||
});
|
||||
if (obj) {
|
||||
mList.push({
|
||||
commandId: this.commandId,
|
||||
...ii,
|
||||
...obj
|
||||
});
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
mList.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
const obj = {
|
||||
...this.signedData,
|
||||
...item,
|
||||
deviceName: device ? device.name : ''
|
||||
};
|
||||
list.push(obj);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
beforeDestroy() {},
|
||||
mounted() {},
|
||||
methods:{
|
||||
getParseTime(val, f) {
|
||||
return val ? parseTime(val, f) : '';
|
||||
},
|
||||
getSenderName() {
|
||||
this.signedBy = '';
|
||||
this.signedId = '';
|
||||
const activeUser = this.simulationUserList.find(item => {
|
||||
return item.userId == this.$store.state.user.id;
|
||||
});
|
||||
if (activeUser) {
|
||||
this.signedBy = activeUser.nickName;
|
||||
this.signedId = activeUser.memberId;
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.getSenderName();
|
||||
this.getSignedData();
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$emit('signedCmdClose');
|
||||
},
|
||||
getSignedData() {
|
||||
this.signedData = {};
|
||||
if (this.dispatchCommandMsg.type == 'ADD') {
|
||||
this.signedData = this.dispatchCommandMsg.body;
|
||||
}
|
||||
},
|
||||
getSignInfo(info) {
|
||||
const obj = info[this.getActiveUser.memberId] || {};
|
||||
return obj;
|
||||
},
|
||||
getSignedBy(info) {
|
||||
const signedInfo = this.simulationUserList.find(item => {
|
||||
return item.memberId == info.signedBy;
|
||||
});
|
||||
let name = '';
|
||||
if (signedInfo) {
|
||||
name = signedInfo.nickName;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
this.$emit('changeSignedStatus', signInfo);
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
this.$messageBox('查询调度命令失败:' + error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main {
|
||||
height: 100%;
|
||||
.top {
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #ccc;
|
||||
span {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.content-box {
|
||||
.box-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.box-bottom {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.bottom-signed {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom-btn {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
@ -2,8 +2,8 @@
|
||||
|
||||
<div id="drivediv" class="jalmap3ddiv">
|
||||
|
||||
<div style="position: absolute;right:50%;top:40px;z-index:10;background: #EBEBEB;" v-show="tuoguanbutton" @click="tuoguan">{{ tuoguanbuttonmsg }}</div>
|
||||
<div style="position: absolute;right:50%;top:0%;z-index:10;background: #EBEBEB;" v-show="isTraining" >
|
||||
<div v-show="tuoguanbutton" style="position: absolute;right:50%;top:40px;z-index:10;background: #EBEBEB;" @click="tuoguan">{{ tuoguanbuttonmsg }}</div>
|
||||
<div v-show="isTraining" style="position: absolute;right:50%;top:0%;z-index:10;background: #EBEBEB;">
|
||||
<el-select v-model="value" :placeholder="initMsg" @change="currentsel" @visible-change="clickselect">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
@ -11,8 +11,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
@ -40,10 +39,9 @@
|
||||
<div id="jlsimulation" class="jlmap3ddraw">
|
||||
<canvas id="canvastexture" />
|
||||
</div>
|
||||
<div id="jlcctv" v-show="cctvshow" class="jlmap3cctv">
|
||||
</div>
|
||||
<div v-show="cctvshow" id="jlcctv" class="jlmap3cctv" />
|
||||
|
||||
<div class="msg" v-show ="msgshow">
|
||||
<div v-show="msgshow" class="msg">
|
||||
<div class="msgtext">
|
||||
{{ controlmsg }}
|
||||
</div>
|
||||
@ -99,7 +97,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
groupnum:"",
|
||||
groupnum:'',
|
||||
userrole:'',
|
||||
|
||||
driveIndex:1500,
|
||||
@ -115,9 +113,9 @@ export default {
|
||||
jlmap3d: null,
|
||||
selectmodel: null,
|
||||
cctvshow:true,
|
||||
equipboxmsg:"设备柜——隐藏",
|
||||
pslmsg:"PSL",
|
||||
pslCode:"",
|
||||
equipboxmsg:'设备柜——隐藏',
|
||||
pslmsg:'PSL',
|
||||
pslCode:'',
|
||||
pslShow:false,
|
||||
cctvbuttonmsg: this.$t('jlmap3d.surveillanceHidden'),
|
||||
mmishow: false,
|
||||
@ -130,22 +128,27 @@ export default {
|
||||
dcontrolshow: true,
|
||||
equipboxshow:false,
|
||||
msgshow:false,
|
||||
controlmsg:"不能选择其它列车",
|
||||
controlmsg:'不能选择其它列车',
|
||||
|
||||
tuoguanbutton:false,
|
||||
tuoguanbuttonmsg:"托管",
|
||||
tuoguanbuttonmsg:'托管',
|
||||
tuoguanstatus:false,
|
||||
isTraining:true,
|
||||
options: [],
|
||||
initMsg:"请选择列车",
|
||||
initMsg:'请选择列车',
|
||||
value: '',
|
||||
topid:null,
|
||||
trainlist:null,
|
||||
groupnum:"",
|
||||
userrole:'',
|
||||
nowdrive:null,
|
||||
nowdrive:null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'jlmap3d.nowspeed': {
|
||||
handler: function (newVal, oldVal) {
|
||||
@ -206,7 +209,7 @@ export default {
|
||||
this.$refs.mmiui.updatedrivedata(this.jlmap3d.drivedata);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -222,14 +225,6 @@ export default {
|
||||
},
|
||||
destroyed() {
|
||||
// window.removeEventListener('popstate', this.goBack, false);
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.mmishow = true;
|
||||
@ -243,15 +238,15 @@ export default {
|
||||
if (this.$route.query.group) {
|
||||
getSimulationInfoNew(this.$route.query.group).then(netdata => {
|
||||
|
||||
if(netdata.data.type == "SCRIPT_MAKING"){
|
||||
if (netdata.data.type == 'SCRIPT_MAKING') {
|
||||
this.tuoguanbutton = true;
|
||||
}
|
||||
this.inittrainlist();
|
||||
});
|
||||
}
|
||||
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
this.backmsg = "退出";
|
||||
if (this.$route.query.type == 'DRIVE') {
|
||||
this.backmsg = '退出';
|
||||
}
|
||||
|
||||
// if (window.history && window.history.pushState) {
|
||||
@ -277,13 +272,13 @@ export default {
|
||||
// // this.jlmap3d = null;
|
||||
// }
|
||||
// },
|
||||
show: function (skinCode,group,zindex,isTraining) {
|
||||
show: function (skinCode, group, zindex, isTraining, deviceCode) {
|
||||
// console.log("show");
|
||||
// console.log(skinCode);
|
||||
// console.log(this.jlmap3d);
|
||||
if (zindex) {
|
||||
this.driveIndex = zindex;
|
||||
document.getElementById("drivediv").style.zIndex = zindex;
|
||||
document.getElementById('drivediv').style.zIndex = zindex;
|
||||
}
|
||||
if (this.jlmap3d == null) {
|
||||
this.init(skinCode, group);
|
||||
@ -295,17 +290,21 @@ export default {
|
||||
if (isTraining) {
|
||||
// this.$refs.dcontrol.changeTrainSelect(isTraining);
|
||||
}
|
||||
if (deviceCode) {
|
||||
this.value = deviceCode;
|
||||
this.groupnum = deviceCode;
|
||||
}
|
||||
},
|
||||
init: function (skinCode, group) {
|
||||
const mapdata = this.$store.getters['map/map'];
|
||||
const dom = document.getElementById('app');
|
||||
let translation = {
|
||||
const translation = {
|
||||
trainAtoOn: this.$t('jlmap3d.trainAtoOn'),
|
||||
trainAtoOff: this.$t('jlmap3d.trainAtoOff'),
|
||||
stopTime: this.$t('jlmap3d.stopTime')
|
||||
};
|
||||
|
||||
let project = this.$route.query.project;
|
||||
const project = this.$route.query.project;
|
||||
// console.log(project);
|
||||
if (project) {
|
||||
this.jlmap3d = new JLmapDriving(dom, mapdata, skinCode, this.$store, translation, group, project);
|
||||
@ -346,7 +345,7 @@ export default {
|
||||
|
||||
back() {
|
||||
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
if (this.$route.query.type == 'DRIVE') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
@ -357,8 +356,6 @@ export default {
|
||||
// this.jlmap3d = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
showmmiplane() {
|
||||
if (this.mmishow == true) {
|
||||
@ -385,10 +382,10 @@ export default {
|
||||
},
|
||||
equipboxplane() {
|
||||
if (this.equipboxshow == true) {
|
||||
this.equipboxmsg = "设备柜——隐藏";
|
||||
this.equipboxmsg = '设备柜——隐藏';
|
||||
this.equipboxshow = false;
|
||||
} else {
|
||||
this.equipboxmsg = "设备柜——显示";
|
||||
this.equipboxmsg = '设备柜——显示';
|
||||
this.equipboxshow = true;
|
||||
}
|
||||
|
||||
@ -420,7 +417,6 @@ export default {
|
||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||
}
|
||||
|
||||
|
||||
updatabuttonlight(newdata);
|
||||
},
|
||||
warningmsg(nowmsg) {
|
||||
@ -443,16 +439,16 @@ export default {
|
||||
// this.$store.dispatch('training/updateMemberListInScript', {oldMemberId:this.oldMemberId, newMemberId:role, userId:this.userId});
|
||||
this.tuoguanstatus = posttrust;
|
||||
if (this.tuoguanstatus) {
|
||||
this.tuoguanbuttonmsg = "取消托管";
|
||||
this.tuoguanbuttonmsg = '取消托管';
|
||||
} else {
|
||||
this.tuoguanbuttonmsg = "托管";
|
||||
this.tuoguanbuttonmsg = '托管';
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
||||
});
|
||||
},
|
||||
currentsel(selVal) {
|
||||
let oldgroupnum = this.groupnum;
|
||||
const oldgroupnum = this.groupnum;
|
||||
this.groupnum = selVal;
|
||||
bindSimulationTrain(this.group, this.groupnum).then(netdata => {
|
||||
this.selVal = selVal;
|
||||
@ -485,9 +481,9 @@ export default {
|
||||
if (this.tuoguanstatus != trustStatus) {
|
||||
this.tuoguanstatus = trustStatus;
|
||||
if (this.tuoguanstatus) {
|
||||
this.tuoguanbuttonmsg = "取消托管";
|
||||
this.tuoguanbuttonmsg = '取消托管';
|
||||
} else {
|
||||
this.tuoguanbuttonmsg = "托管";
|
||||
this.tuoguanbuttonmsg = '托管';
|
||||
}
|
||||
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code, trust:trustStatus});
|
||||
}
|
||||
@ -497,21 +493,20 @@ export default {
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
for (let i = 0; i < netdata.data.length; i++) {
|
||||
let option= {
|
||||
const option = {
|
||||
value: netdata.data[i].groupNumber,
|
||||
label: netdata.data[i].groupNumber,
|
||||
name:null,
|
||||
}
|
||||
name:null
|
||||
};
|
||||
option.disabled = false;
|
||||
|
||||
if (netdata.data[i].name) {
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
option.label = netdata.data[i].name + '正在驾驶' + netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name + '正在驾驶' + netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].groupNumber;
|
||||
option.disabled = true;
|
||||
}
|
||||
|
||||
|
||||
if (netdata.data[i].driverId) {
|
||||
if (netdata.data[i].driverId == this.userId) {
|
||||
|
||||
@ -537,13 +532,12 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.options.push(option);
|
||||
}
|
||||
this.options.sort(
|
||||
function(obj1, obj2) {
|
||||
let val1 = obj1.value;
|
||||
let val2 = obj2.value;
|
||||
const val1 = obj1.value;
|
||||
const val2 = obj2.value;
|
||||
return val1 - val2;
|
||||
}
|
||||
);
|
||||
@ -551,17 +545,17 @@ export default {
|
||||
// 获取当前录制托管状态
|
||||
if (this.tuoguanbutton == true) {
|
||||
|
||||
let netdata = this.$store.state.training.memberData;
|
||||
for(let k in netdata){
|
||||
const netdata = this.$store.state.training.memberData;
|
||||
for (const k in netdata) {
|
||||
if (netdata[k].userId == this.userId) {
|
||||
// console.log(this.$store.state.scriptRecord.type);
|
||||
this.userrole = netdata[k].type;
|
||||
if (netdata[k].trust) {
|
||||
this.tuoguanstatus = netdata[k].trust;
|
||||
if (this.tuoguanstatus) {
|
||||
this.tuoguanbuttonmsg = "取消托管";
|
||||
this.tuoguanbuttonmsg = '取消托管';
|
||||
} else {
|
||||
this.tuoguanbuttonmsg = "托管";
|
||||
this.tuoguanbuttonmsg = '托管';
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -594,16 +588,16 @@ export default {
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
for (let i = 0; i < netdata.data.length; i++) {
|
||||
let option= {
|
||||
const option = {
|
||||
value: netdata.data[i].groupNumber,
|
||||
label: netdata.data[i].groupNumber,
|
||||
name:null,
|
||||
}
|
||||
name:null
|
||||
};
|
||||
option.disabled = false;
|
||||
|
||||
if (netdata.data[i].name) {
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
option.label = netdata.data[i].name + '正在驾驶' + netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name + '正在驾驶' + netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].groupNumber;
|
||||
option.disabled = true;
|
||||
}
|
||||
@ -617,8 +611,8 @@ export default {
|
||||
}
|
||||
this.options.sort(
|
||||
function(obj1, obj2) {
|
||||
let val1 = obj1.value;
|
||||
let val2 = obj2.value;
|
||||
const val1 = obj1.value;
|
||||
const val2 = obj2.value;
|
||||
return val1 - val2;
|
||||
}
|
||||
);
|
||||
@ -626,17 +620,17 @@ export default {
|
||||
// 获取当前录制托管状态
|
||||
if (this.tuoguanbutton == true) {
|
||||
|
||||
let netdata = this.$store.state.training.memberData;
|
||||
for(let k in netdata){
|
||||
const netdata = this.$store.state.training.memberData;
|
||||
for (const k in netdata) {
|
||||
if (netdata[k].userId == this.userId) {
|
||||
// console.log(this.$store.state.scriptRecord.type);
|
||||
this.userrole = netdata[k].type;
|
||||
if (netdata[k].trust) {
|
||||
this.tuoguanstatus = netdata[k].trust;
|
||||
if (this.tuoguanstatus) {
|
||||
this.tuoguanbuttonmsg = "取消托管";
|
||||
this.tuoguanbuttonmsg = '取消托管';
|
||||
} else {
|
||||
this.tuoguanbuttonmsg = "托管";
|
||||
this.tuoguanbuttonmsg = '托管';
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -647,7 +641,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -750,6 +750,7 @@ export default {
|
||||
}
|
||||
}, 1000);
|
||||
}, function (error) {
|
||||
that.audioPlay = false;
|
||||
switch (error.code || error.name) {
|
||||
case 'PERMISSION_DENIED':
|
||||
case 'PermissionDeniedError':
|
||||
|
@ -463,6 +463,26 @@ export default {
|
||||
this.jl3dmaintainershow = false;
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||
this.showStation = deviceCode;
|
||||
if (this.lineCode === '14') {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeDate: this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, '02');
|
||||
}
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||
this.jl3dmaintainershow = false;
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '09');
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
@ -600,7 +620,7 @@ export default {
|
||||
if (this.$store.state.training.prdType == '04') {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining');
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining', this.deviceCode);
|
||||
} else {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/sandbox',
|
||||
@ -733,8 +753,8 @@ export default {
|
||||
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
||||
this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||
this.deviceCode = item.deviceCode;
|
||||
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||
this.$nextTick(() => {
|
||||
if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
|
||||
});
|
||||
|
@ -116,6 +116,9 @@ export default {
|
||||
}, {
|
||||
labelName: 'CTC操作员',
|
||||
children: []
|
||||
}, {
|
||||
labelName: '车站助理',
|
||||
children: []
|
||||
}]
|
||||
};
|
||||
},
|
||||
@ -150,6 +153,7 @@ export default {
|
||||
const driverList = [];
|
||||
const maintainerList = [];
|
||||
const ctcOperatorList = [];
|
||||
const stationAssistantList = [];
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.type) {
|
||||
@ -180,7 +184,11 @@ export default {
|
||||
case 'RAIL_CTC':
|
||||
this.memberData[item.id].labelName = 'CTC操作员' + device.name;
|
||||
ctcOperatorList.push(this.memberData[item.id]);
|
||||
break
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
this.memberData[item.id].labelName = '车站助理' + +device.name + (item.name ? `-${item.name }` : '');
|
||||
stationAssistantList.push(this.memberData[item.id]);
|
||||
break;
|
||||
}
|
||||
});
|
||||
this.treeData = [{
|
||||
@ -211,6 +219,10 @@ export default {
|
||||
labelName: 'CTC操作员',
|
||||
id: 'ctcOperator',
|
||||
children: ctcOperatorList
|
||||
}, {
|
||||
labelName: '车站助理',
|
||||
id: 'stationAssistant',
|
||||
children: stationAssistantList
|
||||
}
|
||||
];
|
||||
this.$nextTick(() => {
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
datie() {
|
||||
return this.$route.query.lineCode == '16'
|
||||
return this.$route.query.lineCode == '16';
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
@ -306,6 +306,10 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'CI':
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI');
|
||||
this.$emit('getUserRole');
|
||||
|
660
src/views/newMap/mapDraftPicture/index.vue
Normal file
660
src/views/newMap/mapDraftPicture/index.vue
Normal file
@ -0,0 +1,660 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="mapPaint">
|
||||
<div v-show="maskOpen" class="mask" />
|
||||
<div class="map-view">
|
||||
<div class="operation_box" :class="{'rightShow': draftShow}">
|
||||
<el-button-group>
|
||||
<el-button size="small" :disabled="!stepData.length" @click="revocation">撤销</el-button>
|
||||
<el-button size="small" :disabled="!recoverStepData.length" @click="recover">恢复</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div class="operation_box back_box">
|
||||
<el-button size="small" @click="backRoute">返回</el-button>
|
||||
<el-button size="small" style="margin-left: 5px;" @click="updateObjAxis">更新坐标</el-button>
|
||||
</div>
|
||||
<jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||
</div>
|
||||
<div class="map-draft" :class="{'hide': draftShow}">
|
||||
<div class="btn_left_box" @click="clickRightBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
|
||||
<div class="box">
|
||||
<map-operate
|
||||
ref="mapOperate"
|
||||
:map-info="mapInfo"
|
||||
:selected="selected"
|
||||
:map-saveing="mapSaveing"
|
||||
@saveMapEvent="saveMapEvent"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import { saveMap, verifyMap, getMapDetail, postBuildMapImport, getRouteNewList, getAutoReentryList } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode, TrainingMode, getDeviceMenuByDeviceType, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
export default {
|
||||
name: 'MapView',
|
||||
components: {
|
||||
JlmapVisual,
|
||||
MapOperate,
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewSelect: ViewMode.MIX,
|
||||
mapSaveing: false,
|
||||
ViewMode: ViewMode,
|
||||
viewDraft: 'draft',
|
||||
autoSaveTask: null,
|
||||
selected: null,
|
||||
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
||||
oldDevice: null,
|
||||
draftShow: false,
|
||||
size: {
|
||||
width: document.documentElement.clientWidth - 521,
|
||||
height: document.documentElement.clientHeight - 90
|
||||
},
|
||||
updtModel: {
|
||||
code: '',
|
||||
scaling: '',
|
||||
origin: {
|
||||
x: '',
|
||||
y: ''
|
||||
}
|
||||
},
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stepData',
|
||||
'recoverStepData',
|
||||
'stationList'
|
||||
]),
|
||||
maskOpen() {
|
||||
return this.$store.state.config.maskOpen;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function () {
|
||||
this.initAutoSaveTask();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.setWindowSize();
|
||||
},
|
||||
$route() {
|
||||
this.clearAutoSave();
|
||||
this.$nextTick(() => {
|
||||
this.loadInitPage();
|
||||
});
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.popDoShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setWindowSize();
|
||||
this.loadInitPage();
|
||||
EventBus.$on('SELECTON', () => {
|
||||
this.selected = null;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
EventBus.$off('SELECTON');
|
||||
this.clearAutoSave();
|
||||
this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
methods: {
|
||||
clickRightBtn() {
|
||||
this.draftShow = !this.draftShow;
|
||||
},
|
||||
getMapOrigin() {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.popDoClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
popDoShow(point) {
|
||||
this.popClickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
popClickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function () {
|
||||
self.popDoClose();
|
||||
};
|
||||
},
|
||||
popDoClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
updateObjAxis() {
|
||||
this.getMapOrigin();
|
||||
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const map = this.$store.state.map.map;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name
|
||||
},
|
||||
origin: {
|
||||
x: this.updtModel.origin.x || map.origin.x,
|
||||
y: this.updtModel.origin.y || map.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(() => {
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
setWindowSize() {
|
||||
this.$nextTick(() => {
|
||||
const width = this.$store.state.app.width;
|
||||
const height = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
});
|
||||
},
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('viewLoading', false);
|
||||
});
|
||||
},
|
||||
loadInitPage() {
|
||||
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
|
||||
this.$store.commit('map/clearStepData'); // 清空步骤
|
||||
this.mapInfo = { name: this.$t('map.pleaseSelectMap'), id: this.$route.params.mapId };
|
||||
if (parseInt(this.mapInfo.id)) {
|
||||
this.mapInfo.name = this.$route.query.name;
|
||||
getMapDetail(this.$route.params.mapId).then(response => {
|
||||
this.$store.dispatch('map/setMapData', response.data).then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState');
|
||||
});
|
||||
this.initAutoSaveTask();
|
||||
}).catch((error) => {
|
||||
console.log(error, '加载地图错误提示');
|
||||
this.$message.error(this.$t('tip.failedLoadMap'));
|
||||
this.endViewLoading();
|
||||
});
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
initAutoSaveTask() {
|
||||
const timeout = 1000 * 60 * 3;
|
||||
this.clearAutoSave(this.autoSaveTask);
|
||||
if (this.viewDraft === 'draft') {
|
||||
this.autoSaveTask = setInterval(this.saveMapEvent, timeout);
|
||||
}
|
||||
},
|
||||
clearAutoSave() {
|
||||
if (this.autoSaveTask) {
|
||||
clearInterval(this.autoSaveTask);
|
||||
this.autoSaveTask = null;
|
||||
}
|
||||
},
|
||||
handleSelectControlPage (model) {
|
||||
if (this.$refs.mapOperate) {
|
||||
this.$refs.mapOperate.handleSelectControlPage(model);
|
||||
this.$store.dispatch('menuOperation/setMapDrawSelectCount');
|
||||
}
|
||||
},
|
||||
handleSelectPhysicalView(handle) {
|
||||
if (this.$refs.jlmapVisual) {
|
||||
this.$refs.jlmapVisual.setLevelVisible(handle);
|
||||
}
|
||||
},
|
||||
clickEvent(em) {
|
||||
const device = this.getDeviceByEm(em);
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(device, true);
|
||||
this.oldDevice = device;
|
||||
this.onSelect(device);
|
||||
},
|
||||
// 获取设备数据
|
||||
getDeviceByEm(em) {
|
||||
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
|
||||
if (device) {
|
||||
device._viewVal = em.val;
|
||||
}
|
||||
return device;
|
||||
},
|
||||
onSelect(device) {
|
||||
this.selected = device || null;
|
||||
this.selected && this.handleSelectControlPage(device);
|
||||
},
|
||||
onContextmenu(em) {
|
||||
this.point = {
|
||||
x: em.clientX,
|
||||
y: em.clientY
|
||||
};
|
||||
if (!em.deviceType) {
|
||||
var menu = getDeviceMenuByDeviceType('Cancel');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
verifySectionPoint(map) { // 校验区段坐标不为空
|
||||
let flag = true;
|
||||
map.sectionList.forEach(elem => {
|
||||
if (elem.points.length > 0) {
|
||||
for (let index = 0; index < elem.points.length; index++) {
|
||||
if (String(elem.points[index].x) === 'undefined' || String(elem.points[index].y) === 'undefined') {
|
||||
this.$message(`${elem.name}${this.$t('tip.sectionPointsDeficiency')}`);
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message(this.$t('tip.sectionPointsDeficiency'));
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
},
|
||||
verifySectionRelation(map) {
|
||||
let flag = true;
|
||||
const tipInfoList = [];
|
||||
map.sectionList.forEach(section => {
|
||||
section.type === '01' && map.sectionList.forEach(item => {
|
||||
if (section.code !== item.code && item.type === '01' && this.checkSectionPointsHasCoincide(section.points, item.points) && !this.checkCorrelation(section, item)) {
|
||||
tipInfoList.push('区段' + section.name + '(' + section.code + '): 或者区段' + item.name + '(' + item.code + ')' + '关联关系设置错误!' );
|
||||
}
|
||||
});
|
||||
});
|
||||
if (!tipInfoList.length) {
|
||||
flag = true;
|
||||
} else {
|
||||
flag = false;
|
||||
this.$messageBox(this.$t('tip.dataValidationFailed'));
|
||||
this.tableToExcel(tipInfoList);
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
async verifyInterlockDevice(map) {
|
||||
let flag = true;
|
||||
const tipInfoList = [];
|
||||
const routeCodeList = [];
|
||||
const cycleCodeList = [];
|
||||
const resp1 = await getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
|
||||
if (resp1.data && resp1.data.list) {
|
||||
resp1.data.list.forEach(item => {
|
||||
routeCodeList.push(item.code);
|
||||
});
|
||||
}
|
||||
const resp2 = await getAutoReentryList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
|
||||
if (resp2.data && resp2.data.list) {
|
||||
resp2.data.list.forEach(item => {
|
||||
cycleCodeList.push(item.code);
|
||||
});
|
||||
}
|
||||
map.cycleButtonList.forEach(cycleButton => {
|
||||
if (!cycleCodeList.includes(cycleButton.cycleCode)) {
|
||||
flag = false;
|
||||
tipInfoList.push('自动折返功能按钮' + cycleButton.name + '(' + cycleButton.code + ')' + '的关联自动折返数据不存在!');
|
||||
}
|
||||
});
|
||||
map.automaticRouteButtonList.forEach(routeButton => {
|
||||
if (!routeCodeList.includes(routeButton.automaticRouteCode)) {
|
||||
flag = false;
|
||||
tipInfoList.push('自动进路功能按钮' + routeButton.name + '(' + routeButton.code + ')' + '的关联进路数据不存在!');
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.$messageBox(this.$t('tip.dataValidationFailed'));
|
||||
this.tableToExcel(tipInfoList);
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
verifyStationPosition(map) {
|
||||
let flag = true;
|
||||
const tipInfoList = [];
|
||||
map.stationStandList.forEach(stationStand => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](stationStand.standTrackCode);
|
||||
const list = [];
|
||||
section && section.points.forEach(point => {
|
||||
list.push(point.x);
|
||||
});
|
||||
if (stationStand.position.x > Math.max(...list) || stationStand.position.x < Math.min(...list)) {
|
||||
flag = false;
|
||||
tipInfoList.push('站台' + stationStand.name + '(' + stationStand.code + ')' + '位置偏移出关联站台轨,请检查关联站台轨是否正确!');
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.$messageBox(this.$t('tip.dataValidationFailed'));
|
||||
this.tableToExcel(tipInfoList);
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
verifySignalPosition(map) {
|
||||
let flag = true;
|
||||
const tipInfoList = [];
|
||||
map.signalList.forEach(signal => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
|
||||
if (section) {
|
||||
const offsetX = signal.positionPoint ? signal.positionPoint.x : 0;
|
||||
const signalPositionX = signal.position.x - offsetX;
|
||||
const max = Math.max(section.points[section.points.length - 1].x, section.points[0].x);
|
||||
const min = Math.min(section.points[section.points.length - 1].x, section.points[0].x);
|
||||
if (signalPositionX < min && signalPositionX > max) {
|
||||
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')未在其关联的区段' + section.name + '(' + section.code + ')里');
|
||||
}
|
||||
} else {
|
||||
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')所关联的区段不存在');
|
||||
}
|
||||
});
|
||||
if (!tipInfoList.length) {
|
||||
flag = true;
|
||||
} else {
|
||||
flag = false;
|
||||
this.$messageBox(this.$t('tip.dataValidationFailed'));
|
||||
this.tableToExcel(tipInfoList);
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
checkPointsCoincide(point1, point2) { // 校验两点是否重合
|
||||
if (point1 && point2) {
|
||||
return point1.x === point2.x && point1.y === point2.y;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
checkSectionPointsHasCoincide(points1, points2) { // 校验两区段的左右点是否有重合
|
||||
return points1.length && points2.length && (this.checkPointsCoincide(points1[0], points2[0]) || this.checkPointsCoincide(points1[0], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[0]));
|
||||
},
|
||||
checkCorrelation(section1, section2) { // 校验后者是否与前者有关联关系
|
||||
return section1.leftSectionCode === section2.code || section1.rightSectionCode === section2.code;
|
||||
},
|
||||
saveMapEvent() { // 保存地图
|
||||
const map = this.$store.state.map.map;
|
||||
if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) {
|
||||
this.mapSaveing = true;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => { // 草稿地图关系处理
|
||||
saveMap(Object.assign(map, { mapId: this.$route.params.mapId })).then(() => {
|
||||
this.$message.success(this.$t('tip.saveSuccessfully'));
|
||||
this.mapSaveing = false;
|
||||
this.initAutoSaveTask();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$messageBox(this.$t('tip.saveFailed'));
|
||||
this.mapSaveing = false;
|
||||
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
|
||||
this.clearAutoSave();
|
||||
} else {
|
||||
this.initAutoSaveTask();
|
||||
}
|
||||
});
|
||||
}).catch(error => {
|
||||
console.log(error, '错误提示');
|
||||
this.mapSaveing = false;
|
||||
this.$message(this.$t('tip.saveFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
async checkOver() {
|
||||
if (this.$refs.jlmapVisual) {
|
||||
const map = this.$store.state.map.map;
|
||||
if (map && this.$route.params.mapId) {
|
||||
const checkInterlockDevice = await this.verifyInterlockDevice(map);
|
||||
if (this.verifySectionRelation(map) && this.verifySignalPosition(map) && checkInterlockDevice && this.verifyStationPosition(map)) {
|
||||
verifyMap(this.$route.params.mapId).then(res => {
|
||||
if (res.data.length) {
|
||||
this.tableToExcel(res.data);
|
||||
this.$messageBox(this.$t('tip.dataValidationFailed'));
|
||||
} else {
|
||||
this.$message.success(this.$t('tip.dataValidationSuccess'));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error(this.$t('tip.requestFailed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableToExcel(data) {
|
||||
const filterVal = ['index'];
|
||||
const arr = [];
|
||||
data.forEach(item => {
|
||||
arr.push({ index: item });
|
||||
});
|
||||
const dataList = this.formatJson(filterVal, arr);
|
||||
import('@/utils/Export2Excel').then(excel => { excel.export_json_to_excel([this.$t('tip.dataQuestion')], dataList, this.$t('tip.dataList')); });
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => v[j]));
|
||||
},
|
||||
|
||||
backRoute() {
|
||||
this.$router.push({ path: `/design/usermap/home` });
|
||||
},
|
||||
updateMapModel(models) { // 创建 跟新元素
|
||||
this.$store.dispatch('map/updateSystemMapDevices', models);
|
||||
},
|
||||
// 撤销
|
||||
revocation() {
|
||||
this.$store.dispatch('map/setRevocation');
|
||||
},
|
||||
// 恢复
|
||||
recover() {
|
||||
this.$store.dispatch('map/setRecover');
|
||||
},
|
||||
// 设置显示中心
|
||||
setCenter(code) {
|
||||
this.$refs.jlmapVisual.setCenter(code);
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(device, true);
|
||||
this.oldDevice = device;
|
||||
},
|
||||
createMap() {
|
||||
this.$refs.mapCreate.show();
|
||||
},
|
||||
importf() { // 导入地图jsons数据
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
const obj = this.$refs.files;
|
||||
if (!obj.files) return;
|
||||
const f = obj.files[0];
|
||||
const reader = new FileReader();
|
||||
const that = this;
|
||||
reader.readAsText(f, 'utf-8');
|
||||
reader.onload = function(e) {
|
||||
const data = e.target.result;
|
||||
postBuildMapImport(JSON.parse(data)).then(() => {
|
||||
loading.close();
|
||||
that.$message.success('导入成功!');
|
||||
that.refresh();
|
||||
loading.close();
|
||||
}).catch(error => {
|
||||
loading.close();
|
||||
that.$message.error('导入失败' + error.message);
|
||||
});
|
||||
obj.value = '';
|
||||
};
|
||||
});
|
||||
},
|
||||
// 高亮设备
|
||||
deviceHighLight(device, flag) {
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device._type === 'Section' && device.type === '04') {
|
||||
device.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel && sectionModel.instance.drawSelected(flag);
|
||||
});
|
||||
} else if (device._type === 'Section' && device.type === '01' && device.logicSectionCodeList && device.logicSectionCodeList.length) {
|
||||
device.logicSectionCodeList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel && sectionModel.instance.drawSelected(flag);
|
||||
});
|
||||
} else {
|
||||
device.instance.drawSelected(flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
/deep/ {
|
||||
.menu-item{
|
||||
background: #f1ecec;
|
||||
.pop-menu {
|
||||
background: #5F9EA0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mask{
|
||||
opacity: 0;
|
||||
background: #000;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
.operation_box{
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 15px;
|
||||
z-index: 9;
|
||||
&.rightShow{
|
||||
right: 540px;
|
||||
}
|
||||
}
|
||||
.back_box{
|
||||
left: 10px;
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
}
|
||||
.btn_left_box{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
padding: 8px 3px;
|
||||
background: #fff;
|
||||
z-index: 10;
|
||||
transform: translateX(-22px);
|
||||
cursor: pointer;
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.box{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mapPaint{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.map-view {
|
||||
float: left;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.map-draft {
|
||||
width: 520px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
transform: translateX(520px);
|
||||
transition: all 0.5s;
|
||||
background: #fff;
|
||||
z-index: 9;
|
||||
/deep/{
|
||||
.v-modal{
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
&.hide{
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.uploadDemo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
padding: 3px 0;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div style="height:100%">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="createForm" :form="createForm" :form-model="addModel" :rules="createRules" />
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConfigList from '../config/list';
|
||||
export default {
|
||||
name:'CreateOperate',
|
||||
components: {
|
||||
ConfigList
|
||||
},
|
||||
props:{
|
||||
createForm:{
|
||||
type:Object,
|
||||
required:true
|
||||
},
|
||||
addModel:{
|
||||
type:Object,
|
||||
required:true
|
||||
},
|
||||
createRules:{
|
||||
type:Object,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
create() {
|
||||
this.$refs['createForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$emit('create');
|
||||
}
|
||||
});
|
||||
},
|
||||
resetFields() {
|
||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs.createForm.resetForm();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div style="height:100%">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConfigList from '../config/list';
|
||||
export default {
|
||||
name:'OperateProperty',
|
||||
components: {
|
||||
ConfigList
|
||||
},
|
||||
props:{
|
||||
form:{
|
||||
type:Object,
|
||||
required:true
|
||||
},
|
||||
editModel:{
|
||||
type:Object,
|
||||
required:true
|
||||
},
|
||||
rules:{
|
||||
type:Object,
|
||||
required:true
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDeleteHide:true
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.type}, this.editModel);
|
||||
if (this.type == 'Text') {
|
||||
data.content = `${this.editModel.prepend}::${this.editModel.content}`;
|
||||
}
|
||||
this.$emit('updateMapModel', data);
|
||||
this.$emit('clearDeviceSelect');
|
||||
} else {
|
||||
this.$message('还有属性未填写,修改未生效!');
|
||||
}
|
||||
});
|
||||
},
|
||||
resetFields() {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
},
|
||||
clearValidate() {
|
||||
this.$refs.dataform && this.$refs.dataform.clearValidate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
477
src/views/newMap/mapDraftPicture/mapoperate/config/list.vue
Normal file
477
src/views/newMap/mapDraftPicture/mapoperate/config/list.vue
Normal file
@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel" class="form_data">
|
||||
<template v-for="(items, index) in form.items">
|
||||
<fieldset v-if="items.item.length" :key="index" :class="items.name?'card':'noCard'">
|
||||
<legend class="card_title">{{ items.name }}</legend>
|
||||
<template v-for="item in items.item">
|
||||
<template v-if="checkFieldType(item, 'select')">
|
||||
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-select
|
||||
v-model="formModel[item.prop]"
|
||||
filterable
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:key="option[item.optionValue]"
|
||||
:label="handleLabel(option, item.optionLabel)"
|
||||
:value="option[item.optionValue]"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'multiSelect')">
|
||||
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-select
|
||||
v-model="formModel[item.prop]"
|
||||
filterable
|
||||
multiple
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:key="option[item.optionValue]"
|
||||
:label="handleLabel(option, item.optionLabel)"
|
||||
:value="option[item.optionValue]"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'selectHover')">
|
||||
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-select
|
||||
v-model="formModel[item.prop]"
|
||||
filterable
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:key="option.code"
|
||||
:label="handleLabel(option, item.optionLabel)"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="item.buttonShowType ? 'danger' : 'primary'"
|
||||
@click="item.hover(item.buttonType)"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'multiSelectHover')">
|
||||
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-select
|
||||
v-model="formModel[item.prop]"
|
||||
filterable
|
||||
multiple
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:key="option.code"
|
||||
:label="handleLabel(option, item.optionLabel)"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="item.buttonShowType ? 'danger' : 'primary'"
|
||||
@click="item.hover(item.buttonType)"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'input')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-input v-model="formModel[item.prop]" type="text" :disabled="item.disabled" maxlength="30" :show-word-limit="true" @input="((val)=>{deviceChange(val, item)})" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'number')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<template v-if="!item.firstLevel">
|
||||
<template>
|
||||
<el-input-number v-model="formModel[item.prop]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" style="width: 140px" @change="((val)=>{deviceChange(val,item)})" />
|
||||
</template>
|
||||
<span class="numberSpan">{{ item.placeholder }}</span>
|
||||
<el-button v-if="item.button" type="primary" size="mini" class="numberBtn" @click="item.clickFunction">{{ item.buttonText }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input-number v-model="formModel[item.firstLevel][item.secondLevel]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" />
|
||||
<span class="numberSpan">{{ item.placeholder }}</span>
|
||||
<el-button v-if="item.button" type="primary" size="mini" class="numberBtn" @click="item.clickFunction">{{ item.buttonText }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'color')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-color-picker v-model="formModel[item.prop]" show-alpha :predefine="skins" :disabled="item.disabled" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="checkFieldType(item, 'radio')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-radio-group v-model="formModel[item.prop]" :disabled="item.disabled">
|
||||
<el-radio v-for="(opts, indexs) in item.radioList" :key="indexs" :border="item.border" :label="opts[item.optionValue]">{{ opts[item.optionLabel] }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- 坐标点并列显示 -->
|
||||
<template v-if="checkFieldType(item, 'coordinate')">
|
||||
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div v-for="opt in item.children" :key="opt.code" class="listWidth">
|
||||
<el-form-item :label="opt.label" :prop="opt.prop" :label-width="opt.labelWidth">
|
||||
<template>
|
||||
<el-input-number v-model="formModel[opt.firstLevel][opt.secondLevel]" :label="opt.label" :disabled="opt.disabled" @change="((val)=>{deviceChange(val, opt)})" />
|
||||
</template>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'sectionUnit')">
|
||||
<div :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div class="point-section">
|
||||
<template v-for="(sectionUnit, j) in formModel[item.prop]">
|
||||
<div :key="j" class="sectionUnit">
|
||||
<el-form-item label="左端区段" :prop="'sectionUnitList[' + j + '].leftCode'" label-width="70px">
|
||||
<el-select v-model="sectionUnit.leftCode" filterable placeholder="请选择" clearable class="sectionUnitCode">
|
||||
<el-option
|
||||
v-for="elem in item.options"
|
||||
:key="elem.code"
|
||||
:label="elem.name"
|
||||
:value="elem.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="item.buttonShowType && item.listIndex === ('leftCode' + j) ? 'danger' : 'primary'"
|
||||
@click="item.hover(item.buttonType, `leftCode${j}`)"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="右端区段" :prop="'sectionUnitList[' + j + '].rightCode'" label-width="70px">
|
||||
<el-select v-model="sectionUnit.rightCode" filterable placeholder="请选择" clearable class="sectionUnitCode">
|
||||
<el-option
|
||||
v-for="elem in item.options"
|
||||
:key="elem.code"
|
||||
:label="elem.name"
|
||||
:value="elem.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="item.buttonShowType && item.listIndex === ('rightCode' + j) ? 'danger' : 'primary'"
|
||||
@click="item.hover(item.buttonType, `rightCode${j}`)"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
<el-button type="success" icon="el-icon-plus" circle @click="item.addSectionUnit(j)" />
|
||||
<el-button v-if="j" type="danger" icon="el-icon-delete" circle @click="item.delSectionUnit(j)" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 多个坐标点绘制 -->
|
||||
<template v-if="checkFieldType(item, 'points')">
|
||||
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div class="point-section">
|
||||
<template v-for="(point, j) in formModel[item.prop]">
|
||||
<div :key="j" style="overflow: hidden;">
|
||||
<span v-if="!item.hiddenSpan" class="pointsEach" :style="{'margin-right': j == 0 || j == formModel[item.prop].length - 1 ? '9px' : '5px'}">{{ j == 0 ? '起 点' : j == formModel[item.prop].length - 1 ? '终 点' : `中点${j}` }}</span>
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="'points[' + j + '].x'"
|
||||
class="pointsEachItem"
|
||||
label-width="0px"
|
||||
>
|
||||
<el-input-number v-model="point.x" :disabled="item.pointDisabled" />
|
||||
</el-form-item>
|
||||
<span class="pointsEachNext">, </span>
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="'points[' + j + '].y'"
|
||||
class="pointsEachItem"
|
||||
style="margin-right: 5px;"
|
||||
label-width="4px"
|
||||
>
|
||||
<el-input-number v-model="point.y" :disabled="item.pointDisabled" />
|
||||
</el-form-item>
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
:disabled="item.pointDisabled"
|
||||
circle
|
||||
class="point-button"
|
||||
@click="item.addPoint(j)"
|
||||
/>
|
||||
<el-button
|
||||
icon="el-icon-minus"
|
||||
:disabled="j == 0 || j == formModel[item.prop].length - 1"
|
||||
circle
|
||||
class="point-button"
|
||||
style="margin-left: 4px;"
|
||||
@click="item.delPoint(j)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 多个坐标点绘制 -->
|
||||
<template v-if="checkFieldType(item, 'coordinatePoint')">
|
||||
<div :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div class="point-section" :style="{ width: `calc(100% - 10px - ${item.width})` }">
|
||||
<template v-for="(point, j) in formModel[item.prop]">
|
||||
<div :key="j" style="overflow: hidden;">
|
||||
<span style="display: table; margin-right: 6px; font-size: 14px; float: left; line-height: 28px;">{{ j + 1 }}.</span>
|
||||
<el-form-item style="display: table; float: left;" label-width="0px">
|
||||
<el-input-number v-model="point.x" :disabled="item.pointDisabled" />
|
||||
</el-form-item>
|
||||
<span style="display: table; margin-left: 8px; float: left; line-height: 28px;">, </span>
|
||||
<el-form-item style="display: table; float: left; margin-right: 5px;" label-width="4px">
|
||||
<el-input-number v-model="point.y" :disabled="item.pointDisabled" />
|
||||
</el-form-item>
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
:disabled="item.pointDisabled"
|
||||
circle
|
||||
class="point-button"
|
||||
@click="item.addPoint(j)"
|
||||
/>
|
||||
<el-button
|
||||
icon="el-icon-minus"
|
||||
:disabled="j == 0"
|
||||
circle
|
||||
class="point-button"
|
||||
style="margin-left: 4px;"
|
||||
@click="item.delPoint(j)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'checkbox')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-checkbox v-model="formModel[item.prop]" :disabled="item.disabled" @change="((val)=>{deviceChange(val, item)})" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'font')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-font v-model="formModel[item.prop]" :disabled="item.disabled" :placeholder="item.placeholder" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'fontContent')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-input v-model="formModel[item.content]" :placeholder="item.placeholder" class="input-with-select">
|
||||
<el-select slot="prepend" v-model="formModel[item.prepend]" :placeholder="item.placeholder">
|
||||
<el-option :label="$t('map.horizontal')" value="H" />
|
||||
<el-option :label="$t('map.vertical')" value="V" />
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'lengthFact')">
|
||||
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div class="point-section">
|
||||
<template v-for="(elem, j) in formModel[item.prop]">
|
||||
<div :key="j" style="overflow: hidden;">
|
||||
<el-form-item :label="elem.name" :prop="'logicLengthList[' + j + '].lengthFact'" label-width="20px">
|
||||
<el-input-number v-model="elem.lengthFact" :min="0" :precision="3" style="width: 120px;" /><span>米</span>
|
||||
<el-button v-if="!j" type="primary" size="mini" style="margin-left: 20px;" @click="item.mergeLength">合并长度</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</fieldset>
|
||||
</template>
|
||||
<slot />
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElFont from '@/views/components/font/index';
|
||||
export default {
|
||||
name: 'ConfigList',
|
||||
components: {
|
||||
ElFont
|
||||
},
|
||||
props: {
|
||||
formModel: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
rules: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
skins: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
deviceChange(data, item) {
|
||||
if (item.deviceChange) {
|
||||
item.deviceChange(data);
|
||||
}
|
||||
},
|
||||
handleLabel(option, label) {
|
||||
if (label == 'name') {
|
||||
return option.name;
|
||||
} else if (label == 'code') {
|
||||
return option.code;
|
||||
} else if (label == 'label') {
|
||||
return option.label;
|
||||
} else if (label == 'name&&code') {
|
||||
if (option.code) {
|
||||
return option.name + ' (' + option.code + ')';
|
||||
} else {
|
||||
return option.name;
|
||||
}
|
||||
} else if (label == 'code&&name') {
|
||||
return option.code + ' (' + option.name + ')';
|
||||
} else {
|
||||
return option.label;
|
||||
}
|
||||
},
|
||||
decompose(item, prop) {
|
||||
if (!prop.includes('.')) {
|
||||
return prop;
|
||||
}
|
||||
const keyArr = prop.split('.');
|
||||
return keyArr[0][keyArr[1]];
|
||||
},
|
||||
checkFieldType(field, type) {
|
||||
if (field.hasOwnProperty('isHidden')) {
|
||||
return field.type === type && !field.isHidden;
|
||||
} else {
|
||||
return field.type === type;
|
||||
}
|
||||
},
|
||||
validate(callback) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
callback(true);
|
||||
} else {
|
||||
callback(false);
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
clearValidate() {
|
||||
this.$refs.form.clearValidate(); // 只移除校验结果
|
||||
},
|
||||
resetFields() {
|
||||
this.$refs.form.resetFields(); // 移除校验结果 并 重置字段值
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
||||
.coordinate {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
line-height: 28px;
|
||||
width: 120px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.listWidth{
|
||||
display: table;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
&:last-child{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.point-section {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.point-button {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
float: left;
|
||||
|
||||
/deep/ {
|
||||
.el-icon-plus,
|
||||
.el-icon-minus {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-input-number--mini {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.form_data{
|
||||
padding: 6px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.card{
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 5px;
|
||||
|
||||
.card_title {
|
||||
padding: 0px 5px;
|
||||
}
|
||||
}
|
||||
.noCard{
|
||||
border: none;
|
||||
margin-bottom: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.input-with-select .el-input-group__prepend {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.numberSpan{padding-left: 1px;}
|
||||
.numberBtn{margin-left: 20px;}
|
||||
.sectionUnit{border: 1px solid #CCCCCC; border-radius: 5px;padding: 2px;padding-top: 10px;}
|
||||
.sectionUnitCode{width: 115px;}
|
||||
.pointsEach{display: table; margin-right: 3px; font-size: 14px; float: left; line-height: 28px;}
|
||||
.pointsEachNext{display: table; margin-left: 8px; float: left; line-height: 28px;}
|
||||
.pointsEachItem{display: table; float: left; }
|
||||
</style>
|
||||
|
84
src/views/newMap/mapDraftPicture/mapoperate/device.vue
Normal file
84
src/views/newMap/mapDraftPicture/mapoperate/device.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<operate-property
|
||||
ref="dataform"
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Line"
|
||||
@updateMapModel="updateMapModel"
|
||||
@clearDeviceSelect="clearDeviceSelect"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: {
|
||||
OperateProperty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editModel: {},
|
||||
rules: {},
|
||||
typeList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'sectionList',
|
||||
'switchList',
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
form () {
|
||||
return {
|
||||
labelWidth: '130px',
|
||||
items: {
|
||||
code: {
|
||||
name: '',
|
||||
item: []
|
||||
},
|
||||
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: '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() {
|
||||
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
|
||||
},
|
||||
deviceChange() {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
236
src/views/newMap/mapDraftPicture/mapoperate/index.vue
Normal file
236
src/views/newMap/mapDraftPicture/mapoperate/index.vue
Normal file
@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="map-control">
|
||||
<div class="map-operate">
|
||||
<div class="draftMapName">
|
||||
<span>{{ $t('map.mapName') }}</span>
|
||||
<el-tooltip class="item" effect="dark" :content="mapInfo.name" placement="top">
|
||||
<b>{{ mapInfo.name }}</b>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-button v-if="isSave" type="text" style="padding: 3px 0;float: right;" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
|
||||
<component
|
||||
:is="each.menus"
|
||||
:ref="each.name"
|
||||
:selected="selected"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
@deviceSelect="deviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DeviceDraft from './device';
|
||||
import MultiSelect from './multiSelect';
|
||||
export default {
|
||||
name: 'MapOperate',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default: function() { return {name: this.$t('map.pleaseSelectMap')}; }
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lazy: true,
|
||||
tabList:[
|
||||
{label: '设备', name: 'device', menus: DeviceDraft},
|
||||
{label: '多选', name: 'multiSelect', menus: MultiSelect}
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Line'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isSave() {
|
||||
return this.mapInfo && this.mapInfo.id;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.updateCount': function () {
|
||||
this.$refs[this.enabledTab][0].edit();
|
||||
},
|
||||
selected(val) {
|
||||
if (this.selected) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.enabledTab][0].deviceSelect(val);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleSelectControlPage(device) {
|
||||
const type = device._type;
|
||||
if (this.selectDevice) {
|
||||
this.enabledTab = this.selectDevice;
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
}
|
||||
},
|
||||
deviceSelect(type) {
|
||||
this.selectDevice = type;
|
||||
},
|
||||
saveMapEvent() {
|
||||
this.$emit('saveMapEvent');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draftMapName{
|
||||
width:280px;
|
||||
overflow:hidden;
|
||||
height:17px;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
.map-control {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.operate-button{
|
||||
padding: 3px 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
// .physical-view {
|
||||
// line-height: 25px;
|
||||
// height: 118px;
|
||||
// padding-left: 12px;
|
||||
|
||||
// .el-checkbox {
|
||||
// width: 70px;
|
||||
// margin: 0;
|
||||
// margin-right: 30px;
|
||||
// }
|
||||
// }
|
||||
|
||||
.map-operate{
|
||||
height: 47px;
|
||||
padding: 15px;
|
||||
display:flex;
|
||||
}
|
||||
.mapEdit{
|
||||
height: calc(100% - 47px);
|
||||
.tab_pane_box{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .button_box{
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-top: 1px #f3f1f1 solid;
|
||||
box-shadow: 4px 7px 10px #565656;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px transparent solid;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
z-index:3;
|
||||
}
|
||||
|
||||
/deep/ .view-control-content{
|
||||
height:100%;
|
||||
padding-bottom:46px;
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
/deep/ .map-draft-group {
|
||||
float: right;
|
||||
margin: 6px 5px;
|
||||
}
|
||||
|
||||
/deep/ .view-control {
|
||||
height:100%;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.mapEdit .el-tabs__header .el-tabs__item.is-active {
|
||||
border-bottom-color: #f5f7fa;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.mapEdit .el-tabs__active-bar{
|
||||
background: transparent;
|
||||
}
|
||||
.mapEdit .el-tabs__content {
|
||||
height: calc(100% - 56px);
|
||||
}
|
||||
|
||||
.card .el-tabs__nav .el-tabs__item.is-active {
|
||||
border-bottom: 2px solid #E4E7ED;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
.card .el-tabs__nav .el-tabs__item{
|
||||
padding: 0 20px!important;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-prev {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
|
||||
.mapEdit .el-tabs__nav-next {
|
||||
width: 20px;
|
||||
height: 41px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 1px 1px 4px #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
// 页面页签样式
|
||||
/deep/ {
|
||||
.card .el-transfer-panel__filter{
|
||||
margin: 5px 15px;
|
||||
}
|
||||
.card .el-transfer-panel__list.is-filterable{
|
||||
height: 290px;
|
||||
}
|
||||
|
||||
.card .el-transfer-panel__body{
|
||||
height: 328px;
|
||||
}
|
||||
.card .el-transfer__buttons{
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.card .el-transfer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
13
src/views/newMap/mapDraftPicture/mapoperate/multiSelect.vue
Normal file
13
src/views/newMap/mapDraftPicture/mapoperate/multiSelect.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "multiSelect"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -45,19 +45,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic'
|
||||
import { listMap, deleteAllMap } from '@/api/jmap/mapdraft'
|
||||
import { UrlConfig } from '@/scripts/ConstDic'
|
||||
import { removeSessionStorage } from '@/utils/auth'
|
||||
import MapOperateMenu from './mapmanage/operateMenu'
|
||||
import MapImport from './mapmanage/mapImport'
|
||||
import { getSessionStorage } from '@/utils/auth'
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { listMap, deleteAllMap } from '@/api/jmap/mapdraft';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import MapOperateMenu from './mapmanage/operateMenu';
|
||||
import MapImport from './mapmanage/mapImport';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'UserMapList',
|
||||
components: {
|
||||
MapOperateMenu,
|
||||
MapImport,
|
||||
MapImport
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -69,66 +69,66 @@ export default {
|
||||
selected: {},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
label: 'name'
|
||||
},
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
y: 0
|
||||
},
|
||||
editModel: {},
|
||||
lineCode: '',
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts'],
|
||||
}
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
project() {
|
||||
return getSessionStorage('project')
|
||||
},
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
},
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
removeSessionStorage('demonList')
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData()
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
createMap() {
|
||||
this.$emit('createMap')
|
||||
this.$emit('createMap');
|
||||
},
|
||||
deleteAllMap() {
|
||||
this.$confirm('确定删除全部地图数据?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteAllMap().then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.loadInitData();
|
||||
});
|
||||
})
|
||||
this.loadInitData()
|
||||
})
|
||||
})
|
||||
.catch(e => {})
|
||||
.catch(e => {});
|
||||
},
|
||||
async loadInitData() {
|
||||
this.loading = true
|
||||
this.treeData = this.treeList = []
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap({ drawWay: true })
|
||||
const res = await listMap({ drawWay: true });
|
||||
res.data &&
|
||||
res.data.forEach(elem => {
|
||||
elem.type = 'map'
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
{
|
||||
id: '1',
|
||||
@ -136,7 +136,7 @@ export default {
|
||||
type: 'mapDesign',
|
||||
mapId: elem.id,
|
||||
mapName: elem.name,
|
||||
lineCode: elem.lineCode,
|
||||
lineCode: elem.lineCode
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
@ -144,74 +144,91 @@ export default {
|
||||
type: 'mapSystem',
|
||||
mapId: elem.id,
|
||||
mapName: elem.name,
|
||||
lineCode: elem.lineCode,
|
||||
lineCode: elem.lineCode
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
this.treeData = res.data
|
||||
{
|
||||
id: '3',
|
||||
name: '画面管理',
|
||||
type: 'mapPicture',
|
||||
mapId: elem.id,
|
||||
mapName: elem.name,
|
||||
lineCode: elem.lineCode
|
||||
}
|
||||
];
|
||||
});
|
||||
this.treeData = res.data;
|
||||
this.treeList = this.filterText
|
||||
? res.data.filter(elem => {
|
||||
return elem.name.includes(this.filterText)
|
||||
return elem.name.includes(this.filterText);
|
||||
})
|
||||
: res.data
|
||||
this.loading = false
|
||||
: res.data;
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
this.loading = false
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
switch (obj.type) {
|
||||
case 'mapDesign': {
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations')
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`,
|
||||
query: { name: obj.mapName, lineCode: obj.lineCode },
|
||||
})
|
||||
break
|
||||
query: { name: obj.mapName, lineCode: obj.lineCode }
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'mapSystem': {
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations')
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({
|
||||
path: `/design/usermap/map/systemDraw/${obj.mapId}/draft`,
|
||||
query: { name: obj.mapName, lineCode: obj.lineCode },
|
||||
})
|
||||
break
|
||||
query: { name: obj.mapName, lineCode: obj.lineCode }
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'mapPicture': {
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
this.$router.push({
|
||||
path: `/design/usermap/map/pictureDraw/${obj.mapId}/draft`,
|
||||
query: { name: obj.mapName, lineCode: obj.lineCode }
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
this.$refs.tree.setCurrentKey(obj.id)
|
||||
this.$refs.tree.currentNode = node
|
||||
this.$refs.tree.setCurrentKey(obj.id);
|
||||
this.$refs.tree.currentNode = node;
|
||||
if (obj && obj.type == 'map') {
|
||||
e.preventDefault()
|
||||
const menu = DeviceMenu.Map
|
||||
e.preventDefault();
|
||||
const menu = DeviceMenu.Map;
|
||||
|
||||
this.point = {
|
||||
x: e.clientX,
|
||||
y: e.clientY,
|
||||
}
|
||||
this.editModel = obj
|
||||
this.editModel.lineCode = obj.lineCode
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu })
|
||||
y: e.clientY
|
||||
};
|
||||
this.editModel = obj;
|
||||
this.editModel.lineCode = obj.lineCode;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
jlmap3d() {
|
||||
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } })
|
||||
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } });
|
||||
},
|
||||
assetmanager3d() {
|
||||
this.$router.push({ path: '/design/jlmap3d/assetmanager' })
|
||||
this.$router.push({ path: '/design/jlmap3d/assetmanager' });
|
||||
},
|
||||
importMap() {
|
||||
this.$refs.mapImport.show()
|
||||
},
|
||||
},
|
||||
this.$refs.mapImport.show();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.clearfix {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;">
|
||||
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;background: #9df59b;">
|
||||
<div style="text-align: center;font-size: 28px;">许 可 证</div>
|
||||
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
|
||||
<div>第</div>
|
||||
|
@ -239,7 +239,7 @@ export default {
|
||||
noticeMinute2: '', noticeTripNumber2: '', stationSeal: true, signature: '', year: '', moon: '', day: ''};
|
||||
},
|
||||
query() {
|
||||
const params = { type: this.attachmentType, stationCode: this.$store.state.map.showCentralizedStationCode };
|
||||
const params = { type: this.attachmentType };
|
||||
commitOperate(menuOperate.Rail.railQueryTicket, params, 3).then(({valid, response, operate}) => {
|
||||
if (valid) {
|
||||
if (this.attachmentType === 'RAIL_TICKET') {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;">
|
||||
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;background: #e799d8;">
|
||||
<div style="text-align: center;font-size: 28px;">许 可 证</div>
|
||||
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
|
||||
<div>第</div>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<!-- <el-select v-model=""></el-select>-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user