|
|
@ -7,7 +7,12 @@ |
|
|
import { analyzeChartData } from "@/api/chart/index"; |
|
|
import { analyzeChartData } from "@/api/chart/index"; |
|
|
import { echatsViews } from "@/api/DesignForm/types"; |
|
|
import { echatsViews } from "@/api/DesignForm/types"; |
|
|
import * as echarts from "echarts"; |
|
|
import * as echarts from "echarts"; |
|
|
|
|
|
import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; |
|
|
|
|
|
const store = useDesignEchartsStore() as any; //自定义表单存储器 |
|
|
|
|
|
//获取当前激活的项目 |
|
|
|
|
|
const controlData = computed(() => { |
|
|
|
|
|
return store.controlAttr; |
|
|
|
|
|
}); |
|
|
const props = withDefaults( |
|
|
const props = withDefaults( |
|
|
defineProps<{ |
|
|
defineProps<{ |
|
|
uuid: string; |
|
|
uuid: string; |
|
|
@ -29,10 +34,14 @@ var myChart = ref<any>(); |
|
|
@ 时间: 2025-06-26 11:34:21 |
|
|
@ 时间: 2025-06-26 11:34:21 |
|
|
@ 功能: 画图 |
|
|
@ 功能: 画图 |
|
|
*/ |
|
|
*/ |
|
|
const drawPictures = () => { |
|
|
const drawBarracetures = () => { |
|
|
if (props.uuid && props.uuid != "") { |
|
|
if (props.uuid && props.uuid != "") { |
|
|
myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); |
|
|
myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); |
|
|
analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { |
|
|
analyzeChartData({ |
|
|
|
|
|
tableKey: props.tableKey, |
|
|
|
|
|
chartId: props.uuid, |
|
|
|
|
|
setConfig: props.data, |
|
|
|
|
|
}).then((data) => { |
|
|
console.log("画图排行榜---->1", data); |
|
|
console.log("画图排行榜---->1", data); |
|
|
if (data.code == 0 && data.data != null) { |
|
|
if (data.code == 0 && data.data != null) { |
|
|
let radMap = data.data; |
|
|
let radMap = data.data; |
|
|
@ -131,10 +140,17 @@ const searBut = (val: string) => { |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |
|
|
}; |
|
|
}; |
|
|
|
|
|
watch( |
|
|
|
|
|
() => props.data, |
|
|
|
|
|
(val: any) => { |
|
|
|
|
|
console.log("画图完毕--改变-->", val); |
|
|
|
|
|
drawBarracetures(); |
|
|
|
|
|
}, |
|
|
|
|
|
{ deep: true } |
|
|
|
|
|
); |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
drawPictures(); |
|
|
drawBarracetures(); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|