@@ -103,15 +103,14 @@
const option = reactive({
dataset: props.chartConfig.option.dataset,
dataStyle: props.chartConfig.option.dataStyle,
- buttonStyle: props.chartConfig.option.buttonStyle,
});
diff --git a/src/packages/components/Zhigan/Zhigan/WeiXingYaoGan/index.vue b/src/packages/components/Zhigan/Zhigan/WeiXingYaoGan/index.vue
index a29df54..181d672 100644
--- a/src/packages/components/Zhigan/Zhigan/WeiXingYaoGan/index.vue
+++ b/src/packages/components/Zhigan/Zhigan/WeiXingYaoGan/index.vue
@@ -1,7 +1,7 @@
-
+
{
+ eventHandlerHook(
+ chartEditStore.getComponentList,
+ props.chartConfig.events.interactConfigEvents,
+ 'click',
+ val,
+ );
+ };
diff --git a/src/views/chart/ContentConfigurations/components/hooks/eventData.hook.ts b/src/views/chart/ContentConfigurations/components/hooks/eventData.hook.ts
index c86e1b9..c557e92 100644
--- a/src/views/chart/ContentConfigurations/components/hooks/eventData.hook.ts
+++ b/src/views/chart/ContentConfigurations/components/hooks/eventData.hook.ts
@@ -45,4 +45,8 @@ export const movementTypeOptions: EventOptionsItemType[] = [
label: '地图联动',
value: 'map',
},
+ {
+ label: '组件通信',
+ value: 'communication',
+ },
];
diff --git a/src/views/chart/hooks/useContextMenu.hook.ts b/src/views/chart/hooks/useContextMenu.hook.ts
index 8aaeaea..a675dce 100644
--- a/src/views/chart/hooks/useContextMenu.hook.ts
+++ b/src/views/chart/hooks/useContextMenu.hook.ts
@@ -36,6 +36,9 @@ export const divider = (n: number = 3) => {
key: `d${n}`,
};
};
+const saveGroup = () => {
+ chartEditStore.setSaveGroupImgShow(true);
+};
// * 默认单组件选项
export const defaultOptions: MenuOptionsItemType[] = [
@@ -133,7 +136,8 @@ export const defaultOptions: MenuOptionsItemType[] = [
label: '保存至分组',
key: MenuEnum.SAVETOGROUP,
icon: renderIcon(GridIcon),
- fnHandle: chartEditStore.saveToGroup,
+ // fnHandle: chartEditStore.saveToGroup,
+ fnHandle: saveGroup,
},
];
diff --git a/src/views/chart/index.vue b/src/views/chart/index.vue
index 7424b3e..64de446 100644
--- a/src/views/chart/index.vue
+++ b/src/views/chart/index.vue
@@ -37,6 +37,59 @@
>
+
+
+
+
+ 上传组件预览图
+
+
+
+
+
+
+
+
+ 上传多组合组件预览图
+
+
+
+
+
+
+
+
+
+
+ 说明
+
+ 上传多组合组件预览图
+
+
+
+ 取消
+ 保存
+
+
+
+
+
@@ -46,10 +99,18 @@
import { useContextMenu } from './hooks/useContextMenu.hook';
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore';
- import { useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'
- import { NConfigProvider } from 'naive-ui'
+ import { useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks';
+ import { NConfigProvider } from 'naive-ui';
+ import { icon } from '@/plugins';
+ import { ref } from 'vue';
+ import { useGlobSetting } from '@/hooks/setting';
+ import { uploadFile } from '@/api/demo/files';
+
+ const { apiUrl } = useGlobSetting();
+ const uploadFileUrl = apiUrl + '/api/Files/Upload';
+ const { DocumentTextIcon } = icon.ionicons5;
// 暗黑主题
- const darkNTheme = useDarkThemeHook()
+ const darkNTheme = useDarkThemeHook();
const chartHistoryStoreStore = useChartHistoryStore();
const chartEditStore = useChartEditStore();
@@ -85,6 +146,35 @@
},
{ passive: false },
);
+ const previewFileList = ref([]);
+ // 关闭弹窗
+ const closeModel = () => {
+ chartEditStore.setSaveGroupImgShow(false);
+ };
+ const filePath = ref();
+ // 保存多组合组件
+ const saveCopyData = () => {
+ if (!filePath.value) {
+ window['$message'].warning('预览图不能为空');
+ return;
+ }
+ chartEditStore.saveToGroup(filePath.value);
+ closeModel();
+ };
+ const beforeUpload = async (options) => {
+ const Loading = window['$loading'];
+ Loading && Loading.start();
+ let uploadParams = new FormData();
+ uploadParams.append('files', options.file.file);
+ const uploadRes = await uploadFile(uploadParams);
+ if (uploadRes.length > 0) {
+ window['$message'].success('上传成功!');
+ filePath.value = uploadRes[0].filePath;
+ Loading && Loading.finish();
+ } else {
+ window['$message'].error('上传失败!');
+ }
+ };