forked from github/dataease
Merge branch 'dev-v2' into pr@dev-v2@refactor_ai
This commit is contained in:
commit
424a7933f7
@ -25,6 +25,7 @@ import { copyStoreWithOut } from '@/store/modules/data-visualization/copy'
|
|||||||
import TabsGroup from '@/custom-component/component-group/TabsGroup.vue'
|
import TabsGroup from '@/custom-component/component-group/TabsGroup.vue'
|
||||||
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
||||||
import OuterParamsSet from '@/components/visualization/OuterParamsSet.vue'
|
import OuterParamsSet from '@/components/visualization/OuterParamsSet.vue'
|
||||||
|
import { XpackComponent } from '@/components/plugin'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const snapshotStore = snapshotStoreWithOut()
|
const snapshotStore = snapshotStoreWithOut()
|
||||||
@ -102,7 +103,8 @@ const previewOuter = () => {
|
|||||||
}
|
}
|
||||||
canvasSave(() => {
|
canvasSave(() => {
|
||||||
const url = '#/preview?dvId=' + dvInfo.value.id
|
const url = '#/preview?dvId=' + dvInfo.value.id
|
||||||
window.open(url, '_blank')
|
const newWindow = window.open(url, '_blank')
|
||||||
|
initOpenHandler(newWindow)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,6 +325,17 @@ const onDvNameChange = () => {
|
|||||||
}
|
}
|
||||||
const appStore = useAppStoreWithOut()
|
const appStore = useAppStoreWithOut()
|
||||||
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
||||||
|
|
||||||
|
const openHandler = ref(null)
|
||||||
|
const initOpenHandler = newWindow => {
|
||||||
|
if (openHandler?.value) {
|
||||||
|
const pm = {
|
||||||
|
methodName: 'initOpenHandler',
|
||||||
|
args: newWindow
|
||||||
|
}
|
||||||
|
openHandler.value.invokeMethod(pm)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -574,6 +587,7 @@ const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
|||||||
/>
|
/>
|
||||||
<outer-params-set ref="outerParamsSetRef"> </outer-params-set>
|
<outer-params-set ref="outerParamsSetRef"> </outer-params-set>
|
||||||
</div>
|
</div>
|
||||||
|
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@ -498,6 +498,7 @@ const handleBeforeClose = () => {
|
|||||||
inputCom.value?.mult?.handleClickOutside?.()
|
inputCom.value?.mult?.handleClickOutside?.()
|
||||||
handleDialogClick()
|
handleDialogClick()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
visiblePopover.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirmClick = () => {
|
const confirmClick = () => {
|
||||||
@ -1408,12 +1409,34 @@ defineExpose({
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-item" v-if="+curComponent.displayType === 0">
|
<div class="list-item" v-if="+curComponent.displayType === 0">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<el-checkbox v-model="curComponent.showEmpty" label="选项值包含空数据" />
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
content="绑定参数后,不支持传空数据"
|
||||||
|
:disabled="!curComponent.parametersCheck"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
:disabled="curComponent.parametersCheck"
|
||||||
|
v-model="curComponent.showEmpty"
|
||||||
|
label="选项值包含空数据"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-item">
|
<div class="list-item">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<el-checkbox v-model="curComponent.parametersCheck" label="绑定参数" />
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
content="空数据不支持传参数"
|
||||||
|
:disabled="!curComponent.showEmpty"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
:disabled="curComponent.showEmpty"
|
||||||
|
v-model="curComponent.parametersCheck"
|
||||||
|
label="绑定参数"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="curComponent.parametersCheck">
|
<template v-if="curComponent.parametersCheck">
|
||||||
<div v-if="curComponent.displayType !== '7'" class="parameters">
|
<div v-if="curComponent.displayType !== '7'" class="parameters">
|
||||||
@ -1701,8 +1724,10 @@ defineExpose({
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #dee0e3;
|
border: 1px solid #dee0e3;
|
||||||
display: flex;
|
display: flex;
|
||||||
.ed-checkbox__label:hover {
|
.ed-checkbox:not(.is-disabled) {
|
||||||
color: #1f2329;
|
.ed-checkbox__label:hover {
|
||||||
|
color: #1f2329;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.query-condition-list {
|
.query-condition-list {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -96,7 +96,7 @@ onMounted(() => {
|
|||||||
</el-menu>
|
</el-menu>
|
||||||
<div class="operate-setting" v-if="!desktop">
|
<div class="operate-setting" v-if="!desktop">
|
||||||
<XpackComponent jsname="c3dpdGNoZXI=" />
|
<XpackComponent jsname="c3dpdGNoZXI=" />
|
||||||
<el-icon class="ai-icon" v-if="aiBaseUrl">
|
<el-icon style="margin: 0 10px" class="ai-icon" v-if="aiBaseUrl">
|
||||||
<Icon name="dv-ai" @click="handleAiClick" />
|
<Icon name="dv-ai" @click="handleAiClick" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<ToolboxCfg v-if="showToolbox" />
|
<ToolboxCfg v-if="showToolbox" />
|
||||||
|
@ -23,7 +23,7 @@ const { start, done } = useNProgress()
|
|||||||
const { loadStart, loadDone } = usePageLoading()
|
const { loadStart, loadDone } = usePageLoading()
|
||||||
|
|
||||||
const whiteList = ['/login', '/de-link', '/chart-view'] // 不重定向白名单
|
const whiteList = ['/login', '/de-link', '/chart-view'] // 不重定向白名单
|
||||||
const embeddedWindowWhiteList = ['/dvCanvas', '/dashboard']
|
const embeddedWindowWhiteList = ['/dvCanvas', '/dashboard', '/preview']
|
||||||
const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset-embedded-form']
|
const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset-embedded-form']
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
start()
|
start()
|
||||||
|
@ -9,6 +9,7 @@ import { Base64 } from 'js-base64'
|
|||||||
import { getOuterParamsInfo } from '@/api/visualization/outerParams'
|
import { getOuterParamsInfo } from '@/api/visualization/outerParams'
|
||||||
import { ElMessage } from 'element-plus-secondary'
|
import { ElMessage } from 'element-plus-secondary'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
import { XpackComponent } from '@/components/plugin'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -92,8 +93,10 @@ const loadCanvasDataAsync = async (dvId, dvType) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
let p = null
|
||||||
onMounted(() => {
|
const XpackLoaded = () => p(true)
|
||||||
|
onMounted(async () => {
|
||||||
|
await new Promise(r => (p = r))
|
||||||
const { dvId, dvType } = router.currentRoute.value.query
|
const { dvId, dvType } = router.currentRoute.value.query
|
||||||
if (dvId) {
|
if (dvId) {
|
||||||
loadCanvasDataAsync(dvId, dvType)
|
loadCanvasDataAsync(dvId, dvType)
|
||||||
@ -118,6 +121,11 @@ defineExpose({
|
|||||||
:cur-gap="state.curPreviewGap"
|
:cur-gap="state.curPreviewGap"
|
||||||
></de-preview>
|
></de-preview>
|
||||||
</div>
|
</div>
|
||||||
|
<XpackComponent
|
||||||
|
jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvTmV3V2luZG93SGFuZGxlcg=="
|
||||||
|
@loaded="XpackLoaded"
|
||||||
|
@load-fail="XpackLoaded"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
@ -7,6 +7,7 @@ import DvDetailInfo from '@/views/common/DvDetailInfo.vue'
|
|||||||
import { storeApi, storeStatusApi } from '@/api/visualization/dataVisualization'
|
import { storeApi, storeStatusApi } from '@/api/visualization/dataVisualization'
|
||||||
import { ref, watch, computed } from 'vue'
|
import { ref, watch, computed } from 'vue'
|
||||||
import ShareVisualHead from '@/views/share/share/ShareVisualHead.vue'
|
import ShareVisualHead from '@/views/share/share/ShareVisualHead.vue'
|
||||||
|
import { XpackComponent } from '@/components/plugin'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const appStore = useAppStoreWithOut()
|
const appStore = useAppStoreWithOut()
|
||||||
const { dvInfo } = storeToRefs(dvMainStore)
|
const { dvInfo } = storeToRefs(dvMainStore)
|
||||||
@ -16,7 +17,8 @@ const { t } = useI18n()
|
|||||||
const favorited = ref(false)
|
const favorited = ref(false)
|
||||||
const preview = () => {
|
const preview = () => {
|
||||||
const url = '#/preview?dvId=' + dvInfo.value.id
|
const url = '#/preview?dvId=' + dvInfo.value.id
|
||||||
window.open(url, '_blank')
|
const newWindow = window.open(url, '_blank')
|
||||||
|
initOpenHandler(newWindow)
|
||||||
}
|
}
|
||||||
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
||||||
|
|
||||||
@ -33,7 +35,8 @@ const downloadAsAppTemplate = downloadType => {
|
|||||||
|
|
||||||
const dvEdit = () => {
|
const dvEdit = () => {
|
||||||
const baseUrl = dvInfo.value.type === 'dataV' ? '#/dvCanvas?dvId=' : '#/dashboard?resourceId='
|
const baseUrl = dvInfo.value.type === 'dataV' ? '#/dvCanvas?dvId=' : '#/dashboard?resourceId='
|
||||||
window.open(baseUrl + dvInfo.value.id, '_blank')
|
const newWindow = window.open(baseUrl + dvInfo.value.id, '_blank')
|
||||||
|
initOpenHandler(newWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
const executeStore = () => {
|
const executeStore = () => {
|
||||||
@ -58,6 +61,17 @@ watch(
|
|||||||
storeQuery()
|
storeQuery()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const openHandler = ref(null)
|
||||||
|
const initOpenHandler = newWindow => {
|
||||||
|
if (openHandler?.value) {
|
||||||
|
const pm = {
|
||||||
|
methodName: 'initOpenHandler',
|
||||||
|
args: newWindow
|
||||||
|
}
|
||||||
|
openHandler.value.invokeMethod(pm)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -147,6 +161,7 @@ watch(
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
@ -225,6 +225,10 @@ watch(
|
|||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
height: calc(100% - 110px);
|
height: calc(100% - 110px);
|
||||||
|
|
||||||
|
:deep(.ed-table__row):hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.name-content {
|
.name-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -432,6 +432,10 @@ const getEmptyDesc = (): string => {
|
|||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
height: calc(100% - 110px);
|
height: calc(100% - 110px);
|
||||||
|
|
||||||
|
:deep(.ed-table__row):hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.name-content {
|
.name-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 299cd6287249a793abd799f39c40b45d01eb2336
|
Subproject commit fac43165280525519002d8aed6882ce691169280
|
Loading…
Reference in New Issue
Block a user