From 743f3361dec55afdf663a42a68bb94cf35c2248f Mon Sep 17 00:00:00 2001 From: net <net@netdeMBP.lan> Date: 星期五, 14 二月 2025 17:23:28 +0800 Subject: [PATCH] 更新 --- zhitan-system/.DS_Store | 0 zhitan-system/src/.DS_Store | 0 /dev/null | 409 ---------------------------------------------------------- zhitan-common/src/.DS_Store | 0 zhitan-admin/.DS_Store | 0 zhitan-common/.DS_Store | 0 .DS_Store | 0 zhitan-admin/src/.DS_Store | 0 8 files changed, 0 insertions(+), 409 deletions(-) diff --git a/.DS_Store b/.DS_Store index 5f8d3a4..8898cb0 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/zhitan-admin/.DS_Store b/zhitan-admin/.DS_Store index 83a9dc7..cdfd22b 100644 --- a/zhitan-admin/.DS_Store +++ b/zhitan-admin/.DS_Store Binary files differ diff --git a/zhitan-admin/src/.DS_Store b/zhitan-admin/src/.DS_Store new file mode 100644 index 0000000..c112836 --- /dev/null +++ b/zhitan-admin/src/.DS_Store Binary files differ diff --git a/zhitan-common/.DS_Store b/zhitan-common/.DS_Store new file mode 100644 index 0000000..6966f7c --- /dev/null +++ b/zhitan-common/.DS_Store Binary files differ diff --git a/zhitan-common/src/.DS_Store b/zhitan-common/src/.DS_Store new file mode 100644 index 0000000..d7cfb4d --- /dev/null +++ b/zhitan-common/src/.DS_Store Binary files differ diff --git a/zhitan-system/.DS_Store b/zhitan-system/.DS_Store index 40087c1..00a832e 100644 --- a/zhitan-system/.DS_Store +++ b/zhitan-system/.DS_Store Binary files differ diff --git a/zhitan-system/src/.DS_Store b/zhitan-system/src/.DS_Store new file mode 100644 index 0000000..da7d6c1 --- /dev/null +++ b/zhitan-system/src/.DS_Store Binary files differ diff --git a/zhitan-vue/src/views/carbonemission/carbonEmission.vue b/zhitan-vue/src/views/carbonemission/carbonEmission.vue deleted file mode 100644 index 8d49140..0000000 --- a/zhitan-vue/src/views/carbonemission/carbonEmission.vue +++ /dev/null @@ -1,588 +0,0 @@ -<template> - <div class="page"> - <div class="page-container"> - <div class="page-container-left"> - <LeftTree ref="leftTreeRef" @handleNodeClick="handleNodeClick" /> - </div> - <div class="page-container-right"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true"> - <el-form-item label="鏈熼棿" prop="timeType"> - <el-select v-model="queryParams.timeType" placeholder="鏈熼棿" clearable style="width: 120px" - @change="handleTimeType"> - <el-option v-for="dict in period" :key="dict.value" :label="dict.label" :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item label="鏃堕棿"> - <el-date-picker v-model="queryParams.dataTime" :type="queryParams.timeType == 'YEAR' - ? 'year' - : queryParams.timeType == 'MONTH' - ? 'month' - : 'date' - " :format="queryParams.timeType == 'YEAR' - ? 'YYYY' - : queryParams.timeType == 'MONTH' - ? 'YYYY-MM' - : 'YYYY-MM-DD' - " value-format="YYYY-MM-DD" placeholder="鏃堕棿" style="width: 100%" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery"> - 鎼滅储 - </el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Download" @click="handleExport"> - 瀵煎嚭 - </el-button> - </el-form-item> - </el-form> - </div> - <div style=" - height: calc(100vh - 220px) !important; - max-height: calc(100vh - 220px) !important; - overflow-y: auto; - "> - <div class="card-list" v-if="listTop.length > 1"> - <el-button @click="dialogVisible = true"> 鏌ョ湅鏇村 </el-button> - </div> - <template v-for="(row, rowIndex) in listTop" :key="rowIndex" v-loading="loading"> - <div class="card-list" v-if="rowIndex == 0"> - <template v-for="(item, index) in row" :key="index"> - <div class="card-list-item"> - <div class="item-top"> - <div class="top-icon" :style="{ - backgroundImage: 'url(' + bgList[index].icon + ')', - }" /> - <div class="top-right"> - {{ item.allEneryType }} - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left">纰虫帓鏀鹃噺/tCO鈧俥</div> - <div class="bottom-right" :style="{ color: bgList[index].color }"> - {{ item.totalEnery }} - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left">鍚屾瘮</div> - <div class="bottom-right" :style="{ color: bgList[index].color }"> - {{ Math.abs(item.yoyEnery) }}% - <el-icon v-if="!!item.yoyEnery" :color="item.yoyEnery > 0 - ? 'green' - : item.yoyEnery < 0 - ? 'red' - : '' - "> - <Top v-if="item.yoyEnery > 0" /> - <Bottom v-if="item.yoyEnery < 0" /> - </el-icon> - </div> - </div> - </div> - </template> - </div> - </template> - <BaseCard :title="queryParams.nodeName + - '-纰虫帓鏀鹃噺鍚岀幆姣�(' + - queryParams.dataTime + - ')' - "> - <div class="chart-box" v-loading="loading"> - <div id="Chart1" /> - </div> - </BaseCard> - <BaseCard :title="queryParams.nodeName + - '-纰虫帓鏀鹃噺缁熻鍒嗘瀽琛�(' + - queryParams.dataTime + - ')' - "> - <div class="table-box"> - <el-table :data="listBottom" v-loading="loading"> - <el-table-column label="鏃堕棿" align="center" key="xaxis" prop="xaxis" :show-overflow-tooltip="true" /> - <el-table-column label="鐮存帓鏀鹃噺(tCO鈧俥) - " align="center" key="yaxis" prop="yaxis" :show-overflow-tooltip="true" /> - <el-table-column label="鍚屾瘮" align="center" key="yoy" prop="yoy" :show-overflow-tooltip="true" /> - <el-table-column label="鐜瘮" align="center" key="qoq" prop="qoq" :show-overflow-tooltip="true" /> - </el-table> - </div> - </BaseCard> - </div> - </div> - </div> - <el-dialog v-model="dialogVisible" title="鏌ョ湅" width="80%" v-if="dialogVisible"> - <template v-for="row in listTop" :key="rowIndex" v-loading="loading"> - <div class="card-list"> - <template v-for="(item, index) in row" :key="index"> - <div class="card-list-item"> - <div class="item-top"> - <div class="top-icon" :style="{ - backgroundImage: 'url(' + bgList[index].icon + ')', - }" /> - <div class="top-right"> - {{ item.allEneryType }} - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left">纰虫帓鏀鹃噺/tCO鈧俥</div> - <div class="bottom-right" :style="{ color: bgList[index].color }"> - {{ item.totalEnery }} - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left">鍚屾瘮</div> - <div class="bottom-right" :style="{ color: bgList[index].color }"> - {{ Math.abs(item.yoyEnery) }}% - <el-icon v-if="!!item.yoyEnery" :color="item.yoyEnery > 0 - ? 'green' - : item.yoyEnery < 0 - ? 'red' - : '' - "> - <Top v-if="item.yoyEnery > 0" /> - <Bottom v-if="item.yoyEnery < 0" /> - </el-icon> - </div> - </div> - </div> - </template> - </div> - </template> - </el-dialog> - </div> -</template> -<script setup name="carbonEmission"> -import { - listUpCarbonemission, - listMiddleCarbonemission, -} from "@/api/carbonemission/carbonemission"; -import * as echarts from "echarts"; -const { proxy } = getCurrentInstance(); -import { useRoute } from "vue-router"; -const { period } = proxy.useDict("period"); -import useSettingsStore from "@/store/modules/settings"; -const settingsStore = useSettingsStore(); -watch( - () => settingsStore.sideTheme, - (val) => { - getList(); - } -); -const loading = ref(false); -const dialogVisible = ref(false); -import icon1 from "@/assets/images/period/icon1.png"; -import icon2 from "@/assets/images/period/icon2.png"; -import icon3 from "@/assets/images/period/icon3.png"; -import icon4 from "@/assets/images/period/icon4.png"; -import icon5 from "@/assets/images/period/icon5.png"; -const bgList = ref([ - { - icon: icon1, - color: "#3371eb", - }, - { - icon: icon2, - color: "#f52528", - }, - { - icon: icon3, - color: "#ff6200", - }, - { - icon: icon4, - color: "#ffce0c", - }, - { - icon: icon5, - color: "#78e801", - }, -]); -const listTop = ref([]); -const listBottom = ref([]); -const data = reactive({ - queryParams: { - nodeId: null, - nodeName: null, - timeType: null, - dataTime: null, - }, - query: { ...useRoute().query }, -}); -const { queryParams, query } = toRefs(data); -/** 鑺傜偣鍗曞嚮浜嬩欢 */ -function handleNodeClick(data) { - queryParams.value.nodeId = data.id; - queryParams.value.nodeName = data.label; - handleTimeType(period.value[0].value); - handleQuery(); -} -function handleTimeType(e) { - queryParams.value.timeType = e; - queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD"); -} -// 纰虫帓鏀剧鐞�-纰虫帓鏀鹃噺鏍哥畻-鍒楄〃 -function getList() { - loading.value = true; - listTop.value = []; - listUpCarbonemission( - proxy.addDateRange({ - ...queryParams.value, - ...query.value, - }) - ).then((res) => { - res.data.upData.map((item, index) => { - if (index % 5 === 0) { - listTop.value.push(res.data.upData.slice(index, index + 5)); - } - }); - }); - // 鍦ㄥ垵濮嬪寲涔嬪墠锛屽厛dispose鏃х殑瀹炰緥 - if (echarts.getInstanceByDom(document.getElementById("Chart1"))) { - echarts.dispose(document.getElementById("Chart1")); - } - const myChart1 = echarts.init(document.getElementById("Chart1")); - listMiddleCarbonemission( - proxy.addDateRange({ - emissionType: "allType", - ...queryParams.value, - ...query.value, - }) - ).then((res) => { - if (!!res.code && res.code == 200) { - loading.value = false; - let xaxis = []; - let yaxis = []; - let yoy = []; - let qoq = []; - if (!!res.data) { - res.data.map((item) => { - xaxis.push(item.xaxis); - yaxis.push(!!item.yaxis ? item.yaxis : 0); - yoy.push(!!item.yoy ? item.yoy : 0); - qoq.push(!!item.qoq ? item.qoq : 0); - }); - listBottom.value = res.data; - } - setTimeout(() => { - myChart1.setOption({ - color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - textStyle: { - fontSize: 14, - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - }, - grid: { - top: "45", - left: "7%", - right: "5%", - bottom: "10", - containLabel: true, - }, - legend: { - icon: "rect", - itemWidth: 14, - itemHeight: 10, - textStyle: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - xAxis: { - type: "category", - axisPointer: { - type: "shadow", - }, - axisLine: { - show: true, - lineStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - splitLine: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [5, 0, 0, 0], - // formatter: '{value} ml' - }, - data: xaxis, - }, - yAxis: [ - { - name: "tCO鈧俥", - type: "value", - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - { - type: "value", - name: "%", - alignTicks: true, - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - axisTick: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - ], - series: [ - { - name: "纰虫帓鏀鹃噺", - type: "bar", - barWidth: "27", - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: yaxis, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: "鍚屾瘮", - type: "line", - yAxisIndex: 1, - symbol: "none", // 璁剧疆涓� 'none' 鍘绘帀鍦嗙偣 - data: yoy, - }, - { - name: "鐜瘮", - type: "line", - yAxisIndex: 1, - symbol: "none", // 璁剧疆涓� 'none' 鍘绘帀鍦嗙偣 - data: qoq, - }, - ], - }); - }, 100); - window.addEventListener( - "resize", - () => { - myChart1.resize(); - }, - { passive: true } - ); - } - }); -} -// 纰虫帓鏀剧鐞�-纰虫帓鏀鹃噺鏍哥畻-鎼滅储 -function handleQuery() { - getList(); -} -// 纰虫帓鏀剧鐞�-纰虫帓鏀鹃噺鏍哥畻-閲嶇疆 -function resetQuery() { - proxy.resetForm("queryRef"); - queryParams.value.timeType = null; - queryParams.value.dataTime = null; - handleTimeType(period.value[0].value); - handleQuery(); -} -// 纰虫帓鏀剧鐞�-纰虫帓鏀鹃噺鏍哥畻-瀵煎嚭 -function handleExport() { - proxy.download( - "carbonEmission/export", - { - emissionType: "allType", - ...queryParams.value, - ...query.value, - }, - `${queryParams.value.nodeName}-纰虫帓鏀鹃噺鏍哥畻_${new Date().getTime()}.xlsx` - ); -} -</script> -<style scoped lang="scss"> -@import "@/assets/styles/page.scss"; - -.themeDark { - .card-list { - width: 100%; - display: flex; - flex-wrap: wrap; - padding: 18px; - color: #fff; - - .card-list-item { - width: 19%; - margin-right: 1%; - height: 157px; - background: #223386; - border-radius: 5px 5px 5px 5px; - border: 1px solid #4868b7; - background-size: 100% 100%; - box-sizing: border-box; - padding: 25px 18px 12px 16px; - - .item-top { - display: flex; - align-items: center; - - .top-icon { - width: 40px; - height: 40px; - background-size: 100% 100%; - } - - .top-right { - margin-left: 16px; - font-weight: bold; - font-size: 16px; - font-family: OPPOSans-Bold; - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 18px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 14px; - } - } - } -} - -.themeLight { - .card-list { - width: 100%; - display: flex; - flex-wrap: wrap; - padding: 18px; - - .card-list-item { - width: 19%; - margin-right: 1%; - height: 157px; - background: #fff; - border-radius: 5px 5px 5px 5px; - border: 1px solid #e8e8e8; - background-size: 100% 100%; - box-sizing: border-box; - padding: 25px 18px 12px 16px; - - .item-top { - display: flex; - align-items: center; - - .top-icon { - width: 40px; - height: 40px; - background-size: 100% 100%; - } - - .top-right { - margin-left: 16px; - font-weight: bold; - font-size: 16px; - color: #000; - font-family: OPPOSans-Bold; - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 18px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 14px; - } - } - } -} - -.chart-box { - width: 100%; - height: calc(100vh - 500px) !important; - - div { - width: 100%; - height: 100%; - } -} -</style> diff --git a/zhitan-vue/src/views/deepanalysis/deepAnalysis.vue b/zhitan-vue/src/views/deepanalysis/deepAnalysis.vue deleted file mode 100644 index 11e5ea0..0000000 --- a/zhitan-vue/src/views/deepanalysis/deepAnalysis.vue +++ /dev/null @@ -1,363 +0,0 @@ -<template> - <div class="page"> - <div class="form-card"> - <el-form :model="form" ref="queryRef" :inline="true" label-width="80px"> - <el-form-item label="鑳芥簮绫诲瀷" prop="energyType"> - <el-select v-model="form.energyType" placeholder="璇烽�夋嫨鑳芥簮绫诲瀷"> - <el-option :label="item.enername" :value="item.enersno" v-for="item in energyTypeList" - :key="item.enersno" /> - </el-select> - </el-form-item> - <el-form-item label="鏈熼棿" prop="timeType" > - <el-select v-model="form.timeType" placeholder="鏈熼棿" clearable style="width: 120px" @change="handleTimeType"> - <el-option v-for="dict in period" :key="dict.value" :label="dict.label" :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item label="鏃堕棿閫夋嫨" prop="dataTime"> - <el-date-picker v-if="form.type == 1" v-model="form.dataTime" type="year" /> - <el-date-picker v-else-if="form.type == 2" v-model="form.dataTime" type="month" format="YYYY-MM" - value-format="YYYY-MM" /> - <el-date-picker v-else v-model="form.dataTime" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - <div class="card-list"> - <div class="card-list-item" v-for="(item, index) in periodList" :key="index"> - <div class="item-top"> - <div class="icon" :style="{ backgroundImage: 'url(' + item.icon + ')' }"></div> - <div class="name">{{ item.title }}</div> - </div> - <div class="item-bottom"> - <div class="bottom-box text-center" :style="{ color: item.color }"> - {{ item.data }} - </div> - </div> - </div> - </div> - <BaseCard title="鑳芥簮娴佸悜鍒嗘瀽"> - <div class="chart-box"> - <div id="Chart1" /> - </div> - </BaseCard> - </div> -</template> -<script setup> -import useSettingsStore from '@/store/modules/settings' -import { listEnergyTypeList } from "@/api/modelConfiguration/energyType"; -const settingsStore = useSettingsStore() -import * as echarts from 'echarts'; -let { proxy } = getCurrentInstance() -import { onMounted } from 'vue'; -const { period } = proxy.useDict("period"); -let form = ref({ - energyType: null, - timeType: null, - dataTime: null, -}) -function handleTimeType(e) { - form.value.timeType = e; - form.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD"); -} -const energyTypeList = ref(); -function getEnergyTypeList() { - listEnergyTypeList().then((res) => { - energyTypeList.value = res.data; - form.value.energyType = energyTypeList.value[0].enersno - handleTimeType(period.value[0].value); - }); -} -getEnergyTypeList() - -function handleSelect(e) { - console.log(e, form.value.type) - if (form.value.type == 1) { - form.value.time = proxy.dayjs().format('YYYY') - } else if (form.value.type == 2) { - form.value.time = proxy.dayjs().format('YYYY-MM') - } else { - form.value.time = proxy.dayjs().format('YYYY-MM-DD') - } -} -function handleQuery() { } - -function resetQuery() { - form.value = { - type: 1, - time: proxy.dayjs().format('YYYY'), - } -} - -import icon1 from '@/assets/images/period/icon1.png' -import icon2 from '@/assets/images/period/icon2.png' -import icon3 from '@/assets/images/period/icon3.png' -import icon4 from '@/assets/images/period/icon4.png' -import icon5 from '@/assets/images/period/icon5.png' -const periodList = ref([ - { - icon: icon1, - color: "#3371eb", - title: "绱鑳借��", - data: '1000.1 m鲁' - }, - { - icon: icon3, - color: "#ff6200", - title: "鍒嗚〃鑳借��", - data: ' 0 m鲁' - }, - { - icon: icon4, - color: "#ffce0c", - title: "鎹熷け閲�", - data: '1000.1 m鲁' - }, - { - icon: icon5, - color: "#78e801", - title: "鎹熷け姣斾緥", - data: '100.00%' - }, -]) - -watch(() => settingsStore.sideTheme, (val) => { - getChart() -}) - -function getChart() { - - - let colors = ['#FBB4AE', '#B3CDE3', '#CCEBC5', '#DECBE4', '#5470C6']; - let mydata = [ - { name: 'L1', itemStyle: { color: colors[0] }, depth: 0 }, - { name: 'L1-1', itemStyle: { color: colors[0] }, depth: 0 }, - { name: 'L1-2', itemStyle: { color: colors[0] }, depth: 0 }, - { name: 'L1-3', itemStyle: { color: colors[0] }, depth: 0 }, - - - { name: 'L2', itemStyle: { color: colors[1] }, depth: 1 }, - { name: 'L2-1', itemStyle: { color: colors[1] }, depth: 1 }, - { name: 'L2-2', itemStyle: { color: colors[1] }, depth: 1 }, - { name: 'L2-3', itemStyle: { color: colors[1] }, depth: 1 }, - - - { name: 'L3', itemStyle: { color: colors[2] }, depth: 2 }, - { name: 'L3-1', itemStyle: { color: colors[2] }, depth: 2 }, - { name: 'L3-2', itemStyle: { color: colors[2] }, depth: 2 }, - - - { name: 'L4', itemStyle: { color: colors[3] }, depth: 3 }, - - - - ]; - // mydata.reverse() - let mylinks = [ - // L1鈫扡4 9720 - { source: 'L1', target: 'L4', value: 9720 }, - // L2鈫扡4 24396 - { source: 'L2', target: 'L4', value: 24396 }, - // L3鈫扡4 1462 - { source: 'L3', target: 'L4', value: 1462 }, - - // L1鈫扡2鈫扡3鈫扡4 215 - { source: 'L1-1', target: 'L2-1', value: 215 }, - { source: 'L2-1', target: 'L3-1', value: 215 }, - { source: 'L3-1', target: 'L4', value: 215 }, - - // L1鈫扡2鈫扡4 4518 - { source: 'L1-2', target: 'L2-2', value: 4518 }, - { source: 'L2-2', target: 'L4', value: 4518 }, - // L1鈫扡3鈫扡4 217 - { source: 'L1-3', target: 'L3-2', value: 217 }, - { source: 'L3-2', target: 'L4', value: 217 }, - - // L2鈫扡3鈫扡4 893 - { source: 'L2-3', target: 'L3-3', value: 893 }, - { source: 'L3-3', target: 'L4', value: 893 }, - - ]; - - - const myChart1 = echarts.init(document.getElementById("Chart1")); - myChart1.setOption({ - tooltip: { - trigger: 'item', - triggerOn: 'mousemove', - }, - series: { - type: 'sankey', - lineStyle: { - opacity: 0.3, - color: 'gradient', - curveness: 0.7, - }, - // nodeAlign: 'left', - nodeGap: 18, - layoutIterations: 1, - emphasis: { - focus: 'adjacency', - }, - data: mydata, - links: mylinks, - }, - }) - window.addEventListener("resize", () => { - myChart1.resize(); - }, { passive: true }); -} -onMounted(() => { - getChart() -}) -</script> -<style scoped lang="scss"> -@import "@/assets/styles/page.scss"; - -.themeDark { - - .card-list { - display: flex; - justify-content: space-between; - padding: 18px; - - .card-list-item { - width: 24%; - height: 167px; - background: #223386; - border-radius: 5px 5px 5px 5px; - border: 1px solid #4868b7; - background-size: 100% 100%; - box-sizing: border-box; - padding: 20px 18px 23px 16px; - - .item-top { - display: flex; - align-items: center; - - .icon { - width: 40px; - height: 40px; - background-size: 100% 100%; - } - - .name { - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 20px; - color: #fffdfd; - margin-left: 7px; - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 15px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 16px; - - .bottom-box { - width: 100%; - font-size: 25px; - color: rgb(51, 113, 235); - } - - .bottom-left { - font-family: OPPOSans, OPPOSans; - font-weight: 500; - font-size: 14px; - color: rgba(255, 255, 255, 0.7); - } - - .bottom-right { - font-family: OPPOSans, OPPOSans; - font-weight: 800; - font-size: 16px; - color: #f52528; - } - } - } - } -} - -.themeLight { - .card-list { - display: flex; - justify-content: space-between; - padding: 18px; - - .card-list-item { - width: 24%; - height: 167px; - background: #fff; - border-radius: 5px 5px 5px 5px; - border: 1px solid #E8E8E8; - background-size: 100% 100%; - box-sizing: border-box; - padding: 20px 18px 23px 16px; - - .item-top { - display: flex; - align-items: center; - - .icon { - width: 40px; - height: 40px; - background-size: 100% 100%; - } - - .name { - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 20px; - color: #000; - margin-left: 7px; - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 15px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 16px; - - .bottom-box { - width: 100%; - font-size: 25px; - color: rgb(51, 113, 235); - } - - .bottom-left { - font-family: OPPOSans, OPPOSans; - font-weight: 500; - font-size: 14px; - color: #5D5C5C; - } - - .bottom-right { - font-family: OPPOSans, OPPOSans; - font-weight: 800; - font-size: 16px; - color: #f52528; - } - } - } - } -} - -.chart-box { - width: 100%; - height: calc(100vh - 500px) !important; - - div { - width: 100%; - height: 100%; - } -} -</style> \ No newline at end of file diff --git a/zhitan-vue/src/views/index.vue b/zhitan-vue/src/views/index.vue deleted file mode 100644 index 8c988a0..0000000 --- a/zhitan-vue/src/views/index.vue +++ /dev/null @@ -1,1081 +0,0 @@ -<template> - <div class="page" style="padding-left: 8px; padding-top: 8px"> - <CardHeader :showBtn="true" :active="'0'" :period="period" @handleClick="handleTimeType"> - <span> - 鍏ㄥ巶鑳借�楃粺璁� - <el-button @click="dialogVisible = true" v-if="list.length > 1"> 鏌ョ湅鏇村 </el-button> - </span> - </CardHeader> - <template v-for="(row, rowIndex) in list" :key="rowIndex" v-loading="loading02"> - <div class="card-list" v-if="settingsStore.sideTheme == 'theme-dark' && rowIndex == 0"> - <template v-for="(item, index) in row" :key="index"> - <div - class="card-list-item" - :style="{ - backgroundImage: 'url(' + bgList[index].bg + ')', - }" - > - <div class="item-top"> - <div class="top-icon" :style="{ backgroundImage: 'url(' + bgList[index].icon + ')' }" /> - <div class="top-right"> - <div class="right-name"> - {{ item.energyName }} - </div> - <div class="right-value"> - <span> {{ item.count }}</span> - <span class="unit">{{ item.energyUnit }}</span> - </div> - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left"> - <span> - 鍚屾瘮: {{ Math.abs(item.tongbi) }} - <el-icon :color="item.tongbi > 0 ? 'green' : item.tongbi < 0 ? 'red' : ''"> - <Top v-if="item.tongbi > 0" /> - <Bottom v-if="item.tongbi < 0" /> - </el-icon> - </span> - </div> - <div class="bottom-right"> - <span - >鐜瘮: {{ Math.abs(item.huanbi) }} - <el-icon :color="item.huanbi > 0 ? 'green' : item.huanbi < 0 ? 'red' : ''"> - <Top v-if="item.huanbi > 0" /> - <Bottom v-if="item.huanbi < 0" /> - </el-icon> - </span> - </div> - </div> - </div> - </template> - </div> - <div class="card-list" v-if="settingsStore.sideTheme != 'theme-dark' && rowIndex == 0"> - <template v-for="(item, index) in row" :key="index" v-show="rowIndex == 0"> - <div class="card-list-item"> - <div class="item-top"> - <div class="top-icon" :style="{ backgroundImage: 'url(' + bgList[index].icon2 + ')' }" /> - <div class="top-right"> - <div class="right-name"> - {{ item.energyName }} - </div> - <div class="right-value"> - <span>{{ item.count }}</span> - <span class="unit">{{ item.energyUnit }}</span> - </div> - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left"> - <span> - 鍚屾瘮: {{ Math.abs(item.tongbi) }} - <el-icon :color="item.tongbi > 0 ? 'green' : item.tongbi < 0 ? 'red' : ''"> - <Top v-if="item.tongbi > 0" /> - <Bottom v-if="item.tongbi < 0" /> - </el-icon> - </span> - </div> - <div class="bottom-right"> - <span - >鐜瘮: {{ Math.abs(item.huanbi) }} - <el-icon :color="item.huanbi > 0 ? 'green' : item.huanbi < 0 ? 'red' : ''"> - <Top v-if="item.huanbi > 0" /> - <Bottom v-if="item.huanbi < 0" /> - </el-icon> - </span> - </div> - </div> - </div> - <div class="line"></div> - </template> - </div> - </template> - <!-- 鍥捐〃 --> - <div class="page-main"> - <el-row :gutter="9" style="margin-bottom: 27px"> - <el-col :span="12"> - <el-card> - <CardHeader :period="period" @handleClick="handleTimeType"> 鑳借�楄秼鍔� </CardHeader> - <div id="Chart1" class="chart" v-loading="loading1" /> - </el-card> - </el-col> - <el-col :span="12"> - <el-card> - <CardHeader :period="period" @handleClick="handleTimeType"> 鍏ㄥ巶鑳借�楀崰姣� </CardHeader> - <div id="Chart2" class="chart" v-loading="loading02" /> - </el-card> - </el-col> - </el-row> - <el-row :gutter="9"> - <el-col :span="12"> - <el-card> - <CardHeader :showBtn="true" :period="period" :active="'3'" @handleClick="handleTimeType"> - 鍘傚尯鑳借�楁帓鍚峊OP{{ listEnergyConsumptionRankingLength || "" }} - </CardHeader> - <div class="top-header"> - <div class="header-left"> - <div class="name">鎺掑悕</div> - <div class="device">璁惧</div> - </div> - <div class="header-right">鑳借�楅噺(tce)</div> - </div> - <div id="Chart3" class="chart" v-loading="loading3" style="height: 254px" /> - </el-card> - </el-col> - <el-col :span="12"> - <el-card> - <CardHeader :showBtn="true" :period="period" :active="'4'" @handleClick="handleTimeType"> - 灏栧嘲骞宠胺鍗犳瘮 - </CardHeader> - <div id="Chart4" class="chart" v-loading="loading4" /> - </el-card> - </el-col> - </el-row> - </div> - <el-dialog v-model="dialogVisible" title="鏌ョ湅鍏ㄥ巶鑳借�楃粺璁�" width="80%" v-if="dialogVisible"> - <template v-for="(row, rowIndex) in list" :key="rowIndex"> - <div class="card-list" v-if="settingsStore.sideTheme == 'theme-dark'"> - <template v-for="(item, index) in row" :key="index"> - <div - class="card-list-item" - :style="{ - backgroundImage: 'url(' + bgList[index].bg + ')', - }" - > - <div class="item-top"> - <div - class="top-icon" - :style="{ - backgroundImage: 'url(' + bgList[index].icon + ')', - }" - /> - <div class="top-right"> - <div class="right-name"> - {{ item.energyName }} - </div> - <div class="right-value"> - <span> {{ item.count }}</span> - <span class="unit">{{ item.energyUnit }}</span> - </div> - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left"> - <span> - 鍚屾瘮: {{ Math.abs(item.tongbi) }} - <el-icon :color="item.tongbi > 0 ? 'green' : item.tongbi < 0 ? 'red' : ''"> - <Top v-if="item.tongbi > 0" /> - <Bottom v-if="item.tongbi < 0" /> - </el-icon> - </span> - </div> - <div class="bottom-right"> - <span - >鐜瘮: {{ Math.abs(item.huanbi) }} - <el-icon :color="item.huanbi > 0 ? 'green' : item.huanbi < 0 ? 'red' : ''"> - <Top v-if="item.huanbi > 0" /> - <Bottom v-if="item.huanbi < 0" /> - </el-icon> - </span> - </div> - </div> - </div> - </template> - </div> - <div class="card-list" v-if="settingsStore.sideTheme != 'theme-dark'"> - <template v-for="(item, index) in row" :key="index" v-show="rowIndex == 0"> - <div class="card-list-item"> - <div class="item-top"> - <div - class="top-icon" - :style="{ - backgroundImage: 'url(' + bgList[index].icon2 + ')', - }" - /> - <div class="top-right"> - <div class="right-name"> - {{ item.energyName }} - </div> - <div class="right-value"> - <span>{{ item.count }}</span> - <span class="unit">{{ item.energyUnit }}</span> - </div> - </div> - </div> - <div class="item-bottom"> - <div class="bottom-left"> - <span> - 鍚屾瘮: {{ Math.abs(item.tongbi) }} - <el-icon :color="item.tongbi > 0 ? 'green' : item.tongbi < 0 ? 'red' : ''"> - <Top v-if="item.tongbi > 0" /> - <Bottom v-if="item.tongbi < 0" /> - </el-icon> - </span> - </div> - <div class="bottom-right"> - <span - >鐜瘮: {{ Math.abs(item.huanbi) }} - <el-icon :color="item.huanbi > 0 ? 'green' : item.huanbi < 0 ? 'red' : ''"> - <Top v-if="item.huanbi > 0" /> - <Bottom v-if="item.huanbi < 0" /> - </el-icon> - </span> - </div> - </div> - </div> - <div class="line"></div> - </template> - </div> - </template> - </el-dialog> - </div> -</template> -<script setup name="Index"> -import * as echarts from "echarts" -import CardHeader from "@/components/CardHeader/CardHeader.vue" -import { - listEnergyConsumptionSummation, - listEnergyConsumptionTrend, - listEnergyConsumptionRanking, - listPeakValley, -} from "@/api/home" -const { proxy } = getCurrentInstance() -const { period } = proxy.useDict("period") -import useSettingsStore from "@/store/modules/settings" -const settingsStore = useSettingsStore() -watch( - () => settingsStore.sideTheme, - (val) => { - getListEnergyConsumptionSummation() - getListEnergyConsumptionTrend() - getListEnergyConsumptionRanking() - getListPeakValley() - } -) -import index_card_1 from "@/assets/images/home/index-card-1.png" -import index_card_2 from "@/assets/images/home/index-card-2.png" -import index_card_3 from "@/assets/images/home/index-card-3.png" -import index_card_4 from "@/assets/images/home/index-card-4.png" -import index_card_5 from "@/assets/images/home/index-card-5.png" -import card_icon_1 from "@/assets/images/home/card-icon-1.png" -import card_icon_2 from "@/assets/images/home/card-icon-2.png" -import card_icon_3 from "@/assets/images/home/card-icon-3.png" -import card_icon_4 from "@/assets/images/home/card-icon-4.png" -import card_icon_5 from "@/assets/images/home/card-icon-5.png" -import card_icon2_1 from "@/assets/images/home/card-icon2-1.png" -import card_icon2_2 from "@/assets/images/home/card-icon2-2.png" -import card_icon2_3 from "@/assets/images/home/card-icon2-3.png" -import card_icon2_4 from "@/assets/images/home/card-icon2-4.png" -import card_icon2_5 from "@/assets/images/home/card-icon2-5.png" -import { fa } from "element-plus/es/locales.mjs" -const bgList = ref([ - { - bg: index_card_1, - icon: card_icon_1, - icon2: card_icon2_1, - }, - { - bg: index_card_2, - icon: card_icon_2, - icon2: card_icon2_2, - }, - { - bg: index_card_3, - icon: card_icon_3, - icon2: card_icon2_3, - }, - { - bg: index_card_4, - icon: card_icon_4, - icon2: card_icon2_4, - }, - { - bg: index_card_5, - icon: card_icon_5, - icon2: card_icon2_5, - }, -]) -const list = ref([[{}, {}, {}, {}, {}]]) -const listEnergyConsumptionRankingLength = ref(0) -const dialogVisible = ref(false) -const loading02 = ref(false) -const loading1 = ref(false) -const loading3 = ref(false) -const loading4 = ref(false) -const data = reactive({ - queryParams: { - nodeId: null, - timeType: null, - dataTime: null, - nodeName: null, - }, -}) -const { queryParams } = toRefs(data) -function handleTimeType(item, type) { - queryParams.value.timeType = item - queryParams.value.type = type - queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD") - if (type == 0) { - getListEnergyConsumptionSummation() - getListEnergyConsumptionTrend() - } else if (type == 3) { - getListEnergyConsumptionRanking() - } else if (type == 4) { - getListPeakValley() - } -} -let myChart1 = null -let myChart2 = null -let myChart3 = null -let myChart4 = null -onMounted(() => { - myChart1 = echarts.init(document.getElementById("Chart1")) - myChart2 = echarts.init(document.getElementById("Chart2")) - myChart3 = echarts.init(document.getElementById("Chart3")) - myChart4 = echarts.init(document.getElementById("Chart4")) -}) -// 棣栭〉-鍏ㄥ巶鑳借�楃粺璁�/鍏ㄥ巶鑳借�楀崰姣�-鍒楄〃 -function getListEnergyConsumptionSummation() { - loading02.value = true - list.value = [] - listEnergyConsumptionSummation( - proxy.addDateRange({ - ...queryParams.value, - }) - ).then((res) => { - loading02.value = false - if (!!res.code && res.code == 200) { - let total = 0 - let seriesData = [] - if (!!res.data && res.data.length > 0) { - res.data.map((item, index) => { - total += Number(item.tonCount) - item.name = item.energyName - item.value = Number(item.tonCount).toFixed(2) - if (index % 5 === 0) { - list.value.push(res.data.slice(index, index + 5)) - } - }) - seriesData = res.data - } - setTimeout(() => { - myChart2.setOption({ - // color: ["#3371eb", "#78e801", "#ffce0c", "#ff6200", "#f52528"], - grid: { - top: "20%", - left: "15%", - right: "5%", - bottom: "0%", - containLabel: true, - }, - tooltip: { - trigger: "item", - }, - legend: { - type: "scroll", - orient: "vertical", - top: "center", - icon: "circle", - right: "5%", - itemWidth: 14, - itemHeight: 14, - itemGap: 60, - textStyle: { - align: "left", - verticalAlign: "middle", - rich: { - name: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - value: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - rate: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - }, - }, - data: seriesData, - formatter: (name) => { - let target, percent, energyUnit - for (let i = 0; i < seriesData.length; i++) { - if (seriesData[i].name === name) { - target = seriesData[i].value - energyUnit = seriesData[i].energyUnit - percent = total != 0 ? ((target / total) * 100).toFixed(2) : 0 - } - } - return `{name|${name}(${energyUnit}) }{value| ${target}} {rate| ${percent}%}` - }, - }, - series: [ - { - name: "鍏ㄥ巶鑳借�楃被鍨嬪崰姣�", - type: "pie", - center: ["30%", "50%"], - radius: ["50%", "70%"], - label: { - show: false, - fontSize: 11, - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#000", - }, - labelLine: { - show: false, - length: 50, - }, - data: seriesData, - }, - ], - }) - }, 100) - window.addEventListener( - "resize", - () => { - myChart2.resize() - }, - { passive: true } - ) - } - }) -} -// 棣栭〉-鍏ㄥ巶鑳借�楄秼鍔�-鍒楄〃 -function getListEnergyConsumptionTrend() { - loading1.value = true - listEnergyConsumptionTrend( - proxy.addDateRange({ - ...queryParams.value, - }) - ).then((res) => { - loading1.value = false - if (!!res.code && res.code == 200) { - let xdata = [] - let series = [] - if (!!res.data.xdata) { - res.data.xdata.map((item) => { - xdata.push( - proxy - .dayjs(item) - .format( - queryParams.value.timeType == "YEAR" ? "MM鏈�" : queryParams.value.timeType == "MONTH" ? "DD鏃�" : "HH鏃�" - ) - ) - }) - } - if (!!res.data.legend && !!res.data.ydata) { - series = res.data.legend.map((item, index) => { - return { - name: item, - type: "bar", - stack: "total", - barWidth: "16", - data: !!res.data.ydata ? res.data.ydata[index] : [], - } - }) - } - setTimeout(() => { - myChart1.setOption({ - color: ["#3371eb", "#78e801", "#ffce0c", "#ff6200", "#f52528"], - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: { - icon: "rect", - itemWidth: 14, - itemHeight: 10, - textStyle: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - grid: { - top: "45", - left: "7%", - right: "5%", - bottom: "10", - containLabel: true, - }, - xAxis: { - type: "category", - axisPointer: { - type: "shadow", - }, - axisLine: { - show: true, - lineStyle: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - splitLine: { - show: false, - }, - axisLabel: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [5, 0, 0, 0], - // formatter: '{value} ml' - }, - data: xdata, - }, - yAxis: [ - { - type: "value", - name: "tce", - nameTextStyle: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - }, - ], - series, - }) - }, 100) - } - }) - window.addEventListener( - "resize", - () => { - myChart1.resize() - }, - { passive: true } - ) -} -// 棣栭〉-绉戝鑳借�楁帓鍚峊OP-鍒楄〃 -function getListEnergyConsumptionRanking() { - loading3.value = true - let opt = { - index: 0, - } - listEnergyConsumptionRanking( - proxy.addDateRange({ - ...queryParams.value, - }) - ).then((res) => { - loading3.value = false - let nodeName = [] - let energyConsumption = [] - let maxenergyConsumption = [] - - if (!!res.data) { - res.data.map((item, index) => { - nodeName.push(item.nodeName) - energyConsumption.push(!!item.energyConsumption ? item.energyConsumption : 0) - maxenergyConsumption[index] = res.data[0].energyConsumption - }) - listEnergyConsumptionRankingLength.value = res.data.length - } - setTimeout(() => { - myChart3.setOption({ - grid: { - left: "1%", - right: "2%", - bottom: "2%", - top: "2%", - containLabel: true, - }, - tooltip: { - trigger: "axis", - axisPointer: { - type: "none", - }, - formatter: function (params) { - return params[0].name + " : " + params[0].value - }, - }, - xAxis: { - show: false, - type: "value", - }, - yAxis: [ - { - type: "category", - inverse: true, - splitLine: { - show: false, - }, - axisTick: { - show: false, - }, - axisLine: { - show: false, - }, - axisLabel: { - interval: 0, - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#000", - fontSize: 14, - formatter: function (value, index) { - if (index == 0) { - return "{idx0|" + (1 + index + opt.index) + "}{title|" + value + "}" - } else if (index == 1) { - return "{idx1|" + (1 + index + opt.index) + "}{title|" + value + "}" - } else if (index == 2) { - return "{idx2|" + (1 + index + opt.index) + "}{title|" + value + "}" - } else { - return "{idx|" + (1 + index + opt.index) + "}{title|" + value + "}" - } - }, - rich: { - idx0: { - color: "#FF0004", - backgroundColor: "#FF000426", - borderRadius: 100, - padding: [5, 8], - }, - idx1: { - color: "#FF8400", - backgroundColor: "#FF84001F", - borderRadius: 100, - padding: [5, 8], - }, - idx2: { - color: "#FFDD00", - backgroundColor: "#FFDD001F", - borderRadius: 100, - padding: [5, 8], - }, - idx: { - color: "#3371EB", - backgroundColor: "#3371EB26", - borderRadius: 100, - padding: [5, 8], - }, - title: { - padding: [5, 8], - }, - }, - }, - data: nodeName, - }, - { - type: "category", - inverse: true, - axisTick: "none", - axisLine: "none", - show: true, - axisLabel: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#000", - fontSize: "12", - }, - data: energyConsumption, - }, - ], - series: [ - { - type: "bar", - showBackground: true, - showBackground: true, - backgroundStyle: { - color: "#DCDEE2", - }, - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ - { - offset: 0, - color: "#0437FF", - }, - { - offset: 1, - color: "#55C6FF", - }, - ]), - }, - barWidth: "10", - data: energyConsumption, - }, - { - type: "pictorialBar", - symbol: "rect", - symbolSize: [4, 14], - symbolPosition: "end", - itemStyle: { - color: "#488BFF", - }, - data: energyConsumption, - }, - ], - }) - }, 100) - window.addEventListener( - "resize", - () => { - myChart3.resize() - }, - { passive: true } - ) - }) -} -// 棣栭〉-灏栧嘲骞宠胺鍗犳瘮-鍒楄〃 -function getListPeakValley() { - loading4.value = true - listPeakValley( - proxy.addDateRange({ - ...queryParams.value, - }) - ).then((res) => { - loading4.value = false - if (!!res.code && res.code == 200) { - let total = 0 - let seriesData = [] - if (!!res.data && res.data.length > 0) { - res.data.map((item, index) => { - total += Number(item.count) - seriesData.push({ - name: item.timeName, - value: Number(item.count).toFixed(2), - }) - }) - } - setTimeout(() => { - myChart4.setOption({ - color: ["#8B33FF", "#00DBFF", "#002ADB", "#5C92F7", "#76D2F1", "#8FADF9"], - grid: { - top: "20%", - left: "15%", - right: "5%", - bottom: "0%", - containLabel: true, - }, - tooltip: { - trigger: "item", - }, - legend: { - type: "scroll", - orient: "vertical", - top: "center", - icon: "circle", - right: "10%", - itemWidth: 14, - itemHeight: 14, - itemGap: 50, - textStyle: { - align: "left", - verticalAlign: "middle", - rich: { - name: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - value: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - rate: { - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - }, - }, - }, - data: seriesData, - formatter: (name) => { - let target, percent - for (let i = 0; i < seriesData.length; i++) { - if (seriesData[i].name === name) { - target = seriesData[i].value - percent = total != 0 ? ((target / total) * 100).toFixed(2) : 0 - } - } - return `{name|${name}(kWh) }{value| ${target}} {rate| ${percent}%}` - }, - }, - series: [ - { - name: "灏栧嘲骞宠胺鍗犳瘮鍥�", - type: "pie", - center: ["30%", "50%"], - radius: ["0%", "50%"], - avoidLabelOverlap: false, - label: { - fontSize: 11, - color: settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#000", - }, - labelLine: { - show: true, - length: 50, - }, - data: seriesData, - }, - { - name: "灏栧嘲骞宠胺鍗犳瘮鍥�", - type: "pie", - center: ["30%", "50%"], - radius: ["60%", "70%"], - avoidLabelOverlap: false, - label: { - position: "inner", - fontSize: 11, - show: false, - }, - labelLine: { - show: false, - }, - data: seriesData, - }, - ], - }) - }, 100) - window.addEventListener( - "resize", - () => { - myChart4.resize() - }, - { passive: true } - ) - } - }) -} -</script> -<style scoped lang="scss"> -.themeDark { - .page { - padding: 20px; - background: #120f2e; - - .card-title { - width: 132px; - height: 29px; - font-weight: bold; - font-size: 22px; - color: #ffffff; - } - - .card-list { - margin-top: 14px; - display: flex; - // justify-content: space-between; - width: 100%; - flex-wrap: wrap; - - .card-list-item { - width: 19%; - margin-right: 1%; - height: 157px; - background-size: 100% 100%; - box-sizing: border-box; - padding: 25px 18px 12px 16px; - color: #fff; - - .item-top { - display: flex; - - .top-icon { - width: 69px; - height: 69px; - background-size: 100% 100%; - } - - .top-right { - margin-left: 16px; - - .right-name { - font-weight: bold; - font-size: 16px; - font-family: OPPOSans-Bold; - } - - .right-value { - font-weight: 800; - font-size: 25px; - margin-top: 10px; - font-family: OPPOSans-Medium; - - .unit { - margin-left: 5px; - font-size: 16px; - font-weight: normal; - } - } - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 18px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 14px; - } - } - } - - .page-main { - margin-top: 23px; - } - } - - .chart { - width: 100%; - height: 292px; - margin-top: 10px; - } - - .top-header { - margin-top: 15px; - height: 23px; - font-family: OPPOSans, OPPOSans; - font-weight: 500; - font-size: 14px; - color: rgba(196, 213, 255, 0.6); - border-bottom: 1px solid rgba(196, 213, 255, 0.6); - display: flex; - justify-content: space-between; - - .header-left { - display: flex; - - .name { - margin-left: 7px; - margin-right: 7px; - } - } - } -} - -.themeLight { - .page { - padding: 20px; - background: #f7f8fa; - - .card-title { - width: 132px; - height: 29px; - font-weight: bold; - font-size: 22px; - color: #ffffff; - } - - .card-list { - width: 100%; - margin-top: 14px; - display: flex; - // justify-content: space-between; - align-items: center; - background-image: url("@/assets/images/home/index-card-bg2.png"); - background-size: 100% 100%; - flex-wrap: wrap; - border-radius: 20px; - - .card-list-item { - width: 19%; - margin-right: 0.5%; - height: 157px; - background-size: 100% 100%; - box-sizing: border-box; - padding: 25px 18px 12px 16px; - color: #fff; - - .item-top { - display: flex; - - .top-icon { - width: 69px; - height: 69px; - background-size: 100% 100%; - } - - .top-right { - margin-left: 16px; - - .right-name { - font-weight: bold; - font-size: 16px; - font-family: OPPOSans-Bold; - } - - .right-value { - font-weight: 800; - font-size: 30px; - margin-top: 10px; - font-family: OPPOSans-Medium; - - .unit { - margin-left: 5px; - font-size: 16px; - font-weight: normal; - } - } - } - } - - .item-bottom { - display: flex; - justify-content: space-between; - margin-top: 18px; - font-family: OPPOSans, OPPOSans; - font-weight: bold; - font-size: 14px; - } - } - - .line { - width: 1px; - height: 64px; - background-image: url("@/assets/images/home/line@2x.png"); - background-size: 100% 100%; - } - } - - .page-main { - margin-top: 23px; - } - } - - .chart { - width: 100%; - height: 292px; - margin-top: 10px; - } - - .top-header { - margin-top: 15px; - height: 23px; - font-family: OPPOSans, OPPOSans; - font-weight: 500; - font-size: 14px; - color: rgba(29, 29, 29, 0.6); - border-bottom: 1px solid rgba(196, 213, 255, 0.6); - display: flex; - justify-content: space-between; - - .header-left { - display: flex; - - .name { - margin-left: 7px; - margin-right: 7px; - } - } - } -} -</style> diff --git a/zhitan-vue/src/views/login.vue b/zhitan-vue/src/views/login.vue deleted file mode 100644 index b58823d..0000000 --- a/zhitan-vue/src/views/login.vue +++ /dev/null @@ -1,284 +0,0 @@ -<template> - <div class="login"> - <!-- <div - class="login-logo-bg" - v-if="systemInfo && systemInfo.homeLogo" - :style="{ backgroundImage: 'url(' + systemInfo.homeLogo + ')', backgroundSize: '100% 100%' }" - ></div> --> - <img v-if="systemInfo && systemInfo.homeLogo" :src="systemInfo.homeLogo" alt="" class="login-logo-img" /> - <div class="login-font" v-else>{{ systemInfo.systemName || "鑳芥簮绠$悊绯荤粺" }}</div> - <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> - <!-- <h3 class="title">鍏呯數妗╁悗鍙扮鐞嗙郴缁�</h3> --> - <el-form-item prop="username"> - <el-input v-model="loginForm.username" type="text" size="large" auto-complete="off" placeholder="璐﹀彿"> - <template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template> - </el-input> - </el-form-item> - <el-form-item prop="password"> - <el-input - v-model="loginForm.password" - type="password" - size="large" - auto-complete="off" - placeholder="瀵嗙爜" - @keyup.enter="handleLogin" - > - <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template> - </el-input> - </el-form-item> - <el-form-item prop="code" v-if="captchaEnabled"> - <el-input - v-model="loginForm.code" - size="large" - auto-complete="off" - placeholder="楠岃瘉鐮�" - style="width: 63%" - @keyup.enter="handleLogin" - > - <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template> - </el-input> - <div class="login-code"> - <img :src="codeUrl" @click="getCode" class="login-code-img" /> - </div> - </el-form-item> - <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">璁颁綇瀵嗙爜</el-checkbox> - <el-form-item style="width: 100%"> - <el-button - :loading="loading" - size="large" - type="primary" - style="width: 100%" - color="#626aef" - :dark="isDark" - @click.prevent="handleLogin" - > - <span v-if="!loading">鐧� 褰�</span> - <span v-else>鐧� 褰� 涓�...</span> - </el-button> - </el-form-item> - </el-form> - <!-- 搴曢儴 --> - <div class="el-login-footer"> - <!-- <span>Copyright 漏 2021-2024 ZhiTanCloud All Rights Reserved.</span> --> - <span>{{ systemInfo.copyRight || "Copyright 漏 2017-2024 ZhiTanCloud All Rights Reserved." }}</span> - </div> - </div> -</template> - -<script setup> -import { getCodeImg } from "@/api/login" -import Cookies from "js-cookie" -import { encrypt, decrypt } from "@/utils/jsencrypt" -import useUserStore from "@/store/modules/user" - -const userStore = useUserStore() -const route = useRoute() -const router = useRouter() -const { proxy } = getCurrentInstance() -const systemInfo = JSON.parse(Cookies.get("SystemInfo") || "{}") -console.log(systemInfo) - -const loginForm = ref({ - username: "admin", - password: "admin123", - rememberMe: false, - code: "", - uuid: "", -}) - -const loginRules = { - username: [{ required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" }], - password: [{ required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勫瘑鐮�" }], - code: [{ required: true, trigger: "change", message: "璇疯緭鍏ラ獙璇佺爜" }], -} - -const codeUrl = ref("") -const loading = ref(false) -// 楠岃瘉鐮佸紑鍏� -const captchaEnabled = ref(true) -// 娉ㄥ唽寮�鍏� -const register = ref(false) -const redirect = ref(undefined) - -watch( - route, - (newRoute) => { - redirect.value = newRoute.query && newRoute.query.redirect - }, - { immediate: true } -) - -function handleLogin() { - proxy.$refs.loginRef.validate((valid) => { - if (valid) { - loading.value = true - // 鍕鹃�変簡闇�瑕佽浣忓瘑鐮佽缃湪 cookie 涓缃浣忕敤鎴峰悕鍜屽瘑鐮� - if (loginForm.value.rememberMe) { - Cookies.set("username", loginForm.value.username, { expires: 30 }) - Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 }) - Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 }) - } else { - // 鍚﹀垯绉婚櫎 - Cookies.remove("username") - Cookies.remove("password") - Cookies.remove("rememberMe") - } - // 璋冪敤action鐨勭櫥褰曟柟娉� - userStore - .login(loginForm.value) - .then(() => { - const query = route.query - const otherQueryParams = Object.keys(query).reduce((acc, cur) => { - if (cur !== "redirect") { - acc[cur] = query[cur] - } - return acc - }, {}) - router.push({ path: redirect.value || "/", query: otherQueryParams }) - }) - .catch(() => { - loading.value = false - // 閲嶆柊鑾峰彇楠岃瘉鐮� - if (captchaEnabled.value) { - getCode() - } - }) - } - }) -} - -function getCode() { - getCodeImg().then((res) => { - captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled - if (captchaEnabled.value) { - codeUrl.value = "data:image/gif;base64," + res.img - loginForm.value.uuid = res.uuid - } - }) -} - -function getCookie() { - const username = Cookies.get("username") - const password = Cookies.get("password") - const rememberMe = Cookies.get("rememberMe") - loginForm.value = { - username: username === undefined ? loginForm.value.username : username, - password: password === undefined ? loginForm.value.password : decrypt(password), - rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), - } -} - -getCode() -getCookie() -</script> - -<style lang="scss" scoped> -.login { - display: flex; - align-items: center; - height: 100%; - background-image: url("@/assets/images/login-bg.jpg"); - background-size: 100% 100%; - flex-direction: column; - position: relative; - min-width: 700px; - min-height: 700px; -} - -.title { - margin: 0px auto 30px auto; - text-align: center; - color: #707070; -} - -.login-form { - position: absolute; - left: 50%; - top: 60%; - transform: translate(-50%, -50%); - border-radius: 6px; - // background: #ffffff; - width: 400px; - padding: 25px 25px 5px 25px; - - .el-input { - height: 40px; - - input { - height: 40px; - } - } - - .input-icon { - height: 39px; - width: 14px; - margin-left: 0px; - } -} - -.login-tip { - font-size: 13px; - text-align: center; - color: #bfbfbf; -} - -.login-code { - width: 33%; - height: 40px; - float: right; - - img { - cursor: pointer; - vertical-align: middle; - } -} - -.el-login-footer { - height: 40px; - line-height: 40px; - position: fixed; - bottom: 0; - width: 100%; - text-align: center; - color: #fff; - font-family: Arial; - font-size: 12px; - letter-spacing: 1px; -} - -.login-code-img { - height: 40px; - padding-left: 12px; -} - -.login-logo-bg { - width: 514px; - height: 177px; - // background-image: url('@/assets/images/login-logo.png'); - // background-size: 100% 100%; - position: absolute; - left: 50%; - top: 22%; - transform: translate(-50%, -50%); -} -.login-logo-img { - // width: 100%; - // height: 100%; - // transform: translate(-50%, -50%); - max-height: 200px; - margin: 0 auto; - position: absolute; - top: 17%; -} - -.login-font { - font-size: 50px; - color: #fff; - top: 32%; - position: absolute; - left: 50%; - width: 514px; - text-align: center; - transform: translate(-50%, -50%); -} -</style> diff --git a/zhitan-vue/src/views/policy/policyrule/components/EditModal copy.vue b/zhitan-vue/src/views/policy/policyrule/components/EditModal copy.vue deleted file mode 100644 index fc5f899..0000000 --- a/zhitan-vue/src/views/policy/policyrule/components/EditModal copy.vue +++ /dev/null @@ -1,92 +0,0 @@ -<template> - <el-dialog v-model="visible" :title="title" width="600" @close="handleClose"> - <el-form :model="form" ref="queryRef" :rules="formRules" label-width="120px" v-loading="loading"> - <el-form-item label="鏂囦欢鏍囬" prop="limitName"> - <el-input v-model="form.value1" placeholder="璇疯緭鍏ユ枃浠舵爣棰�" /> - </el-form-item> - <el-form-item label="鏂囦欢绫诲埆"> - <el-select v-model="form.value2" placeholder="璇烽�夋嫨"> - <el-option v-for="item in 6" :key="item" :label="item" :value="item"> - </el-option> - </el-select> - </el-form-item> - - </el-form> - <div slot="footer" class="text-right"> - <el-button type="primary" @click="submitForm" :loading="loading">纭� 瀹�</el-button> - <el-button @click="handleClose">鍙� 娑�</el-button> - </div> - </el-dialog> -</template> - -<script setup> -const { proxy } = getCurrentInstance(); - - -let visible = ref(false) -let title = ref('') -let loading = ref(false) -let form = ref({ - value1: '', - value2: '', -}) -let emit = defineEmits(['get-list']) -const formRules = { - value1: [{ required: true, trigger: "blur", message: "璇疯緭鍏ユ枃浠舵爣棰�" }], - value2: [{ required: true, trigger: "change", message: "璇烽�夋嫨鏂囦欢绫诲瀷" }], -} - -function submitForm() { - proxy.$refs.queryRef.validate(valid => { - if (valid) { - // loading.value = true; - // let obj = form.value.id ? alarmEdit(form.value) : alarmAdd(form.value) - // obj.then((res) => { - // if (res.code == 200) { - // proxy.$modal.msgSuccess(res.message); - // emit('get-list') - // } else { - // proxy.$modal.msgError(res.message); - // } - - // }).catch((err) => { - - // }).finally(() => { - // handleClose() - // }); - } - }) -} - - - - - -function handleOpen(row) { - if (row && row.id) { - title.value = "缂栬緫鏀跨瓥娉曡" - form.value = JSON.parse(JSON.stringify(row)) - } else { - title.value = "娣诲姞鏀跨瓥娉曡" - } - visible.value = true -} - -function handleClose(value) { - visible.value = false - loading.value = false - proxy.$refs.queryRef.resetFields() - form.value = { - value1: '', - value2: '', - - } -} - -defineExpose({ handleOpen }) - -</script> - - - -<style lang="scss" scoped></style> \ No newline at end of file diff --git a/zhitan-vue/src/views/policy/policyrule/components/EditModal.vue b/zhitan-vue/src/views/policy/policyrule/components/EditModal.vue deleted file mode 100644 index fc5f899..0000000 --- a/zhitan-vue/src/views/policy/policyrule/components/EditModal.vue +++ /dev/null @@ -1,92 +0,0 @@ -<template> - <el-dialog v-model="visible" :title="title" width="600" @close="handleClose"> - <el-form :model="form" ref="queryRef" :rules="formRules" label-width="120px" v-loading="loading"> - <el-form-item label="鏂囦欢鏍囬" prop="limitName"> - <el-input v-model="form.value1" placeholder="璇疯緭鍏ユ枃浠舵爣棰�" /> - </el-form-item> - <el-form-item label="鏂囦欢绫诲埆"> - <el-select v-model="form.value2" placeholder="璇烽�夋嫨"> - <el-option v-for="item in 6" :key="item" :label="item" :value="item"> - </el-option> - </el-select> - </el-form-item> - - </el-form> - <div slot="footer" class="text-right"> - <el-button type="primary" @click="submitForm" :loading="loading">纭� 瀹�</el-button> - <el-button @click="handleClose">鍙� 娑�</el-button> - </div> - </el-dialog> -</template> - -<script setup> -const { proxy } = getCurrentInstance(); - - -let visible = ref(false) -let title = ref('') -let loading = ref(false) -let form = ref({ - value1: '', - value2: '', -}) -let emit = defineEmits(['get-list']) -const formRules = { - value1: [{ required: true, trigger: "blur", message: "璇疯緭鍏ユ枃浠舵爣棰�" }], - value2: [{ required: true, trigger: "change", message: "璇烽�夋嫨鏂囦欢绫诲瀷" }], -} - -function submitForm() { - proxy.$refs.queryRef.validate(valid => { - if (valid) { - // loading.value = true; - // let obj = form.value.id ? alarmEdit(form.value) : alarmAdd(form.value) - // obj.then((res) => { - // if (res.code == 200) { - // proxy.$modal.msgSuccess(res.message); - // emit('get-list') - // } else { - // proxy.$modal.msgError(res.message); - // } - - // }).catch((err) => { - - // }).finally(() => { - // handleClose() - // }); - } - }) -} - - - - - -function handleOpen(row) { - if (row && row.id) { - title.value = "缂栬緫鏀跨瓥娉曡" - form.value = JSON.parse(JSON.stringify(row)) - } else { - title.value = "娣诲姞鏀跨瓥娉曡" - } - visible.value = true -} - -function handleClose(value) { - visible.value = false - loading.value = false - proxy.$refs.queryRef.resetFields() - form.value = { - value1: '', - value2: '', - - } -} - -defineExpose({ handleOpen }) - -</script> - - - -<style lang="scss" scoped></style> \ No newline at end of file diff --git a/zhitan-vue/src/views/policy/policyrule/policyRule.vue b/zhitan-vue/src/views/policy/policyrule/policyRule.vue deleted file mode 100644 index f6dbeb1..0000000 --- a/zhitan-vue/src/views/policy/policyrule/policyRule.vue +++ /dev/null @@ -1,123 +0,0 @@ -<template> - <div class="page"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="120px"> - <el-form-item label="鏂囦欢绫诲埆"> - <el-select v-model="queryParams.value1" placeholder="璇烽�夋嫨"> - <el-option v-for="item in 6" :key="item" :label="item" :value="item"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鏂囦欢鏍囬"> - <el-input v-model="queryParams.value2" placeholder="璇疯緭鍏ユ枃浠舵爣棰�" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - <div class="table-box"> - <div class="mt20 mb20"> - <el-button type="primary" icon="plus" @click="handleAdd">鏂板</el-button> - <!-- <el-button type="primary" icon="Delete">鍒犻櫎</el-button> --> - </div> - <el-table :data="tableData" v-loading="loading"> - <el-table-column prop="value1" label="鏂囦欢鏍囬" show-overflow-tooltip align="center" /> - <el-table-column prop="value2" label="鏂囦欢绫诲埆" show-overflow-tooltip align="center" /> - <el-table-column prop="value3" label="鍗板彂鏃堕棿" show-overflow-tooltip align="center" /> - <el-table-column label="鎿嶄綔" width="300" align="center"> - <template #default="scope"> - <el-button link type="primary" icon="Edit" @click="handleAdd(scope.row)"> - 淇敼 - </el-button> - <el-button link type="primary" icon="Delete" @click="handleDel(scope.row)"> - 鍒犻櫎 - </el-button> - </template> - </el-table-column> - </el-table> - <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" - v-model:limit="queryParams.pageSize" @pagination="getList" /> - - </div> - <EditModal ref="editModalRef" @get-list="getList" /> - </div> -</template> - -<script setup> -import EditModal from './components/EditModal' - -let { proxy } = getCurrentInstance() -let loading = ref(false); -let total = ref(2); -let tableData = ref([ - { id: 1, value1: '1111', value2: 'value2', value3: '2024骞�10鏈�17鏃�11:15:39' }, - { id: 2, value1: '222', value2: '222', value3: '2024骞�10鏈�17鏃�11:16:39' }]) -let queryParams = ref({ - value1: '', - value2: '', - pageNum: 1, - pageSize: 10, -}) - -function getList() { - // loading.value = true - // alarmList(queryParams.value).then(res => { - // console.log(res.rows) - // tableData.value = res.rows - // total.value = res.total - // loading.value = false - // }) -} - -getList() - -let editModalRef = ref('') -function handleAdd(row) { - if (editModalRef.value) { - editModalRef.value.handleOpen(row) - } - -} - -function handleDel(row) { - // proxy.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤�?').then(function () { - // return alarmDel(row.id); - // }).then(() => { - // getList(); - // proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - // }).catch(() => { }); -} - -function handleQuery() { - queryParams.value.pageNum = 1 - getList() - -} - -function resetQuery() { - queryParams.value = { - value1: '', - value2: '', - pageNum: 1, - pageSize: 10, - } - getList() -} - - -</script> - -<style lang="scss" scoped> -@import "@/assets/styles/page.scss"; - - -.header-box { - :deep .el-form-item__content { - color: #fff; - font-size: 16px; - } - -} -</style> \ No newline at end of file diff --git a/zhitan-vue/src/views/policy/projectmanage/projectmanage/components/EditModal.vue b/zhitan-vue/src/views/policy/projectmanage/projectmanage/components/EditModal.vue deleted file mode 100644 index b0068a9..0000000 --- a/zhitan-vue/src/views/policy/projectmanage/projectmanage/components/EditModal.vue +++ /dev/null @@ -1,124 +0,0 @@ -<template> - <el-dialog v-model="visible" :title="title" width="600" @close="handleClose"> - <el-form :model="form" ref="queryRef" :rules="formRules" label-width="120px" v-loading="loading"> - <el-form-item label="椤圭洰鍚嶇О" prop="value1"> - <el-input v-model="form.value1" placeholder="璇疯緭鍏ラ」鐩悕绉�" /> - </el-form-item> - <el-form-item label="鑺傝兘璁″垝" prop="value2"> - <el-input v-model="form.value2" placeholder="璇疯緭鍏ヨ妭鑳借鍒�" /> - </el-form-item> - <el-form-item label="鑺傝兘鐩爣" prop="value3"> - <el-input v-model="form.value3" placeholder="璇疯緭鍏ヨ妭鑳界洰鏍�" /> - </el-form-item> - <el-form-item label="寮�濮嬫椂闂�" prop="value4"> - <el-date-picker v-model="form.value4" type="date" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" format="YYYY-MM-DD" - date-format="YYYY/MM/DD" /> - </el-form-item> - <el-form-item label="缁撴潫鏃堕棿" prop="value5"> - <el-date-picker v-model="form.value5" type="date" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" format="YYYY-MM-DD" - date-format="YYYY/MM/DD" /> - </el-form-item> - <el-form-item label="璐熻矗浜�" prop="value6"> - <el-input v-model="form.value6" placeholder="璇疯緭鍏ヨ礋璐d汉" /> - </el-form-item> - <el-form-item label="鍒跺畾鏃舵" prop="value7"> - <el-date-picker v-model="form.value7" type="date" placeholder="璇烽�夋嫨鍒跺畾鏃舵" format="YYYY-MM-DD" - date-format="YYYY/MM/DD" /> - </el-form-item> - </el-form> - <div slot="footer" class="text-right"> - <el-button type="primary" @click="submitForm" :loading="loading">纭� 瀹�</el-button> - <el-button @click="handleClose">鍙� 娑�</el-button> - </div> - </el-dialog> -</template> - -<script setup> -import { alarmAdd, alarmEdit } from '@/api/businessConfiguration/businessConfiguration' -const { proxy } = getCurrentInstance(); -let props = defineProps(['alarmTypeList', 'operatorList']) - - -let visible = ref(false) -let title = ref('') -let loading = ref(false) -let form = ref({ - value1: null, - value2: null, - value3: null, - value4: null, - value5: null, - value6: null, - value7: null, - -}) -let emit = defineEmits(['getList']) -const formRules = { - value1: [{ required: true, trigger: "blur", message: "璇疯緭鍏ラ」鐩悕绉�" }], - value2: [{ required: true, trigger: "blur", message: "璇疯緭鍏ヨ妭鑳借鍒�" }], - value3: [{ required: true, trigger: "blur", message: "璇疯緭鍏ヨ妭鑳界洰鏍�" }], - value4: [{ required: true, trigger: "blur", message: "璇烽�夋嫨寮�濮嬫椂闂�" }], - value5: [{ required: true, trigger: "blur", message: "璇烽�夋嫨缁撴潫鏃堕棿" }], - value6: [{ required: true, trigger: "blur", message: "璇疯緭鍏ヨ礋璐d汉" }], - value7: [{ required: true, trigger: "blur", message: "璇烽�夋嫨鍒跺畾鏃舵" }], - -} - -function submitForm() { - proxy.$refs.queryRef.validate(valid => { - if (valid) { - // loading.value = true; - // let obj = form.value.id ? alarmEdit(form.value) : alarmAdd(form.value) - // obj.then((res) => { - // if (res.code == 200) { - // proxy.$modal.msgSuccess(res.message); - // emit('getList') - // } else { - // proxy.$modal.msgError(res.message); - // } - - // }).catch((err) => { - - // }).finally(() => { - // handleClose() - // }); - } - }) -} - - - - - -function handleOpen(row) { - if (row && row.id) { - title.value = "缂栬緫鑺傝兘椤圭洰绠$悊" - form.value = JSON.parse(JSON.stringify(row)) - } else { - title.value = "娣诲姞鑺傝兘椤圭洰绠$悊" - } - visible.value = true -} - -function handleClose(value) { - visible.value = false - loading.value = false - proxy.$refs.queryRef.resetFields() - form.value = { - value1: null, - value2: null, - value3: null, - value4: null, - value5: null, - value6: null, - value7: null, - } -} - -defineExpose({ handleOpen }) - -</script> - - - -<style lang="scss" scoped></style> diff --git a/zhitan-vue/src/views/policy/projectmanage/projectmanage/projectManage.vue b/zhitan-vue/src/views/policy/projectmanage/projectmanage/projectManage.vue deleted file mode 100644 index 164cb19..0000000 --- a/zhitan-vue/src/views/policy/projectmanage/projectmanage/projectManage.vue +++ /dev/null @@ -1,135 +0,0 @@ -<template> - <div class="page"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="120px"> - <el-form-item label="椤圭洰鍚嶇О"> - <el-input v-model="queryParams.value1" placeholder="璇疯緭鍏ラ」鐩悕绉�" /> - </el-form-item> - <el-form-item label="缁熻鏃堕棿"> - <el-date-picker v-model="queryParams.value2" type="daterange" start-placeholder="閫夋嫨寮�濮嬫椂闂�" - end-placeholder="閫夋嫨缁撴潫鏃堕棿" format="YYYY-MM-DD" date-format="YYYY/MM/DD" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - <div class="table-box"> - <div class="mt20 mb20"> - <el-button type="primary" icon="plus" @click="handleAdd">鏂板</el-button> - <el-button type="primary" icon="Download" @click="handleAdd"> 瀵煎嚭 </el-button> - </div> - <el-table :data="tableData" v-loading="loading"> - <el-table-column prop="value1" label="椤圭洰鍚嶇О" show-overflow-tooltip align="center" /> - <el-table-column prop="value2" label="鑺傝兘璁″垝" show-overflow-tooltip align="center" /> - <el-table-column prop="value3" label="鑺傝兘鐩爣" show-overflow-tooltip align="center" /> - <el-table-column prop="value4" label="寮�濮嬫椂闂�" show-overflow-tooltip align="center" /> - <el-table-column prop="value5" label="缁撴潫鏃堕棿" show-overflow-tooltip align="center" /> - <el-table-column prop="value6" label="璐熻矗浜�" show-overflow-tooltip align="center" /> - <el-table-column prop="value7" label="鍒跺畾鏃舵" show-overflow-tooltip align="center" /> - <el-table-column prop="value8" label="鍒涘缓浜�" show-overflow-tooltip align="center" /> - - <el-table-column label="鎿嶄綔" width="300" align="center"> - <template #default="scope"> - <el-button link type="primary" icon="Files" @click=" "> - 闄勪欢 - </el-button> - <el-button link type="primary" icon="Edit" @click="handleAdd(scope.row)"> - 淇敼 - </el-button> - <el-button link type="primary" icon="Delete" @click="handleDel(scope.row)"> - 鍒犻櫎 - </el-button> - </template> - </el-table-column> - </el-table> - <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" - v-model:limit="queryParams.pageSize" @pagination="getList" /> - - </div> - <edit-modal ref="EditModalRef" @getList="getList" /> - </div> -</template> - -<script setup> -import EditModal from './components/EditModal.vue' - - -let { proxy } = getCurrentInstance() -let loading = ref(false); -let total = ref(0); -let tableData = ref([ - {id:1, value1: '1', value2: '2', value3: '3', value4: '4', value5: '5', value6: '6', value7: '7', value8: '8' }, - { id:2, value1: '1', value2: '2', value3: '3', value4: '4', value5: '5', value6: '6', value7: '7', value8: '8' }, - { id:3, value1: '1', value2: '2', value3: '3', value4: '4', value5: '5', value6: '6', value7: '7', value8: '8' }, - { id:4, value1: '1', value2: '2', value3: '3', value4: '4', value5: '5', value6: '6', value7: '7', value8: '8' }, -]) -let queryParams = ref({ - value1: '', - value2: [], - pageNum: 1, - pageSize: 10, -}) - -function getList() { - // loading.value = true - // alarmList(queryParams.value).then(res => { - // console.log(res.rows) - // tableData.value = res.rows - // total.value = res.total - // loading.value = false - // }) -} - -getList() - - -let EditModalRef = ref('') -function handleAdd(row) { - if (EditModalRef.value) { - EditModalRef.value.handleOpen(row) - } - -} - -function handleDel(row) { - // proxy.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤�?').then(function () { - // return alarmDel(row.id); - // }).then(() => { - // getList(); - // proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - // }).catch(() => { }); -} - -function handleQuery() { - queryParams.value.pageNum = 1 - getList() - -} - -function resetQuery() { - queryParams.value = { - value1: '', - value2: [], - pageNum: 1, - pageSize: 10, - } - getList() -} - - -</script> - -<style lang="scss" scoped> -@import "@/assets/styles/page.scss"; - - -.header-box { - :deep .el-form-item__content { - color: #fff; - font-size: 16px; - } - -} -</style> \ No newline at end of file diff --git a/zhitan-vue/src/views/poweranalysis/pariPassu/index.vue b/zhitan-vue/src/views/poweranalysis/pariPassu/index.vue deleted file mode 100644 index f132534..0000000 --- a/zhitan-vue/src/views/poweranalysis/pariPassu/index.vue +++ /dev/null @@ -1,586 +0,0 @@ -<template> - <div class="page"> - <div class="page-container"> - <div class="page-container-left"> - <LeftTree ref="leftTreeRef" @handleNodeClick="handleNodeClick" /> - </div> - <div class="page-container-right"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true"> - <el-form-item label="鏈熼棿" prop="timeType"> - <el-select v-model="queryParams.timeType" placeholder="鏈熼棿" clearable style="width: 120px" - @change="handleTimeType"> - <el-option v-for="dict in period" :key="dict.value" :label="dict.label" :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item label="鏃堕棿"> - <el-date-picker v-model="queryParams.dataTime" :type="queryParams.timeType == 'YEAR' - ? 'year' - : queryParams.timeType == 'MONTH' - ? 'month' - : 'date' - " :format="queryParams.timeType == 'YEAR' - ? 'YYYY' - : queryParams.timeType == 'MONTH' - ? 'YYYY-MM' - : 'YYYY-MM-DD' - " value-format="YYYY-MM-DD" placeholder="鏃堕棿" style="width: 100%" /> - </el-form-item> - <el-form-item label="鑳芥簮绫诲瀷" prop="energyType"> - <el-select v-model="queryParams.energyType" placeholder="鑳芥簮绫诲瀷" clearable style="width: 120px"> - <el-option :label="item.enername" :value="item.enersno" v-for="item in energyTypeList" - :key="item.enersno" @click="handleEnergyType(item)" /> - </el-select> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery"> - 鎼滅储 - </el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - <!-- <el-form-item> - <el-button :type="queryParams.analysisType == 'YOY' ? 'primary' : ''" @click="handleAnalysisType('YOY')"> - 鍚屾瘮 - </el-button> - <el-button :type="queryParams.analysisType == 'MOM' ? 'primary' : ''" @click="handleAnalysisType('MOM')"> - 鐜瘮 - </el-button> - </el-form-item> --> - <el-form-item> - <el-button type="primary" icon="Download" @click="handleExport"> - 瀵煎嚭 - </el-button> - </el-form-item> - </el-form> - </div> - <div style=" - height: calc(100vh - 220px) !important; - max-height: calc(100vh - 220px) !important; - overflow-y: auto; - " v-loading="loading"> - - <BaseCard :title="queryParams.nodeName + '-鑳借�楀姣斿垎鏋�'"> - <div class="chart-box"> - <div id="Chart1" /> - </div> - </BaseCard> - - <BaseCard :title="queryParams.nodeName + - '-鑳借�楀姣斿垎鏋愬悓姣斿垎鏋愯〃-' + - queryParams.enername - "> - <div class="table-box"> - <el-table :data="departmentList" show-summary> - <el-table-column label="鏈湡鏃堕棿" align="center" key="currentTime" prop="currentTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鏈湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="currentValue" prop="currentValue" :show-overflow-tooltip="true" /> - <el-table-column label="鍚屾湡鏃堕棿" align="center" key="compareTime" prop="compareTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鍚屾湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="compareValue" prop="compareValue" :show-overflow-tooltip="true" /> - <el-table-column :label="(queryParams.analysisType == 'YOY' ? '鍚�' : '鐜�') + '姣�(%)' - " align="center" key="ratio" prop="ratio" :show-overflow-tooltip="true" width="200" /> - </el-table> - </div> - </BaseCard> - <!-- </el-col> - </el-row> --> - </div> - </div> - </div> - </div> -</template> - -<script setup name="department"> -import { - listRegion, - listDepartment, -} from "@/api/energyAnalysis/energyAnalysis"; -import { listEnergyTypeList } from "@/api/modelConfiguration/energyType"; -import * as echarts from "echarts"; -const { proxy } = getCurrentInstance(); -const { period } = proxy.useDict("period"); -import { useRoute } from "vue-router"; -import useSettingsStore from "@/store/modules/settings"; -const settingsStore = useSettingsStore(); -watch( - () => settingsStore.sideTheme, - (val) => { - getList(); - } -); -const energyTypeList = ref(undefined); -const departmentList = ref([]); -const loading = ref(false); -const data = reactive({ - queryParams: { - nodeId: null, - timeType: null, - dataTime: null, - analysisType: "YOY", - energyType: null, - }, - query: { - modelCode: null, - }, -}); -const { queryParams, query } = toRefs(data); -/** 鑺傜偣鍗曞嚮浜嬩欢 */ -function handleNodeClick(data) { - queryParams.value.nodeId = data.id; - queryParams.value.nodeName = data.label; - handleTimeType(period.value[1].value); - listEnergyTypeList().then((res) => { - energyTypeList.value = res.data; - queryParams.value.energyType = energyTypeList.value[0].enersno; - queryParams.value.enername = energyTypeList.value[0].enername; - queryParams.value.muid = energyTypeList.value[0].muid; - handleQuery(); - }); -} -function handleTimeType(e) { - queryParams.value.timeType = e; - queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD"); -} -function handleEnergyType(item) { - queryParams.value.enername = item.enername; - queryParams.value.muid = item.muid; - handleQuery(); -} -function handleAnalysisType(analysisType) { - queryParams.value.analysisType = analysisType; - getList(); -} -// 鑳借�楀姣斿垎鏋�-绉戝鑳借�楀垎鏋�-鍒楄〃 -function getList() { - loading.value = true; - // 鍦ㄥ垵濮嬪寲涔嬪墠锛屽厛dispose鏃х殑瀹炰緥 - if (echarts.getInstanceByDom(document.getElementById("Chart1"))) { - echarts.dispose(document.getElementById("Chart1")); - } - // if (echarts.getInstanceByDom(document.getElementById("Chart2"))) { - // echarts.dispose(document.getElementById("Chart2")); - // } - const myChart1 = echarts.init(document.getElementById("Chart1")); - // const myChart2 = echarts.init(document.getElementById("Chart2")); - listRegion( - proxy.addDateRange({ - ...queryParams.value, - ...query.value, - }) - ).then((res) => { - if (!!res.code && res.code == 200) { - loading.value = false; - let xdata = []; - let yvalue = []; - let ycompareValue = []; - let yqoq = []; - if (!!res.data.chartDataList) { - res.data.chartDataList.map((item) => { - xdata.push( - proxy - .dayjs(item.xdata) - .format( - queryParams.value.timeType == "YEAR" - ? "MM鏈�" - : queryParams.value.timeType == "MONTH" - ? "DD鏃�" - : "HH鏃�" - ) - ); - yvalue.push(!!item.yvalue ? item.yvalue : 0); - ycompareValue.push(!!item.ycompareValue ? item.ycompareValue : 0); - yqoq.push(!!item.yqoq ? item.yqoq : 0); - }); - } - setTimeout(() => { - myChart1.setOption({ - color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - grid: { - top: "45", - left: "7%", - right: "5%", - bottom: "10", - containLabel: true, - }, - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: { - icon: "rect", - itemWidth: 14, - itemHeight: 10, - textStyle: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - xAxis: { - type: "category", - axisPointer: { - type: "shadow", - }, - axisLine: { - show: true, - lineStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - splitLine: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [5, 0, 0, 0], - // formatter: '{value} ml' - }, - data: xdata, - }, - yAxis: [ - { - type: "value", - name: - "鑰�" + - queryParams.value.enername + - "閲�(" + - queryParams.value.muid + - ")", - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - { - type: "value", - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮(%)" : "鐜瘮(%)", - alignTicks: true, - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - axisTick: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - ], - series: [ - { - name: "鏈湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: yvalue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: "鍚屾湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: ycompareValue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮" : "鐜瘮", - type: "line", - yAxisIndex: 1, - symbol: "none", // 璁剧疆涓� 'none' 鍘绘帀鍦嗙偣 - tooltip: { - valueFormatter: function (value) { - return value + "%"; - }, - }, - data: yqoq, - }, - ], - }); - }, 100); - departmentList.value = !!res.data.dataList ? res.data.dataList : []; - window.addEventListener( - "resize", - () => { - myChart1.resize(); - }, - { passive: true } - ); - } - }); - // listDepartment( - // proxy.addDateRange({ - // ...queryParams.value, - // ...query.value, - // }) - // ).then((res) => { - // if (!!res.code && res.code == 200) { - // loading.value = false; - // let seriesdata = []; - // let xdata = []; - // if (!!energyTypeList.value) { - // energyTypeList.value.map((item) => { - // seriesdata.push({ - // name: item.enername, - // type: "bar", - // barWidth: "16", - // stack: "total", - // data: [], - // }); - // }); - // } - // if (!!res.data) { - // res.data.map((dataItem) => { - // xdata.push(dataItem.nodeName) - // seriesdata.forEach((seriesdataItem) => { - // if ( - // dataItem.data.find( - // (dataItemItem) => - // dataItemItem.energyTypeName == seriesdataItem.name - // ) == undefined - // ) { - // dataItem.data.push({ - // nodeId: dataItem.nodeId, - // nodeName: dataItem.nodeName, - // energyTypeNo: null, - // energyTypeName: seriesdataItem.name, - // energyConsumption: 0, - // }); - // } - // dataItem.data.map(dataItemItem => { - // if (seriesdataItem.name == dataItemItem.energyTypeName) { - // seriesdataItem.data.push(dataItemItem.energyConsumption) - // } - // }) - // }); - // }); - // } - // setTimeout(() => { - // myChart2.setOption({ - // color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - // grid: { - // top: "45", - // left: "17%", - // right: "5%", - // bottom: "10", - // containLabel: true, - // }, - // tooltip: { - // trigger: "axis", - // axisPointer: { - // type: "shadow", - // }, - // }, - // legend: { - // icon: "rect", - // itemWidth: 14, - // itemHeight: 10, - // right: 0, - // textStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // xAxis: { - // nameLocation: "start", - // type: "value", - // name: "鍗曚綅tce", - // nameTextStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // padding: [0, 0, 5, 0], - // }, - // axisLine: { - // show: false, - // }, - // splitLine: { - // show: true, - // lineStyle: { - // type: "dashed", - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // axisTick: { - // show: false, - // }, - // splitArea: { - // show: false, - // }, - // axisLabel: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // // formatter: '{value} ml' - // }, - // }, - // yAxis: { - // type: "category", - // axisPointer: { - // type: "shadow", - // }, - // axisLine: { - // show: true, - // lineStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // axisTick: { - // show: false, - // }, - // splitArea: { - // show: false, - // }, - // splitLine: { - // show: false, - // }, - // axisLabel: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // padding: [5, 0, 0, 0], - // // formatter: '{value} ml' - // }, - // data: xdata.splice(0, 6), - // }, - // series: seriesdata, - // }); - // }, 100); - // window.addEventListener("resize", () => { - // myChart2.resize(); - // },{passive: true}); - // } - // }); -} -// 鑳借�楀姣斿垎鏋�-绉戝鑳借�楀垎鏋�-鎼滅储 -function handleQuery() { - getList(); -} -// 鑳借�楀姣斿垎鏋�-閲嶇疆 -function resetQuery() { - proxy.resetForm("queryRef"); - handleTimeType(period.value[1].value); - queryParams.value.energyType = energyTypeList.value[0].enersno; - queryParams.value.enername = energyTypeList.value[0].enername; - queryParams.value.muid = energyTypeList.value[0].muid; - queryParams.value.analysisType = "YOY"; - handleQuery(); -} -// 鑳借�楀姣斿垎鏋�-绉戝鑳借�楀垎鏋�-瀵煎嚭 -function handleExport() { - proxy.download( - "consumptionanalysis/energyExport", - { - ...queryParams.value, - ...query.value, - }, - `${queryParams.value.nodeName}-鍘傚尯鑳借�楀垎鏋恄${new Date().getTime()}.xlsx` - ); -} -</script> -<style scoped lang="scss"> -@import "@/assets/styles/page.scss"; -</style> diff --git a/zhitan-vue/src/views/poweranalysis/perPassu/index.vue b/zhitan-vue/src/views/poweranalysis/perPassu/index.vue deleted file mode 100644 index 8780f40..0000000 --- a/zhitan-vue/src/views/poweranalysis/perPassu/index.vue +++ /dev/null @@ -1,586 +0,0 @@ -<template> - <div class="page"> - <div class="page-container"> - <div class="page-container-left"> - <LeftTree ref="leftTreeRef" @handleNodeClick="handleNodeClick" /> - </div> - <div class="page-container-right"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true"> - <el-form-item label="鏈熼棿" prop="timeType"> - <el-select v-model="queryParams.timeType" placeholder="鏈熼棿" clearable style="width: 120px" - @change="handleTimeType"> - <el-option v-for="dict in period" :key="dict.value" :label="dict.label" :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item label="鏃堕棿"> - <el-date-picker v-model="queryParams.dataTime" :type="queryParams.timeType == 'YEAR' - ? 'year' - : queryParams.timeType == 'MONTH' - ? 'month' - : 'date' - " :format="queryParams.timeType == 'YEAR' - ? 'YYYY' - : queryParams.timeType == 'MONTH' - ? 'YYYY-MM' - : 'YYYY-MM-DD' - " value-format="YYYY-MM-DD" placeholder="鏃堕棿" style="width: 100%" /> - </el-form-item> - <el-form-item label="鑳芥簮绫诲瀷" prop="energyType"> - <el-select v-model="queryParams.energyType" placeholder="鑳芥簮绫诲瀷" clearable style="width: 120px"> - <el-option :label="item.enername" :value="item.enersno" v-for="item in energyTypeList" - :key="item.enersno" @click="handleEnergyType(item)" /> - </el-select> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery"> - 鎼滅储 - </el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - <!-- <el-form-item> - <el-button :type="queryParams.analysisType == 'YOY' ? 'primary' : ''" @click="handleAnalysisType('YOY')"> - 鍚屾瘮 - </el-button> - <el-button :type="queryParams.analysisType == 'MOM' ? 'primary' : ''" @click="handleAnalysisType('MOM')"> - 鐜瘮 - </el-button> - </el-form-item> --> - <el-form-item> - <el-button type="primary" icon="Download" @click="handleExport"> - 瀵煎嚭 - </el-button> - </el-form-item> - </el-form> - </div> - <div style=" - height: calc(100vh - 220px) !important; - max-height: calc(100vh - 220px) !important; - overflow-y: auto; - " v-loading="loading"> - - <BaseCard :title="queryParams.nodeName + '-鑳借�楀姣斿垎鏋�'"> - <div class="chart-box"> - <div id="Chart1" /> - </div> - </BaseCard> - - <BaseCard :title="queryParams.nodeName + - '-鑳借�楀姣斿垎鏋愮幆姣斿垎鏋愯〃-' + - queryParams.enername - "> - <div class="table-box"> - <el-table :data="departmentList" show-summary> - <el-table-column label="鏈湡鏃堕棿" align="center" key="currentTime" prop="currentTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鏈湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="currentValue" prop="currentValue" :show-overflow-tooltip="true" /> - <el-table-column label="鍚屾湡鏃堕棿" align="center" key="compareTime" prop="compareTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鍚屾湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="compareValue" prop="compareValue" :show-overflow-tooltip="true" /> - <el-table-column :label="(queryParams.analysisType == 'YOY' ? '鍚�' : '鐜�') + '姣�(%)' - " align="center" key="ratio" prop="ratio" :show-overflow-tooltip="true" width="200" /> - </el-table> - </div> - </BaseCard> - <!-- </el-col> - </el-row> --> - </div> - </div> - </div> - </div> -</template> - -<script setup name="department"> -import { - listRegion, - listDepartment, -} from "@/api/energyAnalysis/energyAnalysis"; -import { listEnergyTypeList } from "@/api/modelConfiguration/energyType"; -import * as echarts from "echarts"; -const { proxy } = getCurrentInstance(); -const { period } = proxy.useDict("period"); -import { useRoute } from "vue-router"; -import useSettingsStore from "@/store/modules/settings"; -const settingsStore = useSettingsStore(); -watch( - () => settingsStore.sideTheme, - (val) => { - getList(); - } -); -const energyTypeList = ref(undefined); -const departmentList = ref([]); -const loading = ref(false); -const data = reactive({ - queryParams: { - nodeId: null, - timeType: null, - dataTime: null, - analysisType: "MOM", - energyType: null, - }, - query: { - modelCode: null, - }, -}); -const { queryParams, query } = toRefs(data); -/** 鑺傜偣鍗曞嚮浜嬩欢 */ -function handleNodeClick(data) { - queryParams.value.nodeId = data.id; - queryParams.value.nodeName = data.label; - handleTimeType(period.value[1].value); - listEnergyTypeList().then((res) => { - energyTypeList.value = res.data; - queryParams.value.energyType = energyTypeList.value[0].enersno; - queryParams.value.enername = energyTypeList.value[0].enername; - queryParams.value.muid = energyTypeList.value[0].muid; - handleQuery(); - }); -} -function handleTimeType(e) { - queryParams.value.timeType = e; - queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD"); -} -function handleEnergyType(item) { - queryParams.value.enername = item.enername; - queryParams.value.muid = item.muid; - handleQuery(); -} -function handleAnalysisType(analysisType) { - queryParams.value.analysisType = analysisType; - getList(); -} -// 鑳借�楀姣斿垎鏋�-鍒楄〃 -function getList() { - loading.value = true; - // 鍦ㄥ垵濮嬪寲涔嬪墠锛屽厛dispose鏃х殑瀹炰緥 - if (echarts.getInstanceByDom(document.getElementById("Chart1"))) { - echarts.dispose(document.getElementById("Chart1")); - } - // if (echarts.getInstanceByDom(document.getElementById("Chart2"))) { - // echarts.dispose(document.getElementById("Chart2")); - // } - const myChart1 = echarts.init(document.getElementById("Chart1")); - // const myChart2 = echarts.init(document.getElementById("Chart2")); - listRegion( - proxy.addDateRange({ - ...queryParams.value, - ...query.value, - }) - ).then((res) => { - if (!!res.code && res.code == 200) { - loading.value = false; - let xdata = []; - let yvalue = []; - let ycompareValue = []; - let yqoq = []; - if (!!res.data.chartDataList) { - res.data.chartDataList.map((item) => { - xdata.push( - proxy - .dayjs(item.xdata) - .format( - queryParams.value.timeType == "YEAR" - ? "MM鏈�" - : queryParams.value.timeType == "MONTH" - ? "DD鏃�" - : "HH鏃�" - ) - ); - yvalue.push(!!item.yvalue ? item.yvalue : 0); - ycompareValue.push(!!item.ycompareValue ? item.ycompareValue : 0); - yqoq.push(!!item.yqoq ? item.yqoq : 0); - }); - } - setTimeout(() => { - myChart1.setOption({ - color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - grid: { - top: "45", - left: "7%", - right: "5%", - bottom: "10", - containLabel: true, - }, - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: { - icon: "rect", - itemWidth: 14, - itemHeight: 10, - textStyle: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - xAxis: { - type: "category", - axisPointer: { - type: "shadow", - }, - axisLine: { - show: true, - lineStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - splitLine: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [5, 0, 0, 0], - // formatter: '{value} ml' - }, - data: xdata, - }, - yAxis: [ - { - type: "value", - name: - "鑰�" + - queryParams.value.enername + - "閲�(" + - queryParams.value.muid + - ")", - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - { - type: "value", - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮(%)" : "鐜瘮(%)", - alignTicks: true, - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - axisTick: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - ], - series: [ - { - name: "鏈湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: yvalue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: "鍚屾湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: ycompareValue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮" : "鐜瘮", - type: "line", - yAxisIndex: 1, - symbol: "none", // 璁剧疆涓� 'none' 鍘绘帀鍦嗙偣 - tooltip: { - valueFormatter: function (value) { - return value + "%"; - }, - }, - data: yqoq, - }, - ], - }); - }, 100); - departmentList.value = !!res.data.dataList ? res.data.dataList : []; - window.addEventListener( - "resize", - () => { - myChart1.resize(); - }, - { passive: true } - ); - } - }); - // listDepartment( - // proxy.addDateRange({ - // ...queryParams.value, - // ...query.value, - // }) - // ).then((res) => { - // if (!!res.code && res.code == 200) { - // loading.value = false; - // let seriesdata = []; - // let xdata = []; - // if (!!energyTypeList.value) { - // energyTypeList.value.map((item) => { - // seriesdata.push({ - // name: item.enername, - // type: "bar", - // barWidth: "16", - // stack: "total", - // data: [], - // }); - // }); - // } - // if (!!res.data) { - // res.data.map((dataItem) => { - // xdata.push(dataItem.nodeName) - // seriesdata.forEach((seriesdataItem) => { - // if ( - // dataItem.data.find( - // (dataItemItem) => - // dataItemItem.energyTypeName == seriesdataItem.name - // ) == undefined - // ) { - // dataItem.data.push({ - // nodeId: dataItem.nodeId, - // nodeName: dataItem.nodeName, - // energyTypeNo: null, - // energyTypeName: seriesdataItem.name, - // energyConsumption: 0, - // }); - // } - // dataItem.data.map(dataItemItem => { - // if (seriesdataItem.name == dataItemItem.energyTypeName) { - // seriesdataItem.data.push(dataItemItem.energyConsumption) - // } - // }) - // }); - // }); - // } - // setTimeout(() => { - // myChart2.setOption({ - // color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - // grid: { - // top: "45", - // left: "17%", - // right: "5%", - // bottom: "10", - // containLabel: true, - // }, - // tooltip: { - // trigger: "axis", - // axisPointer: { - // type: "shadow", - // }, - // }, - // legend: { - // icon: "rect", - // itemWidth: 14, - // itemHeight: 10, - // right: 0, - // textStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // xAxis: { - // nameLocation: "start", - // type: "value", - // name: "鍗曚綅tce", - // nameTextStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // padding: [0, 0, 5, 0], - // }, - // axisLine: { - // show: false, - // }, - // splitLine: { - // show: true, - // lineStyle: { - // type: "dashed", - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // axisTick: { - // show: false, - // }, - // splitArea: { - // show: false, - // }, - // axisLabel: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // // formatter: '{value} ml' - // }, - // }, - // yAxis: { - // type: "category", - // axisPointer: { - // type: "shadow", - // }, - // axisLine: { - // show: true, - // lineStyle: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // }, - // }, - // axisTick: { - // show: false, - // }, - // splitArea: { - // show: false, - // }, - // splitLine: { - // show: false, - // }, - // axisLabel: { - // color: - // settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - // fontSize: 14, - // padding: [5, 0, 0, 0], - // // formatter: '{value} ml' - // }, - // data: xdata.splice(0, 6), - // }, - // series: seriesdata, - // }); - // }, 100); - // window.addEventListener("resize", () => { - // myChart2.resize(); - // },{passive: true}); - // } - // }); -} -// 鑳借�楀姣斿垎鏋�-鎼滅储 -function handleQuery() { - getList(); -} -// 鑳借�楀姣斿垎鏋�-閲嶇疆 -function resetQuery() { - proxy.resetForm("queryRef"); - handleTimeType(period.value[1].value); - queryParams.value.energyType = energyTypeList.value[0].enersno; - queryParams.value.enername = energyTypeList.value[0].enername; - queryParams.value.muid = energyTypeList.value[0].muid; - queryParams.value.analysisType = "YOY"; - handleQuery(); -} -// 鑳借�楀姣斿垎鏋�-瀵煎嚭 -function handleExport() { - proxy.download( - "consumptionanalysis/energyExport", - { - ...queryParams.value, - ...query.value, - }, - `${queryParams.value.nodeName}-鍘傚尯鑳借�楀垎鏋恄${new Date().getTime()}.xlsx` - ); -} -</script> -<style scoped lang="scss"> -@import "@/assets/styles/page.scss"; -</style> diff --git a/zhitan-vue/src/views/powerquality/load/index.vue b/zhitan-vue/src/views/powerquality/load/index.vue deleted file mode 100644 index 1d2cc90..0000000 --- a/zhitan-vue/src/views/powerquality/load/index.vue +++ /dev/null @@ -1,409 +0,0 @@ -<template> - <div class="page"> - <div class="page-container"> - <div class="page-container-left"> - <LeftTree ref="leftTreeRef" @handleNodeClick="handleNodeClick" /> - </div> - <div class="page-container-right"> - <div class="form-card"> - <el-form :model="queryParams" ref="queryRef" :inline="true"> - <el-form-item label="鏈熼棿" prop="timeType"> - <el-select v-model="queryParams.timeType" placeholder="鏈熼棿" clearable style="width: 120px" - @change="handleTimeType"> - <el-option v-for="dict in period" :key="dict.value" :label="dict.label" :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item label="鏃堕棿"> - <el-date-picker v-model="queryParams.dataTime" :type="queryParams.timeType == 'YEAR'? 'year': queryParams.timeType == 'MONTH'? 'month': 'date'" :format="queryParams.timeType == 'YEAR'? 'YYYY': queryParams.timeType == 'MONTH'? 'YYYY-MM': 'YYYY-MM-DD'" value-format="YYYY-MM-DD" placeholder="鏃堕棿" style="width: 100%" /> - </el-form-item> - <el-form-item label="閫夋嫨鐢佃〃" prop="energyType"> - <el-select v-model="queryParams.energyType" placeholder="閫夋嫨鐢佃〃" clearable style="width: 120px"> - <el-option :label="item.enername" :value="item.enersno" v-for="item in energyTypeList" - :key="item.enersno" @click="handleEnergyType(item)" /> - </el-select> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery"> - 鎼滅储 - </el-button> - - </el-form-item> - - </el-form> - </div> - <div style=" - height: calc(100vh - 220px) !important; - max-height: calc(100vh - 220px) !important; - overflow-y: auto; - " v-loading="loading"> - <!-- <el-row :gutter="24"> - <el-col :span="16"> --> - <BaseCard :title="queryParams.nodeName + '-璐熻嵎鍒嗘瀽'"> - <div class="chart-box"> - <div id="Chart1" /> - </div> - </BaseCard> - - <BaseCard :title="queryParams.nodeName + - '-鍘傚尯鑳借�楀垎鏋愮粺璁″垎鏋愯〃-' + - queryParams.enername - "> - <div class="table-box"> - <el-table :data="departmentList" show-summary> - <el-table-column label="鏈湡鏃堕棿" align="center" key="currentTime" prop="currentTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鏈湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="currentValue" prop="currentValue" :show-overflow-tooltip="true" /> - <el-table-column label="鍚屾湡鏃堕棿" align="center" key="compareTime" prop="compareTime" - :show-overflow-tooltip="true" /> - <el-table-column :label="'鍚屾湡鑰�' + - queryParams.enername + - '(' + - queryParams.muid + - ')' - " align="center" key="compareValue" prop="compareValue" :show-overflow-tooltip="true" /> - <el-table-column :label="(queryParams.analysisType == 'YOY' ? '鍚�' : '鐜�') + '姣�(%)' - " align="center" key="ratio" prop="ratio" :show-overflow-tooltip="true" width="200" /> - </el-table> - </div> - </BaseCard> - <!-- </el-col> - </el-row> --> - </div> - </div> - </div> - </div> -</template> - -<script setup name="department"> -import { - listRegion, - listDepartment, -} from "@/api/energyAnalysis/energyAnalysis"; -import { listEnergyTypeList } from "@/api/modelConfiguration/energyType"; -import * as echarts from "echarts"; -const { proxy } = getCurrentInstance(); -const { period } = proxy.useDict("period"); -import { useRoute } from "vue-router"; -import useSettingsStore from "@/store/modules/settings"; -const settingsStore = useSettingsStore(); -watch( - () => settingsStore.sideTheme, - (val) => { - // getList(); - } -); - //const energyTypeList = ref(undefined); -const energyTypeList =[ - { enerno: 1, enername: "鐢佃〃1" }, - { enerno: 2, enername: "鐢佃〃2" }, - { enerno: 3, enername: "鐢佃〃3" }, - { enerno: 4, enername: "鐢佃〃4"}, - ]; -// const departmentList = ref([]); -const loading = ref(false); -const data = reactive({ - queryParams: { - nodeId: null, - timeType: null, - dataTime: null, - analysisType: "YOY", - energyType: null, - }, - query: { - modelCode: null, - }, - - - -}); -const { queryParams, query } = toRefs(data); -/** 鑺傜偣鍗曞嚮浜嬩欢 */ -function handleNodeClick(data) { - queryParams.value.nodeId = data.id; - queryParams.value.nodeName = data.label; - handleTimeType(period.value[0].value); - listEnergyTypeList().then((res) => { - - - handleQuery(); - }); -} -function handleTimeType(e) { - queryParams.value.timeType = e; - queryParams.value.dataTime = proxy.dayjs(new Date()).format("YYYY-MM-DD"); -} -//閫夋嫨鐢佃〃 -function handleEnergyType(item) { - // queryParams.value.enername = item.enername; - // queryParams.value.muid = item.muid; - // handleQuery(); -} -function handleAnalysisType(analysisType) { - queryParams.value.analysisType = analysisType; - getList(); -} -// 鑳借�楀姣斿垎鏋�-绉戝鑳借�楀垎鏋�-鍒楄〃 -function getList() { - loading.value = true; - // 鍦ㄥ垵濮嬪寲涔嬪墠锛屽厛dispose鏃х殑瀹炰緥 - if (echarts.getInstanceByDom(document.getElementById("Chart1"))) { - echarts.dispose(document.getElementById("Chart1")); - } - // if (echarts.getInstanceByDom(document.getElementById("Chart2"))) { - // echarts.dispose(document.getElementById("Chart2")); - // } - const myChart1 = echarts.init(document.getElementById("Chart1")); - // const myChart2 = echarts.init(document.getElementById("Chart2")); - listRegion( - proxy.addDateRange({ - ...queryParams.value, - ...query.value, - }) - ).then((res) => { - if (!!res.code && res.code == 200) { - loading.value = false; - let xdata = []; - let yvalue = []; - let ycompareValue = []; - let yqoq = []; - if (!!res.data.chartDataList) { - res.data.chartDataList.map((item) => { - xdata.push( - proxy - .dayjs(item.xdata) - .format( - queryParams.value.timeType == "YEAR" - ? "MM鏈�" - : queryParams.value.timeType == "MONTH" - ? "DD鏃�" - : "HH鏃�" - ) - ); - yvalue.push(!!item.yvalue ? item.yvalue : 0); - ycompareValue.push(!!item.ycompareValue ? item.ycompareValue : 0); - yqoq.push(!!item.yqoq ? item.yqoq : 0); - }); - } - setTimeout(() => { - myChart1.setOption({ - color: ["#2979ff", "#19be6b", "#ff9900", "#fa3534"], - grid: { - top: "45", - left: "7%", - right: "5%", - bottom: "10", - containLabel: true, - }, - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: { - icon: "rect", - itemWidth: 14, - itemHeight: 10, - textStyle: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - }, - }, - xAxis: { - type: "category", - axisPointer: { - type: "shadow", - }, - axisLine: { - show: true, - lineStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - splitLine: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" ? "#FFFFFF" : "#222222", - fontSize: 14, - padding: [5, 0, 0, 0], - // formatter: '{value} ml' - }, - data: xdata, - }, - yAxis: [ - { - type: "value", - name: - "鑰�" + - queryParams.value.enername + - "閲�(" + - queryParams.value.muid + - ")", - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - axisTick: { - show: false, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - { - type: "value", - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮(%)" : "鐜瘮(%)", - alignTicks: true, - nameTextStyle: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - padding: [0, 0, 5, 0], - }, - axisLine: { - show: false, - }, - axisTick: { - show: false, - }, - splitLine: { - show: true, - lineStyle: { - type: "dashed", - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - }, - }, - splitArea: { - show: false, - }, - axisLabel: { - color: - settingsStore.sideTheme == "theme-dark" - ? "#FFFFFF" - : "#222222", - fontSize: 14, - }, - }, - ], - series: [ - { - name: "鏈湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: yvalue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: "鍚屾湡鍊�", - type: "bar", - barWidth: "8", - tooltip: { - valueFormatter: function (value) { - return value + queryParams.value.muid; - }, - }, - itemStyle: { - borderRadius: [15, 15, 0, 0], - }, - data: ycompareValue, - markPoint: { - data: [ - { type: "max", name: "Max" }, - { type: "min", name: "Min" }, - ], - }, - }, - { - name: queryParams.value.analysisType == "YOY" ? "鍚屾瘮" : "鐜瘮", - type: "line", - yAxisIndex: 1, - symbol: "none", // 璁剧疆涓� 'none' 鍘绘帀鍦嗙偣 - tooltip: { - valueFormatter: function (value) { - return value + "%"; - }, - }, - data: yqoq, - }, - ], - }); - }, 100); - departmentList.value = !!res.data.dataList ? res.data.dataList : []; - window.addEventListener( - "resize", - () => { - myChart1.resize(); - }, - { passive: true } - ); - } - }); - -} -// 鑳借�楀姣斿垎鏋�-绉戝鑳借�楀垎鏋�-鎼滅储 -function handleQuery() { - getList(); -} - -</script> -<style scoped lang="scss"> -@import "@/assets/styles/page.scss"; -</style> -- Gitblit v1.9.3