|
@@ -4,31 +4,27 @@
|
|
@date 2023年2月8日
|
|
@date 2023年2月8日
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
- <div class="doubleCarbon-main-box flexColumn" v-loading="searchLoading">
|
|
|
|
|
|
+ <div class="doubleCarbon-main-box flexColumn">
|
|
|
|
+ <a-spin class="spinStyle" size="large" tip="Loading..." v-show="searchLoading"></a-spin>
|
|
<!-- 头部搜索区域 -->
|
|
<!-- 头部搜索区域 -->
|
|
<div class="borderColor">
|
|
<div class="borderColor">
|
|
<div class="flex flex_between margin5rem">
|
|
<div class="flex flex_between margin5rem">
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<div class="mr1rem">
|
|
<div class="mr1rem">
|
|
单位名称:
|
|
单位名称:
|
|
- <el-select v-model="searchParam.nameOfUnit" clearable placeholder="全部">
|
|
|
|
- <el-option v-for="item in options.nameOfUnit" :key="item.value" :label="item.label" :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <a-select
|
|
|
|
+ style="width:200px;"
|
|
|
|
+ v-model="searchParam.nameOfUnit"
|
|
|
|
+ :allowClear="selectProps.allowClear"
|
|
|
|
+ :mode="selectProps.mode"
|
|
|
|
+ :options="options.nameOfUnit"
|
|
|
|
+ :notFoundConent="selectProps.notFoundConent"
|
|
|
|
+ :placeholder="selectProps.placeholder"
|
|
|
|
+ ></a-select>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- 时间范围:
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="searchParam.timeRange"
|
|
|
|
- type="monthrange"
|
|
|
|
- align="right"
|
|
|
|
- unlink-panels
|
|
|
|
- range-separator="-"
|
|
|
|
- start-placeholder="开始时间"
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
- :picker-options="$constant.PICKER_OPTIONS"
|
|
|
|
- >
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ 时间范围: <a-month-picker id="startTime" format="YYYY-MM" @change="changeTimeRangeS" placeholder="开始时间" />~
|
|
|
|
+ <a-month-picker id="endTime" format="YYYY-MM" @change="changeTimeRangeE" placeholder="结束时间" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
@@ -55,8 +51,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex flex_around coreListBox margin5rem">
|
|
|
|
- <el-empty v-if="coreList.length == 0" description="暂无数据"></el-empty>
|
|
|
|
|
|
+ <div class="flex flex_around coreListBox margin5rem" v-if="coreList.length == 0" style="height:120px;">
|
|
|
|
+ <a-empty></a-empty>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 碳排放分析和碳配额构成 -->
|
|
<!-- 碳排放分析和碳配额构成 -->
|
|
@@ -65,28 +61,33 @@
|
|
<div class="cardTitle margin5rem">碳排放分析</div>
|
|
<div class="cardTitle margin5rem">碳排放分析</div>
|
|
<div class="margin5rem chartDomBox">
|
|
<div class="margin5rem chartDomBox">
|
|
<LineChart v-if="chartData.LineChartData" :echartData="chartData.LineChartData" />
|
|
<LineChart v-if="chartData.LineChartData" :echartData="chartData.LineChartData" />
|
|
- <el-empty v-else description="暂无数据"></el-empty>
|
|
|
|
|
|
+ <a-empty v-else></a-empty>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="echartBox_right borderColor">
|
|
<div class="echartBox_right borderColor">
|
|
<div class="cardTitle margin5rem">碳配额构成</div>
|
|
<div class="cardTitle margin5rem">碳配额构成</div>
|
|
<div class="margin5rem chartDomBox">
|
|
<div class="margin5rem chartDomBox">
|
|
<BarChart v-if="chartData.BarChartData" :echartData="chartData.BarChartData" />
|
|
<BarChart v-if="chartData.BarChartData" :echartData="chartData.BarChartData" />
|
|
- <el-empty v-else description="暂无数据"></el-empty>
|
|
|
|
|
|
+ <a-empty v-else></a-empty>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 双碳新闻和碳排放占比 -->
|
|
<!-- 双碳新闻和碳排放占比 -->
|
|
<div class="flex" style="height:300px;">
|
|
<div class="flex" style="height:300px;">
|
|
<div class="echartBox_left borderColor">
|
|
<div class="echartBox_left borderColor">
|
|
- <el-dialog title="双碳新闻" :visible.sync="showModalStatus" width="60%" :before-close="onCancel">
|
|
|
|
- <p>{{ showModalInfo.title }}</p>
|
|
|
|
- <div class="flex flex_between">
|
|
|
|
- <div>{{ showModalInfo.author }}</div>
|
|
|
|
- <div>{{ showModalInfo.pushTime }}</div>
|
|
|
|
- </div>
|
|
|
|
- <p>{{ showModalInfo.content }}</p>
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
+ <a-modal title="双碳新闻" :visible.sync="showModalStatus" width="60%" :footer="null" @cancel="onCancel" centered>
|
|
|
|
+ <p style="font-size: 20px;font-weight:blod;color:#000;">{{ showModalInfo.title }}</p>
|
|
|
|
+ <div style="margin-bottom:10px;border-bottom: 1px solid #CCCCCC;">{{ showModalInfo.pushTime }}</div>
|
|
|
|
+ <div
|
|
|
|
+ style="max-height: calc(100vh - 300px);overflow:auto;background: rgba(10,100,100,0.05);font-size:16px;"
|
|
|
|
+ v-if="showModalInfo.content.indexOf(`<p>`) != -1"
|
|
|
|
+ v-html="showModalInfo.content"
|
|
|
|
+ ></div>
|
|
|
|
+ <p v-else style="font-size: 16px;font-weight:400;color:#000;background: rgba(10,100,100,0.05);">
|
|
|
|
+ {{ showModalInfo.content }}
|
|
|
|
+ </p>
|
|
|
|
+ <div style="margin-top:10px;border-top: 1px solid #CCCCCC;">{{ showModalInfo.author }}</div>
|
|
|
|
+ </a-modal>
|
|
<div class="cardTitle margin5rem">双碳新闻</div>
|
|
<div class="cardTitle margin5rem">双碳新闻</div>
|
|
<div class="margin5rem" v-if="DoubleCarbonNewsInfoList.length > 0" style="overflow-y:auto;height: calc(100% - 53px);">
|
|
<div class="margin5rem" v-if="DoubleCarbonNewsInfoList.length > 0" style="overflow-y:auto;height: calc(100% - 53px);">
|
|
<div
|
|
<div
|
|
@@ -96,7 +97,8 @@
|
|
@click="showModal(item)"
|
|
@click="showModal(item)"
|
|
>
|
|
>
|
|
<div>{{ item.title }}</div>
|
|
<div>{{ item.title }}</div>
|
|
- <div>{{ item.content }}</div>
|
|
|
|
|
|
+ <div v-if="item.content.indexOf(`<p>`) != -1" v-html="item.content"></div>
|
|
|
|
+ <div v-else>{{ item.content }}</div>
|
|
<div>{{ item.author }}</div>
|
|
<div>{{ item.author }}</div>
|
|
<div>{{ item.pushTime }}</div>
|
|
<div>{{ item.pushTime }}</div>
|
|
<div>>></div>
|
|
<div>>></div>
|
|
@@ -107,14 +109,14 @@
|
|
v-if="DoubleCarbonNewsInfoList.length == 0"
|
|
v-if="DoubleCarbonNewsInfoList.length == 0"
|
|
style="overflow-y:auto;height: calc(100% - 53px);"
|
|
style="overflow-y:auto;height: calc(100% - 53px);"
|
|
>
|
|
>
|
|
- <el-empty description="暂无数据"></el-empty>
|
|
|
|
|
|
+ <a-empty></a-empty>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="echartBox_right borderColor">
|
|
<div class="echartBox_right borderColor">
|
|
<div class="cardTitle margin5rem">碳排放占比</div>
|
|
<div class="cardTitle margin5rem">碳排放占比</div>
|
|
<div class="margin5rem chartDomBox">
|
|
<div class="margin5rem chartDomBox">
|
|
<PieChart v-if="chartData.PieChartData" :echartData="chartData.PieChartData" />
|
|
<PieChart v-if="chartData.PieChartData" :echartData="chartData.PieChartData" />
|
|
- <el-empty v-else description="暂无数据"></el-empty>
|
|
|
|
|
|
+ <a-empty v-else></a-empty>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -125,6 +127,8 @@
|
|
import LineChart from "../../echart/LineChart.vue";
|
|
import LineChart from "../../echart/LineChart.vue";
|
|
import BarChart from "../../echart/BarChart.vue";
|
|
import BarChart from "../../echart/BarChart.vue";
|
|
import PieChart from "../../echart/PieChart.vue";
|
|
import PieChart from "../../echart/PieChart.vue";
|
|
|
|
+// 模拟数据
|
|
|
|
+import AnalogData from "../AnalogData.js"
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
LineChart,
|
|
LineChart,
|
|
@@ -133,16 +137,26 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- // loading状态
|
|
|
|
- searchLoading: true,
|
|
|
|
|
|
+ // selectProps配置
|
|
|
|
+ selectProps: {
|
|
|
|
+ allowClear: true, // 支持清除
|
|
|
|
+ mode: "default", // 模式['default'|'multiple'|'tags'|'combobox']
|
|
|
|
+ notFoundConent: "Not Found", // 当下拉列表为空时显示的内容
|
|
|
|
+ placeholder: "请选择", // 选择框默认文字 string|slot
|
|
|
|
+ showArrow: true, // 是否显示下拉小箭头
|
|
|
|
+ size: "large" // 选择框大小['large'|'small']
|
|
|
|
+ },
|
|
// 单位名称option可选值
|
|
// 单位名称option可选值
|
|
options: {
|
|
options: {
|
|
- nameOfUnit: []
|
|
|
|
|
|
+ nameOfUnit: [] // options 数据,如果设置则不需要手动构造 selectOption 节点
|
|
},
|
|
},
|
|
|
|
+ // loading状态
|
|
|
|
+ searchLoading: true,
|
|
// 头部搜索条件中绑定值
|
|
// 头部搜索条件中绑定值
|
|
|
|
+ monthArr: [],
|
|
searchParam: {
|
|
searchParam: {
|
|
- nameOfUnit: "",
|
|
|
|
- timeRange: []
|
|
|
|
|
|
+ nameOfUnit: undefined,
|
|
|
|
+ timeRange: [undefined, undefined]
|
|
},
|
|
},
|
|
// 头部核心指标循环显示数据
|
|
// 头部核心指标循环显示数据
|
|
coreList: [],
|
|
coreList: [],
|
|
@@ -165,138 +179,117 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
// 页面初始化
|
|
// 页面初始化
|
|
this.init();
|
|
this.init();
|
|
|
|
+ //默认是当年的1月到12月
|
|
|
|
+ this.defaulTimeRangeS();
|
|
|
|
+ this.defaulTimeRangeE();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- init() {
|
|
|
|
- // 初始化加载[单位名称列表、核心指标、碳排放分析、碳配额构成、双碳新闻、碳排放占比]
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.options.nameOfUnit = [
|
|
|
|
- { value: "1", label: "中讯邮电咨询设计院有限公司" },
|
|
|
|
- { value: "2", label: "北京电信规划设计院" }
|
|
|
|
- ];
|
|
|
|
- this.chartData = {
|
|
|
|
- BarChartData: {
|
|
|
|
- yAxisData: ["中讯", "北京规划院", "郑分", "广分", "上分"],
|
|
|
|
- seriesData: {
|
|
|
|
- 碳配额存量: [120, 132, 101, 134, 90, 230, 210],
|
|
|
|
- 碳配额消耗: [220, 182, 191, 234, 290, 330, 310]
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- LineChartData: {
|
|
|
|
- xAxisData: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
|
|
|
|
- seriesData: {
|
|
|
|
- 中讯: [120, 132, 101, 134, 90, 230, 210],
|
|
|
|
- 北京规划院: [220, 182, 191, 234, 290, 330, 310],
|
|
|
|
- 郑分: [150, 232, 201, 154, 190, 330, 410],
|
|
|
|
- 广分: [320, 332, 301, 334, 390, 330, 320],
|
|
|
|
- 上分: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- PieChartData: {
|
|
|
|
- seriesName: "碳排放占比",
|
|
|
|
- seriesData: [
|
|
|
|
- { value: 1048, name: "汽油" },
|
|
|
|
- { value: 735, name: "柴油" },
|
|
|
|
- { value: 580, name: "天然气" },
|
|
|
|
- { value: 484, name: "热力" },
|
|
|
|
- { value: 300, name: "电力" },
|
|
|
|
- { value: 199, name: "其他" }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- this.DoubleCarbonNewsInfoList = [
|
|
|
|
- {
|
|
|
|
- title: "【减碳小妙招】",
|
|
|
|
- content: "xxxxxxxxxxxxxxxxxxxxxxx",
|
|
|
|
- author: "中讯邮电设计院-张三",
|
|
|
|
- pushTime: "2021-08-09"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "【减碳小妙招】",
|
|
|
|
- content: "xxxxxxxxxxxxxxxxxxxxxxx",
|
|
|
|
- author: "中讯邮电设计院-张三",
|
|
|
|
- pushTime: "2021-08-09"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "【减碳小妙招】",
|
|
|
|
- content: "xxxxxxxxxxxxxxxxxxxxxxx",
|
|
|
|
- author: "中讯邮电设计院-张三",
|
|
|
|
- pushTime: "2021-08-09"
|
|
|
|
- }
|
|
|
|
- ];
|
|
|
|
- this.coreList = [
|
|
|
|
- {
|
|
|
|
- title: "碳配额存量",
|
|
|
|
- value: "60%",
|
|
|
|
- leavel: 1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "碳排放存量",
|
|
|
|
- value: 500,
|
|
|
|
- unit: "tCO2e",
|
|
|
|
- info: {
|
|
|
|
- title: "同比上升",
|
|
|
|
- leavel: 3,
|
|
|
|
- value: "0.4%"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "单位面积碳排放",
|
|
|
|
- value: 380,
|
|
|
|
- unit: "tCO2e/m²",
|
|
|
|
- info: {
|
|
|
|
- title: "同比上升",
|
|
|
|
- leavel: 3,
|
|
|
|
- value: "0.4%"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "人均碳排放",
|
|
|
|
- value: 80,
|
|
|
|
- unit: "tCO2e/人",
|
|
|
|
- info: {
|
|
|
|
- title: "同比上升",
|
|
|
|
- leavel: 3,
|
|
|
|
- value: "0.4%"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "光伏减排",
|
|
|
|
- value: 40,
|
|
|
|
- unit: "tCO2e",
|
|
|
|
- info: {
|
|
|
|
- title: "同比上升",
|
|
|
|
- leavel: 3,
|
|
|
|
- value: "0.4%"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: "值得关注",
|
|
|
|
- value: "减少2辆车出行一周"
|
|
|
|
- }
|
|
|
|
- ];
|
|
|
|
- this.searchLoading = false;
|
|
|
|
- }, 1000);
|
|
|
|
|
|
+ // 开始时间初始化
|
|
|
|
+ defaulTimeRangeS() {
|
|
|
|
+ this.searchParam.timeRange[0] = this.$moment()
|
|
|
|
+ .startOf("year")
|
|
|
|
+ .format("YYYY-MM-DD 00:00:00");
|
|
|
|
+ document.getElementById("startTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .startOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
|
|
+ },
|
|
|
|
+ // 结束时间初始化
|
|
|
|
+ defaulTimeRangeE() {
|
|
|
|
+ this.searchParam.timeRange[1] = this.$moment()
|
|
|
|
+ .endOf("year")
|
|
|
|
+ .format("YYYY-MM-DD 23:59:59");
|
|
|
|
+ document.getElementById("endTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .endOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
|
|
+ },
|
|
|
|
+ // 修改开始时间时
|
|
|
|
+ changeTimeRangeS(date, dateStr) {
|
|
|
|
+ // 修改时间前判断是否合理
|
|
|
|
+ if (this.searchParam.timeRange[1]) {
|
|
|
|
+ if (
|
|
|
|
+ this.$moment(this.$moment(dateStr, "YYYY-MM").format("YYYY-MM-DD 00:00:00")).diff(
|
|
|
|
+ this.$moment(this.searchParam.timeRange[1])
|
|
|
|
+ ) > 0
|
|
|
|
+ ) {
|
|
|
|
+ this.$message.error("开始时间不能大于结束时间!请重新选择!");
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ document.getElementById("startTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .startOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
|
|
+ }, 10);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (dateStr) {
|
|
|
|
+ this.searchParam.timeRange[0] = this.$moment(dateStr, "YYYY-MM").format("YYYY-MM-DD 00:00:00");
|
|
|
|
+ } else {
|
|
|
|
+ this.searchParam.timeRange[0] = undefined;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 修改结束时间时
|
|
|
|
+ changeTimeRangeE(date, dateStr) {
|
|
|
|
+ // 修改时间前判断是否合理
|
|
|
|
+ if (this.searchParam.timeRange[0]) {
|
|
|
|
+ if (
|
|
|
|
+ this.$moment(this.searchParam.timeRange[0]).diff(
|
|
|
|
+ this.$moment(
|
|
|
|
+ this.$moment(dateStr, "YYYY-MM")
|
|
|
|
+ .endOf("month")
|
|
|
|
+ .format("YYYY-MM-DD 23:59:59")
|
|
|
|
+ )
|
|
|
|
+ ) > 0
|
|
|
|
+ ) {
|
|
|
|
+ this.$message.error("结束时间不能小于开始时间!请重新选择!");
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ document.getElementById("endTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .endOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
|
|
+ }, 10);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (dateStr) {
|
|
|
|
+ this.searchParam.timeRange[1] = this.$moment(dateStr, "YYYY-MM")
|
|
|
|
+ .endOf("month")
|
|
|
|
+ .format("YYYY-MM-DD 23:59:59");
|
|
|
|
+ } else {
|
|
|
|
+ this.searchParam.timeRange[1] = undefined;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 查询事件
|
|
// 查询事件
|
|
search() {
|
|
search() {
|
|
|
|
+ // 时间范围条件不合理判断
|
|
|
|
+ if (this.searchParam.timeRange[0] || this.searchParam.timeRange[1]) {
|
|
|
|
+ if (!this.searchParam.timeRange[0]) {
|
|
|
|
+ this.$message.info("请选择开始时间!");
|
|
|
|
+ return;
|
|
|
|
+ } else if (!this.searchParam.timeRange[1]) {
|
|
|
|
+ this.$message.info("请选择结束时间!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.searchLoading = true;
|
|
this.searchLoading = true;
|
|
- /* dayjs舍弃,使用moment.js */
|
|
|
|
- // console.log(
|
|
|
|
- // "查询条件:",
|
|
|
|
- // this.searchParam.nameOfUnit,
|
|
|
|
- // this.searchParam.timeRange[0] ? this.$dayjs(this.searchParam.timeRange[0]).format("YYYY-MM-DD 00:00:00") : "",
|
|
|
|
- // this.searchParam.timeRange[1] ? this.$dayjs(this.searchParam.timeRange[1]).format("YYYY-MM-DD 00:00:00") : ""
|
|
|
|
- // );
|
|
|
|
|
|
+ console.log("查询条件:", this.searchParam.nameOfUnit, this.searchParam.timeRange[0], this.searchParam.timeRange[1]);
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.searchLoading = false;
|
|
this.searchLoading = false;
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
// 重置事件
|
|
// 重置事件
|
|
reset() {
|
|
reset() {
|
|
|
|
+ document.getElementById("startTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .startOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
|
|
+ document.getElementById("endTime").querySelector("input").value = this.$moment()
|
|
|
|
+ .endOf("year")
|
|
|
|
+ .format("YYYY-MM");
|
|
this.searchParam = {
|
|
this.searchParam = {
|
|
- nameOfUnit: "",
|
|
|
|
- timeRange: []
|
|
|
|
|
|
+ nameOfUnit: undefined,
|
|
|
|
+ timeRange: [
|
|
|
|
+ this.$moment()
|
|
|
|
+ .startOf("year")
|
|
|
|
+ .format("YYYY-MM-DD 00:00:00"),
|
|
|
|
+ this.$moment()
|
|
|
|
+ .endOf("year")
|
|
|
|
+ .format("YYYY-MM-DD 23:59:59")
|
|
|
|
+ ]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 弹窗显示事件
|
|
// 弹窗显示事件
|
|
@@ -306,11 +299,17 @@ export default {
|
|
},
|
|
},
|
|
// 弹窗隐藏事件
|
|
// 弹窗隐藏事件
|
|
onCancel() {
|
|
onCancel() {
|
|
- this.$confirm("确认关闭?")
|
|
|
|
- .then(_ => {
|
|
|
|
- this.showModalStatus = false;
|
|
|
|
- })
|
|
|
|
- .catch(_ => {});
|
|
|
|
|
|
+ this.showModalStatus = false;
|
|
|
|
+ },
|
|
|
|
+ init() {
|
|
|
|
+ // 初始化加载[单位名称列表、核心指标、碳排放分析、碳配额构成、碳排放占比、双碳新闻]
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.options.nameOfUnit = AnalogData.optionsNameOfUnit;
|
|
|
|
+ this.coreList = AnalogData.core_List;
|
|
|
|
+ this.chartData = AnalogData.CHART_DATA;
|
|
|
|
+ this.DoubleCarbonNewsInfoList = AnalogData.doubleCarbonNewsInfoList;
|
|
|
|
+ this.searchLoading = false;
|
|
|
|
+ }, 1000);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -320,9 +319,8 @@ export default {
|
|
// 复用样式
|
|
// 复用样式
|
|
.flexColumn {
|
|
.flexColumn {
|
|
display: flex;
|
|
display: flex;
|
|
- overflow-y: auto;
|
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
+ flex-wrap: nowrap;
|
|
}
|
|
}
|
|
.flex {
|
|
.flex {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -362,8 +360,9 @@ export default {
|
|
}
|
|
}
|
|
// 页面主题样式
|
|
// 页面主题样式
|
|
.doubleCarbon-main-box {
|
|
.doubleCarbon-main-box {
|
|
- width: calc(100% - 16px);
|
|
|
|
- height: calc(100% - 16px);
|
|
|
|
|
|
+ position: relative;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
& * {
|
|
& * {
|
|
user-select: none;
|
|
user-select: none;
|
|
-moz-user-select: none;
|
|
-moz-user-select: none;
|
|
@@ -380,6 +379,13 @@ export default {
|
|
border-radius: 2px;
|
|
border-radius: 2px;
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
}
|
|
|
|
+ .spinStyle {
|
|
|
|
+ position: absolute;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ background: rgba(255, 255, 255, 0.75);
|
|
|
|
+ z-index: 2;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 头部搜索框和(重置、查询)按钮之间的间距样式
|
|
// 头部搜索框和(重置、查询)按钮之间的间距样式
|
|
.mr1rem {
|
|
.mr1rem {
|
|
@@ -477,5 +483,33 @@ export default {
|
|
&:hover {
|
|
&:hover {
|
|
color: @primary-color;
|
|
color: @primary-color;
|
|
}
|
|
}
|
|
|
|
+ & > div {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ }
|
|
|
|
+ & > div:nth-child(1) {
|
|
|
|
+ width: 15%;
|
|
|
|
+ }
|
|
|
|
+ & > div:nth-child(2) {
|
|
|
|
+ height: 21px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ width: calc(50% - 110px);
|
|
|
|
+ }
|
|
|
|
+ & > div:nth-child(3) {
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ & > div:nth-child(4) {
|
|
|
|
+ width: 15%;
|
|
|
|
+ }
|
|
|
|
+ & > div:nth-child(5) {
|
|
|
|
+ width: 30px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+// loading样式
|
|
|
|
+.spin-content {
|
|
|
|
+ border: 1px solid #91d5ff;
|
|
|
|
+ background-color: #e6f7ff;
|
|
|
|
+ padding: 30px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|