From 9733e3b67cd1abe6e7ce298cc048fabd86c0f24e Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 25 六月 2025 10:01:09 +0800 Subject: [PATCH] 1、报警分析页面饼图种类过多时饼图颜色出现白色与背景色一致导致无法区分 2、综合效率分析页面计算OEE功能新增loading提示 3、统计分析和统计图表页面新增图表数据加载提示以及优化图表展示增加分辨率适应及代码 --- src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue | 97 +++++++++--------------------------------------- 1 files changed, 19 insertions(+), 78 deletions(-) diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue index 8ee1144..da048a5 100644 --- a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue +++ b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue @@ -38,7 +38,7 @@ </a-table> </div> - <a-spin :spinning="echartLoading"> + <a-spin :spinning="eChartLoading"> <div style="width: 100%;height: 100%;display: flex;"> <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div> <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div> @@ -51,13 +51,8 @@ <script> import moment from 'moment' - import { putAction, getAction } from '@/api/manage' - import $ from 'jquery' - import '@/components/table2excel/table2excel' - import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' - import { - JeecgListMixin - } from '@/mixins/JeecgListMixin' + import { getAction } from '@/api/manage' + import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' const columns = [ { title: '鎶ヨ鍙�', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' }, @@ -98,51 +93,31 @@ ] export default { - // mixins: [JeecgListMixin], name: 'alarmAnalysisMain', components: {}, data() { return { - dataSource: [], /* table鍔犺浇鐘舵�� */ outerDataLoading: false, innerDataLoading: false, - echartLoading: false, + eChartLoading: false, typeTree: '', - typeParent: 1, - typeEquipment: 1, - TreeIDOne: 1, - TreeIDTwo: 2, - deviceTypeDict: '', dates: [], - identifying: [], queryParam: {}, - queryParams: {}, queryParamEquip: {}, queryParamPeople: {}, - efficiencyOptions: [ - { label: '鍒╃敤鐜�', value: 'lyl' }, - { label: '寮�鏈虹巼', value: 'kjl' }, - { label: '寮�鏈烘椂闂�', value: 'kjsj' }, - { label: '鍔犲伐鏃堕棿', value: 'jgsj' }, - { label: '寰呮満鏃堕棿', value: 'djsj' }, - { label: '鍏虫満鏃堕棿', value: 'gjsj' } - ], - checkedList: ['lyl'], dataList: [], url: { efficiencyList: '/mdc/alarmAnalyze/alarmList', - listByType: '/mdc/MdcUtilizationRate/getByType', alarmTrend: '/mdc/alarmAnalyze/alarmTrend', equipmentAlarmList: '/mdc/alarmAnalyze/equipmentAlarmList' }, - tableHeads: [], pieDate: [0], XData: [0], YData: [0], columns, innerColumns, - hasRequsetAlarmCodeList: [] + hasRequestAlarmCodeList: [] } }, props: { nodeTree: '', Type: '', nodePeople: '' }, @@ -155,7 +130,6 @@ this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') this.queryParam.typeTree = '1' this.loadData1() - }, mounted() { this.drawWrin() @@ -196,14 +170,6 @@ } }, filters: { - numFilter(value) { - if (value) { - return parseFloat((value * 100).toFixed(2)) - } else { - return '0' - } - }, - /** * 鏍煎紡鍖栨椂闂� * @param seconds 绉掓暟 @@ -243,9 +209,8 @@ }, TableDraw(key, val) { let that = this - that.echartLoading = true + that.eChartLoading = true that.queryParam.alarmCode = val.alarmCode - console.log(this.queryParam) getAction(that.url.alarmTrend, that.queryParam) .then(res => { if (res.success) { @@ -258,21 +223,12 @@ that.XData = res.result.dateCountList.map(item => item.key) that.YData = res.result.dateCountList.map(item => item.count) - // this.tableHeads = res.result.dates - // this.dataList = res.result - // this.draw() - // this.checkSameData(this.dataList) - // this.checkSameData1(this.dataList) - // this.checkSameData2(this.dataList) - // this.combineCell(); - // this.initDeviceType(this.dataList) that.drawWrin() } }) .finally(() => { - that.echartLoading = false + that.eChartLoading = false }) - console.log(this.YData) }, disabledDate(current) { @@ -322,20 +278,11 @@ }, loadData1() { this.outerDataLoading = true - this.tableHeads = [] this.dataList = [] getAction(this.url.efficiencyList, this.queryParam).then(res => { if (res.success) { - // this.tableHeads = res.result.dates this.dataList = res.result - this.hasRequsetAlarmCodeList = [] - // this.draw() - // this.checkSameData(this.dataList) - // this.checkSameData1(this.dataList) - // this.checkSameData2(this.dataList) - // this.combineCell(); - // this.initDeviceType(this.dataList) - + this.hasRequestAlarmCodeList = [] } }).finally(() => { this.outerDataLoading = false @@ -354,27 +301,21 @@ }, tooltip: { trigger: 'item', - formatter: '<br/>{b} : {c} ({d}%)' + formatter: '{b} : {c} ({d}%)' }, calculable: true, series: [{ type: 'pie', radius: '60%', + label: { + show: true, + formatter: '{b}\n{c}', + color: 'inherit' + }, itemStyle: { - normal: { - color: function(params) { - var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] - return colorList[params.dataIndex] - }, - label: { - show: true, - // position: 'top', - formatter: '{b}\n{c}', - color: function(params) { - var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] - return colorList[params.dataIndex] - } - } + color: function(params) { + const colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3'] + return colorList[params.dataIndex % colorList.length] } }, data: this.pieDate @@ -483,7 +424,7 @@ let _this = this // 褰撳睍寮�鏃惰嫢璇ヨ鏈灞曞紑杩囨墠浼氳姹傚悗鍙版暟鎹紝灞曞紑杩囩殑鏁版嵁浼氳缂撳瓨鏃犻渶閲嶅璇锋眰 this.queryParam.alarmCode = record.alarmCode - if (expanded && !this.hasRequsetAlarmCodeList.includes(record.alarmCode)) { + if (expanded && !this.hasRequestAlarmCodeList.includes(record.alarmCode)) { this.innerDataLoading = true getAction(this.url.equipmentAlarmList, this.queryParam).then(res => { if (res.success) { @@ -492,7 +433,7 @@ item.innerDataList = res.result } }) - _this.hasRequsetAlarmCodeList.push(record.alarmCode) + _this.hasRequestAlarmCodeList.push(record.alarmCode) } }) .finally(() => { -- Gitblit v1.9.3