diff --git a/src/jmap/config/skinCode/bejing_01.js b/src/jmap/config/skinCode/bejing_01.js index 6f190cc1c..951191791 100644 --- a/src/jmap/config/skinCode/bejing_01.js +++ b/src/jmap/config/skinCode/bejing_01.js @@ -457,7 +457,6 @@ class SkinCode extends defaultStyle { haveTextHSDA: true, // 是否需创建textHSDA对象 haveArrowText: true, // 是否需创建arrowText对象 haveTrainBorder: false, // 是否需创建trainBorder对象 - aspectRatio: 7/5, // 字体宽高比例(用以拼接text是计算位置) textOffset: 4, // 字体偏移(用以控制字体据车头的距离) trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 useSelfFormat: true, // 使用配置项的nameFormat diff --git a/src/jmap/config/skinCode/chengdu_03.js b/src/jmap/config/skinCode/chengdu_03.js index dd9d49b88..c795b3cb1 100644 --- a/src/jmap/config/skinCode/chengdu_03.js +++ b/src/jmap/config/skinCode/chengdu_03.js @@ -423,7 +423,6 @@ class SkinCode extends defaultStyle { haveTextHSDA: true, // 是否需创建textHSDA对象 haveArrowText: true, // 是否需创建arrowText对象 haveTrainBorder: false, // 是否需创建trainBorder对象 - aspectRatio: 7/5, // 字体宽高比例(用以拼接text是计算位置) textOffset: 4, // 字体偏移(用以控制字体据车头的距离) trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 useSelfFormat: true, // 使用配置项的nameFormat diff --git a/src/jmap/config/skinCode/fuzhou_01.js b/src/jmap/config/skinCode/fuzhou_01.js index f5233389e..51ab11820 100644 --- a/src/jmap/config/skinCode/fuzhou_01.js +++ b/src/jmap/config/skinCode/fuzhou_01.js @@ -371,7 +371,6 @@ class SkinCode extends defaultStyle { haveTextHSDA: false, // 是否需创建textHSDA对象 haveArrowText: true, // 是否需创建arrowText对象 haveTrainBorder: false, // 是否需创建trainBorder对象 - aspectRatio: 8/15, // 字体宽高比例(用以拼接text是计算位置) textOffset: 1, // 字体偏移(用以控制字体据车头的距离) trainWidthMoreText: 2 // 计算列车长度时--列车长比text多出尺寸 }, diff --git a/src/jmap/shape/Train/TrainBody.js b/src/jmap/shape/Train/TrainBody.js index 57874c7e1..de2e42324 100644 --- a/src/jmap/shape/Train/TrainBody.js +++ b/src/jmap/shape/Train/TrainBody.js @@ -217,23 +217,23 @@ export default class TrainBody extends Group { formatChangePosition(model, style) { if (this.nameFormat) { const arr = this.nameFormat.split(':'); - let fontNumber = 0; + let widthText = 0; arr.forEach(ele => { if (ele == 'targetCode') { - this.textTrainNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset) ); - fontNumber += (style.Train.trainNumber.targetCodePrefix || '').length; + this.textTrainNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset) ); + widthText += this.textTrainNumber.getBoundingRect().width; this.add(this.textTrainNumber); } else if (ele == 'serviceNumber') { - this.textTrainServer.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset)); - fontNumber += (style.Train.trainServer.serviceNumberPrefix || '').length; + this.textTrainServer.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + widthText += this.textTrainServer.getBoundingRect().width; this.add(this.textTrainServer); } else if (ele == 'tripNumber') { - this.textTrainTarget.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset)); - fontNumber += (style.Train.trainTarget.tripNumberPrefix || '').length; + this.textTrainTarget.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + widthText += this.textTrainTarget.getBoundingRect().width; this.add(this.textTrainTarget); } else if (ele == 'groupNumber') { - this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset)); - fontNumber += (style.Train.trainTargetNumber.groupNumberPrefix || '').length; + this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + widthText += this.textTrainTargetNumber.getBoundingRect().width; this.add(this.textTrainTargetNumber); } }); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 2e575c51e..72be3b2f1 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,8 +3,8 @@ 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 = 'http://192.168.3.5:9000'; // 袁琪 + // 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.4:9000' // 琰培 } else { diff --git a/src/views/dashboard/echarts/permission.vue b/src/views/dashboard/echarts/permission.vue index ab9608a7a..108f08584 100644 --- a/src/views/dashboard/echarts/permission.vue +++ b/src/views/dashboard/echarts/permission.vue @@ -45,20 +45,19 @@ export default { left: 10, containLabel: true }], - xAxis: [{ - type: 'value' - }], - yAxis: [{ + xAxis: { + type: 'value', + show: false + }, + yAxis: { type: 'category', - data: [], + show: false, axisLabel: { interval: 0, rotate: 30 }, - splitLine: { - show: false - } - }], + data: [] + }, series: [{ type: 'bar', stack: 'chart', @@ -69,6 +68,7 @@ export default { position: 'right' } }, + barWidth: 30, tooltip: { formatter: params => { return `${params.marker} ${params.name}: ${params.value}个`; } }, @@ -83,7 +83,7 @@ export default { data: [] }] }, - mapName: '', + mapName: null, mapNameList: [], permissionList: [], chart: null @@ -110,32 +110,41 @@ export default { methods: { initChart() { listUserPermision({pageSize: 9000, pageNum: 1}).then(resp => { - this.permissionList = resp.data.list; - this.mapNameList = [...new Set(this.permissionList.map(elem => { return elem.mapName; }))]; + this.permissionList = resp.data.list.filter(elem => { return parseInt(elem.status) > 0; }); + this.mapNameList = [...new Set(this.permissionList.map(elem => { return elem.mapName; })), '']; this.$nextTick(() => { this.mapName = this.mapNameList[0] || ''; }); }); this.chart = echarts.init(document.getElementById(this.id)); this.chart.setOption(this.option); }, async loadExamData(mapName) { - var data = {}; - var list = this.permissionList.filter(elem => { return elem.mapName == mapName; }); - list.forEach(elem => { - if (!data[elem.mapProductName]) { - data[elem.mapProductName] = elem.remains; - } else { - data[elem.mapProductName] += elem.remains; - } - }); - - const keys = Object.keys(data); - const values = Object.values(data); - const sum = values.reduce((total, num) => total + num); this.option.title.text = '所属用户剩余权限分布图'; - this.option.title.subtext = `权限总计${sum}个`; - this.option.yAxis[0].data = keys; - this.option.series[0].data = values; - this.option.series[1].data = keys.map(name => { return {name, value: data[name]}; }); + if (mapName) { + var data = {}; + var list = this.permissionList.filter(elem => { return elem.mapName == mapName; }); + list.forEach(elem => { + if (!data[elem.mapProductName]) { + data[elem.mapProductName] = elem.remains; + } else { + data[elem.mapProductName] += elem.remains; + } + }); + + const keys = Object.keys(data); + const values = Object.values(data); + const sum = keys.length > 0? values.reduce((total, num) => total + num) : 0; + this.option.title.subtext = `权限总计${sum}个`; + this.option.xAxis.show = true; + this.option.yAxis.show = true; + this.option.yAxis.data = keys; + this.option.series[0].data = values; + this.option.series[1].data = keys.map(name => { return {name, value: data[name]}; }); + } else { + this.option.xAxis.show = false; + this.option.yAxis.show = false; + this.option.title.subtext = `暂无数据`; + } + this.chart.setOption(this.option); } } diff --git a/src/views/jointTraining/menuDraft/chooseRole.vue b/src/views/jointTraining/menuDraft/chooseRole.vue index 426cf67e6..de40d3eed 100644 --- a/src/views/jointTraining/menuDraft/chooseRole.vue +++ b/src/views/jointTraining/menuDraft/chooseRole.vue @@ -1,63 +1,69 @@ @@ -85,4 +91,4 @@ .tipLable { line-height: 33px; } - \ No newline at end of file + diff --git a/src/views/jointTraining/menuDraft/operateMenu.vue b/src/views/jointTraining/menuDraft/operateMenu.vue index 3f5a81600..53b027729 100644 --- a/src/views/jointTraining/menuDraft/operateMenu.vue +++ b/src/views/jointTraining/menuDraft/operateMenu.vue @@ -1,135 +1,135 @@ diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue index 9b05a3c82..258a62425 100644 --- a/src/views/trainRoom/index.vue +++ b/src/views/trainRoom/index.vue @@ -46,7 +46,7 @@ />
{ item.disabled = false; this.equipmentList.forEach(nor => { - if (item.code == nor.stationCode) { + if (item.code == nor.deviceCode) { item.disabled = true; } }); @@ -549,7 +549,7 @@ export default { async start() { let flag = true; this.equipmentList.forEach(item => { - if (!item.stationCode) { + if (!item.deviceCode) { flag = false; } }); @@ -600,13 +600,13 @@ export default { id: val.id, nickName: val.nickName, userRole: 'Attendant', - stationCode: val.stationCode + deviceCode: val.deviceCode }]; putUserRoles(params, this.$route.query.group); this.stationList.forEach(item => { item.disabled = false; this.equipmentList.forEach(nor => { - if (item.code == nor.stationCode) { + if (item.code == nor.deviceCode) { item.disabled = true; } }); @@ -693,7 +693,7 @@ export default { this.stationList.forEach(item => { item.disabled = false; this.equipmentList.forEach(nor => { - if (item.code == nor.stationCode) { + if (item.code == nor.deviceCode) { item.disabled = true; } }); @@ -723,7 +723,7 @@ export default { id: item.id, nickName: item.nickName, userRole: 'Audience', - stationCode: '' + deviceCode: '' }]; putUserRoles(params, this.$route.query.group); }, diff --git a/src/views/trainRoom/operateMenu.vue b/src/views/trainRoom/operateMenu.vue index 8ffbd3a13..a55008655 100644 --- a/src/views/trainRoom/operateMenu.vue +++ b/src/views/trainRoom/operateMenu.vue @@ -1,83 +1,85 @@ \ No newline at end of file + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + async kicked() { + try { + await putJointTrainingUserkicked(this.clickUserId, this.$route.query.group); + } catch (error) { + console.error(error); + } + } + } +}; + diff --git a/src/views/trainRoom/trainChat.vue b/src/views/trainRoom/trainChat.vue index 2ad3cc161..3a8f4d5c1 100644 --- a/src/views/trainRoom/trainChat.vue +++ b/src/views/trainRoom/trainChat.vue @@ -1,204 +1,217 @@