Merge remote-tracking branch 'origin/dev-v2' into dev-v2

This commit is contained in:
wisonic 2024-08-13 15:58:09 +08:00
commit 025f1fc7d2
53 changed files with 634 additions and 404 deletions

View File

@ -1,7 +1,7 @@
package io.dataease.config;
import com.fit2cloud.autoconfigure.QuartzAutoConfiguration;
import io.dataease.commons.utils.CommonThreadPool;
import io.dataease.utils.CommonThreadPool;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,7 +1,6 @@
package io.dataease.datasource.provider;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.dataease.commons.utils.CommonThreadPool;
import io.dataease.dataset.utils.FieldUtils;
import io.dataease.datasource.dao.auto.entity.CoreDatasource;
import io.dataease.datasource.dao.auto.entity.CoreDriver;
@ -16,10 +15,7 @@ import io.dataease.extensions.datasource.provider.ExtendedJdbcClassLoader;
import io.dataease.extensions.datasource.provider.Provider;
import io.dataease.extensions.datasource.vo.DatasourceConfiguration;
import io.dataease.i18n.Translator;
import io.dataease.utils.BeanUtils;
import io.dataease.utils.CommonBeanFactory;
import io.dataease.utils.JsonUtil;
import io.dataease.utils.LogUtil;
import io.dataease.utils.*;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.apache.calcite.adapter.jdbc.JdbcSchema;

View File

@ -14,7 +14,6 @@ import io.dataease.api.ds.vo.CoreDatasourceTaskLogDTO;
import io.dataease.api.ds.vo.ExcelFileData;
import io.dataease.api.ds.vo.ExcelSheetData;
import io.dataease.commons.constants.TaskStatus;
import io.dataease.commons.utils.CommonThreadPool;
import io.dataease.constant.LogOT;
import io.dataease.constant.LogST;
import io.dataease.dataset.manage.DatasetDataManage;

View File

@ -1,226 +0,0 @@
import request from '@/config/axios'
import dayjs from 'dayjs'
export function formatDate(value, dateType) {
if (!value) {
return value
}
switch (dateType) {
case 'year':
return dayjs(value).format('YYYY')
case 'month':
case 'monthrange':
return dayjs(value).format('YYYY-MM')
case 'datetime':
case 'datetimerange':
return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
default:
return dayjs(value).format('YYYY-MM-DD')
}
}
export interface ColumnItem {
props: string
label: string
date: boolean
dateType?: string
type: string
multiple: boolean
rangeIndex?: number
disabled?: boolean
}
export interface DataFillingOrFolder {
name: string
action?: string
id?: number | string
pid?: number | string
nodeType: 'folder' | 'data-filling'
union?: Array<{}>
allFields?: Array<{}>
}
export interface Tree {
name: string
value?: string | number
id: string | number
nodeType: string
createBy?: string
level: number
leaf?: boolean
pid: string | number
type?: string
createTime: number
children?: Tree[]
request: any
}
export interface DfFormSetting {
id?: string
name?: string
pid?: string
datasource?: string
tableName?: string
forms: Array<DfFormItem>
createIndex: boolean
tableIndexes: Array<any>
creator?: string
updater?: string
createTime?: number
updateTime?: number
weight?: number
}
export interface DfFormItem {
type: string
typeName: string
icon: string
order?: number
value?: any
id?: string
settings: FormItemSetting
old?: boolean
removed?: boolean
}
export interface FormItemSetting {
name?: string
placeholder?: string
required?: boolean
unique?: boolean
inputType?: string
optionSourceType?: 1 | 2
optionDatasource?: number
optionTable?: string
optionColumn?: string
optionOrder?: string
multiple?: boolean
dateType?: 'date' | 'daterange'
rangeSeparator?: string
startPlaceholder?: string
endPlaceholder?: string
options?: Array<FormItemSettingOptions>
mapping: {
columnName?: string
columnName1?: string
columnName2?: string
type?: string
}
}
export interface FormItemSettingOptions {
name: string
value: string
}
export interface SimpleDatasource {
id: string
pid: string
name: string
type: string
typeAlias: string
status: string
enableDataFill: boolean
}
export const listDataFillingForms = async (data): Promise<any> => {
return request
.post({ url: '/data-filling/tree', data: { ...data, ...{ busiFlag: 'data-filling' } } })
.then(res => {
return res?.data
})
}
export const createFolder = (data = {}): Promise<any> => {
return request
.post({ url: '/data-filling/save', data: { ...data, nodeType: 'folder' } })
.then(res => {
return res?.data
})
}
export const save = (data = {}): Promise<any> => {
return request.post({ url: '/data-filling/save', data }).then(res => {
return res?.data
})
}
export const move = (data = {}): Promise<any> => {
return request.post({ url: '/data-filling/move', data }).then(res => {
return res?.data
})
}
export const reName = (data = {}): Promise<any> => {
return request.post({ url: '/data-filling/rename', data }).then(res => {
return res?.data
})
}
export const listDatasourceList = (): Promise<Array<SimpleDatasource>> => {
return request.get({ url: '/data-filling/datasource/list' }).then(res => {
return res?.data
})
}
export const getDataFilling = async (id: string): Promise<any> => {
return request.get({ url: `/data-filling/get/${id}` }).then(res => {
return res?.data
})
}
export const deleteById = (id: string): Promise<any> => {
return request.get({ url: '/data-filling/delete/' + id })
}
export const deleteRowData = (formId: string, id: number): Promise<any> => {
return request.get({ url: `/data-filling/form/${formId}/delete/${id}` })
}
export const batchDeleteRowData = (formId: string, data: Array<any>): Promise<any> => {
return request.post({ url: `/data-filling/form/${formId}/batch-delete`, data })
}
export const getTableColumnData = (
optionDatasource,
optionTable,
optionColumn,
optionOrder
): Promise<any> => {
return request.post({
url: `/data-filling/form/${optionDatasource}/options`,
data: {
optionTable: optionTable,
optionColumn: optionColumn,
optionOrder: optionOrder
}
})
}
export const searchTable = (id, data): Promise<any> => {
return request.post({
url: '/data-filling/form/' + id + '/tableData',
data
})
}
export const saveFormRowData = (formId, data): Promise<any> => {
return request
.post({
url: '/data-filling/form/' + formId + '/rowData/save',
data
})
.then(res => {
return res?.data
})
}
export const saveTask = (data): Promise<any> => {
return request.post({
url: `/data-filling/task/save`,
data
})
}
export const getTaskInfo = (taskId): Promise<any> => {
return request.get({
url: `/data-filling/task/info/${taskId}`
})
}

