|
|
@@ -12,7 +12,7 @@
|
|
|
</div>
|
|
|
<div class="ml-10px">
|
|
|
<div class="text-15px color-[#ffffffb2]">合同开工日期</div>
|
|
|
- <div class="text-20px mt-10px">2024-10-01</div>
|
|
|
+ <div class="text-20px mt-10px">{{ dataSource?.xmdjs?.start_time }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
@@ -22,8 +22,8 @@
|
|
|
<img src="@/assets/images/u1420.svg" />
|
|
|
</div>
|
|
|
<div class="ml-10px">
|
|
|
- <div class="text-15px color-[#ffffffb2]">合同开工日期</div>
|
|
|
- <div class="text-20px mt-10px">2024-10-01</div>
|
|
|
+ <div class="text-15px color-[#ffffffb2]">合同结束日期</div>
|
|
|
+ <div class="text-20px mt-10px">{{ dataSource?.xmdjs?.end_time }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -38,24 +38,24 @@
|
|
|
</div>
|
|
|
|
|
|
<CardTitle>CWS分解</CardTitle>
|
|
|
- <div class="w-full h-260px flex gap-10px p-10px box-border justify-between items-center">
|
|
|
- <Chart :options="chartOptions" />
|
|
|
+ <div class="w-full h-260px flex gap-10px p-10px box-border justify-between items-center left-bottom-board">
|
|
|
+ <ScrollBoard :config="config2" @mouseover="mouseoverHandler" @click="clickHandler" />
|
|
|
</div>
|
|
|
</Panel>
|
|
|
|
|
|
<!-- 中间区域 -->
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="h-full box-border pr-10px pl-10px middle-content flex-1 flex flex-col gap-10px justify-center"
|
|
|
>
|
|
|
<div class="text-white h-500px w-full center-board">
|
|
|
<ProjectMilestone />
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 右侧面板 -->
|
|
|
<Panel>
|
|
|
<div class="bg-[#348bc74c] w-full h-150px flex flex-col justify-center items-center">
|
|
|
- <DigitalFlop :config="config5" style="height: 80px; width: 100%" />
|
|
|
+ <DigitalFlop :config="config6" style="height: 80px; width: 100%" />
|
|
|
<div class="text-32px color-[#ffffffb2]">实际AC</div>
|
|
|
</div>
|
|
|
<CardTitle>单体完成比率统计</CardTitle>
|
|
|
@@ -72,379 +72,313 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { reactive, onMounted, ref } from 'vue';
|
|
|
+import { ref, computed } from 'vue';
|
|
|
import { ScrollBoard, DigitalFlop } from '@kjgl77/datav-vue3';
|
|
|
import Panel from '@/components/Panel.vue';
|
|
|
import CardTitle from '@/components/CardTitle.vue';
|
|
|
import Chart from '@/components/Chart/index.vue';
|
|
|
import type { EChartsOption } from 'echarts';
|
|
|
-import ProjectMilestone from './ProjectMilestone.vue';
|
|
|
-
|
|
|
-const config1 = reactive({
|
|
|
- header: ['单体', '当前状态', '所属分类'],
|
|
|
- data: [
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ['高处作业安全', '253', '123'],
|
|
|
- ],
|
|
|
- headerBGC: '#348bc763',
|
|
|
- evenRowBGC: 'rgba(29, 66, 110, 0.6)',
|
|
|
- oddRowBGC: 'rgba(52, 139, 199, 0.0980392156862745)',
|
|
|
- align: ['center'],
|
|
|
- index: true,
|
|
|
- columnWidth: [50],
|
|
|
- rowNum: 6,
|
|
|
- headerHeight: 35,
|
|
|
- waitTime: 50005000,
|
|
|
-});
|
|
|
-
|
|
|
-const config5 = reactive({
|
|
|
- number: [1132],
|
|
|
- content: '{nt}%',
|
|
|
-});
|
|
|
-
|
|
|
-setInterval(() => {
|
|
|
- config5.number = config5.number.map((num) => num + 100);
|
|
|
-}, 3000);
|
|
|
-
|
|
|
-let scrollInterval: ReturnType<typeof setInterval>;
|
|
|
-let currentZoom = { start: 0, end: 50 };
|
|
|
-
|
|
|
-const chartData = ref({
|
|
|
- plan: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120],
|
|
|
- actual: [12, 22, 28, 38, 55, 65, 72, 85, 95, 108, 115, 125],
|
|
|
- actual1: [12, 22, 28, 38, 55, 65, 72, 85, 95, 108, 115, 125],
|
|
|
-});
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
+import { invoke } from '@/api';
|
|
|
+import { useRequest } from 'vue-hooks-plus';
|
|
|
|
|
|
-const chartOptions = ref<EChartsOption>({
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- textStyle: {
|
|
|
- color: '#000',
|
|
|
- },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: 'category',
|
|
|
- data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
|
- axisLabel: {
|
|
|
- color: '#fff',
|
|
|
- },
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'value',
|
|
|
- axisLabel: {
|
|
|
- color: '#fff',
|
|
|
- },
|
|
|
- },
|
|
|
- series: [
|
|
|
+const route = useRoute();
|
|
|
+const dataSource = ref<{
|
|
|
+ // ac
|
|
|
+ ac: string;
|
|
|
+ // 项目倒计时
|
|
|
+ xmdjs: {
|
|
|
+ // 结束时间
|
|
|
+ end_time: string;
|
|
|
+ // 开始时间
|
|
|
+ start_time: string;
|
|
|
+ // 工期
|
|
|
+ days: number;
|
|
|
+ };
|
|
|
+ // wbs分解
|
|
|
+ wbsfj: [
|
|
|
{
|
|
|
- name: '单体',
|
|
|
- data: chartData.value.plan,
|
|
|
- type: 'bar',
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(42, 254, 255, 1)',
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'inside',
|
|
|
- color: '#fff',
|
|
|
- fontSize: 10,
|
|
|
- },
|
|
|
+ // 状态
|
|
|
+ tas_state: string;
|
|
|
+ // 分类
|
|
|
+ tas_classify: string;
|
|
|
+ // 单体
|
|
|
+ tas_monomer: string;
|
|
|
},
|
|
|
+ ];
|
|
|
+ // 单体完成比率
|
|
|
+ dtwcbl: [
|
|
|
{
|
|
|
- name: '状态',
|
|
|
- data: chartData.value.actual,
|
|
|
- type: 'bar',
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(225, 189, 97, 1)',
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'inside',
|
|
|
- color: '#fff',
|
|
|
- fontSize: 10,
|
|
|
- },
|
|
|
+ // 标题
|
|
|
+ title: string;
|
|
|
+ // 完成比例
|
|
|
+ value: number;
|
|
|
},
|
|
|
+ ];
|
|
|
+ // cws分解
|
|
|
+ cwsfj: [
|
|
|
{
|
|
|
- name: '分类',
|
|
|
- data: chartData.value.actual1,
|
|
|
- type: 'bar',
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(0, 189, 97, 1)',
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'inside',
|
|
|
- color: '#fff',
|
|
|
- fontSize: 10,
|
|
|
- },
|
|
|
+ // 状态
|
|
|
+ tas_state: string;
|
|
|
+ // 分类
|
|
|
+ tas_classify: string;
|
|
|
+ // 单体预算金额(万元)
|
|
|
+ tas_budget_amount: number;
|
|
|
+ // 单体
|
|
|
+ tas_monomer: number;
|
|
|
},
|
|
|
- ],
|
|
|
- legend: {
|
|
|
- data: ['单体', '状态', '分类'],
|
|
|
- top: '10px',
|
|
|
- right: '10px',
|
|
|
- textStyle: {
|
|
|
- color: '#fff',
|
|
|
+ ];
|
|
|
+ // 单体-分部完成比率统计
|
|
|
+ dtbfbl: [
|
|
|
+ {
|
|
|
+ // 标题
|
|
|
+ title: string;
|
|
|
+ // 完成比例
|
|
|
+ value: number;
|
|
|
},
|
|
|
- itemWidth: 20,
|
|
|
- itemHeight: 10,
|
|
|
- icon: 'rect',
|
|
|
- },
|
|
|
- grid: {
|
|
|
- top: '15%',
|
|
|
- left: '3%',
|
|
|
- right: '4%',
|
|
|
- bottom: '3%',
|
|
|
- containLabel: true,
|
|
|
- },
|
|
|
- dataZoom: [
|
|
|
+ ];
|
|
|
+}>();
|
|
|
+
|
|
|
+useRequest(invoke, {
|
|
|
+ defaultParams: [
|
|
|
{
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- start: currentZoom.start,
|
|
|
- end: currentZoom.end,
|
|
|
+ // 固定值
|
|
|
+ interfaceCode: 'BigScreen.progressManagement',
|
|
|
+ // 编号代码
|
|
|
+ projectCode: route.query?.projectCode as string,
|
|
|
},
|
|
|
],
|
|
|
+ onSuccess(res: any) {
|
|
|
+ dataSource.value = res;
|
|
|
+ },
|
|
|
+ pollingInterval: 10000
|
|
|
});
|
|
|
|
|
|
-const startAutoScroll = () => {
|
|
|
- scrollInterval = setInterval(() => {
|
|
|
- if (currentZoom.end >= 100) {
|
|
|
- currentZoom.start = 0;
|
|
|
- currentZoom.end = 50;
|
|
|
- } else {
|
|
|
- currentZoom.start += 2;
|
|
|
- currentZoom.end += 2;
|
|
|
- }
|
|
|
+const config1 = computed(() => {
|
|
|
+ const list = dataSource.value?.wbsfj || [];
|
|
|
+ return {
|
|
|
+ header: ['单体', '当前状态', '所属分类'],
|
|
|
+ data: list.map((item) => [item.tas_monomer, item.tas_state, item.tas_classify]),
|
|
|
+ headerBGC: '#348bc763',
|
|
|
+ evenRowBGC: 'rgba(29, 66, 110, 0.6)',
|
|
|
+ oddRowBGC: 'rgba(52, 139, 199, 0.0980392156862745)',
|
|
|
+ align: ['center'],
|
|
|
+ index: true,
|
|
|
+ columnWidth: [50],
|
|
|
+ rowNum: 6,
|
|
|
+ headerHeight: 35,
|
|
|
+ waitTime: 50005000,
|
|
|
+ };
|
|
|
+});
|
|
|
|
|
|
- chartOptions.value = {
|
|
|
- ...chartOptions.value,
|
|
|
- dataZoom: [
|
|
|
- {
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- start: currentZoom.start,
|
|
|
- end: currentZoom.end,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- }, 2000); // 每2秒更新一次
|
|
|
-};
|
|
|
+const config5 = computed(() => {
|
|
|
+ return {
|
|
|
+ number: [dataSource.value?.xmdjs?.days || 0],
|
|
|
+ content: '{nt}%',
|
|
|
+ };
|
|
|
+});
|
|
|
+
|
|
|
+const config6 = computed(() => {
|
|
|
+ return {
|
|
|
+ number: [dataSource.value?.ac || 0],
|
|
|
+ content: '{nt}',
|
|
|
+ };
|
|
|
+});
|
|
|
+
|
|
|
+let currentZoom = { start: 0, end: 50 };
|
|
|
+
|
|
|
+const config2 = computed(() => {
|
|
|
+ const list = dataSource.value?.cwsfj || [];
|
|
|
+ return {
|
|
|
+ header: ['单体', '当前状态', '所属分类', '预算金额(万元)'],
|
|
|
+ data: list.map((item) => [
|
|
|
+ item.tas_monomer,
|
|
|
+ item.tas_state,
|
|
|
+ item.tas_classify,
|
|
|
+ item.tas_budget_amount,
|
|
|
+ ]),
|
|
|
+ headerBGC: '#348bc763',
|
|
|
+ evenRowBGC: 'rgba(29, 66, 110, 0.6)',
|
|
|
+ oddRowBGC: 'rgba(52, 139, 199, 0.0980392156862745)',
|
|
|
+ align: ['center'],
|
|
|
+ index: true,
|
|
|
+ columnWidth: [50],
|
|
|
+ rowNum: 6,
|
|
|
+ headerHeight: 35,
|
|
|
+ waitTime: 50005000,
|
|
|
+ };
|
|
|
+});
|
|
|
|
|
|
// 右侧顶部柱状图
|
|
|
-let scrollIntervalRightTop: ReturnType<typeof setInterval>;
|
|
|
-let currentZoomeRightTop = { start: 0, end: 50 };
|
|
|
-const chartDataRightTop = ref([30, 50, 70, 90, 60, 80, 100, 120, 140, 160, 180, 200]);
|
|
|
-const chartOptionsRightTop = ref<EChartsOption>({
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- textStyle: { color: '#000' },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: 'value',
|
|
|
- axisLabel: { color: '#fff' },
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'category',
|
|
|
- data: [
|
|
|
- '项目A',
|
|
|
- '项目B',
|
|
|
- '项目C',
|
|
|
- '项目D',
|
|
|
- '项目E',
|
|
|
- '项目F',
|
|
|
- '项目G',
|
|
|
- '项目H',
|
|
|
- '项目I',
|
|
|
- '项目J',
|
|
|
- '项目K',
|
|
|
- '项目L',
|
|
|
- ],
|
|
|
- axisLabel: { color: '#fff' },
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '进度',
|
|
|
- type: 'bar',
|
|
|
- data: chartDataRightTop.value,
|
|
|
- barWidth: 16,
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(42, 254, 255, 1)',
|
|
|
- borderRadius: [4, 4, 4, 4],
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'right',
|
|
|
- color: '#fff',
|
|
|
- fontSize: 10,
|
|
|
- },
|
|
|
+// let scrollIntervalRightTop: ReturnType<typeof setInterval>;
|
|
|
+// let currentZoomeRightTop = { start: 0, end: 50 };
|
|
|
+
|
|
|
+const chartOptionsRightTop = computed((): EChartsOption => {
|
|
|
+ const list = dataSource.value?.dtbfbl || [];
|
|
|
+ return {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ textStyle: { color: '#000' },
|
|
|
},
|
|
|
- ],
|
|
|
- grid: {
|
|
|
- top: '5%',
|
|
|
- left: '3%',
|
|
|
- right: '4%',
|
|
|
- bottom: '3%',
|
|
|
- containLabel: true,
|
|
|
- },
|
|
|
- dataZoom: [
|
|
|
- {
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- yAxisIndex: 0,
|
|
|
- start: currentZoom.start,
|
|
|
- end: currentZoom.end,
|
|
|
+ xAxis: {
|
|
|
+ type: 'value',
|
|
|
+ axisLabel: { color: '#fff' },
|
|
|
},
|
|
|
- ],
|
|
|
+ yAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: list.map((item) => item.title),
|
|
|
+ axisLabel: { color: '#fff' },
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '进度',
|
|
|
+ type: 'bar',
|
|
|
+ data: list.map((item) => item.value),
|
|
|
+ barWidth: 16,
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(42, 254, 255, 1)',
|
|
|
+ borderRadius: [4, 4, 4, 4],
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'right',
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 10,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ grid: {
|
|
|
+ top: '5%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true,
|
|
|
+ },
|
|
|
+ dataZoom: [
|
|
|
+ {
|
|
|
+ show: false,
|
|
|
+ type: 'slider',
|
|
|
+ yAxisIndex: 0,
|
|
|
+ start: currentZoom.start,
|
|
|
+ end: currentZoom.end,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
});
|
|
|
|
|
|
-const startAutoScrollRightTop = () => {
|
|
|
- clearInterval(scrollIntervalRightTop);
|
|
|
- scrollIntervalRightTop = setInterval(() => {
|
|
|
- if (currentZoomeRightTop.end >= 100) {
|
|
|
- currentZoomeRightTop.start = 0;
|
|
|
- currentZoomeRightTop.end = 50;
|
|
|
- } else {
|
|
|
- currentZoomeRightTop.start += 2;
|
|
|
- currentZoomeRightTop.end += 2;
|
|
|
- }
|
|
|
+// const startAutoScrollRightTop = () => {
|
|
|
+// clearInterval(scrollIntervalRightTop);
|
|
|
+// scrollIntervalRightTop = setInterval(() => {
|
|
|
+// if (currentZoomeRightTop.end >= 100) {
|
|
|
+// currentZoomeRightTop.start = 0;
|
|
|
+// currentZoomeRightTop.end = 50;
|
|
|
+// } else {
|
|
|
+// currentZoomeRightTop.start += 2;
|
|
|
+// currentZoomeRightTop.end += 2;
|
|
|
+// }
|
|
|
|
|
|
- chartOptionsRightTop.value = {
|
|
|
- ...chartOptionsRightTop.value,
|
|
|
- dataZoom: [
|
|
|
- {
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- yAxisIndex: 0,
|
|
|
- start: currentZoomeRightTop.start,
|
|
|
- end: currentZoomeRightTop.end,
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- }, 2000);
|
|
|
-};
|
|
|
+// chartOptionsRightTop.value = {
|
|
|
+// ...chartOptionsRightTop.value,
|
|
|
+// dataZoom: [
|
|
|
+// {
|
|
|
+// show: false,
|
|
|
+// type: 'slider',
|
|
|
+// yAxisIndex: 0,
|
|
|
+// start: currentZoomeRightTop.start,
|
|
|
+// end: currentZoomeRightTop.end,
|
|
|
+// },
|
|
|
+// ],
|
|
|
+// };
|
|
|
+// }, 2000);
|
|
|
+// };
|
|
|
|
|
|
// 右侧底部
|
|
|
+// let scrollIntervalRightBottom: ReturnType<typeof setInterval>;
|
|
|
+// let currentZoomeRightBottom = { start: 0, end: 50 };
|
|
|
|
|
|
-let scrollIntervalRightBottom: ReturnType<typeof setInterval>;
|
|
|
-let currentZoomeRightBottom = { start: 0, end: 50 };
|
|
|
-const chartDataRightBottom = ref([30, 50, 70, 90, 60, 80, 100, 120, 140, 160, 180, 200]);
|
|
|
-const chartOptionsRightBottom = ref<EChartsOption>({
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- textStyle: { color: '#000' },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: 'value',
|
|
|
- axisLabel: { color: '#fff' },
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'category',
|
|
|
- data: [
|
|
|
- '项目A',
|
|
|
- '项目B',
|
|
|
- '项目C',
|
|
|
- '项目D',
|
|
|
- '项目E',
|
|
|
- '项目F',
|
|
|
- '项目G',
|
|
|
- '项目H',
|
|
|
- '项目I',
|
|
|
- '项目J',
|
|
|
- '项目K',
|
|
|
- '项目L',
|
|
|
- ],
|
|
|
- axisLabel: { color: '#fff' },
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '进度',
|
|
|
- type: 'bar',
|
|
|
- data: chartDataRightBottom.value,
|
|
|
- barWidth: 16,
|
|
|
- itemStyle: {
|
|
|
- color: 'rgba(42, 254, 255, 1)',
|
|
|
- borderRadius: [4, 4, 4, 4],
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'right',
|
|
|
- color: '#fff',
|
|
|
- fontSize: 10,
|
|
|
- },
|
|
|
+const chartOptionsRightBottom = computed((): EChartsOption => {
|
|
|
+ const list = dataSource.value?.dtbfbl || [];
|
|
|
+ return {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ textStyle: { color: '#000' },
|
|
|
},
|
|
|
- ],
|
|
|
- grid: {
|
|
|
- top: '5%',
|
|
|
- left: '3%',
|
|
|
- right: '4%',
|
|
|
- bottom: '3%',
|
|
|
- containLabel: true,
|
|
|
- },
|
|
|
- dataZoom: [
|
|
|
- {
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- yAxisIndex: 0,
|
|
|
- start: currentZoom.start,
|
|
|
- end: currentZoom.end,
|
|
|
+ xAxis: {
|
|
|
+ type: 'value',
|
|
|
+ axisLabel: { color: '#fff' },
|
|
|
},
|
|
|
- ],
|
|
|
-});
|
|
|
-
|
|
|
-const startAutoScrollRightBottom = () => {
|
|
|
- clearInterval(scrollIntervalRightBottom);
|
|
|
- scrollIntervalRightBottom = setInterval(() => {
|
|
|
- if (currentZoomeRightBottom.end >= 100) {
|
|
|
- currentZoomeRightBottom.start = 0;
|
|
|
- currentZoomeRightBottom.end = 50;
|
|
|
- } else {
|
|
|
- currentZoomeRightBottom.start += 2;
|
|
|
- currentZoomeRightBottom.end += 2;
|
|
|
- }
|
|
|
-
|
|
|
- chartOptionsRightBottom.value = {
|
|
|
- ...chartOptionsRightBottom.value,
|
|
|
- dataZoom: [
|
|
|
- {
|
|
|
- show: false,
|
|
|
- type: 'slider',
|
|
|
- yAxisIndex: 0,
|
|
|
- start: currentZoomeRightBottom.start,
|
|
|
- end: currentZoomeRightBottom.end,
|
|
|
+ yAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: list.map((item) => item.title),
|
|
|
+ axisLabel: { color: '#fff' },
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '进度',
|
|
|
+ type: 'bar',
|
|
|
+ data: list.map((item) => item.value),
|
|
|
+ barWidth: 16,
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(42, 254, 255, 1)',
|
|
|
+ borderRadius: [4, 4, 4, 4],
|
|
|
},
|
|
|
- ],
|
|
|
- };
|
|
|
- }, 2000);
|
|
|
-};
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'right',
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 10,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ grid: {
|
|
|
+ top: '5%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true,
|
|
|
+ },
|
|
|
+ dataZoom: [
|
|
|
+ {
|
|
|
+ show: false,
|
|
|
+ type: 'slider',
|
|
|
+ yAxisIndex: 0,
|
|
|
+ start: currentZoom.start,
|
|
|
+ end: currentZoom.end,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
-// 模拟数据更新
|
|
|
-setInterval(() => {
|
|
|
- chartData.value.plan = chartData.value.plan.map((item) => item + Math.floor(Math.random() * 10));
|
|
|
- chartData.value.actual = chartData.value.actual.map(
|
|
|
- (item) => item + Math.floor(Math.random() * 10),
|
|
|
- );
|
|
|
- chartData.value.actual1 = chartData.value.actual1.map(
|
|
|
- (item) => item + Math.floor(Math.random() * 10),
|
|
|
- );
|
|
|
+// const startAutoScrollRightBottom = () => {
|
|
|
+// clearInterval(scrollIntervalRightBottom);
|
|
|
+// scrollIntervalRightBottom = setInterval(() => {
|
|
|
+// if (currentZoomeRightBottom.end >= 100) {
|
|
|
+// currentZoomeRightBottom.start = 0;
|
|
|
+// currentZoomeRightBottom.end = 50;
|
|
|
+// } else {
|
|
|
+// currentZoomeRightBottom.start += 2;
|
|
|
+// currentZoomeRightBottom.end += 2;
|
|
|
+// }
|
|
|
|
|
|
- chartDataRightTop.value = chartDataRightTop.value.map((v) => v + Math.floor(Math.random() * 10));
|
|
|
- chartDataRightBottom.value = chartDataRightBottom.value.map(
|
|
|
- (v) => v + Math.floor(Math.random() * 10),
|
|
|
- );
|
|
|
-}, 5000); // 每5秒更新一次数据
|
|
|
+// chartOptionsRightBottom.value = {
|
|
|
+// ...chartOptionsRightBottom.value,
|
|
|
+// dataZoom: [
|
|
|
+// {
|
|
|
+// show: false,
|
|
|
+// type: 'slider',
|
|
|
+// yAxisIndex: 0,
|
|
|
+// start: currentZoomeRightBottom.start,
|
|
|
+// end: currentZoomeRightBottom.end,
|
|
|
+// },
|
|
|
+// ],
|
|
|
+// };
|
|
|
+// }, 2000);
|
|
|
+// };
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- startAutoScroll();
|
|
|
- startAutoScrollRightTop();
|
|
|
- startAutoScrollRightBottom();
|
|
|
-});
|
|
|
+// onMounted(() => {
|
|
|
+// startAutoScrollRightTop();
|
|
|
+// startAutoScrollRightBottom();
|
|
|
+// });
|
|
|
|
|
|
const mouseoverHandler = (e: any) => {
|
|
|
console.log(e);
|
|
|
@@ -453,6 +387,11 @@ const mouseoverHandler = (e: any) => {
|
|
|
const clickHandler = (e: any) => {
|
|
|
console.log(e);
|
|
|
};
|
|
|
+
|
|
|
+// onUnmounted(() => {
|
|
|
+// clearInterval(scrollIntervalRightBottom);
|
|
|
+// clearInterval(scrollIntervalRightTop);
|
|
|
+// });
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|