forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
9156b14bac
16
.github/workflows/sync2gitee.yml
vendored
Normal file
16
.github/workflows/sync2gitee.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: sync2gitee
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
repo-sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Mirror the Github organization repos to Gitee.
|
||||||
|
uses: Yikun/hub-mirror-action@master
|
||||||
|
with:
|
||||||
|
src: 'github/dataease'
|
||||||
|
dst: 'gitee/fit2cloud-feizhiyun'
|
||||||
|
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||||
|
dst_token: ${{ secrets.GITEE_TOKEN }}
|
||||||
|
static_list: "DataEase"
|
||||||
|
force_update: true
|
@ -509,6 +509,9 @@ public class PanelGroupService {
|
|||||||
if (dynamicDataMap == null) {
|
if (dynamicDataMap == null) {
|
||||||
DataEaseException.throwException("Please use the template after v1.9");
|
DataEaseException.throwException("Please use the template after v1.9");
|
||||||
}
|
}
|
||||||
|
//custom组件替换.tableId 和 parentFieldId 追加识别标识
|
||||||
|
templateData = templateData.replaceAll("\"tableId\":\"", "\"tableId\":\"no_auth");
|
||||||
|
templateData = templateData.replaceAll("\"fieldsParent\":\\{\"id\":\"", "\"fieldsParent\":\\{\"id\":\"no_auth");
|
||||||
|
|
||||||
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
||||||
List<PanelGroupExtendDataDTO> viewsData = new ArrayList<>();
|
List<PanelGroupExtendDataDTO> viewsData = new ArrayList<>();
|
||||||
|
@ -138,6 +138,14 @@ export function fieldList(id, showLoading = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function fieldListWithPermission(id, showLoading = true) {
|
export function fieldListWithPermission(id, showLoading = true) {
|
||||||
|
//初始模板中的过滤组件无需走后台
|
||||||
|
if (id.indexOf('no_auth') > -1) {
|
||||||
|
return new Promise(function(resolve) {
|
||||||
|
resolve({
|
||||||
|
data: []
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/dataset/field/listWithPermission/' + id,
|
url: '/dataset/field/listWithPermission/' + id,
|
||||||
loading: showLoading,
|
loading: showLoading,
|
||||||
|
@ -252,6 +252,9 @@ export default {
|
|||||||
bus.$off('button-dialog-edit', this.editButtonDialog)
|
bus.$off('button-dialog-edit', this.editButtonDialog)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWrapperChildRefs() {
|
||||||
|
return this.$refs[this.editorRefName].getWrapperChildRefs()
|
||||||
|
},
|
||||||
initEvents() {
|
initEvents() {
|
||||||
bus.$on('component-dialog-edit', this.editDialog)
|
bus.$on('component-dialog-edit', this.editDialog)
|
||||||
bus.$on('button-dialog-edit', this.editButtonDialog)
|
bus.$on('button-dialog-edit', this.editButtonDialog)
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item>
|
<el-dropdown-item v-if="showPdfPageButton">
|
||||||
<span>
|
<span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
style="width: 16px; height: 16px;"
|
style="width: 16px; height: 16px;"
|
||||||
@ -286,7 +286,8 @@ export default {
|
|||||||
scale: '100%',
|
scale: '100%',
|
||||||
timer: null,
|
timer: null,
|
||||||
changes: 0,
|
changes: 0,
|
||||||
closePanelVisible: false
|
closePanelVisible: false,
|
||||||
|
showPdfPageButton: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -223,10 +223,18 @@ export default {
|
|||||||
runAnimation(this.$el, this.config.animations)
|
runAnimation(this.$el, this.config.animations)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setChartData(chart) {
|
getComponentId() {
|
||||||
this.chart = chart
|
return this.config.id
|
||||||
|
},
|
||||||
|
getCanvasId() {
|
||||||
|
return this.canvasId
|
||||||
|
},
|
||||||
|
getType() {
|
||||||
|
return this.config.type
|
||||||
|
},
|
||||||
|
getWrapperChildRefs() {
|
||||||
|
return this.$refs.wrapperChild.getWrapperChildRefs()
|
||||||
},
|
},
|
||||||
getStyle,
|
|
||||||
getShapeStyleIntDeDrag(style, prop) {
|
getShapeStyleIntDeDrag(style, prop) {
|
||||||
if (prop === 'rotate') {
|
if (prop === 'rotate') {
|
||||||
return style['rotate']
|
return style['rotate']
|
||||||
|
@ -1017,7 +1017,7 @@ export default {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
searchButtonInfo() {
|
searchButtonInfo() {
|
||||||
const result = this.buildButtonFilterMap(this.componentData)
|
const result = this.buildButtonFilterMap(this.$store.state.componentData)
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
filterMap() {
|
filterMap() {
|
||||||
@ -1138,6 +1138,25 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWrapperChildRefs() {
|
||||||
|
return this.$refs['wrapperChild']
|
||||||
|
},
|
||||||
|
getAllWrapperChildRefs() {
|
||||||
|
let allChildRefs = []
|
||||||
|
const currentChildRefs = this.getWrapperChildRefs()
|
||||||
|
if (currentChildRefs && currentChildRefs.length > 0) {
|
||||||
|
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
||||||
|
}
|
||||||
|
currentChildRefs && currentChildRefs.forEach(subRef => {
|
||||||
|
if (subRef?.getType && subRef.getType() === 'de-tabs') {
|
||||||
|
const currentTabChildRefs = subRef.getWrapperChildRefs()
|
||||||
|
if (currentTabChildRefs && currentTabChildRefs.length > 0) {
|
||||||
|
allChildRefs.push.apply(allChildRefs, currentTabChildRefs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return allChildRefs
|
||||||
|
},
|
||||||
setChartData(chart) {
|
setChartData(chart) {
|
||||||
this.componentData.forEach((item, index) => {
|
this.componentData.forEach((item, index) => {
|
||||||
if (item.type === 'view' && item.component === 'user-view' && item.propValue.viewId === chart.id) {
|
if (item.type === 'view' && item.component === 'user-view' && item.propValue.viewId === chart.id) {
|
||||||
@ -1154,7 +1173,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshButtonInfo(isClear = false) {
|
refreshButtonInfo(isClear = false) {
|
||||||
const result = this.buildButtonFilterMap(this.componentData, isClear)
|
const result = this.buildButtonFilterMap(this.$store.state.componentData, isClear)
|
||||||
this.searchButtonInfo.buttonExist = result.buttonExist
|
this.searchButtonInfo.buttonExist = result.buttonExist
|
||||||
this.searchButtonInfo.relationFilterIds = result.relationFilterIds
|
this.searchButtonInfo.relationFilterIds = result.relationFilterIds
|
||||||
this.searchButtonInfo.filterMap = result.filterMap
|
this.searchButtonInfo.filterMap = result.filterMap
|
||||||
@ -1162,10 +1181,12 @@ export default {
|
|||||||
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
||||||
},
|
},
|
||||||
triggerSearchButton(isClear = false) {
|
triggerSearchButton(isClear = false) {
|
||||||
|
if (this.canvasId !== 'canvas-main') {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.refreshButtonInfo(isClear)
|
this.refreshButtonInfo(isClear)
|
||||||
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
||||||
|
this.$store.state.componentData.forEach(component => {
|
||||||
this.componentData.forEach(component => {
|
|
||||||
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
|
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
|
||||||
component.filters = this.buttonFilterMap[component.propValue.viewId]
|
component.filters = this.buttonFilterMap[component.propValue.viewId]
|
||||||
}
|
}
|
||||||
@ -1212,20 +1233,16 @@ export default {
|
|||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
buildViewKeyFilters(panelItems, result, isClear = false) {
|
buildViewKeyFilters(panelItems, result, isClear = false) {
|
||||||
const refs = this.$refs
|
const wrapperChildAll = this.getAllWrapperChildRefs()
|
||||||
if (!this.$refs['wrapperChild'] || !this.$refs['wrapperChild'].length) return result
|
if (!wrapperChildAll || !wrapperChildAll.length) return result
|
||||||
const len = this.$refs['wrapperChild'].length
|
|
||||||
panelItems.forEach((element) => {
|
panelItems.forEach((element) => {
|
||||||
if (element.type !== 'custom') {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
let param = null
|
let param = null
|
||||||
const index = this.getComponentIndex(element.id)
|
let wrapperChild
|
||||||
if (index < 0 || index >= len) {
|
wrapperChildAll?.forEach(item => {
|
||||||
return true
|
if (item?.['getComponentId'] && item.getComponentId() === element.id) {
|
||||||
}
|
wrapperChild = item
|
||||||
const wrapperChild = refs['wrapperChild'][index]
|
}
|
||||||
|
})
|
||||||
if (!wrapperChild || !wrapperChild.getCondition) return true
|
if (!wrapperChild || !wrapperChild.getCondition) return true
|
||||||
if (isClear) {
|
if (isClear) {
|
||||||
wrapperChild.clearHandler && wrapperChild.clearHandler()
|
wrapperChild.clearHandler && wrapperChild.clearHandler()
|
||||||
@ -1234,9 +1251,11 @@ export default {
|
|||||||
const condition = formatCondition(param)
|
const condition = formatCondition(param)
|
||||||
const vValid = valueValid(condition)
|
const vValid = valueValid(condition)
|
||||||
const filterComponentId = condition.componentId
|
const filterComponentId = condition.componentId
|
||||||
|
const conditionCanvasId = wrapperChild.getCanvasId && wrapperChild.getCanvasId()
|
||||||
Object.keys(result).forEach(viewId => {
|
Object.keys(result).forEach(viewId => {
|
||||||
const vidMatch = viewIdMatch(condition.viewIds, viewId)
|
const vidMatch = viewIdMatch(condition.viewIds, viewId)
|
||||||
const viewFilters = result[viewId]
|
const viewFilters = result[viewId]
|
||||||
|
const canvasMatch = this.checkCanvasViewIdsMatch(conditionCanvasId, viewId)
|
||||||
let j = viewFilters.length
|
let j = viewFilters.length
|
||||||
while (j--) {
|
while (j--) {
|
||||||
const filter = viewFilters[j]
|
const filter = viewFilters[j]
|
||||||
@ -1244,14 +1263,24 @@ export default {
|
|||||||
viewFilters.splice(j, 1)
|
viewFilters.splice(j, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vidMatch && vValid && viewFilters.push(condition)
|
canvasMatch && vidMatch && vValid && viewFilters.push(condition)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
|
checkCanvasViewIdsMatch(conditionCanvasId, viewId) {
|
||||||
|
if (conditionCanvasId === 'canvas-main') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
for (let index = 0; index < this.$store.state.componentData.length; index++) {
|
||||||
|
const item = this.$store.state.componentData[index]
|
||||||
|
if (item.type === 'view' && item.propValue.viewId === viewId && item.canvasId === conditionCanvasId) return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
getComponentIndex(id) {
|
getComponentIndex(id) {
|
||||||
for (let index = 0; index < this.componentData.length; index++) {
|
for (let index = 0; index < this.$store.state.componentData.length; index++) {
|
||||||
const item = this.componentData[index]
|
const item = this.$store.state.componentData[index]
|
||||||
if (item.id === id) return index
|
if (item.id === id) return index
|
||||||
}
|
}
|
||||||
return -1
|
return -1
|
||||||
|
@ -346,10 +346,10 @@ export default {
|
|||||||
return this.targetLinkageInfo[this.element.propValue.viewId]
|
return this.targetLinkageInfo[this.element.propValue.viewId]
|
||||||
},
|
},
|
||||||
miniHeight() {
|
miniHeight() {
|
||||||
return this.mobileLayoutStatus ? 1 : 4
|
return this.mobileLayoutStatus ? 1 : 1
|
||||||
},
|
},
|
||||||
miniWidth() {
|
miniWidth() {
|
||||||
return this.mobileLayoutStatus ? 1 : 4
|
return this.mobileLayoutStatus ? 1 : 1
|
||||||
},
|
},
|
||||||
curCanvasScaleSelf() {
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
|
@ -366,7 +366,7 @@ export default {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
searchButtonInfo() {
|
searchButtonInfo() {
|
||||||
const result = this.buildButtonFilterMap(this.componentData)
|
const result = this.buildButtonFilterMap(this.$store.state.componentData)
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
filterMap() {
|
filterMap() {
|
||||||
@ -448,6 +448,26 @@ export default {
|
|||||||
bus.$off('trigger-reset-button', this.triggerResetButton)
|
bus.$off('trigger-reset-button', this.triggerResetButton)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWrapperChildRefs() {
|
||||||
|
return this.$refs['viewWrapperChild']
|
||||||
|
},
|
||||||
|
getAllWrapperChildRefs() {
|
||||||
|
let allChildRefs = []
|
||||||
|
const currentChildRefs = this.getWrapperChildRefs()
|
||||||
|
if (currentChildRefs && currentChildRefs.length > 0) {
|
||||||
|
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
||||||
|
}
|
||||||
|
currentChildRefs && currentChildRefs.forEach(subRef => {
|
||||||
|
if (subRef?.getType && subRef.getType() === 'de-tabs') {
|
||||||
|
const currentTabChildRefs = subRef.getWrapperChildRefs()
|
||||||
|
if (currentTabChildRefs && currentTabChildRefs.length > 0) {
|
||||||
|
allChildRefs.push.apply(allChildRefs, currentTabChildRefs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return allChildRefs
|
||||||
|
},
|
||||||
|
|
||||||
getCanvasHeight() {
|
getCanvasHeight() {
|
||||||
return this.mainHeightCount
|
return this.mainHeightCount
|
||||||
},
|
},
|
||||||
@ -484,12 +504,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
triggerSearchButton(isClear = false) {
|
triggerSearchButton(isClear = false) {
|
||||||
const result = this.buildButtonFilterMap(this.componentData, isClear)
|
if (this.canvasId !== 'canvas-main') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const result = this.buildButtonFilterMap(this.$store.state.componentData, isClear)
|
||||||
this.searchButtonInfo.autoTrigger = result.autoTrigger
|
this.searchButtonInfo.autoTrigger = result.autoTrigger
|
||||||
this.searchButtonInfo.filterMap = result.filterMap
|
this.searchButtonInfo.filterMap = result.filterMap
|
||||||
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
this.buttonFilterMap = this.searchButtonInfo.filterMap
|
||||||
|
|
||||||
this.componentData.forEach(component => {
|
this.$store.state.componentData.forEach(component => {
|
||||||
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
|
if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) {
|
||||||
component.filters = this.buttonFilterMap[component.propValue.viewId]
|
component.filters = this.buttonFilterMap[component.propValue.viewId]
|
||||||
}
|
}
|
||||||
@ -534,19 +557,20 @@ export default {
|
|||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
buildViewKeyFilters(panelItems, result, isClear = false) {
|
buildViewKeyFilters(panelItems, result, isClear = false) {
|
||||||
const refs = this.$refs
|
const wrapperChildAll = this.getAllWrapperChildRefs()
|
||||||
if (!this.$refs['viewWrapperChild'] || !this.$refs['viewWrapperChild'].length) return result
|
if (!wrapperChildAll || !wrapperChildAll.length) return result
|
||||||
panelItems.forEach((element) => {
|
panelItems.forEach((element) => {
|
||||||
if (element.type !== 'custom') {
|
if (element.type !== 'custom') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
let wrapperChild
|
||||||
const index = this.getComponentIndex(element.id)
|
wrapperChildAll?.forEach(item => {
|
||||||
if (index < 0) {
|
if (item?.['getComponentId'] && item.getComponentId() === element.id) {
|
||||||
return true
|
wrapperChild = item
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
if (!wrapperChild || !wrapperChild.getCondition) return true
|
||||||
let param = null
|
let param = null
|
||||||
const wrapperChild = refs['viewWrapperChild'][index]
|
|
||||||
if (isClear) {
|
if (isClear) {
|
||||||
wrapperChild.clearHandler && wrapperChild.clearHandler()
|
wrapperChild.clearHandler && wrapperChild.clearHandler()
|
||||||
}
|
}
|
||||||
@ -554,9 +578,12 @@ export default {
|
|||||||
const condition = formatCondition(param)
|
const condition = formatCondition(param)
|
||||||
const vValid = valueValid(condition)
|
const vValid = valueValid(condition)
|
||||||
const filterComponentId = condition.componentId
|
const filterComponentId = condition.componentId
|
||||||
|
const conditionCanvasId = wrapperChild.getCanvasId && wrapperChild.getCanvasId()
|
||||||
Object.keys(result).forEach(viewId => {
|
Object.keys(result).forEach(viewId => {
|
||||||
const vidMatch = viewIdMatch(condition.viewIds, viewId)
|
const vidMatch = viewIdMatch(condition.viewIds, viewId)
|
||||||
const viewFilters = result[viewId]
|
const viewFilters = result[viewId]
|
||||||
|
const canvasMatch = this.checkCanvasViewIdsMatch(conditionCanvasId, viewId)
|
||||||
|
|
||||||
let j = viewFilters.length
|
let j = viewFilters.length
|
||||||
while (j--) {
|
while (j--) {
|
||||||
const filter = viewFilters[j]
|
const filter = viewFilters[j]
|
||||||
@ -564,11 +591,21 @@ export default {
|
|||||||
viewFilters.splice(j, 1)
|
viewFilters.splice(j, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vidMatch && vValid && viewFilters.push(condition)
|
canvasMatch && vidMatch && vValid && viewFilters.push(condition)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
|
checkCanvasViewIdsMatch(conditionCanvasId, viewId) {
|
||||||
|
if (conditionCanvasId === 'canvas-main') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
for (let index = 0; index < this.$store.state.componentData.length; index++) {
|
||||||
|
const item = this.$store.state.componentData[index]
|
||||||
|
if (item.type === 'view' && item.propValue.viewId === viewId && item.canvasId === conditionCanvasId) return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
getComponentIndex(id) {
|
getComponentIndex(id) {
|
||||||
for (let index = 0; index < this.componentData.length; index++) {
|
for (let index = 0; index < this.componentData.length; index++) {
|
||||||
const item = this.componentData[index]
|
const item = this.componentData[index]
|
||||||
|
@ -175,6 +175,12 @@ export default {
|
|||||||
this.$set(this.element.style, 'innerBgColor', innerBgColor || '')
|
this.$set(this.element.style, 'innerBgColor', innerBgColor || '')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getComponentId() {
|
||||||
|
return this.element.id
|
||||||
|
},
|
||||||
|
getCanvasId() {
|
||||||
|
return this.canvasId
|
||||||
|
},
|
||||||
handlerPositionChange(val) {
|
handlerPositionChange(val) {
|
||||||
const { horizontal = 'left', vertical = 'center' } = val
|
const { horizontal = 'left', vertical = 'center' } = val
|
||||||
this.titleStyle = {
|
this.titleStyle = {
|
||||||
@ -185,7 +191,6 @@ export default {
|
|||||||
flexDirection: 'column'
|
flexDirection: 'column'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (vertical !== 'top' && this.element.component !== 'de-select-grid') {
|
if (vertical !== 'top' && this.element.component !== 'de-select-grid') {
|
||||||
this.titleStyle = null
|
this.titleStyle = null
|
||||||
this.outsideStyle = {
|
this.outsideStyle = {
|
||||||
|
@ -630,7 +630,8 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.element.auxiliaryMatrix && this.curCanvasScaleSelf) {
|
if (this.element.auxiliaryMatrix && this.curCanvasScaleSelf) {
|
||||||
const height = Math.round(this.height / this.curCanvasScaleSelf.matrixStyleHeight) * this.curCanvasScaleSelf.matrixStyleHeight
|
const height = Math.round(this.height / this.curCanvasScaleSelf.matrixStyleHeight) * this.curCanvasScaleSelf.matrixStyleHeight
|
||||||
return (height - this.curGap * 2) + 'px'
|
const hp = (height - this.curGap * 2)
|
||||||
|
return (hp > 3 ? hp : 3) + 'px'
|
||||||
} else {
|
} else {
|
||||||
return (this.height - this.curGap * 2) + 'px'
|
return (this.height - this.curGap * 2) + 'px'
|
||||||
}
|
}
|
||||||
@ -682,14 +683,14 @@ export default {
|
|||||||
return (this.canvasStyleData.panel.gap === 'yes' && this.element.auxiliaryMatrix) ? this.componentGap : 0
|
return (this.canvasStyleData.panel.gap === 'yes' && this.element.auxiliaryMatrix) ? this.componentGap : 0
|
||||||
},
|
},
|
||||||
miniWidth() {
|
miniWidth() {
|
||||||
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleWidth * (this.mobileLayoutStatus ? 1 : 4) : 0
|
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleWidth * (this.mobileLayoutStatus ? 1 : 1) : 0
|
||||||
},
|
},
|
||||||
miniHeight() {
|
miniHeight() {
|
||||||
if (this.element.auxiliaryMatrix) {
|
if (this.element.auxiliaryMatrix) {
|
||||||
if (this.element.component === 'de-number-range') {
|
if (this.element.component === 'de-number-range') {
|
||||||
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
|
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 1) : 0
|
||||||
} else {
|
} else {
|
||||||
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
|
return this.element.auxiliaryMatrix ? this.curCanvasScaleSelf.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 1) : 0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0
|
return 0
|
||||||
|
@ -152,11 +152,17 @@ export default {
|
|||||||
},
|
},
|
||||||
resetDefaultValue(id) {
|
resetDefaultValue(id) {
|
||||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||||
const values = this.element.options.value
|
if (!this.element.options.value) {
|
||||||
this.form.min = values[0]
|
this.form.min = null
|
||||||
if (values.length > 1) {
|
this.form.max = null
|
||||||
this.form.max = values[1]
|
} else {
|
||||||
|
const values = this.element.options.value
|
||||||
|
this.form.min = values[0]
|
||||||
|
if (values.length > 1) {
|
||||||
|
this.form.max = values[1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.search()
|
this.search()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
>
|
>
|
||||||
<Preview
|
<Preview
|
||||||
:component-data="tabCanvasComponentData(item.name)"
|
:component-data="tabCanvasComponentData(item.name)"
|
||||||
|
:ref="'canvasTabRef-'+item.name"
|
||||||
:canvas-style-data="canvasStyleData"
|
:canvas-style-data="canvasStyleData"
|
||||||
:canvas-id="element.id+'-'+item.name"
|
:canvas-id="element.id+'-'+item.name"
|
||||||
:panel-info="panelInfo"
|
:panel-info="panelInfo"
|
||||||
@ -458,6 +459,23 @@ export default {
|
|||||||
bus.$off('add-new-tab', this.addNewTab)
|
bus.$off('add-new-tab', this.addNewTab)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getType() {
|
||||||
|
return this.element.type
|
||||||
|
},
|
||||||
|
getWrapperChildRefs() {
|
||||||
|
let refsSubAll = []
|
||||||
|
const _this = this
|
||||||
|
this.element.options.tabList.forEach(tabItem => {
|
||||||
|
const refsSub = _this.$refs['canvasTabRef-' + tabItem.name]
|
||||||
|
if (refsSub && refsSub.length) {
|
||||||
|
const refsSubArray = refsSub[0].getWrapperChildRefs()
|
||||||
|
if (refsSubArray && refsSubArray.length > 0) {
|
||||||
|
refsSubAll.push.apply(refsSubAll, refsSubArray)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return refsSubAll
|
||||||
|
},
|
||||||
titleStyle(itemName) {
|
titleStyle(itemName) {
|
||||||
if (this.activeTabName === itemName) {
|
if (this.activeTabName === itemName) {
|
||||||
return {
|
return {
|
||||||
|
@ -1884,7 +1884,7 @@ export default {
|
|||||||
all_compute_mode: 'Direct connection and extraction mode',
|
all_compute_mode: 'Direct connection and extraction mode',
|
||||||
extra_params: 'Extra JDBC connection string',
|
extra_params: 'Extra JDBC connection string',
|
||||||
please_input_dataPath: 'Please enter the JsonPath data path',
|
please_input_dataPath: 'Please enter the JsonPath data path',
|
||||||
show_api_data: 'View API raw data',
|
show_api_data: 'View API data structure',
|
||||||
warning: 'Contains invalid table',
|
warning: 'Contains invalid table',
|
||||||
data_table: 'Dataset Table',
|
data_table: 'Dataset Table',
|
||||||
data_table_name: 'Dataset Table name',
|
data_table_name: 'Dataset Table name',
|
||||||
|
@ -1878,7 +1878,7 @@ export default {
|
|||||||
all_compute_mode: '直連、抽取模式',
|
all_compute_mode: '直連、抽取模式',
|
||||||
extra_params: '額外的JDBC連接字符串',
|
extra_params: '額外的JDBC連接字符串',
|
||||||
please_input_dataPath: '請輸入 JsonPath 數據路徑',
|
please_input_dataPath: '請輸入 JsonPath 數據路徑',
|
||||||
show_api_data: '查看API原始數據',
|
show_api_data: '查看API数据結構',
|
||||||
warning: '包含無效數據表',
|
warning: '包含無效數據表',
|
||||||
data_table: '數據表',
|
data_table: '數據表',
|
||||||
data_table_name: '數據表名稱',
|
data_table_name: '數據表名稱',
|
||||||
|
@ -1877,7 +1877,7 @@ export default {
|
|||||||
all_compute_mode: '直连、抽取模式',
|
all_compute_mode: '直连、抽取模式',
|
||||||
extra_params: '额外的JDBC连接字符串',
|
extra_params: '额外的JDBC连接字符串',
|
||||||
please_input_dataPath: '请输入 JsonPath 数据路径',
|
please_input_dataPath: '请输入 JsonPath 数据路径',
|
||||||
show_api_data: '查看API原始数据',
|
show_api_data: '查看API数据结构',
|
||||||
warning: '包含无效数据表',
|
warning: '包含无效数据表',
|
||||||
data_table: '数据表',
|
data_table: '数据表',
|
||||||
data_table_name: '数据表名称',
|
data_table_name: '数据表名称',
|
||||||
|
@ -357,23 +357,7 @@ export default {
|
|||||||
},
|
},
|
||||||
'activeName': {
|
'activeName': {
|
||||||
handler(newName, oldName) {
|
handler(newName, oldName) {
|
||||||
if (this.activeName === 'assembly') {
|
|
||||||
this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams))
|
|
||||||
} else {
|
|
||||||
if (this.datasetParams.length > 0) {
|
|
||||||
for (var j = 0; j < this.datasetParams.length; j++) {
|
|
||||||
var hasParam = false
|
|
||||||
for (var i = 0; i < this.childViews.datasetParams.length; i++) {
|
|
||||||
if (this.childViews.datasetParams[i].id === this.datasetParams[j].id) {
|
|
||||||
hasParam = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!hasParam) {
|
|
||||||
this.allParams.push(this.datasetParams[j])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1174,10 +1174,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showApiData(){
|
showApiData(){
|
||||||
if (this.apiItem.useJsonPath && !this.apiItem.jsonPath) {
|
|
||||||
this.$message.error(i18n.t('datasource.please_input_dataPath'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.apiItemBasicInfo.validate((valid) => {
|
this.$refs.apiItemBasicInfo.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const data = Base64.encode(JSON.stringify(this.apiItem))
|
const data = Base64.encode(JSON.stringify(this.apiItem))
|
||||||
@ -1302,16 +1298,16 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCheckAllChange(apiItem, row, ref) {
|
handleCheckAllChange(apiItem, row, ref) {
|
||||||
this.errMsg = []
|
this.errMsg = []
|
||||||
this.handleCheckChange(apiItem, row)
|
this.handleCheckChange(this.apiItem, row)
|
||||||
apiItem.fields = []
|
this.apiItem.fields = []
|
||||||
this.handleFiledChange(apiItem, row)
|
this.handleFiledChange(this.apiItem, row)
|
||||||
if(ref === 'plxTable'){
|
if(ref === 'plxTable'){
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.plxTable?.reloadData(this.previewData(this.apiItem))
|
this.$refs.plxTable?.reloadData(this.previewData(this.apiItem))
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.originPlxTable?.reloadData(this.previewData(this.originFieldItem))
|
this.$refs.originPlxTable?.reloadData(this.previewData(this.apiItem))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user