Merge branch 'dev' into pr@dev_st_fix

This commit is contained in:
dataeaseShu 2023-06-06 16:00:52 +08:00
commit b9b1e65194
25 changed files with 1497 additions and 1417 deletions

View File

@ -83,6 +83,22 @@
</if>
</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 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

View File

@ -1,7 +1,6 @@
package io.dataease.provider.query.sqlserver;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
import io.dataease.plugins.common.base.domain.DatasetTableField;
@ -900,7 +899,9 @@ public class SqlserverQueryProvider extends QueryProvider {
whereValue = "''";
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
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 {
whereValue = "('" + String.join("','", value.split(",")) + "')";
}
@ -1034,8 +1035,10 @@ public class SqlserverQueryProvider extends QueryProvider {
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_empty")) {
whereValue = "''";
} else if (StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "in") || StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "not in")) {
if(field.getType().equalsIgnoreCase("NVARCHAR")){
whereValue = Arrays.asList(value.split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
if(field.getType().equalsIgnoreCase("NVARCHAR")) {
whereValue = "(" + Arrays.asList(value.split(",")).stream().map(str -> {
return "N" + "'" + str + "'";
}).collect(Collectors.joining(",")) + ")";
}else {
whereValue = "('" + String.join("','", value.split(",")) + "')";
}
@ -1146,8 +1149,10 @@ public class SqlserverQueryProvider extends QueryProvider {
String whereValue = "";
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")){
whereValue = value.stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")) {
whereValue = "(" + value.stream().map(str -> {
return "N" + "'" + str + "'";
}).collect(Collectors.joining(",")) + ")";
}else {
whereValue = "('" + StringUtils.join(value, "','") + "')";
}
@ -1329,7 +1334,9 @@ public class SqlserverQueryProvider extends QueryProvider {
whereValue = "''";
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
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 {
whereValue = "('" + String.join("','", f.getValue().split(",")) + "')";
}

View File

@ -260,7 +260,7 @@ I18N_LOG_FORMAT_PREFIX=With authority of %s\u3010%s\u3011
\u6C34\u5370\u7BA1\u7406=Watermark
\u8840\u7F18\u5173\u7CFB=Relationship
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
\u8FB9\u68461=Border 1
\u8FB9\u68462=Border 2

View File

@ -260,7 +260,7 @@ I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6743\u9650
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
\u8840\u7F18\u5173\u7CFB=\u8840\u7F18\u5173\u7CFB
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_name_cant_empty=名称不能为空!
I18n_name_cant_empty=\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01

View File

@ -256,7 +256,7 @@ I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6B0A\u9650
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
\u8840\u7F18\u5173\u7CFB=\u8840\u7DE3\u95DC\u7CFB
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)
\u8FB9\u68461=\u908A\u6846 1
\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\u68469=\u908A\u6846 9
\u8FB9\u684610=\u908A\u6846 10
I18n_name_cant_empty=名稱不能為空!
I18n_name_cant_empty=\u540D\u7A31\u4E0D\u80FD\u70BA\u7A7A\uFF01

View File

@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
}
.tox .tox-editor-header {
z-index: 1;
z-index: 1000;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {

File diff suppressed because one or more lines are too long

View File

@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
}
.tox .tox-editor-header {
z-index: 1;
z-index: 1000;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {

File diff suppressed because one or more lines are too long

View File

@ -345,6 +345,9 @@ export default {
.component {
position: absolute;
}
.component-outer {
transform: translate(0);
}
.component-outer:hover {
box-shadow: 0px 0px 3px #0a7be0;
}

View File

@ -423,10 +423,6 @@ export default {
if (this.canvasId === 'canvas-main' && !this.showPosition.includes('multiplexing')) {
listenGlobalKeyDownPreview()
}
//
this.$cancelRequest('/chart/view/getData/**')
this.$cancelRequest('/api/link/viewDetail/**')
this.$cancelRequest('/static-resource/**')
},
mounted() {
this.initWatermark()

View File

@ -77,6 +77,8 @@ export default {
},
data() {
return {
drawLeft: 'none',
drawRight: 'auto',
initReady: false,
editReady: false,
editShow: true,
@ -148,11 +150,21 @@ export default {
},
mounted() {
this.viewInit()
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
},
beforeDestroy() {
bus.$off('fieldSelect-' + this.element.propValue.viewId)
},
methods: {
changeRightDrawOpen(param){
if(param){
this.drawLeft = 'auto!important'
this.drawRight = '380px'
}else{
this.drawLeft = 'none'
this.drawRight = 'auto'
}
},
viewInit() {
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
tinymce.init({})
@ -283,3 +295,11 @@ export default {
}
</style>
<style lang="scss">
.tox-tinymce-inline{
left: var(--drawLeft);
right: var(--drawRight);
}
</style>

View File

@ -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 html2canvas from 'html2canvasde'
import xssCheck from 'xss'
import Vue from 'vue'
export function deepCopy(target) {
if (typeof target === 'object' && target !== null) {
@ -70,6 +71,10 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
}
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() {
// 将data 和 style 数据设置到全局store中
store.commit('setComponentData', resetID(componentData))

View File

@ -183,6 +183,7 @@ export default {
}
},
beforeDestroy() {
this.timer && clearInterval(this.timer)
bus.$off('onScroll', this.onScroll)
bus.$off('reset-default-value', this.resetDefaultValue)
},

View File

@ -2349,7 +2349,7 @@ export default {
expand: 'Expand',
pdf_export: 'PDF Export',
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)',
panel_name: 'Panel name',
export_user: 'Export User',

View File

@ -2343,7 +2343,7 @@ export default {
expand: '展開',
pdf_export: 'PDF 導出',
switch_pdf_template: '切換 PDF 模板',
pdf_template_with_params: '默認模板(加參數樣式)',
pdf_template_with_params: '默認模闆(加儀錶闆描述)',
pdf_template_only_pic: '默認模板(只截圖)',
panel_name: '儀錶板名稱',
export_user: '導出用戶',

View File

@ -2358,7 +2358,7 @@ export default {
expand: '展开',
pdf_export: 'PDF 导出',
switch_pdf_template: '切换 PDF 模板',
pdf_template_with_params: '默认模板(加参数样式)',
pdf_template_with_params: '默认模板(加仪表板描述)',
pdf_template_only_pic: '默认模板(只截图)',
panel_name: '仪表板名称',
export_user: '导出用户',

View File

@ -17,8 +17,8 @@ export const isChange = (conditions1, conditions2) => {
let arr1 = JSON.parse(JSON.stringify(conditions1))
let arr2 = JSON.parse(JSON.stringify(conditions2))
const strCodeAt = (str) => str[0].charCodeAt()
arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId))
arr2 = arr2.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.trim() || s1.fieldId) - strCodeAt(s2.componentId.trim() || s2.fieldId))
return JSON.stringify(arr1) !== JSON.stringify(arr2)
}

View File

@ -14,7 +14,12 @@ export function baseFlowMapOption(chartDom, chartId, chart, action) {
const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}`
const lang = getLanguage().includes('zh') ? 'zh' : 'en'
let init = false
if (!chartDom) {
if (!chartDom?.map) {
try {
chartDom.destroy()
} catch (e) {
// ignore
}
chartDom = new Scene({
id: chartId,
map: new GaodeMap({

View File

@ -33,6 +33,7 @@
<div
:id="chartId"
style="width: 100%;overflow: hidden;"
class="g2-container"
:style="{height:chartHeight}"
/>
</div>
@ -437,3 +438,10 @@ export default {
}
}
</script>
<style lang="less" scoped>
.g2-container {
::v-deep .g2-tooltip {
position: fixed !important;
}
}
</style>

View File

@ -146,6 +146,7 @@ export default {
},
showEmptyDataFieldCtrl() {
return this.showEmptyStrategy &&
includesAny(this.chart.type, 'table') &&
this.functionForm.emptyDataStrategy !== 'breakLine'
}
},

View File

@ -463,7 +463,7 @@ export default {
bus.$off('valid-values-change', this.validateFilterValue)
},
methods: {
checkSuperior(list) {
async checkSuperior(list, anotherTableIds) {
let fieldValid = false
const fieldId = this.myAttrs?.fieldId
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) {
this.myAttrs.fieldId = null
this.myAttrs.dragItems = []
@ -486,6 +497,7 @@ export default {
}
return fieldValid
},
treeNode(cache) {
const modelInfo = localStorage.getItem('dataset-tree')
const userCache = (modelInfo && cache)
@ -759,11 +771,16 @@ export default {
this.viewKeyWord = ''
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) {
const res = await fieldListWithPermission(tableId)
let data = res.data || []
if (init && !this.checkSuperior(data)) {
if (init && !this.checkSuperior(data, this.anotherTableInfo(tableId))) {
this.backToLink()
}
if (this.widget && this.widget.filterFieldMethod) {
@ -787,7 +804,7 @@ export default {
async comLoadField(tableId, init) {
const res = await fieldListWithPermission(tableId)
let data = res.data || []
if (init && !this.checkSuperior(data)) {
if (init && !this.checkSuperior(data, this.anotherTableInfo(tableId))) {
this.comBackLink()
}
if (this.widget && this.widget.filterFieldMethod) {

View File

@ -477,7 +477,7 @@ export default {
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
return data?.name?.toLowerCase().includes(value.toLowerCase())
},
showSearchWidget() {
this.showSearchInput = true