From b1d944c52ffc41c8c445cbaf6fb4e0bb57548306 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 28 Jan 2021 17:47:43 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=9B=BD=E8=B5=9B=E8=B4=AD=E4=B9=B0?=
=?UTF-8?q?=E6=88=90=E5=8A=9F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmapNew/constant/deviceState.js | 1 +
src/store/modules/socket.js | 10 +-----
src/views/newMap/displayNew/demon/payPage.vue | 32 ++++++++++++++++---
.../displayNew/dispatherContest/sceneList.vue | 18 ++++++++---
4 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/src/jmapNew/constant/deviceState.js b/src/jmapNew/constant/deviceState.js
index 6e91feba0..a816ccda0 100644
--- a/src/jmapNew/constant/deviceState.js
+++ b/src/jmapNew/constant/deviceState.js
@@ -34,6 +34,7 @@ deviceState[deviceType.Switch] = {
overlapLock: 0, // 是否进路延续保护锁闭
normalPosition: 1, // 是否定位
reversePosition: 0, // 是否反位
+ isCiConfirm: 0, // 是否进行联锁确认
/** 定位状态*/
// locateType: {
// Default: '01', /** 道岔位置类型 - 定位(缺省值)*/
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index f0318aa9c..9e7996b72 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -244,7 +244,7 @@ const socket = {
namespaced: true,
state: {
- payOrder: {}, // 支付消息
+ payOrder: '', // 支付订单
jointRoomInfo: {}, // 受邀请房间信息
chatContent: {}, // 聊天室聊天内容
roleList: [], // 设置角色信息
@@ -334,10 +334,6 @@ const socket = {
state.simulationReset = simulationReset;
},
- setPayOrder: (state, payOrder) => {
- state.payOrder = payOrder;
- },
-
// (旧版可能在用,新版地图不用这个)
shiftMsgQueue: (state) => {
state.msgHead = null;
@@ -421,10 +417,6 @@ const socket = {
state.message[data.key].push(data.value);
},
- setPayOrder: ({ commit }) => {
- commit('setPayOrder', {});
- },
-
shiftMsgQueue: ({ commit }) => {
commit('shiftMsgQueue');
},
diff --git a/src/views/newMap/displayNew/demon/payPage.vue b/src/views/newMap/displayNew/demon/payPage.vue
index 0947647d3..8f1acf740 100644
--- a/src/views/newMap/displayNew/demon/payPage.vue
+++ b/src/views/newMap/displayNew/demon/payPage.vue
@@ -23,14 +23,14 @@
{{ unitPrice * monthAmount + ' 元' }}
- 获取支付码
+ 生成订单
修改订单
订单号:
{{ orderCode }}
-
+
支付码:
@@ -42,9 +42,12 @@
element-loading-background="rgba(255, 255, 255, 0.9)"
/>
+
+
订单支付成功!
+
{{ `将在${countdown}后自动关闭` }}
+
-
@@ -62,19 +65,39 @@ export default {
loading: true,
changeMonth: true,
url: '',
- orderCode: ''
+ orderCode: '',
+ paySuccess: false,
+ countdown: 10,
+ timer: null
};
},
+ watch: {
+ '$store.state.socket.payOrder':function (val) {
+ if (this.payOrder === val) {
+ this.paySuccess = true;
+ this.url = '';
+ this.timer = setInterval(() => {
+ this.countdown--;
+ if (this.countdown <= 0) {
+ this.handleClose();
+ }
+ }, 1000);
+ }
+ }
+ },
methods: {
handleClose() {
this.dialogVisible = false;
+ this.timer && clearInterval(this.timer);
},
doShow() {
this.loading = true;
this.dialogVisible = true;
this.monthAmount = 1;
+ this.countdown = 10;
this.url = '';
this.changeMonth = true;
+ this.paySuccess = false;
},
changeOrder() {
this.loading = true;
@@ -86,7 +109,6 @@ export default {
this.loading = true;
this.changeMonth = false;
getPayQrCode(this.$route.query.mapId, this.monthAmount).then(resp => {
- console.log(this.url, '===', resp.data);
this.url = resp.data.code_url;
this.orderCode = resp.data.orderCode;
this.loading = false;
diff --git a/src/views/newMap/displayNew/dispatherContest/sceneList.vue b/src/views/newMap/displayNew/dispatherContest/sceneList.vue
index bf94ce296..7dd2d8128 100644
--- a/src/views/newMap/displayNew/dispatherContest/sceneList.vue
+++ b/src/views/newMap/displayNew/dispatherContest/sceneList.vue
@@ -60,12 +60,13 @@ export default {
]
};
},
+ watch: {
+ '$store.state.socket.payOrder':function (val) {
+ this.queryPermission();
+ }
+ },
mounted() {
- queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
- this.hasPermission = !!res.data;
- }).catch(() => {
- this.$message.error('获取场景权限异常!');
- });
+ this.queryPermission();
getCompetitionPracticalScene({pageSize:100, pageNum:1}).then(res=>{
if (res.data.list && res.data.list.length > 0) {
const list = res.data.list.sort((a, b) => {
@@ -100,6 +101,13 @@ export default {
doClose() {
this.dialogVisible = false;
},
+ queryPermission() {
+ queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
+ this.hasPermission = !!res.data;
+ }).catch(() => {
+ this.$message.error('获取场景权限异常!');
+ });
+ },
async handleLoad(row) {
this.row = row;
const response = await loadCompetitionPracticalScene(this.$route.query.group, row.id);
From 370d5383455ff17046794f6152c28d57f1a77729 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 28 Jan 2021 17:53:08 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=88=90=E9=83=BD=E5=B7=A5=E4=B8=9A?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/scripts/ProjectConfig.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js
index 5eaf11586..bb1ffc1e0 100644
--- a/src/scripts/ProjectConfig.js
+++ b/src/scripts/ProjectConfig.js
@@ -475,8 +475,8 @@ export const ProjectCode = {
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
-export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
-export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
+export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
+export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角主体不展示
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb'];
From cc8c3aac361836bfcbf6dc696961eeb330e609a6 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 28 Jan 2021 18:03:17 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E6=88=90=E9=83=BD=E5=B7=A5=E4=B8=9A?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/scripts/ProjectConfig.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js
index bb1ffc1e0..710c668e8 100644
--- a/src/scripts/ProjectConfig.js
+++ b/src/scripts/ProjectConfig.js
@@ -472,7 +472,7 @@ export const ProjectCode = {
cgy: 'CGY',
designcgy: 'CGY'
};
-export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
+export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
From 5bf8ffe9ac8c773da028dad25e684dd9a276c3ca Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 28 Jan 2021 18:22:13 +0800
Subject: [PATCH 4/4] =?UTF-8?q?BUG=20149:=E6=B5=99=E5=A4=A7=E7=BD=91?=
=?UTF-8?q?=E6=96=B0=EF=BC=9A=E7=8E=B0=E5=9C=B0=E4=BB=BF=E7=9C=9F=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=E4=B8=AD=E8=BD=A6=E7=AB=99=E5=88=87=E6=8D=A2=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E6=9C=89=E8=AF=AF;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/newMap/displayNew/selectStation.vue | 54 +++++++++----------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/views/newMap/displayNew/selectStation.vue b/src/views/newMap/displayNew/selectStation.vue
index 4a0b717ab..a5ebebab8 100644
--- a/src/views/newMap/displayNew/selectStation.vue
+++ b/src/views/newMap/displayNew/selectStation.vue
@@ -45,7 +45,7 @@ export default {
EventBus.$on('switchStationMode', (stationCode) => {
this.$store.state.training.memberList.filter(el => el.type == 'STATION_SUPERVISOR').find(el => {
if (el.deviceCode == stationCode) {
- this.oldShowMemberId = el.id;
+ this.oldShowMemberId = el.id;
this.switchStationMode(el.id);
}
});
@@ -54,30 +54,30 @@ export default {
methods:{
switchStationMode(val) {
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {
- this.showMemberId = val;
- const nameList = Object.keys(this.$store.state.map.map||{});
+ this.showMemberId = val;
+ const nameList = Object.keys(this.$store.state.map.map || {});
let list = [];
const member = this.$store.state.training.memberData[val];
- const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
- if (station) {
- this.showStation = station.code;
- const showStationCode = this.stationCentralizedMap[station.code];
- nameList.forEach(item => {
- if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
- if (item === 'trainList') {
- this.$store.state.map.map[item].forEach(elem => {
- elem && list.push(elem);
- });
- } else {
- list = [...list, ...this.$store.state.map.map[item]];
- }
- }
- });
- this.$jlmap.updateShowStation(list, showStationCode);
- this.setCenter(showStationCode);
- }
+ const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
+ if (station) {
+ this.showStation = station.code;
+ const showStationCode = this.stationCentralizedMap[station.code];
+ nameList.forEach(item => {
+ if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
+ if (item === 'trainList') {
+ this.$store.state.map.map[item].forEach(elem => {
+ elem && list.push(elem);
+ });
+ } else {
+ list = [...list, ...this.$store.state.map.map[item]];
+ }
+ }
+ });
+ this.$jlmap.updateShowStation(list, showStationCode);
+ this.setCenter(showStationCode);
+ }
}).catch((err) => {
- console.log(err)
+ console.log(err);
this.showMemberId = this.oldShowMemberId;
this.$message.error('调整角色成员失败!');
});
@@ -89,16 +89,16 @@ export default {
this.stationListMode = [];
this.$store.state.training.memberList.forEach(item => {
if (item.type === 'STATION_SUPERVISOR') {
- const station = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
- if (station) {
- this.stationListMode.push({value:item.id, name: station.name});
- }
+ const station = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
+ if (station) {
+ this.stationListMode.push({value:item.id, name: station.name});
+ }
}
});
},
initData() {
this.$store.state.training.simulationUserList.forEach(item => {
- if (item.userId == this.$store.state.user.id) {
+ if (item.type === 'STATION_SUPERVISOR' && item.userId == this.$store.state.user.id) {
this.showMemberId = item.memberId;
this.oldShowMemberId = item.memberId;
}