Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2022-07-04 15:30:41 +08:00
commit 6599619aa2
20 changed files with 103 additions and 63 deletions

View File

@ -22,6 +22,8 @@ public class VAuthModelDTO extends VAuthModelWithBLOBs implements ITreeBase<VAut
private String innerId;
private Boolean isPlugin = false;
public String toString(){
return this.getName();
}

View File

@ -155,7 +155,11 @@
<if test="type == 11">
menu_id as id ,title as name
from sys_menu
from (
select menu_id, title from sys_menu
union all
select menu_id, title from plugin_sys_menu
) plugin_union
<where>
menu_id in
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">

View File

@ -5,6 +5,7 @@
type="io.dataease.dto.authModel.VAuthModelDTO">
<result column="privileges" jdbcType="VARCHAR" property="privileges"/>
<result column="inner_id" jdbcType="VARCHAR" property="innerId"/>
<result column="is_plugin" jdbcType="VARCHAR" property="isPlugin"/>
</resultMap>
<select id="queryAuthModel" resultMap="ExtResultMap">
@ -117,7 +118,8 @@
panel_view.panel_id AS pid,
chart_view.type as 'model_inner_type',
'leaf' AS node_type,
'view' AS model_type
'view' AS model_type,
chart_view.is_plugin as 'is_plugin'
FROM
chart_view
LEFT JOIN panel_view ON panel_view.chart_view_id = chart_view.id

View File

