This commit is contained in:
sunzhenyu 2020-09-30 18:06:28 +08:00
commit 2ea728751f
57 changed files with 2128 additions and 589 deletions

View File

@ -4,19 +4,22 @@ pipeline {
label 'master'
}
}
stages {
stage('Package') {
tools {
nodejs 'nodejs-10'
}
steps {
sh 'npm update'
sh 'npm install'
sh 'npm run build'
}
}
stage('Publish') {
steps {
sh 'mkdir -p /usr/local/joylink/jlclient'
sh 'rm -rf /usr/local/joylink/jlclient/*'
sh 'cp -rf ./dist/* /usr/local/joylink/jlclient'
}
}

View File

@ -4,20 +4,23 @@ pipeline {
label 'master'
}
}
stages {
stage('Package') {
tools {
nodejs 'nodejs-10'
}
steps {
sh 'npm update'
sh 'npm install'
sh 'npm run test'
}
}
stage('Publish') {
steps {
sh 'cp -rf ./dist/* /usr/local/joylink/jlclient'
sh 'mkdir -p /usr/local/joylink/jlclient'
sh 'rm -rf /usr/local/joylink/jlclient/*'
sh 'cp -rf ./dist/* /usr/local/joylink/jlclient'
}
}
}

View File

@ -77,7 +77,7 @@
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "2.6.11"
"vue-template-compiler": "^2.6.11"
},
"engines": {
"node": ">=8.9",

View File

@ -8,8 +8,8 @@
<!-- cdn.bootcss.com替换成cdnjs.cloudflare.com/ajax/libs -->
<title><%= webpackConfig.name %></title>
<script src="/static/inflate.min.js"></script>
<script src="/static/three.min.js"></script>
<script src="/cbtc/static/inflate.min.js"></script>
<script src="/cbtc/static/three.min.js"></script>
<!--<% if (process.env.VUE_APP_PRO !== 'local') { %>-->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">-->
<!--<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">-->

View File

@ -30,15 +30,6 @@ export function participantCreatTrainingRoom(id, data) {
});
}
/** 分页获取地图下的实操列表 */
export function getQuestionListByMapId(params) {
return request({
url: `/api/v1/competitionPractical`,
method: 'get',
params
});
}
// 加载试卷
export function loadingPaper(competitionId, data) {
return request({
@ -239,6 +230,9 @@ export function getTheroyCompetitionResult(competitionId, raceUserId) {
method: 'get'
});
}
// 以下drts项目使用
/** 项目获取试题列表 */
export function getItemListByProjectCode(projectCode, params) {
return request({
@ -247,14 +241,6 @@ export function getItemListByProjectCode(projectCode, params) {
params
});
}
/** 项目提交试卷 */
export function commitProjectTestPaper(projectCode, data, mode) {
return request({
url: `api/v1/competitionTheory/project/${projectCode}/submit?mode=${mode}`,
method: 'post',
data
});
}
/** 项目更新练习的试题的进度列表 */
export function updatePracticeQuestionProgress(projectCode, params) {
@ -273,7 +259,7 @@ export function getPracticeQuestionProgress(projectCode) {
});
}
/** 项目更新练习的试题的进度列表 */
/** 项目提交试卷 */
export function submitPracticeQuestionData(projectCode, data) {
return request({
url: `/api/v1/competitionTheory/project/${projectCode}/submit`,
@ -282,3 +268,53 @@ export function submitPracticeQuestionData(projectCode, data) {
});
}
/** 获取场景列表 */
export function getCompetitionPracticalScene(params) {
return request({
url: `/api/v1/competitionPractical`,
method: 'get',
params: params
});
}
/** 添加场景 */
export function addCompetitionPracticalScene(data) {
return request({
url: `/api/v1/competitionPractical`,
method: 'post',
data
});
}
/** 删除场景 */
export function deleteCompetitionPracticalScene(sceneId) {
return request({
url: `/api/v1/competitionPractical/${sceneId}`,
method: 'delete'
});
}
/** 更新场景 */
export function updateCompetitionPracticalScene(data) {
return request({
url: `/api/v1/competitionPractical`,
method: 'PUT',
data
});
}
/** 获取场景 */
export function getCompetitionPracticalSceneById(id) {
return request({
url: `/api/v1/competitionPractical/detail/${id}`,
method: 'get'
});
}
/** 更新步骤数据 */
export function updateCompetitionPracticalStep(data) {
return request({
url: `/api/v1/competitionPractical/detail`,
method: 'POST',
data
});
}

View File

@ -25,14 +25,14 @@ export function updateRace(id, data) {
});
}
/** 获取实操试题列表(题库)*/
export function getPracticeList(params) {
return request({
url: `/api/v1/competitionPractical`,
method: 'get',
params
});
}
// /** 获取实操试题列表(题库)*/
// export function getPracticeList(params) {
// return request({
// url: `/api/v1/competitionPractical`,
// method: 'get',
// params
// });
// }
/** 导入项目试题库 */
export function importQuestionBand(data, projectCode) {
return request({

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -80,5 +80,6 @@ export default {
examDetail: 'Exam detail',
raceManage: 'Race manage',
practiceManage:'Practice manage',
bankManage: 'Bank manage'
bankManage: 'Bank manage',
sceneManage:'Scene manage'
};

View File

@ -85,5 +85,6 @@ export default {
raceManage: '竞赛管理',
recaList: '报名列表',
bankManage: '题库列表',
practiceManage:'实操列表'
practiceManage:'实操列表',
sceneManage:'场景列表'
};

View File

@ -1,4 +1,9 @@
import env from 'zrender/src/core/env';
import envLib from 'zrender/lib/core/env';
env.touchEventsSupported = true;
envLib.touchEventsSupported = true; // 支持触摸板
import zrender from 'zrender';
// import * as zrUtil from 'zrender/src/core/util';
import localStore from 'storejs';
import Options from './options';

View File

@ -2,6 +2,7 @@ import deviceType from './constant/deviceType';
import Eventful from 'zrender/src/mixin/Eventful';
import * as eventTool from 'zrender/src/core/event';
import store from '@/store/index_APP_TARGET';
// import * as Event from 'zrender/src/core/event';
class EventModel {
constructor(e) {
@ -55,6 +56,7 @@ class MouseController extends Eventful {
zr.on('mousedown', this.mousedown, this);
zr.on('mousemove', this.mousemove, this);
zr.on('mouseup', this.mouseup, this);
zr.on('touchstart', this.mousedown, this);
zr.on('touchmove', this.mousemove, this);
zr.on('touchend', this.mouseup, this);
@ -64,6 +66,7 @@ class MouseController extends Eventful {
zr.off('mousedown', this.mousedown);
zr.off('mousemove', this.mousemove);
zr.off('mouseup', this.mouseup);
zr.off('touchstart', this.mousedown);
zr.off('touchmove', this.mousemove);
zr.off('touchend', this.mouseup);
@ -99,9 +102,10 @@ class MouseController extends Eventful {
this._x = e.offsetX;
this._y = e.offsetY;
this._dragging = true;
this._target = null;
if (e.which === 3) {
this.handleMouseDownRight(e);
} else if (e.which === 1) {
} else if (e.which === 1 || e.which == 0) {
this.handleMouseDownLeft(e);
} else if (e.which === 2) {
this.handleMouseDownWheel(e);
@ -120,7 +124,7 @@ class MouseController extends Eventful {
this._y = e.offsetY;
if (e.which === 3) {
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
} else if (e.which === 1) {
} else if (e.which === 1 || e.which == 0) {
this.handleMouseMoveLeft(e, dx, dy, oldX, oldY);
}
}
@ -148,11 +152,13 @@ class MouseController extends Eventful {
this.eventTarget.setCursor('default');
}
if (this.eventTarget.grouper) {
if (e.target._subType == 'buttonImag') {
this.targetView = this.checkEvent(e);
this.targetView.eventTarget.close();
if (this._target && this._target._subType == 'buttonImag') {
// this.targetView = this.checkEvent(e);
this._targetView && this._targetView.eventTarget.close();
this.boundingRect = {};
}
this._target = null;
this._targetView = null;
}
this.eventTarget = '';
this._dragging = false;
@ -229,6 +235,8 @@ class MouseController extends Eventful {
if (e.target._subType == 'buttonImag') {
this.targetView = this.checkEvent(e);
this.targetView.eventTarget.open();
this._target = e.target;
this._targetView = this.targetView;
this.boundingRect = this.eventTarget.grouper.getBoundingRect();
this.boundingRect = this.createFakeBoundingRect(this.eventTarget, this.boundingRect);
}
@ -260,7 +268,7 @@ class MouseController extends Eventful {
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
}
}
if (this.eventTarget.grouper) {
if (this.eventTarget && this.eventTarget.grouper) {
const x = e.event.x + this.$ibp.$options.offsetX;
const y = e.event.y + this.$ibp.$options.offsetY;
if (!(x <= this.boundingRect.x2 && x >= this.boundingRect.x1 && y <= this.boundingRect.y2 && y >= this.boundingRect.y1)) {

View File

@ -184,7 +184,7 @@ deviceRender[deviceType.VolumeControlDamper] = {
deviceRender[deviceType.IscsText] = {
_type: deviceType.IscsText,
zlevel: 1,
z: 6
z: 7
};
/** 线段渲染配置 */
deviceRender[deviceType.IscsLine] = {
@ -196,7 +196,7 @@ deviceRender[deviceType.IscsLine] = {
deviceRender[deviceType.IscsRect] = {
_type: deviceType.IscsRect,
zlevel:1,
z: 3
z: 6
};
/** 菱形渲染配置 */
deviceRender[deviceType.IscsRhombus] = {

View File

@ -1,7 +1,7 @@
export const keyboardEvents = {
C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制
V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'}, // 绘图粘贴
DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
C: { event: 'KeyC'}, // 绘图复制
V: { event: 'KeyV'}, // 绘图粘贴
DELETE: { event: 'Delete'}, // 快捷删除绘图元素
// ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
};

View File

@ -33,7 +33,8 @@ class Iscs {
const height = opts.config.height;
this.isAllowDragging = false;
this.$iscsZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
this.$iscsZr.dom.setAttribute('tabIndex', -1);
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
this.$mouseController = new MouseController(this);
this.$mouseController.enable();

View File

@ -7,22 +7,24 @@ class KeyboardController extends Eventful {
this.$iscs = iscs;
this.$zr = iscs.getZr();
this.events = iscs.getEvents();
this.initHandler(this.$zr);
this.initHandler(this.$zr);
}
initHandler(zr) {
if (zr) {
var keydownHandle = this.keydown.bind(this);
var dom = this.$zr.dom;
this.enable = function (opts) {
opts = opts || {};
this._keyOnDownUp = opts.keyOnDownUp || true;
window.addEventListener('keyup', keydownHandle, false);
dom.addEventListener('keyup', keydownHandle, false);
dom.focus();
};
this.disable = function () {
window.removeEventListener('keyup', keydownHandle, false);
dom.removeEventListener('keyup', keydownHandle, false);
};
this.dispose = function() {
@ -33,12 +35,8 @@ class KeyboardController extends Eventful {
keydown(e) {
if (this._keyOnDownUp && !e.repeat) {
const currentEvent = keyboardEvents[e.key.toUpperCase()];
let str = '';
if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) {
str = currentEvent.event;
}
this.trigger(this.events.Keyboard, str);
const currentEvent = keyboardEvents[e.key.toUpperCase()]||{event:""};
this.trigger(this.events.Keyboard, currentEvent.event);
}
}
}

View File

@ -86,7 +86,8 @@ class MouseController extends Eventful {
mousedown(e) {
e.event.preventDefault();
e.event.stopPropagation();
const em = new EventModel(e);
const em = new EventModel(e);
this.$zr.dom.focus();
this.eventTarget = em.eventTarget;
this._offsetX = e.offsetX;
this._offsetY = e.offsetY;

View File

@ -7,10 +7,14 @@ import psdRight from '@/assets/iscs_picture/iscs-psd-right.png';
import fireBlue from '@/assets/iscs_picture/iscs-fire-blue.png';
import fireRed from '@/assets/iscs_picture/iscs-fire-red.png';
import iscsAPF from '@/assets/iscs_picture/iscs_APF.png';
const pictureObj = {
'psdLeft': psdLeft,
'psdSystem': psdSystem,
'psdRight': psdRight,
'psdRight': psdRight,
'APF': iscsAPF,
's': fireBlue,
'a': fireRed
};

View File

@ -13,19 +13,21 @@ class KeyboardController extends Eventful {
initHandler(zr) {
if (zr) {
var keydownHandle = this.keydown.bind(this);
var keyupHandle = this.keyup.bind(this);
var keyupHandle = this.keyup.bind(this);
var dom = this.$zr.dom;
this.enable = function (opts) {
opts = opts || {};
this._keyOnDownUp = opts.keyOnDownUp || true;
window.addEventListener('keydown', keydownHandle, false);
window.addEventListener('keyup', keyupHandle, false);
dom.addEventListener('keydown', keydownHandle, false);
dom.addEventListener('keyup', keyupHandle, false);
dom.focus();
};
this.disable = function () {
window.removeEventListener('keydown', keydownHandle, false);
window.removeEventListener('keyup', keyupHandle, false);
dom.removeEventListener('keydown', keydownHandle, false);
dom.removeEventListener('keyup', keyupHandle, false);
};
this.dispose = function() {

View File

@ -44,7 +44,7 @@ class Jlmap {
this.zoomOnMouseWheel = opts.options.zoomOnMouseWheel;
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$zr.dom.setAttribute('tabIndex', -1);
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
this.$painter = new Painter(this);
this.$painter.updateZrSize({width: this.$zr.getWidth(), height: this.$zr.getHeight()});

View File

@ -84,7 +84,9 @@ class MouseController extends Eventful {
mousedown(e) {
// if (eventTool.notLeftMouse(e)) {
// return;
// }
// }
this.$zr.dom.focus();
if (e.which == 1 || e.which == 3) {
var x = e.offsetX;
var y = e.offsetY;

View File

@ -14,16 +14,18 @@ class KeyboardController extends Eventful {
initHandler(zr) {
if (zr) {
var keydownHandle = this.keydown.bind(this);
var dom = this.$zr.dom;
this.enable = function (opts) {
opts = opts || {};
this._keyOnDownUp = opts.keyOnDownUp || true;
window.addEventListener('keyup', keydownHandle, false);
dom.addEventListener('keyup', keydownHandle, false);
dom.focus();
};
this.disable = function () {
window.removeEventListener('keyup', keydownHandle, false);
dom.removeEventListener('keyup', keydownHandle, false);
};
this.dispose = function() {

View File

@ -54,6 +54,7 @@ class Jlmap {
this.previewOrMapDraw = opts.showConfig.previewOrMapDraw;
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$zr.dom.setAttribute('tabIndex', -1);
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
this.$painter = new Painter(this);

View File

@ -85,7 +85,8 @@ class MouseController extends Eventful {
mousedown(e) {
// if (eventTool.notLeftMouse(e)) {
// return;
// }
// }
this.$zr.dom.focus();
if (e.which == 1 || e.which == 3) {
var x = e.offsetX;
var y = e.offsetY;

View File

@ -117,7 +117,7 @@ export default {
});
},
clickEvent(val) {
console.log(val, '--------', this.addModel.role, '========', document.getElementById(val));
// console.log(val, '--------', this.addModel.role, '========', document.getElementById(val));
this.addModel.role && document.getElementById(this.addModel.role).setAttribute('style', 'background: #5F9EA0;color: #000; width:100%');
this.addModel.role = val;
document.getElementById(val).setAttribute('style', 'background: #000;color: #5F9EA0; width:100%');

View File

@ -214,16 +214,15 @@ export default {
this.route = routeList[currentIndex];
this.tempData = [];
this.tempData.push(this.route);
console.log(this.route);
if (currentIndex == 2) {
step.param = {
signalCode: this.route.startSignalCode
};
} else {
step.param = {
routeCode: this.route.code
};
}
step.param = {
routeCode: this.route.code
};
// if (currentIndex == 2) {
// step.param = {
// signalCode: this.route.startSignalCode
// };
// } else {
// }
}
if (this.tempData.length) {
row.show = true;

View File

@ -63,7 +63,11 @@ export function parser(data, skinCode, showConfig) {
if (elem.type == '02' || elem.type == '03') {
mapDevice[elem.code].parentName = mapDevice[elem.parentCode] ? mapDevice[elem.parentCode].name : '';
} else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack) && elem.belongStation) {
mapDevice[elem.belongStation].sectionCode = elem.code;
if (mapDevice[elem.belongStation]) {
mapDevice[elem.belongStation].sectionCode = elem.code;
} else {
elem.belongStation = '';
}
}
}, this);

View File

@ -135,11 +135,11 @@ export default {
},
goEmpty() {},
goToCaseShow() {
const href = 'https://joylink.club/helps/西安铁路职业技术学院.pdf';
const href = 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf';
window.open(href, '_blank');
},
goToCase() {
const href = 'https://joylink.club/helps/贵州装备制造职业学院机电技术专业实训室建设.pdf';
const href = 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf';
window.open(href, '_blank');
},
goToTraining() {

View File

@ -37,7 +37,7 @@ function getRouteInfo(to) {
if (whiteList.includes(toRoutePath)) { // 登陆页面清空 token
removeToken();
}
loginPath = loginInfo[current_session] ? loginInfo[current_session].loginPath : whiteList[0];
loginPath = loginInfo[current_session] ? loginInfo[current_session].loginPath : (to.path.includes('design') ? whiteList[1] : whiteList[0] );
if (to.query.projectDevice && to.query.type) {
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
}

View File

@ -17,7 +17,7 @@ const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice');
const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain');
const Jlmap3dMaintainer = () => import('@/views/jlmap3d/maintainer/jl3dmaintainer');
const Jlmap3dMaintainerVr = () => import('@/views/jlmap3d/maintainer/jl3dmaintainervr');
const Jl3dTrainRescueVr = () => import('@/views/jlmap3d/maintainer/jl3dTrainRescueVr')
const Jl3dTrainRescueVr = () => import('@/views/jlmap3d/maintainer/jl3dTrainRescueVr');
const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr');
// const Jl3dMaintainer = () => import('@/views/jlmap3d/maintainer/jl3dmaintainer');
@ -127,7 +127,10 @@ const MapSort = () => import('@/views/publish/publishMap/mapSort');
const StudentManage = () => import('@/views/studentManage');
const RaceManage = () => import('@/views/competitionManage/competition/index');
const BankManage = () => import('@/views/competitionManage/bankList/index');
const PracticeManage = () => import('@/views/competitionManage/practiceList/index');
const Scene = () => import('@/views/drts/scene/index');
// const PracticeManage = () => import('@/views/competitionManage/practiceList/index');
const QuestionCreatePage = () => import('@/views/competitionManage/bankList/question-create-page');
const QuestionUpdatePage = () => import('@/views/competitionManage/bankList/question-update-page');
const GeneratePaper = () => import('@/views/competitionManage/generatePaper');
@ -1015,11 +1018,19 @@ export const asyncRouter = [
icon: 'design'
}
},
// {
// path: 'practice',
// component: PracticeManage,
// meta: {
// i18n: 'router.practiceManage',
// icon: 'design'
// }
// },
{
path: 'practice',
component: PracticeManage,
path: 'scene',
component: Scene,
meta: {
i18n: 'router.practiceManage',
i18n: 'router.sceneManage',
icon: 'design'
}
},
@ -1203,6 +1214,7 @@ export const JSXT = [
}
];
const createRouter = () => new Router({
base: '/cbtc/',
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes

View File

@ -83,22 +83,19 @@
<set-exam-time ref="setExamTime" :theory-question-list="theoryQuestionList" :operate-question-list="operateQuestionList" />
<theory-review ref="theoryReview" :theory-question-list="theoryQuestionList" />
<theory-question ref="theoryQuestion" :theory-index-list="theoryIndexList" @addQuestion="addTheoryQuestionList" @removeQuestion="removeTheoryQuestion" />
<operate-question ref="operateQuestion" :operate-index-list="operateIndexList" @addQuestion="addOperateQuestionList" @removeQuestion="removeOperateQuestion" />
</div>
</template>
<script>
import TheoryReview from './theoryReview';
import TheoryQuestion from './theoryQuestion';
import OperateQuestion from './operateQuestion';
import SetExamTime from './setExamTime';
export default {
name: 'GeneratPaper',
components: {
SetExamTime,
TheoryReview,
TheoryQuestion,
OperateQuestion
TheoryQuestion
},
data() {
return {
@ -148,7 +145,6 @@ export default {
this.$refs.theoryQuestion.doShow();
},
addOperateQuestion() {
this.$refs.operateQuestion.doShow();
},
goBack() {
this.$router.go(-1);

View File

@ -1,219 +0,0 @@
<template>
<el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="实操试题" width="80%">
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import { getPracticeList } from '@/api/race';
export default {
mixins: [
// WindowResizeHandler
],
props: {
operateIndexList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
index: 0,
height: 0,
loading: false,
dialogVisible: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {}
},
queryList: {
query: getPracticeList,
beforeQuery: this.beforeQuery,
// data:[
// {id:1, raceId:2, name:'', creatorName:''},
// {id:2, raceId:4, name:'', creatorName:'zyy'},
// {id:3, raceId:3, name:'', creatorName:''}
// ],
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '实操名称',
prop: 'name',
width: '400'
},
{
title: '实操描述',
prop: 'description'
},
{
type: 'button',
title: '操 作',
width: '420',
buttons: [
{
name: '添加',
handleClick: this.addQuestion,
showControl: (row) => { return !row.paper; },
type: 'success'
},
{
name: '移出',
handleClick: this.removeQuestion,
showControl: (row) => { return row.paper; },
type: 'warning'
}
]
}
]
}
};
},
computed: {
},
watch: {
},
methods: {
loadInitData() {
this.$nextTick(() => {
this.queryList.reload();
});
},
doShow() {
this.dialogVisible = true;
this.loadInitData();
},
handleClose() {
this.dialogVisible = false;
},
addQuestion(index, row) {
this.$set(row, 'paper', true);
this.$emit('addQuestion', row);
},
beforeQuery(params) {
params.mapId = this.$route.query.mapId;
return params;
},
afterQuery(data) {
if (data && data.list) {
const that = this;
const list = data.list;
if (list) {
list.map(elem => {
this.$set(elem, 'paper', that.operateIndexList.includes(elem.id));
});
}
}
return data;
},
removeQuestion(index, row) {
this.$set(row, 'paper', false);
this.$emit('removeQuestion', row);
},
answerTags(row) {
const answer = [];
row.optionList.forEach((el, i) => {
switch (row.type) {
case 'select':
if (el.correct) {
answer.push(this.$asc2chart(i + 65));
}
break;
case 'judge':
if (el.correct) {
answer.push(el.content);
}
break;
}
});
return answer;
}
}
};
</script>
<style lang="scss" scoped>
.layer-center {
width: 900px;
height: 100%;
margin: auto;
background: #fff;
}
.quiz {
background: #eee;
height: 100%;
&::-webkit-scrollbar {
display:none
}
&__card {
height: 100%;
.dir-item {
padding-left: 25px;
}
.dir-caption {
padding-left: 10px;
line-height: 26px;
background: #f1f1f1;
}
}
&__container {
height: 100%;
&-header {
height: auto !important;
.title {
font-size: 24px;
line-height: 60px;
font-weight: bold;
text-align: center;
}
.notes {
color:#606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 20px;
}
}
&-main {
.section {
padding: 5px 20px;
.caption {
line-height: 26px;
}
.context {
}
}
}
&-footer {
text-align: right;
position: sticky;
bottom: 0px;
padding: 40px ;
.buttons {
position: relative;
bottom: 20px;
}
}
}
}
</style>

View File

@ -0,0 +1,156 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import {addCompetitionPracticalScene, getCompetitionPracticalSceneById, updateCompetitionPracticalScene} from '@/api/competition';
export default {
name:'SceneCreate',
props: {
scriptList:{
type: Array,
default() {
return [];
}
},
title:{
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogVisible:false,
isEdit:false,
formModel: {
id:'',
name:'', //
description:'', //
disposalProcesses:'', //
scriptId:'', // id
operationScore:0, //
main:true //
}
};
},
computed: {
form() {
const form = {
labelWidth: '120px',
items: [
{ prop: 'name', label: '场景名称', type: 'text', maxlength:80 },
{ prop: 'description', label: '场景描述', type: 'textarea' },
{ prop: 'disposalProcesses', label: '处置流程', type: 'textarea' },
{ prop: 'operationScore', label: '运营部分总分', type: 'number', min: 0, max: 100, step:1, precision:1 },
{ prop:'scriptId', label:'关联剧本', type:'select', options:this.scriptList},
{ prop:'main', label:'是否主场景', type:'switch' }
]
};
return form;
},
rules() {
const crules = {
name: [
{ required: true, validator: this.validateSceneName, trigger: 'blur' },
{ required: true, validator: this.validateSceneName, trigger: 'change' }
],
description: [
{ required: true, validator: this.validateDescription, trigger: 'blur' },
{ required: true, validator: this.validateDescription, trigger: 'change' }
],
disposalProcesses: [
{ required: true, validator: this.validateDisposalProcesses, trigger: 'blur' },
{ required: true, validator: this.validateDisposalProcesses, trigger: 'change' }
],
scriptId:[
{ required: true, message: '请选择剧本', trigger: 'change' }
],
operationScore:[
{ required: true, message: '请输入运营部分总分', trigger: 'blur' }
]
};
return crules;
}
},
methods:{
validateSceneName(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.name = this.formModel.name.replace(/\s/g, '');
return callback(new Error('请输入场景名称'));
} else {
return callback();
}
},
validateDescription(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.description = this.formModel.description.replace(/\s/g, '');
return callback(new Error('请输入场景描述'));
} else {
return callback();
}
},
validateDisposalProcesses(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.disposalProcesses = this.formModel.disposalProcesses.replace(/\s/g, '');
return callback(new Error('请输入处置流程'));
} else {
return callback();
}
},
doShow(sceneId) {
// this.dialogVisible = true;
if (sceneId) {
getCompetitionPracticalSceneById(sceneId).then(resp=>{
const data = {'name':resp.data.name,
'description':resp.data.description,
'disposalProcesses':resp.data.disposalProcesses,
'scriptId':resp.data.scriptId,
'operationScore':resp.data.operationScore,
'main':resp.data.main};
this.formModel = data;
this.formModel.id = sceneId;
this.dialogVisible = true;
this.isEdit = true;
});
} else {
this.dialogVisible = true;
this.isEdit = false;
}
},
doCreate() {
const self = this;
this.$refs.dataform.validateForm(() => {
if (this.isEdit) {
updateCompetitionPracticalScene(Object.assign({}, this.formModel)).then(resp => {
this.$emit('reloadTable');
this.$message.success('更新场景成功');
}).catch(error => {
this.$messageBox(`更新场景失败: ${error.message}`);
});
} else {
delete this.formModel.id;
addCompetitionPracticalScene(Object.assign({}, this.formModel)).then(resp => {
this.$emit('reloadTable');
this.$message.success('创建场景成功');
}).catch(error => {
this.$messageBox(`创建场景失败: ${error.message}`);
});
}
self.doClose();
});
},
doClose() {
this.$refs.dataform.resetForm();
this.dialogVisible = false;
}
}
};
</script>

View File

@ -0,0 +1,135 @@
<template>
<div>
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-scene ref="createScene" title="创建场景" :script-list="scriptList" @reloadTable="reloadTable" />
<create-scene ref="updateScene" title="更新场景" :script-list="scriptList" @reloadTable="reloadTable" />
<modify-step ref="modifyStep" title="编辑步骤数据" />
<!-- <update-scene ref="modifyScene" :script-list="scriptList" @reloadTable="reloadTable" /> -->
</div>
</template>
<script>
import { getCompetitionPracticalScene, deleteCompetitionPracticalScene } from '@/api/competition';
import { getScriptPageListOnlineNew } from '@/api/script';
import CreateScene from './create';
import ModifyStep from './modify';
export default {
name:'SceneManage',
components:{
CreateScene,
ModifyStep
},
data() {
return {
scriptList:[],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: false,
labelWidth: '80px',
queryObject: {
name: {
type: 'text',
label: '场景名称'
}
}
},
queryList: {
query: getCompetitionPracticalScene,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '场景名称',
prop: 'name',
width: '400'
},
{
title: '场景描述',
prop: 'description'
},
{
title: '处置流程',
prop: 'disposalProcesses'
},
{
title: '运营部分总分',
prop: 'operationScore'
},
{
title: '关联剧本',
prop: 'scriptId',
type: 'tag',
width: '320',
columnValue: (row) => { return this.$convertField(row.scriptId, this.scriptList, ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
type: 'button',
title: '操 作',
width: '420',
buttons: [
{
name: '更 新',
handleClick: this.doUpdate,
type: 'primary'
},
{
name: '编辑步骤数据',
handleClick: this.doModify,
type: 'success'
},
{
name: '删 除',
handleClick: this.doDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: '添 加', handler: this.doCreate }
]
}
};
},
mounted() {
getScriptPageListOnlineNew().then(response=>{
this.scriptList = response.data.list.map(elem => { return { value: elem.id, label: elem.name }; });
// this.queryForm.queryObject.scriptId.config.data = this.scriptList;
});
},
methods:{
//
doUpdate(index, row) {
this.$refs.updateScene.doShow(row.id);
},
doDelete(index, row) {
this.$confirm('此操作将删除此场景, 是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deleteCompetitionPracticalScene(row.id).then(response => {
this.$message.success('删除场景成功');
this.reloadTable();
}).catch((error) => {
this.$messageBox(`删除场景失败: ${error.message}`);
});
}).catch(() => { });
},
doCreate() {
this.$refs.createScene.doShow(null);
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
doModify(index, row) {
this.$refs.modifyStep.doShow(row);
}
}
};
</script>

View File

@ -0,0 +1,537 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="1200px" :before-close="doClose" top="50px" center custom-class="sceneModifyOut">
<el-form ref="form" :model="formModel" label-width="120px" class="sceneModify">
<!-- :rules="rules" -->
<el-table :data="actionList" border style="width:100%;" height="550" :span-method="objectSpanMethod">
<el-table-column label="步骤名称" width="100">
<template slot-scope="scope">
<div v-if="stepVOs[scope.row.id]">
{{ stepVOs[scope.row.id].description||'' }}
</div>
</template>
</el-table-column>
<el-table-column label="动作内容" width="300">
<template slot-scope="scope">
<!-- v-model="scope.row.id" -->
<el-checkbox v-if="isModify" v-model="checkBoxActionList[scope.row.id].status" :disabled="checkBoxActionList[scope.row.id].disabled" class="checkBoxAction" @change="((val)=>{changeSelectActionId(val, scope.row.id, scope.$index)})" />
<div v-if="dialogVisible">{{ covert(scope.row) }}</div>
</template>
</el-table-column>
<el-table-column label="语音识别关键词列表" width="300">
<template slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].keyWords">
<el-tag v-for="(tag,index) in commandEvaluationRuleVOs[scope.row.id].keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.row.id,index)">{{ tag }}</el-tag>
<el-input
v-if="commandEvaluationRuleVOs[scope.row.id].inputVisible"
:ref="'saveTagInput'+scope.row.id"
v-model="commandEvaluationRuleVOs[scope.row.id].inputValue"
size="small"
class="input-new-tag"
@keyup.enter.native="handleInputConfirm(scope.row.id)"
@blur="handleInputConfirm(scope.row.id)"
/>
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.row.id)">添加</el-button>
</div>
<div v-else>
<el-button class="button-new-tag" size="small" @click="addKeyWord(scope.row.id)">添加</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="总分值" width="149">
<template slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].score!=undefined">
<el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].scoreVisible"
:ref="'saveScoreInput'+scope.row.id"
v-model="commandEvaluationRuleVOs[scope.row.id].score"
:min="0"
size="small"
:max="Infinity"
:step="1"
@keyup.enter.native="handleScoreConfirm(scope.row.id)"
@blur="handleScoreConfirm(scope.row.id)"
/>
<div v-else style="cursor:pointer" @click="modifyScore(scope.row.id)">
{{ commandEvaluationRuleVOs[scope.row.id].score }}
</div>
</div>
<div v-else>
<el-button class="button-new-tag" size="small" @click="addScore(scope.row.id)">编辑</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="超时时间" width="150">
<template slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].timeOut!=undefined">
<el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].timeOutVisible"
:ref="'saveTimeOutInput'+scope.row.id"
v-model="commandEvaluationRuleVOs[scope.row.id].timeOut"
:min="0"
size="small"
:max="Infinity"
:step="1"
@keyup.enter.native="handleTimeOutConfirm(scope.row.id)"
@blur="handleTimeOutConfirm(scope.row.id)"
/>
<div v-else style="cursor:pointer" @click="modifyTimeOut(scope.row.id)">
{{ commandEvaluationRuleVOs[scope.row.id].timeOut }}
</div>
</div>
<div v-else>
<el-button class="button-new-tag" size="small" @click="addTimeOut(scope.row.id)">编辑</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="扣除分值" width="150">
<template slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].deductScore!=undefined">
<el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].deductScoreVisible"
:ref="'saveDeductScoreInput'+scope.row.id"
v-model="commandEvaluationRuleVOs[scope.row.id].deductScore"
:min="0"
size="small"
:max="Infinity"
:step="1"
@keyup.enter.native="handleDeductScoreConfirm(scope.row.id)"
@blur="handleDeductScoreConfirm(scope.row.id)"
/>
<div v-else style="cursor:pointer" @click="modifyDeductScore(scope.row.id)">
{{ commandEvaluationRuleVOs[scope.row.id].deductScore }}
</div>
</div>
<div v-else>
<el-button class="button-new-tag" size="small" @click="addDeductScore(scope.row.id)">编辑</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-form>
<div style="margin-top:15px;">
<el-button v-if="!isModify" type="primary" @click="doModifyDes">编辑步骤描述</el-button>
<el-button v-if="isModify" type="success" @click="cancleModifyDes">取消编辑步骤描述</el-button>
<el-button v-if="idOperateStatistic" type="success" @click="doOperateStatistic">编辑运营统计</el-button>
</div>
<step-description
ref="addStepDescription"
@cancleDescription="cancleDescription"
@submitDescription="submitDescription"
/>
<operate-statistic ref="operateStatistic" @submitOperateStatistic="submitOperateStatistic" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doUpdate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
// import store from '@/store/index_APP_TARGET';
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import {getScriptByIdNew} from '@/api/script';
import StepDescription from './stepDescription';
import OperateStatistic from './operateStatistic';
import {covertOperate} from '@/views/newMap/displayNew/scriptDisplay/component/covertOperation';
import {updateCompetitionPracticalStep, getCompetitionPracticalSceneById} from '@/api/competition';
import {getPublishMapDetailById} from '@/api/jmap/map';
export default {
name:'ModifyStep',
components:{
StepDescription,
OperateStatistic
},
props: {
title:{
type: String,
default() {
return '';
}
}
},
data() {
return {
isModify:false,
dialogVisible:false,
actionList:[],
memberList:[],
checkBoxActionList:[],
commandEvaluationRuleVOs:{},
currentstepAction:[],
startArray:[],
endArray:[],
stepVOs:{},
formModel:{
id:'',
name:'',
main:true,
description:'',
disposalProcesses:'',
operationScore:'',
scriptId:'',
commandEvaluationRuleVOs:[],
stepVOs:[],
operationStatisticVO:{}
}
};
},
computed: {
idOperateStatistic() {
return Object.values(this.stepVOs).length > 2;
}
},
methods:{
doShow(row) {
//
this.formModel.id = row.id;
this.formModel.name = row.name;
this.formModel.main = row.main;
this.formModel.description = row.description;
this.formModel.disposalProcesses = row.disposalProcesses;
this.formModel.operationScore = row.operationScore;
this.formModel.scriptId = row.scriptId;
getScriptByIdNew(row.scriptId).then(res=>{
this.actionList = res.data.actionList;
getCompetitionPracticalSceneById(row.id).then(response=>{
const commandEvaluationRuleVOs = {};
if (response.data.commandEvaluationRuleVOs) {
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
});
}
const stepVOs = {};
if (response.data.stepVOs) {
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
}
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
if (response.data.operationStatisticVO) {
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
}
this.stepVOs = stepVOs;
});
//
getPublishMapDetailById(res.data.mapId).then(resp => {
this.$store.dispatch('map/setMapData', resp.data);
const stationMap = {};
resp.data.stationList.forEach(station=>{
stationMap[station.code] = station;
});
let lastData = JSON.stringify(res.data.memberList);
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
roleTypeList.forEach(function(element) {
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
} else {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData = JSON.parse(lastData);
const lastMemberList = [];
lastData.forEach((member, index)=>{
const userName = member.userName ? '-' + member.userName : '';
const name = member.name ? '-' + member.name : '';
if (member.deviceCode && member.type == '行值') {
const device = stationMap[member.deviceCode];
member.deviceName = device.name;
// || device.groupNumber
member.label = member.type + member.deviceName + name + userName;
member.normalName = member.type + member.deviceName + name;
} else if (member.deviceCode && member.type == '司机') {
member.deviceName = member.deviceCode;
member.label = member.type + member.deviceName + name + userName;
} else {
member.deviceName = '';
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
lastMemberList.push(member);
this.memberList = lastMemberList;
this.dialogVisible = true;
});
});
});
},
doClose() {
// this.$refs.dataform.resetForm();
this.dialogVisible = false;
this.$store.dispatch('map/mapClear');
},
covert(element) {
const member = this.memberList[element.memberId];
let resultData = '';
if (element.type == 'Conversation') {
resultData = member.label + '说:' + element.content;
} else if (element.type == 'Operation') {
resultData = covertOperate(element.operationType, element.operationParamMap);
resultData = resultData.replace('请', member.label);
// this.scriptTipMessage = '' + deviceName + '' + operateName.label + '';
} else if (element.type == 'Exit_Conversation') {
resultData = member.label + '结束当前会话';
} else if (element.type == 'Start_Conversation' ) {
const inviteMember = [];
// this.$emit('allowCreatCoversition');
element.conversationMemberIds.forEach(id=>{
if (element.memberId != id) {
inviteMember.push((this.memberList[id] || {label: ''}).label);
}
});
resultData = member.label + '创建会话,选择' + inviteMember.toString();
} else if (element.type == 'Command') {
const targetName = this.memberList[element.commandInitiateVO.targetMemberId];
const CommandList = {
Drive_Ahead:'确认运行至前方站',
Route_Block_Drive:'进路闭塞法行车',
Drive_Through_The_Guide_Signal:'越引导信号行驶',
Drive_Through_The_Red_Light:'越红灯行驶',
Drive_In_Urm_Mode:'URM模式驾驶',
Set_Speed_Limit:'设置限速',
Open_Or_Close_Door:'开关门',
Switch_Hook_Lock: '道岔钩锁'
};
resultData = member.label + '对【' + targetName.label + '】下达【' + CommandList[element.commandInitiateVO.commandType] + '】指令';
} else if (element.type == 'Drive') {
if (element.targetSectionCode) {
const section = this.$store.getters['map/getDeviceByCode'](element.targetSectionCode);
if (section && section.name) {
resultData = member.label + '把车开到区段' + section.name;
}
}
}
return resultData;
},
initCommandEvaluationRuleVOs(actionId) {
if (!this.commandEvaluationRuleVOs[actionId]) {
this.$set(this.commandEvaluationRuleVOs, actionId, {});
this.$set(this.commandEvaluationRuleVOs[actionId], 'actionId', actionId);
}
},
addKeyWord(actionId) {
this.initCommandEvaluationRuleVOs(actionId);
this.$set(this.commandEvaluationRuleVOs[actionId], 'inputValue', '');
this.$set(this.commandEvaluationRuleVOs[actionId], 'keyWords', []);
this.$set(this.commandEvaluationRuleVOs[actionId], 'inputVisible', true);
this.$nextTick(_ => {
this.$refs['saveTagInput' + actionId].$refs.input.focus();
});
},
addScore(actionId) {
this.initCommandEvaluationRuleVOs(actionId);
this.$set(this.commandEvaluationRuleVOs[actionId], 'score', 0);
this.$set(this.commandEvaluationRuleVOs[actionId], 'scoreVisible', true);
this.$nextTick(_ => {
this.$refs['saveScoreInput' + actionId].$refs.input.focus();
});
},
addTimeOut(actionId) {
this.initCommandEvaluationRuleVOs(actionId);
this.$set(this.commandEvaluationRuleVOs[actionId], 'timeOut', 0);
this.$set(this.commandEvaluationRuleVOs[actionId], 'timeOutVisible', true);
this.$nextTick(_ => {
this.$refs['saveTimeOutInput' + actionId].$refs.input.focus();
});
},
handleTimeOutConfirm(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'timeOutVisible', false);
},
modifyTimeOut(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'timeOutVisible', true);
this.$nextTick(_ => {
this.$refs['saveTimeOutInput' + actionId].$refs.input.focus();
});
},
showInput(actionId) {
this.commandEvaluationRuleVOs[actionId].inputVisible = true;
this.$nextTick(_ => {
this.$refs['saveTagInput' + actionId].$refs.input.focus();
});
},
handleInputConfirm(actionId) {
const inputValue = this.commandEvaluationRuleVOs[actionId].inputValue;
if (inputValue) {
this.commandEvaluationRuleVOs[actionId].keyWords.push(inputValue);
}
this.$set(this.commandEvaluationRuleVOs[actionId], 'inputVisible', false);
this.$set(this.commandEvaluationRuleVOs[actionId], 'inputValue', '');
},
handleScoreConfirm(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'scoreVisible', false);
},
modifyScore(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'scoreVisible', true);
this.$nextTick(_ => {
this.$refs['saveScoreInput' + actionId].$refs.input.focus();
});
},
handleClose(index, tagIndex) {
const keyWords = this.commandEvaluationRuleVOs[index].keyWords;
keyWords.splice(tagIndex, 1);
},
handleDeductScoreConfirm(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'deductScoreVisible', false);
},
modifyDeductScore(actionId) {
this.$set(this.commandEvaluationRuleVOs[actionId], 'deductScoreVisible', true);
this.$nextTick(_ => {
this.$refs['saveDeductScoreInput' + actionId].$refs.input.focus();
});
},
addDeductScore(actionId) {
this.initCommandEvaluationRuleVOs(actionId);
this.$set(this.commandEvaluationRuleVOs[actionId], 'deductScore', 0);
this.$set(this.commandEvaluationRuleVOs[actionId], 'deductScoreVisible', true);
this.$nextTick(_ => {
this.$refs['saveDeductScoreInput' + actionId].$refs.input.focus();
});
},
doUpdate(operationStatisticVO = null) {
let commandEvaluationRuleVOs = Object.values(this.commandEvaluationRuleVOs);
const stepVOs = Object.values(this.stepVOs);
commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{
return (eachData.keyWords && eachData.keyWords.length > 0) || eachData.timeOut || eachData.score || eachData.deductScore;
});
if (stepVOs.length > 0) {
stepVOs.sort(this.objectSort('startActionId'));
stepVOs.map((step, index)=>{
step.id = (index + 1);
});
}
if (commandEvaluationRuleVOs.length > 0) {
commandEvaluationRuleVOs.map(data=>{
delete data.inputValue;
delete data.inputVisible;
delete data.scoreVisible;
delete data.timeOutVisible;
delete data.deductScoreVisible;
});
}
if (operationStatisticVO) {
this.formModel.operationStatisticVO = operationStatisticVO;
}
this.formModel.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
this.formModel.stepVOs = stepVOs;
updateCompetitionPracticalStep(this.formModel).then(res=>{
this.$message.success('编辑步骤信息成功');
}).catch(error=>{
this.$message.success('编辑步骤信息失败:' + error.message);
});
},
doModifyDes() {
this.actionList.forEach(action=>{
this.$set(this.checkBoxActionList, action.id, {status:false});
});
this.startArray.forEach((start, index)=>{
for (var i = start; i <= this.endArray[index]; i++) {
this.$set(this.checkBoxActionList, this.actionList[i].id, {disabled:true});
}
});
this.isModify = true;
},
cancleModifyDes() {
this.isModify = false;
},
changeSelectActionId(val, actionId, index) {
if (val) {
this.currentstepAction.push({'actionId':actionId, 'index':index});
if (this.currentstepAction.length >= 2) {
this.$refs.addStepDescription.doShow();
}
} else {
const data = this.currentstepAction.findIndex((value, index, arr)=>{ return value.actionId == actionId; });
this.currentstepAction.splice(data, 1);
}
},
cancleDescription() {
this.currentstepAction.forEach(data=>{
this.checkBoxActionList[data.actionId].status = false;
});
this.currentstepAction = [];
},
submitDescription(stepDescription) {
this.currentstepAction.sort(this.objectSort('actionId'));
let start, end;
this.currentstepAction.forEach((data, index)=>{
if (index % 2 == 0) {
this.startArray.push(data.index);
start = data.index;
} else {
this.endArray.push(data.index);
end = data.index;
}
});
for (var i = start; i <= end; i++) {
this.$set(this.checkBoxActionList, this.actionList[i].id, {disabled:true});
}
this.$set(this.stepVOs, this.currentstepAction[0].actionId, {description:stepDescription, startActionId:parseInt(this.currentstepAction[0].actionId), endActionId:parseInt(this.currentstepAction[1].actionId)});
this.cancleDescription();
},
submitOperateStatistic(formModel) {
this.doUpdate(formModel);
},
objectSort(keyName) {
return function (objectN, objectM) {
var valueN = objectN[keyName];
var valueM = objectM[keyName];
if (valueN > valueM) return 1;
else if (valueN < valueM) return -1;
else return 0;
};
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (this.startArray.length > 0) {
if (columnIndex === 0) {
let rowspan = 1;
let colspan = 1;
for (var i = 0; i < this.startArray.length; i++) {
if (rowIndex == this.startArray[i]) {
rowspan = this.endArray[i] - this.startArray[i] + 1;
colspan = 1;
} else if (rowIndex > this.startArray[i] && rowIndex <= this.endArray[i]) {
rowspan = 0;
colspan = 0;
}
}
return {
rowspan:rowspan,
colspan:colspan
};
}
}
},
doOperateStatistic() {
this.$refs.operateStatistic.doShow(this.stepVOs, this.formModel.operationStatisticVO);
}
}
};
</script>
<style lang="scss" scoped>
.checkBoxAction{
display: inline-block;
float: left;
margin-right: 8px;
}
.input-new-tag {
width: 60px;
margin-left: 10px;
margin-bottom: 10px;
vertical-align: bottom;
}
.button-new-tag{
margin-bottom:10px;
}
</style>
<style lang="scss">
.el-tag {
margin-right: 10px;
margin-bottom: 10px;
vertical-align:top;
}
</style>

View File

@ -0,0 +1,162 @@
<template>
<div v-if="dialogShow" class="OperateStatistic">
<div class="OperateStatisticIn">
<div class="OperateStatisticInName">编辑运营统计</div>
<div class="OperateStatisticContent">
<el-form ref="form" :rules="rules" :model="formModel" label-width="140px" class="statisticForm">
<el-form-item label="每一项分值" :required="true" prop="score">
<el-input-number
v-model="formModel.score"
:style="{width: '130px'}"
:min="0"
size="medium"
:max="100"
:step="1"
/>
</el-form-item>
<el-form-item label="运营统计项列表" :required="true" prop="itemVOS">
<el-button type="primary" size="small" style="margin-bottom:10px" @click="addItemVO">添加</el-button>
<el-table :data="formModel.itemVOS" border style="width:351px;" height="200">
<el-table-column prop="description" label="简介" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.description" type="text" :style="{width: '125px'}" size="small" :maxlength="100" />
</template>
</el-table-column>
<el-table-column prop="stepId" label="关联步骤" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.stepId" :style="{width: '125px'}" size="small">
<el-option
v-for="option in stepVOs"
:key="option.id"
:label="option.description"
:value="option.id"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<span class="el-icon-error deleteScene" @click="handleDelete(scope.$index)" />
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
</div>
<div class="OperateStatistic-footer">
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
name:'OperateStatistic',
data() {
return {
dialogShow:false,
stepVOs:[],
formModel:{
score:0,
itemVOS:[]
// private String description;
// private Long stepId;
}
};
},
computed:{
rules() {
const crules = {
score: [
{ required: true, message: '请输入每一项分值', trigger: 'blur' },
{ required: true, message: '请输入每一项分值', trigger: 'change' }
]};
return crules;
// itemVOS
}
},
methods:{
roleDoClose() {
this.dialogShow = false;
},
confirm() {
const self = this;
this.$refs.dataform.validateForm(() => {
const itemVOS = self.formModel.itemVOS;
if (itemVOS.length > 0) {
let result = true;
itemVOS.forEach(item=>{
if (item.description && item.stepId) {
result = result && true;
} else {
result = result && false;
}
});
if (!result) {
this.$messageBox('请填写运营统计项列表');
}
}
this.dialogShow = false;
this.$emit('submitOperateStatistic', this.formModel);
});
},
doShow(stepVOs, operationStatisticVO) {
if (JSON.stringify(operationStatisticVO) != '{}') {
this.formModel = operationStatisticVO;
}
this.stepVOs = Object.values(stepVOs);
this.stepDescription = '';
this.dialogShow = true;
},
addItemVO() {
this.formModel.itemVOS.push({'description':'', stepId:''});
},
handleDelete(index) {
this.formModel.itemVOS.splice(index, 1);
}
}
};
</script>
<style lang="scss">
.OperateStatistic{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,0.7);
z-index: 2;
}
.OperateStatisticIn{
width: 600px;
background: #fff;
left: 50%;
position: absolute;
transform: translate(-50%,-50%);
top: 40%;
height: 450px;
border-radius:4px;
}
.OperateStatistic-footer{
text-align: center;
}
.OperateStatisticInName{
font-size: 17px;
margin-top: 16px;
text-align: center;
}
.OperateStatisticContent{
padding: 20px 0px 0px 0px;
}
.statisticForm{
display: table;
margin-left: auto;
margin-right: auto;
}
.deleteScene{
font-size: 24px;
color: #f00;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,93 @@
<template>
<!-- <el-dialog
title="修改步骤名称"
:visible.sync="dialogShow"
top="50px"
width="350px"
:before-do-close="roleDoClose"
:close-on-click-modal="false"
>
<div>
<el-input v-model="stepDescription" type="text" :style="{width: '80%'}" :maxlength="80" />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog> -->
<div v-if="dialogShow" class="StepDescription">
<div class="StepDescriptionIn">
<div class="StepDescriptionInName">修改步骤名称</div>
<div class="StepDescriptionInInput">
<el-input v-model="stepDescription" type="text" :style="{width: '80%'}" :maxlength="80" />
</div>
<div class="StepDescription-footer">
<el-button @click="roleDoClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
name:'StepDescription',
data() {
return {
dialogShow:false,
stepDescription:''
};
},
methods:{
roleDoClose() {
this.dialogShow = false;
this.$emit('cancleDescription');
},
confirm() {
if (this.stepDescription.trim().length > 0) {
this.dialogShow = false;
this.$emit('submitDescription', this.stepDescription);
}
},
doShow() {
this.stepDescription = '';
this.dialogShow = true;
}
}
};
</script>
<style lang="scss">
.StepDescription{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,0.7);
z-index: 2;
}
.StepDescriptionIn{
width: 350px;
background: #fff;
left: 50%;
position: absolute;
transform: translate(-50%,-50%);
top: 40%;
height: 240px;
border-radius:4px;
}
.StepDescription-footer{
text-align: center;
}
.StepDescriptionInName{
font-size: 17px;
margin-top: 16px;
text-align: center;
}
.StepDescriptionInInput{
margin-top: 30px;
margin-bottom: 40px;
text-align: center;
padding: 0px 20px;
}
</style>

View File

@ -0,0 +1,275 @@
<template>
<el-dialog title="修改场景" :visible.sync="dialogVisible" width="1000px" :before-close="doClose" center custom-class="sceneModifyOut">
<el-form ref="form" :rules="rules" :model="formModel" label-width="120px" class="sceneModify">
<el-form-item label="场景名称" :required="true" prop="name">
<el-input v-model="formModel.name" type="text" :style="{width: '80%'}" :maxlength="80" />
</el-form-item>
<el-form-item label="场景描述" :required="true" prop="description">
<el-input v-model="formModel.description" type="textarea" :style="{width: '80%'}" />
</el-form-item>
<el-form-item label="处置流程" :required="true" prop="disposalProcesses">
<el-input v-model="formModel.disposalProcesses" type="textarea" :style="{width: '80%'}" />
</el-form-item>
<el-form-item label="步骤描述" :required="true" prop="stepVOs">
<el-button type="primary" size="small" style="margin-bottom:10px" @click="addStepVO">添加</el-button>
<el-table :data="formModel.stepVOs" border style="width: 661px;">
<el-table-column prop="description" label=" 简介" width="200">
<template slot-scope="scope">
<!-- <el-form-item :prop="'stepVOs[' + scope.$index + '].description'"> -->
<el-input v-model="scope.row.description" type="text" :style="{width: '170px'}" size="small" />
<!-- </el-form-item> -->
</template>
</el-table-column>
<el-table-column prop="startActionId" label=" 首动作" width="200">
<template slot-scope="scope">
<!-- <el-form-item :prop="'stepVOs+[' + scope.$index + '].startActionId'"> -->
<el-select v-model="scope.row.startActionId" type="textarea" :style="{width: '170px'}" size="small">
<el-option
v-for="option in actionList"
:key="option.id"
:label="option.name"
:value="option.id"
/>
</el-select>
<!-- </el-form-item> -->
</template>
</el-table-column>
<el-table-column prop="endActionId" label=" 尾动作" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.endActionId" type="textarea" :style="{width: '170px'}" size="small">
<el-option
v-for="option in actionList"
:key="option.id"
:label="option.name"
:value="option.id"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="60">
<template slot-scope="scope">
<span class="el-icon-error deleteScene" @click="handleDelete(scope.$index)" />
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label=" 指令下达规则" :required="true" prop="commandPublishStatistics">
<el-button type="primary" size="small" style="margin-bottom:10px" @click="addStatistics">添加</el-button>
<el-table :data="formModel.commandPublishStatistics" border style="width: 751px;">
<el-table-column prop="keyWords" label=" 语音识别关键词列表" width="250">
<template slot-scope="scope" style="font-size:0">
<el-tag v-for="(tag,index) in scope.row.keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.$index,index)">{{ tag }}</el-tag>
<el-input
v-if="scope.row.inputVisible"
:ref="'saveTagInput'+scope.$index"
v-model="scope.row.inputValue"
size="small"
class="input-new-tag"
@keyup.enter.native="handleInputConfirm(scope.$index)"
@blur="handleInputConfirm(scope.$index)"
/>
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index)">添加</el-button>
</template>
</el-table-column>
<el-table-column prop="actionId" label="动作" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.actionId" type="textarea" :style="{width: '170px'}" size="small">
<el-option
v-for="option in actionList"
:key="option.id"
:label="option.name"
:value="option.id"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="timeOut" label="超时时间" width="150">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.timeOut"
:style="{width: '100px'}"
:min="0"
size="small"
:max="Infinity"
:step="1"
/>
</template>
</el-table-column>
<el-table-column prop="score" label="总分值" width="150">
<template slot-scope="scope">
<el-input-number
v-model="scope.row.score"
:style="{width: '100px'}"
:min="0"
size="small"
:max="Infinity"
:step="1"
/>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="运营部分总分" :required="true" prop="operationScore">
<el-input-number v-model="formModel.operationScore" :controls="true" :min="0" :max="100" :step="1" />
</el-form-item>
<el-form-item label="关联剧本" :required="true" prop="scriptId">
<!-- <el-input-number v-model="formModel.scriptId" :controls="true" :min="0" :max="100" :step="1" /> -->
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doUpdate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name:'UpdateScene',
props: {
scriptList:{
type: Array,
default() {
return [];
}
}
},
data() {
return {
dialogVisible:false,
sceneId:'',
actionList:[],
formModel:{
name:'', //
description:'', //
disposalProcesses:'', //
scriptId:'', // id
operationScore:0, //
main:true, //
stepVOs:[], //
commandPublishStatistics:[] //
}
};
},
computed:{
rules() {
const crules = {
name: [
{ required: true, validator: this.validateSceneName, trigger: 'blur' },
{ required: true, validator: this.validateSceneName, trigger: 'change' }
],
description: [
{ required: true, validator: this.validateDescription, trigger: 'blur' },
{ required: true, validator: this.validateDescription, trigger: 'change' }
],
disposalProcesses: [
{ required: true, validator: this.validateDisposalProcesses, trigger: 'blur' },
{ required: true, validator: this.validateDisposalProcesses, trigger: 'change' }
],
scriptId:[
{ required: true, message: '请选择剧本', trigger: 'change' }
],
operationScore:[
{ required: true, message: '请输入运营部分总分', trigger: 'blur' }
]
};
return crules;
}
},
methods:{
validateSceneName(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.name = this.formModel.name.replace(/\s/g, '');
return callback(new Error('请输入场景名称'));
} else {
return callback();
}
},
validateDescription(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.description = this.formModel.description.replace(/\s/g, '');
return callback(new Error('请输入场景描述'));
} else {
return callback();
}
},
validateDisposalProcesses(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.disposalProcesses = this.formModel.disposalProcesses.replace(/\s/g, '');
return callback(new Error('请输入处置流程'));
} else {
return callback();
}
},
doShow(sceneId) {
this.dialogVisible = true;
this.sceneId = sceneId;
},
doClose() {
this.$refs.form.resetFields();
this.dialogVisible = false;
},
doUpdate() {
},
addStepVO() {
this.formModel.stepVOs.push({competitionId:this.sceneId, description:'', startActionId:'', endActionId:''});
},
addStatistics() {
this.formModel.commandPublishStatistics.push({competitionId:this.sceneId, keyWords:[], actionId:'', timeOut:0, inputVisible:false, inputValue:'', score:0 });
},
handleDelete(index) {
this.formModel.stepVOs.splice(index, 1);
},
handleClose(index, tagIndex) {
const keyWords = this.formModel.commandPublishStatistics[index].keyWords;
keyWords.splice(tagIndex, 1);
},
handleInputConfirm(index) {
const inputValue = this.formModel.commandPublishStatistics[index].inputValue;
if (inputValue) {
this.formModel.commandPublishStatistics[index].keyWords.push(inputValue);
}
this.formModel.commandPublishStatistics[index].inputVisible = false;
this.formModel.commandPublishStatistics[index].inputValue = '';
},
showInput(index) {
this.formModel.commandPublishStatistics[index].inputVisible = true;
this.$nextTick(_ => {
this.$refs['saveTagInput' + index].$refs.input.focus();
});
}
}
};
</script>
<style lang="scss" scoped>
.deleteScene{
font-size: 24px;
color: #f00;
cursor: pointer;
}
.sceneModify{
height:500px;
overflow: auto;
}
.input-new-tag {
width: 60px;
margin-left: 10px;
margin-bottom: 10px;
vertical-align: bottom;
}
.button-new-tag{
margin-bottom:10px;
}
</style>
<style lang="scss">
.sceneModifyOut.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 25px 10px 30px 10px;
}
.el-tag {
margin-right: 10px;
margin-bottom: 10px;
vertical-align:top;
}
</style>

View File

@ -280,7 +280,7 @@ export default {
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
console.log(val, audio);
// console.log(val, audio);
if (audio !== null) {
if (val) {
audio.play();

View File

@ -771,7 +771,7 @@ export default {
this.$refs.tree.filter(val);
},
mapStationList(val) {
console.log(val);
// console.log(val);
}
},
beforeDestroy () {

View File

@ -2,7 +2,7 @@
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="半径:" prop="radius">
<el-input-number v-model="form.radius" controls-position="right" :min="5" size="small" />
<el-input-number v-model="form.radius" controls-position="right" :min="3" size="small" />
</el-form-item>
<el-form-item label="填充色:" prop="fillColor">
<el-color-picker v-model="form.fillColor" show-alpha size="small" />

View File

@ -54,8 +54,10 @@ export default {
typeList: [
{ name: '车头', value: 'psdLeft' },
{ name: '车尾', value: 'psdRight' },
{ name: '车厢', value: 'psdSystem' }
],
{ name: '车厢', value: 'psdSystem' },
{ name: 'APF', value: 'APF'}
],
rules: {
strokeColor: [
{ required: true, message: '请选择边框颜色', trigger: 'change' }

View File

@ -41,6 +41,30 @@
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="圆形" name="IscsCircle">
<iscs-circle
ref="iscsCircle"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="三角形" name="IscsTriangle">
<iscs-triangle
ref="iscsTriangle"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="表格" name="StateTable">
<state-table
ref="stateTable"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
@ -53,6 +77,10 @@ import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
import IscsCircle from '../icscComponents/circle';
import IscsTriangle from '../icscComponents/triangle';
import StateTable from '../icscComponents/stateTable';
export default {
name: 'IscsOperate',
@ -60,7 +88,10 @@ export default {
IscsRect,
IscsLine,
IscsText,
IscsButton
IscsButton,
IscsCircle,
IscsTriangle,
StateTable
},
mixins: [
],

View File

@ -57,6 +57,14 @@
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="三角形" name="IscsTriangle">
<iscs-triangle
ref="iscsTriangle"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="圆形" name="IscsCircle">
<iscs-circle
@ -121,6 +129,7 @@ import IscsRhombus from '../icscComponents/rhombus';
import IscsTick from '../icscComponents/tick';
import IscsStateTable from '../icscComponents/stateTable';
import IscsArrow from '../icscComponents/arrow';
import IscsTriangle from '../icscComponents/triangle';
import IscsCircle from '../icscComponents/circle';
import IscsPicture from '../icscComponents/picture';
import IscsPower from '../icscComponents/power';
@ -137,7 +146,8 @@ export default {
IscsTick,
IscsStateTable,
IscsArrow,
IscsRadioText,
IscsRadioText,
IscsTriangle,
IscsCircle,
IscsPower,
IscsPicture

View File

@ -1,13 +1,16 @@
<template>
<div style="height: 100%; width: 100%;overflow-y: auto;">
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
</div>
</template>
<script>
import PsdSystem from './psdSystem/index.vue';
import Substation from './powerMonitor/substation.vue';
export default {
components:{
PsdSystem
PsdSystem,
Substation
},
data() {
return {

View File

@ -0,0 +1,57 @@
<template>
<div class="Substation">
<div class="Substation_header">{{ stationName+' 屏蔽门系统' }}</div>
<div>
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>
<div class="nextButton">{{}}</div>
</div> -->
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
import {getIscsData} from '@/api/iscs';
export default {
name:'Substation',
components:{
iscsSystem
},
computed:{
stationName() {
return this.$route.query.stationName;
},
width() {
return window.innerWidth;
},
height() {
return 800;
}
},
mounted() {
const params = {
lineCode: this.$route.query.lineCode,
totalSystem: 'powerMonitoring02',
system: 'powerMonitoring',
userInterface: 'substation'
};
getIscsData(params).then(resp=>{
if (resp.data) {
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data);
}
});
}
};
</script>
<style lang="scss" scoped>
.Substation_header{
text-align: center;
margin-top: 15px;
color: #d8e9a5;
}
.Substation{
}
</style>

View File

@ -53,10 +53,24 @@ export default {
stationList:[],
group:'',
lineCode:'',
buttonId:'electric',
buttonId:'substation',
buttonList:{
stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 },
electric: {name:'电力监控系统', type:'totalSystem', id: 'electric', active:false, icon:iscs_icon2 },
electric: {name:'电力监控系统', type:'totalSystem', id: 'powerMonitoring', active:false, icon:iscs_icon2,
children:[
{
name: '牵引降压所主接线图',
mode: 'substation',
id: 'substation',
type: 'interface'
},
{
name: '能耗检测管理系统',
mode: 'energyDetected',
id: 'energyDetected',
type: 'interface'
}
] },
environment:{name:'环境与设备监控系统', type:'totalSystem', id: 'environment', active:false, icon:iscs_icon3 },
ffas: {name:'火灾报警系统', type:'totalSystem', id: 'ffas', mode: 'ffas', active:false, icon:iscs_icon4,
children:[
@ -385,6 +399,7 @@ export default {
bottom: 0;
left: 0;
padding-left: 5px;
z-index:3;
}
.bottom-box-in{
display: inline-block;

View File

@ -163,7 +163,7 @@ export default {
onKeyboard(hook) {
if (this.selected && this.selected.code) {
switch (hook) {
case 'Ctrl_C': {
case 'KeyC': {
const list = this.getSelectList();
if (list.length) {
this.copyList = [];
@ -189,7 +189,7 @@ export default {
this.copyModel = {};
}
} break;
case 'Ctrl_V': {
case 'KeyV': {
const list = this.getSelectList();
if (list.length) {
this.copyList.forEach(item => {

View File

@ -1,8 +1,8 @@
<template>
<div class="content_box">
<span>本产品基于长安玖琏</span><span v-if="!project.startsWith('design')">城市轨道交通实训云平台设计开发</span><span v-else>城市轨道交通设计云平台设计开发</span>
<br><span>实训平台网址</span><a target="_blank" href="https://joylink.club/login" style="color: #33F;text-decoration:underline;">https://joylink.club</a>
<br><span>设计平台网址</span><a target="_blank" href="https://joylink.club/design/login" style="color: #33F;text-decoration:underline;">https://joylink.club/design</a>
<br><span>实训平台网址</span><a target="_blank" href="https://joylink.club/cbtc/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/login</a>
<br><span>设计平台网址</span><a target="_blank" href="https://joylink.club/cbtc/design/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/design/login</a>
</div>
</template>

View File

@ -213,7 +213,7 @@ export default {
versionBaseNoShow: VersionBaseNoShow,
mainBodyNoShow: MainBodyNoShow,
noQrcodeList: NoQrcodeList,
expirationDate: 1605488400000,
expirationDate: 1606784400000,
countdown: null,
days: [0, 0, 0],
gameOver: false,
@ -581,7 +581,7 @@ export default {
if (difference <= 0) {
this.gameOver = true;
}
const day = Math.floor(difference / (24 * 60 * 60 * 1000));
const day = Math.ceil(difference / (24 * 60 * 60 * 1000));
this.days.push(Math.floor(day / 100));
this.days.push(Math.floor((day % 100) / 10));
this.days.push(day % 10);
@ -600,8 +600,8 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss">
$bg:#fff;
$light_gray:#eee;
$bg:#fff;
$light_gray:#eee;
.drts_title{
position: absolute;
top: 10%;
@ -664,49 +664,49 @@ export default {
bottom: 200px;
}
}
.login-container {
background: #E4EAEA;
.el-form-item{
background: #fff !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
.el-input {
height: 40px;
width: 85%;
background: #fff;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
.login-container {
background: #E4EAEA;
.el-form-item{
background: #fff !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
.el-input {
height: 40px;
width: 85%;
background: #fff;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
}
}
}
}
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.item_form_password{
margin-bottom: 10px;
}
.item_form_password{
margin-bottom: 10px;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
height: 23px;
margin-bottom: 10px;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
height: 23px;
margin-bottom: 10px;
}
.el-loading-spinner i {
font-size: 100px;
}
@ -721,23 +721,23 @@ export default {
font-size: 14px;
}
}
}
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg:#f0f0f0;
$qrbg:#fff;
$dark_gray:#889aa4;
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 106px;
cursor: pointer;
color: #225592;
font-size: 14px;
}
$bg:#f0f0f0;
$qrbg:#fff;
$dark_gray:#889aa4;
$light_gray:#eee;
$qrcodeSize: 270px;
.popover_box {
position: absolute;
right: 80px;
bottom: 106px;
cursor: pointer;
color: #225592;
font-size: 14px;
}
.countdown_box {
display: inline-block;
width: 35px;
@ -758,118 +758,118 @@ export default {
.news-box:hover {
color: #3943CB;
}
.login-container {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-origin: border-box;
background-size: 100% 100%;
.content-box{
width: 740px;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.text-box{
font-size: 40px;
font-weight: bold;
top: 150px;
width: 1000px;
text-align: center;
position: absolute;
}
.left-logo-box{
position: absolute;
top: 2%;
font-size: 28px;
font-weight: bold;
left: 2%;
.login-container {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-origin: border-box;
background-size: 100% 100%;
.content-box{
width: 740px;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
padding: 30px 30px 30px;
margin-bottom: 20px;
box-sizing: border-box;
position: relative;
}
.text-box{
font-size: 40px;
font-weight: bold;
top: 150px;
width: 1000px;
text-align: center;
position: absolute;
}
.left-logo-box{
position: absolute;
top: 2%;
font-size: 28px;
font-weight: bold;
left: 2%;
}
.logo{
vertical-align: middle;
}
.language_box{
position: absolute;
top: 20px;
right: 40px;
.language_btn{
/*font-weight: bold;*/
cursor: pointer;
font-size: 18px;
}
}
.login-form {
width: 440px;
padding: 0 50px;
}
.svg-container {
padding-left: 14px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
&_login {
font-size: 16px;
}
}
.title_box {
font-size: 20px;
color: #000;
margin: 0px auto 30px auto;
text-align: center;
}
.show-pwd {
position: absolute;
right: 10px;
top: 3px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
}
.logo{
vertical-align: middle;
}
.language_box{
position: absolute;
top: 20px;
right: 40px;
.language_btn{
/*font-weight: bold;*/
cursor: pointer;
font-size: 18px;
}
}
.login-form {
width: 440px;
padding: 0 50px;
}
.svg-container {
padding-left: 14px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
.qrcode-main{
width: 300px;
background-color: $qrbg;
text-align: center;
border-right: 1px solid #ececec;
.tip-info {
text-align: left;
display: inline-block;
color: green;
margin: 0 auto;
}
&_login {
font-size: 16px;
}
}
.login-code-box{
width: 150px;
margin: 0 auto;
cursor: pointer;
}
.title_box {
font-size: 20px;
color: #000;
margin: 0px auto 30px auto;
text-align: center;
}
.show-pwd {
position: absolute;
right: 10px;
top: 3px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
}
.qrcode-main{
width: 300px;
background-color: $qrbg;
text-align: center;
border-right: 1px solid #ececec;
.tip-info {
text-align: left;
display: inline-block;
color: green;
margin: 0 auto;
}
.login-code-box{
width: 150px;
margin: 0 auto;
cursor: pointer;
}
.system-type {
margin: 5px 0;
display: block;
}
.sub-title {
font-size: 16px;
text-align: center;
color: #353535;
line-height: 30px;
}
}
.system-type {
margin: 5px 0;
display: block;
}
.sub-title {
font-size: 16px;
text-align: center;
color: #353535;
line-height: 30px;
}
}
</style>

View File

@ -42,16 +42,20 @@
</div> -->
</div>
<div class="chat-box-content">
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
<div class="proper_title">{{ item.label }}</div>
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
<div v-if="data.show && item.id == 'driver'" class="proper_content_box" :class="{'active': data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="item.id != 'driver'" class="proper_content_box" :class="{'active':data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="data.loading" class="mask_loading">
<i class="el-icon-loading" style="margin-bottom: 4px;" />
<span>呼叫中</span>
<div style="position:relative">
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
<div class="proper_title">{{ item.label }}</div>
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
<div v-if="data.show && item.id == 'driver'" class="proper_content_box" :class="{'active': data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="item.id != 'driver'" class="proper_content_box" :class="{'active':data.active}" @click="handleCheckChange(data)">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</div>
<div v-if="data.loading" class="mask_loading">
<i class="el-icon-loading" style="margin-bottom: 4px;" />
<span>呼叫中</span>
</div>
<div v-if="data.isConnect||data.disabled" class="content_connect" />
</div>
</div>
<div v-if="connectSuccess" class="connectSuccess" />
</div>
</div>
<div class="chat-box-content1">
@ -167,6 +171,7 @@ export default {
commonConversation: false,
seconds:0,
inter:null,
connectSuccess:false,
recorders: null,
microphone:null,
createLoading:false,
@ -193,7 +198,6 @@ export default {
commonMemberList: [],
messageList: [], //
commonMessageList: [],
temData: [],
conversitionStateMap:{},
myMemberId: ''
};
@ -212,6 +216,7 @@ export default {
return this.$store.state.user.id;
},
conversitionId() {
console.log(this.conversitionStateMap, this.myMemberId, this.conversitionStateMap[this.myMemberId], (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}));
return (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}).conversitionId;
},
privateMemberList() {
@ -239,9 +244,10 @@ export default {
this.myMemberId = '';
} else {
this.myMemberId = (this.simulationUsers[this.userId] || {}).memberId;
this.cancelCommonConversation();
}
},
'$store.state.map.mapViewLoadedCount':function(val) {
'$store.state.map.mapViewLoadedCount': function(val) {
const object = document.querySelector('.menuButton');
if (object) {
const objectBottom = object.offsetHeight || 0;
@ -281,6 +287,20 @@ export default {
});
}
this.filterNode();
if (activeTrainList.length <= 0) {
this.resetCoversition();
this.treeData.forEach(item => {
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
});
}
});
}
// if (this.$refs.tree) {
// this.$refs.tree.filter(this.queryMember);
// }
@ -316,23 +336,22 @@ export default {
// 退
this.treeData.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach(data =>{
if (data.id == val.memberId) {
data.active = false;
}
});
const member = item.children[val.memberId];
member.active = false;
member.isConnect = false;
member.disabled = false;
}
});
},
'$store.state.training.memberList': function (val) {
if (val && val.length) {
this.memberData = this.$store.state.training.memberData;
const dispatcherList = [];
const electricDispatcherList = [];
const depotDispatcherList = [];
const stationSupervisorList = [];
const driverList = [];
const maintainerList = [];
const dispatcherList = {};
const electricDispatcherList = {};
const depotDispatcherList = {};
const stationSupervisorList = {};
const driverList = {};
const maintainerList = {};
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
this.memberData[item.id]['active'] = false;
@ -340,36 +359,40 @@ export default {
switch (item.type) {
case 'DISPATCHER':
this.memberData[item.id].label = '行调' + (item.name || '');
dispatcherList.push(this.memberData[item.id]);
this.memberData[item.id].labelName = '行调' + (item.name || '');
dispatcherList[item.id] = this.memberData[item.id];
break;
case 'ELECTRIC_DISPATCHER':
electricDispatcherList.push(this.memberData[item.id]);
electricDispatcherList[item.id] = this.memberData[item.id];
break;
case 'DEPOT_DISPATCHER':
this.memberData[item.id].label = '车辆段';
depotDispatcherList.push(this.memberData[item.id]);
this.memberData[item.id].labelName = '车辆段' + (item.name || '');
depotDispatcherList[item.id] = this.memberData[item.id];
break;
case 'STATION_SUPERVISOR':
this.memberData[item.id].label = device.name;
this.memberData[item.id].labelName = '值班员-' + device.name;
// this.memberData[item.id].label = '-' + device.name;
stationSupervisorList.push(this.memberData[item.id]);
stationSupervisorList[item.id] = this.memberData[item.id];
break;
case 'DRIVER':
// this.memberData[item.id].label = '-' + item.deviceCode;
this.memberData[item.id]['show'] = false;
this.memberData[item.id].label = item.deviceCode;
driverList.push(this.memberData[item.id]);
this.memberData[item.id].labelName = '司机-' + item.deviceCode;
driverList[item.id] = this.memberData[item.id];
break;
case 'MAINTAINER':
this.memberData[item.id].label = '通号' + (item.name || '');
this.memberData[item.id].labelName = '通号' + (item.name || '');
// this.memberData[item.id].label = item.name || '';
maintainerList.push(this.memberData[item.id]);
maintainerList[item.id] = this.memberData[item.id];
break;
}
});
// { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
stationSupervisorList.push({ label: '全部车站', value: 'allStation', active: false, sign: 'ALL_STATION' });
driverList.push({ label: '所有列车', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' });
stationSupervisorList['ALL_STATION'] = { label: '全部车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
driverList['ALL_TRAIN'] = { label: '所有司机', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' };
this.treeData = [{
label: '行调',
id: 'dispatcher',
@ -396,7 +419,6 @@ export default {
type: 'role',
children: depotDispatcherList
}];
this.temData = [...dispatcherList, ...stationSupervisorList, ...driverList, ...maintainerList, ...depotDispatcherList];
this.initCommonMemberList();
// this.$nextTick(() => {
// if (this.$refs.tree) {
@ -411,15 +433,13 @@ export default {
'$store.state.socket.acceptConversionInvite':function(val) {
if (this.conversitionId == val.id) {
this.treeData.forEach(data => {
data.children && data.children.forEach(item => {
if (val.memberId == item.id && val.memberId != this.myMemberId) {
if (item.active) {
item.loading = false;
} else {
item.active = true;
}
if (data.children && val.memberId != this.myMemberId) {
const member = data.children[val.memberId];
if (member) {
member.isConnect = true;
member.active ? member.loading = false : member.active = true;
}
});
}
});
}
}
@ -431,6 +451,15 @@ export default {
});
},
methods:{
getUserRole() {
if (this.userRole === 'AUDIENCE') {
this.goCommonConversation();
this.myMemberId = '';
} else {
this.myMemberId = (this.simulationUsers[this.userId] || {}).memberId;
this.cancelCommonConversation();
}
},
clickBtn() {
if (this.drawer) {
this.drawer = false;
@ -444,12 +473,15 @@ export default {
}
},
acceptUser(memberId) {
this.connectSuccess = true;
this.treeData.forEach(data => {
data.children && data.children.forEach(item => {
if (memberId == item.id) {
item.active = true;
if (data.children) {
const member = data.children[memberId];
if (member) {
member.active = true;
member.isConnect = true;
}
});
}
});
},
setSetting(data) {
@ -457,16 +489,57 @@ export default {
},
//
createCoversition() {
if (this.memberIdList.length) {
if (this.memberIdList.length || this.memberObject) {
this.createLoading = true;
this.treeData.forEach(data => {
data.children && data.children.forEach(item => {
if (item.active) {
item.loading = true;
}
if (this.memberIdList.length > 0) {
// this.memberObject
this.treeData.forEach(data => {
this.memberIdList.forEach(memberId=>{
const member = data.children[memberId];
if (member && member.active) { member.loading = true; }
});
});
});
} else {
// allTrain
if (this.memberObject == 'ALL_STATION') {
const stationList = Object.values(this.treeData[1].children);
const length = stationList.length;
stationList.forEach((item, index) => {
if (index != length - 1) {
item.active = true;
item.loading = true;
} else {
item.active = false;
item.loading = false;
}
});
} else if (this.memberObject == 'ALL_TRAIN') {
const trainList = Object.values(this.treeData[2].children);
const length = trainList.length;
trainList.forEach((item, index) => {
if (index != length - 1) {
item.active = true;
item.loading = true;
} else {
item.active = false;
item.loading = false;
}
});
}
}
startConversition(this.group, this.memberIdList, this.memberObject).then(resp => {
this.connectSuccess = true;
if (this.memberObject == 'ALL_STATION') {
const stationList = this.treeData[1].children;
const member = stationList['ALL_STATION'];
member.active = false;
member.isConnect = true;
} else if (this.memberObject == 'ALL_TRAIN') {
const trainList = this.treeData[2].children;
const train = trainList['ALL_TRAIN'];
train.active = false;
train.isConnect = true;
}
this.messageList = [];
this.memberIdList = [];
this.memberObject = '';
@ -595,10 +668,51 @@ export default {
},
//
handleCheckChange(data, jude = false) {
this.memberObject = '';
if (data.userId && data.userId == this.$store.state.user.id) {
return;
}
if (data.value == 'allConcentrateStation' || data.value == 'allStation' || data.value == 'allTrain') {
this.treeData.forEach(data => {
this.memberIdList.forEach(memberId=>{
const member = data.children[memberId];
if (member && member.active) { member.active = false; }
});
});
if (data.value == 'allStation') {
const stationList = Object.values(this.treeData[1].children);
const length = stationList.length;
if (!data.active) {
stationList.forEach((item, index) => {
if (index != length - 1) {
item.disabled = true;
}
});
} else {
stationList.forEach((item, index) => {
if (index != length - 1) {
item.disabled = false;
}
});
}
} else if (data.value == 'allTrain') {
const trainList = Object.values(this.treeData[2].children);
const length = trainList.length;
if (!data.active) {
trainList.forEach((item, index) => {
if (index != length - 1) {
item.disabled = true;
}
});
} else {
trainList.forEach((item, index) => {
if (index != length - 1) {
item.disabled = false;
}
});
}
}
this.memberIdList = [];
data.active = !data.active;
this.memberObject = data.sign;
} else {
@ -626,20 +740,35 @@ export default {
},
//
filterNode() {
this.treeData[2] && this.treeData[2]['children'].forEach(train => {
train.show = false;
if (this.activeTrains.includes(train.deviceCode)) {
train.show = true;
if (this.treeData[2]) {
const trainList = Object.values(this.treeData[2]['children']);
trainList.forEach(train => {
train.show = false;
if (this.activeTrains.includes(train.deviceCode)) {
train.show = true;
}
});
const member = this.treeData[2]['children']['ALL_TRAIN'];
if (this.activeTrains.length > 0) {
member.show = true;
} else {
this.memberObject = '';
const trainList = Object.values(this.treeData[2].children);
trainList.forEach(train=>{
if (train.active) {
train.active = false;
const memberId = train.id;
this.memberIdList.splice(this.memberIdList.indexOf(memberId), 1);
}
});
}
if (train.value == 'allTrain') {
train.show = true;
}
});
}
},
// 退
quitConversition() {
this.quitLoading = true;
overSimulationConversition(this.group, this.conversitionId).then(resp => {
this.connectSuccess = false;
this.conversitionMemberList = [];
this.messageList = [];
this.quitLoading = false;
@ -647,10 +776,13 @@ export default {
// this.$refs.tree && this.$refs.tree.filter(this.queryMember);
// });
this.treeData.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach(data =>{
if (item.children) {
const memberList = Object.values(item.children);
memberList.forEach(data =>{
data.active = false;
data.isConnect = false;
data.loading = false;
data.disabled = false;
});
}
});
@ -685,13 +817,15 @@ export default {
tempMessageList.push(message);
});
!conversation.over && conversation.memberList.forEach(member => {
this.conversitionStateMap[member.memberId] = {
conversationId: conversation.id,
const param = {
conversitionId: conversation.id,
privateMemberList: conversation.memberList,
privateMessageList: tempMessageList
};
this.$set(this.conversitionStateMap, member.memberId, param);
});
});
this.getUserRole();
}
this.commonMessageList = messages.sort(this.sortByMessageTime);
this.initCommonMemberList();
@ -774,6 +908,7 @@ export default {
resetCoversition() {
this.commonMessageList = [];
this.conversitionStateMap = {};
this.messageList = this.commonMessageList;
}
}
};
@ -838,6 +973,20 @@ export default {
border-radius:4px;
font-size: 14px;
}
.content_connect{
position: absolute;
width: 73px;
height: 73px;
left: 5px;
top: 0;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0,0,0,0);
flex-direction: column;
border-radius:4px;
font-size: 14px;
}
}
.menuTrainListBtn {
background: #fff;
@ -1014,5 +1163,13 @@ export default {
.chat-box-footer-send.disbled{
cursor: no-drop;
}
.connectSuccess{
position:absolute;
width:100%;
height:100%;
left:0;
top:0;
z-index:2;
}
</style>

View File

@ -73,7 +73,7 @@ export default {
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {
this.mainSceneData = [
{type: '车辆故障', scene: '列车救援'},
{type: '信号系统故障', scene: '道岔故障', id: '11'},
{type: '信号系统故障', scene: '道岔故障', id: '9'},
{type: '信号系统故障', scene: '区域控制器故障'},
{type: '信号系统故障', scene: '联锁故障'},
{type: '供电系统故障', scene: '接触轨(网)断电'},

View File

@ -58,9 +58,9 @@
</div>
</div>
<div v-else class="theoryExamBody">
<div class="theoryExamScore">{{ '测验得分:' }}<span class="resultScoreStyle">{{ resultScore+' 分' }}</span></div>
<div class="theoryExamWrongListName">错题列表</div>
<div class="theoryExamWrongList">
<div v-if="theoryExamWrongList.length>0" class="theoryExamWrongList">
<div class="theoryExamScore">{{ '测验得分:' }}<span class="resultScoreStyle">{{ resultScore+' 分' }}</span></div>
<div class="theoryExamWrongListName">错题列表</div>
<div class="theoryExamWrongListL">
<div class="QuestionName">{{ covertWrong() }}</div>
<div class="choiceList">
@ -98,6 +98,10 @@
</div>
</div>
</div>
<div v-else>
<div class="el-icon-success theoryExamEnd" />
<div class="theoryExamScore1">{{ '测验得分:' }}<span class="resultScoreStyle">{{ resultScore+' 分' }}</span></div>
</div>
</div>
</el-dialog>
</template>
@ -293,10 +297,20 @@ export default {
this.theoryExamWrongList = writeList.filter(wrong=>{
return wrong.correct == false;
});
this.resultScore = writeList.reduce((prev, cur, index, arr)=>{
return prev.score == undefined ? prev + cur.score : prev.score + cur.score;
});
this.getWrongDataOption();
if (writeList.length > 0) {
if (writeList.length >= 2) {
this.resultScore = writeList.reduce((prev, cur, index, arr)=>{
return prev.score == undefined ? prev + cur.score : prev.score + cur.score;
});
} else {
this.resultScore = writeList[0].score;
}
} else {
this.resultScore = 0;
}
if (this.theoryExamWrongList.length > 0) {
this.getWrongDataOption();
}
}).catch(()=>{
this.$message.error('提交失败,请稍后再试');
@ -419,6 +433,8 @@ export default {
overflow:auto;
padding-left: 10px;
width: 256px;
border: 1px #ececec solid;
border-radius: 5px;
}
.eachQuestionNum{
color: #8f7f70;
@ -524,6 +540,17 @@ export default {
margin-top: 10px;
font-size: 15px;
}
.theoryExamScore1{
text-align: center;
font-size: 17px;
margin-top: 20px;
}
.theoryExamEnd{
font-size: 90px;
color: #007b00;
margin-left: 340px;
margin-top: 115px;
}
.theoryExamWrongList{}
.theoryExamWrongListL{
width: 500px;

View File

@ -1,5 +1,6 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import store from '@/store/index_APP_TARGET';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
// 操作
export const operateEnum = {
Set_Fault:{
@ -146,7 +147,28 @@ export const operateEnum = {
// 转换函数
export function covertOperate(operationType, operationParamMap) {
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
// covertOperation(operationType);
let deviceName = '';
const device = store.getters['map/getDeviceByCode'](operationParamMap.code);
if (device._type == 'StationStand') {
const station = store.getters['map/getDeviceByCode'](device.stationCode);
deviceName += '【车站-' + station.name + '】/';
} else {
deviceName = '' + device.name;
}
let tip = '请找到' + deviceType[device._type] + deviceName + ',';
if (operationType == 'Set_Fault') {
tip += '设置故障,';
} else {
tip += '取消故障,';
}
const data = deviceFaultType[device._type];
data.forEach(each=>{
if (each.value == operationParamMap.faultType) {
tip += '参数为:' + each.label;
}
});
return tip;
} else {
let device = operationType.split('_')[0];
if (device == 'CM') {

View File

@ -39,7 +39,7 @@ export default {
this.$emit('allowCreatCoversition');
val.conversationMemberIds.forEach(id=>{
if (val.memberId != id) {
inviteMember.push((this.memberData[id] || {label: ''}).label);
inviteMember.push((this.memberData[id] || {labelName: ''}).labelName);
}
});
this.scriptTipMessage = '请创建会话,选择' + inviteMember.toString();
@ -55,7 +55,7 @@ export default {
Open_Or_Close_Door:'开关门',
Switch_Hook_Lock: '道岔钩锁'
};
this.scriptTipMessage = '请对【' + targetName.label + '】下达【' + CommandList[val.commandInitiateVO.commandType] + '】指令';
this.scriptTipMessage = '请对【' + targetName.labelName + '】下达【' + CommandList[val.commandInitiateVO.commandType] + '】指令';
} else if (val.type == 'Drive') {
if (val.targetSectionCode) {
const section = this.$store.getters['map/getDeviceByCode'](val.targetSectionCode);

View File

@ -26,7 +26,7 @@
@node-click="handleNodeClick"
>
<span :id="data.id" slot-scope="{ node, data }" class="custom-tree-node">
<span>{{ node.label }}</span>
<span>{{ data.labelName }}</span>
<span v-if="data.type">
<el-select :key="data.id" v-model="data.userId" placeholder="请选择" clearable size="mini" @change="nodeMemberChange($event, data)">
<el-option
@ -89,7 +89,7 @@ export default {
},
defaultProps: {
children: 'children',
label: 'label'
label: 'labelName'
},
simulationUserList: [],
stationList: [],
@ -99,19 +99,19 @@ export default {
doorList: [],
memberData: {},
treeData: [{
label: '行调',
labelName: '行调',
children: []
}, {
label: '车站值班员',
labelName: '车站值班员',
children: []
}, {
label: '司机',
labelName: '司机',
children: []
}, {
label: '通号',
labelName: '通号',
children: []
}, {
label: '车辆段',
labelName: '车辆段',
children: []
}]
};
@ -137,17 +137,12 @@ export default {
queryMember(val) {
this.$refs.tree.filter(val);
},
// '$store.state.socket.simulationRoleList':function(val) {
// if (val && val.length) {
// this.handlerMemberOnOff(val);
// }
// },
'$store.state.training.simulationUserList': function(val) {
this.simulationUserList = val;
},
'$store.state.training.memberList': function (val) {
if (val && val.length) {
this.memberData = JSON.parse(JSON.stringify(this.$store.state.training.memberData));
this.memberData = this.$store.state.training.memberData;
const dispatcherList = [];
const electricDispatcherList = [];
const depotDispatcherList = [];
@ -158,7 +153,7 @@ export default {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) {
case 'DISPATCHER':
this.memberData[item.id].label = '行调' + (item.name || '');
this.memberData[item.id].labelName = '行调' + (item.name || '');
dispatcherList.push(this.memberData[item.id]);
break;
case 'ELECTRIC_DISPATCHER':
@ -168,37 +163,37 @@ export default {
depotDispatcherList.push(this.memberData[item.id]);
break;
case 'STATION_SUPERVISOR':
this.memberData[item.id].label = '值班员-' + device.name;
this.memberData[item.id].labelName = '值班员-' + device.name;
stationSupervisorList.push(this.memberData[item.id]);
break;
case 'DRIVER':
this.memberData[item.id].label = '司机-列车' + item.deviceCode;
this.memberData[item.id].labelName = '司机-列车' + item.deviceCode;
driverList.push(this.memberData[item.id]);
break;
case 'MAINTAINER':
this.memberData[item.id].label = '通号' + (item.name || '');
this.memberData[item.id].labelName = '通号' + (item.name || '');
maintainerList.push(this.memberData[item.id]);
break;
}
});
this.treeData = [{
label: '行调',
labelName: '行调',
id: 'dispatcher',
children: dispatcherList
}, {
label: '车站值班员',
labelName: '车站值班员',
id: 'stationSupervisor',
children: stationSupervisorList
}, {
label: '司机',
labelName: '司机',
id: 'driver',
children: driverList
}, {
label: '通号',
labelName: '通号',
id: 'maintainer',
children: maintainerList
}, {
label: '车辆段',
labelName: '车辆段',
id: 'depotDispatcher',
children: depotDispatcherList
}];
@ -275,7 +270,7 @@ export default {
if (data.type && data.type === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
driverNoShow = false;
}
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;
return (data.labelName.indexOf(value) !== -1 || flag) && driverNoShow;
}
// handlerMemberOnOff(data) {
// this.$store.dispatch('training/updateMemberAndUser', { simulationUserList: data, userId: this.userId });

View File

@ -80,9 +80,9 @@ export default {
height: 800,
roadData: [],
focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst'],
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking'],
selectList: ['runMode'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking'],
rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
numberList: [],
@ -104,7 +104,8 @@ export default {
switchLossChain: '道岔故障失表是否联动',
rmAtpSpeed: 'RM模式下ATP防护速度',
urmAtpSpeed: 'URM下ATP防护速度',
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路'
guideNeedRouteSettingFirst: '引导办理是否需要先排列进路',
signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机'
}
};
},

View File

@ -21,8 +21,8 @@ module.exports = {
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/',
outputDir: 'dist',
publicPath: '/cbtc',
outputDir: 'dist/cbtc',
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
lintOnSave: false,
productionSourceMap: false, // 项目打包后是否压缩