mirror of
https://github.com/dataease/dataease.git
synced 2026-05-21 12:45:37 +08:00
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
@@ -27,6 +27,14 @@ export function chartCopy(id, panelId) {
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
export function chartBatchCopy(params, panelId) {
|
||||
return request({
|
||||
url: '/chart/view/chartBatchCopy/' + panelId,
|
||||
method: 'post',
|
||||
data: params,
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
export function chartGroupTree(data) {
|
||||
return request({
|
||||
url: '/chart/group/tree',
|
||||
|
||||
@@ -2,7 +2,7 @@ import store from '@/store/index'
|
||||
import toast from '@/components/canvas/utils/toast'
|
||||
import generateID from '@/components/canvas/utils/generateID'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { chartCopy } from '@/api/chart/chart'
|
||||
import { chartBatchCopy, chartCopy } from '@/api/chart/chart'
|
||||
import { uuid } from 'vue-uuid'
|
||||
|
||||
export default {
|
||||
@@ -53,6 +53,19 @@ export default {
|
||||
newView.propValue.viewId = res.data
|
||||
store.commit('addComponent', { component: newView })
|
||||
})
|
||||
} if (data.type === 'de-tabs') {
|
||||
const sourceAndTargetIds = {}
|
||||
const newCop = deepCopy(data)
|
||||
newCop.options.tabList.forEach((item) => {
|
||||
if (item.content && item.content.type === 'view') {
|
||||
const newViewId = uuid.v1()
|
||||
sourceAndTargetIds[item.content.propValue.viewId] = newViewId
|
||||
item.content.propValue.viewId = newViewId
|
||||
}
|
||||
})
|
||||
chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {
|
||||
store.commit('addComponent', { component: newCop })
|
||||
})
|
||||
} else {
|
||||
const newCop = deepCopy(data)
|
||||
newCop.id = uuid.v1()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
type="card"
|
||||
style-type="radioGroup"
|
||||
class="de-tabs-height"
|
||||
:class="isEdit ? 'de-tabs-edit' : ''"
|
||||
:class="isCurrentEdit ? 'de-tabs-edit' : ''"
|
||||
:font-color="fontColor"
|
||||
:active-color="activeColor"
|
||||
:border-color="borderColor"
|
||||
@@ -249,6 +249,9 @@ export default {
|
||||
},
|
||||
titleValid() {
|
||||
return !!this.textarea && !!this.textarea.trim()
|
||||
},
|
||||
isCurrentEdit() {
|
||||
return this.isEdit && this.curComponent && this.curComponent.id === this.element.id
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -143,7 +143,7 @@ div:focus {
|
||||
height: 100vh !important;
|
||||
}
|
||||
}
|
||||
.de-tabs-edit {
|
||||
.de-tabs-edit>.el-tabs__header{
|
||||
padding-right: 50px !important;
|
||||
}
|
||||
.de-tabs {
|
||||
|
||||
@@ -110,6 +110,7 @@ import { mapState } from 'vuex'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
||||
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||
import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list'
|
||||
|
||||
export default {
|
||||
name: 'Background',
|
||||
@@ -144,7 +145,7 @@ export default {
|
||||
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
|
||||
this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
|
||||
}
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground)
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
|
||||
this.queryBackground()
|
||||
},
|
||||
queryBackground() {
|
||||
|
||||
@@ -949,6 +949,7 @@ export default {
|
||||
hyperlinks: HYPERLINKS,
|
||||
mobileStyle: BASE_MOBILE_STYLE,
|
||||
propValue: fileResult,
|
||||
commonBackground: deepCopy(COMMON_BACKGROUND),
|
||||
style: {
|
||||
...commonStyle
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-row class="demo_main">
|
||||
<div class="demo_title" />
|
||||
<div class="demo_content">
|
||||
<a href="https://www.bilibili.com/video/BV1UB4y1K7jA" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
||||
<a href="https://www.bilibili.com/video/BV1i34y1v7hq/" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
head: this.$t('wizard.quick_start'),
|
||||
content: this.$t('wizard.demo_video_hint'),
|
||||
bottom: '',
|
||||
href: 'https://www.bilibili.com/video/BV1UB4y1K7jA',
|
||||
href: 'https://www.bilibili.com/video/BV1i34y1v7hq/',
|
||||
component: 'CardDetail'
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user