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 @@