diff --git a/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterManage.java b/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterManage.java index 3a9aa8ebff..daa2fa27af 100644 --- a/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterManage.java +++ b/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterManage.java @@ -12,10 +12,12 @@ import io.dataease.engine.constant.DeTypeConstants; import io.dataease.exception.DEException; import io.dataease.exportCenter.dao.auto.entity.CoreExportTask; import io.dataease.exportCenter.dao.auto.mapper.CoreExportTaskMapper; +import io.dataease.system.manage.SysParameterManage; import io.dataease.utils.*; import io.dataease.visualization.server.DataVisualizationServer; import io.dataease.websocket.WsMessage; import io.dataease.websocket.WsService; +import io.dataease.xpack.base.log.dao.auto.entity.XpackLog; import jakarta.annotation.PostConstruct; import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletResponse; @@ -50,6 +52,8 @@ public class ExportCenterManage { private CoreChartViewMapper coreChartViewMapper; @Autowired private WsService wsService; + @Resource + private SysParameterManage sysParameterManage; @Value("${export.dataset.limit:100000}") private int limit; @@ -417,6 +421,21 @@ public class ExportCenterManage { private static final String LOG_RETENTION = "30"; + public void cleanLog() { + String key = "basic.exportFileLiveTime"; + String val = sysParameterManage.singleVal(key); + if (StringUtils.isBlank(val)) { + DEException.throwException("未获取到文件保留时间"); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + long expTime = Long.parseLong(val) * 24L * 3600L * 1000L; + long threshold = System.currentTimeMillis() - expTime; + queryWrapper.lt("export_time", threshold); + exportTaskMapper.selectList(queryWrapper).forEach(coreExportTask -> { + delete(coreExportTask.getId()); + }); + + } } diff --git a/core/core-frontend/src/components/data-visualization/RealTimeComponentList.vue b/core/core-frontend/src/components/data-visualization/RealTimeComponentList.vue deleted file mode 100644 index 54b85c0df7..0000000000 --- a/core/core-frontend/src/components/data-visualization/RealTimeComponentList.vue +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index 82c6a6f0ce..bb2a635898 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -423,8 +423,8 @@ const autoStyle = computed(() => { {{ ele.name }} - * + *
{ font-style: normal; font-weight: 400; line-height: 22px; + } - .required { - font-size: 14px; - color: #f54a45; - margin-left: 3px; - line-height: 22px; - } + .required { + font-size: 14px; + color: #f54a45; + margin-left: 3px; + line-height: 22px; } .label-wrapper-tooltip { align-items: center; diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index bc0bcaf73f..7c7d0630ba 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2222,6 +2222,7 @@ export default { dsExecuteTime: '数据源检测频率', frontTimeOut: '请求超时时间(秒)', logLiveTime: '操作日志保留时间(天)', + exportFileLiveTime: '后台导出文件保留时间(天)', platformOid: '第三方平台用户组织', platformRid: '第三方平台用户角色', pwdStrategy: '开启密码策略', diff --git a/core/core-frontend/src/utils/DeShortcutKey.ts b/core/core-frontend/src/utils/DeShortcutKey.ts index fae894ba77..f48c7c2746 100644 --- a/core/core-frontend/src/utils/DeShortcutKey.ts +++ b/core/core-frontend/src/utils/DeShortcutKey.ts @@ -101,7 +101,7 @@ let isShiftDown = false // 全局监听按键操作并执行相应命令 export function listenGlobalKeyDown() { window.onkeydown = e => { - if (!isInEditor.value || editMode.value === 'preview' || checkDialog()) return + if (editMode.value === 'preview' || checkDialog()) return const { keyCode } = e if (positionMoveKey[keyCode] && curComponent.value) { positionMoveKey[keyCode](keyCode) diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index 5562947855..704b27c0b1 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -106,6 +106,7 @@ const dvSvgType = computed(() => ) const isDataEaseBi = computed(() => appStore.getIsDataEaseBi) +const isIframe = computed(() => appStore.getIsIframe) const resourceTypeList = computed(() => { const list = [ @@ -368,6 +369,14 @@ const resourceEdit = resourceId => { ) return } + + if (isIframe.value) { + router.push({ + path: curCanvasType.value === 'dataV' ? 'dvCanvas' : 'dashboard', + query: curCanvasType.value === 'dataV' ? { dvId: resourceId } : { resourceId } + }) + return + } const newWindow = window.open(baseUrl + resourceId, '_blank') initOpenHandler(newWindow) } diff --git a/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue b/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue index 84685254d4..d41d46e646 100644 --- a/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue +++ b/core/core-frontend/src/views/system/parameter/basic/BasicEdit.vue @@ -125,6 +125,15 @@ const edit = (list, orgOptions, roleOptions) => { } ] } + if (pkey === 'basic.exportFileLiveTime') { + rule[pkey.split('.')[1]] = [ + { + required: true, + message: t('common.require'), + trigger: ['blur', 'change'] + } + ] + } item['label'] = `setting_${pkey}` item['pkey'] = pkey.split('.')[1] let pval = item.pval @@ -301,6 +310,19 @@ defineExpose({ />
+
+ +
diff --git a/core/core-frontend/src/views/template-market/component/TemplateMarketV2Item.vue b/core/core-frontend/src/views/template-market/component/TemplateMarketV2Item.vue index c5b560ab10..1cebaee031 100644 --- a/core/core-frontend/src/views/template-market/component/TemplateMarketV2Item.vue +++ b/core/core-frontend/src/views/template-market/component/TemplateMarketV2Item.vue @@ -23,7 +23,7 @@