This commit is contained in:
sunzhenyu 2021-05-14 18:09:24 +08:00
commit a8d89df500
32 changed files with 1584 additions and 318 deletions

View File

@ -1,93 +1,94 @@
{
"name": "vue-admin-template",
"version": "4.1.0",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"start": "vue-cli-service serve --open",
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"build": "vue-cli-service build --mode production",
"test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"axios": "0.18.0",
"echarts": "^4.7.0",
"element-ui": "^2.12.0",
"file-saver": "^1.3.3",
"js-cookie": "2.2.0",
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
"normalize.css": "7.0.0",
"nprogress": "^0.2.0",
"path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2",
"qs": "^6.9.3",
"quill-emoji": "^0.1.8",
"quill-image-extend-module": "^1.1.2",
"recordrtc": "^5.5.9",
"script-loader": "^0.7.2",
"sessionstorage": "^0.1.0",
"stompjs": "^2.3.3",
"storejs": "^1.0.25",
"three": "^0.107.0",
"video.js": "^7.8.4",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.1.6",
"vuedraggable": "^2.24.3",
"vuex": "^3.1.0",
"xlsx": "^0.14.2",
"zrender": "^4.0.4"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.6.0",
"@vue/cli-plugin-eslint": "3.6.0",
"@vue/cli-plugin-unit-jest": "3.6.3",
"@vue/cli-service": "3.6.0",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "1.6.1",
"babel-preset-stage-2": "6.24.1",
"chalk": "2.4.2",
"compression-webpack-plugin": "^3.1.0",
"connect": "3.6.6",
"copy-webpack-plugin": "^4.5.2",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"file-loader": "^3.0.1",
"html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "^0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "^2.6.11"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
"name": "vue-admin-template",
"version": "4.1.0",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"start": "vue-cli-service serve --open",
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"build": "vue-cli-service build --mode production",
"test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"axios": "0.18.0",
"echarts": "^4.7.0",
"element-ui": "^2.12.0",
"file-saver": "^1.3.3",
"js-cookie": "2.2.0",
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
"normalize.css": "7.0.0",
"nprogress": "^0.2.0",
"path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2",
"qs": "^6.9.3",
"quill-emoji": "^0.1.8",
"quill-image-extend-module": "^1.1.2",
"recordrtc": "^5.5.9",
"script-loader": "^0.7.2",
"sessionstorage": "^0.1.0",
"stompjs": "^2.3.3",
"storejs": "^1.0.25",
"three": "^0.107.0",
"video.js": "^7.8.4",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.1.6",
"vuedraggable": "^2.24.3",
"vuex": "^3.1.0",
"wangeditor": "^4.6.17",
"xlsx": "^0.14.2",
"zrender": "^4.0.4"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.6.0",
"@vue/cli-plugin-eslint": "3.6.0",
"@vue/cli-plugin-unit-jest": "3.6.3",
"@vue/cli-service": "3.6.0",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "1.6.1",
"babel-preset-stage-2": "6.24.1",
"chalk": "2.4.2",
"compression-webpack-plugin": "^3.1.0",
"connect": "3.6.6",
"copy-webpack-plugin": "^4.5.2",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"file-loader": "^3.0.1",
"html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "^0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "^2.6.11"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

68
src/api/editor.js Normal file
View File

@ -0,0 +1,68 @@
import request from '@/utils/request';
// 获取文章列表
export function getDoc() {
return request({
url: `/api/doc`,
method: 'get'
});
}
// 获取发布内容
export function getDocById(id) {
return request({
url: `/api/doc/${id}`,
method: 'get'
});
}
// 获取草稿列表
export function getDocDraft() {
return request({
url: `/api/doc/draft`,
method: 'get'
});
}
// 创建
export function postDocDraft(data) {
return request({
url: `/api/doc/draft`,
method: 'post',
data
});
}
// 获取草稿数据id
export function getDocDraftById(id) {
return request({
url: `/api/doc/draft/${id}`,
method: 'get'
});
}
// 更新草稿数据
export function putDocDraftById(id, data) {
return request({
url: `/api/doc/draft/${id}`,
method: 'put',
data
});
}
// 删除草稿数据
export function deleteDocDraftById(id) {
return request({
url: `/api/doc/draft/${id}`,
method: 'delete'
});
}
// 保存内容根据id
export function putDocDraftByIdData(id, data) {
return request({
url: `/api/doc/draft/${id}/data`,
method: 'put',
data
});
}
// 草稿发布
export function putDocDraftByIdPublish(id) {
return request({
url: `/api/doc/draft/${id}/publish`,
method: 'put'
});
}

25
src/api/upload.js Normal file
View File

@ -0,0 +1,25 @@
import request from '@/utils/request';
export const productIdentify = '00001&appSecret=joylink00001';
export const pictureUrl = `/api/upload/PICTURE?appId=${productIdentify}`;
// export const modelUrl = `/api/upload/model?appId=${productIdentify}`;
// export const attachmentUrl = `/api/upload/attachment?appId=${productIdentify}`;
// export const meansUrl = `/api/upload/means?appId=${productIdentify}`;
// export const regulationUrl = `/api/upload/regulation?appId=${productIdentify}`;
export function getUrl(relatedUrl) {
return `${process.env.VUE_APP_UPLOAD_API}${relatedUrl}`;
}
export function uploadFile(url, data) {
return request({
headers: {
'Content-Type': 'multipart/form-data'
},
url,
method: 'post',
data: data
});
}

View File

@ -91,5 +91,6 @@ export default {
publishIBPManage:'publish IBP Manage',
publishISCSManage:'publish ISCS Manage',
voiceTraining: 'Voice Training',
mapGroup: 'Map Group'
mapGroup: 'Map Group',
drawingMange:'Drawing Mange'
};

View File

@ -4,6 +4,9 @@ export default {
designhomePage: '公共地图',
designUserPage: '个人地图',
newDesignUserPage: '地图绘制',
newDesignEditor: '编辑器',
newDesignEditorList: '图文列表',
newDesignDraftEditorList: '文章草稿',
mapManage: '地图管理',
skinManage: '皮肤管理',
@ -96,5 +99,6 @@ export default {
publishIBPManage:'发布IBP盘管理',
publishISCSManage:'发布ISCS管理',
voiceTraining: '语音训练',
mapGroup: '地图分组'
mapGroup: '地图分组',
drawingMange:'图纸管理'
};

View File

@ -500,7 +500,6 @@ class Jlmap {
oDevice['cutOff'] = sectionA.cutOff;
}
}
this.$painter.update(oDevice);
} else if (elem.deviceType == 'SECTION') {
const oDevice = this.mapDevice[code];

View File

@ -6,6 +6,7 @@ import transitionDeviceStatus from './constant/stateTransition';
import shapefactory from './shape/factory';
import TransformHandle from './transformHandle';
import TransformHandleScreen from './transformHandleScreen';
import deviceRender from './constant/deviceRender';
class Painter {
constructor(jmap) {
@ -136,6 +137,8 @@ class Painter {
const overlapTrainList = this.checkTrainOverlap(device);
overlapTrainList.forEach((item, index) => {
const trainDevice = this.$jmap.getDeviceByCode(item);
trainDevice._type = deviceRender['Train']._type;
trainDevice.zlevel = deviceRender['Train'].zlevel;
trainDevice.overLapIndex = index;
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
this.add(trainDevice);
@ -223,7 +226,7 @@ class Painter {
getShapeTipPoint(instance, opts) {
if (instance) {
var point = instance.getShapeTipPoint(opts);
if (point) {
if (point) {
// 矩阵变换
var transPoint = instance.transformCoordToGlobal(point.x, point.y);
return {

View File

@ -131,6 +131,18 @@ export default class SignalButton extends Group {
setShowMode() {
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {
item.show();
});
this.isShowShape = true;
this.setState(this.model);
} else {
this.eachChild(item => {
item.hide();
});
this.isShowShape = false;
}
}
getAnchorPoint() {
}

View File

@ -60,7 +60,6 @@ export default class Train extends Group {
this._computed();
const model = this.model;
const style = this.style;
if (this.point) {
this.trainB = new TrainBody({
zlevel: this.zlevel,
@ -151,7 +150,7 @@ export default class Train extends Group {
this.triangle = new ETriangle({
style: this.style,
zlevel: this.zlevel,
z: 10,
z: 15,
right: this.model.right,
point: { x: this.startX, y: this.startY }
});

View File

@ -76,9 +76,9 @@
<div class="nav-border" style="padding: 5px;">
<el-row style="height: 25px;">
<div style="display: flex;justify-content: space-between">
<el-button size="mini" plain>车次号修改</el-button>
<el-button size="mini" plain :disabled="true">车次号删除</el-button>
<el-button size="mini" plain :disabled="true">车次号创建</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='update'" @click="handleTrainOperate('update')">车次号修改</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='delete'" @click="handleTrainOperate('delete')">车次号删除</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='create'" @click="handleTrainOperate('create')">车次号创建</el-button>
<el-button size="mini" plain :disabled="true">车次号步进</el-button>
</div>
</el-row>
@ -100,22 +100,29 @@
<div class="nav-border" style="padding: 5px;">
<el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
<el-col :span="17"><el-input v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" /></el-col>
<el-col :span="17">
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" size="mini" style="height: 20px;" />
</el-col>
</el-row>
<el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col>
<el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col>
</el-row>
<el-row style="display: flex;align-items: center;">
<el-row v-if="trainOperateType ==='update'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col>
<el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col>
</el-row>
<el-row v-if="trainOperateType ==='create'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车组号</el-col>
<el-col :span="17"><el-input v-model="formModelNewGroup" size="mini" style="height: 20px;" /></el-col>
</el-row>
</div>
</el-col>
<el-col v-if="trainOperationShow" :span="6" style="padding: 1px;">
<div class="nav-border">
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainModel.groupNumber" @click="trainCommit">执行</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainCommitDisabled" @click="trainCommit">执行</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose">退出</el-button>
</div>
</div>
@ -200,7 +207,10 @@ export default {
formModelTripNum: '',
formModelSectionName: '',
formModelNewTrip: '',
speedShowCon: false
formModelNewGroup: '',
speedShowCon: false,
trainOperateType: '',
formModelNewSection: ''
};
},
computed: {
@ -225,6 +235,11 @@ export default {
},
speedShow() {
return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon;
},
trainCommitDisabled() {
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete') ||
(this.trainOperateType === 'move' && this.formModelNewSection);
}
},
watch: {
@ -363,6 +378,9 @@ export default {
}
}
},
handleTrainOperate(type) {
this.trainOperateType = type;
},
getStationControl(selected) {
let control;
if (selected._type == 'StationStand') {
@ -641,15 +659,7 @@ export default {
this.param.routeCodeList = routeCodeList;
}
if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) {
if (this.selectedObj.centralized) {
this.param = { stationCode: this.selectedObj.code };
} else {
this.stationList.forEach(station => {
if (station.centralized && station.chargeStationCodeList.includes(this.selectedObj.code)) {
this.param = { stationCode: station.code };
}
});
}
this.param = { stationCode: this.selectedObj.code };
}
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
this.param.speedLimitValue = this.speedLimitValue;
@ -743,21 +753,16 @@ export default {
this.clearAllMenuShow();
},
handleTrainParam() {
if (this.selectedObj.type === '01') {
this.formModelSectionName = this.selectedObj.name;
this.$store.state.map.activeTrainList.forEach(trainCode => {
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
if (trainModel && trainModel.physicalCode === this.selectedObj.code) {
this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1));
this.trainModel = trainModel;
this.formModelNewTrip = '';
}
});
}
// this.trainModel = this.selectedObj; physicalCode
// this.formModelTripNum = this.trainModel.destinationCode + this.trainModel.serviceNumber + this.trainModel.tripNumber;
// this.formModelSectionName = this.trainModel.sectionModel.name;
// this.formModelNewTrip = '';
this.formModelSectionName = this.selectedObj.name;
this.trainOperateType = '';
this.$store.state.map.activeTrainList.forEach(trainCode => {
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
if (trainModel && trainModel.sectionCode === this.selectedObj.code) {
this.formModelTripNum = trainModel.destinationCode + (trainModel.serviceNumber.substring(1)) + (trainModel.tripNumber.substring(1));
this.trainModel = trainModel;
this.formModelNewTrip = '';
}
});
},
setSpeedLimitValue(val) {
this.speedLimitValue = val;
@ -768,34 +773,53 @@ export default {
this.formModelTripNum = '';
this.formModelSectionName = '';
this.formModelNewTrip = '';
this.formModelNewGroup = '';
this.trainOperateType = '';
this.trainOperationShow = flag;
}
},
trainCommit() {
if (this.formModelNewTrip && this.formModelNewTrip.length === 9) {
const params = {
groupNumber: this.trainModel.groupNumber,
tripNumber: this.formModelNewTrip.slice(6, 9),
serviceNumber: this.formModelNewTrip.slice(3, 6)
};
const step = {
over: true,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN,
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
param: params
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode(true);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
} else {
this.$refs.noticeInfo.doShow('请输入正确的车次号');
const params = {};
const step = {
over: true
};
if (this.trainOperateType === 'update') {
params.groupNumber = this.trainModel.groupNumber;
params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 5);
params.tripNumber = '0' + this.formModelNewTrip.slice(5, 7);
step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'create') {
params.sectionCode = this.selectedObj.code;
params.groupNumber = this.formModelNewGroup;
params.dn = this.formModelNewTrip.slice(0, 3);
params.sn = '0' + this.formModelNewTrip.slice(3, 5);
params.tn = '0' + this.formModelNewTrip.slice(5, 7);
step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
step.operation = OperationEvent.Train.addTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'delete') {
params.groupNumber = this.trainModel.groupNumber;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.delTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'move') {
params.groupNumber = this.trainModel.groupNumber;
params.sectionCode = this.formModelNewSection;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_MOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.moveTrainId.menu.operation;
step.param = params;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode(true);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
initMenus() {
this.basicParamList = this.$store.state.training.prdType === '01' ? [

View File

@ -0,0 +1,255 @@
<template>
<div
ref="jlmapCanvas"
class="jlmap-canvas"
style="width: 100%;height:960px;"
>
<div :id="canvasId" class="display_canvas" />
</div>
</template>
<script>
import Jlmap from '@/jmapNew/map';
import { parser } from '@/jmapNew/utils/parser';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
import { mapGetters } from 'vuex';
export default {
name: 'JLocalmapVisual',
props: {
},
data() {
return {
loading: true,
offset: {
x: 0,
y: 0
},
map: null,
mapDevice: {},
routeData: [],
mapData: null,
autoReentryData: [],
width: 1920,
height: 960
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.config.canvasSizeCount': function (val) {
this.resetSize();
},
'$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false);
this.map.off('zoom');
this.handleUpdateScreen();
}
},
created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
},
mounted() {
this.init();
},
beforeDestroy() {
if (this.map) {
this.map.dispose();
this.map = null;
}
},
methods: {
init() {
document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false;
};
if (!this.map) {
this.map = new Jlmap({
dom: document.getElementById(this.canvasId),
config: {
renderer: 'canvas',
width: this.width,
height: this.height
},
options: {
scaleRate: 1,
offsetX: 0,
offsetY: 0,
zoomOnMouseWheel: false
},
showConfig: {
prdType: '02',
previewOrMapDraw: true,
showMode: '02'
},
methods: {}
});
}
window.document.oncontextmenu = function () {
return false;
};
if (this.mapData.skinVO) {
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
}
},
loadData() {
try {
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
}
},
//
setMap(data, mapDevice) {
if (data.skinVO) {
this.routeData = this.$store.state.map.routeData;
this.autoReentryData = this.$store.state.map.autoReentryData;
this.map.setMap(data, mapDevice, {
routeData: this.routeData,
autoReentryData: this.autoReentryData
});
setTimeout(() => {
this.handleUpdateScreen();
}, 2000);
} else {
this.mapDevice = {};
this.map.clear();
}
},
handleUpdateScreen() {
this.maskOpen = false;
console.log(this.bigScreenConfig, '--0000');
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
if (this.widthLeft) {
const size = {
width: (this.$store.state.app.width - (this.widthLeft || 450) - 2) * width,
height: this.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----1');
this.map.setUpdateScreen(size);
} else {
const size = {
width: (this.$store.state.app.width - 2) * width,
height: this.$store.state.app.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----');
this.map.setUpdateScreen(size);
}
} else {
this.maskOpen = true;
// this.$messageBox('线, ');
}
},
// jlmap
resetSize() {
this.$nextTick(() => {
this.map && this.map.resize({ width: 1920, height: 960 });
});
},
//
setLevelVisible(levels) {
this.map && this.map.setLevelVisible(levels);
},
setMapFree() {
const list = [];
Object.values(this.mapDevice).forEach((elem) => {
const code = elem.code;
const type = elem._type;
//
type != deviceType.Train &&
list.push({ code, _type: type, _free: true });
});
this.map.update(list, false);
},
//
setCenterWithOffset(code, dx, y) {
this.map.setCenterWithOffset(code, dx, y - this.height / 2);
},
//
updateMapDevice(elems) {
const list = [];
elems.forEach((elem) => {
if (elem.code) {
list.push(deepAssign(this.mapDevice[elem.code], elem));
}
});
this.map.update(list, false);
},
getDeviceByCode(code) {
return this.mapDevice[code];
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask {
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
background: #000;
float: left;
}
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 700;
}
.zoom-view {
position: absolute;
bottom: 0;
background: #fff;
padding-top: 5px;
height: 42px;
border-bottom: 1px #f3f3f3 solid;
border-right: 1px #f3f3f3 solid;
}
/deep/ {
.el-form.el-form--inline {
height: 28px !important;
line-height: 28px !important;
}
.el-loading-mask {
background-color: rgba(0, 0, 0, 0.3);
}
}
</style>

View File

@ -0,0 +1,92 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" style="width: 100%;height: 100%;" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import MapVisual from './mapVisual';
export default {
name: 'TrainMove',
components: {
MapVisual
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '背投系统';
}
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.map.loadData(this.mapData);
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -62,8 +62,8 @@
</el-col>
</el-row>
<el-row v-else-if="$store.state.training.prdType === '02'" style="padding: 3px;">
<el-col :span="16">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;">
<el-col :span="20">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;height: 132px;">
<el-row style="padding: 4px;">
<div class="tip-content-box">
<div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div>
@ -81,53 +81,86 @@
<div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div>
</div>
</el-row>
<el-row class="button-row">
<div class="div-simulate-button" @click="undeveloped">系统</div>
<div class="div-simulate-button" @click="undeveloped">联锁</div>
<div class="div-simulate-button" @click="trainControlShow">列监</div>
<div class="div-simulate-button" @click="undeveloped">站控</div>
<div class="div-simulate-button" @click="undeveloped">车场</div>
<div class="div-simulate-button" @click="undeveloped">编表</div>
<div class="div-simulate-button" @click="undeveloped">车辆段</div>
</el-row>
<el-row class="button-row" style="margin: 10px 0;">
<div class="div-simulate-button" @click="undeveloped">轨道</div>
<div class="div-simulate-button" @click="undeveloped">调度</div>
<div class="div-simulate-button" @click="undeveloped">录放</div>
<div class="div-simulate-button" @click="undeveloped">管理</div>
<div class="div-simulate-button" @click="undeveloped">列车信息</div>
<div class="div-simulate-button" @click="undeveloped">职权</div>
<div style="width: 80px;" />
</el-row>
<div style="padding: 5px;height:20px;line-height: 20px;border-top: 2px solid #DDD9CA;display: flex;justify-content: space-between;">
<!--<div class="div-simulate-button" @click="undeveloped">系统</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">联锁</div>-->
<!--<div class="div-simulate-button" @click="trainControlShow">列监</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">站控</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">车场</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">编表</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">车辆段</div>-->
<div>
<div class="div-simulate-button" style="width: 40px;" @click="rpsClick">背投</div>
<div class="div-simulate-button" style="width: 40px;">车场</div>
<div class="div-simulate-button" style="width: 40px;">轨道</div>
<div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" style="width: 40px;">列车</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">联锁</div>
<div class="div-simulate-button" style="width: 40px;">列监</div>
<div class="div-simulate-button" style="width: 40px;">运图</div>
<div class="div-simulate-button" style="width: 55px;">时刻表</div>
<div class="div-simulate-button" style="width: 40px;">编表</div>
<div class="div-simulate-button" style="width: 40px;">调度</div>
<div class="div-simulate-button" style="width: 40px;">站控</div>
<div class="div-simulate-button" style="width: 40px;">计划</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">SDM</div>
</div>
<div>
<div class="div-simulate-button" style="width: 55px;">管理员</div>
<div class="div-simulate-button" style="width: 40px;">职权</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">拷屏</div>
<div class="div-simulate-button" style="width: 40px;">录放</div>
<div class="div-simulate-button" style="width: 40px;">布局</div>
</div>
</div>
<!--<el-row class="button-row" style="margin: 10px 0;">-->
<!--<div class="div-simulate-button" @click="undeveloped">轨道</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">调度</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">录放</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">管理</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">列车信息</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">职权</div>-->
<!--<div style="width: 80px;" />-->
<!--</el-row>-->
</div>
</el-col>
<el-col :span="4">
<el-col :span="2">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;">
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" @click="showHimAlarm('C')">C</div>
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
</el-row>
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
<el-row style="margin-top: 20px;margin-bottom: 18px;">
<el-col :span="16">
<el-row class="button-row">
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" @click="showHimAlarm('C')">C</div>
<!--<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">-->
</el-row>
<el-row class="button-row" style="margin-top: 20px;">
<div style="width: 40px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">运图</div>
</el-row>
</el-col>
<el-col :span="8">
<div style="width: 40px;height: 60px;line-height: 60px;" class="div-simulate-button" @click="controlAudio(false)">静音</div>
</el-col>
</el-row>
<el-row class="button-row" style="margin: 10px 0;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报表</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">时刻表</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">档案</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">归档</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">统计</div>
</el-row>
</div>
</el-col>
<el-col :span="4" style="border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 68px;" />
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
<div style="width: 80px;" class="div-simulate-button" @click="showLogDetail">日志</div>
</el-row>
<el-col :span="2" style="border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 88px;" />
<el-row class="button-row" style="margin: 10px 0;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">退出</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">退出</div>
</el-row>
</el-col>
</el-row>
@ -136,6 +169,7 @@
<alarm-table-hmi ref="alarmTableHmi" />
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<rps-dialog ref="rpsDialog" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
@ -151,6 +185,7 @@ import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import RpsDialog from './dialog/rps';
import LogDetail from './menuDialog/logDetail';
export default {
@ -159,7 +194,8 @@ export default {
AlarmTableLow,
AlarmTableHmi,
TrainControl,
LogDetail
LogDetail,
RpsDialog
},
props: {
selected: {
@ -443,6 +479,9 @@ export default {
trainControlShow() {
this.$refs.trainControl.doShow();
},
rpsClick() {
this.$refs.rpsDialog.doShow();
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;
@ -665,9 +704,9 @@ export default {
width: 80px;
}
.tip-content-box{
height: 20px;
height: 30px;
width: 100%;
line-height: 20px;
line-height: 30px;
background: #001528;
color: #C20F29;
font-size: 14px;

View File

@ -3,7 +3,7 @@
<div v-if="isLocal" id="menuButton">
<div class="__menuButton">
<el-row>
<el-col v-if="!trainOperationShow" :span="11">
<el-col v-if="operationType === 'cmd'" :span="11">
<div v-if="secondConfirm" class="nav-border">
<el-row>
<div class="nav-border-top">
@ -42,27 +42,27 @@
</el-row>
</div>
</el-col>
<el-col v-if="!trainOperationShow" :span="10">
<el-col v-if="operationType === 'cmd'" :span="10">
<div class="nav-border">
<div class="nav-border-top">
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin||canCommand||secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin||canCommand||secondConfirm" @click="interceptLogin(command)()">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
</div>
<div class="el-print">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="interceptLogin(selectRouteParam)(el.code)">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code || overlap&&el.code===overlap.code}" @click="interceptLogin(selectRouteParam)(el.code)">
{{ el.commandTip || el.name }}
</div>
</div>
</div>
</el-col>
<el-col v-if="trainOperationShow" :span="10" style="padding: 1px;">
<el-col v-if="operationType === 'train'" :span="10" style="padding: 1px;">
<div class="nav-border" style="padding: 5px;">
<el-row style="height: 25px;">
<div style="display: flex;justify-content: space-between">
<el-button size="mini" plain>车次号修改</el-button>
<el-button size="mini" plain :disabled="true">车次号删除</el-button>
<el-button size="mini" plain :disabled="true">车次号创建</el-button>
<el-button size="mini" plain :disabled="true">车次号步进</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='update'" @click="handleTrainOperate('update')">车次号修改</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='delete'" @click="handleTrainOperate('delete')">车次号删除</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='create'" @click="handleTrainOperate('create')">车次号创建</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='move'" @click="handleTrainOperate('move')">车次号步进</el-button>
</div>
</el-row>
<el-row style="height: 25px;line-height: 25px;border-top: 2px solid #7E8076;border-left: 2px solid #6A6B64;border-right: 2px solid #FBFBFA;">
@ -79,35 +79,85 @@
</el-row>
</div>
</el-col>
<el-col v-if="trainOperationShow" :span="5" style="padding: 1px;">
<el-col v-if="operationType === 'train'" :span="5" style="padding: 1px;">
<div class="nav-border" style="padding: 5px;">
<el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
<el-col :span="17"><el-input v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" /></el-col>
<el-col :span="17">
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" size="mini" style="height: 20px;" />
</el-col>
</el-row>
<el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col>
<el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col>
</el-row>
<el-row style="display: flex;align-items: center;">
<el-row v-if="trainOperateType ==='update'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col>
<el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col>
</el-row>
<el-row v-if="trainOperateType ==='create'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车组号</el-col>
<el-col :span="17"><el-input v-model="formModelNewGroup" size="mini" style="height: 20px;" /></el-col>
</el-row>
<el-row v-if="trainOperateType === 'move'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新轨道号</el-col>
<el-col :span="17">
<el-select v-model="formModelNewSection" filterable size="mini" style="height: 20px;" placeholder="请选择">
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-col>
</el-row>
</div>
</el-col>
<el-col v-if="trainOperationShow" :span="6" style="padding: 1px;">
<el-col v-if="operationType === 'train'" :span="6" style="padding: 1px;">
<div class="nav-border">
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainModel.groupNumber" @click="trainCommit"> </el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainCommitDisabled" @click="trainCommit"> </el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose"> </el-button>
</div>
</div>
</el-col>
<el-col v-if="operationType === 'run'" :span="15" style="padding: 1px;">
<div class="nav-border" style="font-size: 14px;">
<div style="display: flex;justify-content: space-between;">
<div style="border: 1px solid #c0c0c0;margin: 10px;padding: 0 10px 5px 10px;">
<div style="position: relative;top: -8px;left: -5px;background: #fff;width: 81px;">所有时刻表</div>
<el-select v-model="newRunPlanId" style="width: 140px;" placeholder="请选择" size="mini">
<el-option
v-for="item in runPlanList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</div>
<div style="border: 1px solid #c0c0c0;margin: 10px;padding: 0 10px 5px 10px;">
<div style="position: relative;top: -8px;left: -5px;background: #fff;width: 81px;">当前时刻表</div>
<div class="moni_input" style="width: 140px;">{{ runPlanName }}</div>
</div>
</div>
<div style="display: flex;justify-content: space-between;">
<el-button style="line-height: 18px; width: 100px; margin-left: 20px;" plain :disabled="!newRunPlanId" @click="handleClickLoadRunPlan">加载</el-button>
<el-button style="line-height: 18px; width: 100px; margin-right: 20px;" plain @click="changeShowMode('cmd')">退出</el-button>
</div>
</div>
</el-col>
<el-col v-if="operationType === 'run'" :span="6" style="padding: 1px;">
<div class="nav-border" style="padding-top: 10px;">
<span style="font-size: 14px;color: #000;">{{ `TIP端加载时刻表内部号为${runPlanName}` }}</span>
</div>
</el-col>
<el-col :span="3">
<div class="nav-border flex-box">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(false)">联锁操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin">时刻表操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(true)">ATS操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('cmd')">联锁操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('run')">时刻表操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('train')">ATS操作</el-button>
</div>
</el-col>
</el-row>
@ -228,6 +278,8 @@ import { EventBus } from '@/scripts/event-bus';
import * as adapter from '@/jmapNew/utils/adapter';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import BanIcon from '@/assets/ban-heb.png';
import { queryRunPlanList } from '@/api/runplan';
import { simulationLoadRunPlan } from '@/api/simulation';
export default {
props: {
@ -258,6 +310,8 @@ export default {
oldDevice: null, //
canCommand: true,
cr1Confrim: false,
runPlanList: [],
newRunPlanId: '',
operate: '',
cmdType: '',
securityCommand: '',
@ -267,6 +321,7 @@ export default {
selectedObj: null,
oldClickObj: null, //
route: null, //
overlap: null, //
selectRouteList: [],
menuCmdList: new Array(15).fill({}),
ciStationParamList: [],
@ -285,11 +340,14 @@ export default {
commandInfo: {},
banIcon: BanIcon,
timer: null,
trainOperationShow: false,
operationType: 'cmd',
trainModel: {},
formModelTripNum: '',
formModelSectionName: '',
formModelNewTrip: '',
formModelNewGroup: '',
trainOperateType: '',
formModelNewSection: '',
dialogVisible: false,
tipList: [],
modeMatch: false,
@ -312,7 +370,10 @@ export default {
...mapGetters('map', [
'routeList',
'stationList',
'routeData'
'routeData',
'overlapList',
'overlapData',
'sectionList'
]),
commandId() {
return OperationEvent.Command.commandHaerbin.confirm.domId;
@ -349,11 +410,19 @@ export default {
},
menuPosition() {
return this.$store.state.menuOperation.menuPosition;
},
runPlanName() {
return this.$store.state.runPlan.runPlanInfo.name;
},
trainCommitDisabled() {
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete') ||
(this.trainOperateType === 'move' && this.formModelNewSection);
}
},
watch: {
'$store.state.training.prdType': function (val) {
this.trainOperationShow = false;
this.operationType = 'cmd';
this.initMenus();
},
'$store.state.training.started':function (val) {
@ -435,6 +504,15 @@ export default {
this.param = {};
this.initMenus();
this.handleBasicMenu();
queryRunPlanList(this.$route.query.mapId).then(resp =>{
if (resp.data && resp.data.length) {
resp.data.forEach(item => {
this.runPlanList.push(item);
});
}
}).catch(() => {
this.$message.error('获取地图模板运行图列表失败!');
});
EventBus.$on('sendMsg', ({message = ''}) => {
this.tempData = [{name: message}];
});
@ -449,6 +527,9 @@ export default {
}
}
},
handleTrainOperate(type) {
this.trainOperateType = type;
},
initCentralizedStationList(list) {
const stationContorl = this.stationContorl;
this.menuCmdList = new Array(15).fill({});
@ -508,7 +589,7 @@ export default {
}
break;
case 'Section':
if (this.trainOperationShow) {
if (this.operationType === 'train') {
this.handleTrainParam();
} else {
this.handleSectionMenu();
@ -526,6 +607,13 @@ export default {
}
}
},
handleClickLoadRunPlan(row) {
simulationLoadRunPlan(this.$route.query.group, this.newRunPlanId).then(response => {
this.$message.success('仿真加载指定运行计划成功!');
}).catch(() => {
this.$message.error('仿真加载指定运行计划失败!');
});
},
handleIbpShow() {
if (this.selectedObj._type == 'StationStand' && this.$store.state.menuOperation.subType == 'StationPlatform') {
if (!(this.selectedObj.assignSkip || this.selectedObj.allSkip || this.selectedObj.centerHoldTrain || this.selectedObj.stationHoldTrain)) {
@ -577,13 +665,25 @@ export default {
return control;
},
selectRouteParam(code) {
this.route = this.routeData[code];
if (this.route) {
this.param = {
routeCode: this.route.code
};
if (this.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP) {
this.overlap = this.overlapData[code];
if (this.overlap) {
this.param = {
signalCode: this.selectedObj.code,
overlapCode: this.overlap.code
};
this.canCommand = false;
}
} else {
this.route = this.routeData[code];
if (this.route) {
this.param = {
routeCode: this.route.code
};
}
this.initCentralizedStationList(this.routeParamList);
}
this.initCentralizedStationList(this.routeParamList);
},
handleSwicthMenu() { //
//
@ -783,11 +883,20 @@ export default {
if (row.commandTip) {
EventBus.$emit('sendMsg', {message: row.commandTip});
}
if (row.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP) {
const overlapList = [];
this.overlapList.forEach(item => {
if (item.signalCode === this.selectedObj.code) {
overlapList.push(item);
}
});
this.tempData = [...overlapList];
}
if (this.tempData.length) {
this.operate = row.operate.operation;
this.cmdType = row.cmdType;
this.canCommand = false;
this.canCommand = row.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP;
step.operation = this.operate;
if (row.next) {
@ -915,12 +1024,13 @@ export default {
},
doClose() {
this.deviceHighLight(this.oldDevice, false); //
this.changeShowMode(false);
this.changeShowMode('cmd');
this.operate = ''; //
this.cmdType = '';
this.securityCommand = '';
this.speedLimitValue = '';
this.secondConfirm = false;
this.overlap = null;
this.cr1Confrim = false;
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
@ -946,17 +1056,16 @@ export default {
this.allowDetain = true;
},
handleTrainParam() {
if (this.selectedObj.type === '01') {
this.formModelSectionName = this.selectedObj.name;
// this.$store.state.map.activeTrainList.forEach(trainCode => {
// const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
// if (trainModel && trainModel.physicalCode === this.selectedObj.code) {
// this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1));
// this.trainModel = trainModel;
// this.formModelNewTrip = '';
// }
// });
}
this.formModelSectionName = this.selectedObj.name;
this.trainOperateType = '';
this.$store.state.map.activeTrainList.forEach(trainCode => {
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
if (trainModel && trainModel.sectionCode === this.selectedObj.code) {
this.formModelTripNum = trainModel.destinationCode + (trainModel.serviceNumber.substring(1)) + (trainModel.tripNumber.substring(1));
this.trainModel = trainModel;
this.formModelNewTrip = '';
}
});
},
pushTempData(list) {
this.tempData = [];
@ -964,44 +1073,63 @@ export default {
this.tempData.push(el);
});
},
changeShowMode(flag) {
changeShowMode(type) {
if (this.$store.state.training.prdType === '01') {
this.trainModel = {};
this.formModelTripNum = '';
this.formModelSectionName = '';
this.formModelNewTrip = '';
this.trainOperationShow = flag;
this.formModelNewGroup = '';
this.trainOperateType = '';
this.operationType = type;
this.formModelNewSection = '';
}
},
trainCommit() {
if (this.formModelNewTrip && this.formModelNewTrip.length === 9) {
const params = {
groupNumber: this.trainModel.groupNumber,
tripNumber: this.formModelNewTrip.slice(6, 9),
serviceNumber: this.formModelNewTrip.slice(3, 6)
};
const step = {
over: true,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN,
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
param: params
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode(true);
}
}).catch((error) => {
console.error(error);
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
}
});
} else {
EventBus.$emit('sendMsg', {message: '请输入正确的车次号'});
const params = {};
const step = {
over: true
};
if (this.trainOperateType === 'update') {
params.groupNumber = this.trainModel.groupNumber;
params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 5);
params.tripNumber = '0' + this.formModelNewTrip.slice(5, 7);
step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'create') {
params.sectionCode = this.selectedObj.code;
params.groupNumber = this.formModelNewGroup;
params.dn = this.formModelNewTrip.slice(0, 3);
params.sn = '0' + this.formModelNewTrip.slice(3, 5);
params.tn = '0' + this.formModelNewTrip.slice(5, 7);
step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
step.operation = OperationEvent.Train.addTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'delete') {
params.groupNumber = this.trainModel.groupNumber;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.delTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'move') {
params.groupNumber = this.trainModel.groupNumber;
params.sectionCode = this.formModelNewSection;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_MOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.moveTrainId.menu.operation;
step.param = params;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode('train');
}
}).catch((error) => {
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
}
});
},
stationToCommand() {
const step = {
@ -1067,7 +1195,7 @@ export default {
this.basicParamList = this.$store.state.training.prdType === '01' ? [
{ name: '自排全开', commandTip: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '自排全关', commandTip: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '释放指令', commandTip: '释放指令', cmdType: '', operate: '', fillStationCode: true, disabledCb: (stationControl) => true },
{ name: '释放指令', commandTip: '释放指令', cmdType: CMD.Station.CMD_STATION_RELEASE, operate: OperationEvent.Station.stationRelease.menuButton, securityCommand: true, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '重启令解', commandTip: '重启令解', cmdType: CMD.Station.CMD_STATION_RESTART, operate: OperationEvent.Station.stationRestart.menuButton, securityCommand: true, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '追踪全开', commandTip: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '追踪全关', commandTip: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
@ -1144,7 +1272,7 @@ export default {
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.cancelAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', commandTip: '设置保护', cmdType: CMD.Signal.CMD_SIGNAL_SET_OVERLAP, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
] : [
{ name: '关闭信号', commandTip: '设置信号机为关闭状态', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
@ -1160,7 +1288,7 @@ export default {
{ name: '开放引导', commandTip: '开放引导信号', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', commandTip: '设置保护', cmdType: CMD.Signal.CMD_SIGNAL_SET_OVERLAP, operate: OperationEvent.Signal.setOverlap.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
];
this.stationParamList = this.$store.state.training.prdType === '01' ? [
@ -1458,6 +1586,13 @@ export default {
.station_close{
float: right;
}
.moni_input{
border-top: 2px solid #585858;
border-left: 2px solid #585858;
border-right: 2px solid #F9F9F9;
border-bottom: 2px solid #F9F9F9;
background: #D4D0C8;
}
.stationButton{
font-size: 12px;
width: 100px;

View File

@ -171,6 +171,11 @@ const OrgDetail = () => import('@/views/system/companyManage/orgDetail');
const VoiceTraining = () => import('@/views/system/voiceTraining/index');
const SceneTrainingResult = () => import('@/views/drts/scene/trainingResult');
const SceneVoiceTraining = () => import('@/views/drts/scene/voiceTraining');
const DrawingMange = () => import('@/views/system/drawingMange/index');
const Ueditor = () => import('@/views/editor/index');
const UeditorList = () => import('@/views/editor/list');
const UeditorDraftList = () => import('@/views/editor/listDraft');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -1122,7 +1127,15 @@ export const asyncRouter = [
meta: {
i18n: 'router.voiceTraining'
}
},
{
path: 'drawingMange',
component: DrawingMange,
meta: {
i18n: 'router.drawingMange'
}
}
// {
// path: 'deviceManage',
// component: DeviceManage,
@ -1132,6 +1145,37 @@ export const asyncRouter = [
// }
]
},
{
path: '/editor',
component: Layout,
meta: {
i18n: 'router.newDesignEditor',
roles: [admin, user]
},
children: [
{
path: 'list',
component: UeditorList,
meta: {
i18n: 'router.newDesignEditorList'
}
},
{
path: 'listDraft',
component: UeditorDraftList,
meta: {
i18n: 'router.newDesignDraftEditorList'
}
},
{
path: '',
component: Ueditor,
meta: {
i18n: 'router.newDesignEditor'
}
}
]
},
{ // 新个人地图
path: '/design',
component: Layout,

View File

@ -33,6 +33,15 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '013'
},
zzww: {
title: '共赢列车仿真驾驶系统',
loginPath: '/login?project=zzww',
loginParam: 'ZZWW',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
bjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/login?project=bjd',
@ -419,6 +428,7 @@ export const loginInfo = {
export const ProjectIcon = {
xty: FaviconXty,
zzww: FaviconXty,
login: Favicon,
design: Favicon,
designxty: FaviconXty,
@ -462,6 +472,7 @@ export const ProjectCode = {
design: 'DEFAULT',
xty: 'XTY',
designxty: 'XTY',
zzww: 'ZZWW',
gzb: 'GZB',
designgzb: 'GZB',
heb: 'HEB',
@ -485,12 +496,12 @@ export const ProjectCode = {
designcgy: 'CGY'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角主体不展示
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
export const NoSimulationQrCodeList = ['heb', 'bjd'];
export const RegisterCodeList = ['cgy', 'designcgy'];
@ -543,7 +554,8 @@ export const ProjectList = [
{value: 'urtss', label: '陪标项目'},
{value: 'sdy', label: '苏电院'},
{value: 'cgy', label: '成都工业'},
{value: 'wjls', label: '微机联锁'}
{value: 'wjls', label: '微机联锁'},
{value: 'zzww', label: '郑州共赢'}
];
export const localPackageProject = {
localdesign: 'designheb',

View File

@ -124,7 +124,9 @@ export default {
/** 取消自动折返 */
CMD_SIGNAL_CANCEL_AUTO_TURN_BACK: {value: 'Signal_Cancel_Auto_Turn_Back', label: '取消自动折返'},
/** 信号机总取消 */
CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'}
CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'},
/** 设置保护 */
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}
},
// 物理区段操作
@ -263,7 +265,9 @@ export default {
/** 取消计轴预复位 */
CMD_STATION_CANCEL_PRE_RESET: {value: 'Station_Cancel_Pre_Reset', label: '取消计轴预复位'},
/** 重启联锁机 */
CMD_STATION_RESTART_INTERLOCK_MACHINE: {value: 'Station_Restart_Interlock_Machine', label: '重启联锁机'}
CMD_STATION_RESTART_INTERLOCK_MACHINE: {value: 'Station_Restart_Interlock_Machine', label: '重启联锁机'},
/** 释放指令 */
CMD_STATION_RELEASE : {value:'Station_Release', label: '释放指令' }
},
// 列车

View File

@ -1697,6 +1697,12 @@ export const OperationEvent = {
operation: '3201',
domId: '_Tips-Signal-cancelinterlock-Menu{BOTTOM}'
}
},
setOverlap: {
menuButton: {
operation: '3211',
domId: '_Tips-Signal-setOverlap-Menu{BOTTOM}'
}
}
},
@ -2761,6 +2767,12 @@ export const OperationEvent = {
operation: '619',
domId: '_Tips-Station-restartInterlockMachine-Menu'
}
},
stationRelease: {
menuButton: {
operation: '620',
domId: '_Tips-Station-stationRelease'
}
}
},

View File

@ -261,6 +261,9 @@ const map = {
routeData: (state) => {
return state.routeData;
},
overlapList: (state) => {
return state.overlapList;
},
overlapData: (state) => {
return state.overlapData;
},

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// 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.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康

View File

@ -1,10 +1,10 @@
import Vue from 'vue';
import { getBaseUrl } from '@/utils/baseUrl'
import { getBaseUrl } from '@/utils/baseUrl';
// 创建或者打开数据库
export function openIndexedDB() {
const baseUrl = getBaseUrl();
const indexedDBName = baseUrl.replace(/http.?:\/\/(.*)[\/|:].*/, "$1");
const baseUrl = getBaseUrl();
const indexedDBName = baseUrl.replace(/http.?:\/\/(.*)[\/|:].*/, '$1');
const request = window.indexedDB.open(indexedDBName, 1);
request.onerror = function (event) {
console.log('数据库打开报错');

View File

@ -4,7 +4,7 @@
<el-row>
<div class="title-text">场景语音训练结果</div>
</el-row>
<el-row>
<el-row v-loading="loading">
<el-col :span="6" :offset="1">
<span>用户</span>
<el-select v-model="userId" size="mini" filterable placeholder="请选择">
@ -108,13 +108,8 @@ export default {
},
methods: {
async initFunction() {
this.loading = true;
const userListData = await getHavaAudoUserList(this.$route.query.sceneId);
this.userList = userListData.data;
if (this.userList.length) {
this.userId = this.userList[0].id;
this.queryData();
}
const scriptData = await getScriptByIdNew(this.$route.query.scriptId);
const dispatcher = scriptData.data.memberList.find(member => member.type === 'DISPATCHER');
this.actionList = scriptData.data.actionList.filter(action => {
@ -174,6 +169,13 @@ export default {
if (this.userId) {
this.loading = true;
audioFilesCheckAllSence(this.$route.query.sceneId, this.userId).then(resp => {
this.actionList.forEach(item => {
item.result = '';
item.wrongKeyWords = [];
item.wrongTripNumbers = [];
item.recordId = '';
item.filePath = '';
});
(resp.data || []).forEach(elem => {
this.actionList.forEach(item => {
if (elem.actionId === item.id) {

116
src/views/editor/edit.vue Normal file
View File

@ -0,0 +1,116 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
// import { postOperateStepData, putOperateStepData, getPlaceholderList } from '@/api/management/operation';
import { postDocDraft, getDocDraftById, putDocDraftById } from '@/api/editor';
export default {
name: 'TrainingDetailEdit',
props: {
type: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formModel: {
id: '',
title: ''
},
placeholderList: []
};
},
computed: {
form() {
// const isAdd = this.type === 'ADD';
const form = {
labelWidth: '80px',
items: [
{ prop: 'title', label: '标题', type: 'text', required: true }
]
};
return form;
},
rules() {
const crules = {
title: [
{
required: true,
message: '请输入文章标题',
trigger: 'blur'
}
]
};
return crules;
},
title() {
if (this.type === 'ADD') {
return '创建文章';
} else {
return '更新文章';
}
}
},
methods: {
async show(data) {
this.dialogVisible = true;
console.log(data);
if (this.type != 'ADD') {
const res = await getDocDraftById(data.id);
this.formModel.title = res.data.title;
this.formModel.id = data.id;
} else {
this.formModel.title = '';
this.formModel.id = '';
}
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
if (self.type === 'ADD') {
self.create();
} else {
self.update();
}
});
},
create() {
const self = this;
postDocDraft(this.formModel).then(() => {
self.$message.success('创建文章成功!');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`创建文章失败:${error.message}`);
});
},
update() {
const self = this;
putDocDraftById(this.formModel.id, this.formModel).then(() => {
self.$message.success('更新文章成功!');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`更新文章失败:${error.message}`);
});
},
handleClose() {
this.formModel = {
title: ''
};
this.$refs.dataform.resetForm();
this.dialogVisible = false;
}
}
};
</script>

151
src/views/editor/index.vue Normal file
View File

@ -0,0 +1,151 @@
<template>
<div id="wangeditor">
<div ref="editorElem" style="text-align:left;" />
<button v-if="draft" type="button" class="btn" @click="saveDraftTitle">保存</button>
<!-- <button type="button" class="btn" @click="getEditorData">获取当前内容</button>
<button type="button" class="btn" @click="setEditorData">设置当前内容</button>
<h3>内容预览</h3>
<div class="content_html1" v-html="editorContent" /> -->
</div>
</template>
<script>
import E from 'wangeditor';
import { uploadFile, pictureUrl } from '@/api/upload';
import { putDocDraftByIdData, getDocDraftById } from '@/api/editor';
export default {
name: 'Editor',
// catchDatahtml
// props: ['catchData'],
data() {
return {
editor: null,
formData: '',
editorContent: ''
};
}, //
computed: {
action() {
return `${process.env.VUE_APP_UPLOAD_API}${pictureUrl}`;
},
draft() {
return this.$route.query.draft;
},
docId() {
return this.$route.query.docId;
}
},
mounted() {
this.editor = new E(this.$refs.editorElem);
this.editor.config.height = 450;
this.editor.config.uploadImgServer = '/upload-img';
// html
this.editor.config.onchange = html => {
this.editorContent = html;
};
// this.editor.config.showLinkImg = false; //
this.editor.config.uploadImgShowBase64 = true;
const action = this.action;
const that = this;
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
that.formData = new FormData();
resultFiles.forEach(file => {
that.formData.append('file', file);
});
uploadFile(action, that.formData).then(resp => {
const imgUrl = process.env.VUE_APP_VOICE_API + resp.data;
insertImgFn(imgUrl);
}).catch(error => { console.log(error); });
};
this.editor.config.menus = [
//
'head', //
'bold', //
'fontSize', //
'fontName', //
'italic', //
'underline', // 线
'strikeThrough', // 线
'indent',
'lineHeight',
'foreColor', //
'backColor', //
'link', //
'list', //
'justify', //
'quote', //
'emoticon', //
'image', //
'table', //
'code', //
'splitLine',
'undo', //
'redo' //
];
this.editor.create(); //
this.handleEdit();
},
beforeDestroy() {
// API
this.editor.destroy();
this.editor = null;
},
methods: {
async handleEdit() {
try {
const res = await getDocDraftById(this.docId);
this.editor && this.editor.txt.html(res.data.content); //
} catch (error) {
console.log(error);
}
},
saveDraftTitle() {
const data = this.editor.txt.html();
putDocDraftByIdData(this.docId, { content: data }).then(res => {
this.$message.success('保存文章成功!');
setTimeout(() => {
this.$router.push({path : '/editor/listDraft'});
}, 2000);
}).catch(error => {
this.$message.error(`保存失败:${error.message}`);
});
},
getEditorData() {
const data = this.editor.txt.html();
console.log(data);
},
setEditorData() {
const html = '<h1 id="gt6dj" style="text-align:center;">测试标题</h1><hr/><p data-we-empty-p="" style="text-align:center;"><img src="https://oss.joylink.club/oss/ddy/picture/2021-05-10/2720-44302.jpg" style="max-width:100%;" contenteditable="false" width="473" height="196.83"/><br/>工艺数据</p>';
this.editor && this.editor.txt.html(html); //
}
}
};
</script>
<style lang="scss" scoped>
#wangeditor{
z-index: 2;
position: absolute;
width: 100%;
height: 100%;
}
.content_html {
width: 100%;
height: 200px;
overflow: auto;
background: red;
}
.content_html1{
width: 100%;
height: 300px;
overflow: auto;
background: chartreuse;
}
</style>

87
src/views/editor/list.vue Normal file
View File

@ -0,0 +1,87 @@
<template>
<div>
<el-card>
<el-form
ref="queryForm"
:model="formModel"
size="small"
style="padding: 6px 20px 6px 20px;overflow: hidden;"
>
<el-form-item label="标题" style="margin-bottom: 0;float: left; width: 300px;">
<el-input v-model="formModel.title" style="width: 240px;" />
</el-form-item>
<el-button style="margin-right: 10px; float: right;" type="primary" size="small" @click="reloadTable">查询</el-button>
</el-form>
</el-card>
<el-table :data="tableData" border style="width: 100%">
<el-table-column label="姓名">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="450">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.$index, scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="文章"
:visible.sync="dialogVisible"
width="100%"
top="0"
:fullscreen="true"
:before-close="beforeClose"
>
<div class="content_html1" v-html="editorContent" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="beforeClose">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getDoc, getDocById } from '@/api/editor';
export default {
name: 'CacheControl',
components: {
},
data() {
return {
tableData: [],
formModel: {
title: ''
},
dialogVisible: false,
editorContent: ''
};
},
created() {
this.reloadTable();
},
methods: {
handleShow(row, data) {
console.log(data);
this.dialogVisible = true;
getDocById(data.id).then(res => {
this.editorContent = res.data.content;
}).catch(error => {
console.log(error);
});
},
reloadTable() {
this.tableData = [];
getDoc().then(res => {
this.tableData = res.data;
}).catch(error => {
console.log(error);
});
},
beforeClose() {
this.dialogVisible = false;
}
}
};
</script>

View File

@ -0,0 +1,108 @@
<template>
<div>
<!-- <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> -->
<el-card>
<el-form
ref="queryForm"
:model="formModel"
size="small"
style="padding: 6px 20px 6px 20px;overflow: hidden;"
>
<el-form-item label="标题" style="margin-bottom: 0;float: left; width: 300px;">
<el-input v-model="formModel.title" style="width: 240px;" />
</el-form-item>
<el-button style="margin-right: 10px; float: right;" type="primary" size="small" @click="createTitle">创建</el-button>
<el-button style="margin-right: 10px; float: right;" type="primary" size="small" @click="query">查询</el-button>
</el-form>
</el-card>
<el-table :data="tableData" border style="width: 100%">
<el-table-column label="姓名">
<template slot-scope="scope">
<!-- <i class="el-icon-time" /> -->
<span style="margin-left: 10px">{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="450">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" @click="handleUpdate(scope.$index, scope.row)">更新</el-button>
<el-button size="mini" @click="handlePublish(scope.$index, scope.row)">发布</el-button>
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<Edit ref="edits" type="ADD" @reloadTable="reloadTable" />
<Edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
</div>
</template>
<script>
import { getDocDraft, putDocDraftByIdPublish, deleteDocDraftById } from '@/api/editor';
import Edit from './edit';
export default {
name: 'CacheControl',
components: {
Edit
},
data() {
return {
tableData: [],
formModel: {
title: ''
}
};
},
created() {
this.query();
},
methods: {
query() {
this.reloadTable();
},
createTitle() {
this.$refs.edits.show();
},
//
handleEdit(row, data) {
this.$router.push({path : '/editor', query: {docId: data.id, draft: 1}});
},
//
handleUpdate(row, data) {
this.$refs.edit.show(data);
},
// 稿
handlePublish(row, data) {
console.log(data);
putDocDraftByIdPublish(data.id).then(res => {
this.$message.success('创建文章成功!');
this.reloadTable();
}).catch(error => {
this.$message.error(`发布失败: ${error.data}`);
});
},
handleDelete(row, data) {
this.$confirm('是否确认删除文章?', this.$t('tip.hint'), {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteDocDraftById(data.id).then(res => {
this.$message.success('删除文章成功!');
this.reloadTable();
}).catch(error => {
this.$message.error(`删除失败: ${error.data}`);
});
}).catch(() => {});
},
reloadTable() {
this.tableData = [];
getDocDraft().then(res => {
this.tableData = res.data;
}).catch(error => {
console.log(error);
});
}
}
};
</script>

View File

@ -54,6 +54,7 @@ import StatusIcon from '@/views/components/StatusIcon/statusIcon';
import { simulationPause, simulationStart } from '../../../api/rtSimulation';
// import Vue from 'vue';
import { getSessionStorage } from '@/utils/auth';
import { destroySimulation } from '@/api/rtSimulation';
// import { EventBus } from '@/scripts/event-bus';
export default {
@ -188,6 +189,28 @@ export default {
methods: {
async initLoadPage() {
try {
const memberData = Object.values(this.$store.state.training.memberData);
const member = memberData.find(eachMember=>{
return eachMember.userId == this.$store.state.user.id;
});
const deviceId = member ? member.deviceId : '';
if (deviceId) {
const nameList = Object.keys(this.$store.state.map.map || {});
let list = [];
nameList.forEach(item => {
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
if (item === 'trainList') {
this.$store.state.map.map[item].forEach(elem => {
elem && list.push(elem);
});
} else {
list = [...list, ...this.$store.state.map.map[item]];
}
}
});
this.$jlmap.updateShowStation(list, deviceId);
}
// 'Station83189';
if (this.try != '0') {
this.loadInitData();
}
@ -249,7 +272,7 @@ export default {
async back() {
this.isGoback = true;
if (this.projectDevice || this.project === 'wjls') {
clearSimulation(this.group).then(res=>{
destroySimulation(this.group).then(res=>{
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();

View File

@ -136,8 +136,8 @@ export default {
menu = getDeviceMenuByDeviceType('StationControl');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.subType == 'light' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em);
@ -145,8 +145,8 @@ export default {
menu = getDeviceMenuByDeviceType('StationLight');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.subType == 'preReset' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em);
@ -154,19 +154,21 @@ export default {
menu = getDeviceMenuByDeviceType('StationPreReset');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
const equipment = this.getDeviceByEm(em);
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.subType === 'enabled' && em.deviceType === 'Signal') {
menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
const equipment = this.getDeviceByEm(em);
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu});
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};

View File

@ -127,7 +127,7 @@ export default {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`, query: { name: obj.mapName } });
this.$router.push({ path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`, query: { name: obj.mapName, lineCode:obj.lineCode } });
break;
}
}

View File

@ -29,31 +29,31 @@
</template>
<script>
// import RouteOperate from './routeoperate/index';
import RouteOperate from './routeoperate/index';
import RoutingOperate from './routingoperate/index';
import BigRoutingOperate from './bigroutingoperate/index';
// import AutomaticOperate from './automaticoperate/index';
import AutomaticOperate from './automaticoperate/index';
// import PathOperate from './pathoperate/index';
// import RunLevelOperate from './runLeveloperate/index';
// import SignalOperate from './signaloperate/index';
// import TurnedOperate from './turnedoperate/index';
// import FlankProtectOperate from './flankProtectOperate/index';
// import DwellTimeOperate from './dwellTimeOperate/index';
// import DestinationOperate from './destinationOperate/index';
import RunLevelOperate from './runLeveloperate/index';
import SignalOperate from './signaloperate/index';
import TurnedOperate from './turnedoperate/index';
import FlankProtectOperate from './flankProtectOperate/index';
import DwellTimeOperate from './dwellTimeOperate/index';
import DestinationOperate from './destinationOperate/index';
export default {
name: 'DataRelation',
components: {
// RouteOperate,
RouteOperate,
RoutingOperate,
BigRoutingOperate
// AutomaticOperate,
BigRoutingOperate,
AutomaticOperate,
// RunLevelOperte,
// FlankProtectOperate
FlankProtectOperate,
// PathOperate,
// SignalOperate,
// TurnedOperate,
// DwellTimeOperate
SignalOperate,
TurnedOperate,
DwellTimeOperate
// DestinationOperate
},
props: {
@ -73,23 +73,45 @@ export default {
enabledTab: 'bigRoutingOperate',
oldDevice: null,
lazy: true,
tabList:[
// {label: this.$t('map.routeID'), name:'route', menus:RouteOperate},
tabList:[]
// tabList:[
// // {label: this.$t('map.routeID'), name:'route', menus:RouteOperate},
// {label: '', name:'turned', menus:TurnedOperate},
// {label: '', name:'destination', menus:DestinationOperate},
// {label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
// {label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate},
{label: '大铁进路', name:'bigRoutingOperate', menus:BigRoutingOperate},
// {label: '', name:'flankProtect', menus:FlankProtectOperate},
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate}
// {label: '', name:'dwellTime', menus:DwellTimeOperate},
// {label: '', name:'runLevel', menus:RunLevelOperate}
]
// // {label: '', name:'turned', menus:TurnedOperate},
// // {label: '', name:'destination', menus:DestinationOperate},
// // {label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
// // {label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate},
// {label: '', name:'bigRoutingOperate', menus:BigRoutingOperate},
// // {label: '', name:'flankProtect', menus:FlankProtectOperate},
// {label: this.$t('map.routing'), name:'routing', menus:RoutingOperate}
// // {label: '', name:'dwellTime', menus:DwellTimeOperate},
// // {label: '', name:'runLevel', menus:RunLevelOperate}
// ]
};
},
mounted() {
this.initLoad();
if (this.$route.query.lineCode == '15') {
this.tabList = [
{label: '大铁进路', name:'bigRoutingOperate', menus:BigRoutingOperate},
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate}
];
this.enabledTab = 'bigRoutingOperate';
} else {
this.tabList = [
{label: this.$t('map.routeID'), name:'route', menus:RouteOperate},
{label: '自动折返', name:'turned', menus:TurnedOperate},
{label: '目的地码', name:'destination', menus:DestinationOperate},
{label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
{label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate},
{label: '侧防', name:'flankProtect', menus:FlankProtectOperate},
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate},
{label: '停站时间', name:'dwellTime', menus:DwellTimeOperate},
{label: '设置运行等级', name:'runLevel', menus:RunLevelOperate}
// ]
];
this.enabledTab = 'route';
}
},
methods: {
showMap() {

View File

@ -378,6 +378,8 @@ export default {
message = message + ( index ? '、' : '' ) + '《' + item.name + '》';
});
this.$messageBox(message);
} else {
this.$message.success('一键校验地图数据通过!');
}
}).catch(e => {
this.loading = false;

View File

@ -0,0 +1,21 @@
<template>
<div>
{{}}
</div>
</template>
<script>
export default {
name:'DrawingMange',
data() {
return {
};
},
mounted() {
},
methods:{
}
};
</script>