From 1551aa9ded2845865383ea05831ced66fc059728 Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Mon, 29 May 2023 10:29:44 +0800 Subject: [PATCH 01/30] =?UTF-8?q?fix:=20=E8=AF=AD=E8=A8=80=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=E8=8B=B1=E6=96=87=E5=90=8E=EF=BC=8C=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=8C=89=E9=92=AE=E7=9A=84=E8=8B=B1=E6=96=87=E6=8B=BC?= =?UTF-8?q?=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en/project.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/en/project.ts b/src/i18n/en/project.ts index 3b7d367b..6695cd5e 100644 --- a/src/i18n/en/project.ts +++ b/src/i18n/en/project.ts @@ -1,5 +1,5 @@ export default { - create_btn: 'Creat', + create_btn: 'Create', create_tip: 'Please select a content for development', project: 'Project', my: 'My', From 37676176e7445df4efaa364f52b6a24c79913062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Tue, 30 May 2023 09:34:54 +0800 Subject: [PATCH 02/30] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=AD=98=E5=82=A8=E6=95=B0=E6=8D=AE=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/utils.ts | 20 ++++++++++++++++++++ src/views/chart/ContentEdit/index.vue | 14 ++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 4a1b19e4..16ba9431 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -330,3 +330,23 @@ export const JSONParse = (data: string) => { export const setTitle = (title?: string) => { title && (document.title = title) } + +/** + * 处理网页关闭事件 + */ +export const addWindowUnload = () => { + // 关闭网页出现离开提示 + window.onbeforeunload = function (e) { + e = e || window.event + // 兼容IE8和Firefox 4之前的版本 + if (e) { + e.returnValue = '您确定要离开当前页面吗?请确认是否保存数据!' + } + // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+ + return '您确定要离开当前页面吗?请确认是否保存数据!' + } + // 返回销毁事件函数 + return () => { + window.onbeforeunload = null + } +} \ No newline at end of file diff --git a/src/views/chart/ContentEdit/index.vue b/src/views/chart/ContentEdit/index.vue index a003398f..60de3a08 100644 --- a/src/views/chart/ContentEdit/index.vue +++ b/src/views/chart/ContentEdit/index.vue @@ -87,7 +87,14 @@ import { onMounted, computed, provide } from 'vue' import { chartColors } from '@/settings/chartThemes/index' import { MenuEnum } from '@/enums/editPageEnum' import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d' -import { animationsClass, getFilterStyle, getTransformStyle, getBlendModeStyle, colorCustomMerge } from '@/utils' +import { + animationsClass, + getFilterStyle, + getTransformStyle, + getBlendModeStyle, + colorCustomMerge, + addWindowUnload +} from '@/utils' import { useContextMenu } from '@/views/chart/hooks/useContextMenu.hook' import { MenuOptionsItemType } from '@/views/chart/hooks/useContextMenu.hook.d' import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' @@ -110,6 +117,9 @@ const chartEditStore = useChartEditStore() const { handleContextMenu } = useContextMenu() const { dataSyncFetch, intervalDataSyncUpdate } = useSync() +// 加入网页关闭提示 +addWindowUnload() + // 编辑时注入scale变量,消除警告 provide(SCALE_KEY, null) @@ -186,7 +196,7 @@ onMounted(() => { // 获取数据 dataSyncFetch() // 定时更新数据 - intervalDataSyncUpdate() + // intervalDataSyncUpdate() }) From d6afc50ac57347c252c62f33b815dfc005f14f9c Mon Sep 17 00:00:00 2001 From: lyx Date: Fri, 2 Jun 2023 17:29:18 +0800 Subject: [PATCH 03/30] =?UTF-8?q?feat:=E6=A0=87=E7=AD=BE=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Informations/Inputs/InputsTab/config.vue | 5 ++++- .../components/Informations/Inputs/InputsTab/index.vue | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/packages/components/Informations/Inputs/InputsTab/config.vue b/src/packages/components/Informations/Inputs/InputsTab/config.vue index 39d9cad5..c6e8c7c9 100644 --- a/src/packages/components/Informations/Inputs/InputsTab/config.vue +++ b/src/packages/components/Informations/Inputs/InputsTab/config.vue @@ -1,8 +1,11 @@ diff --git a/src/packages/components/Informations/Inputs/InputsTab/index.vue b/src/packages/components/Informations/Inputs/InputsTab/index.vue index d75bde97..90107ee0 100644 --- a/src/packages/components/Informations/Inputs/InputsTab/index.vue +++ b/src/packages/components/Informations/Inputs/InputsTab/index.vue @@ -1,5 +1,5 @@ @@ -12,6 +12,7 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore import { useChartInteract } from '@/hooks' import { InteractEventOn } from '@/enums/eventEnum' import { ComponentInteractParamsEnum } from './interact' +import { changeURLStatic } from '@/utils/changeURLParam' const props = defineProps({ chartConfig: { @@ -29,6 +30,9 @@ const option = shallowReactive({ const onChange = (v: string) => { if (v === undefined) return const selectItem = option.value.dataset.find((item: { label: string; value: any }) => item.label === v) + const { chartConfig } = props + const key = chartConfig.chartConfig.title || chartConfig.id; + changeURLStatic(key, selectItem.value) // 存储到联动数据 useChartInteract( props.chartConfig, From 18e0729e54d2b8227717a503f35bf99782143cc1 Mon Sep 17 00:00:00 2001 From: lyx Date: Mon, 5 Jun 2023 18:06:57 +0800 Subject: [PATCH 04/30] =?UTF-8?q?fix:=E6=A0=87=E7=AD=BE=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Informations/Inputs/InputsTab/index.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/packages/components/Informations/Inputs/InputsTab/index.vue b/src/packages/components/Informations/Inputs/InputsTab/index.vue index 90107ee0..a02900b9 100644 --- a/src/packages/components/Informations/Inputs/InputsTab/index.vue +++ b/src/packages/components/Informations/Inputs/InputsTab/index.vue @@ -12,7 +12,6 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore import { useChartInteract } from '@/hooks' import { InteractEventOn } from '@/enums/eventEnum' import { ComponentInteractParamsEnum } from './interact' -import { changeURLStatic } from '@/utils/changeURLParam' const props = defineProps({ chartConfig: { @@ -30,9 +29,6 @@ const option = shallowReactive({ const onChange = (v: string) => { if (v === undefined) return const selectItem = option.value.dataset.find((item: { label: string; value: any }) => item.label === v) - const { chartConfig } = props - const key = chartConfig.chartConfig.title || chartConfig.id; - changeURLStatic(key, selectItem.value) // 存储到联动数据 useChartInteract( props.chartConfig, From cbd629d7f80470ce29e39375e19370e8e9b3f4e7 Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:00:06 +0800 Subject: [PATCH 05/30] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E7=BB=84=E4=BB=B6=E6=9B=B4=E6=96=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useChartDataFetch.hook.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/hooks/useChartDataFetch.hook.ts b/src/hooks/useChartDataFetch.hook.ts index c39cc34e..91271e8d 100644 --- a/src/hooks/useChartDataFetch.hook.ts +++ b/src/hooks/useChartDataFetch.hook.ts @@ -90,12 +90,12 @@ export const useChartDataFetch = ( // 普通初始化与组件交互处理监听 watch( - () => targetComponent.request, + () => targetComponent.request.requestParams, () => { fetchFn() }, { - immediate: true, + immediate: false, deep: true } ) @@ -105,7 +105,11 @@ export const useChartDataFetch = ( // 单位 const unit = targetInterval && targetInterval.value ? targetUnit.value : globalUnit.value // 开启轮询 - if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit)) + if (time) { + fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit)) + } else { + fetchFn() + } } // eslint-disable-next-line no-empty } catch (error) { @@ -114,10 +118,11 @@ export const useChartDataFetch = ( } if (isPreview()) { - // 判断是否是数据池类型 targetComponent.request.requestDataType === RequestDataTypeEnum.Pond ? addGlobalDataInterface(targetComponent, useChartEditStore, updateCallback || echartsUpdateHandle) : requestIntervalFn() + } else { + requestIntervalFn() } return { vChartRef } } From 20fa9e4afe262f90d8f8765d2cafbf297566622d Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:00:28 +0800 Subject: [PATCH 06/30] fix: declare module '@iconify/vue' --- types/shims-vue.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/shims-vue.d.ts b/types/shims-vue.d.ts index fbfc8922..fa19c5db 100644 --- a/types/shims-vue.d.ts +++ b/types/shims-vue.d.ts @@ -5,4 +5,5 @@ declare module '*.vue' { } declare module 'lodash/*' -declare module 'dom-helpers' \ No newline at end of file +declare module 'dom-helpers' +declare module '@iconify/vue' \ No newline at end of file From 9485931f5d43f9b6ea24174e89bce0af27e9bf5f Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:03:59 +0800 Subject: [PATCH 07/30] =?UTF-8?q?feat:=20=20=E6=9B=B4=E6=96=B0=E5=85=AC?= =?UTF-8?q?=E5=85=B1api=E5=AF=B9=E7=BB=84=E4=BB=B6=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useChartDataPondFetch.hook.ts | 39 +++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/hooks/useChartDataPondFetch.hook.ts b/src/hooks/useChartDataPondFetch.hook.ts index 24ac7660..a506f274 100644 --- a/src/hooks/useChartDataPondFetch.hook.ts +++ b/src/hooks/useChartDataPondFetch.hook.ts @@ -1,4 +1,4 @@ -import { toRaw } from 'vue' +import { toRaw, watch, computed, ComputedRef } from 'vue' import { customizeHttp } from '@/api/http' import { CreateComponentType } from '@/packages/index.d' import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' @@ -20,7 +20,7 @@ const mittDataPondMap = new Map() // 创建单个数据项轮询接口 const newPondItemInterval = ( requestGlobalConfig: RequestGlobalConfigType, - requestDataPondItem: RequestDataPondItemType, + requestDataPondItem: ComputedRef, dataPondMapItem?: DataPondMapType[] ) => { if (!dataPondMapItem) return @@ -31,8 +31,7 @@ const newPondItemInterval = ( // 请求 const fetchFn = async () => { try { - const res = await customizeHttp(toRaw(requestDataPondItem.dataPondRequestConfig), toRaw(requestGlobalConfig)) - + const res = await customizeHttp(toRaw(requestDataPondItem.value.dataPondRequestConfig), toRaw(requestGlobalConfig)) if (res) { try { // 遍历更新回调函数 @@ -49,19 +48,32 @@ const newPondItemInterval = ( } } + watch( + () => requestDataPondItem.value.dataPondRequestConfig.requestParams.Params, + () => { + fetchFn() + }, + { + immediate: false, + deep: true + } + ) + + // 立即调用 fetchFn() - const targetInterval = requestDataPondItem.dataPondRequestConfig.requestInterval - const targetUnit = requestDataPondItem.dataPondRequestConfig.requestIntervalUnit + + const targetInterval = requestDataPondItem.value.dataPondRequestConfig.requestInterval + const targetUnit = requestDataPondItem.value.dataPondRequestConfig.requestIntervalUnit const globalRequestInterval = requestGlobalConfig.requestInterval const globalUnit = requestGlobalConfig.requestIntervalUnit // 定时时间 - const time = targetInterval ? targetInterval : globalRequestInterval + const time = targetInterval ? targetInterval : globalRequestInterval // 单位 - const unit = targetInterval ? targetUnit : globalUnit + const unit = targetInterval ? targetUnit : globalUnit // 开启轮询 if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit)) } @@ -96,13 +108,16 @@ export const useChartDataPondFetch = () => { } // 初始化数据池 - const initDataPond = (requestGlobalConfig: RequestGlobalConfigType) => { - const { requestDataPond } = requestGlobalConfig + const initDataPond = (useChartEditStore: ChartEditStoreType) => { + const { requestGlobalConfig } = useChartEditStore() + const chartEditStore = useChartEditStore() // 根据 mapId 查找对应的数据池配置 for (let pondKey of mittDataPondMap.keys()) { - const requestDataPondItem = requestDataPond.find(item => item.dataPondId === pondKey) + const requestDataPondItem = computed(() => { + return requestGlobalConfig.requestDataPond.find(item => item.dataPondId === pondKey) + }) as ComputedRef if (requestDataPondItem) { - newPondItemInterval(requestGlobalConfig, requestDataPondItem, mittDataPondMap.get(pondKey)) + newPondItemInterval(chartEditStore.requestGlobalConfig, requestDataPondItem, mittDataPondMap.get(pondKey)) } } } From 47636ee6803a2e3b15ddbc1f8f1a851eeaf9950b Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:06:51 +0800 Subject: [PATCH 08/30] =?UTF-8?q?feat:=20=20=E6=94=AF=E6=8C=81=E5=AF=B9?= =?UTF-8?q?=E5=85=AC=E5=85=B1api=E8=BF=9B=E8=A1=8C=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useChartInteract.hook.ts | 43 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/src/hooks/useChartInteract.hook.ts b/src/hooks/useChartInteract.hook.ts index efa2ae73..aa0b1ed6 100644 --- a/src/hooks/useChartInteract.hook.ts +++ b/src/hooks/useChartInteract.hook.ts @@ -1,4 +1,5 @@ import { toRefs } from 'vue' +import { isPreview } from '@/utils' import { CreateComponentType } from '@/packages/index.d' import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' @@ -12,6 +13,7 @@ export const useChartInteract = ( param: { [T: string]: any }, interactEventOn: string ) => { + if (!isPreview()) return const chartEditStore = useChartEditStore() const { interactEvents } = chartConfig.events const fnOnEvent = interactEvents.filter(item => { @@ -20,20 +22,37 @@ export const useChartInteract = ( if (fnOnEvent.length === 0) return fnOnEvent.forEach(item => { - const index = chartEditStore.fetchTargetIndex(item.interactComponentId) - if (index === -1) return - const { Params, Header } = toRefs(chartEditStore.componentList[index].request.requestParams) - Object.keys(item.interactFn).forEach(key => { - if (Params.value[key]) { - Params.value[key] = param[item.interactFn[key]] - } - if (Header.value[key]) { - Header.value[key] = param[item.interactFn[key]] - } - }) + + const globalConfigPindAprndex = chartEditStore.requestGlobalConfig.requestDataPond.findIndex(cItem => + cItem.dataPondId === item.interactComponentId + ) + if (globalConfigPindAprndex !== -1) { + const { Params, Header } = toRefs(chartEditStore.requestGlobalConfig.requestDataPond[globalConfigPindAprndex].dataPondRequestConfig.requestParams) + + Object.keys(item.interactFn).forEach(key => { + if (Params.value[key]) { + Params.value[key] = param[item.interactFn[key]] + } + if (Header.value[key]) { + Header.value[key] = param[item.interactFn[key]] + } + }) + } else { + const index = chartEditStore.fetchTargetIndex(item.interactComponentId) + if (index === -1) return + const { Params, Header } = toRefs(chartEditStore.componentList[index].request.requestParams) + + Object.keys(item.interactFn).forEach(key => { + if (Params.value[key]) { + Params.value[key] = param[item.interactFn[key]] + } + if (Header.value[key]) { + Header.value[key] = param[item.interactFn[key]] + } + }) + } }) } - // 联动事件触发的 type 变更时,清除当前绑定内容 export const clearInteractEvent = (chartConfig: CreateComponentType) => { From 86910de3b284267fafdbe2b7501626081252f8fc Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:08:52 +0800 Subject: [PATCH 09/30] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/preview/components/PreviewRenderList/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/preview/components/PreviewRenderList/index.vue b/src/views/preview/components/PreviewRenderList/index.vue index f685f983..07675175 100644 --- a/src/views/preview/components/PreviewRenderList/index.vue +++ b/src/views/preview/components/PreviewRenderList/index.vue @@ -74,7 +74,7 @@ const themeColor = computed(() => { // 组件渲染结束初始化数据池 clearMittDataPondMap() onMounted(() => { - initDataPond(chartEditStore.requestGlobalConfig) + initDataPond(useChartEditStore) }) From d74645d7b039a96b3834a3a8bedf74e72f9a3979 Mon Sep 17 00:00:00 2001 From: Ming <739803697@qq.com> Date: Wed, 7 Jun 2023 15:13:48 +0800 Subject: [PATCH 10/30] =?UTF-8?q?feat:=20=E7=BB=84=E4=BB=B6=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E5=AF=B9=E5=85=AC=E5=85=B1api=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChartEventInteraction/index.vue | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue b/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue index b5a74bd4..614b3d15 100644 --- a/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue @@ -58,7 +58,7 @@ - 不支持「静态组件」 + 不支持「静态组件」支持「组件」「公共APi」 - 关联目标组件请求参数 + 关联目标请求参数 { // 绑定组件数据 request const fnGetRequest = (id: string | undefined, key: RequestParamsTypeEnum) => { if (!id) return {} + const globalConfigPindApr = chartEditStore.requestGlobalConfig.requestDataPond.find(item => { + return item.dataPondId === id + })?.dataPondRequestConfig.requestParams + + if (globalConfigPindApr) return globalConfigPindApr[key] return chartEditStore.componentList[chartEditStore.fetchTargetIndex(id)]?.request.requestParams[key] } @@ -178,12 +183,10 @@ const fnEventsOptions = (): Array => { iter: Array, val: CreateComponentType | CreateComponentGroupType ) => { - if (val.groupList && val.groupList.length > 0) { - iter.push(val) - } else { + if (!val.groupList && val.request.requestDataType === RequestDataTypeEnum.AJAX && val.request.requestUrl) { iter.push(val) } - return val.groupList ? [...iter, ...fnFlattern(val.groupList)] : iter + return val.groupList && val.groupList.length > 0 ? [...iter, ...fnFlattern(val.groupList)] : iter }, [] ) @@ -203,18 +206,26 @@ const fnEventsOptions = (): Array => { const mapOptionList = filterOptionList.map(item => ({ id: item.id, title: item.chartConfig.title, - disabled: false + disabled: false, + type: 'componentList' })) + const requestDataPond = chartEditStore.requestGlobalConfig.requestDataPond.map(item => ({ + id: item.dataPondId, + title: item.dataPondName, + disabled: false, + type: 'requestDataPond' + })) + const tarArr = requestDataPond.concat(mapOptionList) targetData.value.events.interactEvents?.forEach(iaItem => { - mapOptionList.forEach(optionItem => { + tarArr.forEach(optionItem => { if (optionItem.id === iaItem.interactComponentId) { optionItem.disabled = true } }) }) - return mapOptionList + return tarArr } // 新增模块 From c70d54c6221df06586536fff813b05a5f4fd7f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Thu, 8 Jun 2023 16:39:18 +0800 Subject: [PATCH 11/30] =?UTF-8?q?style:=20=E5=88=A0=E9=99=A4=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/http.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api/http.ts b/src/api/http.ts index 0588049d..5da44856 100644 --- a/src/api/http.ts +++ b/src/api/http.ts @@ -163,7 +163,6 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req params = translateStr(params) // form 类型处理 let formData: FormData = new FormData() - formData.set('default', 'defaultData') // 类型处理 switch (requestParamsBodyType) { From 27e2e2c68d0d78b90d759de10b245eadf904504c Mon Sep 17 00:00:00 2001 From: lyx Date: Fri, 9 Jun 2023 10:56:36 +0800 Subject: [PATCH 12/30] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=B2=A1=E6=9C=89legend=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5settting=20color=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pages/ChartItemSetting/GlobalSetting.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Pages/ChartItemSetting/GlobalSetting.vue b/src/components/Pages/ChartItemSetting/GlobalSetting.vue index 81f9d3d7..68e3fb00 100644 --- a/src/components/Pages/ChartItemSetting/GlobalSetting.vue +++ b/src/components/Pages/ChartItemSetting/GlobalSetting.vue @@ -391,8 +391,12 @@ const visualMap = computed(() => { // 监听legend color颜色改变type = scroll的颜色 watch(() => legend.value && legend.value.textStyle.color, (newVal) => { if (legend.value && newVal) { - legend.value.pageTextStyle.color = newVal - } + if (!legend.value.pageTextStyle) { + legend.value.pageTextStyle = { color: newVal } + } else { + legend.value.pageTextStyle.color = newVal + } + } }, { immediate: true, deep: true, From 1ef6d9797abe3755c3ba50f59c492cc71458bf6f Mon Sep 17 00:00:00 2001 From: tnt group Date: Tue, 13 Jun 2023 10:27:08 +0800 Subject: [PATCH 13/30] =?UTF-8?q?feat:=20=E7=8E=AF=E5=BD=A2=E9=A5=BC?= =?UTF-8?q?=E5=9B=BE=E5=A2=9E=E5=8A=A0=E8=BD=A8=E9=81=93=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Charts/Pies/PieCircle/config.vue | 45 ++++++++++++------- .../Charts/Pies/PieCircle/index.vue | 4 +- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/packages/components/Charts/Pies/PieCircle/config.vue b/src/packages/components/Charts/Pies/PieCircle/config.vue index a3206946..38329dbc 100644 --- a/src/packages/components/Charts/Pies/PieCircle/config.vue +++ b/src/packages/components/Charts/Pies/PieCircle/config.vue @@ -7,6 +7,22 @@ + + + + + + + + + + @@ -31,24 +47,8 @@ > - - - - - - - - - - - + @@ -69,6 +69,17 @@ v-model:value="item.data[1].itemStyle.shadowColor" > + + + diff --git a/src/packages/components/Charts/Pies/PieCircle/index.vue b/src/packages/components/Charts/Pies/PieCircle/index.vue index 26bda2a7..bf6250cd 100644 --- a/src/packages/components/Charts/Pies/PieCircle/index.vue +++ b/src/packages/components/Charts/Pies/PieCircle/index.vue @@ -41,7 +41,7 @@ const option = reactive({ const dataHandle = (newData: any) => { const d = parseFloat(`${newData}`) * 100 let config = props.chartConfig.option - config.title.text = d.toFixed(2) + '%' + config.title.text = `${+d.toFixed(2)}%` config.series[0].data[0].value[0] = d config.series[0].data[1].value[0] = 100 - d option.value = mergeTheme(props.chartConfig.option, props.themeSetting, includes) @@ -68,7 +68,7 @@ watch( useChartDataFetch(props.chartConfig, useChartEditStore, (resData: number) => { let d = parseFloat(`${resData}`) * 100 // @ts-ignore - option.value.title.text = d.toFixed(2) + '%' + option.value.title.text = `${+d.toFixed(2)}%` // @ts-ignore option.value.series[0].data[0].value[0] = d // @ts-ignore From fe37435f791a63f1db41887147fe966da6b83590 Mon Sep 17 00:00:00 2001 From: tnt group Date: Wed, 14 Jun 2023 07:54:36 +0800 Subject: [PATCH 14/30] =?UTF-8?q?chore:=20=E8=AE=BE=E7=BD=AE=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A1=86size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/components/Charts/Pies/PieCircle/config.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packages/components/Charts/Pies/PieCircle/config.vue b/src/packages/components/Charts/Pies/PieCircle/config.vue index 38329dbc..f343aa23 100644 --- a/src/packages/components/Charts/Pies/PieCircle/config.vue +++ b/src/packages/components/Charts/Pies/PieCircle/config.vue @@ -72,6 +72,7 @@ - + + + + diff --git a/src/packages/components/Informations/Inputs/InputsTab/index.vue b/src/packages/components/Informations/Inputs/InputsTab/index.vue index d75bde97..a02900b9 100644 --- a/src/packages/components/Informations/Inputs/InputsTab/index.vue +++ b/src/packages/components/Informations/Inputs/InputsTab/index.vue @@ -1,5 +1,5 @@ From 80f06afa02478c305108ca2e25c8ca32a0341a23 Mon Sep 17 00:00:00 2001 From: dingxs Date: Mon, 19 Jun 2023 14:35:17 +0800 Subject: [PATCH 17/30] =?UTF-8?q?feat:=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Informations/Inputs/InputsDate/config.ts | 13 +- .../Informations/Inputs/InputsDate/config.vue | 135 ++++++++++++++++-- .../Informations/Inputs/InputsDate/index.vue | 135 ++++++++++++------ .../Inputs/InputsDate/interact.ts | 31 ++++ 4 files changed, 255 insertions(+), 59 deletions(-) mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/config.ts mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/config.vue mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/index.vue mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/interact.ts diff --git a/src/packages/components/Informations/Inputs/InputsDate/config.ts b/src/packages/components/Informations/Inputs/InputsDate/config.ts old mode 100644 new mode 100755 index e8f1d233..02b639c6 --- a/src/packages/components/Informations/Inputs/InputsDate/config.ts +++ b/src/packages/components/Informations/Inputs/InputsDate/config.ts @@ -4,7 +4,7 @@ import { PublicConfigClass } from '@/packages/public' import { CreateComponentType } from '@/packages/index.d' import { chartInitConfig } from '@/settings/designSetting' import { COMPONENT_INTERACT_EVENT_KET } from '@/enums/eventEnum' -import { interactActions, ComponentInteractEventEnum } from './interact' +import { interactActions, ComponentInteractEventEnum, DefaultTypeEnum, DifferUnitEnum } from './interact' import { InputsDateConfig } from './index' export const option = { @@ -12,9 +12,14 @@ export const option = { [COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATE, // 下拉展示 isPanel: 0, - dataset: dayjs().valueOf(), - differValue: 0 - + // 默认值 + dataset: dayjs().valueOf() as number | number[] | null, + // 默认值类型 + defaultType: DefaultTypeEnum.STATIC, + // 动态默认值偏移单位 + differUnit: [DifferUnitEnum.DAY, DifferUnitEnum.DAY], + // 动态默认值偏移值 + differValue: [0, 0] } export default class Config extends PublicConfigClass implements CreateComponentType { diff --git a/src/packages/components/Informations/Inputs/InputsDate/config.vue b/src/packages/components/Informations/Inputs/InputsDate/config.vue old mode 100644 new mode 100755 index 0d806518..8fa9adaf --- a/src/packages/components/Informations/Inputs/InputsDate/config.vue +++ b/src/packages/components/Informations/Inputs/InputsDate/config.vue @@ -8,39 +8,67 @@ - + - - - + + + + - + + + + + + + - - - + + + + + + + + + + + + + + + + + diff --git a/src/packages/components/Informations/Inputs/InputsDate/index.vue b/src/packages/components/Informations/Inputs/InputsDate/index.vue old mode 100644 new mode 100755 index 3800590f..a8e16bc1 --- a/src/packages/components/Informations/Inputs/InputsDate/index.vue +++ b/src/packages/components/Informations/Inputs/InputsDate/index.vue @@ -1,6 +1,7 @@ diff --git a/src/views/preview/hooks/useScale.hook.ts b/src/views/preview/hooks/useScale.hook.ts index b0185383..e4c57f97 100644 --- a/src/views/preview/hooks/useScale.hook.ts +++ b/src/views/preview/hooks/useScale.hook.ts @@ -23,6 +23,8 @@ export const useScale = (localStorageInfo: ChartEditStorageType) => { e.preventDefault() e.stopPropagation() removeEvent() + const fitDom = document.querySelector(".go-preview.fit") as HTMLElement + if (fitDom) fitDom.style.overflow = 'auto' const transform = previewRef.value.style.transform // 使用正则解析 scale(1, 1) 中的两个数值 const regRes = transform.match(/scale\((\d+\.?\d*)*/) as RegExpMatchArray From e979149cfbef92e67653fc1d8c503efed3c6eaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Sat, 8 Jul 2023 21:59:41 +0800 Subject: [PATCH 29/30] =?UTF-8?q?feat:=20=E4=B8=8D=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=A0=BC=E5=BC=8F=E6=97=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ChartData/components/ChartDataAjax/index.vue | 6 +++++- .../components/ChartData/components/ChartDataPond/index.vue | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataAjax/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataAjax/index.vue index 203bb0e6..376a84b7 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataAjax/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataAjax/index.vue @@ -131,7 +131,11 @@ const sendHandle = async () => { loading.value = false if (res) { const { data } = res - if (!data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!') + if (!data && !targetData.value.filter) { + window['$message'].warning('您的数据不符合默认格式,请配置过滤器!') + showMatching.value = true + return + } targetData.value.option.dataset = newFunctionHandle(data, res, targetData.value.filter) showMatching.value = true return diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/index.vue index b51938dd..a7a849fa 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/index.vue @@ -117,7 +117,11 @@ const sendHandle = async () => { const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig)) loading.value = false if (res) { - if (!res?.data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!') + if (!res?.data && !targetData.value.filter) { + window['$message'].warning('您的数据不符合默认格式,请配置过滤器!') + showMatching.value = true + return + } targetData.value.option.dataset = newFunctionHandle(res?.data, res, targetData.value.filter) showMatching.value = true return From 4064339848f98c30fe0a11580c01ae463d1054cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Sat, 8 Jul 2023 22:03:27 +0800 Subject: [PATCH 30/30] =?UTF-8?q?build:=20=E5=8D=87=E7=BA=A7=E5=88=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=202.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fddf3c69..8895b4e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "go-view", - "version": "2.2.3", + "version": "2.2.4", "engines": { "node": ">=12.0" },