View File

@ -202,6 +202,18 @@ const height = ref(0)
const isShowArea = ref(false)
const svgFilterAttrs = ['width', 'height', 'top', 'left', 'rotate', 'backgroundColor']
const commonFilterAttrs = ['width', 'height', 'top', 'left', 'rotate']
const commonFilterAttrsFilterBorder = [
'width',
'height',
'top',
'left',
'rotate',
'borderActive',
'borderWidth',
'borderRadius',
'borderStyle',
'borderColor'
]
const userViewEnlargeRef = ref(null)
const customDatasetParamsRef = ref(null)
const linkJumpRef = ref(null)
@ -515,7 +527,7 @@ const handleContextMenu = e => {
}
const getComponentStyle = style => {
return getStyle(style, commonFilterAttrs)
return getStyle(style, style.borderActive ? commonFilterAttrs : commonFilterAttrsFilterBorder)
}
const getSvgComponentStyle = style => {

View File

@ -64,7 +64,11 @@
:style="getPointStyle(item)"
@mousedown="handleMouseDownOnPoint(item, $event)"
></div>
<div class="shape-shadow" v-show="batchOptFlag" @mousedown="batchSelected"></div>
<div
class="shape-shadow"
v-show="batchOptFlag && element.component !== 'DeTabs'"
@mousedown="batchSelected"
></div>
<template v-if="boardMoveActive">
<div
v-show="!element.editing"
@ -441,12 +445,7 @@ const handleInnerMouseDownOnShape = e => {
if (!canvasActive.value) {
return
}
if (batchOptFlag.value) {
componentEditBarRef.value.batchOptCheckOut()
e.stopPropagation()
e.preventDefault()
return
}
batchSelected(e)
// ctrl or command (ComposeShow)
if (isCtrlOrCmdDown.value && !areaData.value.components.includes(element)) {
areaDataPush(element.value)

View File

@ -4,7 +4,8 @@
</div>
</template>
<script lang="ts" setup>
import { ref, toRefs, watch } from 'vue'
import { ref, toRefs, watch, onMounted, onBeforeUnmount } from 'vue'
import { useEmitt } from '@/hooks/web/useEmitt'
import { formatDataEaseBi } from '@/utils/url'
import { guid } from '@/views/visualized/data/dataset/form/util'
import tinymce from 'tinymce/tinymce' // tinymcehidden
@ -28,7 +29,6 @@ import 'tinymce/plugins/pagebreak'
import { propTypes } from '@/utils/propTypes'
const props = defineProps({
modelValue: String,
inline: propTypes.bool.def(false),
fieldList: propTypes.arrayOf(
propTypes.shape({
deType: propTypes.number,
@ -39,7 +39,7 @@ const props = defineProps({
)
})
const myValue = ref()
const { modelValue, inline } = toRefs(props)
const { modelValue } = toRefs(props)
myValue.value = modelValue
watch(
() => props.modelValue,
@ -69,9 +69,9 @@ const init = ref({
'advlist autolink link image lists charmap media wordcount table contextmenu directionality pagebreak', //
//
toolbar:
'undo redo |fontselect fontsizeselect |forecolor backcolor bold italic |underline strikethrough link | splitDateButton lineheight| formatselect |' +
'undo redo |fontselect fontsizeselect |forecolor backcolor bold italic |underline strikethrough | splitDateButton lineheight| formatselect |' +
'alignleft aligncenter alignright | bullist numlist |' +
' blockquote subscript superscript removeformat | table image media ',
' blockquote subscript superscript removeformat | table image media link',
toolbar_location: '/',
font_formats:
'阿里巴巴普惠体=阿里巴巴普惠体 3.0 55 Regular L3;微软雅黑=Microsoft YaHei;宋体=SimSun;黑体=SimHei;仿宋=FangSong;华文黑体=STHeiti;华文楷体=STKaiti;华文宋体=STSong;华文仿宋=STFangsong;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings',
@ -79,7 +79,7 @@ const init = ref({
menubar: false,
placeholder: '',
outer_placeholder: '双击输入文字',
inline: inline.value,
inline: false,
branding: true,
setup: editor => {
const emoticons = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
@ -161,7 +161,32 @@ const fieldSelect = name => {
ed.insertContent(value)
ed.insertContent(attachValue)
}
viewInit()
const moreBarElementClick = () => {
if (!moreBarElement) return
moreBarElement.nextSibling.querySelector('.tox-tbtn').click()
}
useEmitt({
name: 'moreBarElementClick',
callback: moreBarElementClick
})
let moreBarElement = null
onMounted(() => {
setTimeout(() => {
moreBarElement = document.querySelectorAll(
'.de-tinymce-container_alarm .tox-toolbar__primary .tox-toolbar__group'
)[4]
}, 1000)
})
onBeforeUnmount(() => {
moreBarElement = null
})
defineExpose({
viewInit
})
</script>
<style lang="less">
@ -192,43 +217,9 @@ viewInit()
height: 24px !important;
}
}
</style>
<style>
.tox {
border-radius: 4px !important;
border-bottom: 1px solid #ccc !important;
z-index: 3000 !important;
.tox-collection__item-icon {
height: 14px !important;
width: 14px !important;
}
}
.tox-tbtn {
height: auto !important;
}
.tox-collection__item-label {
p {
color: #1a1a1a !important;
}
h1 {
color: #1a1a1a !important;
}
h2 {
color: #1a1a1a !important;
}
h3 {
color: #1a1a1a !important;
}
h4 {
color: #1a1a1a !important;
}
h5 {
color: #1a1a1a !important;
}
h6 {
color: #1a1a1a !important;
}
pre {
color: #1a1a1a !important;
}
z-index: 2213 !important;
}
</style>

View File

@ -11,6 +11,8 @@ import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapsho
import CommonStyleSet from '@/custom-component/common/CommonStyleSet.vue'
import CommonEvent from '@/custom-component/common/CommonEvent.vue'
import TabCarouselSetting from '@/custom-component/common/TabCarouselSetting.vue'
import CommonBorderSetting from '@/custom-component/common/CommonBorderSetting.vue'
import CollapseSwitchItem from '../../components/collapse-switch-item/src/CollapseSwitchItem.vue'
const snapshotStore = snapshotStoreWithOut()
const { t } = useI18n()
@ -94,6 +96,10 @@ const colorPickerWidth = computed(() => {
}
})
const borderSettingShow = computed(() => {
return !!element.value.style['borderStyle']
})
//
const eventsShow = computed(() => {
return (
@ -178,6 +184,20 @@ const stopEvent = e => {
>
<common-event :themes="themes" :events-info="element.events"></common-event>
</el-collapse-item>
<collapse-switch-item
v-if="element && borderSettingShow"
v-model="element.style.borderActive"
:themes="themes"
title="边框"
name="borderSetting"
class="common-style-area"
>
<common-border-setting
:style-info="element.style"
:themes="themes"
@onStyleAttrChange="onStyleAttrChange"
></common-border-setting>
</collapse-switch-item>
<TabCarouselSetting
v-if="carouselShow"
:element="element"

View File

@ -0,0 +1,164 @@
<script setup lang="ts">
import { computed, reactive, ref, toRefs, watch } from 'vue'
import { ElFormItem, ElInputNumber } from 'element-plus-secondary'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { storeToRefs } from 'pinia'
import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const { canvasStyleData } = storeToRefs(dvMainStore)
const props = withDefaults(
defineProps<{
themes?: EditorTheme
styleInfo: any
}>(),
{
themes: 'dark'
}
)
const emits = defineEmits(['onStyleAttrChange'])
const { themes, styleInfo } = toRefs(props)
const state = reactive({
fontSize: [],
isSetting: false,
predefineColors: COLOR_PANEL
})
const styleMounted = ref({
borderWidth: 0,
borderRadius: 5
})
const borderStyleList = [
{ name: '实线', value: 'solid' },
{ name: '虚线', value: 'dashed' },
{ name: '点线', value: 'dotted' }
]
const styleInit = () => {
if (styleInfo.value) {
Object.keys(styleMounted.value).forEach(key => {
styleMounted.value[key] = Math.round(
(styleInfo.value[key] * 100) / canvasStyleData.value.scale
)
})
}
}
const styleForm = computed<any>(() => styleInfo.value)
const changeStyle = params => {
snapshotStore.recordSnapshotCache()
emits('onStyleAttrChange', params)
}
const changeStylePre = key => {
changeStyle({ key: key, value: styleInfo.value[key] })
}
const sizeChange = key => {
styleInfo.value[key] = (styleMounted.value[key] * canvasStyleData.value.scale) / 100
changeStyle({ key: key, value: styleInfo.value[key] })
}
watch(
() => styleInfo.value,
() => {
styleInit()
},
{
deep: true,
immediate: true
}
)
</script>
<template>
<el-row class="custom-row">
<el-form label-position="top">
<el-row style="display: flex">
<el-form-item
style="width: 70px"
label="颜色"
class="form-item"
:class="'form-item-' + themes"
>
<el-color-picker
title="颜色"
v-model="styleForm.borderColor"
class="color-picker-style"
:triggerWidth="65"
is-custom
:predefine="state.predefineColors"
@change="changeStylePre('borderColor')"
>
</el-color-picker>
</el-form-item>
<el-form-item
style="width: 150px"
label="圆角"
class="form-item"
:class="'form-item-' + themes"
>
<el-input-number
title="圆角"
:effect="themes"
:min="0"
:max="200"
controls-position="right"
v-model="styleMounted.borderRadius"
class="color-picker-style"
@change="sizeChange('borderRadius')"
>
</el-input-number>
</el-form-item>
</el-row>
<el-row style="display: flex">
<el-form-item
style="width: 70px"
label="样式"
class="form-item"
:class="'form-item-' + themes"
>
<el-select
:effect="themes"
v-model="styleForm.borderStyle"
size="small"
style="width: 65px"
@change="changeStylePre('borderStyle')"
>
<el-option
class="custom-style-option"
v-for="option in borderStyleList"
:key="option.value"
:label="option.name"
:value="option.value"
/>
</el-select>
</el-form-item>
<el-form-item
style="width: 150px"
label="线宽"
class="form-item"
:class="'form-item-' + themes"
>
<el-input-number
title="线宽"
:min="0"
:max="50"
:effect="themes"
controls-position="right"
v-model="styleMounted.borderWidth"
class="color-picker-style"
@change="sizeChange('borderWidth')"
>
</el-input-number>
</el-form-item>
</el-row>
</el-form>
</el-row>
</template>
<style scoped lang="less"></style>

View File

@ -350,7 +350,6 @@ const state = reactive({
const styleColorKeyArray = [
{ value: 'color', label: '颜色', width: 90, icon: 'dv-style-color' },
{ value: 'borderColor', label: '边框颜色', width: 90, icon: 'dv-style-borderColor' },
{
value: 'headFontColor',
label: '头部字体颜色',
@ -388,34 +387,6 @@ const fontSizeList = computed(() => {
return arr
})
const borderWidthList = computed(() => {
const arr = []
for (let i = 0; i <= 20; i = i + 1) {
arr.push({
name: i + '',
value: i
})
}
return arr
})
const borderRadiusList = computed(() => {
const arr = []
for (let i = 0; i <= 50; i = i + 1) {
arr.push({
name: i + '',
value: i
})
}
return arr
})
const borderStyleList = [
{ name: '实线', value: 'solid' },
{ name: '虚线', value: 'dashed' },
{ name: '点线', value: 'dotted' }
]
const styleOptionKeyArrayPre = [
{
value: 'fontFamily',
@ -466,27 +437,6 @@ const styleOptionKeyArray = [
customOption: opacitySizeList,
width: '90px',
icon: 'dv-style-opacity'
},
{
value: 'borderWidth',
label: '边框宽度',
customOption: borderWidthList.value,
width: '90px',
icon: 'dv-style-borderSize'
},
{
value: 'borderRadius',
label: '圆角',
customOption: borderRadiusList.value,
width: '90px',
icon: 'dv-style-borderRadius'
},
{
value: 'borderStyle',
label: '边框样式',
customOption: borderStyleList,
width: '90px',
icon: 'dv-style-borderStyle'
}
]

View File

@ -5,7 +5,12 @@ import { getViewConfig } from '@/views/chart/components/editor/util/chart'
export const commonStyle = {
rotate: 0,
opacity: 1
opacity: 1,
borderActive: false,
borderWidth: 1,
borderRadius: 5,
borderStyle: 'solid',
borderColor: '#cccccc'
}
// 轮询设置
@ -22,7 +27,7 @@ export const BASE_EVENTS = {
{ key: 'jump', label: '跳转' },
{ key: 'download', label: '下载' },
{ key: 'share', label: '分享' },
{ key: 'showHidden', label: '区域' },
{ key: 'showHidden', label: '区域' },
{ key: 'refreshDataV', label: '刷新' },
{ key: 'refreshView', label: '刷新图表' }
],
@ -466,11 +471,8 @@ const list = [
style: {
width: 200,
height: 200,
borderWidth: 1,
borderRadius: 5,
borderStyle: 'solid',
borderColor: '#cccccc',
backgroundColor: 'rgba(236,231,231,0.1)'
backgroundColor: 'rgba(236,231,231,0.1)',
borderActive: true
}
},
{

View File

@ -376,6 +376,7 @@ export default {
commit_time: 'Commit Time',
confirm_delete: 'Confirm delete?',
add_data: 'Add Data',
batch_upload: 'Upload Data',
download_template: 'Download Template',
insert_data: 'Insert Data',
update_data: 'Update Data',

View File

@ -277,6 +277,7 @@ export default {
commit_time: '提交時間',
confirm_delete: '確認刪除?',
add_data: '添加數據',
batch_upload: '批量上傳',
download_template: '下載模板',
insert_data: '插入數據',
update_data: '更新數據',

View File

@ -2707,6 +2707,7 @@ export default {
commit_time: '提交时间',
confirm_delete: '确认删除?',
add_data: '添加数据',
batch_upload: '批量上传',
download_template: '下载模板',
insert_data: '插入数据',
update_data: '更新数据',

View File

@ -1,5 +1,6 @@
declare type EditorProperty =
| 'background-overall-component'
| 'border-style'
| 'basic-style-selector'
| 'dual-basic-style-selector'
| 'label-selector'

View File

@ -7,7 +7,6 @@ import type { BusiTreeRequest, BusiTreeNode } from '@/models/tree/TreeNode'
import { pathValid } from '@/store/modules/permission'
import { useCache } from '@/hooks/web/useCache'
import { useAppStoreWithOut } from '@/store/modules/app'
import { listDataFillingForms } from '@/api/data-filling'
const appStore = useAppStoreWithOut()
const { wsCache } = useCache()
export interface InnerInteractive {
@ -22,9 +21,9 @@ interface InteractiveState {
data: Record<number, InnerInteractive>
}
const apiMap = [queryTreeApi, queryTreeApi, getDatasetTree, listDatasources, listDataFillingForms]
const apiMap = [queryTreeApi, queryTreeApi, getDatasetTree, listDatasources]
const busiFlagMap = ['dashboard', 'dataV', 'dataset', 'datasource', 'data-filling']
const busiFlagMap = ['dashboard', 'dataV', 'dataset', 'datasource']
export const interactiveStore = defineStore('interactive', {
state: (): InteractiveState => ({

View File

@ -120,6 +120,68 @@ function matrixAdaptor(componentItem) {
}
}
export function historyItemAdaptor(
componentItem,
reportFilterInfo,
attachInfo,
canvasVersion,
canvasInfo
) {
componentItem['canvasActive'] = false
// 定时报告过滤组件适配 如果当前是定时报告默认切有设置对应的过滤组件默认值则替换过滤组件
if (
componentItem.component === 'VQuery' &&
attachInfo.source === 'report' &&
!!reportFilterInfo
) {
componentItem.propValue.forEach((filterItem, index) => {
if (reportFilterInfo[filterItem.id]) {
componentItem.propValue[index] = JSON.parse(reportFilterInfo[filterItem.id].filterInfo)
}
})
}
if (componentItem.component === 'Group') {
componentItem.expand = componentItem.expand || false
}
if (componentItem.component === 'Picture') {
componentItem.style['adaptation'] = componentItem.style['adaptation'] || 'adaptation'
}
// public
componentItem['maintainRadio'] = componentItem['maintainRadio'] || false
componentItem['multiDimensional'] =
componentItem['multiDimensional'] || deepCopy(MULTI_DIMENSIONAL)
componentItem['carousel'] = componentItem['carousel'] || deepCopy(BASE_CAROUSEL)
componentItem['aspectRatio'] = componentItem['aspectRatio'] || 1
if (componentItem.component === 'UserView') {
componentItem.actionSelection = componentItem.actionSelection || deepCopy(ACTION_SELECTION)
}
// 2 为基础版本 此处需要增加仪表板矩阵密度
if ((!canvasVersion || canvasVersion === 2) && canvasInfo.type === 'dashboard') {
matrixAdaptor(componentItem)
}
// 组件事件适配
componentItem.events =
componentItem.events &&
componentItem.events.checked !== undefined &&
componentItem.events.type !== 'displayChange'
? componentItem.events
: deepCopy(BASE_EVENTS)
componentItem['category'] = componentItem['category'] || 'base'
if (componentItem.component === 'DeTabs') {
componentItem.propValue.forEach(tabItem => {
tabItem.componentData.forEach(tabComponent => {
historyItemAdaptor(tabComponent, reportFilterInfo, attachInfo, canvasVersion, canvasInfo)
})
})
} else if (componentItem.component === 'Group') {
componentItem.propValue.forEach(groupItem => {
historyItemAdaptor(groupItem, reportFilterInfo, attachInfo, canvasVersion, canvasInfo)
})
}
}
export function historyAdaptor(
canvasStyleResult,
canvasDataResult,
@ -138,47 +200,7 @@ export function historyAdaptor(
canvasStyleResult['popupAvailable'] === undefined ? true : canvasStyleResult['popupAvailable'] //兼容弹框区域开关
const reportFilterInfo = canvasInfo.reportFilterInfo
canvasDataResult.forEach(componentItem => {
componentItem['canvasActive'] = false
// 定时报告过滤组件适配 如果当前是定时报告默认切有设置对应的过滤组件默认值则替换过滤组件
if (
componentItem.component === 'VQuery' &&
attachInfo.source === 'report' &&
!!reportFilterInfo
) {
componentItem.propValue.forEach((filterItem, index) => {
if (reportFilterInfo[filterItem.id]) {
componentItem.propValue[index] = JSON.parse(reportFilterInfo[filterItem.id].filterInfo)
}
})
}
if (componentItem.component === 'Group') {
componentItem.expand = componentItem.expand || false
}
if (componentItem.component === 'Picture') {
componentItem.style['adaptation'] = componentItem.style['adaptation'] || 'adaptation'
}
// public
componentItem['maintainRadio'] = componentItem['maintainRadio'] || false
componentItem['multiDimensional'] =
componentItem['multiDimensional'] || deepCopy(MULTI_DIMENSIONAL)
componentItem['carousel'] = componentItem['carousel'] || deepCopy(BASE_CAROUSEL)
componentItem['aspectRatio'] = componentItem['aspectRatio'] || 1
if (componentItem.component === 'UserView') {
componentItem.actionSelection = componentItem.actionSelection || deepCopy(ACTION_SELECTION)
}
// 2 为基础版本 此处需要增加仪表板矩阵密度
if ((!canvasVersion || canvasVersion === 2) && canvasInfo.type === 'dashboard') {
matrixAdaptor(componentItem)
}
// 组件事件适配
componentItem.events =
componentItem.events &&
componentItem.events.checked !== undefined &&
componentItem.events.type !== 'displayChange'
? componentItem.events
: deepCopy(BASE_EVENTS)
componentItem['category'] = componentItem['category'] || 'base'
historyItemAdaptor(componentItem, reportFilterInfo, attachInfo, canvasVersion, canvasInfo)
})
}

View File

@ -27,6 +27,7 @@ import QuadrantSelector from '@/views/chart/components/editor/editor-style/compo
import FlowMapLineSelector from '@/views/chart/components/editor/editor-style/components/FlowMapLineSelector.vue'
import FlowMapPointSelector from '@/views/chart/components/editor/editor-style/components/FlowMapPointSelector.vue'
import CommonEvent from '@/custom-component/common/CommonEvent.vue'
import CommonBorderSetting from '@/custom-component/common/CommonBorderSetting.vue'
const dvMainStore = dvMainStoreWithOut()
const { dvInfo, batchOptStatus } = storeToRefs(dvMainStore)
@ -43,6 +44,10 @@ const props = defineProps({
type: Object,
required: false
},
commonBorderPop: {
type: Object,
required: false
},
eventInfo: {
type: Object,
required: false
@ -90,8 +95,15 @@ const props = defineProps({
}
})
const { chart, themes, properties, propertyInnerAll, commonBackgroundPop, selectorSpec } =
toRefs(props)
const {
chart,
themes,
properties,
propertyInnerAll,
commonBackgroundPop,
commonBorderPop,
selectorSpec
} = toRefs(props)
const emit = defineEmits([
'onColorChange',
'onMiscChange',
@ -104,6 +116,7 @@ const emit = defineEmits([
'onLegendChange',
'onBasicStyleChange',
'onBackgroundChange',
'onStyleAttrChange',
'onTableHeaderChange',
'onTableCellChange',
'onTableTotalChange',
@ -192,6 +205,10 @@ const onBackgroundChange = (val, prop) => {
state.initReady && emit('onBackgroundChange', val, prop)
}
const onStyleAttrChange = ({ key, value }) => {
state.initReady && emit('onStyleAttrChange', { custom: 'style', property: key, value: value })
}
const onTableHeaderChange = (val, prop) => {
emit('onTableHeaderChange', val, prop)
}
@ -318,6 +335,20 @@ watch(
component-position="component"
/>
</el-collapse-item>
<collapse-switch-item
v-if="showProperties('border-style') && commonBorderPop"
v-model="commonBorderPop.borderActive"
:themes="themes"
title="边框"
name="borderSetting"
class="common-style-area"
>
<common-border-setting
:style-info="commonBorderPop"
:themes="themes"
@onStyleAttrChange="onStyleAttrChange"
></common-border-setting>
</collapse-switch-item>
<el-collapse-item :effect="themes" name="events" title="事件" v-if="eventsShow">
<common-event :themes="themes" :events-info="eventInfo"></common-event>
</el-collapse-item>

View File

@ -1053,6 +1053,10 @@ const onBackgroundChange = val => {
curComponent.value.commonBackground = val
}
const onStyleAttrChange = val => {
curComponent.value.style[val.property] = val.value
}
const onAssistLineChange = val => {
view.value.senior.assistLineCfg = val.data
if (val.requestData) {
@ -2776,6 +2780,7 @@ const deleteChartFieldItem = id => {
:property-inner-all="chartViewInstance.propertyInner"
:selector-spec="chartViewInstance.selectorSpec"
:common-background-pop="curComponent?.commonBackground"
:common-border-pop="curComponent?.style"
:event-info="curComponent?.events"
:chart="view"
:themes="themes"
@ -2794,6 +2799,7 @@ const deleteChartFieldItem = id => {
@onIndicatorNameChange="onIndicatorNameChange"
@onLegendChange="onLegendChange"
@onBackgroundChange="onBackgroundChange"
@onStyleAttrChange="onStyleAttrChange"
@onBasicStyleChange="onBasicStyleChange"
@onTableHeaderChange="onTableHeaderChange"
@onTableCellChange="onTableCellChange"

View File

@ -49,6 +49,7 @@ export class BidirectionalHorizontalBar extends G2PlotChartView<
axis: AxisType[] = ['xAxis', 'yAxis', 'yAxisExt', 'filter', 'drill', 'extLabel', 'extTooltip']
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'x-axis-selector',
'dual-y-axis-selector',
@ -62,6 +63,7 @@ export class BidirectionalHorizontalBar extends G2PlotChartView<
]
propertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient', 'layout'],
'x-axis-selector': ['position', 'axisLabel', 'axisLine', 'splitLine'],
'y-axis-selector': [

View File

@ -1,5 +1,6 @@
export const BAR_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -14,6 +15,7 @@ export const BAR_EDITOR_PROPERTY: EditorProperty[] = [
]
export const BAR_RANGE_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -28,6 +30,7 @@ export const BAR_RANGE_EDITOR_PROPERTY: EditorProperty[] = [
export const BAR_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient', 'radiusColumnBar'],
'label-selector': ['fontSize', 'color', 'labelFormatter'],
'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter', 'show'],

View File

@ -34,6 +34,7 @@ export class ProgressBar extends G2PlotChartView<BarOptions, G2Progress> {
}
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -47,6 +48,7 @@ export class ProgressBar extends G2PlotChartView<BarOptions, G2Progress> {
...BAR_EDITOR_PROPERTY_INNER,
'legend-selector': null,
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient'],
'label-selector': ['hPosition', 'color', 'fontSize'],
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'],

View File

@ -11,6 +11,7 @@ import { isEmpty } from 'lodash-es'
export class Waterfall extends G2PlotChartView<WaterfallOptions, G2Waterfall> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -21,6 +22,7 @@ export class Waterfall extends G2PlotChartView<WaterfallOptions, G2Waterfall> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient'],
'label-selector': ['fontSize', 'color', 'vPosition', 'labelFormatter'],
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'],

View File

@ -1,5 +1,6 @@
export const LINE_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'x-axis-selector',
'y-axis-selector',
@ -14,6 +15,7 @@ export const LINE_EDITOR_PROPERTY: EditorProperty[] = [
]
export const LINE_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'label-selector': ['fontSize', 'color'],
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'show'],
'basic-style-selector': [

View File

@ -17,6 +17,7 @@ const DEFAULT_DATA = []
export class StockLine extends G2PlotChartView<MixOptions, Mix> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'x-axis-selector',
'y-axis-selector',

View File

@ -16,6 +16,7 @@ const DEFAULT_LIQUID_DATA = []
export class Liquid extends G2PlotChartView<LiquidOptions, G2Liquid> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'misc-selector',
@ -24,6 +25,7 @@ export class Liquid extends G2PlotChartView<LiquidOptions, G2Liquid> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha'],
'label-selector': ['fontSize', 'color', 'labelFormatter'],
'misc-selector': ['liquidShape', 'liquidSize', 'liquidMaxType', 'liquidMaxField'],

View File

@ -1,5 +1,6 @@
export const MAP_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector',
'label-selector',
@ -12,6 +13,7 @@ export const MAP_EDITOR_PROPERTY: EditorProperty[] = [
export const MAP_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'areaBorderColor', 'zoom'],
'title-selector': [
'title',

View File

@ -21,6 +21,7 @@ const { t } = useI18n()
export class FlowMap extends L7ChartView<Scene, L7Config> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector',
'flow-map-line-selector',

View File

@ -21,6 +21,7 @@ const { t } = useI18n()
export class HeatMap extends L7ChartView<Scene, L7Config> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector'
]

View File

@ -22,6 +22,7 @@ const { t } = useI18n()
export class SymbolicMap extends L7ChartView<Scene, L7Config> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector',
'label-selector',

View File

@ -2,6 +2,7 @@ import { DEFAULT_BASIC_STYLE } from '@/views/chart/components/editor/util/chart'
export const CHART_MIX_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'dual-basic-style-selector',
'x-axis-selector',
'dual-y-axis-selector',
@ -16,6 +17,7 @@ export const CHART_MIX_EDITOR_PROPERTY: EditorProperty[] = [
]
export const CHART_MIX_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'label-selector': ['fontSize', 'color'],
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'show'],
'dual-basic-style-selector': [

View File

@ -14,6 +14,7 @@ const { t } = useI18n()
export class Funnel extends G2PlotChartView<FunnelOptions, G2Funnel> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -24,6 +25,7 @@ export class Funnel extends G2PlotChartView<FunnelOptions, G2Funnel> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'seriesColor'],
'label-selector': ['fontSize', 'color', 'hPosition', 'showQuota', 'conversionTag'],
'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter', 'show'],

View File

@ -21,6 +21,7 @@ const DEFAULT_DATA = []
export class Gauge extends G2PlotChartView<GaugeOptions, G2Gauge> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'misc-selector',
@ -29,6 +30,7 @@ export class Gauge extends G2PlotChartView<GaugeOptions, G2Gauge> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient', 'gaugeAxisLine', 'gaugePercentLabel'],
'label-selector': ['fontSize', 'color', 'labelFormatter'],
'title-selector': [

View File

@ -8,6 +8,7 @@ const { t } = useI18n()
export class IndicatorChartView extends AbstractChartView {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'title-selector',
'indicator-value-selector',
'indicator-name-selector',
@ -16,6 +17,7 @@ export class IndicatorChartView extends AbstractChartView {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'title-selector': [
'title',
'fontSize',

View File

@ -16,6 +16,7 @@ const { t } = useI18n()
export class Quadrant extends G2PlotChartView<ScatterOptions, G2Scatter> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'x-axis-selector',
'y-axis-selector',

View File

@ -13,6 +13,7 @@ const { t } = useI18n()
export class Radar extends G2PlotChartView<RadarOptions, G2Radar> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',

View File

@ -6,9 +6,10 @@ const { t } = useI18n()
* 富文本图表
*/
export class RichTextChartView extends AbstractChartView {
properties: EditorProperty[] = ['background-overall-component', 'threshold']
properties: EditorProperty[] = ['background-overall-component', 'border-style', 'threshold']
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
threshold: ['tableThreshold']
}
axis: AxisType[] = ['xAxis', 'yAxis', 'filter']

View File

@ -1,5 +1,6 @@
export const SANKEY_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'label-selector',
'tooltip-selector',
@ -10,6 +11,7 @@ export const SANKEY_EDITOR_PROPERTY: EditorProperty[] = [
export const SANKEY_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'gradient'],
'label-selector': ['fontSize', 'color', 'labelFormatter'],
'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter'],

View File

@ -16,6 +16,7 @@ const { t } = useI18n()
export class Scatter extends G2PlotChartView<ScatterOptions, G2Scatter> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'x-axis-selector',
'y-axis-selector',

View File

@ -16,6 +16,7 @@ const { t } = useI18n()
export class Treemap extends G2PlotChartView<TreemapOptions, G2Treemap> {
properties: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector',
'legend-selector',
@ -26,6 +27,7 @@ export class Treemap extends G2PlotChartView<TreemapOptions, G2Treemap> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha', 'seriesColor'],
'label-selector': ['fontSize', 'color', 'showDimension', 'showQuota', 'showProportion'],
'legend-selector': ['icon', 'orient', 'fontSize', 'color', 'hPosition', 'vPosition'],

View File

@ -19,6 +19,7 @@ export class WordCloud extends G2PlotChartView<WordCloudOptions, G2WordCloud> {
properties: EditorProperty[] = [
'basic-style-selector',
'background-overall-component',
'border-style',
'title-selector',
'tooltip-selector',
'misc-selector',
@ -27,6 +28,7 @@ export class WordCloud extends G2PlotChartView<WordCloudOptions, G2WordCloud> {
]
propertyInner: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'basic-style-selector': ['colors', 'alpha'],
'title-selector': [
'title',

View File

@ -4,6 +4,7 @@ const { t } = useI18n()
export const PIE_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'title-selector',
'legend-selector',
@ -14,6 +15,7 @@ export const PIE_EDITOR_PROPERTY: EditorProperty[] = [
]
export const PIE_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'background-overall-component': ['all'],
'border-style': ['all'],
'label-selector': [
'fontSize',
'color',

View File

@ -1,5 +1,6 @@
export const TABLE_EDITOR_PROPERTY: EditorProperty[] = [
'background-overall-component',
'border-style',
'basic-style-selector',
'table-header-selector',
'table-cell-selector',
@ -12,6 +13,7 @@ export const TABLE_EDITOR_PROPERTY: EditorProperty[] = [
'linkage'
]
export const TABLE_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
'border-style': ['all'],
'background-overall-component': ['all'],
'basic-style-selector': ['tableColumnMode', 'tableBorderColor', 'tableScrollBarColor', 'alpha'],
'table-header-selector': [

View File

@ -14,6 +14,7 @@ const { t } = useI18n()
*/
export class TablePivot extends S2ChartView<PivotSheet> {
properties: EditorProperty[] = [
'border-style',
'background-overall-component',
'basic-style-selector',
'table-header-selector',

View File

@ -1,10 +1,16 @@
<script lang="ts" setup>
import { propTypes } from '@/utils/propTypes'
defineProps({
name: propTypes.string.def(''),
size: propTypes.number.def(0),
showDel: propTypes.bool.def(false)
})
const props = withDefaults(
defineProps<{
name?: string
size?: number
showDel?: boolean
}>(),
{
name: '',
size: 0,
showDel: false
}
)
const emits = defineEmits(['del'])
const del = () => {

@ -1 +1 @@
Subproject commit 11a3b6a066147549ac484dce7d8b4bbc2508f93a
Subproject commit 02f340953f92c485ea48229baf5ae73e59033301

View File

@ -12,10 +12,8 @@ import io.dataease.extensions.datasource.dto.SimpleDatasourceDTO;
import io.dataease.model.BusiNodeRequest;
import io.dataease.model.BusiNodeVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
@ -110,4 +108,12 @@ public interface DataFillingApi {
IPage<DfCommitLog> taskPager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody DfCommitLogRequest request);
@PostMapping("/form/{formId}/uploadFile")
DfExcelData excelUpload(@RequestParam("file") MultipartFile file, @PathVariable("formId") Long formId) throws Exception;
@GetMapping("/form/{formId}/excelTemplate")
void excelTemplate(@PathVariable("formId") Long formId);
@PostMapping("/form/{formId}/confirmUpload")
void confirmUpload(@PathVariable("formId") Long formId, @RequestBody Map<String, String> data);
}

View File

@ -1,8 +1,10 @@
package io.dataease.api.xpack.dataFilling.dto;
import lombok.Getter;
import lombok.Data;
import lombok.experimental.Accessors;
@Getter
@Data
@Accessors(chain = true)
public class DatasourceOptionsRequest {
private String optionTable;

View File

@ -0,0 +1,26 @@
package io.dataease.api.xpack.dataFilling.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
@Data
@Accessors(chain = true)
public class DfExcelData implements Serializable {
@Serial
private static final long serialVersionUID = 1162581256875641808L;
private List<ExtTableField> formFields;
private List<RowDataDatum> dataList;
private String id;
private String excelName;
private String path;
private String suffix;
}

View File

@ -0,0 +1,155 @@
package io.dataease.api.xpack.dataFilling.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ExtTableField implements Serializable {
@Serial
private static final long serialVersionUID = 9021129395822053871L;
private String type;
private String typeName;
private String icon;
private String id;
private ExtTableFieldSetting settings;
private boolean removed;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class ExtTableFieldSetting implements Serializable {
@Serial
private static final long serialVersionUID = 8776508642526681125L;
private String name;
private boolean required;
private ExtTableFieldMapping mapping;
private String rangeSeparator;
private boolean unique;
private String inputType;
private String dateType;
private String placeholder;
private String startPlaceholder;
private String endPlaceholder;
private Integer optionSourceType;
@JsonSerialize(using = ToStringSerializer.class)
private Long optionDatasource;
private String optionTable;
private String optionColumn;
private String optionOrder;
private boolean multiple;
private boolean updateRuleCheck;
private List<Option> options;
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Option implements Serializable {
@Serial
private static final long serialVersionUID = -1681618296840344071L;
private String name;
private Object value;
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class ExtTableFieldMapping implements Serializable {
@Serial
private static final long serialVersionUID = 4233066732126872840L;
private String columnName;
//dateRange下对应两个字段
private String columnName1;
private String columnName2;
private String oldColumnName;
private String oldColumnName1;
private String oldColumnName2;
private BaseType type;
//长度
private Integer size;
//精度
private Integer accuracy;
}
public enum BaseType {
nvarchar, //字符串
text, //长文本
number, //整型数字
decimal, //小数数字
datetime //日期
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class TableField implements Serializable {
@Serial
private static final long serialVersionUID = 85092190247927362L;
private String columnName;
private String oldColumnName;
private BaseType type;
private boolean required;
private boolean primaryKey;
//长度
private Integer size;
//精度
private Integer accuracy;
private String comment;
}
}

View File

@ -0,0 +1,23 @@
package io.dataease.api.xpack.dataFilling.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serial;
import java.io.Serializable;
import java.util.Map;
@Data
@Accessors(chain = true)
public class RowDataDatum implements Serializable {
@Serial
private static final long serialVersionUID = -2838784450721979776L;
private Long id;
private Map<String, Object> data;
private boolean insert;
}

View File

@ -2,8 +2,10 @@ package io.dataease.exception;
import io.dataease.result.ResultCode;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class DEException extends RuntimeException {
private int code;

View File

@ -1,6 +1,5 @@
package io.dataease.commons.utils;
package io.dataease.utils;
import io.dataease.utils.LogUtil;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;