forked from github/dataease
style(数据大屏、仪表板): 优化外部参数必填参数校验空值样式等
This commit is contained in:
parent
9cf47cac1c
commit
76b704127c
27
core/core-frontend/src/components/common/DeEmpty.vue
Normal file
27
core/core-frontend/src/components/common/DeEmpty.vue
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
import EmptyBackground from '../empty-background/src/EmptyBackground.vue'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-row class="custom-position">
|
||||||
|
<empty-background description="t('visualization.select_dimension_hint')" img-type="noneWhite" />
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.custom-position {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 14px;
|
||||||
|
flex-flow: row nowrap;
|
||||||
|
color: #646a73;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
</style>
|
@ -18,6 +18,7 @@ import CanvasFilterBtn from '@/custom-component/canvas-filter-btn/Component.vue'
|
|||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
import DatasetParamsComponent from '@/components/visualization/DatasetParamsComponent.vue'
|
import DatasetParamsComponent from '@/components/visualization/DatasetParamsComponent.vue'
|
||||||
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
|
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
|
||||||
|
import EmptyBackground from '../../empty-background/src/EmptyBackground.vue'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { pcMatrixCount, curComponent, mobileInPc, canvasState } = storeToRefs(dvMainStore)
|
const { pcMatrixCount, curComponent, mobileInPc, canvasState } = storeToRefs(dvMainStore)
|
||||||
const openHandler = ref(null)
|
const openHandler = ref(null)
|
||||||
@ -450,6 +451,7 @@ defineExpose({
|
|||||||
</template>
|
</template>
|
||||||
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||||
</div>
|
</div>
|
||||||
|
<empty-background v-if="!state.initState" description="参数不能为空" img-type="noneWhite" />
|
||||||
<de-fullscreen ref="fullScreeRef"></de-fullscreen>
|
<de-fullscreen ref="fullScreeRef"></de-fullscreen>
|
||||||
<dataset-params-component ref="customDatasetParamsRef"></dataset-params-component>
|
<dataset-params-component ref="customDatasetParamsRef"></dataset-params-component>
|
||||||
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||||
|
@ -14,6 +14,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import 'vant/es/nav-bar/style'
|
import 'vant/es/nav-bar/style'
|
||||||
import 'vant/es/sticky/style'
|
import 'vant/es/sticky/style'
|
||||||
|
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
const interactiveStore = interactiveStoreWithOut()
|
const interactiveStore = interactiveStoreWithOut()
|
||||||
const embeddedStore = useEmbedded()
|
const embeddedStore = useEmbedded()
|
||||||
@ -128,6 +129,7 @@ onBeforeMount(async () => {
|
|||||||
show-position="preview"
|
show-position="preview"
|
||||||
></de-preview>
|
></de-preview>
|
||||||
</div>
|
</div>
|
||||||
|
<empty-background v-if="!state.initState" description="参数不能为空" img-type="noneWhite" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@ -10,6 +10,7 @@ import { ElMessage } from 'element-plus-secondary'
|
|||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { XpackComponent } from '@/components/plugin'
|
import { XpackComponent } from '@/components/plugin'
|
||||||
|
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
const interactiveStore = interactiveStoreWithOut()
|
const interactiveStore = interactiveStoreWithOut()
|
||||||
const embeddedStore = useEmbedded()
|
const embeddedStore = useEmbedded()
|
||||||
@ -167,6 +168,7 @@ const onPointClick = param => {
|
|||||||
/>
|
/>
|
||||||
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||||
</div>
|
</div>
|
||||||
|
<empty-background v-if="!state.initState" description="参数不能为空" img-type="noneWhite" />
|
||||||
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1001,7 +1001,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
if (targetInfo.required && userParamsIsNull) {
|
if (targetInfo.required && userParamsIsNull) {
|
||||||
// 要求用户必填 但是用户没有输入参数
|
// 要求用户必填 但是用户没有输入参数
|
||||||
errorCount++
|
errorCount++
|
||||||
errorMes = errorMes + key + ';'
|
errorMes = errorMes + '[' + key + ']'
|
||||||
} else if (
|
} else if (
|
||||||
userParamsIsNull &&
|
userParamsIsNull &&
|
||||||
targetInfo.enabledDefault &&
|
targetInfo.enabledDefault &&
|
||||||
@ -1015,8 +1015,8 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (errorCount > 0) {
|
if (errorCount > 0) {
|
||||||
ElMessage.error('参数错误 ' + errorMes + '为必填参数')
|
ElMessage.error('参数' + errorMes + '不能为空')
|
||||||
throw new Error('参数错误 ' + errorMes + '为必填参数')
|
throw new Error('参数' + errorMes + '不能为空')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return
|
return
|
||||||
|
@ -15,6 +15,7 @@ import { XpackComponent } from '@/components/plugin'
|
|||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import { downloadCanvas2 } from '@/utils/imgUtils'
|
import { downloadCanvas2 } from '@/utils/imgUtils'
|
||||||
import { setTitle } from '@/utils/utils'
|
import { setTitle } from '@/utils/utils'
|
||||||
|
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||||
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@ -186,6 +187,7 @@ defineExpose({
|
|||||||
:is-selector="props.isSelector"
|
:is-selector="props.isSelector"
|
||||||
:download-status="downloadStatus"
|
:download-status="downloadStatus"
|
||||||
></de-preview>
|
></de-preview>
|
||||||
|
<empty-background v-if="!state.initState" description="参数不能为空" img-type="noneWhite" />
|
||||||
</div>
|
</div>
|
||||||
<XpackComponent
|
<XpackComponent
|
||||||
jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvTmV3V2luZG93SGFuZGxlcg=="
|
jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvTmV3V2luZG93SGFuZGxlcg=="
|
||||||
|
@ -13,6 +13,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
|||||||
import { XpackComponent } from '@/components/plugin'
|
import { XpackComponent } from '@/components/plugin'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import { setTitle } from '@/utils/utils'
|
import { setTitle } from '@/utils/utils'
|
||||||
|
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||||
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@ -171,6 +172,7 @@ defineExpose({
|
|||||||
:is-selector="props.isSelector"
|
:is-selector="props.isSelector"
|
||||||
></de-preview>
|
></de-preview>
|
||||||
</div>
|
</div>
|
||||||
|
<empty-background v-if="!state.initState" description="参数不能为空" img-type="noneWhite" />
|
||||||
<XpackComponent
|
<XpackComponent
|
||||||
jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvTmV3V2luZG93SGFuZGxlcg=="
|
jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvTmV3V2luZG93SGFuZGxlcg=="
|
||||||
@loaded="XpackLoaded"
|
@loaded="XpackLoaded"
|
||||||
|
Loading…
Reference in New Issue
Block a user