update 驾驶舱
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<DoubleRingWrapperVue :data-source="dataBundle" :period="period" />
|
||||
<DoubleRingWrapperVue data-source="标准组件输出" :period="period" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return { dataBundle: null };
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="inner-shadow w-1"></div>
|
||||
<div class="inner-shadow flex-1 flex">
|
||||
<CityName value="凯盛光伏" />
|
||||
<CityValue value="32212" horizontal :period="period" />
|
||||
<CityValue :value="headquarterValue" horizontal :period="period" />
|
||||
</div>
|
||||
<div class="inner-shadow w-1"></div>
|
||||
</div>
|
||||
@@ -42,8 +42,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
dataSource: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
period: {
|
||||
type: String,
|
||||
@@ -51,18 +51,57 @@ export default {
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cities: [
|
||||
{ name: "蚌埠兴科", value: 93111 },
|
||||
{ name: "成都", value: 32212 },
|
||||
{ name: "邯郸", value: 7732 },
|
||||
{ name: "株洲", value: 71732 },
|
||||
{ name: "瑞昌", value: 23421 },
|
||||
{ name: "佳木斯", value: 340 },
|
||||
],
|
||||
};
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
headquarterValue() {
|
||||
let getterName = "";
|
||||
switch (this.dataSource) {
|
||||
case "标准组件输出":
|
||||
getterName = "stdOutput";
|
||||
break;
|
||||
case "芯片输出":
|
||||
getterName = "chipOutput";
|
||||
break;
|
||||
case "BIPV输出":
|
||||
getterName = "bipvOutput";
|
||||
break;
|
||||
}
|
||||
return (
|
||||
"" + (this.$store.getters.copilot.yield[getterName]?.current?.[5] ?? 0)
|
||||
);
|
||||
},
|
||||
cities() {
|
||||
let getterName = "";
|
||||
switch (this.dataSource) {
|
||||
case "标准组件输出":
|
||||
getterName = "stdOutput";
|
||||
break;
|
||||
case "芯片输出":
|
||||
getterName = "chipOutput";
|
||||
break;
|
||||
case "BIPV输出":
|
||||
getterName = "bipvOutput";
|
||||
break;
|
||||
}
|
||||
const _cities = [
|
||||
{ name: "瑞昌", value: 0 },
|
||||
{ name: "邯郸", value: 0 },
|
||||
{ name: "株洲", value: 0 },
|
||||
{ name: "佳木斯", value: 0 },
|
||||
{ name: "成都", value: 0 },
|
||||
{ name: "凯盛光伏", value: 0 },
|
||||
{ name: "蚌埠兴科", value: 0 },
|
||||
];
|
||||
this.$store.getters.copilot.yield[getterName]?.current?.forEach(
|
||||
(v, idx) => {
|
||||
_cities[idx].value = v ?? 0;
|
||||
}
|
||||
);
|
||||
_cities.splice(4, 1);
|
||||
return _cities;
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
};
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
import CopilotSelect from "../../select.vue";
|
||||
import fetcher from "./fetcherDoubleRing";
|
||||
import DoubleRingChartVue from "./DoubleRingChart.vue";
|
||||
import CityData from './CityData.vue';
|
||||
import CityData from "./CityData.vue";
|
||||
|
||||
export default {
|
||||
name: "DoubleRingWrapper",
|
||||
components: { CopilotSelect, DoubleRingChartVue, CityData },
|
||||
props: {
|
||||
dataSource: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
period: {
|
||||
type: String,
|
||||
|
||||
Reference in New Issue
Block a user