Merge branch 'dev-v2' into pr@dev-v2@refactor_panel

This commit is contained in:
王嘉豪 2024-03-26 00:01:19 +08:00 committed by GitHub
commit 41c7f83fe9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
57 changed files with 167 additions and 546 deletions

View File

@ -217,7 +217,7 @@ public class CalciteProvider {
if (StringUtils.isEmpty(configuration.getSchema())) {
DEException.throwException(Translator.get("i18n_schema_is_empty"));
}
sql = String.format("SELECT COLNAME , TYPENAME , REMARKS FROM SYSCAT.COLUMNS WHERE TABSCHEMA = 'DB2INST1' AND TABNAME = 'MJQTEST' ", configuration.getSchema(), datasourceRequest.getTable());
sql = String.format("SELECT COLNAME , TYPENAME , REMARKS FROM SYSCAT.COLUMNS WHERE TABSCHEMA = '%s' AND TABNAME = '%s' ", configuration.getSchema(), datasourceRequest.getTable());
break;
case sqlServer:
configuration = JsonUtil.parseObject(datasourceRequest.getDatasource().getConfiguration(), Sqlserver.class);

View File

@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.util.Arrays;
import java.util.List;
@ -28,7 +29,9 @@ public class H2EngineProvider extends EngineProvider {
CoreDatasource datasource = new CoreDatasource();
BeanUtils.copyBean(datasource, engineRequest.getEngine());
try (Connection connection = getConnection(datasource); Statement stat = getStatement(connection, queryTimeout)) {
Boolean result = stat.execute(engineRequest.getQuery());
PreparedStatement preparedStatement = connection.prepareStatement(engineRequest.getQuery());
preparedStatement.setQueryTimeout(queryTimeout);
Boolean result = preparedStatement.execute();
} catch (Exception e) {
throw e;
}

View File

@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.util.Arrays;
import java.util.List;
@ -32,7 +33,9 @@ public class MysqlEngineProvider extends EngineProvider {
CoreDatasource datasource = new CoreDatasource();
BeanUtils.copyBean(datasource, engineRequest.getEngine());
try (Connection connection = getConnection(datasource); Statement stat = getStatement(connection, queryTimeout)) {
Boolean result = stat.execute(engineRequest.getQuery());
PreparedStatement preparedStatement = connection.prepareStatement(engineRequest.getQuery());
preparedStatement.setQueryTimeout(queryTimeout);
Boolean result = preparedStatement.execute();
} catch (Exception e) {
throw e;
}

View File

@ -58,7 +58,7 @@ public class Utils {
originField = originField.replaceAll("\\[" + ele.getId() + "]",
String.format(SQLConstants.FIELD_NAME, tableObj.getTableAlias(), ele.getDataeaseName()));
} else {
originField = originField.replaceAll("\\[" + ele.getId() + "]", ele.getOriginName());
originField = originField.replaceAll("\\[" + ele.getId() + "]", "(" + ele.getOriginName() + ")");
originField = buildCalcField(originField, tableObj, originFields, i);
}
}

View File

@ -5,13 +5,12 @@ import { layerStoreWithOut } from '@/store/modules/data-visualization/layer'
import { storeToRefs } from 'pinia'
import { ElIcon, ElRow } from 'element-plus-secondary'
import Icon from '../icon-custom/src/Icon.vue'
import { computed, nextTick, ref, toRefs } from 'vue'
import { nextTick, ref, toRefs } from 'vue'
import draggable from 'vuedraggable'
import { lockStoreWithOut } from '@/store/modules/data-visualization/lock'
import ContextMenuAsideDetails from '@/components/data-visualization/canvas/ContextMenuAsideDetails.vue'
import ComposeShow from '@/components/data-visualization/canvas/ComposeShow.vue'
import { composeStoreWithOut } from '@/store/modules/data-visualization/compose'
import { propTypes } from '@/utils/propTypes'
const dropdownMore = ref(null)
const lockStore = lockStoreWithOut()
@ -20,7 +19,7 @@ const snapshotStore = snapshotStoreWithOut()
const layerStore = layerStoreWithOut()
const composeStore = composeStoreWithOut()
const { areaData, isCtrlOrCmdDown, isShiftDown, laterIndex } = storeToRefs(composeStore)
const { areaData } = storeToRefs(composeStore)
const { curComponent, canvasViewInfo } = storeToRefs(dvMainStore)
@ -36,69 +35,13 @@ const getComponent = index => {
const transformIndex = index => {
return componentData.value.length - 1 - index
}
const areaDataPush = component => {
if (component && !component.isLock && component.isShow && component.canvasId === 'canvas-main') {
areaData.value.components.push(component)
}
}
// shift
// 1.laterIndexlaterIndex=0;
// 2.index curClickIndex;
// 3.laterIndex curClickIndex;
// 4.[laterIndex,curClickIndex] [curClickIndex,laterIndex]areaData.value.components();
const shiftDataPush = curClickIndex => {
const areaDataIdArray = areaData.value.components.map(com => com.id)
let indexBegin, indexEnd
const laterIndexTrans = laterIndex.value === null ? componentData.value.length : laterIndex.value
if (laterIndexTrans < curClickIndex) {
indexBegin = laterIndexTrans
indexEnd = curClickIndex
} else {
indexBegin = curClickIndex
indexEnd = laterIndexTrans
}
const shiftAreaComponents = componentData.value
.slice(indexBegin, indexEnd + 1)
.filter(
component => !areaDataIdArray.includes(component.id) && !component.isLock && component.isShow
)
areaData.value.components.push(...shiftAreaComponents)
dvMainStore.setCurComponent({ component: null, index: null })
}
const onClick = (e, index) => {
const onClick = index => {
setCurComponent(index)
//
areaData.value.components.splice(0, areaData.value.components.length)
}
const onClickBack = (e, index) => {
// laterIndex=0
if (!curComponent.value) {
composeStore.setLaterIndex(null)
}
// ctrl or command (ComposeShow)
if (isCtrlOrCmdDown.value && !areaData.value.components.includes(componentData.value[index])) {
areaDataPush(componentData.value[index])
if (curComponent.value && curComponent.value.id !== componentData.value[index].id) {
areaDataPush(curComponent.value)
}
dvMainStore.setCurComponent({ component: null, index: null })
e.stopPropagation()
composeStore.setLaterIndex(index)
return
}
//shift
if (isShiftDown.value) {
shiftDataPush(index)
return
}
//
areaData.value.components.splice(0, areaData.value.components.length)
setCurComponent(index)
composeStore.setLaterIndex(index)
}
const setCurComponent = index => {
dvMainStore.setCurComponent({ component: componentData.value[index], index })
}
@ -237,7 +180,7 @@ const handleContextMenu = e => {
(curComponent && curComponent?.id === getComponent(index)?.id) ||
areaData.components.includes(getComponent(index))
}"
@click="onClick($event, transformIndex(index))"
@click="onClick(transformIndex(index))"
>
<el-icon class="component-icon">
<Icon :name="getIconName(getComponent(index))"></Icon>

View File

@ -9,7 +9,7 @@ import {
syncShapeItemStyle
} from '@/utils/style'
import $ from 'jquery'
import { _$, deepCopy, isPreventDrop } from '@/utils/utils'
import { _$, isPreventDrop } from '@/utils/utils'
import ContextMenu from './ContextMenu.vue'
import MarkLine from './MarkLine.vue'
import Area from './Area.vue'
@ -639,7 +639,7 @@ function findPositionX(item) {
let pb = positionBox.value
if (width <= 0) return
// component y1
componentData.value.forEach((component, index) => {
componentData.value.forEach(component => {
const componentYIndex = component.y + component.sizeY - 2
if (checkPointYIndex < componentYIndex) {
checkPointYIndex = componentYIndex

View File

@ -70,8 +70,7 @@ const {
showPosition,
previewActive,
downloadStatus,
outerScale,
userId
outerScale
} = toRefs(props)
const domId = 'preview-' + canvasId.value
const scaleWidth = ref(100)

View File

@ -157,7 +157,6 @@ const state = reactive({
collisionGap: 10 // ,
})
const minGap = 15
const contentDisplay = ref(true)
const shapeLock = computed(() => {
@ -404,7 +403,7 @@ const areaDataPush = component => {
areaData.value.components.push(component)
}
}
const handleDbClick = e => {
const handleDbClick = () => {
if (element.value.canvasId !== 'canvas-main') {
dvMainStore.setCurComponent({ component: element.value, index: index.value })
}
@ -674,8 +673,6 @@ const handleMouseDownOnPoint = (point, e) => {
const widthOffset = style.width - defaultStyle.value.width
//
const adaptorWidthOffset = heightOffset * originRadio
//
const adaptorHeightOffset = widthOffset / originRadio
if (pointCorner.includes(point)) {
style.height = defaultStyle.value.width / originRadio
} else if (Math.abs(widthOffset) > Math.abs(adaptorWidthOffset)) {

View File

@ -45,7 +45,7 @@
<el-input
v-if="curEditDataId === data.paramsInfoId"
v-model="data.paramName"
size="mini"
size="small"
:placeholder="$t('visualization.input_param_name')"
@blur="closeEdit"
/>
@ -91,7 +91,7 @@
v-model="targetViewInfo.targetViewId"
filterable
style="width: 100%"
size="mini"
size="small"
:placeholder="t('visualization.please_select')"
@change="viewInfoOnChange(targetViewInfo)"
>
@ -125,7 +125,7 @@
filterable
:disabled="fieldIdDisabledCheck(targetViewInfo)"
style="width: 100%"
size="mini"
size="small"
:placeholder="t('visualization.please_select')"
>
<el-option
@ -166,8 +166,8 @@
</el-row>
</el-row>
<el-row class="root-class">
<el-button size="mini" @click="cancel()">{{ t('commons.cancel') }} </el-button>
<el-button type="primary" size="mini" @click="save()"
<el-button size="small" @click="cancel()">{{ t('commons.cancel') }} </el-button>
<el-button type="primary" size="small" @click="save()"
>{{ t('commons.confirm') }}
</el-button>
</el-row>
@ -190,9 +190,8 @@ import HandleMore from '@/components/handle-more/src/HandleMore.vue'
import { fieldType } from '@/utils/attr'
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
const dvMainStore = dvMainStoreWithOut()
const { dvInfo, componentData, canvasStyleData } = storeToRefs(dvMainStore)
const { dvInfo, componentData } = storeToRefs(dvMainStore)
const outerParamsInfoTree = ref(null)
const emits = defineEmits(['outerParamsSetVisibleChange'])
const { t } = useI18n()
const curEditDataId = ref(null)
@ -294,7 +293,6 @@ const initParams = () => {
state.outerParamsInfoArray.forEach(outerParamsInfo => {
state.mapOuterParamsInfoArray[outerParamsInfo.paramsInfoId] = outerParamsInfo
})
const firstNode = state.outerParamsInfoArray[0]
state.curNodeId = null
nextTick(() => {
// outerParamsInfoTree.value.setCurrentKey(firstNode.paramsInfoId)
@ -317,7 +315,7 @@ const save = () => {
})
return
}
updateOuterParamsSet(state.outerParams).then(rsp => {
updateOuterParamsSet(state.outerParams).then(() => {
ElMessage({
message: t('commons.save_success'),
type: 'success',
@ -360,18 +358,6 @@ const getPanelViewList = dvId => {
})
}
const panelNodeClick = (data, node) => {
state.outerParamsInfo.targetViewInfoList = []
getPanelViewList(data.id)
}
const inputVal = value => {
if (!value) {
state.outerParamsInfo.targetViewInfoList = []
state.viewIdFieldArrayMap = {}
state.currentLinkPanelViewArray = []
}
}
const addOuterParamsField = () => {
state.outerParamsInfo.targetViewInfoList.push({
targetViewId: '',
@ -382,13 +368,6 @@ const deleteOuterParamsField = index => {
state.outerParamsInfo.targetViewInfoList.splice(index, 1)
}
const normalizer = node => {
// children=null
if (node.children === null || node.children === 'null') {
delete node.children
}
}
const viewInfoOnChange = targetViewInfo => {
if (
state.viewIdFieldArrayMap[targetViewInfo.targetViewId] &&
@ -589,7 +568,7 @@ defineExpose({
border-radius: 3px;
}
v-deep(.ed-popover) {
:deep(.ed-popover) {
height: 200px;
overflow: auto;
}
@ -610,11 +589,11 @@ v-deep(.ed-popover) {
overflow-y: auto;
}
v-deep(.vue-treeselect__control) {
:deep(.vue-treeselect__control) {
height: 28px;
}
v-deep(.vue-treeselect__single-value) {
:deep(.vue-treeselect__single-value) {
color: #606266;
line-height: 28px !important;
}
@ -635,32 +614,32 @@ v-deep(.vue-treeselect__single-value) {
text-align: center;
}
v-deep(.vue-treeselect__placeholder) {
:deep(.vue-treeselect__placeholder) {
line-height: 28px;
}
v-deep(.ed-tree--highlight-current .ed-tree-node.is-current > .ed-tree-node__content) {
:deep(.ed-tree--highlight-current .ed-tree-node.is-current > .ed-tree-node__content) {
background-color: #8dbbef !important;
}
.tree-content ::v-deep(.ed-input__inner) {
.tree-content ::deep(.ed-input__inner) {
background: transparent;
border: 0px !important;
}
.params-class ::v-deep(.ed-dialog__title) {
.params-class ::deep(.ed-dialog__title) {
font-size: 14px;
}
.params-class ::v-deep(.ed-dialog__headerbtn) {
.params-class ::deep(.ed-dialog__headerbtn) {
z-index: 2;
}
.params-class ::v-deep(.ed-dialog__header) {
.params-class ::deep(.ed-dialog__header) {
padding: 20px 20px 0;
}
.params-class ::v-deep(.ed-dialog__body) {
.params-class ::deep(.ed-dialog__body) {
padding: 10px 20px 20px;
}
</style>

View File

@ -58,7 +58,6 @@ import { useI18n } from '@/hooks/web/useI18n'
import { deepCopy } from '@/utils/utils'
import ChartComponentS2 from '@/views/chart/components/views/components/ChartComponentS2.vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { VIEW_DETAILS_BASH_STYLE } from '@/views/chart/components/editor/util/dataVisualiztion'
import { exportExcelDownload } from '@/views/chart/components/js/util'
import { storeToRefs } from 'pinia'
import { assign } from 'lodash-es'

View File

@ -107,7 +107,6 @@ const onPositionChange = key => {
if (curComponent.value.component === 'Group') {
//Group
const parentNode = document.querySelector('#editor-canvas-main')
groupSizeStyleAdaptor(curComponent.value)
}

View File

@ -3,7 +3,7 @@
</template>
<script setup lang="ts">
const props = defineProps({
defineProps({
propValue: {
type: String,
required: true,

View File

@ -1,15 +1,11 @@
<script setup lang="ts">
import CommonAttr from '@/custom-component/common/CommonAttr.vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { storeToRefs } from 'pinia'
import { ElIcon, ElMessage } from 'element-plus-secondary'
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
import { beforeUploadCheck, uploadFileResult } from '@/api/staticResource'
import { imgUrlTrans } from '@/utils/imgUtils'
import eventBus from '@/utils/eventBus'
import ImgViewDialog from '@/custom-component/ImgViewDialog.vue'
withDefaults(
defineProps<{
@ -21,54 +17,17 @@ withDefaults(
)
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const { curComponent } = storeToRefs(dvMainStore)
const fileList = ref([])
const dialogImageUrl = ref('')
const dialogVisible = ref(false)
const uploadDisabled = ref(false)
const files = ref(null)
const maxImageSize = 15000000
const handlePictureCardPreview = file => {
dialogImageUrl.value = file.url
dialogVisible.value = true
}
const handleRemove = (_, fileList) => {
uploadDisabled.value = false
curComponent.value.propValue.url = null
fileList.value = []
snapshotStore.recordSnapshotCache()
}
async function upload(file) {
uploadFileResult(file.file, fileUrl => {
snapshotStore.recordSnapshotCache()
curComponent.value.propValue.url = fileUrl
})
}
const goFile = () => {
files.value.click()
}
const reUpload = e => {
const file = e.target.files[0]
if (file.size > maxImageSize) {
sizeMessage()
}
uploadFileResult(file, fileUrl => {
snapshotStore.recordSnapshotCache()
curComponent.value.propValue.url = fileUrl
fileList.value = [{ url: imgUrlTrans(curComponent.value.propValue.url) }]
})
}
const sizeMessage = () => {
ElMessage.success('图片大小不符合')
}
const init = () => {
if (curComponent.value.propValue.url) {
fileList.value = [{ url: imgUrlTrans(curComponent.value.propValue.url) }]

View File

@ -3,8 +3,7 @@
</template>
<script setup lang="ts">
import { computed, toRefs } from 'vue'
const props = defineProps({
defineProps({
element: {
type: Object,
default() {
@ -14,10 +13,6 @@ const props = defineProps({
}
}
})
const { element } = toRefs(props)
const style = computed(() => element.value.style)
</script>
<style lang="less" scoped>

View File

@ -291,10 +291,6 @@ const moveActive = computed(() => {
return tabMoveInActiveId.value && tabMoveInActiveId.value === element.value.id
})
const dropdownShow = computed(() => {
return isEdit.value
})
const headClass = computed(() => {
if (tabsAreaScroll.value) {
return 'tab-head-left'

View File

@ -1,15 +1,10 @@
<script setup lang="ts">
import CommonAttr from '@/custom-component/common/CommonAttr.vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { storeToRefs } from 'pinia'
import { ElIcon, ElMessage } from 'element-plus-secondary'
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
import { beforeUploadCheck, uploadFileResult } from '@/api/staticResource'
import { imgUrlTrans } from '@/utils/imgUtils'
import eventBus from '@/utils/eventBus'
import ImgViewDialog from '@/custom-component/ImgViewDialog.vue'
import TimeClockFormat from '@/custom-component/de-time-clock/TimeClockFormat.vue'
withDefaults(
@ -22,54 +17,17 @@ withDefaults(
)
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const { curComponent } = storeToRefs(dvMainStore)
const fileList = ref([])
const dialogImageUrl = ref('')
const dialogVisible = ref(false)
const uploadDisabled = ref(false)
const files = ref(null)
const maxImageSize = 15000000
const handlePictureCardPreview = file => {
dialogImageUrl.value = file.url
dialogVisible.value = true
}
const handleRemove = (_, fileList) => {
uploadDisabled.value = false
curComponent.value.propValue.url = null
fileList.value = []
snapshotStore.recordSnapshotCache()
}
async function upload(file) {
uploadFileResult(file.file, fileUrl => {
snapshotStore.recordSnapshotCache()
curComponent.value.propValue.url = fileUrl
})
}
const goFile = () => {
files.value.click()
}
const reUpload = e => {
const file = e.target.files[0]
if (file.size > maxImageSize) {
sizeMessage()
}
uploadFileResult(file, fileUrl => {
snapshotStore.recordSnapshotCache()
curComponent.value.propValue.url = fileUrl
fileList.value = [{ url: imgUrlTrans(curComponent.value.propValue.url) }]
})
}
const sizeMessage = () => {
ElMessage.success('图片大小不符合')
}
const init = () => {
if (curComponent.value.propValue.url) {
fileList.value = [{ url: imgUrlTrans(curComponent.value.propValue.url) }]

View File

@ -5,30 +5,10 @@
</template>
<script setup lang="ts">
import { computed, nextTick, toRefs, getCurrentInstance, onMounted } from 'vue'
import TimeDefault from '@/custom-component/de-time-clock/TimeDefault.vue'
const props = defineProps({
defineProps({
element: {
type: Object
}
})
const { element } = toRefs(props)
let currentInstance
const timeMargin = computed(() => {
return element.value.style.time_margin
})
onMounted(() => {
currentInstance = getCurrentInstance()
})
const chartResize = () => {
const dataRefs = currentInstance.proxy
nextTick(() => {
dataRefs.$refs[element.value.id] &&
dataRefs.$refs[element.value.id].resize &&
dataRefs.$refs[element.value.id].resize()
})
}
</script>

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { computed, getCurrentInstance, onMounted, onUnmounted, reactive, toRefs } from 'vue'
import { onMounted, onUnmounted, reactive, toRefs } from 'vue'
const props = defineProps({
element: {

View File

@ -53,7 +53,7 @@ const props = defineProps({
}
})
const { propValue, dvInfo, searchCount, element, scale } = toRefs(props)
const { propValue, dvInfo, element, scale } = toRefs(props)
const customCanvasStyle = computed(() => {
const result = sourceCanvasStyle
result.scale = canvasStyleData.value.scale

View File

@ -39,7 +39,7 @@ const props = defineProps({
}
})
const { view, showPosition, scale, terminal } = toRefs(props)
const { view, scale, terminal } = toRefs(props)
const dvMainStore = dvMainStoreWithOut()

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
const props = defineProps({
defineProps({
propValue: {
type: String,
required: true,

View File

@ -96,7 +96,7 @@ const props = defineProps({
}
})
const { scale, element, editMode, active, disabled, showPosition } = toRefs(props)
const { element, editMode, active, disabled, showPosition } = toRefs(props)
const state = reactive({
data: null,

View File

@ -30,19 +30,19 @@ const props = defineProps({
}
}
})
const { propValue, element } = toRefs(props)
const { element } = toRefs(props)
const points = ref('')
watch(
() => element.value.style.width,
val => {
() => {
draw()
}
)
watch(
() => element.value.style.height,
val => {
() => {
draw()
}
)

View File

@ -163,7 +163,7 @@ const isRange = computed(() => {
})
const showPopupRight = () => {
const [_, end] = selectValue.value || []
const end = selectValue.value?.length > 1 ? selectValue.value[1] : null
if (!!end) {
const time = new Date(end)
currentDate.value = [

View File

@ -103,7 +103,7 @@ onMounted(() => {
}
.logo {
color: var(--ed-color-black) !important;
color: #3371ff !important;
}
}
.header-flex {

View File

@ -94,7 +94,7 @@ const navigate = computed(() => appearanceStore.getNavigate)
.system,
.de-logo {
color: var(--ed-color-black) !important;
color: #3371ff !important;
}
}
.header-flex {

View File

@ -1,117 +0,0 @@
<script lang="ts" setup>
import { computed } from 'vue'
import { ElHeader } from 'element-plus-secondary'
import { useRouter } from 'vue-router'
import AccountOperator from '@/layout/components/AccountOperator.vue'
import { useAppearanceStoreWithOut } from '@/store/modules/appearance'
const appearanceStore = useAppearanceStoreWithOut()
const { push } = useRouter()
const backToMain = () => {
push('/workbranch/index')
}
const navigateBg = computed(() => appearanceStore.getNavigateBg)
const navigate = computed(() => appearanceStore.getNavigate)
</script>
<template>
<el-header
class="header-flex system-header"
:class="{ 'header-light': navigateBg && navigateBg === 'light' }"
>
<img class="logo" v-if="navigate" :src="navigate" alt="" />
<Icon v-else className="logo" name="logo"></Icon>
<el-divider direction="vertical" />
<span class="system">模板中心</span>
<div class="operate-setting">
<span @click="backToMain" class="work-bar flex-align-center">
<el-icon>
<Icon name="icon_left_outlined"></Icon>
</el-icon>
<span class="work">返回工作台</span>
</span>
<AccountOperator />
</div>
</el-header>
</template>
<style lang="less" scoped>
.system-header {
font-family: '阿里巴巴普惠体 3.0 55 Regular L3';
.logo {
width: 134px;
height: 34px;
}
.ed-divider {
margin: 0 24px;
border-color: rgba(255, 255, 255, 0.3);
}
.system {
color: #fff;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 24px;
}
.work-bar {
color: rgba(255, 255, 255, 0.8);
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 22px;
cursor: pointer;
.ed-icon {
margin-right: 4px;
font-size: 16px;
}
}
.avatar {
margin: 0 -7px 0 20px !important;
}
}
.header-light {
background-color: #ffffff !important;
box-shadow: 0px 0.5px 0px 0px #1f232926 !important;
:deep(.work-bar) {
color: var(--ed-color-black) !important;
}
}
.header-flex {
display: flex;
align-items: center;
height: 56px;
background-color: #050e21;
padding: 0 24px;
.operate-setting {
margin-left: auto;
display: flex;
align-items: center;
&:focus {
outline: none;
}
}
}
</style>
<style lang="less">
.header-flex {
.operate-setting {
.ed-icon {
cursor: pointer;
color: rgba(255, 255, 255, 0.8);
font-size: 18px;
}
}
}
.header-light {
.operate-setting {
.ed-icon {
color: var(--ed-color-black) !important;
}
}
}
</style>

View File

@ -1107,7 +1107,7 @@ export default {
select_year: '选择年',
sql_variable_limit_1: '1SQL 变量只能在 WHERE 条件中使用',
sql_variable_limit_2:
"2、示例select * from table_name where column_name1='${'{'}param_name1{'}'}' and column_name2 in (${'{'}param_name2{'}'})",
"2、示例:select * from table_name where column_name1='${'{'}param_name1{'}'}' and column_name2 in (${'{'}param_name2{'}'})",
select_month: '选择月',
select_date: '选择日期',
select_time: '选择时间',

View File

@ -1,10 +1,6 @@
<script setup lang="ts">
import { shallowRef, defineAsyncComponent } from 'vue'
import { propTypes } from '@/utils/propTypes'
import { useAppearanceStoreWithOut } from '@/store/modules/appearance'
const appearanceStore = useAppearanceStoreWithOut()
appearanceStore.setAppearance()
const VisualizationEditor = defineAsyncComponent(
() => import('@/views/data-visualization/index.vue')

View File

@ -97,6 +97,9 @@ const setupAll = async (
const appRes = await import('@/store/modules/app')
const appStore = appRes.useAppStoreWithOut()
appStore.setIsDataEaseBi(true)
const appearanceRes = await import('@/store/modules/appearance')
const appearanceStore = appearanceRes.useAppearanceStoreWithOut()
appearanceStore.setAppearance()
app.mount(dom)
return app
}

View File

@ -1,7 +1,7 @@
import { defineStore, storeToRefs } from 'pinia'
import { store } from '../../index'
import { dvMainStoreWithOut } from './dvMain'
import { _$, swap } from '@/utils/utils'
import { swap } from '@/utils/utils'
import { useEmitt } from '@/hooks/web/useEmitt'
import { getCurInfo } from '@/store/modules/data-visualization/common'

View File

@ -1,4 +1,4 @@
import { sin, cos, toPercent } from '@/utils/translate'
import { sin, cos } from '@/utils/translate'
import { imgUrlTrans } from '@/utils/imgUtils'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'

View File

@ -42,11 +42,10 @@ const domId = ref('de-canvas-' + canvasId.value)
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const { pcMatrixCount, curOriginThemes, dvInfo } = storeToRefs(dvMainStore)
const { pcMatrixCount, curOriginThemes } = storeToRefs(dvMainStore)
const canvasOut = ref(null)
const canvasInner = ref(null)
const canvasInitStatus = ref(false)
const userInfo = ref(null)
const state = reactive({
screenWidth: 1920,

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { PropType, computed, onMounted, reactive, toRefs, watch, nextTick, ref } from 'vue'
import { PropType, computed, onMounted, reactive, watch, nextTick } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import {
COLOR_PANEL,
@ -8,14 +8,10 @@ import {
DEFAULT_INDICATOR_NAME_STYLE,
DEFAULT_BASIC_STYLE
} from '@/views/chart/components/editor/util/chart'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { storeToRefs } from 'pinia'
import { cloneDeep, defaultsDeep } from 'lodash-es'
import { ElButton, ElIcon } from 'element-plus-secondary'
import { ElIcon } from 'element-plus-secondary'
import Icon from '@/components/icon-custom/src/Icon.vue'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
const dvMainStore = dvMainStoreWithOut()
const { batchOptStatus } = storeToRefs(dvMainStore)
const { t } = useI18n()
@ -46,8 +42,6 @@ const state = reactive({
basicStyleForm: {} as ChartBasicStyle
})
const { chart } = toRefs(props)
const fontSizeList = computed(() => {
const arr = []
for (let i = 10; i <= 60; i = i + 2) {

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { PropType, computed, onMounted, reactive, toRefs, watch, nextTick, ref } from 'vue'
import { PropType, computed, onMounted, reactive, watch, nextTick } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import {
COLOR_PANEL,
@ -8,14 +8,10 @@ import {
DEFAULT_INDICATOR_STYLE,
DEFAULT_BASIC_STYLE
} from '@/views/chart/components/editor/util/chart'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { storeToRefs } from 'pinia'
import { cloneDeep, defaultsDeep } from 'lodash-es'
import { ElButton, ElIcon, ElInput } from 'element-plus-secondary'
import { ElIcon, ElInput } from 'element-plus-secondary'
import Icon from '@/components/icon-custom/src/Icon.vue'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
const dvMainStore = dvMainStoreWithOut()
const { batchOptStatus } = storeToRefs(dvMainStore)
const { t } = useI18n()
@ -46,8 +42,6 @@ const state = reactive({
basicStyleForm: {} as ChartBasicStyle
})
const { chart } = toRefs(props)
const fontSizeList = computed(() => {
const arr = []
for (let i = 10; i <= 60; i = i + 2) {

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, onMounted, PropType, reactive, watch } from 'vue'
import { onMounted, PropType, reactive, watch } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { DEFAULT_TABLE_TOTAL } from '@/views/chart/components/editor/util/chart'
import { cloneDeep, defaultsDeep } from 'lodash-es'
@ -27,16 +27,6 @@ watch(
{ deep: true }
)
const fontSizeList = computed(() => {
const arr = []
for (let i = 10; i <= 40; i = i + 2) {
arr.push({
name: i + '',
value: i
})
}
return arr
})
const aggregations = [
{ name: t('chart.sum'), value: 'SUM' },
{ name: t('chart.avg'), value: 'AVG' },

View File

@ -10,8 +10,7 @@ import {
shallowRef,
ShallowRef,
toRaw,
toRefs,
watch
toRefs
} from 'vue'
import { getData } from '@/api/chart'
import chartViewManager from '@/views/chart/components/js/panel'

View File

@ -34,7 +34,7 @@
<el-row style="margin-top: 5px">
<el-col :span="4" class="name-area">名称</el-col>
<el-col :span="20">
<el-input v-model="state.dvCreateInfo.name" clearable size="mini" />
<el-input v-model="state.dvCreateInfo.name" clearable size="small" />
</el-col>
</el-row>
<el-row v-if="state.inputType === 'new_inner_template'" class="preview">
@ -52,8 +52,8 @@
:style="classBackground"
/>
<el-row class="root-class">
<el-button size="mini" @click="cancel()">{{ t('commons.cancel') }} </el-button>
<el-button type="primary" size="mini" :disabled="!saveStatus" @click="save()"
<el-button size="small" @click="cancel()">{{ t('commons.cancel') }} </el-button>
<el-button type="primary" size="small" :disabled="!saveStatus" @click="save()"
>{{ t('commons.confirm') }}
</el-button>
</el-row>
@ -119,7 +119,7 @@ const classBackground = computed(() => {
watch(
() => state.inputType,
val => {
() => {
createInit()
}
)
@ -211,7 +211,7 @@ const goFile = () => {
const close = () => {
state.dialogShow = false
}
const optInit = param => {
const optInit = () => {
state.dialogShow = true
createInit()
}

View File

@ -13,7 +13,7 @@
<script setup lang="ts">
import TemplateMarket from '@/views/template-market/index.vue'
import { nextTick, onMounted, reactive, ref } from 'vue'
import { nextTick, reactive, ref } from 'vue'
const templateMarketCreateRef = ref(null)
const state = reactive({

View File

@ -5,7 +5,7 @@
<el-input
v-model="state.templateFilterText"
:placeholder="t('visualization.filter_keywords')"
size="mini"
size="small"
clearable
prefix-icon="el-icon-search"
/>
@ -50,7 +50,7 @@ import { reactive } from 'vue'
const { t } = useI18n()
const emits = defineEmits(['showCurrentTemplateInfo'])
const props = defineProps({
defineProps({
curCanvasType: {
type: String,
required: true
@ -74,7 +74,7 @@ const filterNode = (value, data) => {
return data.label.indexOf(value) !== -1
}
const nodeClick = (data, node) => {
const nodeClick = data => {
if (data.nodeType === 'template') {
findOne(data.id).then(res => {
emits('showCurrentTemplateInfo', res.data)

View File

@ -15,7 +15,7 @@ import mobileHeader from '@/assets/img/mobile-header.png'
const dvMainStore = dvMainStoreWithOut()
const { componentData, canvasStyleData, canvasViewInfo, dvInfo } = storeToRefs(dvMainStore)
const mobileLoading = ref(true)
const mobileStyle = ref({})
const mobileStyle = ref(null)
const emits = defineEmits(['pcMode'])
const snapshotStore = snapshotStoreWithOut()
@ -62,7 +62,6 @@ const handleLoad = () => {
const componentDataNotInMobile = computed(() => {
return componentData.value.filter(ele => !ele.inMobile)
})
const openMobile = ref(false)
const hanedleMessage = event => {
if (event.data.type === 'panelInit') {
@ -114,6 +113,11 @@ const saveCanvasWithCheckFromMobile = () => {
}
let canvasDataPreview = []
const loadCanvasData = () => {
if (!dvInfo.value?.id) {
handleLoad()
mobileLoading.value = false
return
}
findById(dvInfo.value.id, 'dashboard')
.then(res => {
const canvasInfo = res.data
@ -132,16 +136,17 @@ const loadCanvasData = () => {
const setMobileStyle = debounce(() => {
const height = window.innerHeight
if (height > 1032) {
mobileStyle.value = {}
mobileStyle.value = {
transform: 'translateY(-50%)'
}
return
}
const scale = height / 1032
mobileStyle.value = {
top: `${60 + scale * 40}px`,
transform: `scale(${scale})`,
transform: `scale(${scale}) translateY(-50%)`,
transformOrigin: '0 0'
}
}, 500)
}, 100)
onMounted(() => {
window.addEventListener('message', hanedleMessage)
window.addEventListener('resize', setMobileStyle)
@ -211,7 +216,7 @@ const save = () => {
<el-button type="primary" @click="save">保存</el-button>
</div>
</div>
<div class="mobile-canvas" :style="mobileStyle">
<div class="mobile-canvas" :style="mobileStyle" v-if="mobileStyle">
<div class="mobile-header">
<img :src="mobileHeader" alt="" srcset="" />
</div>
@ -337,7 +342,7 @@ const save = () => {
overflow: hidden;
background-size: 100% 100% !important;
position: absolute;
top: 80px;
top: calc(50% + 32px);
left: calc(50% - 419px);
background-image: url(../../assets/img/mobile-bg-pc.png);
padding: 0 22px;
@ -395,14 +400,14 @@ const save = () => {
--ed-collapse-content-font-size: 12px;
}
:deep(.ed-tabs) {
& > :deep(.ed-tabs) {
--ed-tabs-header-height: 36px;
border-top: 1px solid #1f232926;
position: sticky;
top: 38px;
left: 0;
background: #fff;
z-index: 21;
z-index: 25;
.ed-tabs__header {
padding-left: 8px;
&::before {
@ -419,6 +424,9 @@ const save = () => {
:deep(.ed-tabs__item) {
font-size: 12px;
}
:deep(.ed-tabs__item):not(.is-active) {
color: #646a73;
}
@ -431,7 +439,7 @@ const save = () => {
top: 0;
left: 0;
background: #fff;
z-index: 21;
z-index: 25;
}
.config-mobile-tab {
@ -479,7 +487,7 @@ const save = () => {
right: 12px;
border: 2px solid #8f959e;
border-radius: 4px;
z-index: 20;
z-index: 24;
cursor: pointer;
&:hover {
border-color: var(--ed-color-primary-99, #3370ff99);

View File

@ -81,7 +81,7 @@
<div class="geo-area">
<div class="area-label"><span>上级区域</span></div>
<div class="area-content">
<span>{{ selectedData.parentName }}</span>
<span>{{ selectedData.parentName || '-' }}</span>
<span v-if="selectedData.pid" class="area-secondary">{{
'(' + selectedData.pid + ')'
}}</span>

View File

@ -124,14 +124,14 @@ const state = reactive({
watch(
() => state.marketActiveTab,
value => {
() => {
initTemplateShow()
}
)
watch(
() => state.searchText,
value => {
() => {
initTemplateShow()
}
)
@ -174,25 +174,10 @@ const initMarketTemplate = async () => {
})
}
const normalizer = node => {
// children=null
if (node.children === null || node.children === 'null') {
delete node.children
}
}
const templateApply = template => {
emits('templateApply', template)
}
const closeDialog = () => {
emits('closeDialog')
}
const handleClick = item => {
//handleClick
}
const initTemplateShow = () => {
state.hasResult = false
state.currentMarketTemplateShowList.forEach(template => {

View File

@ -205,21 +205,21 @@ const state = reactive({
watch(
() => state.templateType,
value => {
() => {
initTemplateShow()
}
)
watch(
() => state.searchText,
value => {
() => {
initTemplateShow()
}
)
watch(
() => props.previewId,
value => {
() => {
state.marketTemplatePreviewShowList.forEach(categoryTemplates => {
categoryTemplates.contents.forEach(template => {
if (props.previewId === template.id) {
@ -232,7 +232,7 @@ watch(
watch(
() => state.templateSourceType,
value => {
() => {
initTemplateShow()
}
)
@ -260,29 +260,10 @@ const initMarketTemplate = () => {
})
}
const getGroupTree = () => {
// do getGroupTree
}
const normalizer = node => {
// children=null
if (node.children === null || node.children === 'null') {
delete node.children
}
}
const templateApply = template => {
emits('templateApply', template)
}
const closeDialog = () => {
emits('closeDialog')
}
const handleClick = item => {
//handleClick
}
const initTemplateShow = () => {
state.hasResult = false
state.marketTemplatePreviewShowList.forEach(categoryTemplates => {

View File

@ -7,10 +7,10 @@
</el-row>
</el-row>
<el-row class="template-button">
<el-button size="mini" style="width: 141px" @click="templateInnerPreview">{{
<el-button size="small" style="width: 141px" @click="templateInnerPreview">{{
t('visualization.preview')
}}</el-button>
<el-button size="mini" style="width: 141px" type="primary" @click="apply">{{
<el-button size="small" style="width: 141px" type="primary" @click="apply">{{
t('visualization.apply')
}}</el-button>
</el-row>
@ -61,7 +61,7 @@ const apply = () => {
emits('templateApply', props.template)
}
const templateInnerPreview = e => {
const templateInnerPreview = () => {
emits('templatePreview', props.template.id)
}
</script>

View File

@ -80,7 +80,7 @@ const apply = () => {
emits('templateApply', props.template)
}
const templateInnerPreview = e => {
const templateInnerPreview = () => {
emits('templatePreview', props.template.id)
}
</script>

View File

@ -169,7 +169,6 @@ import { decompression } from '@/api/visualization/dataVisualization'
import { useCache } from '@/hooks/web/useCache'
import MarketPreviewV2 from '@/views/template-market/component/MarketPreviewV2.vue'
import { imgUrlTrans } from '@/utils/imgUtils'
import { deepCopy } from '@/utils/utils'
import CategoryTemplateV2 from '@/views/template-market/component/CategoryTemplateV2.vue'
import { interactiveStoreWithOut } from '@/store/modules/interactive'
const { t } = useI18n()
@ -322,21 +321,21 @@ const optInit = params => {
}
watch(
() => state.searchText,
value => {
() => {
initTemplateShow()
}
)
watch(
() => state.templateType,
value => {
() => {
initTemplateShow()
}
)
watch(
() => state.templateSourceType,
value => {
() => {
state.treeShow = false
initTemplateShow()
nextTick(() => {
@ -380,12 +379,6 @@ const initStyle = () => {
tree.firstElementChild.appendChild(line)
})
}
const normalizer = node => {
// children=null
if (node.children === null || node.children === 'null') {
delete node.children
}
}
const preOne = () => {
if (state.curTemplateIndex > 0) {
@ -443,9 +436,7 @@ const apply = () => {
state.loading = false
})
}
const handleClick = item => {
// do handleClick
}
const initTemplateShow = () => {
let tempHasResult = false
state.currentMarketTemplateShowList.forEach(template => {
@ -502,7 +493,7 @@ onMounted(() => {
const templateMainDom = document.getElementById('template-show-area')
// div
if (templateMainDom) {
erd.listenTo(templateMainDom, element => {
erd.listenTo(templateMainDom, () => {
nextTick(() => {
const offsetWidth = templateMainDom.offsetWidth - 26
const curSeparator = Math.trunc(offsetWidth / state.templateMiniWidth)

View File

@ -32,7 +32,7 @@
</template>
<script lang="ts" setup>
import { onMounted, reactive, ref } from 'vue'
import { onMounted, reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { batchUpdate, findCategoriesByTemplateIds } from '@/api/template'
import { ElMessage } from 'element-plus-secondary'
@ -89,7 +89,7 @@ const saveChange = () => {
ElMessage.warning('请选择分类')
return false
}
batchUpdate(params).then(rsp => {
batchUpdate(params).then(() => {
ElMessage({
message: '修改成功',
type: 'success',

View File

@ -65,8 +65,8 @@
</template>
<script lang="ts" setup>
import { save, nameCheck, find, findOne, categoryTemplateNameCheck } from '@/api/template'
import { computed, onMounted, reactive, ref } from 'vue'
import { save, nameCheck, findOne, categoryTemplateNameCheck } from '@/api/template'
import { computed, reactive, ref } from 'vue'
import { imgUrlTrans } from '@/utils/imgUtils'
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'
@ -146,12 +146,6 @@ const classBackground = computed(() => {
}
})
const showCurrentTemplate = pid => {
find({ pid }).then(response => {
state.nameList = response.data
})
}
const cancel = () => {
emits('closeEditTemplateDialog')
}
@ -235,7 +229,7 @@ const importTemplate = () => {
autofocus: false,
showClose: false
}).then(() => {
save(state.templateInfo).then(response => {
save(state.templateInfo).then(() => {
ElMessage.success(t('覆盖成功'))
emits('refresh', getRefreshPInfo())
emits('closeEditTemplateDialog')
@ -283,10 +277,6 @@ const doAddCategory = () => {
emits('refresh', { optType: 'addCategory' })
}
onMounted(() => {
// showCurrentTemplate(props.pid)
})
if (props.templateId) {
findOne(props.templateId).then(rsp => {
state.templateInfo = rsp.data

View File

@ -39,8 +39,6 @@
<script setup lang="ts">
import { imgUrlTrans } from '@/utils/imgUtils'
import { computed, toRefs } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
const emits = defineEmits(['command'])
const props = defineProps({
@ -55,11 +53,7 @@ const props = defineProps({
}
})
const { model, width, batchState } = toRefs(props)
const dvTypeName = computed(() => {
return props.model.dvType === 'dashboard' ? '仪表板' : '数据大屏'
})
const { model, batchState } = toRefs(props)
const classBackground = computed(() => {
return {

View File

@ -97,9 +97,7 @@ const nodeClick = ({ id, name }) => {
state.activeTemplate = id
emits('showCurrentTemplate', id, name)
}
const add = () => {
emits('showTemplateEditDialog', 'new')
}
const categoryDelete = template => {
ElMessageBox.confirm('确定删除该分类吗?', {
tip: '删除后不可恢复,是否继续?',
@ -119,10 +117,6 @@ const templateImport = template => {
emits('templateImport', template.id)
}
const handlerConfirm = options => {
// do handlerConfirm
}
defineExpose({
nodeClick
})

View File

@ -280,7 +280,7 @@ const batchPreDelete = () => {
templateIds: batchTemplateIds.value,
categories: [state.currentTemplateId]
}
batchDelete(params).then(rsp => {
batchDelete(params).then(() => {
ElMessage({
message: t('commons.delete_success'),
type: 'success',
@ -354,18 +354,10 @@ const handleCommand = (key, data) => {
}
}
const handlerConfirm = option => {
//do handlerConfirm
}
const templateDeleteConfirm = template => {
templateDeleteInfo(template.id)
}
const handleClick = (tab, event) => {
getTree()
}
const importRefresh = params => {
if (params.optType === 'refresh') {
templateListRef.value.nodeClick({ id: params.refreshPid, name: params.refreshPName })
@ -418,7 +410,7 @@ const templateDeleteInfo = id => {
autofocus: false,
showClose: false
}).then(() => {
templateDelete(id, state.currentTemplateId).then(response => {
templateDelete(id, state.currentTemplateId).then(() => {
ElMessage({
message: t('commons.delete_success'),
type: 'success',
@ -461,10 +453,6 @@ const templateEdit = templateInfo => {
state.templateDialog.templateId = templateInfo.id
}
const categoryClick = params => {
// do
}
const saveTemplateEdit = templateEditForm => {
if (templateEditForm.name === '最近使用') {
ElMessage({
@ -476,7 +464,7 @@ const saveTemplateEdit = templateEditForm => {
}
templateEditFormRef.value.validate(valid => {
if (valid) {
save({ ...templateEditForm }).then(response => {
save({ ...templateEditForm }).then(() => {
ElMessage({
message: '添加成功',
type: 'success',
@ -549,7 +537,7 @@ onMounted(() => {
const erd = elementResizeDetectorMaker()
const templateMainDom = document.getElementById('template-box')
// div
erd.listenTo(templateMainDom, element => {
erd.listenTo(templateMainDom, () => {
nextTick(() => {
const offsetWidth = templateMainDom.offsetWidth - 24
const curSeparator = Math.trunc(offsetWidth / state.templateMiniWidth)

View File

@ -163,14 +163,19 @@ const saveSqlNode = (val: SqlNode, cb) => {
info: state.visualNode.info,
tableName,
type: 'sql'
}).then(res => {
;((res as unknown as Field[]) || []).forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
cb?.()
confirmEditUnion()
})
.then(res => {
nodeField.value = res as unknown as Field[]
nodeField.value.forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
cb?.()
confirmEditUnion()
})
.finally(() => {
editUnion.value = true
})
confirm()
}
return
@ -212,6 +217,12 @@ const changeNodeFields = val => {
}
const closeEditUnion = () => {
const [fir] = state.nodeList
if (fir.isShadow) {
delete fir.isShadow
state.nodeList = []
emits('addComplete')
}
editUnion.value = false
}
let num = +new Date()
@ -242,6 +253,10 @@ const delUpdateDsFields = (id, arr: Node[]) => {
const confirmEditUnion = () => {
delUpdateDsFields(currentNode.value.id, state.nodeList)
const [fir] = state.nodeList
if (fir.isShadow) {
delete fir.isShadow
}
closeEditUnion()
nextTick(() => {
emits('updateAllfields')
@ -675,6 +690,7 @@ const drop_handler = ev => {
state.nodeList.push({
tableName,
type,
isShadow: true,
datasourceId,
id: guid(),
...extraData
@ -688,13 +704,17 @@ const drop_handler = ev => {
info: currentNode.value.info,
tableName,
type
}).then(res => {
;((res as unknown as Field[]) || []).forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
confirmEditUnion()
})
.then(res => {
nodeField.value = res as unknown as Field[]
nodeField.value.forEach(ele => {
ele.checked = true
})
state.nodeList[0].currentDsFields = cloneDeep(res)
})
.finally(() => {
editUnion.value = true
})
nextTick(() => {
emits('addComplete')
})
@ -945,7 +965,13 @@ const emits = defineEmits(['addComplete', 'joinEditor', 'updateAllfields'])
</span>
</template>
</el-dialog>
<el-drawer v-model="editUnion" custom-class="union-item-drawer" size="600px" direction="rtl">
<el-drawer
:before-close="closeEditUnion"
v-model="editUnion"
custom-class="union-item-drawer"
size="600px"
direction="rtl"
>
<template #header v-if="currentNode">
<div class="info">
<span class="name">{{ currentNode.tableName }}</span>

View File

@ -107,7 +107,7 @@
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue'
import { onMounted, reactive } from 'vue'
import { watermarkFind, watermarkSave } from '@/api/watermark'
import { ElMessage } from 'element-plus-secondary/es'
import { personInfoApi } from '@/api/user'
@ -159,7 +159,7 @@ const state = reactive({
}
})
const enableChange = val => {
const enableChange = () => {
initWatermark()
}
@ -172,7 +172,7 @@ const cancel = () => {
const params = {
settingContent: JSON.stringify(state.watermarkForm)
}
watermarkSave(params).then(rsp => {
watermarkSave(params).then(() => {
//ignore
})
initWatermark()
@ -182,7 +182,7 @@ const save = () => {
const params = {
settingContent: JSON.stringify(state.watermarkForm)
}
watermarkSave(params).then(rsp => {
watermarkSave(params).then(() => {
ElMessage.success('保存成功')
})
}

View File

@ -68,7 +68,7 @@ const apply = () => {
emits('templateApply', props.template)
}
const templateInnerPreview = e => {
const templateInnerPreview = () => {
emits('templatePreview', props.template.id)
}
</script>

View File

@ -1,6 +1,6 @@
<script lang="ts" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { ref, shallowRef, computed, reactive, watch, nextTick } from 'vue'
import { ref, shallowRef, computed, reactive, watch } from 'vue'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
import { useRequestStoreWithOut } from '@/store/modules/request'
@ -54,10 +54,6 @@ const handleExpandFold = () => {
expandFold.value = expandFold.value === 'expand' ? 'fold' : 'expand'
}
const showTemplate = computed(() => {
return state.networkStatus && state.hasResult
})
const createAuth = computed(() => {
return {
PANEL: havePanelAuth.value,

@ -1 +1 @@
Subproject commit c8e6cd3e8cf758a8353755134e79fb74a621f2e8
Subproject commit 137b8218ee27ecdd58656076423ae1bde1596007