|
@@ -23,7 +23,7 @@
|
|
|
import { ref, onMounted, watch, computed, defineAsyncComponent } from "vue";
|
|
|
import dayjs from "dayjs";
|
|
|
import { loadingOptions } from "@/utils/constants";
|
|
|
-import { lawArea, rightBottomData } from "api/judicial";
|
|
|
+import { lawArea } from "api/judicial";
|
|
|
import mittBus from "@/utils/mitt";
|
|
|
|
|
|
const Empty = defineAsyncComponent(
|
|
@@ -51,12 +51,7 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
-const activeIndex = ref(0);
|
|
|
const option = ref<any>({});
|
|
|
-const activeText = computed(() => {
|
|
|
- return activeIndex.value === 0 ? "来源占比" : "类型占比";
|
|
|
-});
|
|
|
-
|
|
|
const dataList = ref([]);
|
|
|
const loading = ref(false);
|
|
|
const AreaCode = ref(null);
|
|
@@ -68,7 +63,7 @@ const getData = async () => {
|
|
|
EndTime: dayjs(date.value[1]).format("YYYY-MM-DD"),
|
|
|
AreaCode: AreaCode.value,
|
|
|
});
|
|
|
- const resultData = [
|
|
|
+ /* const result = [
|
|
|
{
|
|
|
industryName: "教育体育",
|
|
|
rate: 5,
|
|
@@ -119,11 +114,11 @@ const getData = async () => {
|
|
|
rate: 50,
|
|
|
count: 100,
|
|
|
},
|
|
|
- ];
|
|
|
- const legendData = resultData
|
|
|
+ ];*/
|
|
|
+ const legendData = result
|
|
|
.map((item: any) => item.industryName)
|
|
|
.filter((item: any) => item);
|
|
|
- dataList.value = resultData
|
|
|
+ dataList.value = result
|
|
|
.map((item: any) => {
|
|
|
return {
|
|
|
name: item.industryName ?? "",
|
|
@@ -173,10 +168,8 @@ const setOption = (legendData: any, data: any) => {
|
|
|
label: {
|
|
|
show: true,
|
|
|
color: "#fff",
|
|
|
- position: "outside", // 标签在外部显示
|
|
|
formatter: "{b}: {c} ({d}%)", // 格式化标签内容
|
|
|
avoidLabelOverlap: true, // 自动调整标签位置,避免重叠
|
|
|
- overflow: "break", // 允许文字换行
|
|
|
},
|
|
|
roam: true, // 允许图表缩放和平移
|
|
|
data: data,
|