forked from github/dataease
Merge branch 'dev-v2' into pr@dev-v2@fix_report_lark_group
This commit is contained in:
commit
c6a5848f2a
@ -93,10 +93,13 @@ const saveCanvasWithCheck = () => {
|
||||
const saveResource = () => {
|
||||
wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id)
|
||||
if (styleChangeTimes.value > 0) {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
canvasSave(() => {
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
|
||||
eventBus.emit('hideArea-canvas-main')
|
||||
nextTick(() => {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
canvasSave(() => {
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -81,14 +81,14 @@ const clearStyle = e => {
|
||||
}
|
||||
|
||||
const handleBlur = e => {
|
||||
element.value.propValue = e.target.innerHTML || ' '
|
||||
element.value.propValue = e.target.innerHTML || ''
|
||||
const html = e.target.innerHTML
|
||||
if (html !== '') {
|
||||
element.value.propValue = e.target.innerHTML
|
||||
} else {
|
||||
element.value.propValue = ''
|
||||
nextTick(function () {
|
||||
element.value.propValue = ' '
|
||||
element.value.propValue = ''
|
||||
})
|
||||
}
|
||||
canEdit.value = false
|
||||
|
@ -125,8 +125,14 @@ export const customAttrTrans = {
|
||||
'wordSizeRange',
|
||||
'wordSpacing'
|
||||
],
|
||||
label: ['fontSize'],
|
||||
tooltip: ['fontSize'],
|
||||
label: {
|
||||
fontSize: '',
|
||||
seriesLabelFormatter: ['fontSize']
|
||||
},
|
||||
tooltip: {
|
||||
fontSize: '',
|
||||
seriesTooltipFormatter: ['fontSize']
|
||||
},
|
||||
indicator: ['fontSize', 'suffixFontSize'],
|
||||
indicatorName: ['fontSize', 'nameValueSpacing']
|
||||
}
|
||||
@ -296,15 +302,25 @@ export function recursionTransObj(template, infoObj, scale, terminal) {
|
||||
// 如果是数组 进行赋值计算
|
||||
if (template[templateKey] instanceof Array) {
|
||||
template[templateKey].forEach(templateProp => {
|
||||
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
||||
if (
|
||||
infoObj[templateKey] &&
|
||||
(infoObj[templateKey][templateProp] || infoObj[templateKey].length)
|
||||
) {
|
||||
// 移动端特殊属性值设置
|
||||
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) {
|
||||
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
|
||||
} else {
|
||||
infoObj[templateKey][templateProp] = getScaleValue(
|
||||
infoObj[templateKey][templateProp],
|
||||
scale
|
||||
)
|
||||
// 数组依次设置
|
||||
if (infoObj[templateKey] instanceof Array) {
|
||||
infoObj[templateKey].forEach(v => {
|
||||
v[templateProp] = getScaleValue(v[templateProp], scale)
|
||||
})
|
||||
} else {
|
||||
infoObj[templateKey][templateProp] = getScaleValue(
|
||||
infoObj[templateKey][templateProp],
|
||||
scale
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -64,10 +64,15 @@ const changeThreshold = () => {
|
||||
const changeSplitThreshold = (threshold: string) => {
|
||||
// check input
|
||||
if (threshold) {
|
||||
const regex = /^(\d+)(,\d+)*$/
|
||||
if (!regex.test(threshold)) {
|
||||
ElMessage.error(t('chart.gauge_threshold_format_error'))
|
||||
return
|
||||
}
|
||||
const arr = threshold.split(',')
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const ele = arr[i]
|
||||
if (parseFloat(ele).toString() === 'NaN' || parseFloat(ele) <= 0 || parseFloat(ele) >= 100) {
|
||||
if (parseFloat(ele) <= 0 || parseFloat(ele) >= 100) {
|
||||
ElMessage.error(t('chart.gauge_threshold_format_error'))
|
||||
return
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ onMounted(() => {
|
||||
:effect="themes"
|
||||
v-model="state.basicStyleForm.showZoom"
|
||||
:predefine="predefineColors"
|
||||
@change="changeBasicStyle('zoomShow')"
|
||||
@change="changeBasicStyle('showZoom')"
|
||||
>
|
||||
{{ t('chart.show_zoom') }}
|
||||
</el-checkbox>
|
||||
|
@ -35,7 +35,9 @@ import type { TabPaneName } from 'element-plus-secondary'
|
||||
import { timestampFormatDate } from './form/util'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const { wsCache } = useCache()
|
||||
interface Field {
|
||||
fieldShortName: string
|
||||
name: string
|
||||
@ -86,6 +88,7 @@ let originResourceTree = []
|
||||
const sortTypeChange = sortType => {
|
||||
state.datasetTree = treeSort(originResourceTree, sortType)
|
||||
state.curSortType = sortType
|
||||
wsCache.set('TreeSort-dataset', state.curSortType)
|
||||
}
|
||||
|
||||
const resourceCreate = (pid, name) => {
|
||||
@ -211,10 +214,12 @@ const getData = () => {
|
||||
rootManage.value = nodeData[0]['weight'] >= 7
|
||||
state.datasetTree = nodeData[0]['children'] || []
|
||||
originResourceTree = cloneDeep(unref(state.datasetTree))
|
||||
sortTypeChange(state.curSortType)
|
||||
return
|
||||
}
|
||||
state.datasetTree = nodeData
|
||||
originResourceTree = cloneDeep(unref(state.datasetTree))
|
||||
sortTypeChange(state.curSortType)
|
||||
})
|
||||
.finally(() => {
|
||||
dtLoading.value = false
|
||||
@ -252,6 +257,7 @@ const dfsDatasetTree = (ds, id) => {
|
||||
|
||||
onBeforeMount(() => {
|
||||
nodeInfo.id = (route.params.id as string) || ''
|
||||
loadInit()
|
||||
getData()
|
||||
})
|
||||
|
||||
@ -471,6 +477,13 @@ const sortList = [
|
||||
}
|
||||
]
|
||||
|
||||
const loadInit = () => {
|
||||
const historyTreeSort = wsCache.get('TreeSort-dataset')
|
||||
if (historyTreeSort) {
|
||||
state.curSortType = historyTreeSort
|
||||
}
|
||||
}
|
||||
|
||||
const sortTypeTip = computed(() => {
|
||||
return sortList.find(ele => ele.value === state.curSortType).name
|
||||
})
|
||||
|
@ -42,6 +42,7 @@ import { useMoveLine } from '@/hooks/web/useMoveLine'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import treeSort from '@/utils/treeSortUtils'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
const route = useRoute()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
interface Field {
|
||||
@ -51,7 +52,7 @@ interface Field {
|
||||
originName: string
|
||||
deType: number
|
||||
}
|
||||
|
||||
const { wsCache } = useCache()
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
const appStore = useAppStoreWithOut()
|
||||
@ -165,6 +166,7 @@ let originResourceTree = []
|
||||
const sortTypeChange = sortType => {
|
||||
state.datasourceTree = treeSort(originResourceTree, sortType)
|
||||
state.curSortType = sortType
|
||||
wsCache.set('TreeSort-datasource', state.curSortType)
|
||||
}
|
||||
const handleSizeChange = pageSize => {
|
||||
state.paginationConfig.currentPage = 1
|
||||
@ -391,10 +393,12 @@ const listDs = () => {
|
||||
rootManage.value = nodeData[0]['weight'] >= 7
|
||||
state.datasourceTree = nodeData[0]['children'] || []
|
||||
originResourceTree = cloneDeep(unref(state.datasourceTree))
|
||||
sortTypeChange(state.curSortType)
|
||||
return
|
||||
}
|
||||
originResourceTree = cloneDeep(unref(state.datasourceTree))
|
||||
state.datasourceTree = nodeData
|
||||
sortTypeChange(state.curSortType)
|
||||
})
|
||||
.finally(() => {
|
||||
mounted.value = true
|
||||
@ -693,8 +697,17 @@ const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}
|
||||
|
||||
const loadInit = () => {
|
||||
const historyTreeSort = wsCache.get('TreeSort-datasource')
|
||||
if (historyTreeSort) {
|
||||
state.curSortType = historyTreeSort
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
nodeInfo.id = (route.params.id as string) || ''
|
||||
loadInit()
|
||||
listDs()
|
||||
const { opt } = router.currentRoute.value.query
|
||||
if (opt && opt === 'create') {
|
||||
|
Loading…
Reference in New Issue
Block a user