forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
2f638dfd40
@ -176,6 +176,23 @@ public class XEmailTaskServer {
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresPermissions("task-email:del")
|
||||
@PostMapping("/batchDel")
|
||||
public void delete(@RequestBody List<Long> taskIds) {
|
||||
EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class);
|
||||
try {
|
||||
taskIds.forEach(taskId -> {
|
||||
XpackEmailTaskRequest request = emailXpackService.taskForm(taskId);
|
||||
GlobalTaskEntity globalTaskEntity = BeanUtils.copyBean(new GlobalTaskEntity(), request);
|
||||
scheduleService.deleteSchedule(globalTaskEntity);
|
||||
});
|
||||
emailXpackService.batchDel(taskIds);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
DEException.throwException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/stop/{taskId}")
|
||||
public void stop(@PathVariable Long taskId) throws Exception {
|
||||
EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class);
|
||||
|
@ -8,14 +8,17 @@ import io.dataease.controller.sys.response.BasicInfo;
|
||||
import io.dataease.dto.SystemParameterDTO;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.plugins.common.base.domain.FileMetadata;
|
||||
import io.dataease.plugins.common.base.domain.SysParamAssist;
|
||||
import io.dataease.plugins.common.base.domain.SystemParameter;
|
||||
import io.dataease.plugins.common.base.domain.SystemParameterExample;
|
||||
import io.dataease.plugins.common.base.mapper.SystemParameterMapper;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.xpack.cas.dto.CasSaveResult;
|
||||
import io.dataease.plugins.xpack.cas.service.CasXpackService;
|
||||
import io.dataease.plugins.xpack.display.service.DisplayXpackService;
|
||||
import io.dataease.service.FileService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -26,6 +29,7 @@ import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@ -231,6 +235,20 @@ public class SystemParameterService {
|
||||
systemParameterDTO.setFileName(fileMetadata.getName());
|
||||
}
|
||||
}
|
||||
if (systemParameter.getType().equalsIgnoreCase("blob")) {
|
||||
Map<String, DisplayXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((DisplayXpackService.class));
|
||||
DisplayXpackService displayXpackService = null;
|
||||
if (beansOfType.keySet().size() > 0 && (displayXpackService = SpringContextUtil.getBean(DisplayXpackService.class)) != null) {
|
||||
String paramValue = systemParameter.getParamValue();
|
||||
if (StringUtils.isNotBlank(paramValue)) {
|
||||
long blobId = Long.parseLong(paramValue);
|
||||
String content = displayXpackService.readBlob(blobId);
|
||||
systemParameterDTO.setParamValue(content);
|
||||
}
|
||||
} else {
|
||||
systemParameterDTO.setParamValue(null);
|
||||
}
|
||||
}
|
||||
dtoList.add(systemParameterDTO);
|
||||
}
|
||||
dtoList.sort(Comparator.comparingInt(SystemParameter::getSort));
|
||||
|
@ -22,3 +22,16 @@ INSERT INTO `sys_menu` VALUES (750, 2, 0, 2, '导入用户', NULL, NULL, 999, NU
|
||||
update system_parameter set sort = (sort + 1) where sort > 3;
|
||||
|
||||
update system_parameter set sort = 4 where param_key = 'ui.favicon'
|
||||
|
||||
INSERT INTO `system_parameter`(`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.showFoot', NULL, 'text', 18);
|
||||
INSERT INTO `system_parameter`(`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.footContent', NULL, 'blob', 19);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sys_param_assist` (
|
||||
`id` BIGINT(21) NOT NULL AUTO_INCREMENT,
|
||||
`content` MEDIUMBLOB COMMENT '内容',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
ALTER TABLE `sys_task_email`
|
||||
MODIFY COLUMN `view_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '关联视图' AFTER `task_id`;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
@ -1987,7 +1987,9 @@ export default {
|
||||
mobileBG: 'Mobile Login page BG',
|
||||
helpLink: 'Help Document Link',
|
||||
homeLink: 'Home Link',
|
||||
defaultHomeLink: 'Default is the system built-in home page'
|
||||
defaultHomeLink: 'Default is the system built-in home page',
|
||||
showFoot: 'Show login page footer',
|
||||
footContent: 'Foot content'
|
||||
|
||||
},
|
||||
auth: {
|
||||
|
@ -1995,7 +1995,9 @@ export default {
|
||||
mobileBG: '移動端登錄頁背景',
|
||||
helpLink: '幫助文檔鏈接',
|
||||
homeLink: '首頁鏈接',
|
||||
defaultHomeLink: '默認為系統內置首頁'
|
||||
defaultHomeLink: '默認為系統內置首頁',
|
||||
showFoot: '顯示登錄頁腳',
|
||||
footContent: '頁腳內容'
|
||||
|
||||
},
|
||||
auth: {
|
||||
|
@ -2005,8 +2005,9 @@ export default {
|
||||
mobileBG: '移动端登录页背景',
|
||||
helpLink: '帮助文档链接',
|
||||
homeLink: '首页链接',
|
||||
defaultHomeLink: '默认为系统内置首页'
|
||||
|
||||
defaultHomeLink: '默认为系统内置首页',
|
||||
showFoot: '显示登录页脚',
|
||||
footContent: '页脚内容'
|
||||
},
|
||||
auth: {
|
||||
no_item_selected: '请在左侧选择组织、角色或用户',
|
||||
|
@ -14,10 +14,11 @@ import {
|
||||
filterAsyncRouter
|
||||
} from '@/store/modules/permission'
|
||||
import {
|
||||
isMobile
|
||||
isMobile,
|
||||
changeFavicon
|
||||
} from '@/utils/index'
|
||||
import Layout from '@/layout/index'
|
||||
// import bus from './utils/bus'
|
||||
import { getSysUI } from '@/utils/auth'
|
||||
|
||||
import { getSocket } from '@/websocket'
|
||||
|
||||
@ -27,7 +28,32 @@ NProgress.configure({
|
||||
|
||||
const whiteList = ['/login', '/401', '/404', '/delink', '/nolic'] // no redirect whitelist
|
||||
|
||||
router.beforeEach(async(to, from, next) => {
|
||||
const routeBefore = (callBack) => {
|
||||
let uiInfo = getSysUI()
|
||||
if (!uiInfo || Object.keys(uiInfo).length === 0) {
|
||||
store.dispatch('user/getUI').then(() => {
|
||||
document.title = getPageTitle()
|
||||
uiInfo = getSysUI()
|
||||
if (uiInfo['ui.favicon'] && uiInfo['ui.favicon'].paramValue) {
|
||||
const faviconUrl = '/system/ui/image/' + this.uiInfo['ui.favicon'].paramValue
|
||||
changeFavicon(faviconUrl)
|
||||
}
|
||||
callBack()
|
||||
}).catch(err => {
|
||||
document.title = getPageTitle()
|
||||
console.error(err)
|
||||
callBack()
|
||||
})
|
||||
} else {
|
||||
document.title = getPageTitle()
|
||||
if (uiInfo['ui.favicon'] && uiInfo['ui.favicon'].paramValue) {
|
||||
const faviconUrl = '/system/ui/image/' + this.uiInfo['ui.favicon'].paramValue
|
||||
changeFavicon(faviconUrl)
|
||||
}
|
||||
callBack()
|
||||
}
|
||||
}
|
||||
router.beforeEach(async(to, from, next) => routeBefore(() => {
|
||||
// start progress bar
|
||||
NProgress.start()
|
||||
const mobileIgnores = ['/delink']
|
||||
@ -97,7 +123,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
})
|
||||
}))
|
||||
export const loadMenus = (next, to) => {
|
||||
buildMenus().then(res => {
|
||||
const datas = res.data
|
||||
|
@ -106,7 +106,11 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
|
||||
}
|
||||
|
||||
function getMeta(chart) {
|
||||
const meta = {}
|
||||
const meta = {
|
||||
field: {
|
||||
type: 'cat'
|
||||
}
|
||||
}
|
||||
const yaxis = JSON.parse(chart.yaxis)
|
||||
if (yaxis && yaxis.length > 0) {
|
||||
const f = yaxis[0]
|
||||
|
@ -1,64 +1,68 @@
|
||||
<template>
|
||||
<div v-show="contentShow" class="login-background">
|
||||
<div class="login-container">
|
||||
<el-row v-loading="loading" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" size="default">
|
||||
<div class="login-logo">
|
||||
<svg-icon v-if="!loginLogoUrl && axiosFinished" icon-class="DataEase" custom-class="login-logo-icon" />
|
||||
<img v-if="loginLogoUrl && axiosFinished" :src="loginLogoUrl" alt="">
|
||||
</div>
|
||||
<div v-if="uiInfo && uiInfo['ui.loginTitle'] && uiInfo['ui.loginTitle'].paramValue" class="login-welcome">
|
||||
{{ uiInfo['ui.loginTitle'].paramValue }}
|
||||
</div>
|
||||
<div v-else class="login-welcome">
|
||||
{{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || ' DataEase') }}
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<el-form-item v-if="loginTypes.length > 1">
|
||||
<el-radio-group v-if="loginTypes.length > 1" v-model="loginForm.loginType" @change="changeLoginType">
|
||||
<el-radio :label="0" size="mini">{{ $t('login.default_login') }}</el-radio>
|
||||
<el-radio v-if="loginTypes.includes(1)" :label="1" size="mini">LDAP</el-radio>
|
||||
<el-radio v-if="loginTypes.includes(2)" :label="2" size="mini">OIDC</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" placeholder="ID" autofocus :disabled="loginTypes.includes(2) && loginForm.loginType === 2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
:placeholder="$t('login.password')"
|
||||
show-password
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
autocomplete="new-password"
|
||||
:disabled="loginTypes.includes(2) && loginForm.loginType === 2"
|
||||
@keypress.enter.native="handleLogin"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="login-btn">
|
||||
<el-button type="primary" class="submit" size="default" :disabled="loginTypes.includes(2) && loginForm.loginType === 2" @click.native.prevent="handleLogin">
|
||||
{{ $t('commons.login') }}
|
||||
</el-button>
|
||||
<div v-if="uiInfo && uiInfo['ui.demo.tips'] && uiInfo['ui.demo.tips'].paramValue" class="demo-tips">
|
||||
{{ uiInfo['ui.demo.tips'].paramValue }}
|
||||
<div>
|
||||
<div v-show="contentShow" class="login-background">
|
||||
<div class="login-container">
|
||||
<el-row v-loading="loading" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" size="default">
|
||||
<div class="login-logo">
|
||||
<svg-icon v-if="!loginLogoUrl && axiosFinished" icon-class="DataEase" custom-class="login-logo-icon" />
|
||||
<img v-if="loginLogoUrl && axiosFinished" :src="loginLogoUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-msg">
|
||||
{{ msg }}
|
||||
</div>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col v-loading="!axiosFinished" :span="12">
|
||||
<div v-if="!loginImageUrl && axiosFinished" class="login-image" />
|
||||
<div v-if="loginImageUrl && axiosFinished" class="login-image-de" :style="{background:'url(' + loginImageUrl + ') no-repeat', 'backgroundSize':'contain'}" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<plugin-com v-if="loginTypes.includes(2) && loginForm.loginType === 2" ref="SSOComponent" component-name="SSOComponent" />
|
||||
<div v-if="uiInfo && uiInfo['ui.loginTitle'] && uiInfo['ui.loginTitle'].paramValue" class="login-welcome">
|
||||
{{ uiInfo['ui.loginTitle'].paramValue }}
|
||||
</div>
|
||||
<div v-else class="login-welcome">
|
||||
{{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || ' DataEase') }}
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<el-form-item v-if="loginTypes.length > 1">
|
||||
<el-radio-group v-if="loginTypes.length > 1" v-model="loginForm.loginType" @change="changeLoginType">
|
||||
<el-radio :label="0" size="mini">{{ $t('login.default_login') }}</el-radio>
|
||||
<el-radio v-if="loginTypes.includes(1)" :label="1" size="mini">LDAP</el-radio>
|
||||
<el-radio v-if="loginTypes.includes(2)" :label="2" size="mini">OIDC</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" placeholder="ID" autofocus :disabled="loginTypes.includes(2) && loginForm.loginType === 2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
:placeholder="$t('login.password')"
|
||||
show-password
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
autocomplete="new-password"
|
||||
:disabled="loginTypes.includes(2) && loginForm.loginType === 2"
|
||||
@keypress.enter.native="handleLogin"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="login-btn">
|
||||
<el-button type="primary" class="submit" size="default" :disabled="loginTypes.includes(2) && loginForm.loginType === 2" @click.native.prevent="handleLogin">
|
||||
{{ $t('commons.login') }}
|
||||
</el-button>
|
||||
<div v-if="uiInfo && uiInfo['ui.demo.tips'] && uiInfo['ui.demo.tips'].paramValue" class="demo-tips">
|
||||
{{ uiInfo['ui.demo.tips'].paramValue }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-msg">
|
||||
{{ msg }}
|
||||
</div>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col v-loading="!axiosFinished" :span="12">
|
||||
<div v-if="!loginImageUrl && axiosFinished" class="login-image" />
|
||||
<div v-if="loginImageUrl && axiosFinished" class="login-image-de" :style="{background:'url(' + loginImageUrl + ') no-repeat', 'backgroundSize':'contain'}" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
<plugin-com v-if="loginTypes.includes(2) && loginForm.loginType === 2" ref="SSOComponent" component-name="SSOComponent" />
|
||||
|
||||
</div>
|
||||
<div v-if="showFoot" class="dynamic-login-foot" v-html="footContent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -101,7 +105,9 @@ export default {
|
||||
'chart-tree',
|
||||
'dataset-tree'
|
||||
],
|
||||
defaultType: 0
|
||||
defaultType: 0,
|
||||
showFoot: false,
|
||||
footContent: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -159,8 +165,6 @@ export default {
|
||||
|
||||
created() {
|
||||
this.$store.dispatch('user/getUI').then(() => {
|
||||
// const uiLists = this.$store.state.user.uiInfo
|
||||
// this.uiInfo = format(uiLists)
|
||||
this.axiosFinished = true
|
||||
this.showLoginImage()
|
||||
}).catch(err => {
|
||||
@ -200,6 +204,13 @@ export default {
|
||||
const faviconUrl = '/system/ui/image/' + this.uiInfo['ui.favicon'].paramValue
|
||||
changeFavicon(faviconUrl)
|
||||
}
|
||||
if (this.uiInfo['ui.showFoot'] && this.uiInfo['ui.showFoot'].paramValue) {
|
||||
this.showFoot = this.uiInfo['ui.showFoot'].paramValue === true || this.uiInfo['ui.showFoot'].paramValue === 'true'
|
||||
if (this.showFoot) {
|
||||
const content = this.uiInfo['ui.footContent'] && this.uiInfo['ui.footContent'].paramValue
|
||||
this.footContent = content
|
||||
}
|
||||
}
|
||||
},
|
||||
initCache() {
|
||||
this.clearLocalStorage.forEach(item => {
|
||||
@ -386,4 +397,16 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.dynamic-login-foot {
|
||||
visibility: visible;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 302;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: auto;
|
||||
padding-top: 1px;
|
||||
zoom: 1;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user