forked from github/dataease
Merge branch 'dev-v2' of github.com:dataease/dataease into dev-v2
This commit is contained in:
commit
87ba2ed5d6
@ -69,7 +69,7 @@ const switchValue = computed({
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-right: 8px;
|
||||
padding-right: 10px;
|
||||
flex-grow: 1;
|
||||
:deep(.ed-switch.is-checked .ed-switch__core > .ed-switch__action) {
|
||||
left: calc(100% - 12px);
|
||||
|
@ -10,6 +10,7 @@ import { computed, toRefs } from 'vue'
|
||||
import { ElDivider } from 'element-plus-secondary'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import { getCurInfo } from '@/store/modules/data-visualization/common'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const copyStore = copyStoreWithOut()
|
||||
const lockStore = lockStoreWithOut()
|
||||
@ -20,6 +21,7 @@ const composeStore = composeStoreWithOut()
|
||||
const { areaData } = storeToRefs(composeStore)
|
||||
const { curComponent } = storeToRefs(dvMainStore)
|
||||
const emit = defineEmits(['close', 'rename'])
|
||||
const { emitter } = useEmitt()
|
||||
const props = defineProps({
|
||||
activePosition: {
|
||||
type: String,
|
||||
@ -157,6 +159,10 @@ const composeDivider = computed(() => {
|
||||
const isGroupArea = computed(() => {
|
||||
return curComponent.value?.component === 'GroupArea'
|
||||
})
|
||||
|
||||
const editQueryCriteria = () => {
|
||||
emitter.emit(`editQueryCriteria${curComponent.value.id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -207,6 +213,8 @@ const isGroupArea = computed(() => {
|
||||
<el-divider class="custom-divider" v-show="composeDivider" />
|
||||
<template v-if="curComponent && !isGroupArea">
|
||||
<template v-if="!curComponent['isLock']">
|
||||
<li v-if="curComponent.component === 'VQuery'" @click="editQueryCriteria">编辑</li>
|
||||
<li @click="upComponent">上移一层</li>
|
||||
<li @click="upComponent">上移一层</li>
|
||||
<li @click="downComponent">下移一层</li>
|
||||
<li @click="topComponent">置于顶层</li>
|
||||
|
@ -187,10 +187,10 @@ const textStyle = computed(() => {
|
||||
}
|
||||
@keyframes marqueeAnimation {
|
||||
0% {
|
||||
transform: translate(0, 0);
|
||||
transform: translate(100%, 0);
|
||||
}
|
||||
100% {
|
||||
transform: translate(-100%, 0);
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -279,10 +279,12 @@ declare interface ChartTableHeaderAttr {
|
||||
*/
|
||||
tableHeaderSort: boolean
|
||||
/**
|
||||
* @deprecated since version 2.7.0 由提示统一控制
|
||||
* 行头鼠标悬浮提示开关
|
||||
*/
|
||||
showRowTooltip: boolean
|
||||
/**
|
||||
* @deprecated since version 2.7.0 由提示统一控制
|
||||
* 列头鼠标悬浮提示开关
|
||||
*/
|
||||
showColTooltip: boolean
|
||||
@ -324,6 +326,7 @@ declare interface ChartTableCellAttr {
|
||||
*/
|
||||
tableItemSubBgColor: string
|
||||
/**
|
||||
* @deprecated since version 2.7.0 由提示统一控制
|
||||
* 鼠标悬浮提示
|
||||
*/
|
||||
showTooltip: boolean
|
||||
|
@ -29,20 +29,24 @@ router.beforeEach(async (to, from, next) => {
|
||||
start()
|
||||
loadStart()
|
||||
checkPlatform()
|
||||
let isDesktop = wsCache.get('app.desktop')
|
||||
if (isDesktop === null) {
|
||||
await appStore.setAppModel()
|
||||
isDesktop = appStore.getDesktop
|
||||
}
|
||||
if (isMobile()) {
|
||||
done()
|
||||
loadDone()
|
||||
if (to.name === 'link') {
|
||||
window.location.href = window.origin + '/mobile.html#' + to.path
|
||||
} else if (!isPlatformClient() && !isLarkPlatform()) {
|
||||
} else if (
|
||||
wsCache.get('user.token') ||
|
||||
isDesktop ||
|
||||
(!isPlatformClient() && !isLarkPlatform())
|
||||
) {
|
||||
window.location.href = window.origin + '/mobile.html#/index'
|
||||
}
|
||||
}
|
||||
let isDesktop = wsCache.get('app.desktop')
|
||||
if (isDesktop === null) {
|
||||
await appStore.setAppModel()
|
||||
isDesktop = appStore.getDesktop
|
||||
}
|
||||
await appearanceStore.setAppearance()
|
||||
if (wsCache.get('user.token') || isDesktop) {
|
||||
if (!userStore.getUid) {
|
||||
|
@ -37,11 +37,6 @@ const { element, chart, commonBackgroundPop } = toRefs(props)
|
||||
<el-collapse v-model="state.styleActiveNames" class="style-collapse">
|
||||
<el-collapse-item :effect="themes" name="component" :title="t('visualization.module')">
|
||||
<el-form label-position="top">
|
||||
<el-form-item class="form-item margin-bottom-8" :class="'form-item-' + themes">
|
||||
<el-checkbox :effect="themes" v-model="element.isHang" size="small">
|
||||
隐藏组件
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item class="form-item margin-bottom-8" :class="'form-item-' + themes">
|
||||
<el-checkbox
|
||||
:effect="themes"
|
||||
|
@ -142,7 +142,6 @@ onMounted(() => {
|
||||
:label="t('chart.split_line')"
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
style="padding-right: 4px"
|
||||
>
|
||||
<el-color-picker
|
||||
v-model="state.quadrantForm.lineStyle.stroke"
|
||||
@ -189,12 +188,7 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
label="X 轴恒线"
|
||||
:class="'form-item-' + themes"
|
||||
style="padding-left: 4px"
|
||||
>
|
||||
<el-form-item class="form-item" label="X 轴恒线" :class="'form-item-' + themes">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
@ -225,7 +219,7 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
<el-tabs v-model="tabActive" class="quadrant-tab-header" :class="{ dark: themes === 'dark' }">
|
||||
<el-tabs v-model="tabActive" class="tab-header" :class="{ dark: themes === 'dark' }">
|
||||
<el-tab-pane
|
||||
:name="index + 1"
|
||||
v-for="(l, index) in state.quadrantForm.labels"
|
||||
@ -239,7 +233,6 @@ onMounted(() => {
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
style="padding-right: 4px"
|
||||
:label="t('chart.backgroundColor')"
|
||||
>
|
||||
<el-color-picker
|
||||
@ -290,7 +283,6 @@ onMounted(() => {
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
style="padding-right: 4px"
|
||||
:label="t('chart.chart_style')"
|
||||
>
|
||||
<el-color-picker
|
||||
@ -384,48 +376,6 @@ onMounted(() => {
|
||||
border-color: rgba(235, 235, 235, 0.15);
|
||||
}
|
||||
}
|
||||
.quadrant-tab-header {
|
||||
--ed-tabs-header-height: 34px;
|
||||
--custom-tab-color: #646a73;
|
||||
|
||||
:deep(.ed-tabs__nav-wrap::after) {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
&.dark {
|
||||
--custom-tab-color: #a6a6a6;
|
||||
}
|
||||
|
||||
height: 100%;
|
||||
:deep(.ed-tabs__header) {
|
||||
border-top: solid 1px @side-outline-border-color;
|
||||
}
|
||||
:deep(.ed-tabs__item) {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
padding: 0 12px !important;
|
||||
margin-right: 0 !important;
|
||||
color: var(--custom-tab-color);
|
||||
}
|
||||
:deep(.is-active) {
|
||||
font-weight: 500;
|
||||
color: var(--ed-color-primary, #3370ff);
|
||||
}
|
||||
|
||||
:deep(.ed-tabs__nav-scroll) {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.ed-tabs__header) {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.ed-tabs__content) {
|
||||
height: calc(100% - 33px);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
}
|
||||
.padding-tab {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
|
@ -234,20 +234,6 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
v-if="showProperty('showTooltip')"
|
||||
>
|
||||
<el-checkbox
|
||||
size="small"
|
||||
:effect="themes"
|
||||
v-model="state.tableCellForm.showTooltip"
|
||||
@change="changeTableCell('showTooltip')"
|
||||
>
|
||||
{{ t('chart.table_show_cell_tooltip') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
@ -250,38 +250,6 @@ onMounted(() => {
|
||||
{{ t('chart.table_header_sort') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
v-if="showProperty('showColTooltip')"
|
||||
>
|
||||
<el-checkbox
|
||||
size="small"
|
||||
:effect="themes"
|
||||
v-model="state.tableHeaderForm.showColTooltip"
|
||||
@change="changeTableHeader('showColTooltip')"
|
||||
>
|
||||
{{
|
||||
chart.type === 'table-pivot'
|
||||
? t('chart.table_show_col_tooltip')
|
||||
: t('chart.table_show_header_tooltip')
|
||||
}}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
v-if="showProperty('showRowTooltip')"
|
||||
>
|
||||
<el-checkbox
|
||||
size="small"
|
||||
:effect="themes"
|
||||
v-model="state.tableHeaderForm.showRowTooltip"
|
||||
@change="changeTableHeader('showRowTooltip')"
|
||||
>
|
||||
{{ t('chart.table_show_row_tooltip') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
@ -3166,7 +3166,7 @@ span {
|
||||
display: flex;
|
||||
transition: 0.5s;
|
||||
.padding-lr {
|
||||
padding: 0 8px;
|
||||
padding: 0 10px;
|
||||
|
||||
&.no-top-border {
|
||||
border-top: none !important;
|
||||
@ -3217,7 +3217,7 @@ span {
|
||||
}
|
||||
|
||||
:deep(.ed-collapse-item__content) {
|
||||
padding: 16px 8px 0;
|
||||
padding: 16px 10px 0;
|
||||
border: none;
|
||||
:deep(.ed-checkbox) {
|
||||
height: 20px;
|
||||
|
@ -46,7 +46,7 @@ export const TABLE_EDITOR_PROPERTY_INNER: EditorPropertyInner = {
|
||||
'letterSpace',
|
||||
'fontShadow'
|
||||
],
|
||||
'tooltip-selector': ['fontSize', 'color', 'backgroundColor'],
|
||||
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'show'],
|
||||
'function-cfg': ['emptyDataStrategy'],
|
||||
threshold: ['tableThreshold']
|
||||
}
|
||||
|
@ -184,14 +184,10 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
||||
}
|
||||
action(param)
|
||||
})
|
||||
|
||||
// hover
|
||||
const { showColTooltip } = customAttr.tableHeader
|
||||
if (showColTooltip) {
|
||||
// tooltip
|
||||
const { show } = customAttr.tooltip
|
||||
if (show) {
|
||||
newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
|
||||
}
|
||||
const { showTooltip } = customAttr.tableCell
|
||||
if (showTooltip) {
|
||||
newChart.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
|
||||
}
|
||||
// header resize
|
||||
|
@ -187,13 +187,10 @@ export class TableNormal extends S2ChartView<TableSheet> {
|
||||
}
|
||||
action(param)
|
||||
})
|
||||
// hover
|
||||
const { showColTooltip } = customAttr.tableHeader
|
||||
if (showColTooltip) {
|
||||
// tooltip
|
||||
const { show } = customAttr.tooltip
|
||||
if (show) {
|
||||
newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
|
||||
}
|
||||
const { showTooltip } = customAttr.tableCell
|
||||
if (showTooltip) {
|
||||
newChart.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
|
||||
}
|
||||
// header resize
|
||||
|
@ -200,16 +200,11 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
||||
this.configTooltip(chart, s2Options)
|
||||
// 开始渲染
|
||||
const s2 = new PivotSheet(containerDom, s2DataConfig, s2Options as unknown as S2Options)
|
||||
// hover
|
||||
const { showColTooltip, showRowTooltip } = customAttr.tableHeader
|
||||
if (showColTooltip) {
|
||||
// tooltip
|
||||
const { show } = customAttr.tooltip
|
||||
if (show) {
|
||||
s2.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(s2, event, meta))
|
||||
}
|
||||
if (showRowTooltip) {
|
||||
s2.on(S2Event.ROW_CELL_HOVER, event => this.showTooltip(s2, event, meta))
|
||||
}
|
||||
const { showTooltip } = customAttr.tableCell
|
||||
if (showTooltip) {
|
||||
s2.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(s2, event, meta))
|
||||
}
|
||||
// click
|
||||
|
@ -750,7 +750,8 @@ export function configTooltip(chart: Chart, option: S2Options) {
|
||||
boxShadow: 'rgba(0, 0, 0, 0.1) 0px 4px 8px 0px',
|
||||
borderRadius: '3px',
|
||||
padding: '4px 12px',
|
||||
opacity: 0.95
|
||||
opacity: 0.95,
|
||||
position: 'absolute'
|
||||
},
|
||||
adjustPosition: ({ event }) => {
|
||||
return getTooltipPosition(event)
|
||||
@ -791,7 +792,7 @@ export function copyContent(s2Instance, event, fieldMeta) {
|
||||
function getTooltipPosition(event) {
|
||||
const s2Instance = event.s2Instance
|
||||
const { x, y } = event
|
||||
const result = { x: x + 15, y: y + 10 }
|
||||
const result = { x: x + 15, y }
|
||||
if (!s2Instance) {
|
||||
return result
|
||||
}
|
||||
@ -809,8 +810,16 @@ function getTooltipPosition(event) {
|
||||
if (result.x && result.x + offsetWidth > width) {
|
||||
result.x -= result.x + offsetWidth - width
|
||||
}
|
||||
if (result.y && result.y + offsetHeight > height) {
|
||||
if (result.y) {
|
||||
if (result.y > offsetHeight) {
|
||||
if (result.y - offsetHeight >= 15) {
|
||||
result.y -= offsetHeight + 15
|
||||
} else {
|
||||
result.y = 0
|
||||
}
|
||||
} else {
|
||||
result.y += 15
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
@ -3,7 +3,15 @@ import {
|
||||
AntVDrawOptions,
|
||||
ChartLibraryType
|
||||
} from '@/views/chart/components/js/panel/types'
|
||||
import { S2Theme, SpreadSheet, Style, S2Options, Meta, SERIES_NUMBER_FIELD } from '@antv/s2'
|
||||
import {
|
||||
S2Theme,
|
||||
SpreadSheet,
|
||||
Style,
|
||||
S2Options,
|
||||
Meta,
|
||||
SERIES_NUMBER_FIELD,
|
||||
setTooltipContainerStyle
|
||||
} from '@antv/s2'
|
||||
import {
|
||||
configHeaderInteraction,
|
||||
configTooltip,
|
||||
@ -86,6 +94,8 @@ export abstract class S2ChartView<P extends SpreadSheet> extends AntVAbstractCha
|
||||
return
|
||||
}
|
||||
event.s2Instance = s2Instance
|
||||
const style = s2Instance.options.tooltip.style
|
||||
setTooltipContainerStyle(s2Instance.tooltip.container, { style })
|
||||
s2Instance.showTooltip({
|
||||
position: {
|
||||
x: event.clientX,
|
||||
|
@ -190,7 +190,7 @@ onMounted(async () => {
|
||||
}
|
||||
let deTemplateData
|
||||
if (createType === 'template') {
|
||||
const templateParamsApply = JSON.parse(decodeURIComponent(Base64.decode(templateParams + '')))
|
||||
const templateParamsApply = JSON.parse(Base64.decode(decodeURIComponent(templateParams + '')))
|
||||
await decompressionPre(templateParamsApply, result => {
|
||||
deTemplateData = result
|
||||
})
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { ref, computed, onMounted, watch, onUnmounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
@ -160,12 +160,23 @@ const getTree = async () => {
|
||||
if (nodeData.length && nodeData[0]['id'] === '0' && nodeData[0]['name'] === 'root') {
|
||||
tableData.value = dfsTableData(nodeData[0]['children'] || [])
|
||||
rawTableData = cloneDeep(tableData.value)
|
||||
setSortType()
|
||||
return
|
||||
}
|
||||
tableData.value = dfsTableData(nodeData)
|
||||
rawTableData = cloneDeep(tableData.value)
|
||||
setSortType()
|
||||
}
|
||||
|
||||
const setSortType = () => {
|
||||
const type = wsCache.get('mobile-sort-type')
|
||||
sortTypeChange(type || curSortType.value)
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
wsCache.set('mobile-sort-type', curSortType.value)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getTree()
|
||||
activeDirectName.value = wsCache.get('activeDirectName')
|
||||
|
@ -450,7 +450,7 @@ const apply = template => {
|
||||
'changeCurrentComponent',
|
||||
['dataV', 'SCREEN'].includes(state.dvCreateForm.nodeType)
|
||||
? 'VisualizationEditor'
|
||||
: 'Dashboard'
|
||||
: 'DashboardEditor'
|
||||
)
|
||||
return
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 8a3233c72c50bf1fcbed274ca833fc72c76f47d6
|
||||
Subproject commit dac92153509c5e1f4b7eb3b8418bd4ce320726c5
|
@ -19,6 +19,10 @@ public interface DingtalkApi {
|
||||
@GetMapping("/info")
|
||||
DingtalkInfoVO info();
|
||||
|
||||
@Operation(summary = "查询钉钉二维码信息")
|
||||
@GetMapping("/qrinfo")
|
||||
DingtalkInfoVO qrinfo();
|
||||
|
||||
@Operation(summary = "保存")
|
||||
@PostMapping("/create")
|
||||
void save(@RequestBody DingtalkSettingCreator creator);
|
||||
|
@ -20,6 +20,10 @@ public interface LarkApi {
|
||||
@GetMapping("/info")
|
||||
LarkInfoVO info();
|
||||
|
||||
@Operation(summary = "查询飞书二维码信息")
|
||||
@GetMapping("/qrinfo")
|
||||
LarkInfoVO qrinfo();
|
||||
|
||||
@Operation(summary = "保存")
|
||||
@PostMapping("/create")
|
||||
void save(@RequestBody LarkSettingCreator creator);
|
||||
|
@ -19,6 +19,10 @@ public interface LarksuiteApi {
|
||||
@GetMapping("/info")
|
||||
LarkInfoVO info();
|
||||
|
||||
@Operation(summary = "查询国际飞书二维码信息")
|
||||
@GetMapping("/qrinfo")
|
||||
LarkInfoVO qrinfo();
|
||||
|
||||
@Operation(summary = "保存")
|
||||
@PostMapping("/create")
|
||||
void save(@RequestBody LarkSettingCreator creator);
|
||||
|
@ -19,6 +19,10 @@ public interface WecomApi {
|
||||
@GetMapping("/info")
|
||||
WecomInfoVO info();
|
||||
|
||||
@Operation(summary = "查询企微二维码信息")
|
||||
@GetMapping("/qrinfo")
|
||||
WecomInfoVO qrinfo();
|
||||
|
||||
@Operation(summary = "保存")
|
||||
@PostMapping("/create")
|
||||
void save(@RequestBody WecomCreator creator);
|
||||
|
@ -31,13 +31,13 @@ public class WhitelistUtils {
|
||||
"/doc.html",
|
||||
"/panel.html",
|
||||
"/mobile.html",
|
||||
"/lark/info",
|
||||
"/lark/qrinfo",
|
||||
"/lark/token",
|
||||
"/larksuite/info",
|
||||
"/larksuite/qrinfo",
|
||||
"/larksuite/token",
|
||||
"/dingtalk/info",
|
||||
"/dingtalk/qrinfo",
|
||||
"/dingtalk/token",
|
||||
"/wecom/info",
|
||||
"/wecom/qrinfo",
|
||||
"/wecom/token",
|
||||
"/sysParameter/requestTimeOut",
|
||||
"/setting/authentication/status",
|
||||
|
Loading…
Reference in New Issue
Block a user