@ -1121,9 +1121,9 @@ public class SqlserverQueryProvider extends QueryProvider {
}
} else {
if (x.getDeType() == DeTypeConstants.DE_INT) {
fieldName = String.format(SqlServerSQLConstants.CONVERT, originField, SqlServerSQLConstants.DEFAULT_INT_FORMAT);
fieldName = String.format(SqlServerSQLConstants.CONVERT, SqlServerSQLConstants.DEFAULT_INT_FORMAT, originField);
} else if (x.getDeType() == DeTypeConstants.DE_FLOAT) {
fieldName = String.format(SqlServerSQLConstants.CONVERT, originField, SqlServerSQLConstants.DEFAULT_FLOAT_FORMAT);
fieldName = String.format(SqlServerSQLConstants.CONVERT, SqlServerSQLConstants.DEFAULT_FLOAT_FORMAT, originField);
} else {
fieldName = originField;
}

View File

@ -65,3 +65,33 @@ CREATE TABLE `sys_user_assist` (
`need_first_noti` bit(1) DEFAULT NULL COMMENT '是否需要首登提示',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
CREATE
OR REPLACE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `v_history_chart_view` AS SELECT
`chart_group`.`id` AS `id`,
`chart_group`.`id` AS `inner_id`,
`chart_group`.`name` AS `NAME`,
`chart_group`.`name` AS `label`,
`chart_group`.`pid` AS `pid`,
`chart_group`.`type` AS `model_inner_type`,
'spine' AS `node_type`,
'view' AS `model_type`,
1 AS `mode`,
0 AS `is_plugin`
FROM
`chart_group` UNION ALL
SELECT DISTINCT
`chart_view`.`id` AS `id`,
`chart_view`.`id` AS `inner_id`,
`chart_view`.`name` AS `NAME`,
`chart_view`.`name` AS `label`,
`chart_view`.`scene_id` AS `pid`,
`chart_view`.`type` AS `model_inner_type`,
'leaf' AS `node_type`,
'view' AS `model_type`,
1 AS `mode`,
`chart_view`.`is_plugin` AS `is_plugin`
FROM
`chart_view`
WHERE
( `chart_view`.`chart_type` = 'public' );

View File

@ -16,6 +16,8 @@
</template>
<script>
import { handlerInputStyle } from '@/components/widget/DeWidget/serviceNameFn.js'
import { uuid } from 'vue-uuid'
export default {
name: 'ElVisualSelect',
@ -106,8 +108,13 @@ export default {
}
this.options = this.newList.slice(0, this.maxLength)
},
customInputStyle() {
if (!this.$parent.$parent.handlerInputStyle) return;
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-input__inner'), this.$parent.element.style)
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-select__input'), {wordColor: this.$parent.element.style.wordColor})
},
init() {
this.customInputStyle()
if (this.defaultFirst && this.list.length > 0) {
this.selectValue = this.list[0].value
}

View File

@ -858,6 +858,9 @@ export default {
this.sourceCustomStyleStr = this.chart.customStyle
if (this.componentViewsData[this.chart.id]) {
this.componentViewsData[this.chart.id]['title'] = this.chart.title
if (param.refreshProp) {
this.componentViewsData[this.chart.id][param.refreshProp] = this.chart[param.refreshProp]
}
}
this.mergeScale()
}

View File

@ -1,6 +1,5 @@
import { sin, cos } from '@/components/canvas/utils/translate'
import store from '@/store'
import { colorReverse } from '@/components/canvas/utils/utils'
import Vue from 'vue'
export const LIGHT_THEME_COLOR_MAIN = '#000000'
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
@ -218,9 +217,6 @@ export const THEME_STYLE_TRANS_MAIN = {
},
'split': {
'name': ['color'],
'axisLine': {
'lineStyle': ['color']
},
'axisTick': {
'lineStyle': ['color']
},
@ -247,6 +243,9 @@ export const THEME_STYLE_TRANS_SLAVE1 = {
'split': {
'splitLine': {
'lineStyle': ['color']
},
'axisLine': {
'lineStyle': ['color']
}
}
}

View File

@ -128,6 +128,7 @@ export default {
this.element.options.attrs.fieldId.length > 0 &&
method(param).then(res => {
this.datas = this.optionDatas(res.data)
bus.$emit('valid-values-change', true)
}).catch(e => {
bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '')
@ -169,6 +170,7 @@ export default {
this.show = true
this.handleCoustomStyle()
})
bus.$emit('valid-values-change', true)
}).catch(e => {
bus.$emit('valid-values-change', false)
}) || (this.element.options.value = '')
@ -226,6 +228,7 @@ export default {
}
method({ fieldIds: this.element.options.attrs.fieldId.split(','), sort: this.element.options.attrs.sort }).then(res => {
this.datas = this.optionDatas(res.data)
bus.$emit('valid-values-change', true)
}).catch(e => {
bus.$emit('valid-values-change', false)
})

View File

@ -73,6 +73,12 @@ function textSelectWidget(nodeCache, style) {
}
}
function handlerInputStyle (node, style) {
styleAttrs.forEach(ele => {
node.style[attrsMap[ele]] = style[ele];
})
}
export {
attrsMap,
styleAttrs,
@ -80,5 +86,6 @@ export {
textInputWidget,
textSelectGridWidget,
textSelectTreeWidget,
textSelectWidget
textSelectWidget,
handlerInputStyle,
}

View File

@ -152,7 +152,7 @@ div:focus {
}
.el-tabs__content {
height: calc(100% - 55px) !important;
height: calc(100%) !important;
margin-top: 5px;
.el-tab-pane {

View File

@ -73,6 +73,7 @@ export function baseRadarOptionAntV(plot, container, chart, action) {
if (customAttr.size) {
const s = JSON.parse(JSON.stringify(customAttr.size))
options.radius = parseFloat(parseInt(s.radarSize) / 100)
options.radius = options.radius > 1 ? 1 : options.radius
if (s.radarShape === 'polygon') {
yAxis.grid = {
line: {

View File

@ -1393,6 +1393,7 @@ export const TYPE_CONFIGS = [
'size-selector': [
'lineWidth',
'lineSymbol',
'lineType',
'lineSymbolSize',
'lineSmooth'
],
@ -1472,6 +1473,7 @@ export const TYPE_CONFIGS = [
'size-selector': [
'lineWidth',
'lineSymbol',
'lineType',
'lineSymbolSize',
'lineSmooth'
],

View File

@ -311,6 +311,8 @@ export default {
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'colors'
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'seriesColors'
this.$emit('onColorChange', this.colorForm)
},
resetCustomColor() {
this.changeColorOption()

View File

@ -34,6 +34,9 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('chart.line_symbol_size')" v-show="showProperty('lineSymbolSize')" class="form-item form-item-slider">
<el-slider v-model="sizeForm.lineSymbolSize" show-input :show-input-controls="false" input-size="mini" :min="0" :max="20" @change="changeBarSizeCase" />
</el-form-item>
<el-form-item v-show="showProperty('lineSmooth')" :label="$t('chart.line_smooth')" class="form-item">
<el-checkbox v-model="sizeForm.lineSmooth" @change="changeBarSizeCase('lineSmooth')">{{ $t('chart.line_smooth') }}</el-checkbox>
</el-form-item>
@ -187,7 +190,7 @@
<el-form-item :label="$t('chart.line_width')" class="form-item form-item-slider">
<el-slider v-model="sizeForm.lineWidth" show-input :show-input-controls="false" input-size="mini" :min="0" :max="10" @change="changeBarSizeCase('lineWidth')" />
</el-form-item>
<el-form-item v-show="false" :label="$t('chart.line_type')" class="form-item">
<el-form-item :label="$t('chart.line_type')" class="form-item">
<el-radio-group v-model="sizeForm.lineType" @change="changeBarSizeCase('lineType')">
<el-radio-button label="solid">{{ $t('chart.line_type_solid') }}</el-radio-button>
<el-radio-button label="dashed">{{ $t('chart.line_type_dashed') }}</el-radio-button>
@ -203,6 +206,9 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('chart.line_symbol_size')" class="form-item form-item-slider">
<el-slider v-model="sizeForm.lineSymbolSize" show-input :show-input-controls="false" input-size="mini" :min="0" :max="20" @change="changeBarSizeCase" />
</el-form-item>
<el-form-item :label="$t('chart.line_smooth')" class="form-item">
<el-checkbox v-model="sizeForm.lineSmooth" @change="changeBarSizeCase('lineSmooth')">{{ $t('chart.line_smooth') }}</el-checkbox>
</el-form-item>

View File

@ -1663,47 +1663,6 @@ export default {
delete view.data
return view
},
// calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
// this.hasEdit = true
// const view = this.buildParam(getData, trigger, needRefreshGroup, switchType)
// if (!view) return
// post('/chart/view/calcData/' + this.panelInfo.id, {
// view: view,
// requestList: {
// filter: [],
// drill: this.drillClickDimensionList
// }
// }).then(response => {
// const view = JSON.parse(JSON.stringify(response.data))
// this.view.xaxis = view.xaxis ? JSON.parse(view.xaxis) : []
// this.view.xaxisExt = view.xaxisExt ? JSON.parse(view.xaxisExt) : []
// this.view.yaxis = view.yaxis ? JSON.parse(view.yaxis) : []
// this.view.yaxisExt = view.yaxisExt ? JSON.parse(view.yaxisExt) : []
// this.view.extStack = view.extStack ? JSON.parse(view.extStack) : []
// this.view.drillFields = view.drillFields ? JSON.parse(view.drillFields) : []
// this.view.extBubble = view.extBubble ? JSON.parse(view.extBubble) : []
// this.view.customAttr = view.customAttr ? JSON.parse(view.customAttr) : {}
// this.view.customStyle = view.customStyle ? JSON.parse(view.customStyle) : {}
// this.view.customFilter = view.customFilter ? JSON.parse(view.customFilter) : {}
// this.view.senior = view.senior ? JSON.parse(view.senior) : {}
// echart
// this.chart = response.data
// this.data = response.data.data
// this.httpRequest.status = true
// if (this.chart.privileges) {
// this.param.privileges = this.chart.privileges
// }
// if (!response.data.drill) {
// this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1)
//
// this.resetDrill()
// }
// this.drill = response.data.drill
// this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : []))
//
// this.closeChangeChart()
// })
// },
calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
this.changeEditStatus(true)
const view = this.buildParam(true, 'chart', false, switchType)
@ -1713,7 +1672,7 @@ export default {
bus.$emit('view-in-cache', { type: 'propChange', viewId: this.param.id })
})
},
calcStyle() {
calcStyle(modifyName) {
this.changeEditStatus(true)
// echart...
const view = JSON.parse(JSON.stringify(this.view))
@ -1739,7 +1698,11 @@ export default {
if (!viewSave) return
viewEditSave(this.panelInfo.id, viewSave)
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
if (modifyName === 'color') {
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view, refreshProp: 'customAttr' })
} else {
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
}
},
closeEdit() {
@ -1900,7 +1863,7 @@ export default {
onColorChange(val) {
this.view.customAttr.color = val
this.calcStyle()
this.calcStyle('color')
},
onSizeChange(val) {

View File

@ -42,7 +42,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>

View File

@ -46,7 +46,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>

View File

@ -35,7 +35,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>

View File

@ -298,7 +298,8 @@ export default {
},
currentElement: null,
allFields: [],
tempTreeDatas: null
tempTreeDatas: null,
showTips: false
}
},
computed: {
@ -672,8 +673,14 @@ export default {
this.comLoadField(row.tableId)
},
onMove(e, originalEvent) {
this.showTips = false
this.moveId = e.draggedContext.element.id
return true
const tabelId = e.draggedContext.element.tableId
const prohibit = this.currentElement.options.attrs.dragItems.some(item => item.tableId === tabelId)
if (prohibit) {
this.showTips = true
}
return !prohibit
},
endDs(e) {
@ -717,12 +724,14 @@ export default {
const result = this.currentElement.options.attrs.dragItems.filter(item => !res.has(item.tableId) && res.set(item.tableId), 1)
this.currentElement.options.attrs.dragItems = result
const newLen = result.length
if (sourceLen > newLen) this.$warning(this.$t('panel.prohibit_multiple'))
if (sourceLen > newLen || this.showTips) this.$warning(this.$t('panel.prohibit_multiple'))
},
enableSureButton() {
let valid = true
const enable = this.currentElement.options.attrs.dragItems && this.currentElement.options.attrs.dragItems
const enable =
this.currentElement.options.attrs.dragItems && this.currentElement.options.attrs.dragItems
.length > 0
if (this.widget.validDynamicValue) {
valid = this.widget.validDynamicValue(this.currentElement)