diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index ed8284558..b96e1c110 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -416,7 +416,8 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色 monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 405c3e819..29b033f70 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -383,7 +383,8 @@ class SkinCode extends defaultStyle { locateColor: 'lightgreen', // 道岔定位颜色 inversionColor: 'lightgreen', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index a03765d1e..aeddad95c 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -366,7 +366,8 @@ class SkinCode extends defaultStyle { locateColor: '#00FF00', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index 1986cadc2..ee3875251 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -404,7 +404,8 @@ class SkinCode extends defaultStyle { inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色) monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色) - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 323487877..985280ca9 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -386,7 +386,8 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色 monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index eabbb5a93..080f9ae0b 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -413,7 +413,8 @@ class SkinCode extends defaultStyle { inversionColor: '#fff', // 道岔反位颜色 monolock: true, // 名称单锁显示包围框 monolockLocationColor: '#fff', // 道岔单锁'定位'颜色 - monolockInversionColor: '#fff' // 道岔单锁'反位'颜色 + monolockInversionColor: '#fff', // 道岔单锁'反位'颜色 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: true, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 83e597622..1c21ac13b 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -269,7 +269,8 @@ class SkinCode extends defaultStyle { inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色) monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index acffb3a6f..0adcde48c 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -408,7 +408,9 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色 monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: false, // 故障闪烁 + lossRect: true // 道岔失表矩形 }, sectionAction: { flag: false, // 道岔 关联区段显示 @@ -466,7 +468,7 @@ class SkinCode extends defaultStyle { this[deviceType.SwitchFault] = { displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { - fontSize: 11, // 字体大小 + fontSize: 14, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 526937ad6..cd98e29f7 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -436,7 +436,8 @@ class SkinCode extends defaultStyle { locateColor: '#FFFFFF', // 道岔定位颜色 inversionColor: '#FFFFFF', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/shape/SaidLamp/index.js b/src/jmapNew/shape/SaidLamp/index.js index 86b39fe52..9db315b7c 100644 --- a/src/jmapNew/shape/SaidLamp/index.js +++ b/src/jmapNew/shape/SaidLamp/index.js @@ -224,4 +224,7 @@ export default class SaidLamp extends Group { this.isShowShape = false; } } + setControlColor(color) { + this.control && this.control.setControlColor(color); + } } diff --git a/src/jmapNew/shape/Switch/ESwLocal.js b/src/jmapNew/shape/Switch/ESwLocal.js index da834b35c..1418a535d 100644 --- a/src/jmapNew/shape/Switch/ESwLocal.js +++ b/src/jmapNew/shape/Switch/ESwLocal.js @@ -50,6 +50,9 @@ class ESwLocal extends Group { cb(child); }); } + getLocal() { + return this.locShelter; + } } export default ESwLocal; diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 3b8059130..0dce65d13 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -4,6 +4,7 @@ import Line from 'zrender/src/graphic/shape/Line'; import Group from 'zrender/src/container/Group'; import Text from 'zrender/src/graphic/Text'; +import Rect from 'zrender/src/graphic/shape/Rect'; import JTriangle from '../../utils/JTriangle'; import ESwName from './ESwName.js'; import ESwLocal from './ESwLocal.js'; @@ -105,7 +106,27 @@ export default class Switch extends Group { onmouseover: () => { this.name.getArrowText().show(); }, onmouseout: () => { this.name.getArrowText().hide(); } }); - + if (this.style.Switch.text.lossRect) { + const lossRect = this.locShelter.getLocal().getBoundingRect(); + this.lossShow = new Rect({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x: lossRect.x - 5, + y: lossRect.y - 5, + width: lossRect.width + 10, + height: lossRect.height + 10 + }, + style: { + fill: 'rgba(0, 0, 0, 1)', + lineDash: [3, 3], + stroke: '#F00', + lineWidth: 1 + } + }); + this.add(this.lossShow); + this.lossShow.hide(); + } const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength; const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1]; const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]]; @@ -268,6 +289,8 @@ export default class Switch extends Group { this.locShelter.hide(); // 定位覆盖图形 this.relocShelter.hide(); // 反位覆盖图形 this.enabledName.hide(); // 使能隐藏 + this.lossShow && this.lossShow.hide(); + this.lossShow && this.lossShow.stopAnimation(false); } /** 定位*/ @@ -298,7 +321,7 @@ export default class Switch extends Group { } /** 失去*/ - setLossAction(nameFlicker) { + setLossAction() { // this.recover(); this.locShelter.show(); this.relocShelter.show(); @@ -306,9 +329,24 @@ export default class Switch extends Group { this.sheltertriangle.show(); this.sheltertriangle.setColor(this.style.backgroundColor); this.setTextColor(this.style.Switch.text.lossColor); - nameFlicker && this.nameTextAnimation(); - } + this.style.Switch.text.faultFlashing && this.nameTextAnimation(); + this.lossShow && this.lossShow.show(); + this.lossShow && this.lossShow.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: '#F00' }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + } + setSwitchFault(split) { + if (this.model.switchFaultCode && split) { + const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode); + switchFault.instance.setControlColor('#F00'); + } else if (this.model.switchFaultCode && !split) { + const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode); + switchFault.instance.setControlColor(this.style.backgroundColor); + } + } /** 挤叉*/ setForkAction() { this.rhomboid.hide(); // 平行四边形 @@ -479,8 +517,9 @@ export default class Switch extends Group { } else if (model.reversePosition) { this.setInversionAction(model); /** 反位*/ } else { - this.setLossAction(true); + this.setLossAction(); } + /** 道岔单锁 */ model.singleLock && this.setMonolock(); /** 道岔封锁 */ @@ -490,6 +529,7 @@ export default class Switch extends Group { // this.setForkAction(); // 道岔挤岔完成 // 道岔使能显示 model.isCiConfirm && this.setCiConfirm(); + this.setSwitchFault(model.split); model.cutOff && this.setSwitchCutOff(); if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色 const switchModel = Vue.prototype.$jlmap.mapDevice[model.code]; diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue index a4e14b092..85b716fbe 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue @@ -93,7 +93,7 @@ export default { operation: '', planMode: 5, headMode: 5, - fontSize: 16 + fontSize: 30 }; }, computed: { diff --git a/src/jmapNew/theme/xian_01/model.js b/src/jmapNew/theme/xian_01/model.js index 4920490ff..e8193db1f 100644 --- a/src/jmapNew/theme/xian_01/model.js +++ b/src/jmapNew/theme/xian_01/model.js @@ -36,7 +36,7 @@ class Model { }; this['private'][deviceType.Train] = { nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 - nameFontSize: 10 // 字体大小 + nameFontSize: 30 // 字体大小 }; this['private'][deviceType.TrainWindow] = { trainWindowShow: true diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index b0f127fd2..00e4f45f2 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -150,6 +150,48 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(data.powerLineList || [], elem => { mapDevice[elem.code] = createDevice(deviceType.Power, elem, propConvert, showConfig); }, this); + zrUtil.each(data.switchList || [], elem => { + mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig); + const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode]; + const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode]; + const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode]; + + if (cnodeSection && lnodeSection && rnodeSection) { + cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code]; + const sectionParent = mapDevice[cnodeSection.parentCode]; + if (sectionParent) { + sectionParent['switch'] = mapDevice[elem.code]; + } + if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) { + mapDevice[elem.code].intersection = { + x: cnodeSection.points[0].x, + y: cnodeSection.points[0].y + }; + mapDevice[elem.code].skew = { + x: rnodeSection.points[rnodeSection.points.length - 2].x, + y: rnodeSection.points[rnodeSection.points.length - 2].y + }; + } else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) { + mapDevice[elem.code].intersection = { + x: cnodeSection.points[cnodeSection.points.length - 1].x, + y: cnodeSection.points[cnodeSection.points.length - 1].y + }; + mapDevice[elem.code].skew = { + x: rnodeSection.points[1].x, + y: rnodeSection.points[1].y + }; + } + + const section = mapDevice[cnodeSection.parentCode]; + if (section) { + mapDevice[elem.code].sectionName = section.name; + mapDevice[elem.code].sectionParentCode = section.code; + section['relSwitchCode'] = elem.code; + } + + rnodeSection['layer'] = -1; + } + }, this); zrUtil.each(data.indicatorLightList || [], elem => { switch (elem.type) { case 'AtsControl': @@ -205,6 +247,7 @@ export function parser(data, skinCode, showConfig) { break; case 'SwitchFault': mapDevice[elem.code] = createDevice(deviceType.SwitchFault, elem, propConvert, showConfig); + mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯(需保证该数据在switchList之后处理) break; } }, this); @@ -218,49 +261,6 @@ export function parser(data, skinCode, showConfig) { } } }, this); - - zrUtil.each(data.switchList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig); - const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode]; - const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode]; - const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode]; - - if (cnodeSection && lnodeSection && rnodeSection) { - cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code]; - const sectionParent = mapDevice[cnodeSection.parentCode]; - if (sectionParent) { - sectionParent['switch'] = mapDevice[elem.code]; - } - if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) { - mapDevice[elem.code].intersection = { - x: cnodeSection.points[0].x, - y: cnodeSection.points[0].y - }; - mapDevice[elem.code].skew = { - x: rnodeSection.points[rnodeSection.points.length - 2].x, - y: rnodeSection.points[rnodeSection.points.length - 2].y - }; - } else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) { - mapDevice[elem.code].intersection = { - x: cnodeSection.points[cnodeSection.points.length - 1].x, - y: cnodeSection.points[cnodeSection.points.length - 1].y - }; - mapDevice[elem.code].skew = { - x: rnodeSection.points[1].x, - y: rnodeSection.points[1].y - }; - } - - const section = mapDevice[cnodeSection.parentCode]; - if (section) { - mapDevice[elem.code].sectionName = section.name; - mapDevice[elem.code].sectionParentCode = section.code; - section['relSwitchCode'] = elem.code; - } - - rnodeSection['layer'] = -1; - } - }, this); } return mapDevice; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 778caeb7b..836771751 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue b/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue index 9bb0c83cb..7a4f70106 100644 --- a/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue +++ b/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue @@ -2,15 +2,64 @@
中心PIS紧急信息一览
+ + + + + +
+
显示内容
+
+
+
+
区域详细
+
紧急信息清除
+
清除
+
diff --git a/src/views/iscs/iscsSystem/config/pis/lcdControl.vue b/src/views/iscs/iscsSystem/config/pis/lcdControl.vue index fcb242f65..860e27ef3 100644 --- a/src/views/iscs/iscsSystem/config/pis/lcdControl.vue +++ b/src/views/iscs/iscsSystem/config/pis/lcdControl.vue @@ -3,7 +3,7 @@
LCD控制屏
特定区域
-
全线
+
全线
@@ -15,23 +15,28 @@
-
-
-
车站
-
选择
-
-
-
{{ station }}
-
-
+
+
车站
+
选择
+
+
+
+
+
{{ station }}
+
+
+
+
@@ -81,9 +115,19 @@ export default { margin: 5px 12px 10px; font-size: 14px; line-height: 30px; + cursor:pointer; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; + } + .area_select_button:active { + border-top: 2px solid #898888; + border-left: 2px solid #898888; + border-right: 2px solid #FFF; + border-bottom: 2px solid #FFF; } .each_station_info{ - /*display: inline-block;*/ vertical-align:top; font-size: 13px; padding: 2px 2px; @@ -93,6 +137,11 @@ export default { border-right: 2px solid #898888; border-bottom: 2px solid #898888; margin-right: 5px; + cursor:pointer; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; } .lcd_content_box{ margin-top: 110px; @@ -105,14 +154,12 @@ export default { border-right: 3px solid #fff; border-bottom: 3px solid #fff; padding-top: 10px; - padding-left: 10px; - overflow-x: auto; } .lcd_content_box_left_title{ vertical-align:top; font-size: 13px; color: #CBFFFF; - padding: 10px 10px 5px; + padding: 5px 10px 10px; } .button_default_content{ margin-top: 5px; diff --git a/src/views/iscs/iscsSystem/config/pis/mainScreen.vue b/src/views/iscs/iscsSystem/config/pis/mainScreen.vue index cf3812fd1..de84f3a76 100644 --- a/src/views/iscs/iscsSystem/config/pis/mainScreen.vue +++ b/src/views/iscs/iscsSystem/config/pis/mainScreen.vue @@ -103,24 +103,29 @@ export default { }, async created () { // 请求当前线路车站列表 - const res = await getByGroupStationList(this.$route.query.group); - if (res.code == 200) { - this.stationList = []; - res.data.forEach(station => { - if (!station.depot) { - const param = { - stationName: station.name, - children:[ - {status:'none'}, {status:'default'}, - {status:'default'}, {status:'default'}, - {status:'none'}, {status:'none'}, - {status:'none'}, {status:'default'} - ] - }; - this.stationList.push(param); - } - }); + try { + const res = await getByGroupStationList(this.$route.query.group); + if (res.code == 200) { + this.stationList = []; + res.data.forEach(station => { + if (!station.depot) { + const param = { + stationName: station.name, + children:[ + {status:'none'}, {status:'default'}, + {status:'default'}, {status:'default'}, + {status:'none'}, {status:'none'}, + {status:'none'}, {status:'default'} + ] + }; + this.stationList.push(param); + } + }); + } + } catch (e) { + this.$message.error('获取车站列表失败!'); } + }, methods:{ showInfoBrroadcast() { diff --git a/src/views/jsxt/competition/theory/question.vue b/src/views/jsxt/competition/theory/question.vue index 284264b2a..207115cd3 100644 --- a/src/views/jsxt/competition/theory/question.vue +++ b/src/views/jsxt/competition/theory/question.vue @@ -2,14 +2,14 @@
+
+ 考试总分: + {{ totalScore }}分 +
@@ -25,7 +29,8 @@ // import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js'; // import WindowResizeHandler from '@/mixin/WindowResizeHandler'; import Question from './question'; -import { getTheoryQuestion } from '@/api/competition'; +// import { getTheoryQuestion } from '@/api/competition'; +import { getCompetitionDetail } from '@/api/competition'; export default { components: { @@ -47,6 +52,7 @@ export default { totalScore: 0, passScore: 10 }, + totalScore: 0, examQuestions: [] }; }, @@ -86,13 +92,13 @@ export default { }, methods: { loadInitData() { - getTheoryQuestion(this.$route.query.raceId).then((resp)=>{ + getCompetitionDetail(this.$route.query.raceId).then((resp)=>{ if (resp.data) { - this.examQuestions = resp.data.questions.map((el, i) => { - el.index = i; - el.answer = String(el.optionList[0].id); - return el; + resp.data.forEach((item, i) => { + this.examQuestions.push({...item.question, ...{answer: String(item.answerOptionId), score: item.score, index: i}}); }); + this.totalScore = resp.data.reduce((pre, ver) => pre + ver.score, 0); + console.log(this.totalScore); } }).catch(error => { this.$message.error(`加载考试详情失败:${error.message}`); }); }, diff --git a/src/views/jsxt/refereeList/editScore.vue b/src/views/jsxt/refereeList/editScore.vue index 8fb168848..fad2dd07f 100644 --- a/src/views/jsxt/refereeList/editScore.vue +++ b/src/views/jsxt/refereeList/editScore.vue @@ -58,11 +58,12 @@ export default { getTestPaperDatail(data.raceId).then(res => { this.theoryScore = res.data.theoryScore; this.practicalScore = res.data.practicalScore; + console.log(data); this.info = { raceId: data.raceId, userId: data.userId, - theoryScore: data.theoryScore, - practiceScore: data.practiceScore + theoryScore: data.artificialTheoryScore || data.theoryScore, + practiceScore: data.artificialPracticeScore || data.practiceScore }; }); }, @@ -75,8 +76,8 @@ export default { const data = { raceId: this.info.raceId, userId: this.info.userId, - theoryScore: this.info.theoryScore, - practiceScore: this.info.practiceScore + artificialTheoryScore: Number(this.info.theoryScore), + artificialPracticeScore: Number(this.info.practiceScore) }; putRefereeScoring(data).then(res => { this.doClose(); diff --git a/src/views/jsxt/refereeList/index.vue b/src/views/jsxt/refereeList/index.vue index 743eaec25..0b7d97b4e 100644 --- a/src/views/jsxt/refereeList/index.vue +++ b/src/views/jsxt/refereeList/index.vue @@ -39,7 +39,6 @@ export default { query: this.queryFunction, selectCheckShow: false, indexShow: true, - afterQuery:this.afterQuery, columns: [ { title: '名字', @@ -70,11 +69,17 @@ export default { }, { title: '理论分数', - prop: 'theoryScore' + prop: 'theoryScore', + type: 'tag', + columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : row.theoryScore || ''; }, + tagType: (row) => { return 'success'; } }, { title: '实操分数', - prop: 'practiceScore' + prop: 'practiceScore', + type: 'tag', + columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : row.practiceScore || ''; }, + tagType: (row) => { return 'success'; } }, { title: '总分', @@ -196,14 +201,6 @@ export default { gradeScore(index, row) { // 裁判打分 this.$refs.editScore.doShow(row); }, - // afterQuery(data) { - // clearTimeout(this.inter); - // this.inter = setTimeout(() => { - // if (!this.isLeaving) { - // this.refresh(); - // } - // }, 3000); - // }, refresh() { this.$refs.queryListPage.refresh(false); }