forked from github/dataease
Merge branch 'dev' into pr@dev@fix_font_family
This commit is contained in:
commit
00ce5d2309
@ -4,9 +4,9 @@ import java.util.List;
|
||||
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import groovy.lang.Lazy;
|
||||
import io.dataease.auth.api.dto.CurrentRoleDto;
|
||||
import io.dataease.auth.api.dto.CurrentUserDto;
|
||||
import io.dataease.auth.entity.SysUserEntity;
|
||||
|
@ -116,7 +116,7 @@ public interface ParamConstants {
|
||||
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
|
||||
DEFAULT_LOGIN_TYPE("basic.loginType"),
|
||||
OPEN_HOME_PAGE("ui.openHomePage"),
|
||||
|
||||
AUTO_MOBILE("ui.autoMobile"),
|
||||
OPEN_MARKET_PAGE("ui.openMarketPage"),
|
||||
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),
|
||||
|
||||
|
@ -29,5 +29,7 @@ public class BasicInfo extends LoginLimitInfo implements Serializable {
|
||||
private String dsCheckInterval;
|
||||
@ApiModelProperty("数据源检测时间间隔类型")
|
||||
private String dsCheckIntervalType;
|
||||
@ApiModelProperty("自动识别移动端")
|
||||
private String autoMobile = "true";
|
||||
|
||||
}
|
||||
|
@ -62,9 +62,11 @@ public class SystemParameterService {
|
||||
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
|
||||
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
|
||||
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
|
||||
List<SystemParameter> autoMobileList = this.getParamList("ui.autoMobile");
|
||||
paramList.addAll(homePageList);
|
||||
paramList.addAll(marketPageList);
|
||||
paramList.addAll(loginLimitList);
|
||||
paramList.addAll(autoMobileList);
|
||||
BasicInfo result = new BasicInfo();
|
||||
result.setOpenHomePage("true");
|
||||
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
|
||||
@ -92,6 +94,10 @@ public class SystemParameterService {
|
||||
boolean open = StringUtils.equals("true", param.getParamValue());
|
||||
result.setOpenMarketPage(open ? "true" : "false");
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.AUTO_MOBILE.getValue())) {
|
||||
boolean close = StringUtils.equals("false", param.getParamValue());
|
||||
result.setAutoMobile(close ? "false" : "true");
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.TEMPLATE_MARKET_ULR.getValue())) {
|
||||
result.setTemplateMarketUlr(param.getParamValue());
|
||||
}
|
||||
|
@ -165,6 +165,8 @@ import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||
import {hexColorToRGBA} from "@/views/chart/chart/util";
|
||||
import { isMobile } from '@/utils/index'
|
||||
|
||||
|
||||
const erd = elementResizeDetectorMaker()
|
||||
export default {
|
||||
@ -623,9 +625,8 @@ export default {
|
||||
return -1
|
||||
},
|
||||
_isMobile() {
|
||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||
const flag = isMobile()
|
||||
this.terminal = flag ? 'mobile' : 'pc'
|
||||
// this.terminal = 'mobile'
|
||||
},
|
||||
canvasStyleDataInit() {
|
||||
// 数据刷新计时器
|
||||
|
@ -2413,6 +2413,7 @@ export default {
|
||||
themeDark: 'Dark',
|
||||
themeCustom: 'Custom',
|
||||
openHomePage: 'Show Home Page',
|
||||
auto_identify_mobile_devices: 'Automatically identify mobile devices',
|
||||
openMarketPage: 'Show Market Page',
|
||||
mobileBG: 'Mobile Login page BG',
|
||||
helpLink: 'Help Document Link',
|
||||
|
@ -2407,6 +2407,7 @@ export default {
|
||||
themeDark: '深色',
|
||||
themeCustom: '自定義',
|
||||
openHomePage: '顯示首頁',
|
||||
auto_identify_mobile_devices: '自動識別移動設備',
|
||||
openMarketPage: '顯示模板市場',
|
||||
mobileBG: '移動端登錄頁背景',
|
||||
helpLink: '幫助文檔鏈接',
|
||||
|
@ -2407,6 +2407,7 @@ export default {
|
||||
themeDark: '深色',
|
||||
themeCustom: '自定义',
|
||||
openHomePage: '显示首页',
|
||||
auto_identify_mobile_devices: '自动识别移动设备',
|
||||
openMarketPage: '显示模板市场',
|
||||
mobileBG: '移动端登录页背景',
|
||||
helpLink: '帮助文档链接',
|
||||
|
@ -5,6 +5,7 @@ import { seizeLogin } from '@/api/user'
|
||||
import router from '@/router'
|
||||
import store from '@/store'
|
||||
import { Loading } from 'element-ui'
|
||||
import { getSysUI } from '@/utils/auth'
|
||||
export function timeSection(date, type, labelFormat = 'yyyy-MM-dd') {
|
||||
if (!date) {
|
||||
return null
|
||||
@ -308,6 +309,10 @@ export function getQueryVariable(variable) {
|
||||
}
|
||||
|
||||
export function isMobile() {
|
||||
const uiInfo = getSysUI()
|
||||
if (uiInfo['ui.autoMobile']?.paramValue === 'false') {
|
||||
return false
|
||||
}
|
||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||
return flag
|
||||
}
|
||||
|
@ -207,6 +207,24 @@
|
||||
>{{ $t("commons.no") }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
:label="
|
||||
$t('commons.yes') + $t('commons.no') + $t('display.auto_identify_mobile_devices')
|
||||
"
|
||||
prop="autoMobile"
|
||||
>
|
||||
<el-radio-group v-model="formInline.autoMobile">
|
||||
<el-radio
|
||||
label="true"
|
||||
size="mini"
|
||||
>{{ $t("commons.yes") }}</el-radio>
|
||||
<el-radio
|
||||
label="false"
|
||||
size="mini"
|
||||
>{{ $t("commons.no") }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
@ -412,6 +430,12 @@ export default {
|
||||
type: 'text',
|
||||
sort: 14
|
||||
},
|
||||
{
|
||||
paramKey: 'ui.autoMobile',
|
||||
paramValue: this.formInline.autoMobile,
|
||||
type: 'text',
|
||||
sort: 15
|
||||
},
|
||||
|
||||
{
|
||||
paramKey: 'loginlimit.limitTimes',
|
||||
|
@ -4,7 +4,7 @@ import Stomp from 'stompjs'
|
||||
import store from '@/store'
|
||||
class DeWebsocket {
|
||||
constructor() {
|
||||
this.ws_url = '/websocket'
|
||||
this.ws_url = `${process.env.VUE_APP_BASE_API}websocket`
|
||||
this.client = null
|
||||
this.channels = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user