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);