Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2021-05-17 19:14:52 +08:00
commit a0df70f674
64 changed files with 5401 additions and 2083 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'
});
}

60
src/api/pdf.js Normal file
View File

@ -0,0 +1,60 @@
import request from '@/utils/request';
/** 创建 */
export function postUploadFile(data) {
return request({
url: `/api/file/basic`,
method: 'post',
data
});
}
// /** 复制一条文件基础信息 */
// export function copyUploadFile(id) {
// return request({
// url: `/api/file/basic/copy/${id}`,
// method: 'post'
// });
// }
// 查询
export function getUploadFile(params) {
return request({
url: `/api/file`,
method: 'get',
params: params
});
}
// 修改
export function putUploadFile(data) {
return request({
url: `/api/file/basic`,
method: 'put',
data
});
}
// 删除
export function deleteUploadFile(id) {
return request({
url: `/api/file/${id}`,
method: 'delete'
});
}
// 查询文件绑定信息
export function getFileBindInfo(fileId, mapId) {
return request({
url: `/api/file/binding/${fileId}/${mapId}`,
method: 'get'
});
}
/** 创建 */
export function bindUploadFile(data) {
return request({
url: `/api/file/binding`,
method: 'post',
data
});
}

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/file?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
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -353,13 +353,45 @@
</el-form-item>
</template>
<template v-else-if="checkFieldType(item, 'uploadPicture')">
<el-form-item v-show="item.show" :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<el-upload
class="upload-demo"
:action="item.action"
:on-success="item.onSuccess"
:http-request="item.uploadFile"
:on-change="item.onChange"
:limit="1"
:file-list="item.fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div> -->
</el-upload>
</el-form-item>
<!-- <el-form-item prop="imageUrl" /> -->
<!-- <picture-card
ref="upload"
v-model="fileList"
:action="action"
scope="file"
@disabled="onDisabled"
>
<div slot class="tips">请上传文件</div>
</picture-card> -->
</template>
</template>
</el-form>
</template>
<script>
// import PictureCard from '@/components/UploadFiles/picture-card';
export default {
name: 'DataForm',
components: {
// PictureCard
},
props: {
form: {
type: Object,

View File

@ -0,0 +1,136 @@
<template>
<div>
<el-upload
ref="upload"
list-type="picture-card"
:action="action"
:file-list="fileList"
:multiple="multiple"
:auto-upload="auto"
:limit="limit"
:http-request="uploadFile"
:on-change="onChange"
:on-remove="onRemove"
:on-exceed="onExceed"
:on-preview="pictureCardPreview"
>
<i class="el-icon-plus" />
<slot name="trigger" />
</el-upload>
<slot />
<el-dialog :visible.sync="dialogVisible" :modal="false">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
export default {
props: {
auto: {
type: Boolean,
default: false
},
multiple: {
type: Boolean,
default: false
},
action: {
type: String,
required: true
},
value: {
type: Array,
required: true
},
limit: {
type: Number,
default: 1
},
scope: {
type: String,
default: 'files'
},
extra: {
type: Object,
default() {
return {};
}
}
},
data() {
return {
fileList: [],
formData: '',
dialogVisible: false,
dialogImageUrl: ''
};
},
watch: {
value(val) {
this.fileList = val;
}
},
methods: {
onChange(file, fileList) {
this.fileList = fileList;
this.$emit('value', [...this.fileList]);
this.$emit('disabled', fileList.every(el => el.status == 'success'));
},
onRemove(file, fileList) {
this.fileList = fileList;
this.$emit('value', [...this.fileList]);
this.$emit('disabled', fileList.every(el => el.status == 'success'));
},
clearFiles() {
this.$refs.upload.clearFiles();
this.fileList = [];
this.$emit('value', [...this.fileList]);
this.$emit('disabled', true);
},
onExceed(files, fileLis) {
this.$message.info(`超出文件上传限制,限制${this.limit}个。`);
},
pictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
uploadFile(file) {
this.formData.append(this.scope, file.file);
},
submit(upload) {
return new Promise((resolve, reject) => {
if (this.fileList.length) {
var isUpload = this.fileList.every(file => file.status == 'ready');
var isLt100M = this.fileList.every(file => file.size / 1024 / 1024 < 100);
if (!isUpload) {
reject({message: '没有需要上传的文件'});
} else if (!isLt100M) {
reject({message: '请检查上传文件大小不能超过100MB!'});
} else {
this.formData = new FormData();
this.$refs.upload.submit();
Object.keys(this.extra).forEach(key => { this.formData.append(key, this.extra[key]); });
upload(this.action, this.formData)
.then(resp => { resolve(resp); })
.catch(error => { reject(error); });
}
} else {
resolve();
}
});
}
}
};
</script>
<style lang="scss" scoped>
/deep/ {
.el-upload-list--picture-card .el-upload-list__item {
margin: 0 6px 0 0 !important;
}
}
</style>

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,10 @@ export default {
designhomePage: '公共地图',
designUserPage: '个人地图',
newDesignUserPage: '地图绘制',
newDesignEditor: '编辑器',
newDesignEditorList: '图文列表',
newDesignDraftEditorList: '文章草稿',
uploadPdf: 'PDF上传',
mapManage: '地图管理',
skinManage: '皮肤管理',
@ -96,5 +100,6 @@ export default {
publishIBPManage:'发布IBP盘管理',
publishISCSManage:'发布ISCS管理',
voiceTraining: '语音训练',
mapGroup: '地图分组'
mapGroup: '地图分组',
drawingMange:'图纸管理'
};

View File

@ -30,8 +30,8 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
let scope = this;
this.dom = dom;
//定义相机
//定义当前课程角色
let nowRole = "";
//定义场景(渲染容器)
scene = new THREE.Scene();
@ -53,7 +53,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
animateManager.initAnimation(assetModelManager);
controlManager.init(animateManager.actions);
console.log(lessonData.lessonProgress[lessonIndex]);
if(lessonData.lessonProgress[lessonIndex].action.length>0){
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,assetModelManager.lessonTriggerList);
}
@ -75,12 +74,27 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
this.changeIndex = function(nowIndex){
lessonIndex = nowIndex;
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action);
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
controlManager.initRoleMode(true);
}else{
controlManager.initRoleMode(false);
}
}
this.changeCameraPos = function(pos){
controlManager.updatePos(pos);
}
this.initNowRole = function(role){
nowRole = role;
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
controlManager.initRoleMode(true);
}else{
controlManager.initRoleMode(false);
}
};
//循环渲染函数
function animate() {

View File

@ -13,12 +13,10 @@ export function AnimateManager() {
for(let k in assetModelManager.staticAsset){
if(assetModelManager.staticAsset[k].mesh.animations.length > 0){
console.log(assetModelManager.staticAsset[k].mesh.name);
let animations = assetModelManager.staticAsset[k].mesh.animations;
let mixer = new THREE.AnimationMixer( assetModelManager.staticAsset[k].mesh );
let actionName = assetModelManager.staticAsset[k].mesh.name;
console.log(actionName);
scope.actions[actionName] = {
status:"01",
action:mixer.clipAction( assetModelManager.staticAsset[k].mesh.animations[ 0 ])
@ -38,7 +36,6 @@ export function AnimateManager() {
for(let i=mixers.length-1;i>=0;i--){
if(mixers[i]._actions[0].isRunning()){
// console.log(scope.mixers[i]._actions[0].isRunning());
mixers[i].update( mixerUpdateDelta );
}
}

View File

@ -198,7 +198,6 @@ export function AssetModelManager(scene) {
function fbxpromise(asset){
return new Promise(function(resolve, reject){
var loader = new THREE.FBXLoader();
console.log(asset);
if(asset.assetType == "static"){
loader.load( asset.url, function ( object ) {
object.name = asset.modelId;
@ -210,7 +209,6 @@ export function AssetModelManager(scene) {
loader.load( BASE_ASSET_API+asset.url, function ( object ) {
asset.mesh = object;
if(asset.assetType == "default"){
console.log(object);
// scene.add(object);
}else if(asset.assetType == 'loadModel'){

View File

@ -14,6 +14,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
this.nowCamera = null;
this.eventHitMode = false;
let roleMode = false;
let eventBoxs = [];
let raycasterBoxs = [];
let actionList = [];
@ -110,6 +111,9 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
);
this.initRoleMode = function(rMode){
roleMode = rMode;
};
const worldOctree = new Octree();
@ -138,6 +142,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
const keyStates = {};
let clock = new THREE.Clock();
this.updateOrbitControl = function(){
oribitControl.update();
};
@ -151,7 +156,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
updateSpheres( deltaTime );
if(scope.eventHitMode == true){
if(scope.eventHitMode == true && roleMode){
if(eventBoxs.length>0){
attachBox.position.copy(fpsCamera.position);
for(let i=0;i<eventBoxs.length;i++){
@ -231,7 +236,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
fpsMouseStatus = true;
// document.body.requestPointerLock();
if(raycasterBoxs.length>0){
if(raycasterBoxs.length>0 && roleMode){
var mouse = new THREE.Vector2();
var raycaster = new THREE.Raycaster();
@ -479,7 +484,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
if(actions[i].actionMode == "play"){
for(let j=0;j<eventTrigger.length;j++){
if(eventTrigger[j].label == actions[i].actionModel){
console.log(actionList);
if(actionList[eventTrigger[j].actionName].status == "01"){
actionList[eventTrigger[j].actionName].status = "02";
@ -494,8 +498,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
for(let j=0;j<eventTrigger.length;j++){
if(eventTrigger[j].label == actions[i].actionModel){
let eventTestBox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3());
eventTestBox.setFromObject(eventTrigger[j]);

View File

@ -9,6 +9,10 @@ export function LessonData() {
this.lessonData = {
//资源列表
assetList:[],
setup:{
examMode:"",
checkedRole:"",
},
//场景交互物体列表
modelList:[],
//课程组件启用状态
@ -61,6 +65,8 @@ export function LessonData() {
tittle:"标题",
picurl:"url",
text:"内容",
explainPaneType:"null",
nextNode:"",
},
action:[],
};
@ -141,6 +147,8 @@ export function LessonData() {
tittle:"标题",
picurl:"url",
text:"内容",
explainPaneType:"null",
nextNode:"",
},
action:[

View File

@ -224,8 +224,8 @@ class SkinCode extends defaultStyle {
z:1,
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
insideOffset: { x: 0, y: 18 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -18 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色
},
// 扣车元素 普通扣车
@ -733,7 +733,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {};
this[deviceType.IndicatorLight] = {};
}
}

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

@ -48,9 +48,9 @@ class EEmergentRhombus extends Group {
this.hideMode();
}
setColor(color) {
setColor(color) {
this.emergent && this.emergent.setStyle('stroke', color);
}
}
setState(model) {
// 紧急停车

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

@ -316,6 +316,11 @@ export const menuOperate = {
// 站台紧急停车
operation: OperationEvent.StationStand.emergencyClose.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EMERGENCY_CLOSE
},
cancelEmergencyClose: {
// 取消站台紧急停车
operation: OperationEvent.StationStand.cancelEmergencyClose.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE
}
},
StationControl:{

View File

@ -0,0 +1,148 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="设备类型:">
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备名称:">
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
</el-form-item>
</el-form>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件"
width="400"
/>
<el-table-column
prop="name"
label="操作"
>
<template slot-scope="scope">
<div class="text-button" @click="openPdf(scope.row)">打开</div>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import { getUploadFile } from '@/api/pdf';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
dialogShow: false,
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
mapId: '',
deviceId: '',
deviceCode: '',
deviceName: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '图纸检索';
}
},
methods: {
doShow(selected) {
this.selected = selected;
this.form.deviceName = selected.name;
this.form.deviceType = selected._type;
const params = { mapId: this.$route.query.mapId, deviceType: selected._type.toUpperCase(), deviceId: selected.code };
this.loading = true;
getUploadFile(params).then(resp => {
this.tableData = resp.data;
this.loading = false;
}).catch(error => {
this.loading = false;
this.$message.error('图纸检索失败!');
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
openPdf(row) {
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
window.open(url, '_blank');
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -7,6 +7,7 @@
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" />
<draw-select ref="drawSelect" />
</div>
</template>
@ -21,9 +22,9 @@ import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import DrawSelect from './dialog/drawSelect';
export default {
name: 'SectionMenu',
@ -34,7 +35,8 @@ export default {
NoticeInfo,
TrainAddPlan,
SetFault,
LoadSpareTrain
LoadSpareTrain,
DrawSelect
},
props: {
selected: {
@ -49,6 +51,10 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '图纸调用',
handler: this.drawingCall
}
],
Center: [
// {
@ -119,7 +125,8 @@ export default {
initMenu() {
//
if (this.selected.type != '04') {
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
} else {
this.menu = [];
}
@ -128,6 +135,9 @@ export default {
this.menu = this.menuForce;
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -8,6 +8,7 @@
<route-hand-control ref="routeHandControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
<draw-select ref="drawSelect" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
</div>
</template>
@ -28,6 +29,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import DrawSelect from './dialog/drawSelect';
export default {
name: 'SignalMenu',
@ -40,7 +42,8 @@ export default {
RouteGuide,
NoticeInfo,
PasswordBox,
SetFault
SetFault,
DrawSelect
},
props: {
selected: {
@ -55,6 +58,10 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '图纸调用',
handler: this.drawingCall
}
// {
// label: '',
// handler: this.arrangementRoute,
@ -190,13 +197,16 @@ export default {
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -1,6 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<draw-select ref="drawSelect" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
@ -8,7 +9,7 @@
<script>
import PopMenu from '@/components/PopMenu';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import DrawSelect from './dialog/drawSelect';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
@ -22,7 +23,8 @@ export default {
components: {
PopMenu,
SetFault,
NoticeInfo
NoticeInfo,
DrawSelect
},
mixins: [
CancelMouseState
@ -41,24 +43,8 @@ export default {
menuNormal: {
Local: [
{
label: '系统结构图一前置图',
file: '01-系统结构图一前视图.pdf',
handler: this.handlerOpenPdf
},
{
label: '系统结构图二后视图',
file: '02-系统结构图二后视图.pdf',
handler: this.handlerOpenPdf
},
{
label: '系统供电示意图',
file: '03-系统供电示意图.pdf',
handler: this.handlerOpenPdf
},
{
label: '车站布线图',
file: '04-车站布线图.pdf',
handler: this.handlerOpenPdf
label: '图纸调用',
handler: this.drawingCall
}
],
Center: [
@ -114,6 +100,9 @@ export default {
this.menu = this.menuForce;
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -6,11 +6,13 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<draw-select ref="drawSelect" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import DrawSelect from './dialog/drawSelect';
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
@ -31,7 +33,8 @@ export default {
SwitchControl,
NoticeInfo,
SetFault,
SwitchHookLock
SwitchHookLock,
DrawSelect
},
mixins: [
CancelMouseState
@ -48,7 +51,12 @@ export default {
return {
menu: [],
menuNormal: {
Local: [],
Local: [
{
label: '图纸调用',
handler: this.drawingCall
}
],
Center: [
// {
// label: '',
@ -131,8 +139,8 @@ export default {
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
@ -147,6 +155,9 @@ export default {
}
},
drawingCall() {
this.$refs.drawSelect.doShow(this.selected);
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -149,6 +149,16 @@ export default {
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '站台紧急停车',
handler: this.emergencyClose,
cmdType: CMD.Stand.CMD_STAND_EMERGENCY_CLOSE
},
{
label: '取消站台紧急停车',
handler: this.cancelEmergencyClose,
cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
@ -306,6 +316,22 @@ export default {
}
});
},
//
emergencyClose() {
commitOperate(menuOperate.StationStand.emergencyClose, { standCode: this.selected.code }, 3).then(({valid, operate}) => {
}).catch(error=>{
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
cancelEmergencyClose() {
commitOperate(menuOperate.StationStand.cancelEmergencyClose, { standCode: this.selected.code }, 3).then(({valid, operate}) => {
}).catch(error=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}

View File

@ -66,7 +66,7 @@
<div style="height: 56px;width: 100%;background: #fff;overflow-y: scroll;text-align: left;">
<div class="speed-value-box" :style="{background: speedLimitValue===15? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(15)">15</div>
<div class="speed-value-box" :style="{background: speedLimitValue===25? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(25)">25</div>
<div class="speed-value-box" :style="{background: speedLimitValue===40? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(45)">45</div>
<div class="speed-value-box" :style="{background: speedLimitValue===45? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(45)">45</div>
<div class="speed-value-box" :style="{background: speedLimitValue===60? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(60)">60</div>
</div>
</div>
@ -76,10 +76,10 @@
<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('create')">车次号步进</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;">
@ -100,22 +100,42 @@
<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" :maxlength="7" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" :maxlength="7" 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" :maxlength="6" 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 handleSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</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 +220,10 @@ export default {
formModelTripNum: '',
formModelSectionName: '',
formModelNewTrip: '',
speedShowCon: false
formModelNewGroup: '',
speedShowCon: false,
trainOperateType: '',
formModelNewSection: ''
};
},
computed: {
@ -225,6 +248,23 @@ 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);
},
handleSectionList() {
const list = [];
this.sectionList.forEach(item => {
if ((item.type === '01' && !item.parentCode) || item.type === '04') {
list.push({label: item.name, value: item.code});
} else if (item.type === '02') {
const parentSection = this.$store.getters['map/getDeviceByCode'](item.parentCode) || {};
list.push({label: parentSection.name + item.name, value: item.code});
}
});
return list;
}
},
watch: {
@ -233,8 +273,7 @@ export default {
'01': 'Local', //
'02': 'Center' //
};
if (this.selected._type) {
if (this.selected._type && !this.trainOperationShow) {
const control = this.getStationControl(this.selected);
const type = State2SimulationMap[this.$store.state.training.prdType];
if (control.controlMode != type) {
@ -363,6 +402,9 @@ export default {
}
}
},
handleTrainOperate(type) {
this.trainOperateType = type;
},
getStationControl(selected) {
let control;
if (selected._type == 'StationStand') {
@ -641,15 +683,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 +777,21 @@ export default {
this.clearAllMenuShow();
},
handleTrainParam() {
if (this.selectedObj.type === '01') {
if (this.selectedObj.type === '02') {
const parentSection = this.$store.getters['map/getDeviceByCode'](this.selectedObj.parentCode);
this.formModelSectionName = parentSection.name + this.selectedObj.name;
} else {
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.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 +802,54 @@ export default {
this.formModelTripNum = '';
this.formModelSectionName = '';
this.formModelNewTrip = '';
this.formModelNewGroup = '';
this.trainOperateType = '';
this.trainOperationShow = flag;
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);
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

@ -56,6 +56,11 @@ export default {
handler: this.emergencyClose,
cmdType: CMD.Stand.CMD_STAND_EMERGENCY_CLOSE
},
{
label: '取消站台紧急停车',
handler: this.cancelEmergencyClose,
cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
@ -119,6 +124,14 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
cancelEmergencyClose() {
commitOperate(menuOperate.StationStand.cancelEmergencyClose, { standCode: this.selected.code }, 3).then(({valid, operate}) => {
}).catch(error=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -0,0 +1,259 @@
<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: []
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
},
...mapGetters('map', [
'bigScreenConfig'
]),
width() {
return this.$store.state.app.width - 40;
},
height() {
return this.$store.state.app.height - 60;
}
},
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"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" />
</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>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1);
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
</style>

View File

@ -8,7 +8,8 @@
<el-button style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
</el-row>
<el-row>
<input v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="isLogin||this.loginText == '登录'" @keyup.enter="validateData">
<span v-if="isLogin">{{ inputStr }}</span>
<input v-if="!isLogin" v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="this.loginText == '登录'" @keyup.enter="validateData">
</el-row>
</div>
</el-col>
@ -62,8 +63,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 +82,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 +170,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>
@ -144,13 +179,14 @@
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
import { TrainingMode } from '@/scripts/ConstDic';
// import { TrainingMode } from '@/scripts/ConstDic';
import voiceOpen from '@/assets/voiceOpen.png';
import voiceClose from '@/assets/voiceClose.png';
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 +195,8 @@ export default {
AlarmTableLow,
AlarmTableHmi,
TrainControl,
LogDetail
LogDetail,
RpsDialog
},
props: {
selected: {
@ -443,6 +480,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 +705,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" :maxlength="7" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" :maxlength="7" 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" :maxlength="6" 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 handleSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</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>
@ -189,6 +239,8 @@
<div class="station_buttonGroupL">
<div v-if="allowDetain" :id="setDetainTrainId" class="stationButton" @click="stationDetainTrain">此站扣车</div>
<div v-else class="stationButton disabled">此站扣车</div>
<div v-if="allowJump" :id="setJumpStopId" class="stationButton station_jumpTrain" @click="stationAllJumpTrain">连续扣车</div>
<div v-else class="stationButton station_jumpTrain disabled">连续扣车</div>
</div>
<div class="station_buttonGroupR">
<div v-if="allowCancle" :id="cancelTrainId" class="stationButton" @click="stationCancleTrain">取消设置</div>
@ -228,6 +280,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 +312,8 @@ export default {
oldDevice: null, //
canCommand: true,
cr1Confrim: false,
runPlanList: [],
newRunPlanId: '',
operate: '',
cmdType: '',
securityCommand: '',
@ -267,6 +323,7 @@ export default {
selectedObj: null,
oldClickObj: null, //
route: null, //
overlap: null, //
selectRouteList: [],
menuCmdList: new Array(15).fill({}),
ciStationParamList: [],
@ -285,11 +342,14 @@ export default {
commandInfo: {},
banIcon: BanIcon,
timer: null,
trainOperationShow: false,
operationType: 'cmd',
trainModel: {},
formModelTripNum: '',
formModelSectionName: '',
formModelNewTrip: '',
formModelNewGroup: '',
trainOperateType: '',
formModelNewSection: '',
dialogVisible: false,
tipList: [],
modeMatch: false,
@ -302,7 +362,13 @@ export default {
State2SimulationMap: {
'01': 'Local', //
'02': 'Center' //
}
},
strategyList: [ //
{ value: '01', label: '不折返' },
{ value: '02', label: '缺省折返' },
{ value: '03', label: '换端' },
{ value: '04', label: '自动折返' }
]
};
},
computed: {
@ -312,7 +378,11 @@ export default {
...mapGetters('map', [
'routeList',
'stationList',
'routeData'
'stationStandList',
'routeData',
'overlapList',
'overlapData',
'sectionList'
]),
commandId() {
return OperationEvent.Command.commandHaerbin.confirm.domId;
@ -349,11 +419,31 @@ 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);
},
handleSectionList() {
const list = [];
this.sectionList.forEach(item => {
if ((item.type === '01' && !item.parentCode) || item.type === '04') {
list.push({label: item.name, value: item.code});
} else if (item.type === '02') {
const parentSection = this.$store.getters['map/getDeviceByCode'](item.parentCode) || {};
list.push({label: parentSection.name + item.name, value: item.code});
}
});
return list;
}
},
watch: {
'$store.state.training.prdType': function (val) {
this.trainOperationShow = false;
this.operationType = 'cmd';
this.initMenus();
},
'$store.state.training.started':function (val) {
@ -435,6 +525,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,10 +548,21 @@ export default {
}
}
},
handleTrainOperate(type) {
this.trainOperateType = type;
},
initCentralizedStationList(list) {
const stationContorl = this.stationContorl;
this.menuCmdList = new Array(15).fill({});
list.forEach((el, index) => {
const lists = list.filter(el => {
if (el.isShow && this.selectedObj._type == 'Section' && !el.isShow(this.oldClickObj)) {
return false; // standTrack
} else if (el.isShow && this.selectedObj._type == 'Station' && el.isShow(this.selectedObj.ciStation)) {
return false;
}
return el;
});
lists.forEach((el, index) => {
if (el.disabledCb && stationContorl) {
el.disabled = el.disabledCb(stationContorl);
}
@ -508,7 +618,7 @@ export default {
}
break;
case 'Section':
if (this.trainOperationShow) {
if (this.operationType === 'train') {
this.handleTrainParam();
} else {
this.handleSectionMenu();
@ -526,6 +636,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 +694,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() { //
//
@ -713,7 +842,7 @@ export default {
this.handleSingalMenu();
}
},
checkConfirmParam() {
checkConfirmParam(row) {
this.param = {};
if (this.operate == OperationEvent.Signal.cancelTrainRoute.menuButton.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menuButton.operation) {
this.param = {
@ -770,6 +899,12 @@ export default {
};
});
}
if (this.cmdType == CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY) {
this.param = {
val: row.params ? row.params.val : ''
};
}
},
clickCommand(row) {
const step = {};
@ -783,11 +918,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) {
@ -806,7 +950,7 @@ export default {
step.param = this.param;
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.checkConfirmParam();
this.checkConfirmParam(row);
this.securityCommand = row.securityCommand || row.next;
} else if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -915,12 +1059,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 +1091,21 @@ export default {
this.allowDetain = true;
},
handleTrainParam() {
if (this.selectedObj.type === '01') {
if (this.selectedObj.type === '02') {
const parentSection = this.$store.getters['map/getDeviceByCode'](this.selectedObj.parentCode);
this.formModelSectionName = parentSection.name + this.selectedObj.name;
} else {
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.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 +1113,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 = {
@ -1028,7 +1196,7 @@ export default {
this.operate = row.operation;
step.operation = this.operate;
step.start = true;
step.param = {'standCode':this.selectedObj.code};
step.param = row.param || {'standCode':this.selectedObj.code};
this.cmdType = row.cmdType;
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
@ -1037,7 +1205,6 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
console.error(error);
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
} else {
@ -1063,11 +1230,24 @@ export default {
row.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
this.stationCommand(row);
},
stationAllJumpTrain() {
const list = this.stationStandList.filter(el => el.right == this.selectedObj.right);
const index = list.findIndex(el => el.code == this.selectedObj.code);
let lists = list.slice(0, index);
if (this.selectedObj.right) {
lists = list.slice(index + 1, 9999);
}
const row = {};
row.operation = OperationEvent.StationStand.setBulkBuckleTrain.menuButton.operation;
row.cmdType = CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL;
row.param = { 'standCodes': lists.map(el => el.code) };
this.stationCommand(row);
},
initMenus() {
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) },
@ -1106,13 +1286,31 @@ export default {
{ name: '解封岔芯', commandTip: '解封岔芯', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强解岔芯', commandTip: '强解岔芯', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
] : [
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '轨区消限', commandTip: '取消对轨道区段的限速', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强行消限', commandTip: '强行取消对轨道区段的限速', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强解区段', commandTip: '解锁进路中的轨道区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '预复位', commandTip: '预重置计轴区段', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.axlePreReset.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '轨区消限', commandTip: '取消对轨道区段的限速', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '强行消限', commandTip: '强行取消对轨道区段的限速', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '强解区段', commandTip: '解锁进路中的轨道区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '预复位', commandTip: '预重置计轴区段', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.axlePreReset.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '封锁区段', commandTip: '禁止通过该轨道区段排列进路', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封区段', commandTip: '允许通过该轨道区段排列进路', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
{ name: '解封区段', commandTip: '允许通过该轨道区段排列进路', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '上行不折返', commandTip: '上行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行不折返', commandTip: '下行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行缺省折返', commandTip: '上行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行缺省折返', commandTip: '下行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行换端', commandTip: '上行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行换端', commandTip: '下行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行自动折返', commandTip: '上行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行自动折返', commandTip: '下行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '车站发车', commandTip: '车站发车', cmdType: CMD.Section.CMD_STAND_EARLY_DEPART, operate: OperationEvent.Section.earlyDeparture.menuBtn, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '折返 DTO', commandTip: '折返 DTO', cmdType: CMD.Section.CMD_SECTION_1, operate: OperationEvent.Section.turnBackDTO.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '取消折返', commandTip: '取消折返', cmdType: CMD.Section.CMD_SECTION_2, operate: OperationEvent.Section.CancelTurnBack.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '自动折返', commandTip: '自动折返', cmdType: CMD.Section.CMD_SECTION_3, operate: OperationEvent.Section.AutoTurnBack.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '换上至下', commandTip: '换上至下', cmdType: CMD.Section.CMD_SECTION_4, operate: OperationEvent.Section.PutUpTheDown.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '换下至上', commandTip: '换下至上', cmdType: CMD.Section.CMD_SECTION_5, operate: OperationEvent.Section.PutDownTheUp.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '终止站停-上', commandTip: '上行终止站停', cmdType: CMD.Section.CMD_SECTION_6, operate: OperationEvent.Section.PutUpStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '终止站停-下', commandTip: '下行终止站停', cmdType: CMD.Section.CMD_SECTION_7, operate: OperationEvent.Section.PutDownStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && this.$store.state.training.prdType == '01' }
];
this.switchParamList = [
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch},
@ -1144,7 +1342,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,13 +1358,20 @@ 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' ? [
{ name: '关站信号', commandTip: '封锁车站所有信号机', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }
] : [
{ name: '关站信号', commandTip: '封锁车站所有信号机', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode) },
{ name: '关区信号', commandTip: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode), isShow: (ciStation) => !ciStation },
{ name: '自排全开', commandTip: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode), isShow: (ciStation) => !ciStation },
{ name: '自排全关', commandTip: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode), isShow: (ciStation) => !ciStation },
{ name: '追踪全开', commandTip: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode), isShow: (ciStation) => !ciStation },
{ name: '追踪全关', commandTip: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Center'].includes(stationControl.controlMode), isShow: (ciStation) => !ciStation },
{ name: '接收控制', commandTip: '接收控制权', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menuButton, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) },
{ name: '交出控制', commandTip: '交出控制权', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menuButton, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) }
];
@ -1451,13 +1656,19 @@ export default {
margin-top: 10px;
padding: 10px;
}
.station_updateStatus{}
.station_command{
float: right;
}
.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,13 @@ 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');
const UploadPdfList = () => import('@/views/uploadPdf/list');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -1122,7 +1129,15 @@ export const asyncRouter = [
meta: {
i18n: 'router.voiceTraining'
}
},
{
path: 'drawingMange',
component: DrawingMange,
meta: {
i18n: 'router.drawingMange'
}
}
// {
// path: 'deviceManage',
// component: DeviceManage,
@ -1132,6 +1147,54 @@ 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: '/uploading',
component: Layout,
meta: {
i18n: 'router.uploadPdf',
roles: [admin, user]
},
children: [
{
path: 'list',
component: UploadPdfList,
meta: {
i18n: 'router.uploadPdf'
}
}
]
},
{ // 新个人地图
path: '/design',
component: Layout,

View File

@ -15,6 +15,7 @@ import FaviconNty from '@/assets/icon/favicon_nty.png';
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
import FaviconCgy from '@/assets/icon/favicon_cgy.png';
import FaviconZzww from '@/assets/icon/favicon_zzww.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
import Link_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png';
@ -33,6 +34,16 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '013'
},
zzww: {
title: '共赢列车仿真驾驶系统',
loginPath: '/login?project=zzww',
loginParam: 'ZZWW',
loginTitle: '空串',
logoWidth: '140px',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
systemType: '011'
},
bjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/login?project=bjd',
@ -419,6 +430,7 @@ export const loginInfo = {
export const ProjectIcon = {
xty: FaviconXty,
zzww: FaviconZzww,
login: Favicon,
design: Favicon,
designxty: FaviconXty,
@ -462,6 +474,7 @@ export const ProjectCode = {
design: 'DEFAULT',
xty: 'XTY',
designxty: 'XTY',
zzww: 'ZZWW',
gzb: 'GZB',
designgzb: 'GZB',
heb: 'HEB',
@ -485,12 +498,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 +556,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: '设置保护'}
},
// 物理区段操作
@ -158,7 +160,26 @@ export default {
/** 轨道开放 */
CMD_SECTION_OPEN: {value: 'Section_Open', label: '轨道开放'},
/** 轨道关闭 */
CMD_SECTION_CLOSE: {value: 'Section_Close', label: '轨道关闭'}
CMD_SECTION_CLOSE: {value: 'Section_Close', label: '轨道关闭'},
/** 设置折返策略 */
CMD_STAND_SET_REENTRY_STRATEGY: {value:'Stand_Set_Reentry_Strategy', label: '设置折返策略'},
/** 提前发车 */
CMD_STAND_EARLY_DEPART: {value:'Stand_Early_Depart', label: '提前发车'},
/** 折返 DTO */
CMD_SECTION_1: {value: 'Section_1', label: '折返 DTO'},
/** 取消折返 */
CMD_SECTION_2: {value: 'Section_2', label: '取消折返'},
/** 自动折返 */
CMD_SECTION_3: {value: 'Section_3', label: '自动折返'},
/** 换上至下 */
CMD_SECTION_4: {value: 'Section_4', label: '换上至下'},
/** 换下至上 */
CMD_SECTION_5: {value: 'Section_5', label: '换下至上'},
/** 上行终止站停 */
CMD_SECTION_6: {value: 'Section_6', label: '上行终止站停'},
/** 下行终止站停 */
CMD_SECTION_7: {value: 'Section_7', label: '下行终止站停'}
},
// 站台
@ -214,7 +235,9 @@ export default {
/** 关闭站台 */
CMD_STAND_CLOSE: {value: 'Stand_Close', label: '关闭站台'},
/** 站台紧急停车 */
CMD_STAND_EMERGENCY_CLOSE : {value: 'Stand_Emergency_Close', label: '站台紧急停车'}
CMD_STAND_EMERGENCY_CLOSE : {value: 'Stand_Emergency_Close', label: '站台紧急停车'},
/** 取消站台紧急停车 */
CMD_STAND_CANCEL_EMERGENCY_CLOSE : {value: 'Stand_Cancel_Emergency_Close', label: '取消站台紧急停车'}
},
Station: {
@ -263,7 +286,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

@ -56,6 +56,10 @@ class CommandHandle {
Stand_Emergency_Close: {
operate: 'Stand_Emergency_Close',
paramList: [{name: 'standCode'}]
},
Stand_Cancel_Emergency_Close: {
operate: 'Stand_Cancel_Emergency_Close',
paramList: [{name: 'standCode'}]
}
}
};

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}'
}
}
},
@ -2096,6 +2102,104 @@ export const OperationEvent = {
operation: '415',
domId: '_Tips-Section-Load-Spare-Train'
}
},
menuButton: {
menuButton: {
operation: '416',
domId: '_Tips-Section-Load-Spare-Train'
}
},
// 折返 DTO
turnBackDTO: {
menuButton: {
operation: '417',
domId: '_Tips-Section-turn-Back-DTO-menu-Button'
}
},
// 取消折返
CancelTurnBack: {
menuButton: {
operation: '418',
domId: '_Tips-Section-Cancel-Turn-Back-menu-Button'
}
},
// 自动折返
AutoTurnBack: {
menuButton: {
operation: '419',
domId: '_Tips-Section-Auto-Turn-Back-menu-Button'
}
},
// 换上至下
PutUpTheDown: {
menuButton: {
operation: '420',
domId: '_Tips-Section-Put-Up-The-Down-menu-Button'
}
},
// 换下至上
PutDownTheUp: {
menuButton: {
operation: '421',
domId: '_Tips-Section-Put-Down-The-Up-menu-Button'
}
},
// 上行终止站停
PutUpStop: {
menuButton: {
operation: '422',
domId: '_Tips-Section-Put-Up-Stop-menu-Button'
}
},
// 下行终止站停
PutDownStop: {
menuButton: {
operation: '423',
domId: '_Tips-Section-Put-Down-Stop-menu-Button'
}
},
// 设置折返策略
setBackStrategy: {
// (南京二号线) 01 不折返 02 缺省折返 03 换端 04 自动折返
menuBtnUp01: {
operation: '4241',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-01'
},
menuBtnDown01: {
operation: '4242',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-01'
},
menuBtnUp02: {
operation: '4243',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-02'
},
menuBtnDown02: {
operation: '4244',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-02'
},
menuBtnUp03: {
operation: '4245',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-03'
},
menuBtnDown03: {
operation: '4246',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-03'
},
menuBtnUp04: {
operation: '4247',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-04'
},
menuBtnDown04: {
operation: '4248',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-04'
}
},
// (南京二号线) 站台轨提前发车
earlyDeparture: {
menuBtn: {
operation: '425',
domId: '_Tips-Section-EarlyDeparture-menuBtn'
}
}
},
@ -2409,6 +2513,10 @@ export const OperationEvent = {
choose: {
operation: '5151',
domId: '_Tips-Stand-setBulkBuckleTrain-Choose'
},
menuButton: {
operation: '5152',
domId: '_Tips-Stand-setBulkBuckleTrain-menuButton'
}
},
// 批量取消扣车
@ -2456,6 +2564,13 @@ export const OperationEvent = {
operation: '521',
domId: '_Tips-Stand-EmergencyClose-Menu'
}
},
// 取消站台紧急停车
cancelEmergencyClose: {
menu: {
operation: '522',
domId: '_Tips-Stand-CancelEmergencyClose-Menu'
}
}
},
@ -2761,6 +2876,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

@ -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

@ -169,6 +169,17 @@
<el-input v-model="selected.text" ></el-input>
</el-form-item>
<el-form-item label="提示功能:" v-if="selected.explainPaneType">
<el-select v-model="selected.explainPaneType" placeholder="请选择">
<el-option
v-for="explainType in explainPaneTypes"
:key="explainType.value"
:label="explainType.name"
:value="explainType.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="说明画面:" v-if="selected.picurl">
<el-input v-model="selected.picurl" ></el-input>
</el-form-item>
@ -295,6 +306,16 @@
],
jobDataList:[],
value:'',
explainPaneTypes:[
{
name:"无",
value:"null",
},
{
name:"跳转",
value:"jump",
}
],
}
},
computed: {

View File

@ -7,6 +7,34 @@
:lessonTools='lessonTools'
></LessonTools-Manager>
<div id="" class="lessonsetupdiv" v-show="showSetup">
<div style="text-align:center;top:10%;font-size:30px">课程内容设置</div>
<el-form ref="form" label-width="80px">
<el-form-item label="考试模式">
<el-switch
v-model="examMode"
active-text="开启考试模式"
inactive-text="关闭考试模式">
</el-switch>
</el-form-item>
<el-form-item label="可用角色">
<el-checkbox-group v-model="checkedRole">
<el-checkbox v-for="role in jobPaneData.dataList" :label="role.name" :key="role.name">{{role.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- <el-form-item label="课程简介">
<el-input type="textarea" v-model="form.desc"></el-input>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="onSubmit">修改完成</el-button>
<el-button @click="unSubmit" >关闭</el-button>
</el-form-item>
</el-form>
</div>
<div class="lesson3dedit">
<Step-Tips
:lessonData='lessonData'
@ -50,7 +78,6 @@
</Lesson-Progress>
<div class="lessonsetup" >
<el-row>
当前课程信息
</el-row>
@ -118,6 +145,9 @@
data() {
return {
jl3d: null,
showSetup:false,
examMode:false,
checkedRole:[],
netData:{
name:'',
type:'',
@ -186,9 +216,10 @@
if(data.data.data){
loadData = JSON.parse(data.data.data);
console.log(loadData);
this.checkedRole = loadData.setup.checkedRole;
this.examMode = loadData.setup.examMode;
this.jobPaneData.dataList = loadData.toolJobPane;
console.log(this.jobPaneData.dataList);
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
this.lessonTools = loadData.lessonTools;
@ -197,8 +228,7 @@
this.lessonData.initLessonProgress();
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
}
console.log("loaddata----------------");
console.log(loadData);
this.jl3d = new Lesson3dEditor(dom,loadData);
}).catch(() => {
});
@ -212,13 +242,15 @@
let assetModelData = this.jl3d.saveAssetModel();
saveData.assetList = assetModelData.assetList;
saveData.modelList = assetModelData.modelList;
saveData.setup.examMode = this.examMode;
saveData.setup.checkedRole = this.checkedRole;
this.netData.data = JSON.stringify(saveData);
// console.log();
updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => {
console.log(data);
}).catch(() => {
this.$message('保存成功');
}).catch(() => {
this.$message('保存失败');
});
},
addProgress(){
@ -245,6 +277,7 @@
},
setupclick(){
this.showSetup = true;
},
createModel(assetData,mousePos){
this.jl3d.createModelTrigger(assetData,mousePos);
@ -258,6 +291,13 @@
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: this.$route.query.lessonId} });
},
onSubmit() {
this.showSetup = false;
},
unSubmit(){
this.showSetup = false;
},
},
}
@ -318,4 +358,25 @@
.el-tabs__content{
position: absolute;
}
.lessonsetupdiv {
position: absolute;
width: 30%;
height: 40%;
top:30%;
left:35%;
background-color: #fff;
border-radius: 18px;
border:solid 2px #000;
z-index: 5;
}
.nextbuttondiv{
width:30px;
height:30px;
background-size: 100%;
position: absolute;
right:0;
bottom:0;
}
</style>

View File

@ -9,6 +9,11 @@
<div class="explainpanetext" >
{{lessonData.lessonData.lessonProgress[lessonEditIndex].explainPane.text}}
</div>
<div class="nextbuttondiv"
:style="{'background-image': 'url('+staticImg+'/lesson3d/nextbutton.png)'}"
v-if="lessonData.lessonData.lessonProgress[lessonEditIndex].explainPane.explainPaneType=='jump'"></div>
</div>
</template>
<script>
@ -26,6 +31,7 @@
data() {
return {
localStatic:BASE_ASSET_API,
staticImg:JL3D_LOCAL_STATIC,
}
},
computed: {
@ -61,6 +67,7 @@
border-radius:10px;
border:solid 2px #000;
background-color: #fff;
color:#000;
z-index:1;
}
.explainpanetittle{
@ -70,15 +77,28 @@
}
.explainpanepic{
height:65%;
position:relative;
width:90%;
left:5%;
height:45%;
border:solid 2px #000;
background-size: 100%;
}
.explainpanetext{
position:relative;
left:5%;
width:90%;
font-size: 14px;
// height:20%;
}
.nextbuttondiv{
width:30px;
height:30px;
background-size: 100%;
position: absolute;
right:0;
bottom:0;
}
</style>

View File

@ -2,6 +2,21 @@
<div id="lesson3ddiv" class="lesson3ddiv">
<div class="selectjobdiv"
:style="{'background-image': 'url('+staticImg+'/texture/bg.jpg)'}"
v-if="showSelectJob">
<div class="selectjobbuttondiv">
<div
class="selectjobimg"
v-for="(job,index) in selectJobList"
@click="selectJob(job)"
:style="{'background-image': 'url('+staticImg+'/lesson3d/mst.png)'}">
<!-- <div>{{job}}</div> -->
<div style="width:100%;position:absolute;bottom:0;font-size:30px;textAlign:center;">{{job}}</div>
</div>
</div>
</div>
<div class="lesson3dplayer">
<Step-Tips
:lessonData='lessonData'
@ -19,13 +34,16 @@
<Explain-Pane
:lessonData='lessonData'
:lessonPlayIndex='lessonPlayIndex'
v-show="lessonTools[2].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'">
:nowRole ='nowRole'
v-show="lessonTools[2].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'"
@jumpEvent="jumpEvent">
</Explain-Pane>
<Job-Pane
:jobPaneData='jobPaneData'
:lessonData='lessonData'
:lessonPlayIndex='lessonPlayIndex'
:nowRole='nowRole'
ref="jobpane"
v-show="lessonTools[3].isShow && lessonData.lessonData.lessonProgress[lessonPlayIndex].progressScene == 'standstation'">
</Job-Pane>
@ -62,6 +80,9 @@
import { JobPaneData } from '@/jlmap3d/lesson3d/toolsmodel/jobpanedata.js';
import { getLesson3dData,updateLesson3dData } from '@/api/jmap/lesson3d';
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
export default {
name: 'Lesson3dPlayer',
components: {
@ -76,6 +97,10 @@
},
data() {
return {
staticImg:JL3D_LOCAL_STATIC,
showSelectJob:true,
selectJobList:[],
nowRole:"",
jl3d: null,
netData:{
name:'',
@ -146,7 +171,7 @@
let loadData;
if(data.data.data){
loadData = JSON.parse(data.data.data);
this.selectJobList = loadData.setup.checkedRole;
this.jobPaneData.dataList = loadData.toolJobPane;
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
@ -163,6 +188,17 @@
}).catch(() => {
});
},
selectJob(job){
this.showSelectJob = false;
for(let i=0;i<this.jobPaneData.dataList.length;i++){
if(job == this.jobPaneData.dataList[i].name){
this.nowRole = this.jobPaneData.dataList[i].value;
console.log(this.nowRole);
this.jl3d.initNowRole(this.nowRole);
}
}
},
startLesson(){
this.$refs.processlog.startLog();
},
@ -190,6 +226,9 @@
if(type == "tools"){
this.lessonPlayIndex = action.nextNode;
}
if(type == "jump"){
this.lessonPlayIndex = action.nextNode;
}
console.log(type);
console.log(action);
this.jl3d.changeIndex(this.lessonPlayIndex);
@ -219,6 +258,40 @@
touch-action: none;
}
.selectjobdiv{
width:100%;
height:100%;
position: absolute;
z-index: 5;
background-size: 100%;
}
.selectjobimg{
width:250px;
height:250px;
background-size: 100%;
// float:left;
display: inline-block;
position:relative;
}
.selectjobbuttondiv{
position:absolute;
width:80%;
height:30%;
left:10%;
top:35%;
overflow-x:scroll;
overflow-y:hidden;
text-align: center;
}
.selectjobbackdiv{
}
.lesson3ddiv {
width: 100%;
@ -266,4 +339,5 @@
.el-tabs__content{
position: absolute;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="explainpanediv"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
@click="selectTool"
:style="{'background-image': 'url('+lessonbg+')'}">
<div class="explainpanetittle" >
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.tittle}}
@ -12,6 +12,10 @@
<div class="explainpanetext" >
{{lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text}}
</div>
<div class="nextbuttondiv"
:style="{'background-image': 'url('+staticImg+'/lesson3d/nextbutton.png)'}"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.explainPaneType=='jump' "
@click="explainJump"></div>
</div>
</template>
<script>
@ -22,13 +26,14 @@
export default {
name: 'ExplainPane',
props:['lessonData','lessonPlayIndex'],
props:['lessonData','lessonPlayIndex','nowRole'],
components: {
},
data() {
return {
localStatic:BASE_ASSET_API,
staticImg:JL3D_LOCAL_STATIC,
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
}
},
@ -45,8 +50,13 @@
},
methods: {
selectTool(){
lesson3dSelect('toolproperty','explainpane');
// selectTool(){
// lesson3dSelect('toolproperty','explainpane');
// },
explainJump(){
if(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane.explainPaneType == "jump"){
this.$emit('jumpEvent','jump',this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].explainPane);
}
},
},
@ -77,7 +87,7 @@
position:relative;
width:90%;
left:5%;
height:65%;
height:45%;
border:solid 2px #000;
background-size: 100%;
}
@ -90,5 +100,13 @@
// height:20%;
}
.nextbuttondiv{
width:30px;
height:30px;
background-size: 100%;
position: absolute;
right:0;
bottom:0;
}
</style>

View File

@ -48,7 +48,7 @@
//
export default {
name: 'JobPane',
props:['jobPaneData','lessonData','lessonPlayIndex'],
props:['jobPaneData','lessonData','lessonPlayIndex','nowRole'],
components: {
@ -98,7 +98,8 @@
console.log(selectTool);
let nowProgress = this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex];
console.log(nowProgress.id);
if(selectTool.sceneId == nowProgress.id){
console.log(this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex]);
if(selectTool.sceneId == nowProgress.id && this.lessonData.lessonData.lessonProgress[this.lessonPlayIndex].roleName == this.nowRole){
jumpEvent("tools",selectTool);
}
// console.log(this.lessonData.lessonProgress[this.lessonPlayIndex]);

View File

@ -189,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);
}
this.$jlmap.setCenter(deviceId);
if (this.try != '0') {
this.loadInitData();
}

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

@ -32,6 +32,21 @@
/>
</el-select>
</div>
<div v-else-if="scope.row.type === 'multiple'">
<div v-if="!scope.row.focus" style="width: 100%;cursor: pointer;height: 20px;" @click="changeFocus(scope.row, '1')">
<template v-for="(item, i) in scope.row.configValue">
<el-tag :key="i" size="mini">{{ getMultipleName(item, scope.row.options) }}</el-tag>
</template>
</div>
<el-select v-if="scope.row.focus" v-model="scope.row.configValue" size="mini" multiple placeholder="请选择">
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="描述" />
@ -48,6 +63,7 @@
<script>
import { saveMap, generateCI } from '@/api/jmap/mapdraft';
import { mapGetters } from 'vuex';
export default {
name: 'Config',
components: {
@ -70,34 +86,15 @@ export default {
falseValue: false,
id: '',
height: 800,
// initData: {
// upRight: false,
// signalApproachOnlyOne: false,
// signalApproachOnlyNpSwitch: false,
// routeNameUseEndOppositeSignalName: false,
// generateTbRoute: false,
// tbRouteNameUseEndOppositeSignalName: false,
// routeSignalAlwaysGreen: false,
// routeApartByOverlap: false,
// overlapOnlySwitch: false,
// overlapSwitchNpOnly: false,
// overlapSignalOppositeSwitchNpOnly: false,
// overlapOnlyOneSwitch: false,
// generateCycle: false,
// routeButton: false,
// likeHa1: false,
// getNearlySignal: false,
// overlapSettingByTrigger: false,
// generateFls:false,
// signalApproachNotPassPreSignal:false,
// overlapReleaseTime: 45,
// routeReleaseTime: 60
// },
roadData: [],
focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls', 'signalApproachNotPassPreSignal'],
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch',
'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls', 'signalApproachNotPassPreSignal',
'generateDestination'
],
multipleList: ['sharingECStations'],
selectList: [],
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
optionsMap: {
@ -126,14 +123,25 @@ export default {
getNearlySignal: '生成进路信号按钮,进路信号按钮是否取最近的一个信号机',
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立',
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔',
signalApproachNotPassPreSignal:'信号机接近区段不跨过前方同向信号机'
signalApproachNotPassPreSignal:'信号机接近区段不跨过前方同向信号机',
generateDestination: '是否生成目的地码定义(泰雷兹)',
sharingECStations: '共享紧急关闭效果的车站'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
mounted() {
},
methods: {
async show() {
this.optionsMap.sharingECStations = [];
this.stationList.forEach(item => {
this.optionsMap.sharingECStations.push({ value: item.code, label: item.name });
});
this.dialogVisible = true;
this.height = document.documentElement.clientHeight - 180;
const map = this.$store.state.map.map;
@ -146,6 +154,12 @@ export default {
this.$set(row, 'focus', true);
}
},
getMultipleName(value, options) {
const obj = options.find(item => {
return item.value === value;
});
return (obj || {}).label;
},
async getList(data) {
try {
if (data) {
@ -161,6 +175,9 @@ export default {
options = this.optionsMap[key];
} else if (this.numberList.indexOf(key) >= 0) {
type = 'number';
} else if (this.multipleList.indexOf(key) >= 0) {
type = 'multiple';
options = this.optionsMap[key];
} else {
type = 'input';
}

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

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

View File

@ -0,0 +1,100 @@
<template>
<div>
<el-dialog v-dialogDrag :title="'['+fileName+'] 绑定地图数据'" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center class="uploadDialog">
<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>
<bind-map-info ref="bindMapInfo" :map-list="mapList" @reloadTable="reloadTable" />
</div>
</template>
<script>
import { getPublishMapList } from '@/api/jmap/map';
import { getFileBindInfo } from '@/api/pdf';
import BindMapInfo from './bindMapInfo';
export default {
name:'BindMap',
components:{
BindMapInfo
},
data() {
return {
mapList:[],
fileId:'',
fileName:'',
dialogVisible: false,
formModel: {
mapId:''
}
};
},
computed:{
form() {
const form = {
labelWidth: '120px',
items: [
{ prop: 'mapId', label: '选择线路:', type:'select', options: this.mapList, optionValue:'id', optionLabel:'name' }
// change: true, onChange: this.handleMap
]
};
return form;
},
rules() {
const crules = {
mapId: [
{ required: true, message: ' 地图不能为空', trigger: 'blur'},
{ required: true, message: ' 地图不能为空', trigger: 'change'}
]
};
return crules;
}
},
created() {
const params = {
pageSize: 9999,
pageNum: 1
};
getPublishMapList(params).then(res => {
this.mapList = res.data.list || [];
});
},
methods:{
doShow(data) {
this.fileId = data.id;
this.fileName = data.fileName;
this.dialogVisible = true;
},
handleClose() {
this.formModel = {
mapId: ''
};
this.$refs.dataform.resetForm();
this.dialogVisible = false;
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
if (self.fileId) {
getFileBindInfo(self.fileId, self.formModel.mapId).then((res) => {
let data = null;
if (res.data) {
data = res.data;
}
this.$refs.bindMapInfo.doShow(self.formModel.mapId, self.fileId, data, self.fileName);
}).catch(error => {
console.log(error);
// self.$message.error(`PDF:${error.message}`);
});
}
});
},
reloadTable() {
this.handleClose();
this.$emit('reloadTable');
}
}
};
</script>

View File

@ -0,0 +1,211 @@
<template>
<el-dialog
:title="'['+fileName+'] 绑定地图数据'"
:visible.sync="dialogShow"
custom-class="content-route"
width="100%"
:fullscreen="true"
top="0px"
:before-close="close"
:append-to-body="true"
>
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<div>
<el-form
ref="dataForm"
:model="formModel"
size="small"
style="padding: 6px 20px 6px 20px;overflow: hidden;"
label-width="130px"
>
<el-form-item label="地图名称" style="margin-bottom: 0;float: left; width: 300px;">
<el-select v-model="formModel.mapId" placeholder="请选择" clearable filterable style="width: 240px;" disabled>
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="设备类型" style="margin-bottom: 0;float: left; width:350px;margin-top:20px">
<el-select v-model="formModel.deviceTypes" placeholder="请选择" filterable clearable multiple style="width: 240px;">
<el-option
v-for="item in deviceTypeList"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="设备id" style="margin-bottom: 0;float: left; width:350px;margin-top:20px">
<el-tag
v-for="tag in formModel.deviceIds"
:key="tag"
closable
:disable-transitions="false"
class="eachTag"
@close="handleClose(tag)"
>
{{ getDeviceName(tag) }}
</el-tag>
<el-button
:type=" field === 'selectDevice' ? 'danger' : 'primary'"
@click="hover('selectDevice')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
</el-form>
<el-button style="margin-left: 190px;margin-top: 30px; " type="primary" size="medium" @click="create">创建</el-button>
</div>
</el-dialog>
</template>
<script>
import { loadMapDataById } from '@/utils/loaddata';
import { bindUploadFile } from '@/api/pdf';
import JlmapVisual from '@/views/newMap/jlmapNew/index';
export default {
name:'BindMapInfo',
components: {
JlmapVisual
},
props:{
mapList:{
type:Array,
required:true
}
},
data() {
return {
dialogShow:false,
mapId:null,
fileName:'',
loadingMap:false,
field:'',
formModel:{
fileId:'',
mapId:'',
deviceTypes:[],
deviceIds:[]
},
deviceTypeList: [
{ label: '区段', value: 'sectionList', code: 'SECTION' },
{ label: '道岔', value: 'switchList', code: 'SWITCH' },
{ label: '信号机', value: 'signalList', code: 'SIGNAL' },
{ label: '车站', value: 'stationList', code: 'STATION' },
{ label: '站台', value: 'stationStandList', code: 'STAND' },
{ label: '屏蔽门', value: 'psdList', code: 'PSD' },
{ label: '列车', value: 'trainList', code: 'TRAIN' }
]
};
},
watch: {
'$store.state.app.width': function(val) {
this.setWindowSize();
},
'$store.state.app.windowSizeCount': function() {
this.setWindowSize();
}
},
methods:{
doShow(mapId, fileId, data, fileName) {
if (data) {
this.formModel.deviceTypes = data.deviceTypes;
this.formModel.deviceIds = data.deviceIds || [];
}
this.fileName = fileName;
this.formModel.mapId = mapId;
this.formModel.fileId = fileId;
this.setWindowSize();
this.mapId = mapId;
this.dialogShow = true;
this.loadInitPage();
},
close() {
this.formModel = {
fileId:'',
mapId:'',
deviceTypes:[],
deviceIds:[]
};
this.dialogShow = false;
},
onContextmenu() {
},
handleClose(tag) {
this.formModel.deviceIds.splice(this.formModel.deviceIds.indexOf(tag), 1);
},
hover(field) {
this.field = field === this.field ? '' : field;
},
clickEvent(em) {
if (this.field.toUpperCase() === 'selectDevice'.toUpperCase()) {
const device = this.getDeviceByEm(em);
this.formModel.deviceIds.push(device.code);
}
},
//
getDeviceByEm(em) {
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
if (device) {
device._viewVal = em.val;
}
return device;
},
getDeviceName(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return device ? device.name + '(' + device.code + ')' : '';
},
loadInitPage() {
this.mapId && loadMapDataById(this.mapId, 'preview');
},
setWindowSize() {
this.$nextTick(() => {
let width;
if (this.type == 'generateRouting') {
width = this.$store.state.app.width - 500;
} else {
width = this.$store.state.app.width * 0.7;
}
const height = this.$store.state.app.height - 49;
this.$store.dispatch('config/resize', { width, height });
});
},
create() {
this.$refs.dataForm.validate((valid) => {
if (valid) {
const data = {
fileId:this.formModel.fileId,
mapId:this.formModel.mapId,
deviceTypes:this.formModel.deviceTypes,
deviceIds:this.formModel.deviceIds
};
bindUploadFile(data).then((res) => {
this.$message.success('绑定成功');
this.close();
this.$emit('reloadTable');
}).catch(error => {
console.log(error);
this.$message.error(`绑定失败:${error.message}`);
});
} else {
return false;
}
});
}
}
};
</script>
<style lang="scss">
.content-route .el-dialog__body {
padding: 0 !important;
overflow: hidden !important;
height:100%
}
.el-dialog.is-fullscreen.content-route{
display: flex;
flex-direction: column;
}
.eachTag{margin-left:10px;margin-top:10px}
</style>

View File

@ -0,0 +1,236 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center class="uploadDialog">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<div class="fileError">{{ message }}</div>
<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 { postUploadFile, putUploadFile } from '@/api/pdf';
// import { getPublishMapDetailById, getPublishMapVersionById } from '@/api/jmap/map';
// import { dbReadData, dbAddData, dbUpdateData } from '@/utils/indexedDb';
// uploadFile
import { meansUrl } from '@/api/upload';
export default {
name: 'TrainingDetailEdit',
props: {
type: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formModel: {
upload: '',
filePath: '',
fileType: 'DRAWING',
fileName:''
},
fileList: [],
formData: '',
id: '',
message:''
// deviceTypeList: [
// { label: '', value: 'sectionList', code: 'SECTION' },
// { label: '', value: 'switchList', code: 'SWITCH' },
// { label: '', value: 'signalList', code: 'SIGNAL' },
// { label: '', value: 'stationList', code: 'STATION' },
// { label: '', value: 'stationStandList', code: 'STAND' },
// { label: '', value: 'psdList', code: 'PSD' },
// { label: '', value: 'trainList', code: 'TRAIN' }
// ],
};
},
computed: {
action() {
return `${process.env.VUE_APP_UPLOAD_API}${meansUrl}`;
},
form() {
const form = {
labelWidth: '120px',
items: [
// { prop: 'mapId', label: '线:', type:'select', options: this.mapList, optionValue:'id', optionLabel:'name', change: true, onChange: this.handleMap },
// { prop: 'deviceTypes', label: ':', type:'select', options: this.deviceTypeList, optionValue:'value', optionLabel:'label', change: true, onChange: this.handleDevice },
// { prop: 'deviceIds', label: ':', type:'select', multiple: true, options: this.deviceCodesList, optionValue:'code', optionLabel:'name' },
{ prop: 'fileName', label: '文件名:', type:'text', show:true, rightWidth:true, required:true },
{ prop: 'upload', label: '上传:', type:'uploadPicture', fileList: this.fileList, show: this.type == 'ADD', action: this.action, onChange: this.onChange, onSuccess: this.onSuccess }
]
};
return form;
},
rules() {
const crules = {
fileName: [
{ required: true, message: '文件名不能为空', trigger: 'blur'}
]
// upload: [
// { required: true, message: '', trigger: 'onChange' }
// ]
};
return crules;
},
title() {
if (this.type === 'ADD') {
return '上传PDF';
} else {
return '更新PDF';
}
}
},
methods: {
async show(data) {
this.dialogVisible = true;
if (this.type != 'ADD') {
this.id = data.id;
this.formModel = {
upload: '',
fileName:data.fileName,
filePath: data.filePath
};
} else {
this.formModel = {
upload: '',
filePath: '',
fileName:''
};
}
},
// async handleMap(mapId) {
// if (mapId) {
// if (mapId != this.rowData.mapId) {
// this.formModel.deviceIds = [];
// this.formModel.deviceTypes = '';
// }
// return new Promise(async (resolve, reject) => {
// const resp = await getPublishMapVersionById(mapId);
// const version = resp.data;
// dbReadData('mapData', mapId, version, async (mapData, version) =>{
// if (mapData && mapData.version == version) {
// this.graphDataNew = mapData.graphDataNew;
// resolve();
// } else if (mapData) {
// const res = await getPublishMapDetailById(mapId);
// this.graphDataNew = res.data.graphDataNew;
// dbUpdateData('mapData', res.data);
// resolve();
// } else {
// const res = await getPublishMapDetailById(mapId);
// this.graphDataNew = res.data.graphDataNew;
// dbAddData('mapData', res.data);
// resolve();
// }
// });
// });
// } else {
// this.formModel.deviceIds = [];
// this.formModel.mapId = '';
// this.formModel.deviceTypes = '';
// }
// },
// handleDevice(type) {
// if (type) {
// if (type != this.rowData.deviceTypes) {
// this.formModel.deviceIds = [];
// }
// this.deviceCodesList = this.graphDataNew[type].map(el => {
// return {
// code: el.code,
// name: `${el.name}(${el.code})`
// };
// });
// } else {
// this.formModel.deviceIds = [];
// }
// },
// uploadFile(file) {
// this.formData.append('file', file.file);
// },
onSuccess(res, file) {
this.formModel.filePath = res.data;
this.message = '';
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
if (self.type == 'ADD') {
if (this.formModel.filePath) {
self.create();
} else {
this.message = '请上传文件';
return false;
}
} else {
self.update();
}
});
},
create() {
const self = this;
const data = {
fileType: 'DRAWING',
filePath: this.formModel.filePath,
fileName:this.formModel.fileName
};
postUploadFile(data).then((res) => {
self.$message.success('上传PDF成功!');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
console.log(error);
self.$message.error(`上传PDF失败:${error.message}`);
});
},
update() {
const self = this;
const data = {
id: this.id,
fileType: 'DRAWING',
fileName:this.formModel.fileName,
filePath: this.formModel.filePath
};
putUploadFile(data).then(() => {
self.$message.success('更新PDF成功!');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`更新PDF失败:${error.message}`);
});
},
handleClose() {
this.message = '';
this.formModel = {
upload: '',
filePath: '',
fileName:''
};
this.$refs.dataform.resetForm();
this.dialogVisible = false;
}
}
};
</script>
<style lang="scss" scoped>
.uploadDialog{
/deep/ {
.el-select--medium{
width: 300px;
}
}
}
.fileError{
color: red;
font-size: 13px;
margin-left: 122px;
vertical-align: top;
display: inline-block;
margin-top: -10px;
}
</style>

View File

@ -0,0 +1,222 @@
<template>
<div>
<!-- <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> -->
<el-card>
<el-form
ref="queryForm"
size="small"
style="padding: 6px 20px 6px 20px;overflow: hidden;"
>
<!-- <el-form-item label="地图" style="margin-bottom: 0;float: left; width: 300px;">
<el-select v-model="formModel.mapId" placeholder="请选择" clearable filterable style="width: 240px;" @change="handleMap">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="设备类型" style="margin-bottom: 0;float: left; width:350px;">
<el-select v-model="formModel.deviceType" placeholder="请选择" filterable clearable style="width: 240px;" @change="handleDevice">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="设备id" style="margin-bottom: 0;float: left; width: 300px;">
<el-select v-model="formModel.deviceId" placeholder="请选择" filterable clearable style="width: 200px;">
<el-option
v-for="item in deviceIdList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</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">
<span>{{ getMapName(scope.row.mapId) }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="类型">
<template slot-scope="scope">
<span>{{ scope.row.deviceTypes }}</span>
</template>
</el-table-column>
<el-table-column label="设备">
<template slot-scope="scope">
<el-tag v-for="(item, index) in scope.row.deviceIds" :key="index" class="deviceIdTag">{{ item }}</el-tag>
</template>
</el-table-column> -->
<el-table-column label="pdf名称" prop="fileName" />
<el-table-column label="路径" prop="filePath" />
<el-table-column label="时间" prop="createTime" />
<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" type="primary" @click="handleBind(scope.$index, scope.row)">绑定</el-button>
<el-button size="mini" type="success" @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" />
<Bind-Map ref="bindMap" @reloadTable="reloadTable" />
</div>
</template>
<script>
// import { getPublishMapDetailById, getPublishMapVersionById } from '@/api/jmap/map';
import { getUploadFile, deleteUploadFile } from '@/api/pdf';
// import { dbReadData, dbAddData, dbUpdateData } from '@/utils/indexedDb';
import Edit from './edit';
import BindMap from './bindMap';
export default {
name: 'CacheControl',
components: {
Edit,
BindMap
},
data() {
return {
tableData: [],
// formModel: {
// mapId: '',
// deviceType:'',
// deviceId:''
// },
// mapList: [],
// graphDataNew:null,
deviceIdList:[]
};
},
created() {
this.query();
// getPublishMapList(params).then(res => {
// // this.mapList = res.data.list.filter(el => !el.project );
// this.mapList = res.data.list || [];
// // if (this.mapList.length > 0) { this.formModel.mapId = this.mapList[0].id; this.handleMap(this.formModel.mapId); }
// });
},
methods: {
query() {
this.reloadTable();
},
// getMapName(val) {
// if (this && this.mapList.length) {
// const data = this.mapList.find(el => el.id == val);
// return data.name;
// }
// return val;
// },
createTitle() {
this.$refs.edits.show();
},
// //
// handleEdit(row, data) {
// this.$router.push({path : '/editor', query: {docId: data.id, draft: 1}});
// },
//
handleUpdate(index, 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}`);
// });
// },
handleBind(index, data) {
this.$refs.bindMap.doShow(data);
},
handleDelete(index, data) {
this.$confirm('是否确认删除?', this.$t('tip.hint'), {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteUploadFile(data.id).then(res => {
this.$message.success('删除pdf成功!');
this.reloadTable();
}).catch(error => {
this.$message.error(`删除失败: ${error.data}`);
});
}).catch(() => {});
},
reloadTable() {
this.tableData = [];
getUploadFile({}).then(res => {
this.tableData = res.data;
// this.tableData.forEach(each=>{
// const deviceTypeName = this.deviceTypeList.find(type=>{ return type.code == each.deviceTypes[0]; }) || {label:''};
// each.deviceTypes = deviceTypeName.label;
// });
}).catch(error => {
console.log(error);
});
}
// handleMap(mapId) {
// this.deviceIdList = [];
// this.formModel.deviceId = '';
// this.formModel.deviceType = '';
// return new Promise(async (resolve, reject) => {
// const resp = await getPublishMapVersionById(mapId);
// const version = resp.data;
// dbReadData('mapData', mapId, version, async (mapData, version) =>{
// if (mapData && mapData.version == version) {
// this.graphDataNew = mapData.graphDataNew;
// resolve();
// } else if (mapData) {
// const res = await getPublishMapDetailById(mapId);
// this.graphDataNew = res.data.graphDataNew;
// dbUpdateData('mapData', res.data);
// resolve();
// } else {
// const res = await getPublishMapDetailById(mapId);
// this.graphDataNew = res.data.graphDataNew;
// dbAddData('mapData', res.data);
// resolve();
// }
// });
// });
// },
// handleDevice(type) {
// if (type) {
// const data = this.graphDataNew[type];
// if (data && data.length > 0) {
// this.deviceIdList = this.graphDataNew[type].map(el => {
// return {
// code: el.code,
// name: `${el.name}(${el.code})`
// };
// });
// } else {
// this.deviceIdList = [];
// }
// } else {
// this.formModel.deviceId = '';
// this.deviceIdList = [];
// }
// }
}
};
</script>
<style lang="scss" scoped>
.deviceIdTag{margin-right:5px;}
</style>

File diff suppressed because it is too large Load Diff

BIN
static/lesson3d/mst.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB