Compare commits
2 Commits
53ac3c438e
...
0fcdb2b349
| Author | SHA1 | Date |
|---|---|---|
|
|
0fcdb2b349 | |
|
|
618e12bb67 |
|
|
@ -79,6 +79,9 @@ import axios from 'axios'
|
|||
import { ElMessage } from 'element-plus'
|
||||
import { EventBus } from '@/utils/eventBus'
|
||||
import { getAppEnvConfig } from '@/utils/env'
|
||||
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||
|
||||
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const props = defineProps({
|
||||
chartConfig: {
|
||||
|
|
@ -111,6 +114,18 @@ const {
|
|||
} = toRefs(props.chartConfig.option)
|
||||
|
||||
|
||||
const chartEditStore = useChartEditStore();
|
||||
const deliveryData = ref();
|
||||
|
||||
const clickBtn = () => {
|
||||
eventHandlerHook(
|
||||
chartEditStore.getComponentList,
|
||||
props.chartConfig.events.interactConfigEvents,
|
||||
'click',
|
||||
deliveryData.value,
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getReceiveGroup()
|
||||
getPeopleList()
|
||||
|
|
@ -192,7 +207,7 @@ const sendClick = ()=>{
|
|||
type: 'success',
|
||||
})
|
||||
|
||||
props.chartConfig.status.hide = true;
|
||||
clickBtn();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.data.message,
|
||||
|
|
|
|||
|
|
@ -47,11 +47,13 @@
|
|||
const { w, h } = toRefs(props.chartConfig.attr);
|
||||
|
||||
const option = reactive({
|
||||
dataset: props.chartConfig.option.dataset,
|
||||
// dataset: props.chartConfig.option.dataset,
|
||||
dataStyle: props.chartConfig.option.dataStyle,
|
||||
status: props.chartConfig.status,
|
||||
});
|
||||
|
||||
|
||||
|
||||
watch(
|
||||
() => option.dataStyle.width,
|
||||
() => {
|
||||
|
|
@ -99,8 +101,14 @@
|
|||
};
|
||||
|
||||
// 数据callback处理(预览时触发)
|
||||
// useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
|
||||
// option.dataset = resData;
|
||||
// });
|
||||
|
||||
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
|
||||
props.chartConfig.option.dataset = resData;
|
||||
option.dataset = resData;
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue