mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 17:58:11 +08:00
Merge remote-tracking branch 'origin/dev-v2' into dev-v2
# Conflicts: # de-xpack
This commit is contained in:
@@ -57,6 +57,8 @@ public interface ExtDataVisualizationMapper {
|
||||
|
||||
void deleteViewsBatch(@Param("ids") Set<Long> ids,@Param("resourceTable") String resourceTable);
|
||||
|
||||
void deleteUselessViewsBatchSnapshot(@Param("ids") List<Long> ids,@Param("dvId") Long dvId);
|
||||
|
||||
UserFormVO queryInnerUserInfo(@Param("id") Long id);
|
||||
|
||||
void snapshotDataV(@Param("dvId") Long dvId);
|
||||
|
||||
@@ -594,6 +594,8 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
visualizationInfo.setStatus(request.getStatus());
|
||||
coreVisualizationManage.innerEdit(visualizationInfo);
|
||||
if (CommonConstants.DV_STATUS.PUBLISHED == request.getStatus()) {
|
||||
List<Long> viewIds = this.getEnabledViewIds(dvId,CommonConstants.RESOURCE_TABLE.SNAPSHOT);
|
||||
extDataVisualizationMapper.deleteUselessViewsBatchSnapshot(viewIds,dvId);
|
||||
coreVisualizationManage.removeDvCore(dvId);
|
||||
coreVisualizationManage.dvRestore(dvId);
|
||||
chartViewManege.publishThreshold(dvId, request.getActiveViewIds());
|
||||
|
||||
@@ -498,6 +498,20 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUselessViewsBatchSnapshot">
|
||||
DELETE
|
||||
FROM
|
||||
snapshot_core_chart_view ccv
|
||||
WHERE
|
||||
ccv.scene_id = #{dvId}
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and ccv.id not in
|
||||
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="queryInnerUserInfo" resultType="io.dataease.api.permissions.user.vo.UserFormVO">
|
||||
select id,account,name from per_user where id = #{id}
|
||||
</select>
|
||||
|
||||
@@ -203,9 +203,12 @@ const publishStatusChange = status => {
|
||||
type: 'dashboard'
|
||||
}).then(() => {
|
||||
dvMainStore.updateDvInfoCall(status)
|
||||
status
|
||||
? ElMessage.success(t('visualization.published_success'))
|
||||
: ElMessage.success(t('visualization.cancel_publish_tips'))
|
||||
if (status) {
|
||||
ElMessage.success(t('visualization.published_success'))
|
||||
snapshotStore.initSnapShot()
|
||||
} else {
|
||||
ElMessage.success(t('visualization.cancel_publish_tips'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -331,9 +331,12 @@ const publishStatusChange = status => {
|
||||
type: 'dataV'
|
||||
}).then(() => {
|
||||
dvMainStore.updateDvInfoCall(status)
|
||||
status
|
||||
? ElMessage.success(t('visualization.published_success'))
|
||||
: ElMessage.success(t('visualization.cancel_publish_tips'))
|
||||
if (status) {
|
||||
ElMessage.success(t('visualization.published_success'))
|
||||
snapshotStore.initSnapShot()
|
||||
} else {
|
||||
ElMessage.success(t('visualization.cancel_publish_tips'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,7 @@ const { element, view, scale } = toRefs(props)
|
||||
const { t } = useI18n()
|
||||
const vQueryRef = ref()
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap, editMode } =
|
||||
storeToRefs(dvMainStore)
|
||||
const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap } = storeToRefs(dvMainStore)
|
||||
const canEdit = ref(false)
|
||||
const queryConfig = ref()
|
||||
const defaultStyle = {
|
||||
@@ -99,9 +98,6 @@ const defaultStyle = {
|
||||
}
|
||||
const customStyle = reactive({ ...defaultStyle })
|
||||
const snapshotStore = snapshotStoreWithOut()
|
||||
const userAgent = navigator.userAgent.toLowerCase()
|
||||
// 判断是否为飞书内置浏览器
|
||||
const isFeiShu = /lark/i.test(userAgent)
|
||||
|
||||
const btnStyle = computed(() => {
|
||||
const style = {
|
||||
@@ -359,22 +355,26 @@ const getKeyList = next => {
|
||||
}
|
||||
|
||||
const fillRequireVal = arr => {
|
||||
element.value.propValue.forEach(next => {
|
||||
element.value.propValue?.forEach(next => {
|
||||
if (arr.some(itx => next.checkedFields.includes(itx)) && next.required) {
|
||||
if (next.displayType === '8') {
|
||||
const { conditionValueF, conditionValueS, conditionType } = next
|
||||
if (conditionType === 0 && conditionValueF === '') {
|
||||
next.conditionValueF = next.defaultConditionValueF
|
||||
} else if (conditionValueF === '' || conditionValueS === '') {
|
||||
next.conditionValueF = next.defaultConditionValueF
|
||||
next.conditionValueS = next.defaultConditionValueS
|
||||
} else {
|
||||
if (conditionValueF === '') {
|
||||
next.conditionValueF = next.defaultConditionValueF
|
||||
}
|
||||
if (conditionValueS === '') {
|
||||
next.conditionValueS = next.defaultConditionValueS
|
||||
}
|
||||
}
|
||||
} else if (next.displayType === '22') {
|
||||
if (
|
||||
(next.numValueStart !== 0 && !next.numValueStart) ||
|
||||
(next.numValueEnd !== 0 && !next.numValueEnd)
|
||||
) {
|
||||
if (next.numValueStart !== 0 && !next.numValueStart) {
|
||||
next.numValueStart = next.defaultNumValueStart
|
||||
}
|
||||
|
||||
if (next.numValueEnd !== 0 && !next.numValueEnd) {
|
||||
next.numValueEnd = next.defaultNumValueEnd
|
||||
}
|
||||
} else if (
|
||||
@@ -502,7 +502,7 @@ onBeforeUnmount(() => {
|
||||
const updateQueryCriteria = () => {
|
||||
if (dvMainStore.mobileInPc && !isMobile()) return
|
||||
Array.isArray(element.value.propValue) &&
|
||||
element.value.propValue.forEach(ele => {
|
||||
element.value.propValue?.forEach(ele => {
|
||||
if (ele.auto) {
|
||||
const componentInfo = {
|
||||
datasetId: ele.dataset.id,
|
||||
@@ -827,7 +827,7 @@ const marginRight = computed<CSSProperties>(() => {
|
||||
})
|
||||
|
||||
const autoStyle = computed(() => {
|
||||
if (isISOMobile() || isFeiShu) {
|
||||
if (isISOMobile()) {
|
||||
return {
|
||||
position: 'absolute',
|
||||
height: 100 / scale.value + '%!important',
|
||||
@@ -856,7 +856,7 @@ const autoStyle = computed(() => {
|
||||
<div class="container flex-align-center">
|
||||
{{ t('v_query.here_or_click') }}
|
||||
<el-button
|
||||
:disabled="showPosition === 'preview' || mobileInPc || editMode === 'preview'"
|
||||
:disabled="showPosition === 'preview' || mobileInPc"
|
||||
@click="addCriteriaConfigOut"
|
||||
style="font-family: inherit"
|
||||
text
|
||||
@@ -890,9 +890,7 @@ const autoStyle = computed(() => {
|
||||
</div>
|
||||
<div
|
||||
class="label-wrapper-tooltip"
|
||||
v-if="
|
||||
showPosition !== 'preview' && !dvMainStore.mobileInPc && editMode !== 'preview'
|
||||
"
|
||||
v-if="showPosition !== 'preview' && !dvMainStore.mobileInPc"
|
||||
>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
|
||||
@@ -182,7 +182,6 @@ const getCascadeFieldId = () => {
|
||||
cascade.value.forEach(ele => {
|
||||
let condition = null
|
||||
ele.forEach(item => {
|
||||
// eslint-disable-next-line
|
||||
const [_, queryId, fieldId] = item.datasetId.split('--')
|
||||
if (queryId === config.value.id && condition) {
|
||||
if (item.fieldId) {
|
||||
@@ -579,7 +578,10 @@ const setOptions = (num: number) => {
|
||||
(valueSource || []).map(ele => {
|
||||
return {
|
||||
label: `${ele}`,
|
||||
value: `${ele}`
|
||||
value: `${ele}`,
|
||||
checked: Array.isArray(selectValue.value)
|
||||
? selectValue.value.includes(ele)
|
||||
: selectValue.value === ele
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user