-
@@ -16,7 +15,6 @@ import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionContr
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SectionDetail from './dialog/sectionDetail';
-import TrainCreate from './dialog/trainCreate';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@@ -31,7 +29,6 @@ export default {
PopMenu,
SectionControl,
SectionDetail,
- TrainCreate,
NoticeInfo,
TrainAddPlan,
SetFault
From 2c5c30216fc0df124dcf29ae05f61aff56f57157 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Mon, 6 Jul 2020 17:02:13 +0800
Subject: [PATCH 15/42] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B1=8F?=
=?UTF-8?q?=E9=A2=84=E8=A7=88=E6=B5=81=E7=A8=8B=EF=BC=8C=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=88=86=E5=B1=8F=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmapNew/map.js | 57 +++--
src/jmapNew/painter.js | 6 +
src/jmapNew/shape/Signal/ESigLamp.js | 6 +-
src/jmapNew/theme/haerbin_01/model.js | 1 +
src/jmapNew/theme/ningbo_01/model.js | 1 +
src/jmapNew/transformHandleScreen.js | 48 +++-
src/jmapNew/utils/parser.js | 7 +
src/router/index_Common.js | 6 +
src/store/modules/map.js | 6 +-
src/views/designPlatform/bigScreen.vue | 34 +--
src/views/designPlatform/bigSplitScreen.vue | 236 ++++++++++++++++++
src/views/designPlatform/demonList.vue | 12 +
src/views/newMap/jlmapNew/index.vue | 6 +-
src/views/newMap/jointTrainingNew/index.vue | 2 -
.../newMap/newMapdraft/mapoperate/index.vue | 4 +-
.../newMapdraft/mapoperate/splitScreen.vue | 82 ++++--
16 files changed, 455 insertions(+), 59 deletions(-)
create mode 100644 src/views/designPlatform/bigSplitScreen.vue
diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index 659c4e500..b33d1af11 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -11,7 +11,7 @@ import { selectLineCode } from './config/deviceStyle';
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
import { deepAssign } from '@/utils/index';
import store from '@/store/index_APP_TARGET';
-import { loadPropConvert } from './theme/factory';
+import Vue from 'vue';
const renderer = 'canvas';
const devicePixelRatio = 1;
@@ -27,6 +27,9 @@ class Jlmap {
// 线路参数
this.lineCode = '';
+ // 大屏判断
+ this.screenFlag = false;
+
// 皮肤风格
this.style = {};
@@ -135,8 +138,12 @@ class Jlmap {
setOptions(opts) {
const options = this.pullBack(opts);
- this.$options.update(options);
- this.$painter.updateTransform(this.$options);
+ if (this.screenFlag) {
+ this.$painter.updateScreen(options);
+ } else {
+ this.$options.update(options);
+ this.$painter.updateTransform(this.$options);
+ }
if (this.$options.disabled == true) {
this.$mouseController.disable();
} else {
@@ -148,6 +155,18 @@ class Jlmap {
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
}
+ switchScreen(data, num, sum) {
+ const sumHalf = sum / 2;
+ const dx = data.width / sumHalf;
+ const dy = data.height / sumHalf;
+ const row = num <= sumHalf ? 0 : 1;
+ const opts = {
+ dx: dx * (row == 0 ? num - 1 : num - sumHalf - 1),
+ dy: dy * row
+ };
+ this.$painter.updateScreenNum(opts);
+ }
+
setCenter(deviceCode) {
const device = this.mapDevice[deviceCode];
if (device && device.instance) {
@@ -157,20 +176,23 @@ class Jlmap {
}
}
setRevoverBigScreen() {
+ this.screenFlag = false;
this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
}
setRecover(opts) {
+ this.screenFlag = false;
this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY });
}
setUpdateScreen(opts) {
this.setRecover({ scaleRate: 1, offsetX: 0, offsetY: 0 });
- const arr = [];
+ this.screenFlag = true;
+ const screenList = [];
const rectList = [];
let rect = '';
for (const i in this.mapDevice) {
const element = this.mapDevice[i];
- if (element.instance && element._type == 'Section') {
+ if (element.instance && (element._type == 'Section' || element._type == 'Station' || element._type == 'StationStand')) {
if (!rect) {
rect = element.instance.getBoundingRect().clone();
} else {
@@ -178,18 +200,23 @@ class Jlmap {
}
}
}
- const screenSplit = opts.list.length ? opts.list : loadPropConvert(this.lineCode).screenSplit;
+ if (!opts.offsetList) {
+ opts.offsetList = [];
+ }
+ const screenSplit = opts.list.length ? opts.list : Vue.prototype.$theme.loadPropConvert(this.lineCode).screenSplit;
+ const screenDifference = Vue.prototype.$theme.loadPropConvert(this.lineCode).screenDifference || 160;
const splitList = JSON.parse(JSON.stringify(screenSplit));
const num = screenSplit.length + 1;
const offsetY = (opts.height - 100) / num; // 高度差
const maxWidth = rect.width;
splitList.push(maxWidth);
- const scaleWidth = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
- const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
- const scale = Math.min(scaleWidth, scaleHeight);
+ const scaleX = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
+ const scaleY = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
+ const scale = Math.min(scaleX, scaleY);
+ // console.log('scaleX', scaleX, 'scaleY', scaleY, 'scale', scale, offsetY, rect.height * scale);
- // const offsetHeight = (offsetY - (rect.height * scale)) + Math.abs(rect.x * scale); // 高度差
- // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleWidth, scaleHeight);
+ // const offsetHeight = (offsetY - (rect.height * scale)) / 2; // 高度差
+ // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleX, scaleY);
for (let i = 0; i < splitList.length; i++) {
let offsetX = '';
@@ -199,13 +226,13 @@ class Jlmap {
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
offsetX = splitList[i - 1] * scale - dx;
}
- // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -(offsetY * i) - offsetHeight};
- const param = { scaleRate: scale, offsetX: offsetX, offsetY: -160 - (offsetY * i) };
- arr.push(param);
+ const offset = opts.offsetList[i] || 0;
+ const param = { scaleRateX: scale, scaleRateY: scale, offsetX: offsetX, offsetY: -screenDifference - (offsetY * i) - offset };
+ screenList.push(param);
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect);
}
- this.$painter.updateTransform1(arr, rectList);
+ this.$painter.updateTransform1(screenList, rectList);
}
setLevelVisible(list) {
diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js
index 6e9c41a15..f88631836 100644
--- a/src/jmapNew/painter.js
+++ b/src/jmapNew/painter.js
@@ -199,6 +199,12 @@ class Painter {
this.$transformHandle.updateTransform(opt);
}
+ updateScreen(opt) {
+ this.$transformHandleScreen.updataOffset(opt);
+ }
+ updateScreenNum(opts) {
+ this.$transformHandleScreen.updataOffsetNum(opts);
+ }
updateTransform1(list, opts) {
this.screenFlag = true;
this.$transformHandleScreen.updateTransform(list, opts);
diff --git a/src/jmapNew/shape/Signal/ESigLamp.js b/src/jmapNew/shape/Signal/ESigLamp.js
index 88a4dddc9..910688131 100644
--- a/src/jmapNew/shape/Signal/ESigLamp.js
+++ b/src/jmapNew/shape/Signal/ESigLamp.js
@@ -1,7 +1,7 @@
import Line from 'zrender/src/graphic/shape/Line';
import Arc from 'zrender/src/graphic/shape/Arc';
import Group from 'zrender/src/container/Group';
-import Path from 'zrender/src/graphic/Path';
+// import Path from 'zrender/src/graphic/Path';
import {ESigFault} from './ESigFault';
class ESigLamp extends Group {
@@ -103,11 +103,11 @@ class ESigLamp extends Group {
}
faultShow() {
- this.lampFault.show();
+ this.lampFault && this.lampFault.show();
}
faultHide() {
- this.lampFault.hide();
+ this.lampFault && this.lampFault.hide();
}
setColor(color) {
diff --git a/src/jmapNew/theme/haerbin_01/model.js b/src/jmapNew/theme/haerbin_01/model.js
index c7d80a99e..53a250e7f 100644
--- a/src/jmapNew/theme/haerbin_01/model.js
+++ b/src/jmapNew/theme/haerbin_01/model.js
@@ -3,6 +3,7 @@ import deviceType from '../../constant/deviceType';
class Model {
constructor() {
this.screenLine = 3;
+ this.screenDifference = 50;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
diff --git a/src/jmapNew/theme/ningbo_01/model.js b/src/jmapNew/theme/ningbo_01/model.js
index 89c5550cf..c00fd4260 100644
--- a/src/jmapNew/theme/ningbo_01/model.js
+++ b/src/jmapNew/theme/ningbo_01/model.js
@@ -4,6 +4,7 @@ class Model {
constructor() {
this.screenLine = 3;
this.screenSplit = ['5165', '10303'];
+ this.screenDifference = 180;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
diff --git a/src/jmapNew/transformHandleScreen.js b/src/jmapNew/transformHandleScreen.js
index 07f17fc9f..0e3a9e549 100644
--- a/src/jmapNew/transformHandleScreen.js
+++ b/src/jmapNew/transformHandleScreen.js
@@ -1,6 +1,5 @@
-import {createTransform, createBoundingRect} from './utils/parser';
-
+import {createTransform1, createBoundingRect} from './utils/parser';
class TransformHandle {
constructor(painter) {
this.$painter = painter;
@@ -9,7 +8,13 @@ class TransformHandle {
this.rect = { x: 0, y: 0, width: 0, height: 0 };
this.rectList = [];
- this.transform = [createTransform({ scaleRate: 1, offsetX: 0, offsetY: 0 })];
+ this.transformInit = [];
+ this.transform = [createTransform1({ scaleRateX: 1, scaleRateY: 1, offsetX: 0, offsetY: 0 })];
+ }
+
+ revisibleView(view) {
+ view.show();
+ view.dirty();
}
checkVisible(view, rect) {
@@ -31,6 +36,7 @@ class TransformHandle {
const rect = this.rectList[i];
if (this.checkVisible(view, rect)) {
view.transform = this.transform[i];
+ view.transformIndex = i;
view.decomposeTransform(); // 修改 transform 后同步位置
if (view.screenShow) {
view.screenShow();
@@ -44,6 +50,24 @@ class TransformHandle {
}
}
+ // 视图进行缩放/平移
+ transformView1(view) {
+ if (view) {
+ view.transform = this.transform[view.transformIndex];
+ view.decomposeTransform();
+ if (view.screenShow) {
+ view.screenShow();
+ } else {
+ view.show();
+ }
+ view.dirty();
+ }
+ }
+ // 处理所有视图缩放/平移
+ transformAll1() {
+ this.traverse(this.transformView1, this);
+ }
+
// 处理所有视图缩放/平移
transformAll() {
this.traverse(this.transformView, this);
@@ -59,10 +83,26 @@ class TransformHandle {
this.rectList = rectList;
this.transform = [];
list.forEach(item => {
- this.transform.push(createTransform(item));
+ this.transform.push(createTransform1(item));
});
+ this.transformInit = JSON.parse(JSON.stringify(this.transform));
this.transformAll();
}
+ updataOffset(opt) {
+ this.transform.forEach(item => {
+ item[4] = item[4] + opt.dx;
+ item[5] = item[5] + opt.dy;
+ });
+ this.transformAll1();
+ }
+ updataOffsetNum(opts) {
+ this.transform = JSON.parse(JSON.stringify(this.transformInit));
+ this.transform.forEach(item => {
+ item[4] = item[4] - opts.dx;
+ item[5] = item[5] - opts.dy;
+ });
+ this.transformAll1();
+ }
// 更新画布尺寸
updateZrSize(opts) {
diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js
index c803229e2..150f053ca 100644
--- a/src/jmapNew/utils/parser.js
+++ b/src/jmapNew/utils/parser.js
@@ -12,6 +12,13 @@ export function createTransform(opts) {
return transform;
}
+export function createTransform1(opts) {
+ let transform = matrix.create();
+ transform = matrix.scale(matrix.create(), transform, [opts.scaleRateX, opts.scaleRateY]);
+ transform = matrix.translate(matrix.create(), transform, [-opts.offsetX, -opts.offsetY]);
+ return transform;
+}
+
export function createBoundingRect(view) {
const rect = view.getBoundingRect().clone();
const scale = view.scale[0];
diff --git a/src/router/index_Common.js b/src/router/index_Common.js
index 50056025c..42a9fae76 100644
--- a/src/router/index_Common.js
+++ b/src/router/index_Common.js
@@ -89,6 +89,7 @@ const DesignPlatform = () => import('@/views/designPlatform/index');
const MapPreview = () => import('@/views/designPlatform/mapPreview');
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const BigScreen = () => import('@/views/designPlatform/bigScreen');
+const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
// const DesignPlatformUser = () => import('@/views/designUser/index');
@@ -451,6 +452,11 @@ export const asyncRouter = [
component: BigScreen,
hidden: true
},
+ {
+ path: 'bigSplitScreen/:mapId',
+ component: BigSplitScreen,
+ hidden: true
+ },
{ // ibp列表
path: 'ibp/home/:mapId',
component: IbpHome,
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index 2218183c2..86abc5e2a 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -416,11 +416,11 @@ const map = {
return [];
}
},
- bigScreenSplitConfig: (state) => {
+ bigScreenConfig: (state) => {
if (state.map) {
- return state.map.bigScreenSplitConfig || [];
+ return state.map.bigScreenConfig || {};
} else {
- return [];
+ return {};
}
},
indicatorLightList: (state) => {
diff --git a/src/views/designPlatform/bigScreen.vue b/src/views/designPlatform/bigScreen.vue
index 4856cf80c..831eb74dd 100644
--- a/src/views/designPlatform/bigScreen.vue
+++ b/src/views/designPlatform/bigScreen.vue
@@ -31,10 +31,10 @@ export default {
},
data() {
return {
- size: {
- width: document.documentElement.clientWidth - 400,
- height: document.documentElement.clientHeight - 80
- },
+ // size: {
+ // width: document.documentElement.clientWidth - 400,
+ // height: document.documentElement.clientHeight - 80
+ // },
maskOpen: false,
maskWidth: '100%',
disPlay: false
@@ -45,10 +45,10 @@ export default {
return this.$route.params.mapId;
},
height() {
- return this.$store.state.app.height - 50 - 30;
+ return this.$store.state.app.height - 50 - 40;
},
...mapGetters('map', [
- 'bigScreenSplitConfig'
+ 'bigScreenConfig'
]),
...mapGetters('config', [
'canvasId'
@@ -69,7 +69,7 @@ export default {
'$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false);
this.$jlmap.off('zoom');
- this.$jlmap.off('pan');
+ // this.$jlmap.off('pan');
this.handleUpdateScreen();
if (this.$route.query.group) {
this.subscribe();
@@ -135,19 +135,24 @@ export default {
},
handleUpdateScreen() {
this.maskOpen = false;
- if (this.bigScreenSplitConfig.length) {
+ if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
+ const offsetList = this.bigScreenConfig.offsetList;
+ const width = this.bigScreenConfig.width;
+ const height = this.bigScreenConfig.height;
if (this.widthLeft) {
const size = {
- width: this.$store.state.app.width - (this.widthLeft || 450) - 2,
- height: this.height,
- list: this.bigScreenSplitConfig.map(ele => ele.position)
+ width: (this.$store.state.app.width - (this.widthLeft || 450) - 2) * width,
+ height: this.height * height,
+ list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
+ offsetList: offsetList
};
this.$jlmap.setUpdateScreen(size);
} else {
const size = {
- width: this.$store.state.app.width - 2,
- height: this.$store.state.app.height,
- list: this.bigScreenSplitConfig.map(ele => ele.position)
+ width: (this.$store.state.app.width - 2) * width,
+ height: this.$store.state.app.height * height,
+ list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
+ offsetList: offsetList
};
this.$jlmap.setUpdateScreen(size);
}
@@ -185,6 +190,7 @@ export default {
.map-view {
float: left;
width: auto;
+ overflow: hidden;
}
.mask{
opacity: 1;
diff --git a/src/views/designPlatform/bigSplitScreen.vue b/src/views/designPlatform/bigSplitScreen.vue
new file mode 100644
index 000000000..3a11678c4
--- /dev/null
+++ b/src/views/designPlatform/bigSplitScreen.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('scriptRecord.scriptBack') }}
+
+
+
+
+
+
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index e48ed9465..d2ded51eb 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -127,6 +127,10 @@ export default {
this.$router.push({ path: `/design/bigScreen/${obj.mapId}` });
break;
}
+ case 'bigSplitScreen': {
+ this.$router.push({ path: `/design/bigSplitScreen/${obj.mapId}` });
+ break;
+ }
}
},
async refresh(filterSelect) {
@@ -193,6 +197,14 @@ export default {
lineCode: elem.lineCode,
cityCode: elem.cityCode
});
+ elem.children.push({
+ id: '7',
+ name: '大屏分屏预览',
+ type: 'bigSplitScreen',
+ mapId: elem.id,
+ lineCode: elem.lineCode,
+ cityCode: elem.cityCode
+ });
});
this.treeData = res.data;
this.treeList = this.filterText
diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue
index 02108cd3c..5de995dc7 100644
--- a/src/views/newMap/jlmapNew/index.vue
+++ b/src/views/newMap/jlmapNew/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -446,6 +446,9 @@ export default {
});
this.$jlmap.updateShowStation(list, stationCode);
!isTraining && this.setCenter(stationCode);
+ },
+ setOffset(data, num, sum) {
+ this.$jlmap.switchScreen(data, num, sum);
}
}
};
@@ -469,6 +472,7 @@ export default {
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
+ background: #000;
}
.title{
text-align: right;
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 1b5566e8d..e7bc48ede 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -610,13 +610,11 @@ export default {
list: this.bigScreenSplitConfig.map(ele => ele.position)
};
this.$jlmap.off('zoom');
- this.$jlmap.off('pan');
this.$jlmap.setUpdateScreen(size);
}
},
cancelBigScreenMode() {
this.$jlmap.on('zoom');
- this.$jlmap.on('pan');
this.$jlmap.setRevoverBigScreen();
}
}
diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue
index 55928bf6c..6e8fc444c 100644
--- a/src/views/newMap/newMapdraft/mapoperate/index.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/index.vue
@@ -199,12 +199,12 @@
/>
-
+
-
+
diff --git a/src/views/newMap/newMapdraft/mapoperate/splitScreen.vue b/src/views/newMap/newMapdraft/mapoperate/splitScreen.vue
index 545c84657..298a96aec 100644
--- a/src/views/newMap/newMapdraft/mapoperate/splitScreen.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/splitScreen.vue
@@ -1,5 +1,5 @@
-
+
@@ -23,7 +23,7 @@
-
+
{{ cardTitle }}
生成
@@ -51,6 +51,21 @@
+
+
+
+ 屏
+
+
+
+ 屏
+
+
+
+
+
+
+
保存
预览
@@ -79,8 +94,23 @@ export default {
return {
tableData: [],
addModel: {
- sectionCode: ''
+ sectionCode: '',
+ offsetTop: 0
},
+ formData: {
+ width: 3,
+ height: 2,
+ offsetTop: 0
+ },
+ rules: {
+ width: [
+ { required: true, message: '请输入宽度', trigger: 'blur' }
+ ],
+ height: [
+ { required: true, message: '请输入高度', trigger: 'blur' }
+ ]
+ },
+ list: [],
field: '',
cardMode: 'generate',
index: '',
@@ -90,7 +120,7 @@ export default {
computed: {
...mapGetters('map', [
'sectionList',
- 'bigScreenSplitConfig'
+ 'bigScreenConfig'
]),
cardTitle() {
if (this.cardMode === 'generate') {
@@ -106,9 +136,9 @@ export default {
selected: function (val, oldVal) {
this.deviceSelect(val);
},
- bigScreenSplitConfig: function(val) {
- if (val.length) {
- this.handleList(val);
+ bigScreenConfig: function(data) {
+ if (data) {
+ this.handleList(data);
}
}
},
@@ -126,17 +156,31 @@ export default {
}
}
},
- handleList(list) {
+ handleList(data) {
this.tableData = [];
- list.forEach(item => {
+ data.bigScreenSplitConfig.forEach(item => {
const section = this.$store.getters['map/getDeviceByCode'](item.sectionCode);
const param = {
position: String(section.points[section.points.length - 1].x),
name: `${section.name}(${section.code})`,
+ offsetTop: 0,
sectionCode: section.code
};
this.tableData.push(param);
});
+ this.formData = {
+ width: data.width,
+ height: data.height
+ };
+ if (data.offsetList.length) {
+ this.list = [];
+ data.offsetList.forEach(item => {
+ const param = {offsetTop: item};
+ this.list.push(param);
+ });
+ } else {
+ this.list = this.tableData.concat({offsetTop: 0});
+ }
},
hover(field) {
this.field = field == this.field ? '' : field;
@@ -163,10 +207,12 @@ export default {
const section = this.$store.getters['map/getDeviceByCode'](this.addModel.sectionCode);
const param = {
position: String(section.points[section.points.length - 1].x),
+ offsetTop: 0,
name: `${section.name}(${section.code})`,
sectionCode: section.code
};
this.tableData.splice(this.index, 1, param);
+ this.list = this.tableData.concat({offsetTop: 0});
}
this.clear();
this.cardMode = 'generate';
@@ -176,7 +222,12 @@ export default {
if (this.tableData.length) {
const map = this.$store.state.map.map;
const param = {
- bigScreenSplitConfig: this.tableData,
+ bigScreenConfig: {
+ bigScreenSplitConfig: this.tableData,
+ width: this.formData.width,
+ height: this.formData.height,
+ offsetList: this.list.map(ele => ele.offsetTop)
+ },
mapId: this.$route.params.mapId
};
saveMap(Object.assign(map, param)).then(response => {
@@ -190,11 +241,11 @@ export default {
if (this.tableData.length) {
this.isPreview = false;
this.$jlmap && this.$jlmap.off('zoom');
- this.$jlmap && this.$jlmap.off('pan');
const size = {
- width: this.$jlmap.$zr.getWidth(),
- height: this.$jlmap.$zr.getHeight(),
- list: this.tableData.map(ele => ele.position)
+ width: this.$jlmap.$zr.getWidth() * this.formData.width,
+ height: this.$jlmap.$zr.getHeight() * this.formData.height,
+ list: this.tableData.map(ele => ele.position),
+ offsetList: this.list.map(ele => ele.offsetTop)
};
this.$jlmap && this.$jlmap.setUpdateScreen(size);
} else {
@@ -204,7 +255,6 @@ export default {
recover() { // 恢复缩放比
this.isPreview = true;
this.$jlmap && this.$jlmap.on('zoom');
- this.$jlmap && this.$jlmap.on('pan');
const param = {
scaleRate: this.$store.state.map.dataZoom.scaleRate,
offsetX: this.$store.state.map.dataZoom.offsetX,
@@ -224,9 +274,11 @@ export default {
const section = this.$store.getters['map/getDeviceByCode'](this.addModel.sectionCode);
this.tableData.push({
position: String(section.points[section.points.length - 1].x),
+ offsetTop: 0,
name: `${section.name}(${section.code})`,
sectionCode: section.code
});
+ this.list = this.tableData.concat({offsetTop: 0});
this.clear();
}
}
From 5f1a5b3092785edd6569d1bb67252bbb3ec31a6f Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 6 Jul 2020 17:49:17 +0800
Subject: [PATCH 16/42] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E7=BA=BF=E8=B7=AF?=
=?UTF-8?q?=E5=92=8C=E5=AE=81=E6=B3=A2=E4=B8=80=E5=8F=B7=E7=BA=BF=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=8A=A8=E6=89=8Bzc=E6=95=85=E9=9A=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/menus/dialog/setFault.vue | 19 ++++++---
src/jmapNew/theme/factory.js | 6 +++
.../theme/ningbo_01/menus/menuStation.vue | 39 ++++-------------
.../theme/xian_01/menus/menuStation.vue | 42 +++++--------------
.../theme/xian_02/menus/menuStation.vue | 42 ++++++-------------
src/scripts/cmdPlugin/Config.js | 6 ++-
6 files changed, 57 insertions(+), 97 deletions(-)
diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue
index 535965719..cc702aabf 100644
--- a/src/jmapNew/theme/components/menus/dialog/setFault.vue
+++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue
@@ -101,16 +101,25 @@ export default {
this.stationName = '';
this.operation = operate.operation;
this.cmdType = operate.cmdType;
+ if (selected._type == 'Station') {
+ if (selected.zcCode) {
+ selected = this.$store.getters['map/getDeviceByCode'](selected.zcCode);
+ } else {
+ selected._type = '';
+ }
+ }
this.deviceName = deviceType[selected._type] + '-' + selected.name;
this.faultList = deviceFaultType[selected._type];
- if (this.faultList.length) {
+ if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;
}
}
- this.dialogShow = true;
- this.$nextTick(function () {
- this.$store.dispatch('training/emitTipFresh');
- });
+ if (selected._type) {
+ this.dialogShow = true;
+ this.$nextTick(function () {
+ this.$store.dispatch('training/emitTipFresh');
+ });
+ }
},
doClose() {
this.loading = false;
diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js
index 3f21fcace..1cb580e17 100644
--- a/src/jmapNew/theme/factory.js
+++ b/src/jmapNew/theme/factory.js
@@ -34,6 +34,12 @@ class Theme {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
}
+ // // 加载菜单组件
+ // loadMenuComponent(code) {
+ // const menuCode = code || this._code;
+ // return new LoadMenuComponent(menuCode);
+ // }
+
// 加载运行图计划表组件
// loadPlanComponent(code) {
// return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
index 681f789db..eb0c01fd8 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -20,6 +21,7 @@ import { OperateMode } from '@/scripts/ConstDic';
import { OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
@@ -27,6 +29,7 @@ export default {
PopMenu,
StationCmdControl,
StationHumanControlAll,
+ SetFault,
StationSetRouteControlAll,
NoticeInfo
},
@@ -85,12 +88,12 @@ export default {
menuForce: [
{
label: '设置ZC故障',
- handler: this.undeveloped,
+ handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
label: '取消ZC故障',
- handler: this.undeveloped,
+ handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
@@ -142,42 +145,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/xian_01/menus/menuStation.vue b/src/jmapNew/theme/xian_01/menus/menuStation.vue
index 47f1bcd8b..876168d2d 100644
--- a/src/jmapNew/theme/xian_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuStation.vue
@@ -5,6 +5,7 @@
+
@@ -17,7 +18,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@@ -28,6 +29,7 @@ export default {
PopMenu,
StationCmdControl,
StationHumanControlAll,
+ SetFault,
StationSetRouteControlAll,
NoticeInfo
},
@@ -95,13 +97,13 @@ export default {
},
menuForce: [
{
- label: '设置故障',
- handler: this.undeveloped,
+ label: '设置ZC故障',
+ handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
- label: '取消故障',
- handler: this.undeveloped,
+ label: '取消ZC故障',
+ handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
@@ -157,40 +159,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/xian_02/menus/menuStation.vue b/src/jmapNew/theme/xian_02/menus/menuStation.vue
index 9f196748b..cdabc0a41 100644
--- a/src/jmapNew/theme/xian_02/menus/menuStation.vue
+++ b/src/jmapNew/theme/xian_02/menus/menuStation.vue
@@ -3,6 +3,7 @@
+
@@ -11,9 +12,10 @@ import PopMenu from '@/components/PopMenu/index';
import StationCmdControl from './dialog/stationCmdControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
-
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@@ -22,6 +24,7 @@ export default {
components: {
PopMenu,
StationCmdControl,
+ SetFault,
NoticeInfo
},
props: {
@@ -142,12 +145,12 @@ export default {
},
menuForce: [
{
- label: '设置故障',
- handler: this.undeveloped
+ label: '设置ZC故障',
+ handler: this.setStoppage
},
{
- label: '取消故障',
- handler: this.undeveloped
+ label: '取消ZC故障',
+ handler: this.cancelStoppage
}
]
};
@@ -198,39 +201,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 所有进路自排关
diff --git a/src/scripts/cmdPlugin/Config.js b/src/scripts/cmdPlugin/Config.js
index 9f0d7f242..273e606ee 100644
--- a/src/scripts/cmdPlugin/Config.js
+++ b/src/scripts/cmdPlugin/Config.js
@@ -40,6 +40,9 @@ export const deviceFaultType = {
],
StationStand: [
{label: '屏蔽门故障打开', value: 'FAULT_PSD_OPEN'}
+ ],
+ ZcControl:[
+ {label: 'zc故障', value: 'FAULT'}
]
};
/** 设备类型 */
@@ -49,5 +52,6 @@ export const deviceType = {
Switch: '道岔',
Station: '车站',
StationStand: '站台',
- Train: '列车'
+ Train: '列车',
+ ZcControl:'ZC'
};
From 9883d0ed3c9eca27b4cd0f808cf5f4edb9c5f96e Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Mon, 6 Jul 2020 18:00:44 +0800
Subject: [PATCH 17/42] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=AE=A4=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/chat.js | 45 ++-
src/store/modules/socket.js | 51 ++--
src/store/modules/training.js | 17 +-
src/views/newMap/jointTrainingNew/index.vue | 2 +-
.../memberManage/membersManage.vue | 2 +-
.../newMap/jointTrainingNew/menuDemon.vue | 2 +-
.../jointTrainingNew/newChatView/chatBox.vue | 196 ++++++++++---
.../newChatView/chatContent.vue | 258 ++++++++++++++++++
.../newChatView/chatMemberList.vue | 136 +++++++++
.../newChatView/chatTooltip.vue | 39 ++-
10 files changed, 641 insertions(+), 107 deletions(-)
create mode 100644 src/views/newMap/jointTrainingNew/newChatView/chatContent.vue
create mode 100644 src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue
diff --git a/src/api/chat.js b/src/api/chat.js
index 70eda4983..bb7e643a5 100644
--- a/src/api/chat.js
+++ b/src/api/chat.js
@@ -360,4 +360,47 @@ export function quitCoversition(group, conversationId) {
method: 'delete'
});
}
-
+/** 发起会话 */
+export function startConversition(group, data) {
+ return request({
+ url: `/api/simulation/${group}/conversation`,
+ method: 'post',
+ data: data
+ });
+}
+/** 根据会话id获取仿真会话 */
+export function getSimulationConversition(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}`,
+ method: 'get'
+ });
+}
+/** 发送会话消息 */
+export function sendSimulationConversition(group, conversationId, file) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/chat`,
+ method: 'post',
+ data: file
+ });
+}
+/** 成员接收仿真会话邀请 */
+export function acceptConversitionInvite(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/connect`,
+ method: 'post'
+ });
+}
+/** 结束仿真会话 */
+export function overSimulationConversition(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/over`,
+ method: 'put'
+ });
+}
+/** 获取所有会话 */
+export function getAllConversition(group) {
+ return request({
+ url: `/api/simulation/${group}/conversation/listAll`,
+ method: 'get'
+ });
+}
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index 9a73bb495..c8a787544 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -70,9 +70,8 @@ function handle(state, data) {
state.simulationReset = 'reset';
break;
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
- { handleSimulationInfo(state, msg);
- state.simuConversitionCount++;
- break; }
+ handleSimulationInfo(state, msg);
+ break;
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
handleSimulationInfo(state, msg);
break;
@@ -158,28 +157,20 @@ function handleRecordList(state, data) {
}
// 仿真内部聊天
function handleSimulationInfo(state, data) {
- const userId = store.state.user.id;
- let isSelf = false;
- if (data.member.userId == userId) {
- isSelf = true;
+ switch (data.messageType) {
+ case 'INVITE':
+ state.inviteSimulationConversition = data;
+ break;
+ case 'CONNECT':
+ state.acceptConversionInvite = data;
+ break;
+ case 'OVER':
+ state.overConversition = data;
+ break;
+ default:
+ state.simulationText = data;
+ break;
}
- const myDate = new Date();
- const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
- const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
- const params = {
- id:data.conversationId,
- self: isSelf,
- message: data.message,
- voice: data.isAudio,
- src: data.isAudio ? `/audio/${data.audioPath}` : '',
- member:data.member,
- memberOnline:data.member.online,
- chatTime: data.chatTime,
- targetUser:data.targetMember ? data.targetMember : 'All',
- all: data.all,
- date: +new Date(`${myDate1} ${chatTime}`)
- };
- state.simulationText = params;
}
// 剧本提示
@@ -232,7 +223,9 @@ const socket = {
acceptInviteChat:{}, // 综合演练仿真-聊天界面用户接受聊天邀请,
quitCoversition:{}, // 综合演练仿真-聊天界面用户退出群聊推送消息,
// coversitionList:{}, // 历史仿真-用户消息列表
-
+ inviteSimulationConversition: {}, // 仿真会话邀请消息
+ acceptConversionInvite:{}, // 仿真会话成员接收邀请
+ overConversition: {}, // 仿真会话结束
message: {}, // 仿真聊天
msgQueue: [], // 命令请求列表
msgHead: null, // 消息头
@@ -284,10 +277,6 @@ const socket = {
state.simulationReset = simulationReset;
},
- setSimulationTextList: (state, simulationText) => {
- state.simulationText = simulationText;
- },
-
setPayOrder: (state, payOrder) => {
state.payOrder = payOrder;
},
@@ -344,10 +333,6 @@ const socket = {
commit('setSimulationReset', '');
},
- setSimulationTextList: ({ commit }) => {
- commit('setSimulationTextList', {});
- },
-
setSimulationInvite: ({ commit }) => {
commit('setSimulationInvite', {});
},
diff --git a/src/store/modules/training.js b/src/store/modules/training.js
index 85f021393..ea47849ba 100644
--- a/src/store/modules/training.js
+++ b/src/store/modules/training.js
@@ -225,20 +225,21 @@ const training = {
setCenterStationCode:(state, centerStationCode) => {
state.centerStationCode = centerStationCode;
},
- setMemberList: (state, memberList) => {
+ setMemberList: (state, {memberList, userId}) => {
state.memberList = memberList;
state.memberData = {};
if (memberList && memberList.length) {
memberList.forEach(item => {
state.memberData[item.id] = deepAssign({userId: ''}, item);
+ state.memberData[item.id].disabled = userId == item.userId;
});
}
},
setSimulationUserList: (state, simulationUserList) => {
state.simulationUserList = simulationUserList;
},
- updateMemberAndUser: (state, data) => {
- data.forEach(item => {
+ updateMemberAndUser: (state, {simulationUserList, userId}) => {
+ simulationUserList.forEach(item => {
let memberIndex = -1;
let memberId = '';
state.simulationUserList.forEach((user, index) =>{
@@ -253,9 +254,11 @@ const training = {
try {
if (state.memberData && memberId !== item.memberId && memberId && state.memberData[memberId]) {
state.memberData[memberId].userId = '';
+ state.memberData[memberId].disabled = false;
}
if (state.memberData && memberId !== item.memberId && item.memberId && state.memberData[item.memberId]) {
state.memberData[item.memberId].userId = item.userId;
+ state.memberData[item.memberId].disabled = item.userId == userId;
}
if (item.messageType === 'ENTER' && memberIndex < 0) {
delete item.messageType;
@@ -671,16 +674,16 @@ const training = {
commit('setCenterStationCode', centerStationCode);
},
/** 设置综合演练仿真成员列表 */
- setMemberList: ({ commit }, memberList) => {
- commit('setMemberList', memberList);
+ setMemberList: ({ commit }, data) => {
+ commit('setMemberList', data);
},
/** 设置综合演练仿真用户列表 */
setSimulationUserList: ({ commit }, simulationUserList) => {
commit('setSimulationUserList', simulationUserList);
},
/** 更新综合演练仿真成员和用户列表 */
- updateMemberAndUser: ({ commit }, simulationUserList) => {
- commit('updateMemberAndUser', simulationUserList);
+ updateMemberAndUser: ({ commit }, data) => {
+ commit('updateMemberAndUser', data);
}
}
};
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 80ac2c21e..ae4cfe2d3 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -355,7 +355,7 @@ export default {
},
initMemberUserInfo() {
getSimulationMemberList(this.$route.query.group).then(resp => {
- this.$store.dispatch('training/setMemberList', resp.data);
+ this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
});
diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue
index 0aa3aec45..a26c29a39 100644
--- a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue
+++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue
@@ -280,7 +280,7 @@ export default {
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;
},
handlerMemberOnOff(data) {
- this.$store.dispatch('training/updateMemberAndUser', data);
+ this.$store.dispatch('training/updateMemberAndUser', {simulationUserList:data, userId: this.userId});
}
}
};
diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue
index e6bb75a4a..8da8fba5e 100644
--- a/src/views/newMap/jointTrainingNew/menuDemon.vue
+++ b/src/views/newMap/jointTrainingNew/menuDemon.vue
@@ -29,7 +29,7 @@
+
diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue b/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue
new file mode 100644
index 000000000..b4087b477
--- /dev/null
+++ b/src/views/newMap/jointTrainingNew/newChatView/chatMemberList.vue
@@ -0,0 +1,136 @@
+
+
+
成员列表
+
+
{{ memberData[member.memberId].label + (memberData[member.memberId].userId? '(' + simulationUsers[memberData[member.memberId].userId].nickName + ')': '') }}
+
+
+
+
+
+
diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatTooltip.vue b/src/views/newMap/jointTrainingNew/newChatView/chatTooltip.vue
index 5ccc19fc7..b1dca85e3 100644
--- a/src/views/newMap/jointTrainingNew/newChatView/chatTooltip.vue
+++ b/src/views/newMap/jointTrainingNew/newChatView/chatTooltip.vue
@@ -15,15 +15,17 @@
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue b/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
deleted file mode 100644
index 7405bdf0d..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ covertName(chatContent.targetUser,true) }}
-
- {{ chatContent.message }}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue b/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
deleted file mode 100644
index 9ac8b5273..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
{{ coversition.name }}
-
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue b/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue
deleted file mode 100644
index 5f16484b8..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-
-
-
- {{ member.memberName }}
-
-
-
-
- {{ member.memberName }}
-
-
-
-
-
-
- 创建会话
- 取消
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue b/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue
deleted file mode 100644
index 284a5f1a1..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatMemberList.vue
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
成员列表
-
-
{{ member.memberName }}
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatSetting.vue b/src/views/newMap/jointTrainingNew/chatView/chatSetting.vue
deleted file mode 100644
index 26e59ac5b..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatSetting.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue b/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
deleted file mode 100644
index 5ccc19fc7..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatTooltip.vue
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
index 2e050a6cd..071e9c0b1 100644
--- a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
+++ b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
@@ -498,14 +498,27 @@ export default {
}
});
},
+ sortByMessageTime(message1, message2) {
+ const time1 = new Date(message1.time).valueOf();
+ const time2 = new Date(message2.time).valueOf();
+ return time1 - time2;
+ },
isAudienceInitData() {
getAllConversition(this.group).then(resp => {
if (resp.data && resp.data.length) {
- let messageList = [];
+ const messageList = [];
resp.data.forEach(conversation => {
- messageList = [...messageList, ...conversation.messageList];
+ (conversation.messageList || []).forEach(message => {
+ const member = this.memberData[message.memberId];
+ message.src = `/audio/${message.audioPath}`;
+ message.members = conversation.memberList;
+ if (member) {
+ message.self = this.$store.state.userId == member.userId;
+ }
+ messageList.push(message);
+ });
});
- this.messageList = messageList;
+ this.messageList = messageList.sort(this.sortByMessageTime);
}
});
this.conversitionMemberList = [];
@@ -514,7 +527,7 @@ export default {
});
},
changeMessageList(data) {
- this.messageList.push(data);
+ this.messageList.push(data);
}
}
};
From f83a60bd88a339b9dc2d8cb1f41490d363a515bd Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Tue, 7 Jul 2020 14:58:10 +0800
Subject: [PATCH 27/42] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=AE=A4=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../jointTrainingNew/newChatView/chatBox.vue | 39 ++++++++++++++-----
src/views/studentManage/index.vue | 22 +++++------
2 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
index 071e9c0b1..2e057aee7 100644
--- a/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
+++ b/src/views/newMap/jointTrainingNew/newChatView/chatBox.vue
@@ -277,7 +277,7 @@ export default {
this.$refs.chatSetting.doClose();
} else {
this.firstClick && this.$nextTick(() => {
- this.userRole == 'AUDIENCE' && this.isAudienceInitData();
+ this.isAudienceInitData();
if (this.$refs.tree) {
this.$refs.tree.filter(this.queryMember);
}
@@ -508,15 +508,34 @@ export default {
if (resp.data && resp.data.length) {
const messageList = [];
resp.data.forEach(conversation => {
- (conversation.messageList || []).forEach(message => {
- const member = this.memberData[message.memberId];
- message.src = `/audio/${message.audioPath}`;
- message.members = conversation.memberList;
- if (member) {
- message.self = this.$store.state.userId == member.userId;
- }
- messageList.push(message);
- });
+ if (this.userRole == 'AUDIENCE') {
+ (conversation.messageList || []).forEach(message => {
+ const member = this.memberData[message.memberId];
+ message.src = `/audio/${message.audioPath}`;
+ message.members = conversation.memberList;
+ if (member) {
+ message.self = this.$store.state.userId == member.userId;
+ }
+ messageList.push(message);
+ });
+ } else {
+ const user = this.simulationUsers[this.$store.state.user.id];
+ !conversation.over && conversation.memberList.forEach(member =>{
+ if (member.memberId == user.memberId) {
+ this.conversitionMemberList = conversation.memberList;
+ this.conversitionId = conversation.id;
+ this.messageList = [];
+ conversation.messageList.forEach(message => {
+ const member = this.memberData[message.memberId];
+ message.src = `/audio/${message.audioPath}`;
+ if (member) {
+ message.self = this.$store.state.userId == member.userId;
+ }
+ this.messageList.push(message);
+ });
+ }
+ });
+ }
});
this.messageList = messageList.sort(this.sortByMessageTime);
}
diff --git a/src/views/studentManage/index.vue b/src/views/studentManage/index.vue
index 90ea21845..67ae2fad0 100644
--- a/src/views/studentManage/index.vue
+++ b/src/views/studentManage/index.vue
@@ -331,30 +331,30 @@ export default {
item.scores.forEach(elem => {
if (elem.prdType === '01') {
this.showLocal = true;
- localExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
- localLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
+ localExamSocreRadio = elem.examSocreRadio * 60 / item.scores.length;
+ localLessonPassRate = elem.lessonPassRate * 30 / item.scores.length;
totolScore += localExamSocreRadio * 100;
totolScore += localLessonPassRate * 100;
} else if (elem.prdType === '02') {
this.showCenter = true;
- centerExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
- centerLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
+ centerExamSocreRadio = elem.examSocreRadio * 60 / item.scores.length;
+ centerLessonPassRate = elem.lessonPassRate * 30 / item.scores.length;
totolScore += centerExamSocreRadio * 100;
totolScore += centerLessonPassRate * 100;
}
});
- totolScore += item.attendance * 100 * 10 / 100 * 100;
+ totolScore += item.attendance * 100 * 10;
this.tableData.push(
{
index: index + 1,
name: item.name,
studentID: item.studentID,
- attendance: item.attendance * 100 * 10 / 100,
- localExamSocreRadio:localExamSocreRadio,
- localLessonPassRate: localLessonPassRate,
- centerExamSocreRadio: centerExamSocreRadio,
- centerLessonPassRate: centerLessonPassRate,
- totolScore: totolScore / 100
+ attendance: Math.round(item.attendance * 10) / 10,
+ localExamSocreRadio: Math.round(localExamSocreRadio * 10) / 10,
+ localLessonPassRate: Math.round(localLessonPassRate * 10) / 10,
+ centerExamSocreRadio: Math.round(centerExamSocreRadio * 10) / 10,
+ centerLessonPassRate: Math.round(centerLessonPassRate * 10) / 10,
+ totolScore: Math.round(totolScore) / 100
});
});
}).catch(() =>{
From c345a60997be66bc6064b890bb65943f19b97813 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Tue, 7 Jul 2020 15:42:56 +0800
Subject: [PATCH 28/42] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=99=BB=E9=99=86?=
=?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4=EF=BC=88=E5=8F=98=E6=88=90?=
=?UTF-8?q?=20design/login=3Fproject=3Dxxx=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/permission.js | 4 +-
src/router/index_HYD.js | 3 +-
src/scripts/ProjectConfig.js | 106 +++--
src/views/login/hydLogin.vue | 499 ------------------------
src/views/login/index.vue | 37 +-
src/views/system/deviceManage/index.vue | 9 +-
6 files changed, 100 insertions(+), 558 deletions(-)
delete mode 100644 src/views/login/hydLogin.vue
diff --git a/src/permission.js b/src/permission.js
index 99f6fb9ce..fc4551aba 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -51,9 +51,9 @@ function getRouteInfo(to) {
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
loginPath = whitePage || loginPage;
if (to.query.projectDevice && to.query.ibpDevice) {
- loginPath = `${loginPath}?projectDevice=${to.query.projectDevice}&ibpDevice=${to.query.ibpDevice}`;
+ loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&ibpDevice=${to.query.ibpDevice}`;
} else if (to.query.projectDevice) {
- loginPath = `${loginPath}?projectDevice=${to.query.projectDevice}`;
+ loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}`;
}
if (current_session && current_session.startsWith('jsxt') || current_session && current_session.startsWith('refereeJsxt')) {
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
diff --git a/src/router/index_HYD.js b/src/router/index_HYD.js
index d8ef8743a..085a0a969 100644
--- a/src/router/index_HYD.js
+++ b/src/router/index_HYD.js
@@ -6,7 +6,8 @@ Vue.use(VueRouter);
/* Layout */
const Layout = () => import('@/layout');
-const Login = () => import('@/views/login/hydLogin');
+// const Login = () => import('@/views/login/hydLogin');
+const Login = () => import('@/views/login/index');
const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js
index d219d0029..1d82632df 100644
--- a/src/scripts/ProjectConfig.js
+++ b/src/scripts/ProjectConfig.js
@@ -15,7 +15,8 @@ import { LoginParams } from '@/utils/login';
export const loginInfo = {
xty: {
title: '西安铁路职业技术学院城市轨道交通实训平台',
- loginPath: '/xty/login',
+ // loginPath: '/xty/login',
+ loginPath:'/login?pro=xty',
loginParam: 'XTY',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
@@ -36,28 +37,33 @@ export const loginInfo = {
},
designxty: {
title: '西安铁路职业技术学院城市轨道交通设计平台',
- loginPath: '/designxty/login',
+ // loginPath: '/designxty/login',
+ loginPath:'/design/login?project=xty',
loginParam: 'XTY',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
},
gzb: {
title: '贵州装备制造职业学院城市轨道交通实训平台',
- loginPath: '/gzb/login',
+ // loginPath: '/gzb/login',
+ loginPath:'/login?project=gzb',
loginParam: 'GZB',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
},
designgzb: {
title: '贵州装备制造职业学院城市轨道交通设计平台',
- loginPath: '/designgzb/login',
+ // loginPath: '/designgzb/login',
+ loginPath:'/design/login?project=gzb',
loginParam: 'GZB',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
},
hyd: {
title: '城市轨道交通综合行车模拟仿真系统V1.0',
- loginPath: '/login',
+ loginTitle: '城市轨道交通综合行车模拟仿真系统V1.0',
+ logoWidth: '140px',
+ loginPath: '/login?project=hyd',
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
loginParam: 'DEFAULT',
navigationLogoWidth: '120px',
@@ -65,7 +71,9 @@ export const loginInfo = {
},
designhyd: {
title: '城市轨道交通设计平台V1.0',
- loginPath: '/design/login',
+ loginTitle: '城市轨道交通设计平台V1.0',
+ logoWidth: '140px',
+ loginPath: '/design/login?project=hyd',
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
loginParam: 'DEFAULT',
navigationLogoWidth: '120px',
@@ -77,7 +85,8 @@ export const loginInfo = {
loginTitle: '调度一部',
homeTitle: '调度一部',
browserTitle: '西安地铁调度一部城市轨道交通实训平台',
- loginPath: '/xadt/login',
+ loginPath:'/login?project=xadt',
+ // loginPath: '/xadt/login',
loginParam: 'DEFAULT',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
@@ -88,7 +97,8 @@ export const loginInfo = {
loginTitle: '调度一部',
homeTitle: '调度一部',
browserTitle: '西安地铁调度一部城市轨道交通设计平台',
- loginPath: '/designxadt/login',
+ // loginPath: '/designxadt/login',
+ loginPath:'/design/login?project=xadt',
loginParam: 'DEFAULT',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px'
@@ -109,7 +119,8 @@ export const loginInfo = {
},
jyd: {
title: '城市轨道交通实训平台',
- loginPath: '/jyd/login',
+ // loginPath: '/jyd/login',
+ loginPath:'/login?project=jyd',
logoWidth: '300px',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
@@ -125,7 +136,8 @@ export const loginInfo = {
logoWidth: '300px',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
- loginPath: '/designjyd/login',
+ // loginPath: '/designjyd/login',
+ loginPath:'/design/login?project=jyd',
bottomColumn: '',
bottomIcon: Bottom_Jyd,
linkIcon: Link_Jyd,
@@ -133,19 +145,25 @@ export const loginInfo = {
},
tky: {
title: '城市轨道交通实训平台',
- loginPath: '/tky/login',
- loginTitle: 'jyd',
+ // loginPath: '/tky/login',
+ loginPath:'/login?project=tky',
+ loginTitle: '空串',
bottomColumn: '',
bottomIcon: FaviconTky,
- loginParam: 'DEFAULT'
+ loginParam: 'DEFAULT',
+ navigationLogoWidth: '75px',
+ navigationMarginLeft: '90px'
},
designtky: {
title: '城市轨道交通设计平台',
- loginPath: '/designtky/login',
- loginTitle: 'jyd',
+ // loginPath: '/designtky/login',
+ loginPath:'/design/login?project=tky',
+ loginTitle: '空串',
bottomIcon: FaviconTky,
bottomColumn: '',
- loginParam: 'DEFAULT'
+ loginParam: 'DEFAULT',
+ navigationLogoWidth: '75px',
+ navigationMarginLeft: '90px'
}
};
@@ -191,25 +209,33 @@ export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb',
export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login',
design: '/login',
- xty: '/designxty/login',
- designxty: '/xty/login',
- gzb: '/designgzb/login',
- designgzb: '/gzb/login',
- hyd: '/design/login',
- designhyd: '/login',
- xadt: '/designxadt/login',
- designxadt: '/xadt/login',
- jyd: '/designjyd/login',
- designjyd: '/jyd/login',
- tky: '/designtky/login',
- designtky: '/tky/login'
+ xty: '/design/login?project=xty',
+ designxty: '/login?project=xty',
+ gzb: '/design/login?project=gzb',
+ designgzb: '/login?project=gzb',
+ hyd: '/design/login?project=hyd',
+ designhyd: '/login?project=hyd',
+ xadt: '/design/login?project=xadt',
+ designxadt: '/login?project=xadt',
+ jyd: '/design/login?project=jyd',
+ designjyd: '/login?project=jyd',
+ tky: '/design/login?project=tky',
+ designtky: '/login?project=tky'
};
export const PermissionParam = { // 路径权限处理所需参数配置(跳转白名单&路径正则匹配&clientId)
hyd: {
- systemType: '011'
+ // systemType: '011'
+ whitePage: '/login?project=hyd',
+ reg: /^\/hyd/,
+ systemType: '011',
+ clientId: null
},
designhyd: {
- systemType: '011'
+ // systemType: '011'
+ whitePage: '/design/login?project=hyd',
+ reg: /^\/designhyd/,
+ systemType: '011',
+ clientId: LoginParams.Design.clientId
},
login: {
systemType: '011'
@@ -218,61 +244,61 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
systemType: '011'
},
designxty: {
- whitePage: '/designxty/login',
+ whitePage: '/design/login?project=xty',
reg: /^\/designxty/,
systemType: '013',
clientId: LoginParams.Design.clientId
},
designgzb: {
- whitePage: '/designgzb/login',
+ whitePage: '/design/login?project=gzb',
reg: /^\/designgzb/,
systemType: '014',
clientId: LoginParams.Design.clientId
},
designxadt: {
- whitePage: '/designxadt/login',
+ whitePage: '/design/login?project=xadt',
reg: /^\/designxadt/,
systemType: '012',
clientId: LoginParams.Design.clientId
},
designjyd: {
- whitePage: '/designjyd/login',
+ whitePage: '/design/login?project=jyd',
reg: /^\/designjyd/,
systemType: '017',
clientId: LoginParams.Design.clientId
},
designtky: {
- whitePage: '/designtky/login',
+ whitePage: '/design/login?project=tky',
reg: /^\/designtky/,
systemType: '018',
clientId: LoginParams.Design.clientId
},
xty: {
- whitePage: '/xty/login',
+ whitePage: '/login?project=xty',
reg: /^\/xty/,
systemType: '013',
clientId: null
},
gzb: {
- whitePage: '/gzb/login',
+ whitePage: '/login?project=gzb',
reg: /^\/gzb/,
systemType: '014',
clientId: null
},
xadt: {
- whitePage: '/xadt/login',
+ whitePage: '/login?project=xadt',
reg: /^\/xadt/,
systemType: '012',
clientId: null
},
jyd: {
- whitePage: '/jyd/login',
+ whitePage: '/login?project=jyd',
reg: /^\/jyd/,
systemType: '017',
clientId: null
},
tky: {
- whitePage: '/tky/login',
+ whitePage: '/login?project=tky',
reg: /^\/tky/,
systemType: '018',
clientId: null
diff --git a/src/views/login/hydLogin.vue b/src/views/login/hydLogin.vue
deleted file mode 100644
index f990608c0..000000000
--- a/src/views/login/hydLogin.vue
+++ /dev/null
@@ -1,499 +0,0 @@
-
-
-
主工作站未登录,点击重新检测
-
-
-
{{ title }}
-
-
-
- {{ language }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ tipsMsg }}
-
-
- {{ $t('login.autoLogin') }}
-
-
-
-
-
{{ $t('login.perfectInformation') }}
-
-
-
-
-
-
- {{ $t('login.login') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 570d2e2b7..50e15513e 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -8,7 +8,7 @@
element-loading-background="rgba(0, 0, 0, 0)"
>
主工作站未登录,点击重新检测
-
+
{{ loginTitle==='空串'?'':loginTitle }}
@@ -21,8 +21,8 @@
{{ language }}
-
-
+
+
- {{ $t('login.welcomeTo') + title }}
+ {{ $t('login.welcomeTo') + title }}
@@ -180,27 +180,37 @@ export default {
},
computed: {
project() {
- return this.$route.path.split('/')[1];
+ const project = this.$route.query.project;
+ const split = this.$route.path.split('/')[1];
+ if (split == 'design') {
+ return project ? split + project : split;
+ } else if (split == 'login') {
+ return project || 'login';
+ } else {
+ return split;
+ }
},
loginTitle () {
- return loginInfo[this.$route.path.split('/')[1]].loginTitle;
+ // this.$route.path.split('/')[1]
+ return loginInfo[this.project].loginTitle;
},
title() {
- return loginInfo[this.$route.path.split('/')[1]].title;
+ return loginInfo[this.project].title;
},
logoWidth() {
- return loginInfo[this.$route.path.split('/')[1]].logoWidth;
+ return loginInfo[this.project].logoWidth;
},
isProject() {
- const projectName = this.$route.path.split('/')[1];
+ const projectName = this.project;
return GenerateRouteProjectList.includes(projectName);
},
logoImg() {
- const projectName = this.$route.path.split('/')[1];
+ const projectName = this.project;
return ProjectIcon[projectName];
},
bgImg() {
- return this.$route.query.ibpDevice ? bgIbpImg : bgImg;
+ const bgImgAll = this.$route.query.project == 'hyd' ? '' : bgImg;
+ return this.$route.query.ibpDevice ? bgIbpImg : bgImgAll;
},
ibpDevice() {
return this.$route.query.ibpDevice;
@@ -230,7 +240,9 @@ export default {
},
mounted() {
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
- this.loginRefresh();
+ if (this.ibpDevice || this.$route.query.project != 'hyd') {
+ this.loginRefresh();
+ }
},
methods: {
computedAttribute() {
@@ -331,6 +343,7 @@ export default {
const model = Object.assign({}, this.loginForm);
model.password = md5(model.password);
model.type = this.modelType;
+ model.project = loginInfo[this.project].loginParam;
model.deviceCode = this.$route.query.projectDevice;
this.loading = true;
if (this.isAutoLogin) {
diff --git a/src/views/system/deviceManage/index.vue b/src/views/system/deviceManage/index.vue
index 4bd0cff8d..14f46365b 100644
--- a/src/views/system/deviceManage/index.vue
+++ b/src/views/system/deviceManage/index.vue
@@ -39,10 +39,11 @@ export default {
{label: '行调工作站', value: 'CW'},
{label: '综合监控', value: 'ISCS'}
],
- projectList: [{label:'西铁院', value: 'XTY'}, {label: '贵州装备', value:'GZB'}],
+ projectList: [{label:'西铁院', value: 'XTY'}, {label: '贵州装备', value:'GZB'}, {label: '盈达科技', value:'HYD'}],
projectMap: {
designxty: 'XTY',
- designgzb: 'GZB'
+ designgzb: 'GZB',
+ designhyd: 'HYD'
},
queryForm: {
labelWidth: '120px',
@@ -199,9 +200,9 @@ export default {
getPath(index, row) {
let url = '';
if (row.type === 'IBP') {
- url = `${window.location.protocol}//${window.location.host}/${this.projectCode.toLowerCase()}/login?projectDevice=${row.code}&ibpDevice=true`;
+ url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}&ibpDevice=true`;
} else {
- url = `${window.location.protocol}//${window.location.host}/${this.projectCode.toLowerCase()}/login?projectDevice=${row.code}`;
+ url = `${window.location.protocol}//${window.location.host}/login?project=${this.projectCode.toLowerCase()}&projectDevice=${row.code}`;
}
this.url = url;
this.$messageBox();
From 9dd81d0fd1913d0859e5a0a050d19eceb19d08e8 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Tue, 7 Jul 2020 16:07:48 +0800
Subject: [PATCH 29/42] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=B1=BB=E5=9E=8B?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/exam/detail/examDetail.vue | 6 +++++-
src/views/lesson/lessoncategory/edit/chapter/list.vue | 9 +++++++--
src/views/lesson/trainingRule/list.vue | 6 +++++-
src/views/publish/examRule/draft/editRule.vue | 9 +++++++--
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue
index a862bf1cf..2692b7bf3 100644
--- a/src/views/exam/detail/examDetail.vue
+++ b/src/views/exam/detail/examDetail.vue
@@ -114,7 +114,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
let ele;
for ( ele in CMD['Switch']) {
@@ -132,6 +133,9 @@ export default {
for ( ele in CMD['Station']) {
this.trainingOperateTypeMap['Station'].push(CMD['Station'][ele]);
}
+ for ( ele in CMD['LimitControl']) {
+ this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
+ }
for ( ele in CMD['ControlConvertMenu']) {
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][ele]);
}
diff --git a/src/views/lesson/lessoncategory/edit/chapter/list.vue b/src/views/lesson/lessoncategory/edit/chapter/list.vue
index 8c0ece95b..06df1b83f 100644
--- a/src/views/lesson/lessoncategory/edit/chapter/list.vue
+++ b/src/views/lesson/lessoncategory/edit/chapter/list.vue
@@ -188,7 +188,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
let val;
for ( val in CMD['Switch']) {
@@ -206,6 +207,9 @@ export default {
for ( val in CMD['Station']) {
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
}
+ for ( val in CMD['LimitControl']) {
+ this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
+ }
for ( val in CMD['ControlConvertMenu']) {
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
}
@@ -228,7 +232,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
if (res && res.code === 200) {
res.data.forEach(item => {
diff --git a/src/views/lesson/trainingRule/list.vue b/src/views/lesson/trainingRule/list.vue
index 8aaedfd92..c8cd5f3d8 100644
--- a/src/views/lesson/trainingRule/list.vue
+++ b/src/views/lesson/trainingRule/list.vue
@@ -170,7 +170,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
let val;
for ( val in CMD['Switch']) {
@@ -188,6 +189,9 @@ export default {
for ( val in CMD['Station']) {
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
}
+ for ( val in CMD['LimitControl']) {
+ this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
+ }
for ( val in CMD['ControlConvertMenu']) {
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
}
diff --git a/src/views/publish/examRule/draft/editRule.vue b/src/views/publish/examRule/draft/editRule.vue
index 6c210138d..1b321e3d7 100644
--- a/src/views/publish/examRule/draft/editRule.vue
+++ b/src/views/publish/examRule/draft/editRule.vue
@@ -140,7 +140,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
let val;
for ( val in CMD['Switch']) {
@@ -158,6 +159,9 @@ export default {
for ( val in CMD['Station']) {
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
}
+ for ( val in CMD['LimitControl']) {
+ this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
+ }
for ( val in CMD['ControlConvertMenu']) {
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
}
@@ -175,7 +179,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
if (res && res.code === 200) {
res.data.forEach(item => {
From 3480ebb7b01a9010b56e1bbebe381696417b3b79 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Tue, 7 Jul 2020 16:09:14 +0800
Subject: [PATCH 30/42] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/deviceManage/add.vue | 9 ++++++++-
src/views/system/deviceManage/editConfig.vue | 10 ++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/views/system/deviceManage/add.vue b/src/views/system/deviceManage/add.vue
index 11c7138f9..5524c1895 100644
--- a/src/views/system/deviceManage/add.vue
+++ b/src/views/system/deviceManage/add.vue
@@ -37,7 +37,14 @@ export default {
{label: '车站', value: 'LW'},
{label: '教员机', value: 'IM'},
{label: '行调工作站', value: 'CW'},
- {label: '综合监控', value: 'ISCS'}
+ {label: '大屏工作站', value: 'LSW'},
+ {label: '列车驾驶终端', value: 'DRIVE'},
+ {label: '虚拟站台屏蔽门终端', value: 'VR_PSD'},
+ {label: '现地综合监控', value: 'ISCS_LW'},
+ {label: '中心综合监控', value: 'ISCS_CW'},
+ {label: '车辆段终端', value: 'DRIVE'},
+ {label: '列车驾驶终端', value: 'DEPOT'},
+ {label: '虚拟CCTV', value: 'CCTV'}
],
projectList: [{label:'西铁院', value: 'XTY'}, {label: '贵州装备', value:'GZB'}],
gatewayList: []
diff --git a/src/views/system/deviceManage/editConfig.vue b/src/views/system/deviceManage/editConfig.vue
index 0282249f0..3f2ef6556 100644
--- a/src/views/system/deviceManage/editConfig.vue
+++ b/src/views/system/deviceManage/editConfig.vue
@@ -11,8 +11,8 @@
/>
-
-
+
+
+
+
-
+
-
返回主页面
+
{{ projectDevice? '退出': '返回主页面' }}