diff --git a/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java b/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java index f2f84c1b5b..6a32dff31a 100644 --- a/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java +++ b/backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java @@ -68,7 +68,8 @@ public class ShiroServiceImpl implements ShiroService { filterChainDefinitionMap.put("/**/*.json", ANON); filterChainDefinitionMap.put("/system/ui/**", ANON); - filterChainDefinitionMap.put("/system/file/**", ANON); + filterChainDefinitionMap.put("/system/filedown/**", ANON); + filterChainDefinitionMap.put("/system/showpicture/**", ANON); filterChainDefinitionMap.put("/**/*.js", ANON); filterChainDefinitionMap.put("/**/*.css", ANON); filterChainDefinitionMap.put("/**/*.map", ANON); diff --git a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java index 144f12bdd9..773d5b0853 100644 --- a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java +++ b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java @@ -1,6 +1,6 @@ package io.dataease.controller.sys; -import io.dataease.plugins.common.base.domain.FileMetadata; + import io.dataease.plugins.common.base.domain.SystemParameter; import io.dataease.commons.constants.ParamConstants; import io.dataease.controller.sys.response.BasicInfo; @@ -8,6 +8,7 @@ import io.dataease.controller.sys.response.MailInfo; import io.dataease.dto.SystemParameterDTO; import io.dataease.listener.DatasetCheckListener; import io.dataease.listener.util.CacheUtils; +import io.dataease.plugins.common.util.GlobalFileUtil; import io.dataease.plugins.xpack.cas.dto.CasSaveResult; import io.dataease.service.FileService; import io.dataease.service.system.EmailService; @@ -22,7 +23,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.annotation.Resource; import java.io.IOException; -import java.net.URLEncoder; + import java.util.HashMap; import java.util.List; import java.util.Map; @@ -108,21 +109,16 @@ public class SystemParameterController { return new ResponseEntity<>(bytes, headers, HttpStatus.OK); } - @GetMapping("/file/down/{fileId}/{fileName}") - public ResponseEntity down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName) throws Exception{ + @GetMapping("/filedown/{fileId}/{fileName}") + public ResponseEntity down(@PathVariable("fileId") String fileId, @PathVariable("fileName") String fileName) throws Exception { - FileMetadata fileMetadata = fileService.getFileMetadataById(fileId); - String type = fileMetadata.getType(); - if (!StringUtils.endsWith(fileName.toUpperCase(), type.toUpperCase())) { - fileName += ("." + type); - } - byte[] bytes = fileService.loadFileAsBytes(fileId); - ByteArrayResource bar = new ByteArrayResource(bytes); - final HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); - ContentDisposition contentDisposition = ContentDisposition.parse("attachment; filename=" + URLEncoder.encode(fileName, "UTF-8")); - headers.setContentDisposition(contentDisposition); - return new ResponseEntity<>(bar, headers, HttpStatus.OK); + return GlobalFileUtil.down(fileId, fileName); + } + + @GetMapping("/showpicture/{fileId}") + public ResponseEntity showPicture(@PathVariable("fileId") String fileId) throws Exception { + + return GlobalFileUtil.showPicture(fileId); } @PostMapping(value = "/save/ui", consumes = {"multipart/form-data"}) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 4516b139c0..b0499d4bc2 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -1658,10 +1658,14 @@ public class ChartViewService { String senior = view.getSenior(); JSONObject jsonObject = JSONObject.parseObject(senior); JSONArray assistLine = jsonObject.getJSONArray("assistLine"); + List list = new ArrayList<>(); + if (ObjectUtils.isEmpty(assistLine) || StringUtils.isBlank(assistLine.toJSONString())) { + return list; + } List assistLines = gson.fromJson(assistLine.toJSONString(), new TypeToken>() { }.getType()); - List list = new ArrayList<>(); + for (ChartSeniorAssistDTO dto : assistLines) { if (StringUtils.equalsIgnoreCase(dto.getField(), "0")) { continue; diff --git a/backend/src/main/resources/db/migration/V40__1.15.sql b/backend/src/main/resources/db/migration/V40__1.15.sql index 274a6f726b..0399731308 100644 --- a/backend/src/main/resources/db/migration/V40__1.15.sql +++ b/backend/src/main/resources/db/migration/V40__1.15.sql @@ -58,3 +58,9 @@ INSERT INTO `sys_msg_channel` VALUES (5, 'webmsg.channel_lark_msg', 'sendLark'); UPDATE `dataset_table_function` SET `func` = 'CONCAT(s1,s2,...)' WHERE `id` = 29; UPDATE `dataset_table_function` SET `func` = 'CONCAT(s1,s2,...)' WHERE `id` = 78; + + +ALTER TABLE `sys_task_email` + ADD COLUMN `recisetting` varchar(255) NULL COMMENT '消息渠道' AFTER `view_ids`, + ADD COLUMN `conditions` longtext NULL COMMENT '仪表板条件' AFTER `recisetting`; + diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index ec176fbeb4..87cf5a7bf2 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1016,7 +1016,8 @@ export default { table_item_fontsize: 'Table font size', table_header_bg: 'Header Background', table_item_bg: 'Table Background', - table_item_font_color: 'Font Color', + table_header_font_color: 'Header Font', + table_item_font_color: 'Table Font', stripe: 'Zebra pattern', start_angle: 'Start Angle', end_angle: 'End Angle', @@ -1329,7 +1330,10 @@ export default { chart_group: 'Sub Type', chart_bar_group: 'Bar Group', field_dynamic: 'Dynamic', - aggregation: 'Aggregation' + aggregation: 'Aggregation', + filter_between: 'Between', + field_not_empty: 'Field can not be empty', + summary_not_empty: 'Summary can not be empty' }, dataset: { parse_filed: 'Parse Field', @@ -2338,6 +2342,11 @@ export default { panel: 'Panel', content: 'Content', recipients: 'Recipients', + recisetting: 'channel', + email: 'Email', + wecom: 'Wecom', + dingtalk: 'Dingtalk', + lark: 'Lark', pixel: 'Pixel', default: 'Default', custom: 'Custom', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index f86590356e..4447e957a2 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1016,7 +1016,8 @@ export default { table_item_fontsize: '錶格字體大小', table_header_bg: '錶頭背景', table_item_bg: '錶格背景', - table_item_font_color: '字體顔色', + table_header_font_color: '表頭字體', + table_item_font_color: '表格字體', stripe: '斑馬紋', start_angle: '起始角度', end_angle: '結束角度', @@ -1329,7 +1330,10 @@ export default { chart_group: '子類別', chart_bar_group: '分組柱狀圖', field_dynamic: '動態值', - aggregation: '聚合方式' + aggregation: '聚合方式', + filter_between: '介於', + field_not_empty: '字段不能為空', + summary_not_empty: '聚合方式不能為空' }, dataset: { parse_filed: '解析字段', @@ -2335,10 +2339,15 @@ export default { }, emailtask: { - title: '郵件主題', + title: '報告主題', panel: '儀錶闆', - content: '郵件正文', + content: '報告正文', recipients: '收件人', + recisetting: '接受設置', + email: '郵件', + wecom: '企業微信', + dingtalk: '釘釘', + lark: '飛書', pixel: '分辨率', default: '默認', custom: '自定義', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 9d05b69a85..d43377e106 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1016,7 +1016,8 @@ export default { table_item_fontsize: '表格字体大小', table_header_bg: '表头背景', table_item_bg: '表格背景', - table_item_font_color: '字体颜色', + table_header_font_color: '表头字体', + table_item_font_color: '表格字体', stripe: '斑马纹', start_angle: '起始角度', end_angle: '结束角度', @@ -1329,7 +1330,10 @@ export default { chart_group: '子类别', chart_bar_group: '分组柱状图', field_dynamic: '动态值', - aggregation: '聚合方式' + aggregation: '聚合方式', + filter_between: '介于', + field_not_empty: '字段不能为空', + summary_not_empty: '聚合方式不能为空' }, dataset: { parse_filed: '解析字段', @@ -2335,10 +2339,15 @@ export default { }, emailtask: { - title: '邮件主题', + title: '报告主题', panel: '仪表板', - content: '邮件正文', + content: '报告正文', recipients: '收件人', + recisetting: '接受设置', + email: '邮件', + wecom: '企业微信', + dingtalk: '钉钉', + lark: '飞书', pixel: '分辨率', default: '默认', custom: '自定义', diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index 91de281b9b..65eea85321 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -18,6 +18,7 @@ export const DEFAULT_COLOR_CASE = { alpha: 100, tableHeaderBgColor: '#6D9A49', tableItemBgColor: '#FFFFFF', + tableHeaderFontColor: '#000000', tableFontColor: '#000000', tableStripe: true, dimensionColor: '#000000', diff --git a/frontend/src/views/chart/chart/common/common_table.js b/frontend/src/views/chart/chart/common/common_table.js index 32c26e808a..4a2e5bf44e 100644 --- a/frontend/src/views/chart/chart/common/common_table.js +++ b/frontend/src/views/chart/chart/common/common_table.js @@ -23,17 +23,17 @@ export function getCustomTheme(chart) { verticalBorderColor: borderColor }, text: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, bolderText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, measureText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign } @@ -45,17 +45,17 @@ export function getCustomTheme(chart) { verticalBorderColor: borderColor }, text: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, bolderText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, measureText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign } @@ -67,17 +67,17 @@ export function getCustomTheme(chart) { verticalBorderColor: borderColor }, text: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, bolderText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign }, measureText: { - fill: DEFAULT_COLOR_CASE.tableFontColor, + fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fontSize: DEFAULT_SIZE.tableTitleFontSize, textAlign: headerAlign } @@ -121,23 +121,23 @@ export function getCustomTheme(chart) { theme.cornerCell.cell.backgroundColor = h_c theme.cornerCell.cell.horizontalBorderColor = b_c theme.cornerCell.cell.verticalBorderColor = b_c - theme.cornerCell.bolderText.fill = c.tableFontColor - theme.cornerCell.text.fill = c.tableFontColor - theme.cornerCell.measureText.fill = c.tableFontColor + theme.cornerCell.bolderText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.cornerCell.text.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.cornerCell.measureText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor theme.rowCell.cell.backgroundColor = h_c theme.rowCell.cell.horizontalBorderColor = b_c theme.rowCell.cell.verticalBorderColor = b_c - theme.rowCell.bolderText.fill = c.tableFontColor - theme.rowCell.text.fill = c.tableFontColor - theme.rowCell.measureText.fill = c.tableFontColor + theme.rowCell.bolderText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.rowCell.text.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.rowCell.measureText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor theme.colCell.cell.backgroundColor = h_c theme.colCell.cell.horizontalBorderColor = b_c theme.colCell.cell.verticalBorderColor = b_c - theme.colCell.bolderText.fill = c.tableFontColor - theme.colCell.text.fill = c.tableFontColor - theme.colCell.measureText.fill = c.tableFontColor + theme.colCell.bolderText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.colCell.text.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor + theme.colCell.measureText.fill = c.tableHeaderFontColor ? c.tableHeaderFontColor : c.tableFontColor theme.dataCell.cell.backgroundColor = i_c theme.dataCell.cell.horizontalBorderColor = b_c diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index b44f3fa95a..e595f0e5a9 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -45,6 +45,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'tableHeaderBgColor', 'tableItemBgColor', + 'tableHeaderFontColor', 'tableFontColor', 'tableBorderColor', 'alpha' @@ -88,6 +89,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'tableHeaderBgColor', 'tableItemBgColor', + 'tableHeaderFontColor', 'tableFontColor', 'tableBorderColor', 'alpha' @@ -134,6 +136,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'tableHeaderBgColor', 'tableItemBgColor', + 'tableHeaderFontColor', 'tableFontColor', 'tableBorderColor', 'alpha' @@ -1463,6 +1466,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'tableHeaderBgColor', 'tableItemBgColor', + 'tableHeaderFontColor', 'tableFontColor', 'alpha' ], @@ -1499,6 +1503,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'tableHeaderBgColor', 'tableItemBgColor', + 'tableHeaderFontColor', 'tableFontColor', 'alpha' ], diff --git a/frontend/src/views/chart/components/senior/dialog/AssistLineEdit.vue b/frontend/src/views/chart/components/senior/dialog/AssistLineEdit.vue index 1fec0fc210..4275be9218 100644 --- a/frontend/src/views/chart/components/senior/dialog/AssistLineEdit.vue +++ b/frontend/src/views/chart/components/senior/dialog/AssistLineEdit.vue @@ -36,7 +36,7 @@ {{ quota.name }} - + diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index 493bf0d848..884ace0398 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -94,6 +94,9 @@ + + + @@ -300,6 +303,7 @@ export default { } this.colorForm.tableBorderColor = this.colorForm.tableBorderColor ? this.colorForm.tableBorderColor : DEFAULT_COLOR_CASE.tableBorderColor + this.colorForm.tableHeaderFontColor = this.colorForm.tableHeaderFontColor ? this.colorForm.tableHeaderFontColor : this.colorForm.tableFontColor this.initCustomColor() } diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index 973b17a973..696918d516 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -200,12 +200,12 @@ export default { datas = [] this.resetPage() } - datas.forEach(item =>{ - Object.keys(item).forEach(key=> { - if(typeof item[key] === 'object'){ - item[key] = "" - } - }) + datas.forEach(item => { + Object.keys(item).forEach(key => { + if (typeof item[key] === 'object') { + item[key] = '' + } + }) }) this.$refs.plxTable.reloadData(datas) this.$nextTick(() => { @@ -257,7 +257,7 @@ export default { if (this.chart.customAttr) { const customAttr = JSON.parse(this.chart.customAttr) if (customAttr.color) { - this.table_header_class.color = customAttr.color.tableFontColor + this.table_header_class.color = customAttr.color.tableHeaderFontColor ? customAttr.color.tableHeaderFontColor : customAttr.color.tableFontColor this.table_header_class.background = hexColorToRGBA(customAttr.color.tableHeaderBgColor, customAttr.color.alpha) this.table_item_class.color = customAttr.color.tableFontColor this.table_item_class.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha) diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue index b0c1b8756c..17cbe24635 100644 --- a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue @@ -67,6 +67,9 @@ + + + @@ -82,7 +85,7 @@