From 51a190771d794a0fcb083745c82c0f6addd32358 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Fri, 8 Dec 2023 19:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=90=8E=E7=9A=84=E9=BB=84?= =?UTF-8?q?=E9=87=91=E6=8C=87=E6=A0=87,=E9=A6=96=E9=A1=B5=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=A2=9C=E8=89=B2=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/faultManage/active-alarm/index.vue | 1 - src/views/index.vue | 20 +++++++++++++++- src/views/perfManage/goldTarget/index.vue | 25 ++++++++++++++------ 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue index 8eb8fe38..c75197d2 100644 --- a/src/views/faultManage/active-alarm/index.vue +++ b/src/views/faultManage/active-alarm/index.vue @@ -438,7 +438,6 @@ function fnModalVisibleBy(code: string) { function fnModalOk() { modalState.confirmLoading = true; const from = toRaw(modalState.from); - console.log(from) if (from.ackState==="1") { message.error({ content: t('views.faultManage.activeAlarm.ackError'), diff --git a/src/views/index.vue b/src/views/index.vue index 0894cdb2..9ae309e1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -14,6 +14,8 @@ import { PieChart } from 'echarts/charts'; import { LabelLayout } from 'echarts/features'; import { useRoute } from 'vue-router'; import useAppStore from '@/store/modules/app'; +import useDictStore from '@/store/modules/dict'; +const { getDict } = useDictStore(); const appStore = useAppStore(); const route = useRoute(); const { t } = useI18n(); @@ -28,6 +30,13 @@ echarts.use([ LabelLayout, ]); +/**字典数据 */ +/**用户性别字典 */ +let indexColor = ref([ + { label: 'normal', value: 'normal', elTagType: '', elTagClass: '' }, + { label: 'abnormal', value: 'abnormal', elTagType: '', elTagClass: '' }, +]); + /**表格字段列 */ //customRender(){} ----单元格处理 let tableColumns: ColumnsType = [ @@ -174,7 +183,10 @@ function fnGetList(one: boolean) { orient: 'vertical', left: 'left', }, - color: ['#91cc75', '#ee6666'], + color: [ + '' + indexColor.value[0]['elTagClass'], + '' + indexColor.value[1]['elTagClass'], + ], series: [ { name: t('views.index.realNeStatus'), @@ -393,6 +405,12 @@ function fnLocale() { } onMounted(() => { + getDict('index_status').then(res => { + if (res.length > 0) { + indexColor.value = res; + } + }); + //console.log(indexColor) fnLocale(); fnGetList(true); timer = setInterval(() => fnGetList(false), 10000); // 每隔10秒执行一次 diff --git a/src/views/perfManage/goldTarget/index.vue b/src/views/perfManage/goldTarget/index.vue index 56283614..10909215 100644 --- a/src/views/perfManage/goldTarget/index.vue +++ b/src/views/perfManage/goldTarget/index.vue @@ -83,7 +83,7 @@ function fnTableSize({ key }: MenuInfo) { /**查询参数 */ let queryParams: any = reactive({ /**卡片切换Flag */ - cardFlag: 0, //0-显示统计图 1-显示统计表 + cardFlag: 0, //0-显示统计图 1-显示统计表 /**告警设备类型 */ neType: '', /**告警网元标识 */ @@ -195,6 +195,7 @@ function fnDesign() { title: t('views.perfManage.goldTarget.time'), dataIndex: 'timeGroup', align: 'center', + fixed: 'right', }); if (!queryRangePicker.value) { queryRangePicker.value = ['', '']; @@ -204,6 +205,7 @@ function fnDesign() { const neType = queryParams.neType[0]; let goldXDate: any = []; let goldYData: any = []; + let hideAll: any = {}; goldData(queryParams).then(res => { if (res.code === RESULT_CODE_SUCCESS) { if (res.data.length > 0) { @@ -214,6 +216,7 @@ function fnDesign() { .filter(key => !['timeGroup', 'neName', 'startIndex'].includes(key)) .map(key => { const title: any = findTitleByKey(key); + hideAll[title]=false; return { name: title, data: res.data.map((item: any) => parseInt(item[key])), @@ -246,20 +249,26 @@ function fnDesign() { }, }, legend: { - right: 10, - itemWidth: 8, + // orient: 'vertical', + // left: 'left', + type: 'scroll', + orient: 'vertical', // vertical + right: 20, + //itemWidth: 20, + itemGap: 25, textStyle: { color: '#646A73', }, icon: 'circle', + selected:hideAll, }, grid: { left: '10%', - right: '5%', + right: '30%', bottom: '20%', }, yAxis: [ - { type: 'value', axisLabel: { fontSize: 10 } }, + { type: 'value', splitNumber: 4, axisLabel: { fontSize: 10 } }, { type: 'value', position: 'right', @@ -469,7 +478,9 @@ onMounted(() => { :data-source="tableState.data" :size="tableState.size" :pagination="tablePagination" - :scroll="{ x: true }" + :scroll="{ x: tableColumnsDnd.length * 200, y: 450 }" + @resizeColumn="(w:number, col:any) => (col.width = w)" + :show-expand-column="false" > @@ -494,7 +505,7 @@ onMounted(() => {