forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
cada5707d6
14
Dockerfile
14
Dockerfile
@ -1,15 +1,15 @@
|
||||
FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:edge
|
||||
|
||||
RUN echo -e 'https://dl-cdn.alpinelinux.org/alpine/edge/main/\nhttps://dl-cdn.alpinelinux.org/alpine/edge/community/' > /etc/apk/repositories
|
||||
# RUN echo -e 'https://dl-cdn.alpinelinux.org/alpine/edge/main/\nhttps://dl-cdn.alpinelinux.org/alpine/edge/community/' > /etc/apk/repositories
|
||||
|
||||
RUN apk add chromium chromium-chromedriver fontconfig --no-cache --allow-untrusted
|
||||
# RUN apk add chromium chromium-chromedriver fontconfig --no-cache --allow-untrusted
|
||||
|
||||
ADD simsun.ttc /usr/share/fonts/
|
||||
# ADD simsun.ttc /usr/share/fonts/
|
||||
|
||||
RUN cd /usr/share/fonts/ \
|
||||
&& mkfontscale \
|
||||
&& mkfontdir \
|
||||
&& fc-cache -fv
|
||||
# RUN cd /usr/share/fonts/ \
|
||||
# && mkfontscale \
|
||||
# && mkfontdir \
|
||||
# && fc-cache -fv
|
||||
|
||||
ARG IMAGE_TAG
|
||||
|
||||
|
@ -313,3 +313,7 @@ ADD COLUMN `uuid` varchar(8) NULL COMMENT 'uuid' AFTER `user_id`;
|
||||
|
||||
ALTER TABLE `chart_view`
|
||||
ADD COLUMN `is_plugin` bit(1) NULL COMMENT '是否插件' AFTER `chart_type`;
|
||||
|
||||
|
||||
INSERT INTO `my_plugin` VALUES (2, '视图默认插件', 'default', 0, 20000, 'view', '默认视图插件', '1.0-SNAPSHOT', NULL, 'fit2cloud-chenyw', 0, NULL, NULL, 'deplugin-view-backend', NULL);
|
||||
|
||||
|
@ -164,9 +164,7 @@ export default {
|
||||
sourceCustomStyleStr: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.bindPluginEvent()
|
||||
},
|
||||
|
||||
computed: {
|
||||
scaleCoefficient() {
|
||||
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
|
||||
@ -351,6 +349,9 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.bindPluginEvent()
|
||||
},
|
||||
|
||||
created() {
|
||||
this.refId = uuid.v1
|
||||
@ -362,10 +363,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
bindPluginEvent() {
|
||||
bus.$on('plugin-chart-click', this.chartClick)
|
||||
bus.$on('plugin-jump-click', this.jumpClick)
|
||||
bus.$on('plugin-add-view-track-filter', this.addViewTrackFilter)
|
||||
bus.$on('plugin-chart-click', param => {
|
||||
param.viewId && param.viewId === this.element.propValue.viewId && this.chartClick(param)
|
||||
})
|
||||
bus.$on('plugin-jump-click', param => {
|
||||
param.viewId && param.viewId === this.element.propValue.viewId && this.jumpClick(param)
|
||||
})
|
||||
bus.$on('plugin-add-view-track-filter', param => {
|
||||
param.viewId && param.viewId === this.element.propValue.viewId && this.addViewTrackFilter(param)
|
||||
})
|
||||
},
|
||||
|
||||
addViewTrackFilter(linkageParam) {
|
||||
this.$store.commit('addViewTrackFilter', linkageParam)
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="de-tabs-div">
|
||||
<el-tabs v-model="activeTabName" type="card" class="de-tabs">
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in tabList"
|
||||
v-for="(item, index) in element.options.tabList"
|
||||
:key="item.name+index"
|
||||
:lazy="true"
|
||||
:name="item.name"
|
||||
@ -26,7 +26,7 @@
|
||||
{{ $t('detabs.selectview') }}
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item v-if="tabList.length > 1" :command="beforeHandleCommond('deleteCur', item)">
|
||||
<el-dropdown-item v-if=" element.options.tabList.length > 1" :command="beforeHandleCommond('deleteCur', item)">
|
||||
{{ $t('table.delete') }}
|
||||
</el-dropdown-item>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
</span>
|
||||
|
||||
<div v-if="activeTabName === item.name" class="de-tab-content">
|
||||
<user-view v-if="item.content && item.content.propValue && item.content.propValue.viewId" :ref="item.name" :in-tab="true" :is-edit="isEdit" :active="active" :element="item.content" :out-style="outStyle" />
|
||||
<user-view v-if="item.content && item.content.propValue && item.content.propValue.viewId" :ref="item.name" :in-tab="true" :is-edit="isEdit" :active="active" :element="item.content" :filters="item.content.filters" :out-style="outStyle" />
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
@ -130,14 +130,15 @@ export default {
|
||||
dialogVisible: false,
|
||||
textarea: '',
|
||||
curItem: null,
|
||||
viewDialogVisible: false,
|
||||
tabList: []
|
||||
viewDialogVisible: false
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dropdownShow() {
|
||||
return this.isEdit && !this.mobileLayoutStatus
|
||||
},
|
||||
|
||||
...mapState([
|
||||
'curComponent',
|
||||
'mobileLayoutStatus'
|
||||
@ -152,8 +153,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
bus.$on('add-new-tab', this.addNewTab)
|
||||
this.tabList = this.element.options && this.element.options.tabList
|
||||
this.activeTabName = this.tabList[0].name
|
||||
this.activeTabName = this.element.options.tabList[0].name
|
||||
},
|
||||
methods: {
|
||||
beforeHandleCommond(item, param) {
|
||||
@ -192,7 +192,8 @@ export default {
|
||||
const newComponentId = uuid.v1()
|
||||
const componentInfo = {
|
||||
type: 'view',
|
||||
id: node.id
|
||||
/* id: node.id */
|
||||
id: node.innerId
|
||||
}
|
||||
|
||||
componentList.forEach(componentTemp => {
|
||||
@ -239,7 +240,7 @@ export default {
|
||||
while (len--) {
|
||||
if (this.element.options.tabList[len].name === param.name) {
|
||||
this.element.options.tabList.splice(len, 1)
|
||||
this.tabList = this.element.options.tabList
|
||||
|
||||
const activIndex = (len - 1 + this.element.options.tabList.length) % this.element.options.tabList.length
|
||||
this.activeTabName = this.element.options.tabList[activIndex].name
|
||||
}
|
||||
@ -256,7 +257,7 @@ export default {
|
||||
content: null
|
||||
}
|
||||
this.element.options.tabList.push(tab)
|
||||
this.tabList = this.element.options.tabList
|
||||
|
||||
this.styleChange()
|
||||
},
|
||||
styleChange() {
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
@ -203,20 +203,35 @@ const data = {
|
||||
|
||||
for (let index = 0; index < state.componentData.length; index++) {
|
||||
const element = state.componentData[index]
|
||||
if (element.type && element.type === 'de-tabs') {
|
||||
for (let idx = 0; idx < element.options.tabList.length; idx++) {
|
||||
const ele = element.options.tabList[idx].content
|
||||
if (!ele.type || ele.type !== 'view') continue
|
||||
const currentFilters = ele.filters || []
|
||||
const vidMatch = viewIdMatch(condition.viewIds, ele.propValue.viewId)
|
||||
|
||||
let jdx = currentFilters.length
|
||||
while (jdx--) {
|
||||
const filter = currentFilters[jdx]
|
||||
if (filter.componentId === filterComponentId) {
|
||||
currentFilters.splice(jdx, 1)
|
||||
}
|
||||
}
|
||||
// 不存在该条件 且 条件有效 直接保存该条件
|
||||
// !filterExist && vValid && currentFilters.push(condition)
|
||||
vidMatch && vValid && currentFilters.push(condition)
|
||||
ele.filters = currentFilters
|
||||
}
|
||||
state.componentData[index] = element
|
||||
}
|
||||
if (!element.type || element.type !== 'view') continue
|
||||
const currentFilters = element.filters || []
|
||||
const vidMatch = viewIdMatch(condition.viewIds, element.propValue.viewId)
|
||||
|
||||
let j = currentFilters.length
|
||||
// let filterExist = false
|
||||
while (j--) {
|
||||
const filter = currentFilters[j]
|
||||
if (filter.componentId === filterComponentId) {
|
||||
// filterExist = true
|
||||
// 已存在该条件 且 条件值有效 直接替换原体检
|
||||
// vidMatch && vValid && (currentFilters[j] = condition)
|
||||
// 已存在该条件 且 条件值无效 直接删除原条件
|
||||
// vidMatch && !vValid && (currentFilters.splice(j, 1))
|
||||
currentFilters.splice(j, 1)
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,12 @@ export function baseTableNormal(s2, container, chart, action, tableData) {
|
||||
|
||||
// add drill list
|
||||
if (chart.drill) {
|
||||
const drillFields = JSON.parse(chart.drillFields)
|
||||
let drillFields = []
|
||||
try {
|
||||
drillFields = JSON.parse(chart.drillFields)
|
||||
} catch (err) {
|
||||
drillFields = JSON.parse(JSON.stringify(chart.drillFields))
|
||||
}
|
||||
const drillField = drillFields[chart.drillFilters.length]
|
||||
|
||||
const drillFilters = JSON.parse(JSON.stringify(chart.drillFilters))
|
||||
|
@ -180,8 +180,8 @@ export default {
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1
|
||||
})
|
||||
// 暂时只支持类别轴/维度的时间类型字段,且视图中有且只有一个时间字段
|
||||
if (t1.length === 1 && this.chart.type !== 'text' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
// 暂时只支持类别轴/维度的时间类型字段
|
||||
if (t1.length > 0 && this.chart.type !== 'text' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
this.disableEditCompare = false
|
||||
} else {
|
||||
this.disableEditCompare = true
|
||||
|
@ -177,8 +177,8 @@ export default {
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1
|
||||
})
|
||||
// 暂时只支持类别轴/维度的时间类型字段,且视图中有且只有一个时间字段
|
||||
if (t1.length === 1 && this.chart.type !== 'text' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
// 暂时只支持类别轴/维度的时间类型字段
|
||||
if (t1.length > 0 && this.chart.type !== 'text' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
this.disableEditCompare = false
|
||||
} else {
|
||||
this.disableEditCompare = true
|
||||
|
@ -387,11 +387,28 @@ export default {
|
||||
return roots
|
||||
},
|
||||
loadViews() {
|
||||
const viewIds = this.componentData
|
||||
/* const viewIds = this.componentData
|
||||
.filter(item => item.type === 'view' && item.propValue && item.propValue.viewId)
|
||||
.map(item => item.propValue.viewId)
|
||||
.map(item => item.propValue.viewId) */
|
||||
let viewIds = []; let tabViewIds = []
|
||||
for (let index = 0; index < this.componentData.length; index++) {
|
||||
const element = this.componentData[index]
|
||||
if (element.type && element.propValue && element.propValue.viewId && element.type === 'view') {
|
||||
viewIds.push(element.propValue.viewId)
|
||||
}
|
||||
|
||||
if (element.type && element.type === 'de-tabs') {
|
||||
tabViewIds = element.options.tabList.filter(item => item.content && item.content.type === 'view' && item.content.propValue && item.content.propValue.viewId).map(item => item.content.propValue.viewId)
|
||||
}
|
||||
viewIds = [...viewIds, ...tabViewIds]
|
||||
}
|
||||
viewIds && viewIds.length > 0 && viewsWithIds(viewIds).then(res => {
|
||||
const datas = res.data
|
||||
/* datas.forEach(item => {
|
||||
if (tabViewIds.includes(item.id)) {
|
||||
item.name = 'tabs(' + item.name + ')'
|
||||
}
|
||||
}) */
|
||||
this.viewInfos = datas
|
||||
this.childViews.viewInfos = datas
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user