forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
dc754054b4
@ -185,4 +185,10 @@ public class PanelGroupController {
|
||||
public void viewLog(@RequestBody PanelViewLogRequest request) {
|
||||
panelGroupService.viewLog(request);
|
||||
}
|
||||
@ApiOperation("获取仪表板中视图Element信息")
|
||||
@GetMapping("/findPanelElementInfo/{viewId}")
|
||||
@I18n
|
||||
public Object findPanelElementInfo(@PathVariable String viewId){
|
||||
return panelGroupService.findPanelElementInfo(viewId);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package io.dataease.service.panel;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import io.dataease.auth.annotation.DeCleaner;
|
||||
import io.dataease.commons.constants.*;
|
||||
@ -698,4 +700,21 @@ public class PanelGroupService {
|
||||
}
|
||||
DeLogUtils.save(operateType, sourceType, panelId, panel.getPid(), null, null);
|
||||
}
|
||||
|
||||
public Object findPanelElementInfo(String viewId){
|
||||
PanelView panelView = panelViewService.findByViewId(viewId);
|
||||
if(panelView!=null){
|
||||
PanelGroupWithBLOBs panelGroupWithBLOBs = panelGroupMapper.selectByPrimaryKey(panelView.getPanelId());
|
||||
if(panelGroupWithBLOBs != null){
|
||||
JSONArray panelData = JSONObject.parseArray(panelGroupWithBLOBs.getPanelData());
|
||||
for(int i = 0;i<panelData.size();i++){
|
||||
JSONObject element = panelData.getJSONObject(i);
|
||||
if("user-view".equals(element.getString("component"))){
|
||||
return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -291,3 +291,11 @@ export function removePanelCache(panelId) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function findPanelElementInfo(viewId) {
|
||||
return request({
|
||||
url: 'panel/group/findPanelElementInfo/'+viewId,
|
||||
method: 'get',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
@mousedown="fieldsAreaDown"
|
||||
>
|
||||
<fields-list :fields="curFields" :element="element" />
|
||||
<i slot="reference" :title="$t('panel.select_field')" class="icon iconfont icon-datasource-select" style="margin-left: 4px;cursor: pointer;font-size: 14px;" />
|
||||
<i slot="reference" :disabled="element.editing" :title="$t('panel.select_field')" class="icon iconfont icon-datasource-select" style="margin-left: 4px;cursor: pointer;font-size: 14px;" />
|
||||
</el-popover>
|
||||
<span :title="$t('panel.jump')">
|
||||
<a v-if="showJumpFlag" :title="curComponent.hyperlinks.content " :target="curComponent.hyperlinks.openMode " :href="curComponent.hyperlinks.content ">
|
||||
@ -131,7 +131,7 @@ export default {
|
||||
return this.curComponent.type === 'view' && this.curComponent.propValue.innerType !== 'richTextView'
|
||||
},
|
||||
selectFieldShow() {
|
||||
return this.activeModel === 'edit' && this.curComponent.type === 'view' && this.curComponent.propValue.innerType === 'richTextView'
|
||||
return this.activeModel === 'edit' && this.curComponent.type === 'view' && this.curComponent.propValue.innerType === 'richTextView' && this.curComponent.editing
|
||||
},
|
||||
curComponentTypes() {
|
||||
const types = []
|
||||
@ -225,13 +225,8 @@ export default {
|
||||
if (chartInfo) {
|
||||
this.curFields = []
|
||||
const chartDetails = JSON.parse(chartInfo)
|
||||
if (chartDetails.type === 'richTextView' && chartDetails.data && chartDetails.data.sourceFields) {
|
||||
const checkAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + chartDetails.yaxis + chartDetails.yaxisExt
|
||||
chartDetails.data.sourceFields.forEach(field => {
|
||||
if (checkAllAxisStr.indexOf(field.id) > -1) {
|
||||
this.curFields.push(field)
|
||||
}
|
||||
})
|
||||
if (chartDetails.type === 'richTextView' && chartDetails.data) {
|
||||
this.curFields = chartDetails.data.fields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,9 +131,9 @@ export default {
|
||||
viewInit(){
|
||||
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
|
||||
tinymce.init({})
|
||||
this.myValue = this.assignment(this.element.propValue.textValue)
|
||||
bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange)
|
||||
this.$nextTick(()=>{
|
||||
this.myValue = this.assignment(this.element.propValue.textValue)
|
||||
bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange)
|
||||
this.initReady=true
|
||||
})
|
||||
},
|
||||
|
@ -159,6 +159,7 @@ import { mapState } from 'vuex'
|
||||
import { chartCopy } from '@/api/chart/chart'
|
||||
import { buildFilterMap } from '@/utils/conditionUtil'
|
||||
import TabUseList from '@/views/panel/AssistComponent/tabUseList'
|
||||
import {findPanelElementInfo} from "@/api/panel/panel";
|
||||
|
||||
export default {
|
||||
name: 'DeTabls',
|
||||
@ -366,7 +367,8 @@ export default {
|
||||
component = JSON.parse(JSON.stringify(componentTemp))
|
||||
const propValue = {
|
||||
id: newComponentId,
|
||||
viewId: componentInfo.id
|
||||
viewId: componentInfo.id,
|
||||
textValue: ''
|
||||
}
|
||||
component.propValue = propValue
|
||||
component.filters = []
|
||||
@ -382,9 +384,20 @@ export default {
|
||||
this.curItem.name = newComponentId
|
||||
this.viewDialogVisible = false
|
||||
this.activeTabName = newComponentId
|
||||
this.$store.dispatch('chart/setViewId', component.propValue.viewId)
|
||||
this.styleChange()
|
||||
if(node.modelInnerType==='richTextView'){
|
||||
findPanelElementInfo(node.innerId).then(viewElement =>{
|
||||
if(viewElement.data){
|
||||
this.curItem.content.propValue.textValue = viewElement.data.propValue.textValue
|
||||
}
|
||||
this.$store.dispatch('chart/setViewId', component.propValue.viewId)
|
||||
this.styleChange()
|
||||
})
|
||||
}else{
|
||||
this.$store.dispatch('chart/setViewId', component.propValue.viewId)
|
||||
this.styleChange()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
setComponentInfo() {
|
||||
|
@ -794,6 +794,7 @@ export default {
|
||||
classification_name: 'Classification Name:'
|
||||
},
|
||||
chart: {
|
||||
rich_text_view_result_tips: 'The rich text view selects only the first result',
|
||||
rich_text_view: 'Rich Text View',
|
||||
view_reset: 'View Reset',
|
||||
view_reset_tips: 'Discard Changes To View?',
|
||||
|
@ -795,6 +795,7 @@ export default {
|
||||
classification_name: '分類名稱'
|
||||
},
|
||||
chart: {
|
||||
rich_text_view_result_tips: '富文本只选取第一条结果',
|
||||
rich_text_view: '富文本视图',
|
||||
view_reset: '視圖重置',
|
||||
view_reset_tips: '放棄對視圖的修改?',
|
||||
|
@ -796,6 +796,7 @@ export default {
|
||||
classification_name: '分类名称'
|
||||
},
|
||||
chart: {
|
||||
rich_text_view_result_tips: '富文本只选取第一条结果',
|
||||
rich_text_view: '富文本视图',
|
||||
view_reset: '视图重置',
|
||||
view_reset_tips: '放弃对视图的修改?',
|
||||
|
@ -254,10 +254,13 @@
|
||||
<div style="overflow:auto;border-top: 1px solid #e6e6e6" class="attr-style theme-border-class">
|
||||
<el-row style="height: 100%;">
|
||||
<el-row class="padding-lr">
|
||||
<span style="width: 80px;text-align: right;">
|
||||
<span v-show="view.type==='richTextView'" style="color: #909399; font-size: 8px;width: 80px;text-align: right;">
|
||||
Tips:{{ $t('chart.rich_text_view_result_tips') }}
|
||||
</span>
|
||||
<span v-show="view.type!=='richTextView'" style="width: 80px;text-align: right;">
|
||||
{{ $t('chart.result_count') }}
|
||||
</span>
|
||||
<el-row>
|
||||
<el-row v-show="view.type!=='richTextView'">
|
||||
<el-radio-group
|
||||
v-model="view.resultMode"
|
||||
class="radio-span"
|
||||
@ -683,7 +686,7 @@
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row
|
||||
v-if="view.type && !(view.type.includes('table') && view.render === 'echarts') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid' && view.type !== 'word-cloud' && view.type !== 'table-pivot' && view.type !=='label'"
|
||||
v-if="view.type && !(view.type.includes('table') && view.render === 'echarts') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid' && view.type !== 'word-cloud' && view.type !== 'table-pivot' && view.type !=='label'&&view.type !=='richTextView'"
|
||||
class="padding-lr"
|
||||
style="margin-top: 6px;"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user