done home

This commit is contained in:
DESKTOP-FUDKNA8\znjsz 2024-04-18 17:00:05 +08:00
父節點 53ec6dacd5
當前提交 ceb411180f
共有 4 個文件被更改,包括 53 次插入21 次删除

查看文件

@ -35,7 +35,6 @@ export default {
computed: {
series() {
const ftoInvest = this.$store.getters.home.ftoInvest;
if (!ftoInvest || !ftoInvest.current || !ftoInvest.previous) {
return [
{

查看文件

@ -56,6 +56,7 @@ export default {
data() {
return {
isFullscreen: false,
actualOptions: null,
options: {
grid: {
left: "3%",
@ -107,7 +108,7 @@ export default {
},
series: [
{
name: this.series[0].name,
name: '', // this.series[0].name,
type: "bar",
barWidth: 12,
itemStyle: {
@ -139,10 +140,10 @@ export default {
global: false, // false
},
},
data: this.series[0].data,
data: [], // this.series[0].data,
},
{
name: this.series[1].name,
name: '', // this.series[1].name,
type: "bar",
barWidth: 12,
// tooltip: {
@ -171,7 +172,7 @@ export default {
global: false, // false
},
},
data: this.series[1].data,
data: [], // this.series[1].data,
},
],
},
@ -180,16 +181,30 @@ export default {
watch: {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) {
this.options.series.map((item) => {
this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12;
});
this.options.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.options);
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.actualOptions);
},
series(val) {
if (!val) {
this.initOptions(this.options);
return;
}
const actualOptions = JSON.parse(JSON.stringify(this.options));
actualOptions.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name;
actualOptions.series[1].data = val[1].data;
actualOptions.series[1].name = val[1].name;
this.actualOptions = actualOptions;
this.initOptions(actualOptions);
},
},
mounted() {
this.actualOptions = this.options;
this.initOptions(this.options);
if (screenfull.isEnabled) {

查看文件

@ -107,7 +107,7 @@ export default {
},
series: [
{
name: "2024年目标值",
name: "", // "2024",
type: "line",
lineStyle: {
color: "#f3c000",
@ -139,10 +139,10 @@ export default {
global: false, // false
},
},
data: this.series[0].data,
data: [], // this.series[0].data,
},
{
name: "2023年",
name: "", // "2023",
type: "bar",
barWidth: 12,
itemStyle: {
@ -174,10 +174,10 @@ export default {
global: false, // false
},
},
data: this.series[1].data,
data: [], // this.series[1].data,
},
{
name: "2024年",
name: "", // "2024",
type: "bar",
barWidth: 12,
// tooltip: {
@ -206,25 +206,42 @@ export default {
global: false, // false
},
},
data: this.series[2].data,
data: [], // this.series[2].data,
},
],
},
actualOptions: null,
};
},
watch: {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) {
this.options.series.map((item) => {
this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12;
});
this.options.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.options);
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.actualOptions);
},
series(val) {
if (!val) {
this.initOptions(this.options);
return;
}
const actualOptions = JSON.parse(JSON.stringify(this.options));
actualOptions.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name;
actualOptions.series[1].data = val[1].data;
actualOptions.series[1].name = val[1].name;
actualOptions.series[2].data = val[2].data;
actualOptions.series[2].name = val[2].name;
this.actualOptions = actualOptions;
this.initOptions(actualOptions);
},
},
mounted() {
this.actualOptions = this.options;
this.initOptions(this.options);
if (screenfull.isEnabled) {

查看文件

@ -9,6 +9,7 @@
<div class="dashboard-container">
<!-- refresh btn -->
<button
v-if="0"
style="appearance: none; outline: none; border: none; background: none; color:#fff; cursor: pointer; position: absolute; top: 8px; right: 8px"
@click="$emit('refresh')"
>