forked from github/dataease
Merge pull request #8346 from dataease/pr@dev-v2_dzz_mobile
Pr@dev v2 dzz mobile
This commit is contained in:
commit
ccd31aa5b7
@ -49,7 +49,8 @@ const multiple = ref(false)
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
|
||||
const { config } = toRefs(props)
|
||||
|
||||
const minDate = new Date('1970/1/1')
|
||||
const maxDate = new Date('2100/1/1')
|
||||
watch(
|
||||
() => config.value.defaultValue,
|
||||
val => {
|
||||
@ -280,7 +281,12 @@ const formatDate = computed(() => {
|
||||
:tabs="['选择日期', '选择时间']"
|
||||
next-step-text="下一步"
|
||||
>
|
||||
<van-date-picker :columns-type="columnsType" v-model="currentDate" />
|
||||
<van-date-picker
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:columns-type="columnsType"
|
||||
v-model="currentDate"
|
||||
/>
|
||||
<van-time-picker :columns-type="['hour', 'minute', 'second']" v-model="currentTime" />
|
||||
</van-picker-group>
|
||||
<van-date-picker
|
||||
@ -288,6 +294,8 @@ const formatDate = computed(() => {
|
||||
:columns-type="columnsType"
|
||||
@confirm="onConfirm"
|
||||
@cancel="onCancel"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
v-if="!showTimePick"
|
||||
v-model="currentDate"
|
||||
/>
|
||||
|
@ -60,7 +60,13 @@ onMounted(() => {
|
||||
<template>
|
||||
<el-header class="header-flex" :class="{ 'header-light': navigateBg && navigateBg === 'light' }">
|
||||
<img class="logo" v-if="navigate" :src="navigate" alt="" />
|
||||
<Icon v-else @click="handleIconClick" className="logo" name="logo"></Icon>
|
||||
<Icon
|
||||
style="cursor: pointer"
|
||||
v-else
|
||||
@click="handleIconClick"
|
||||
className="logo"
|
||||
name="logo"
|
||||
></Icon>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
class="el-menu-demo"
|
||||
|
@ -364,11 +364,11 @@ em {
|
||||
}
|
||||
|
||||
.color-panel {
|
||||
background: var(--ed-color-primary);
|
||||
background: #3370ff;
|
||||
}
|
||||
|
||||
.color-dashboard {
|
||||
background: var(--ed-color-primary);
|
||||
background: #3370ff;
|
||||
}
|
||||
|
||||
.color-screen {
|
||||
|
@ -17,7 +17,7 @@ import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/ca
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo } = storeToRefs(dvMainStore)
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore)
|
||||
|
||||
const props = defineProps({
|
||||
view: {
|
||||
@ -224,7 +224,7 @@ const trackClick = trackAction => {
|
||||
dvMainStore.addViewTrackFilter(linkageParam)
|
||||
break
|
||||
case 'jump':
|
||||
if (isDataEaseBi.value) return
|
||||
if (isDataEaseBi.value || mobileInPc.value) return
|
||||
emit('onJumpClick', jumpParam)
|
||||
break
|
||||
default:
|
||||
@ -247,7 +247,11 @@ const trackMenu = computed(() => {
|
||||
jumpCount++
|
||||
}
|
||||
})
|
||||
jumpCount && view.value?.jumpActive && !isDataEaseBi.value && trackMenuInfo.push('jump')
|
||||
jumpCount &&
|
||||
view.value?.jumpActive &&
|
||||
!isDataEaseBi.value &&
|
||||
!mobileInPc.value &&
|
||||
trackMenuInfo.push('jump')
|
||||
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
|
||||
view.value.drillFields.length && trackMenuInfo.push('drill')
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import { deepCopy } from '@/utils/utils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo } = storeToRefs(dvMainStore)
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore)
|
||||
const { emitter } = useEmitt()
|
||||
|
||||
const props = defineProps({
|
||||
@ -268,7 +268,7 @@ const trackClick = trackAction => {
|
||||
dvMainStore.addViewTrackFilter(linkageParam)
|
||||
break
|
||||
case 'jump':
|
||||
if (isDataEaseBi.value) return
|
||||
if (isDataEaseBi.value || mobileInPc.value) return
|
||||
emit('onJumpClick', jumpParam)
|
||||
break
|
||||
default:
|
||||
@ -292,7 +292,11 @@ const trackMenu = computed(() => {
|
||||
jumpCount++
|
||||
}
|
||||
})
|
||||
jumpCount && view.value?.jumpActive && !isDataEaseBi.value && trackMenuInfo.push('jump')
|
||||
jumpCount &&
|
||||
view.value?.jumpActive &&
|
||||
!isDataEaseBi.value &&
|
||||
!mobileInPc.value &&
|
||||
trackMenuInfo.push('jump')
|
||||
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
|
||||
view.value.drillFields.length && trackMenuInfo.push('drill')
|
||||
return trackMenuInfo
|
||||
|
@ -46,7 +46,7 @@ const dvMainStore = dvMainStoreWithOut()
|
||||
|
||||
let innerRefreshTimer = null
|
||||
|
||||
const { nowPanelJumpInfo, publicLinkStatus, dvInfo, curComponent, canvasStyleData } =
|
||||
const { nowPanelJumpInfo, publicLinkStatus, dvInfo, curComponent, canvasStyleData, mobileInPc } =
|
||||
storeToRefs(dvMainStore)
|
||||
|
||||
const props = defineProps({
|
||||
@ -157,7 +157,7 @@ const hasLinkIcon = computed(() => {
|
||||
return trackMenu.value.indexOf('linkage') > -1
|
||||
})
|
||||
const hasJumpIcon = computed(() => {
|
||||
return trackMenu.value.indexOf('jump') > -1
|
||||
return trackMenu.value.indexOf('jump') > -1 && !mobileInPc.value
|
||||
})
|
||||
const hasDrillIcon = computed(() => {
|
||||
return trackMenu.value.indexOf('drill') > -1
|
||||
|
@ -2,12 +2,11 @@
|
||||
import { ref, onMounted, unref, onBeforeUnmount, computed } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import MobileBackgroundSelector from './MobileBackgroundSelector.vue'
|
||||
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { canvasSave } from '@/utils/canvasUtils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { getStyle } from '@/utils/style'
|
||||
import findComponent from '@/utils/components'
|
||||
import { storeToRefs } from 'pinia'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { componentData, canvasStyleData, canvasViewInfo, dvInfo } = storeToRefs(dvMainStore)
|
||||
@ -15,8 +14,13 @@ const mobileLoading = ref(true)
|
||||
const emits = defineEmits(['pcMode'])
|
||||
const snapshotStore = snapshotStoreWithOut()
|
||||
|
||||
const getComponentStyleDefault = style => {
|
||||
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
|
||||
const getComponentStyleDefault = () => {
|
||||
return {
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '190px',
|
||||
height: '190px'
|
||||
}
|
||||
}
|
||||
const mobileStatusChange = (type, value) => {
|
||||
const iframe = document.querySelector('iframe')
|
||||
@ -173,35 +177,26 @@ const save = () => {
|
||||
<div
|
||||
:style="{ height: '198px', width: '198px' }"
|
||||
class="mobile-wrapper-inner-adaptor"
|
||||
v-for="config in componentDataNotInMobile"
|
||||
:key="config.id"
|
||||
v-for="item in componentDataNotInMobile"
|
||||
:key="item.id"
|
||||
>
|
||||
<div class="component-outer">
|
||||
<component
|
||||
:is="findComponent(config['component'])"
|
||||
ref="component"
|
||||
class="component"
|
||||
:view="canvasViewInfo[config.id]"
|
||||
<ComponentWrapper
|
||||
v-show="item.isShow"
|
||||
canvas-id="canvas-main"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:dv-info="dvInfo"
|
||||
:dv-type="dvInfo.type"
|
||||
:canvas-view-info="canvasViewInfo"
|
||||
:prop-value="config?.propValue"
|
||||
:element="config"
|
||||
:request="config?.request"
|
||||
:style="getComponentStyleDefault(config?.style)"
|
||||
:linkage="config?.linkage"
|
||||
:view-info="canvasViewInfo[item.id]"
|
||||
:config="item"
|
||||
:style="getComponentStyleDefault()"
|
||||
show-position="preview"
|
||||
:disabled="true"
|
||||
:is-edit="false"
|
||||
:search-count="0"
|
||||
:scale="80"
|
||||
/>
|
||||
</div>
|
||||
<div class="mobile-com-mask"></div>
|
||||
<div
|
||||
class="pc-select-to-mobile"
|
||||
v-if="!mobileLoading"
|
||||
@click="addToMobile(config)"
|
||||
></div>
|
||||
<div class="pc-select-to-mobile" v-if="!mobileLoading" @click="addToMobile(item)"></div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
@ -288,7 +283,7 @@ const save = () => {
|
||||
|
||||
.config-panel-content {
|
||||
width: 100%;
|
||||
height: calc(100% - 130px);
|
||||
height: calc(100% - 127px);
|
||||
border-bottom-left-radius: 45px;
|
||||
border-bottom-right-radius: 45px;
|
||||
overflow: hidden;
|
||||
|
@ -235,7 +235,7 @@ watch(
|
||||
margin-right: 12px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
background: var(--ed-color-primary);
|
||||
background: #3370ff;
|
||||
}
|
||||
.name-star {
|
||||
font-size: 15px;
|
||||
|
@ -385,7 +385,7 @@ if (props.templateId) {
|
||||
|
||||
.custom-category-padding {
|
||||
.ed-select-dropdown__list {
|
||||
padding-bottom: 42px;
|
||||
padding-bottom: 42px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -416,10 +416,6 @@ const getEmptyDesc = (): string => {
|
||||
.name-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.color-panel {
|
||||
background: #3370ff !important;
|
||||
}
|
||||
.custom-icon {
|
||||
display: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user