forked from github/dataease
Merge branch 'dev' into pr@dev_st_fix
This commit is contained in:
commit
b9b1e65194
@ -83,6 +83,22 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="userTaskList_COUNT" resultType="LONG">
|
||||||
|
SELECT count(0)
|
||||||
|
FROM dataset_table_task
|
||||||
|
left join dataset_table on dataset_table.id=dataset_table_task.table_id
|
||||||
|
left join qrtz_triggers on dataset_table_task.id=qrtz_triggers.TRIGGER_NAME
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="io.dataease.ext.query.GridSql.taskListGridCondition"/>
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause == null">
|
||||||
|
order by dataset_table_task.create_time desc
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="taskWithTriggers" resultMap="TaskResult" parameterType="io.dataease.ext.query.GridExample">
|
<select id="taskWithTriggers" resultMap="TaskResult" parameterType="io.dataease.ext.query.GridExample">
|
||||||
SELECT dataset_table.name as table_name, get_auths(dataset_table_task.table_id,'dataset', #{extendCondition}) as
|
SELECT dataset_table.name as table_name, get_auths(dataset_table_task.table_id,'dataset', #{extendCondition}) as
|
||||||
`privileges`,dataset_table_task.* , qrtz_triggers.NEXT_FIRE_TIME
|
`privileges`,dataset_table_task.* , qrtz_triggers.NEXT_FIRE_TIME
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
|||||||
package io.dataease.provider.query.sqlserver;
|
package io.dataease.provider.query.sqlserver;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
@ -900,7 +899,9 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
whereValue = "''";
|
whereValue = "''";
|
||||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
|
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
|
||||||
if(field.getType().equalsIgnoreCase("NVARCHAR")){
|
if(field.getType().equalsIgnoreCase("NVARCHAR")){
|
||||||
whereValue = Arrays.asList(value.split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
whereValue ="(" + Arrays.asList(value.split(",")).stream().map(str -> {
|
||||||
|
return "N" + "'" + str + "'";
|
||||||
|
}).collect(Collectors.joining(",")) + ")";
|
||||||
}else {
|
}else {
|
||||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||||
}
|
}
|
||||||
@ -1034,8 +1035,10 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_empty")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_empty")) {
|
||||||
whereValue = "''";
|
whereValue = "''";
|
||||||
} else if (StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "in") || StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "not in")) {
|
} else if (StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "in") || StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "not in")) {
|
||||||
if(field.getType().equalsIgnoreCase("NVARCHAR")){
|
if(field.getType().equalsIgnoreCase("NVARCHAR")) {
|
||||||
whereValue = Arrays.asList(value.split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
whereValue = "(" + Arrays.asList(value.split(",")).stream().map(str -> {
|
||||||
|
return "N" + "'" + str + "'";
|
||||||
|
}).collect(Collectors.joining(",")) + ")";
|
||||||
}else {
|
}else {
|
||||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||||
}
|
}
|
||||||
@ -1146,8 +1149,10 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
String whereValue = "";
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||||
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")){
|
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")) {
|
||||||
whereValue = value.stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
whereValue = "(" + value.stream().map(str -> {
|
||||||
|
return "N" + "'" + str + "'";
|
||||||
|
}).collect(Collectors.joining(",")) + ")";
|
||||||
}else {
|
}else {
|
||||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||||
}
|
}
|
||||||
@ -1329,7 +1334,9 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
whereValue = "''";
|
whereValue = "''";
|
||||||
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
|
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
|
||||||
if(y.getType().equalsIgnoreCase("NVARCHAR")){
|
if(y.getType().equalsIgnoreCase("NVARCHAR")){
|
||||||
whereValue = Arrays.asList(f.getValue().split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
whereValue = "(" +Arrays.asList(f.getValue().split(",")).stream().map(str -> {
|
||||||
|
return "N" + "'" + str + "'";
|
||||||
|
}).collect(Collectors.joining(",")) + ")";
|
||||||
}else {
|
}else {
|
||||||
whereValue = "('" + String.join("','", f.getValue().split(",")) + "')";
|
whereValue = "('" + String.join("','", f.getValue().split(",")) + "')";
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ I18N_LOG_FORMAT_PREFIX=With authority of %s\u3010%s\u3011
|
|||||||
\u6C34\u5370\u7BA1\u7406=Watermark
|
\u6C34\u5370\u7BA1\u7406=Watermark
|
||||||
\u8840\u7F18\u5173\u7CFB=Relationship
|
\u8840\u7F18\u5173\u7CFB=Relationship
|
||||||
I18N_CRON_ERROR=Cron expression error
|
I18N_CRON_ERROR=Cron expression error
|
||||||
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=Default template with params
|
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=Default template with description
|
||||||
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=Default template only screenshot
|
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=Default template only screenshot
|
||||||
\u8FB9\u68461=Border 1
|
\u8FB9\u68461=Border 1
|
||||||
\u8FB9\u68462=Border 2
|
\u8FB9\u68462=Border 2
|
||||||
|
@ -260,7 +260,7 @@ I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6743\u9650
|
|||||||
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
||||||
\u8840\u7F18\u5173\u7CFB=\u8840\u7F18\u5173\u7CFB
|
\u8840\u7F18\u5173\u7CFB=\u8840\u7F18\u5173\u7CFB
|
||||||
I18N_CRON_ERROR=cron\u8868\u8FBE\u5F0F\u9519\u8BEF
|
I18N_CRON_ERROR=cron\u8868\u8FBE\u5F0F\u9519\u8BEF
|
||||||
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=\u9ED8\u8BA4\u6A21\u677F(\u52A0\u53C2\u6570\u6837\u5F0F)
|
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=\u9ED8\u8BA4\u6A21\u677F(\u52A0\u4EEA\u8868\u677F\u63CF\u8FF0)
|
||||||
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8BA4\u6A21\u677F(\u53EA\u622A\u56FE)
|
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8BA4\u6A21\u677F(\u53EA\u622A\u56FE)
|
||||||
I18n_name_cant_empty=名称不能为空!
|
I18n_name_cant_empty=\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6B0A\u9650
|
|||||||
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
||||||
\u8840\u7F18\u5173\u7CFB=\u8840\u7DE3\u95DC\u7CFB
|
\u8840\u7F18\u5173\u7CFB=\u8840\u7DE3\u95DC\u7CFB
|
||||||
I18N_CRON_ERROR=cron\u8868\u9054\u5F0F\u932F\u8AA4
|
I18N_CRON_ERROR=cron\u8868\u9054\u5F0F\u932F\u8AA4
|
||||||
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=\u9ED8\u8A8D\u6A21\u677F(\u52A0\u53C3\u6578\u6A23\u5F0F)
|
I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=\u9ED8\u8A8D\u6A21\u95C6(\u52A0\u5100\u9336\u95C6\u63CF\u8FF0)
|
||||||
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8A8D\u6A21\u677F(\u53EA\u622A\u5716)
|
I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8A8D\u6A21\u677F(\u53EA\u622A\u5716)
|
||||||
\u8FB9\u68461=\u908A\u6846 1
|
\u8FB9\u68461=\u908A\u6846 1
|
||||||
\u8FB9\u68462=\u908A\u6846 2
|
\u8FB9\u68462=\u908A\u6846 2
|
||||||
@ -268,4 +268,4 @@ I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8A8D\u6A21\u677F(\u53EA\u622A\u5716)
|
|||||||
\u8FB9\u68468=\u908A\u6846 8
|
\u8FB9\u68468=\u908A\u6846 8
|
||||||
\u8FB9\u68469=\u908A\u6846 9
|
\u8FB9\u68469=\u908A\u6846 9
|
||||||
\u8FB9\u684610=\u908A\u6846 10
|
\u8FB9\u684610=\u908A\u6846 10
|
||||||
I18n_name_cant_empty=名稱不能為空!
|
I18n_name_cant_empty=\u540D\u7A31\u4E0D\u80FD\u70BA\u7A7A\uFF01
|
Binary file not shown.
@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tox .tox-editor-header {
|
.tox .tox-editor-header {
|
||||||
z-index: 1;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tox .tox-editor-header {
|
.tox .tox-editor-header {
|
||||||
z-index: 1;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -345,6 +345,9 @@ export default {
|
|||||||
.component {
|
.component {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
.component-outer {
|
||||||
|
transform: translate(0);
|
||||||
|
}
|
||||||
.component-outer:hover {
|
.component-outer:hover {
|
||||||
box-shadow: 0px 0px 3px #0a7be0;
|
box-shadow: 0px 0px 3px #0a7be0;
|
||||||
}
|
}
|
||||||
|
@ -423,10 +423,6 @@ export default {
|
|||||||
if (this.canvasId === 'canvas-main' && !this.showPosition.includes('multiplexing')) {
|
if (this.canvasId === 'canvas-main' && !this.showPosition.includes('multiplexing')) {
|
||||||
listenGlobalKeyDownPreview()
|
listenGlobalKeyDownPreview()
|
||||||
}
|
}
|
||||||
// 取消视图请求
|
|
||||||
this.$cancelRequest('/chart/view/getData/**')
|
|
||||||
this.$cancelRequest('/api/link/viewDetail/**')
|
|
||||||
this.$cancelRequest('/static-resource/**')
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initWatermark()
|
this.initWatermark()
|
||||||
|
@ -77,6 +77,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
drawLeft: 'none',
|
||||||
|
drawRight: 'auto',
|
||||||
initReady: false,
|
initReady: false,
|
||||||
editReady: false,
|
editReady: false,
|
||||||
editShow: true,
|
editShow: true,
|
||||||
@ -148,11 +150,21 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.viewInit()
|
this.viewInit()
|
||||||
|
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off('fieldSelect-' + this.element.propValue.viewId)
|
bus.$off('fieldSelect-' + this.element.propValue.viewId)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeRightDrawOpen(param){
|
||||||
|
if(param){
|
||||||
|
this.drawLeft = 'auto!important'
|
||||||
|
this.drawRight = '380px'
|
||||||
|
}else{
|
||||||
|
this.drawLeft = 'none'
|
||||||
|
this.drawRight = 'auto'
|
||||||
|
}
|
||||||
|
},
|
||||||
viewInit() {
|
viewInit() {
|
||||||
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
|
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
|
||||||
tinymce.init({})
|
tinymce.init({})
|
||||||
@ -283,3 +295,11 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.tox-tinymce-inline{
|
||||||
|
left: var(--drawLeft);
|
||||||
|
right: var(--drawRight);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import store from '@/store'
|
|||||||
import { AIDED_DESIGN, MOBILE_SETTING, PAGE_LINE_DESIGN, PANEL_CHART_INFO, TAB_COMMON_STYLE } from '@/views/panel/panel'
|
import { AIDED_DESIGN, MOBILE_SETTING, PAGE_LINE_DESIGN, PANEL_CHART_INFO, TAB_COMMON_STYLE } from '@/views/panel/panel'
|
||||||
import html2canvas from 'html2canvasde'
|
import html2canvas from 'html2canvasde'
|
||||||
import xssCheck from 'xss'
|
import xssCheck from 'xss'
|
||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
export function deepCopy(target) {
|
export function deepCopy(target) {
|
||||||
if (typeof target === 'object' && target !== null) {
|
if (typeof target === 'object' && target !== null) {
|
||||||
@ -70,6 +71,10 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function panelInit(componentData, componentStyle) {
|
export function panelInit(componentData, componentStyle) {
|
||||||
|
// 取消视图请求
|
||||||
|
Vue.prototype.$cancelRequest('/chart/view/getData/**')
|
||||||
|
Vue.prototype.$cancelRequest('/api/link/viewDetail/**')
|
||||||
|
Vue.prototype.$cancelRequest('/static-resource/**')
|
||||||
panelDataPrepare(componentData, componentStyle, function() {
|
panelDataPrepare(componentData, componentStyle, function() {
|
||||||
// 将data 和 style 数据设置到全局store中
|
// 将data 和 style 数据设置到全局store中
|
||||||
store.commit('setComponentData', resetID(componentData))
|
store.commit('setComponentData', resetID(componentData))
|
||||||
|
@ -183,6 +183,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.timer && clearInterval(this.timer)
|
||||||
bus.$off('onScroll', this.onScroll)
|
bus.$off('onScroll', this.onScroll)
|
||||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||||
},
|
},
|
||||||
|
@ -2349,7 +2349,7 @@ export default {
|
|||||||
expand: 'Expand',
|
expand: 'Expand',
|
||||||
pdf_export: 'PDF Export',
|
pdf_export: 'PDF Export',
|
||||||
switch_pdf_template: 'Switch PDF Template',
|
switch_pdf_template: 'Switch PDF Template',
|
||||||
pdf_template_with_params: 'Default template(with params)',
|
pdf_template_with_params: 'Default template(with description)',
|
||||||
pdf_template_only_pic: 'Default template(only screenshot)',
|
pdf_template_only_pic: 'Default template(only screenshot)',
|
||||||
panel_name: 'Panel name',
|
panel_name: 'Panel name',
|
||||||
export_user: 'Export User',
|
export_user: 'Export User',
|
||||||
|
@ -2343,7 +2343,7 @@ export default {
|
|||||||
expand: '展開',
|
expand: '展開',
|
||||||
pdf_export: 'PDF 導出',
|
pdf_export: 'PDF 導出',
|
||||||
switch_pdf_template: '切換 PDF 模板',
|
switch_pdf_template: '切換 PDF 模板',
|
||||||
pdf_template_with_params: '默認模板(加參數樣式)',
|
pdf_template_with_params: '默認模闆(加儀錶闆描述)',
|
||||||
pdf_template_only_pic: '默認模板(只截圖)',
|
pdf_template_only_pic: '默認模板(只截圖)',
|
||||||
panel_name: '儀錶板名稱',
|
panel_name: '儀錶板名稱',
|
||||||
export_user: '導出用戶',
|
export_user: '導出用戶',
|
||||||
|
@ -2358,7 +2358,7 @@ export default {
|
|||||||
expand: '展开',
|
expand: '展开',
|
||||||
pdf_export: 'PDF 导出',
|
pdf_export: 'PDF 导出',
|
||||||
switch_pdf_template: '切换 PDF 模板',
|
switch_pdf_template: '切换 PDF 模板',
|
||||||
pdf_template_with_params: '默认模板(加参数样式)',
|
pdf_template_with_params: '默认模板(加仪表板描述)',
|
||||||
pdf_template_only_pic: '默认模板(只截图)',
|
pdf_template_only_pic: '默认模板(只截图)',
|
||||||
panel_name: '仪表板名称',
|
panel_name: '仪表板名称',
|
||||||
export_user: '导出用户',
|
export_user: '导出用户',
|
||||||
|
@ -17,8 +17,8 @@ export const isChange = (conditions1, conditions2) => {
|
|||||||
let arr1 = JSON.parse(JSON.stringify(conditions1))
|
let arr1 = JSON.parse(JSON.stringify(conditions1))
|
||||||
let arr2 = JSON.parse(JSON.stringify(conditions2))
|
let arr2 = JSON.parse(JSON.stringify(conditions2))
|
||||||
const strCodeAt = (str) => str[0].charCodeAt()
|
const strCodeAt = (str) => str[0].charCodeAt()
|
||||||
arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId))
|
arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId.trim() || s1.fieldId) - strCodeAt(s2.componentId.trim() || s2.fieldId))
|
||||||
arr2 = arr2.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId))
|
arr2 = arr2.sort((s1, s2) => strCodeAt(s1.componentId.trim() || s1.fieldId) - strCodeAt(s2.componentId.trim() || s2.fieldId))
|
||||||
return JSON.stringify(arr1) !== JSON.stringify(arr2)
|
return JSON.stringify(arr1) !== JSON.stringify(arr2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,12 @@ export function baseFlowMapOption(chartDom, chartId, chart, action) {
|
|||||||
const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}`
|
const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}`
|
||||||
const lang = getLanguage().includes('zh') ? 'zh' : 'en'
|
const lang = getLanguage().includes('zh') ? 'zh' : 'en'
|
||||||
let init = false
|
let init = false
|
||||||
if (!chartDom) {
|
if (!chartDom?.map) {
|
||||||
|
try {
|
||||||
|
chartDom.destroy()
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
chartDom = new Scene({
|
chartDom = new Scene({
|
||||||
id: chartId,
|
id: chartId,
|
||||||
map: new GaodeMap({
|
map: new GaodeMap({
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<div
|
<div
|
||||||
:id="chartId"
|
:id="chartId"
|
||||||
style="width: 100%;overflow: hidden;"
|
style="width: 100%;overflow: hidden;"
|
||||||
|
class="g2-container"
|
||||||
:style="{height:chartHeight}"
|
:style="{height:chartHeight}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -437,3 +438,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.g2-container {
|
||||||
|
::v-deep .g2-tooltip {
|
||||||
|
position: fixed !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -146,6 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
showEmptyDataFieldCtrl() {
|
showEmptyDataFieldCtrl() {
|
||||||
return this.showEmptyStrategy &&
|
return this.showEmptyStrategy &&
|
||||||
|
includesAny(this.chart.type, 'table') &&
|
||||||
this.functionForm.emptyDataStrategy !== 'breakLine'
|
this.functionForm.emptyDataStrategy !== 'breakLine'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -463,7 +463,7 @@ export default {
|
|||||||
bus.$off('valid-values-change', this.validateFilterValue)
|
bus.$off('valid-values-change', this.validateFilterValue)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkSuperior(list) {
|
async checkSuperior(list, anotherTableIds) {
|
||||||
let fieldValid = false
|
let fieldValid = false
|
||||||
const fieldId = this.myAttrs?.fieldId
|
const fieldId = this.myAttrs?.fieldId
|
||||||
if (fieldId && list?.length) {
|
if (fieldId && list?.length) {
|
||||||
@ -479,6 +479,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!fieldValid && anotherTableIds?.length) {
|
||||||
|
const ps = await Promise.all(anotherTableIds.map(id => fieldListWithPermission(id)))
|
||||||
|
let anotherList = []
|
||||||
|
ps.forEach(p => {
|
||||||
|
anotherList = [...anotherList, ...p.data]
|
||||||
|
})
|
||||||
|
|
||||||
|
if (anotherList?.length && this.checkSuperior(anotherList, null)) {
|
||||||
|
fieldValid = true
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!fieldValid) {
|
if (!fieldValid) {
|
||||||
this.myAttrs.fieldId = null
|
this.myAttrs.fieldId = null
|
||||||
this.myAttrs.dragItems = []
|
this.myAttrs.dragItems = []
|
||||||
@ -486,6 +497,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return fieldValid
|
return fieldValid
|
||||||
},
|
},
|
||||||
|
|
||||||
treeNode(cache) {
|
treeNode(cache) {
|
||||||
const modelInfo = localStorage.getItem('dataset-tree')
|
const modelInfo = localStorage.getItem('dataset-tree')
|
||||||
const userCache = (modelInfo && cache)
|
const userCache = (modelInfo && cache)
|
||||||
@ -759,11 +771,16 @@ export default {
|
|||||||
this.viewKeyWord = ''
|
this.viewKeyWord = ''
|
||||||
this.comRemoveTail()
|
this.comRemoveTail()
|
||||||
},
|
},
|
||||||
|
anotherTableInfo(tableId) {
|
||||||
|
if (this.myAttrs?.dragItems?.length) {
|
||||||
|
return this.myAttrs.dragItems.filter(item => item.tableId !== tableId).map(item => item.tableId)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
},
|
||||||
async loadField(tableId, init) {
|
async loadField(tableId, init) {
|
||||||
const res = await fieldListWithPermission(tableId)
|
const res = await fieldListWithPermission(tableId)
|
||||||
let data = res.data || []
|
let data = res.data || []
|
||||||
if (init && !this.checkSuperior(data)) {
|
if (init && !this.checkSuperior(data, this.anotherTableInfo(tableId))) {
|
||||||
this.backToLink()
|
this.backToLink()
|
||||||
}
|
}
|
||||||
if (this.widget && this.widget.filterFieldMethod) {
|
if (this.widget && this.widget.filterFieldMethod) {
|
||||||
@ -787,7 +804,7 @@ export default {
|
|||||||
async comLoadField(tableId, init) {
|
async comLoadField(tableId, init) {
|
||||||
const res = await fieldListWithPermission(tableId)
|
const res = await fieldListWithPermission(tableId)
|
||||||
let data = res.data || []
|
let data = res.data || []
|
||||||
if (init && !this.checkSuperior(data)) {
|
if (init && !this.checkSuperior(data, this.anotherTableInfo(tableId))) {
|
||||||
this.comBackLink()
|
this.comBackLink()
|
||||||
}
|
}
|
||||||
if (this.widget && this.widget.filterFieldMethod) {
|
if (this.widget && this.widget.filterFieldMethod) {
|
||||||
|
@ -477,7 +477,7 @@ export default {
|
|||||||
},
|
},
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
return data.name.indexOf(value) !== -1
|
return data?.name?.toLowerCase().includes(value.toLowerCase())
|
||||||
},
|
},
|
||||||
showSearchWidget() {
|
showSearchWidget() {
|
||||||
this.showSearchInput = true
|
this.showSearchInput = true
|
||||||
|
Loading…
Reference in New Issue
Block a user