forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
db68e63685
@ -2,6 +2,7 @@ package io.dataease.auth.config.cas;
|
|||||||
|
|
||||||
import io.dataease.auth.service.impl.ShiroServiceImpl;
|
import io.dataease.auth.service.impl.ShiroServiceImpl;
|
||||||
import io.dataease.commons.utils.CommonBeanFactory;
|
import io.dataease.commons.utils.CommonBeanFactory;
|
||||||
|
import io.dataease.commons.utils.ServletUtils;
|
||||||
import io.dataease.service.system.SystemParameterService;
|
import io.dataease.service.system.SystemParameterService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.util.AntPathMatcher;
|
import org.apache.shiro.util.AntPathMatcher;
|
||||||
@ -17,7 +18,7 @@ import java.util.Set;
|
|||||||
public class CasStrategy implements UrlPatternMatcherStrategy {
|
public class CasStrategy implements UrlPatternMatcherStrategy {
|
||||||
|
|
||||||
|
|
||||||
private static Set<String> releaseTypes = new HashSet<>();
|
private static Set<String> releaseTypes = new HashSet<>();
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
@ -25,6 +26,7 @@ public class CasStrategy implements UrlPatternMatcherStrategy {
|
|||||||
releaseTypes.add("link");
|
releaseTypes.add("link");
|
||||||
releaseTypes.add("doc");
|
releaseTypes.add("doc");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(String s) {
|
public boolean matches(String s) {
|
||||||
SystemParameterService service = CommonBeanFactory.getBean(SystemParameterService.class);
|
SystemParameterService service = CommonBeanFactory.getBean(SystemParameterService.class);
|
||||||
@ -35,10 +37,14 @@ public class CasStrategy implements UrlPatternMatcherStrategy {
|
|||||||
if ((beginIndex = s.indexOf(serverName)) != -1) {
|
if ((beginIndex = s.indexOf(serverName)) != -1) {
|
||||||
s = s.substring(beginIndex + serverName.length());
|
s = s.substring(beginIndex + serverName.length());
|
||||||
}
|
}
|
||||||
if (StringUtils.equals("/", s)) return false;
|
if (StringUtils.equals("/", s)) {
|
||||||
|
if (fromLink(serverName)) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (StringUtils.equals("/login", s)) return false;
|
if (StringUtils.equals("/login", s)) return false;
|
||||||
if (StringUtils.startsWith(s, "/cas/callBack")) return false;
|
if (StringUtils.startsWith(s, "/cas/callBack")) return false;
|
||||||
if (StringUtils.equals("/api/auth/deLogout", s)) return true;
|
if (StringUtils.equals("/api/auth/deLogout", s)) return true;
|
||||||
|
if (s.startsWith("/link.html")) return true;
|
||||||
AntPathMatcher antPathMatcher = new AntPathMatcher();
|
AntPathMatcher antPathMatcher = new AntPathMatcher();
|
||||||
ShiroServiceImpl shiroService = CommonBeanFactory.getBean(ShiroServiceImpl.class);
|
ShiroServiceImpl shiroService = CommonBeanFactory.getBean(ShiroServiceImpl.class);
|
||||||
Map<String, String> stringStringMap = shiroService.loadFilterChainDefinitionMap();
|
Map<String, String> stringStringMap = shiroService.loadFilterChainDefinitionMap();
|
||||||
@ -57,4 +63,15 @@ public class CasStrategy implements UrlPatternMatcherStrategy {
|
|||||||
public void setPattern(String s) {
|
public void setPattern(String s) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Boolean fromLink(String serverName) {
|
||||||
|
String referrer = ServletUtils.request().getHeader("referer");
|
||||||
|
if (StringUtils.isBlank(referrer)) return false;
|
||||||
|
int beginIndex = -1;
|
||||||
|
if ((beginIndex = referrer.indexOf(serverName)) != -1) {
|
||||||
|
referrer = referrer.substring(beginIndex + serverName.length());
|
||||||
|
return referrer.startsWith("/link.html");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ import io.dataease.plugins.xpack.email.dto.response.XpackEmailTemplateDTO;
|
|||||||
import io.dataease.plugins.xpack.email.service.EmailXpackService;
|
import io.dataease.plugins.xpack.email.service.EmailXpackService;
|
||||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkMsgResult;
|
import io.dataease.plugins.xpack.lark.dto.entity.LarkMsgResult;
|
||||||
import io.dataease.plugins.xpack.lark.service.LarkXpackService;
|
import io.dataease.plugins.xpack.lark.service.LarkXpackService;
|
||||||
|
import io.dataease.plugins.xpack.larksuite.dto.response.LarksuiteMsgResult;
|
||||||
|
import io.dataease.plugins.xpack.larksuite.service.LarksuiteXpackService;
|
||||||
import io.dataease.plugins.xpack.wecom.dto.entity.WecomMsgResult;
|
import io.dataease.plugins.xpack.wecom.dto.entity.WecomMsgResult;
|
||||||
import io.dataease.plugins.xpack.wecom.service.WecomXpackService;
|
import io.dataease.plugins.xpack.wecom.service.WecomXpackService;
|
||||||
import io.dataease.service.chart.ViewExportExcel;
|
import io.dataease.service.chart.ViewExportExcel;
|
||||||
@ -297,6 +299,30 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "larksuite":
|
||||||
|
if (SpringContextUtil.getBean(AuthUserService.class).supportLarksuite()) {
|
||||||
|
List<String> larksuiteUsers = new ArrayList<>();
|
||||||
|
for (int j = 0; j < reciLists.size(); j++) {
|
||||||
|
String reci = reciLists.get(j);
|
||||||
|
SysUserEntity userBySub = userService.getUserByName(reci);
|
||||||
|
if (ObjectUtils.isEmpty(userBySub)) continue;
|
||||||
|
Long userId = userBySub.getUserId();
|
||||||
|
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||||
|
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getLarksuiteId()))
|
||||||
|
continue;
|
||||||
|
larksuiteUsers.add(sysUserAssist.getLarksuiteId());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(larksuiteUsers)) {
|
||||||
|
LarksuiteXpackService larksuiteXpackService = SpringContextUtil.getBean(LarksuiteXpackService.class);
|
||||||
|
LarksuiteMsgResult larksuiteMsgResult = larksuiteXpackService.pushOaMsg(larksuiteUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||||
|
if (larksuiteMsgResult.getCode() != 0) {
|
||||||
|
errorMsgs.add("larksuite: " + larksuiteMsgResult.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
package io.dataease.service.message.service.strategy;
|
||||||
|
|
||||||
|
|
||||||
|
import io.dataease.auth.service.AuthUserService;
|
||||||
|
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||||
|
import io.dataease.plugins.config.SpringContextUtil;
|
||||||
|
import io.dataease.plugins.xpack.larksuite.service.LarksuiteXpackService;
|
||||||
|
import io.dataease.service.message.service.SendService;
|
||||||
|
import io.dataease.service.sys.SysUserService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("sendLarksuite")
|
||||||
|
public class SendLarksuite implements SendService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AuthUserService authUserService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendMsg(Long userId, Long typeId, String content, String param) {
|
||||||
|
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||||
|
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getLarksuiteId()) && authUserService.supportLarksuite()) {
|
||||||
|
String username = sysUserAssist.getLarksuiteId();
|
||||||
|
LarksuiteXpackService larksuiteXpackService = SpringContextUtil.getBean(LarksuiteXpackService.class);
|
||||||
|
List<String> userIds = new ArrayList<>();
|
||||||
|
userIds.add(username);
|
||||||
|
larksuiteXpackService.pushMsg(userIds, content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -37,4 +37,8 @@ ALTER TABLE `dataset_table_field` CHANGE COLUMN `type` `type` VARCHAR(255) NOT N
|
|||||||
INSERT INTO `my_plugin` (`name`, `store`, `free`, `cost`, `category`, `descript`, `version`, `creator`, `load_mybatis`,
|
INSERT INTO `my_plugin` (`name`, `store`, `free`, `cost`, `category`, `descript`, `version`, `creator`, `load_mybatis`,
|
||||||
`install_time`, `module_name`, `ds_type`)
|
`install_time`, `module_name`, `ds_type`)
|
||||||
VALUES ('Apache Kylin 数据源插件', 'default', '0', '0', 'datasource', 'Apache Kylin 数据源插件', '1.0-SNAPSHOT', 'DATAEASE', '0',
|
VALUES ('Apache Kylin 数据源插件', 'default', '0', '0', 'datasource', 'Apache Kylin 数据源插件', '1.0-SNAPSHOT', 'DATAEASE', '0',
|
||||||
'1650765903630', 'kylin-backend', 'kylin');
|
'1650765903630', 'kylin-backend', 'kylin');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `sys_msg_channel` (`msg_channel_id`, `channel_name`, `service_name`) VALUES ('6', 'webmsg.channel_larksuite_msg', 'sendLarksuite');
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
@mousedown.stop.prevent="handleDown(handlei, $event)"
|
@mousedown.stop.prevent="handleDown(handlei, $event)"
|
||||||
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
|
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
|
||||||
>
|
>
|
||||||
<slot :name="handlei"/>
|
<slot :name="handlei" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:id="componentCanvasId"
|
:id="componentCanvasId"
|
||||||
@ -77,7 +77,7 @@
|
|||||||
class="svg-background"
|
class="svg-background"
|
||||||
:icon-class="mainSlotSvgInner"
|
:icon-class="mainSlotSvgInner"
|
||||||
/>
|
/>
|
||||||
<slot/>
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -386,7 +386,7 @@ export default {
|
|||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
contentDisplay: true,
|
contentDisplay: true,
|
||||||
//当画布在tab中是 宽度左右拓展的余量
|
// 当画布在tab中是 宽度左右拓展的余量
|
||||||
parentWidthTabOffset: 40,
|
parentWidthTabOffset: 40,
|
||||||
canvasChangeTips: 'none',
|
canvasChangeTips: 'none',
|
||||||
tabMoveInYOffset: 70,
|
tabMoveInYOffset: 70,
|
||||||
@ -1427,7 +1427,6 @@ export default {
|
|||||||
|
|
||||||
// 如果辅助设计 需要最后调整矩阵
|
// 如果辅助设计 需要最后调整矩阵
|
||||||
if (this.element.auxiliaryMatrix) {
|
if (this.element.auxiliaryMatrix) {
|
||||||
const _this = this
|
|
||||||
const historyTabMoveInActiveId = this.tabMoveInActiveId
|
const historyTabMoveInActiveId = this.tabMoveInActiveId
|
||||||
const historyTabMoveOutComponentId = this.tabMoveOutComponentId
|
const historyTabMoveOutComponentId = this.tabMoveOutComponentId
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -1464,10 +1463,10 @@ export default {
|
|||||||
componentCanvasChange() {
|
componentCanvasChange() {
|
||||||
// 主画布移入Tab画布
|
// 主画布移入Tab画布
|
||||||
if (this.tabMoveInActiveId) {
|
if (this.tabMoveInActiveId) {
|
||||||
//从当前画布移除
|
// 从当前画布移除
|
||||||
this.$emit('amRemoveItem')
|
this.$emit('amRemoveItem')
|
||||||
this.element.canvasPid = this.element.canvasId
|
this.element.canvasPid = this.element.canvasId
|
||||||
//Tab内部的画布ID 为 tab组件id + '-' + tabActiveName
|
// Tab内部的画布ID 为 tab组件id + '-' + tabActiveName
|
||||||
const targetCanvasId = this.tabMoveInActiveId + '-' + this.tabActiveTabNameMap[this.tabMoveInActiveId]
|
const targetCanvasId = this.tabMoveInActiveId + '-' + this.tabActiveTabNameMap[this.tabMoveInActiveId]
|
||||||
const targetCanvasScale = this.curCanvasScaleMap[targetCanvasId]
|
const targetCanvasScale = this.curCanvasScaleMap[targetCanvasId]
|
||||||
if (this.element.auxiliaryMatrix) {
|
if (this.element.auxiliaryMatrix) {
|
||||||
@ -1489,11 +1488,11 @@ export default {
|
|||||||
}
|
}
|
||||||
// Tab 画布 移入主画布
|
// Tab 画布 移入主画布
|
||||||
if (this.tabMoveOutComponentId) {
|
if (this.tabMoveOutComponentId) {
|
||||||
//从当前画布移除
|
// 从当前画布移除
|
||||||
this.$emit('amRemoveItem')
|
this.$emit('amRemoveItem')
|
||||||
this.element.canvasPid = 0
|
this.element.canvasPid = 0
|
||||||
this.element.canvasId = 'canvas-main'
|
this.element.canvasId = 'canvas-main'
|
||||||
//Tab内部的画布ID 为 tab组件id + '-' + tabActiveName
|
// Tab内部的画布ID 为 tab组件id + '-' + tabActiveName
|
||||||
const targetCanvasScale = this.curCanvasScaleMap['canvas-main']
|
const targetCanvasScale = this.curCanvasScaleMap['canvas-main']
|
||||||
// 按照阴影位置定位
|
// 按照阴影位置定位
|
||||||
this.element.style.left = (this.mousePointShadowMap.mouseX - (this.mousePointShadowMap.width)) / targetCanvasScale.scalePointWidth
|
this.element.style.left = (this.mousePointShadowMap.mouseX - (this.mousePointShadowMap.width)) / targetCanvasScale.scalePointWidth
|
||||||
@ -1509,7 +1508,6 @@ export default {
|
|||||||
this.recordMatrixCurShadowStyle(targetCanvasScale)
|
this.recordMatrixCurShadowStyle(targetCanvasScale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 设置属性(属性跟随所属canvas component类型 要做出改变)
|
// 设置属性(属性跟随所属canvas component类型 要做出改变)
|
||||||
@ -1979,7 +1977,6 @@ export default {
|
|||||||
} else if (this.tabMoveInActiveId === item.getAttribute('component-id')) {
|
} else if (this.tabMoveInActiveId === item.getAttribute('component-id')) {
|
||||||
this.$store.commit('setTabMoveInActiveId', null)
|
this.$store.commit('setTabMoveInActiveId', null)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,14 @@
|
|||||||
:style="styleInfo"
|
:style="styleInfo"
|
||||||
>
|
>
|
||||||
<div class="point-shadow-content">
|
<div class="point-shadow-content">
|
||||||
<div id="point-shadow-component" class="point-shadow-component"></div>
|
<div
|
||||||
<div class="point-shadow-tips" :style="tipsStyleInfo">
|
id="point-shadow-component"
|
||||||
|
class="point-shadow-component"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="point-shadow-tips"
|
||||||
|
:style="tipsStyleInfo"
|
||||||
|
>
|
||||||
<div style="width: 100%;text-align: center">组件将被移出Tab</div>
|
<div style="width: 100%;text-align: center">组件将被移出Tab</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -94,7 +100,6 @@ export default {
|
|||||||
background-color: rgba(179, 212, 252);
|
background-color: rgba(179, 212, 252);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.point-shadow-tips {
|
.point-shadow-tips {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
replace: true,
|
replace: true,
|
||||||
|
// eslint-disable-next-line
|
||||||
name: 'Shadow',
|
name: 'Shadow',
|
||||||
props: {
|
props: {
|
||||||
canvasId: {
|
canvasId: {
|
||||||
@ -18,7 +19,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
curCanvasScaleSelf(){
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
},
|
},
|
||||||
styleInfo() {
|
styleInfo() {
|
||||||
|
@ -86,7 +86,7 @@ export const colorCases = [
|
|||||||
export const gradientColorCases = [
|
export const gradientColorCases = [
|
||||||
{
|
{
|
||||||
name: '渐变色1',
|
name: '渐变色1',
|
||||||
value: 'gradient1',
|
value: 'gradient1_continuous_gradient',
|
||||||
colors: [
|
colors: [
|
||||||
['rgba(144,202,249,0.5)', 'rgba(1,87,155,0.9)'],
|
['rgba(144,202,249,0.5)', 'rgba(1,87,155,0.9)'],
|
||||||
['rgba(127,222,234,1)', 'rgba(0,77,65,1)'],
|
['rgba(127,222,234,1)', 'rgba(0,77,65,1)'],
|
||||||
@ -101,3 +101,72 @@ export const gradientColorCases = [
|
|||||||
export const isGradientValue = value => {
|
export const isGradientValue = value => {
|
||||||
return value && gradientColorCases.some(item => item.value === value)
|
return value && gradientColorCases.some(item => item.value === value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getColorType = value => {
|
||||||
|
if (value.endsWith('_split_gradient')) {
|
||||||
|
return 'split_gradient'
|
||||||
|
}
|
||||||
|
const cloneColorCases = JSON.parse(JSON.stringify(colorCases))
|
||||||
|
if (cloneColorCases.some(item => item.value === value)) {
|
||||||
|
return 'simple'
|
||||||
|
}
|
||||||
|
return 'gradient'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMapColorCases = () => {
|
||||||
|
const cloneColorCases = JSON.parse(JSON.stringify(colorCases))
|
||||||
|
return cloneColorCases.map(colorItem => {
|
||||||
|
const curColors = colorItem.colors
|
||||||
|
const len = curColors.length
|
||||||
|
const start = curColors[0]
|
||||||
|
const end = curColors[len - 1]
|
||||||
|
const itemResult = {
|
||||||
|
name: colorItem.name,
|
||||||
|
value: colorItem.value + '_split_gradient',
|
||||||
|
baseColors: [start, end],
|
||||||
|
colors: stepsColor(start, end, 9, 1)
|
||||||
|
}
|
||||||
|
return itemResult
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function stepsColor(start, end, steps, gamma) {
|
||||||
|
var i; var j; var ms; var me; var output = []; var so = []
|
||||||
|
gamma = gamma || 1
|
||||||
|
var normalize = function(channel) {
|
||||||
|
return Math.pow(channel / 255, gamma)
|
||||||
|
}
|
||||||
|
start = parseColor(start).map(normalize)
|
||||||
|
end = parseColor(end).map(normalize)
|
||||||
|
for (i = 0; i < steps; i++) {
|
||||||
|
ms = (steps - 1) === 0 ? 0 : (i / (steps - 1))
|
||||||
|
me = 1 - ms
|
||||||
|
for (j = 0; j < 3; j++) {
|
||||||
|
so[j] = pad(
|
||||||
|
Math.round(
|
||||||
|
Math.pow(start[j] * me + end[j] * ms, 1 / gamma) * 255
|
||||||
|
).toString(16)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
output.push('#' + so.join(''))
|
||||||
|
}
|
||||||
|
function parseColor(hexStr) {
|
||||||
|
return hexStr.length === 4
|
||||||
|
? hexStr
|
||||||
|
.substr(1)
|
||||||
|
.split('')
|
||||||
|
.map(function(s) {
|
||||||
|
return 0x11 * parseInt(s, 16)
|
||||||
|
})
|
||||||
|
: [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(
|
||||||
|
function(s) {
|
||||||
|
return parseInt(s, 16)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
function pad(s) {
|
||||||
|
return s.length === 1 ? '0' + s : s
|
||||||
|
}
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="item"
|
class="item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
content="重置"
|
:content="$t('commons.reset')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<i class="el-icon-refresh" />
|
<i class="el-icon-refresh" />
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<div class="custom-switch-div">
|
<div class="custom-switch-div">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="enableCustom"
|
v-model="enableCustom"
|
||||||
active-text="自定义"
|
:active-text="$t('commons.custom')"
|
||||||
inactive-text=""
|
inactive-text=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
@tab-click="handleClick"
|
@tab-click="handleClick"
|
||||||
>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(pane, i) in tabPanes"
|
v-for="(pane, i) in tabPanes.filter(item => item.name === 'simple' || (showIndex === 1 && item.name === 'split_gradient') || (showIndex === 2 && item.name === 'gradient'))"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="pane.label"
|
:label="pane.label"
|
||||||
:name="pane.name"
|
:name="pane.name"
|
||||||
@ -84,22 +84,29 @@
|
|||||||
v-for="(co,index) in option.colors"
|
v-for="(co,index) in option.colors"
|
||||||
v-else
|
v-else
|
||||||
:key="index"
|
:key="index"
|
||||||
class="color-span-base is-editor"
|
class="color-span-base"
|
||||||
|
:class="option.value.endsWith('_split_gradient') && index % 8 !== 0 ? 'static-editor' : 'is-editor'"
|
||||||
>
|
>
|
||||||
<el-color-picker
|
<span
|
||||||
v-if="i === 0"
|
v-if="option.value.endsWith('_split_gradient') && index % 8 !== 0"
|
||||||
v-model="option.colors[index]"
|
class="color-span-base-split"
|
||||||
@change="switchColorItem(option.colors, index)"
|
:style="{background: formatBgColor(co)}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<de-color-picker
|
<de-color-picker
|
||||||
v-else
|
v-else-if="option.value.endsWith('_continuous_gradient')"
|
||||||
:id="option.value + index"
|
:id="option.value + index"
|
||||||
ref="de-color-picker"
|
ref="de-color-picker"
|
||||||
v-model="option.colors[index]"
|
v-model="option.colors[index]"
|
||||||
:base-id="option.value + index"
|
:base-id="option.value + index"
|
||||||
show-alpha
|
show-alpha
|
||||||
color-format="rgb"
|
color-format="rgb"
|
||||||
@change="switchColorItem(option.colors, index)"
|
@change="switchColorItem(option.colors, option.value)"
|
||||||
|
/>
|
||||||
|
<el-color-picker
|
||||||
|
v-else
|
||||||
|
v-model="option.colors[index]"
|
||||||
|
@change="switchColorItem(option.colors, option.value)"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -132,7 +139,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { colorCases, gradientColorCases } from './base'
|
import { colorCases, gradientColorCases, getMapColorCases, getColorType, stepsColor } from './base'
|
||||||
import DeColorPicker from './DeColorPicker'
|
import DeColorPicker from './DeColorPicker'
|
||||||
export default {
|
export default {
|
||||||
name: 'GradientColorSelector',
|
name: 'GradientColorSelector',
|
||||||
@ -148,6 +155,10 @@ export default {
|
|||||||
colors: []
|
colors: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
showIndex: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -161,12 +172,17 @@ export default {
|
|||||||
activeName: 'simple',
|
activeName: 'simple',
|
||||||
tabPanes: [
|
tabPanes: [
|
||||||
{
|
{
|
||||||
label: '纯色',
|
label: this.$t('chart.solid_color'),
|
||||||
name: 'simple',
|
name: 'simple',
|
||||||
data: JSON.parse(JSON.stringify(colorCases))
|
data: JSON.parse(JSON.stringify(colorCases))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '渐变',
|
label: this.$t('chart.split_gradient'),
|
||||||
|
name: 'split_gradient',
|
||||||
|
data: JSON.parse(JSON.stringify(getMapColorCases()))
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('chart.continuous_gradient'),
|
||||||
name: 'gradient',
|
name: 'gradient',
|
||||||
data: JSON.parse(JSON.stringify(gradientColorCases))
|
data: JSON.parse(JSON.stringify(gradientColorCases))
|
||||||
}
|
}
|
||||||
@ -200,10 +216,27 @@ export default {
|
|||||||
parents.scrollTo(0, top)
|
parents.scrollTo(0, top)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchColorItem(colors, index) {
|
switchColorItem(colors, value) {
|
||||||
this.colorDto.colors = JSON.parse(JSON.stringify(colors))
|
const activeName = getColorType(value)
|
||||||
|
if (activeName === 'split_gradient') {
|
||||||
|
const start = colors[0]
|
||||||
|
const end = colors[colors.length - 1]
|
||||||
|
const targetColors = stepsColor(start, end, 9, 1)
|
||||||
|
this.colorDto.colors = JSON.parse(JSON.stringify(targetColors))
|
||||||
|
this.fillSplitGradientPanel()
|
||||||
|
} else {
|
||||||
|
this.colorDto.colors = JSON.parse(JSON.stringify(colors))
|
||||||
|
}
|
||||||
|
|
||||||
this.$emit('color-change', JSON.parse(JSON.stringify(this.colorDto)))
|
this.$emit('color-change', JSON.parse(JSON.stringify(this.colorDto)))
|
||||||
},
|
},
|
||||||
|
fillSplitGradientPanel() {
|
||||||
|
this.tabPanes[1].data.forEach(item => {
|
||||||
|
if (item.value === this.colorDto.value) {
|
||||||
|
item.colors = this.colorDto.colors
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
initcolorDto() {
|
initcolorDto() {
|
||||||
let haspPropValue = true
|
let haspPropValue = true
|
||||||
if (!this.colorDto.value) {
|
if (!this.colorDto.value) {
|
||||||
@ -211,9 +244,9 @@ export default {
|
|||||||
this.colorDto.colors = this.colorCases[0].colors
|
this.colorDto.colors = this.colorCases[0].colors
|
||||||
haspPropValue = false
|
haspPropValue = false
|
||||||
}
|
}
|
||||||
this.activeName = this.colorCases.some(item => item.value === this.colorDto.value) ? 'simple' : 'gradient'
|
this.activeName = getColorType(this.colorDto.value)
|
||||||
if (haspPropValue) {
|
if (haspPropValue) {
|
||||||
this.tabPanes[this.activeName === 'simple' ? 0 : 1].data.forEach(item => {
|
this.tabPanes[this.activeName === 'simple' ? 0 : this.activeName === 'split_gradient' ? 1 : 2].data.forEach(item => {
|
||||||
if (item.value === this.colorDto.value) {
|
if (item.value === this.colorDto.value) {
|
||||||
item.colors = JSON.parse(JSON.stringify(this.colorDto.colors))
|
item.colors = JSON.parse(JSON.stringify(this.colorDto.colors))
|
||||||
}
|
}
|
||||||
@ -270,14 +303,15 @@ export default {
|
|||||||
return str
|
return str
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.tabPanes[1].data = JSON.parse(JSON.stringify(this.gradientColorCases))
|
const len = this.tabPanes.length
|
||||||
|
this.tabPanes[len - 1].data = JSON.parse(JSON.stringify(this.gradientColorCases))
|
||||||
},
|
},
|
||||||
formatBgColor(color, useValue) {
|
formatBgColor(color, useValue) {
|
||||||
let activeName = this.activeName
|
let activeName = this.activeName
|
||||||
if (useValue) {
|
if (useValue) {
|
||||||
activeName = this.colorCases.some(item => item.value === this.colorDto.value) ? 'simple' : 'gradient'
|
activeName = getColorType(this.colorDto.value)
|
||||||
}
|
}
|
||||||
if (activeName === 'simple') {
|
if (activeName === 'simple' || activeName === 'split_gradient') {
|
||||||
return color
|
return color
|
||||||
}
|
}
|
||||||
return 'linear-gradient(0.0deg,' + color[0] + ' 0.0,' + color[1] + ' 100.0%)'
|
return 'linear-gradient(0.0deg,' + color[0] + ' 0.0,' + color[1] + ' 100.0%)'
|
||||||
@ -296,11 +330,8 @@ export default {
|
|||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
if (this.colorDto.value) {
|
if (this.colorDto.value) {
|
||||||
let activeName = 'simple'
|
const activeName = getColorType(this.colorDto.value);
|
||||||
if (this.gradientColorCases.some(item => item.value === this.colorDto.value)) {
|
(activeName === 'simple' ? colorCases : activeName === 'split_gradient' ? getMapColorCases() : gradientColorCases).forEach(curcase => {
|
||||||
activeName = 'gradient'
|
|
||||||
}
|
|
||||||
(activeName === 'simple' ? colorCases : gradientColorCases).forEach(curcase => {
|
|
||||||
if (curcase.value === this.colorDto.value) {
|
if (curcase.value === this.colorDto.value) {
|
||||||
this.colorDto.colors = JSON.parse(JSON.stringify(curcase.colors))
|
this.colorDto.colors = JSON.parse(JSON.stringify(curcase.colors))
|
||||||
this.$emit('color-change', JSON.parse(JSON.stringify(this.colorDto)))
|
this.$emit('color-change', JSON.parse(JSON.stringify(this.colorDto)))
|
||||||
@ -318,7 +349,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.gradient-popper {
|
.gradient-popper {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 10px;
|
padding: 0 10px !important;
|
||||||
margin-top: 1px !important;
|
margin-top: 1px !important;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
@ -340,7 +371,8 @@ export default {
|
|||||||
.color-span-base {
|
.color-span-base {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
display:inline-block;
|
display:flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.is-editor {
|
.is-editor {
|
||||||
width:23px !important;
|
width:23px !important;
|
||||||
@ -352,7 +384,11 @@ export default {
|
|||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-left: 5px !important;
|
padding-left: 5px !important;
|
||||||
|
.static-editor:nth-child(2) {
|
||||||
|
margin-left: 5px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-switch-div {
|
.custom-switch-div {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
@ -380,4 +416,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.is-split {
|
||||||
|
width: 28px !important;
|
||||||
|
}
|
||||||
|
.color-span-base-split {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="canvas_content"
|
|
||||||
:id="canvasDomId"
|
:id="canvasDomId"
|
||||||
|
class="canvas_content"
|
||||||
@drop="handleDrop"
|
@drop="handleDrop"
|
||||||
@dragover="handleDragOver"
|
@dragover="handleDragOver"
|
||||||
@mousedown="handleMouseDown"
|
@mousedown="handleMouseDown"
|
||||||
@ -9,17 +9,26 @@
|
|||||||
@scroll="canvasScroll"
|
@scroll="canvasScroll"
|
||||||
>
|
>
|
||||||
<slot name="optBar" />
|
<slot name="optBar" />
|
||||||
<de-editor :canvas-style-data="canvasStyleData"
|
<de-editor
|
||||||
:component-data="componentData"
|
:ref="editorRefName"
|
||||||
:canvas-id="canvasId"
|
:canvas-style-data="canvasStyleData"
|
||||||
:parent-forbid="parentForbid"
|
:component-data="componentData"
|
||||||
:ref="editorRefName"
|
:canvas-id="canvasId"
|
||||||
:matrix-count="matrixCountBase"
|
:parent-forbid="parentForbid"
|
||||||
:out-style="outStyle"
|
:matrix-count="matrixCountBase"
|
||||||
:scroll-top="scrollTop"
|
:out-style="outStyle"
|
||||||
@canvasDragging="canvasDragging"
|
:scroll-top="scrollTop"
|
||||||
|
@canvasDragging="canvasDragging"
|
||||||
/>
|
/>
|
||||||
<input id="input" ref="files" type="file" accept="image/*" hidden @click="e => {e.target.value = '';}" @change="handleFileChange" >
|
<input
|
||||||
|
id="input"
|
||||||
|
ref="files"
|
||||||
|
type="file"
|
||||||
|
accept="image/*"
|
||||||
|
hidden
|
||||||
|
@click="e => {e.target.value = '';}"
|
||||||
|
@change="handleFileChange"
|
||||||
|
>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="buttonVisible && panelInfo.id"
|
v-if="buttonVisible && panelInfo.id"
|
||||||
:title="(currentWidget && currentWidget.getLeftPanel && currentWidget.getLeftPanel().label ? $t(currentWidget.getLeftPanel().label) : '') + $t('panel.module')"
|
:title="(currentWidget && currentWidget.getLeftPanel && currentWidget.getLeftPanel().label ? $t(currentWidget.getLeftPanel().label) : '') + $t('panel.module')"
|
||||||
@ -80,7 +89,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--矩形样式组件-->
|
<!--矩形样式组件-->
|
||||||
<TextAttr v-if="showAttr" :canvas-id="canvasId" :scroll-left="scrollLeft" :scroll-top="scrollTop"/>
|
<TextAttr
|
||||||
|
v-if="showAttr"
|
||||||
|
:canvas-id="canvasId"
|
||||||
|
:scroll-left="scrollLeft"
|
||||||
|
:scroll-top="scrollTop"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -107,6 +121,35 @@ import FilterDialog from '@/views/panel/filter/filterDialog'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { FilterDialog, ButtonResetDialog, ButtonDialog, DeEditor },
|
components: { FilterDialog, ButtonResetDialog, ButtonDialog, DeEditor },
|
||||||
|
props: {
|
||||||
|
parentForbid: {
|
||||||
|
type: Boolean,
|
||||||
|
require: false,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
canvasStyleData: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
componentData: {
|
||||||
|
type: Array,
|
||||||
|
require: false,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
canvasId: {
|
||||||
|
type: String,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
canvasPid: {
|
||||||
|
type: String,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
mobileLayoutStatus: {
|
||||||
|
type: Boolean,
|
||||||
|
require: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 需要展示属性设置的组件类型
|
// 需要展示属性设置的组件类型
|
||||||
@ -140,44 +183,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
parentForbid:{
|
|
||||||
type: Boolean,
|
|
||||||
require: false,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
canvasStyleData: {
|
|
||||||
type: Object,
|
|
||||||
require: true
|
|
||||||
},
|
|
||||||
componentData: {
|
|
||||||
type: Array,
|
|
||||||
require: false,
|
|
||||||
default: []
|
|
||||||
},
|
|
||||||
canvasId: {
|
|
||||||
type: String,
|
|
||||||
require: true
|
|
||||||
},
|
|
||||||
canvasPid: {
|
|
||||||
type: String,
|
|
||||||
require: true
|
|
||||||
},
|
|
||||||
mobileLayoutStatus: {
|
|
||||||
type: Boolean,
|
|
||||||
require: false,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
matrixCountBase(){
|
matrixCountBase() {
|
||||||
if(this.isMainCanvas && this.mobileLayoutStatus){
|
if (this.isMainCanvas && this.mobileLayoutStatus) {
|
||||||
return this.mobileMatrixCount
|
return this.mobileMatrixCount
|
||||||
}else{
|
} else {
|
||||||
return this.pcMatrixCountBase
|
return this.pcMatrixCountBase
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isMainCanvas(){
|
isMainCanvas() {
|
||||||
return this.canvasId === 'canvas-main'
|
return this.canvasId === 'canvas-main'
|
||||||
},
|
},
|
||||||
panelInfo() {
|
panelInfo() {
|
||||||
@ -224,7 +238,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
mobileLayoutStatus() {
|
mobileLayoutStatus() {
|
||||||
this.restore()
|
this.restore()
|
||||||
},
|
}
|
||||||
// //监控当前组件移动 检查是否靠近tab
|
// //监控当前组件移动 检查是否靠近tab
|
||||||
// curComponent: {
|
// curComponent: {
|
||||||
// handler(newVal, oldVla) {
|
// handler(newVal, oldVla) {
|
||||||
@ -263,7 +277,7 @@ export default {
|
|||||||
if (domInfo) {
|
if (domInfo) {
|
||||||
this.outStyle.height = domInfo.offsetHeight - this.getGap()
|
this.outStyle.height = domInfo.offsetHeight - this.getGap()
|
||||||
// 临时处理 确保每次restore 有会更新
|
// 临时处理 确保每次restore 有会更新
|
||||||
this.outStyle.width = domInfo.offsetWidth + (Math.random() * 0.000001)
|
this.outStyle.width = domInfo.offsetWidth + (Math.random() * 0.000001)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -570,7 +584,7 @@ export default {
|
|||||||
// const canvasInfoMobile = document.getElementById(this.canvasDomId)
|
// const canvasInfoMobile = document.getElementById(this.canvasDomId)
|
||||||
// canvasInfoMobile.scrollTop = canvasInfoMobile.scrollTop + offset
|
// canvasInfoMobile.scrollTop = canvasInfoMobile.scrollTop + offset
|
||||||
// this.$store.commit('setScrollAutoMove', this.scrollAutoMove + offset)
|
// this.$store.commit('setScrollAutoMove', this.scrollAutoMove + offset)
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -130,7 +130,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
curCanvasScaleSelf(){
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
|
@ -13,8 +13,15 @@
|
|||||||
@scroll="canvasScroll"
|
@scroll="canvasScroll"
|
||||||
>
|
>
|
||||||
<!-- 网格线 -->
|
<!-- 网格线 -->
|
||||||
<Grid v-if="showGrid" :matrix-style="matrixStyle"/>
|
<Grid
|
||||||
<PGrid v-if="psDebug" :position-box="positionBoxInfoArray" :matrix-style="matrixStyle"/>
|
v-if="showGrid"
|
||||||
|
:matrix-style="matrixStyle"
|
||||||
|
/>
|
||||||
|
<PGrid
|
||||||
|
v-if="psDebug"
|
||||||
|
:position-box="positionBoxInfoArray"
|
||||||
|
:matrix-style="matrixStyle"
|
||||||
|
/>
|
||||||
<!--页面组件列表展示-->
|
<!--页面组件列表展示-->
|
||||||
<de-drag
|
<de-drag
|
||||||
v-for="(item, index) in componentData"
|
v-for="(item, index) in componentData"
|
||||||
@ -58,8 +65,8 @@
|
|||||||
<de-out-widget
|
<de-out-widget
|
||||||
v-if="renderOk && item.type==='custom'"
|
v-if="renderOk && item.type==='custom'"
|
||||||
:id="'component' + item.id"
|
:id="'component' + item.id"
|
||||||
:canvas-id="canvasId"
|
|
||||||
ref="wrapperChild"
|
ref="wrapperChild"
|
||||||
|
:canvas-id="canvasId"
|
||||||
class="component"
|
class="component"
|
||||||
:style="getComponentStyleDefault(item.style)"
|
:style="getComponentStyleDefault(item.style)"
|
||||||
:prop-value="item.propValue"
|
:prop-value="item.propValue"
|
||||||
@ -73,8 +80,8 @@
|
|||||||
:is="item.component"
|
:is="item.component"
|
||||||
v-else-if="renderOk && item.type==='other'"
|
v-else-if="renderOk && item.type==='other'"
|
||||||
:id="'component' + item.id"
|
:id="'component' + item.id"
|
||||||
:canvas-id="canvasId"
|
|
||||||
ref="wrapperChild"
|
ref="wrapperChild"
|
||||||
|
:canvas-id="canvasId"
|
||||||
class="component"
|
class="component"
|
||||||
:style="getComponentStyle(item.style)"
|
:style="getComponentStyle(item.style)"
|
||||||
:prop-value="item.propValue"
|
:prop-value="item.propValue"
|
||||||
@ -86,8 +93,8 @@
|
|||||||
:is="item.component"
|
:is="item.component"
|
||||||
v-else-if="renderOk"
|
v-else-if="renderOk"
|
||||||
:id="'component' + item.id"
|
:id="'component' + item.id"
|
||||||
:canvas-id="canvasId"
|
|
||||||
ref="wrapperChild"
|
ref="wrapperChild"
|
||||||
|
:canvas-id="canvasId"
|
||||||
class="component"
|
class="component"
|
||||||
:filters="filterMap[item.propValue && item.propValue.viewId]"
|
:filters="filterMap[item.propValue && item.propValue.viewId]"
|
||||||
:style="getComponentStyleDefault(item.style)"
|
:style="getComponentStyleDefault(item.style)"
|
||||||
@ -103,11 +110,17 @@
|
|||||||
/>
|
/>
|
||||||
</de-drag>
|
</de-drag>
|
||||||
<!--拖拽阴影部分-->
|
<!--拖拽阴影部分-->
|
||||||
<drag-shadow :canvas-id="canvasId" v-if="shadowShow && dragShadowShow"/>
|
<drag-shadow
|
||||||
|
v-if="shadowShow && dragShadowShow"
|
||||||
|
:canvas-id="canvasId"
|
||||||
|
/>
|
||||||
<!--切换canvas 拖拽阴影部分-->
|
<!--切换canvas 拖拽阴影部分-->
|
||||||
<point-shadow :canvas-id="canvasId" v-if="pointShadowShow"></point-shadow>
|
<point-shadow
|
||||||
|
v-if="pointShadowShow"
|
||||||
|
:canvas-id="canvasId"
|
||||||
|
/>
|
||||||
<!-- 右击菜单 -->
|
<!-- 右击菜单 -->
|
||||||
<ContextMenu/>
|
<ContextMenu />
|
||||||
|
|
||||||
<!-- 对齐标线 -->
|
<!-- 对齐标线 -->
|
||||||
<span
|
<span
|
||||||
@ -438,6 +451,7 @@ function removeItem(index) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.yourList.splice(index, 1, {})
|
this.yourList.splice(index, 1, {})
|
||||||
|
// eslint-disable-next-line
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -740,6 +754,7 @@ export default {
|
|||||||
Shape,
|
Shape,
|
||||||
ContextMenu,
|
ContextMenu,
|
||||||
MarkLine,
|
MarkLine,
|
||||||
|
// eslint-disable-next-line
|
||||||
Area,
|
Area,
|
||||||
Grid,
|
Grid,
|
||||||
PGrid,
|
PGrid,
|
||||||
@ -762,7 +777,7 @@ export default {
|
|||||||
componentData: {
|
componentData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
require: false,
|
require: false,
|
||||||
default: []
|
default: () => []
|
||||||
},
|
},
|
||||||
canvasId: {
|
canvasId: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -893,18 +908,18 @@ export default {
|
|||||||
moveTabCollisionActive() {
|
moveTabCollisionActive() {
|
||||||
return this.tabCollisionActiveId
|
return this.tabCollisionActiveId
|
||||||
},
|
},
|
||||||
pointShadowShow(){
|
pointShadowShow() {
|
||||||
return this.canvasId==='canvas-main'
|
return this.canvasId === 'canvas-main' &&
|
||||||
&& this.curComponent
|
this.curComponent &&
|
||||||
&& this.curComponent.canvasId !== 'canvas-main'
|
this.curComponent.canvasId !== 'canvas-main' &&
|
||||||
&& this.tabMoveOutComponentId
|
this.tabMoveOutComponentId
|
||||||
},
|
},
|
||||||
shadowShow() {
|
shadowShow() {
|
||||||
return ((this.curComponent
|
return ((this.curComponent &&
|
||||||
&& this.curComponent.auxiliaryMatrix
|
this.curComponent.auxiliaryMatrix &&
|
||||||
&& this.curComponent.canvasId === this.canvasId
|
this.curComponent.canvasId === this.canvasId &&
|
||||||
&& (this.curComponent.optStatus.dragging || this.curComponent.optStatus.resizing))
|
(this.curComponent.optStatus.dragging || this.curComponent.optStatus.resizing)) ||
|
||||||
|| (this.dragComponentInfo && this.dragComponentInfo.canvasId ===this.canvasId )) && !this.tabMoveInActive
|
(this.dragComponentInfo && this.dragComponentInfo.canvasId === this.canvasId)) && !this.tabMoveInActive
|
||||||
},
|
},
|
||||||
tabMoveInActive() {
|
tabMoveInActive() {
|
||||||
return this.tabMoveInActiveId
|
return this.tabMoveInActiveId
|
||||||
@ -928,7 +943,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 挤占式画布设计
|
// 挤占式画布设计
|
||||||
|
// eslint-disable-next-line
|
||||||
coordinates() {
|
coordinates() {
|
||||||
|
// eslint-disable-next-line
|
||||||
return this.coordinates
|
return this.coordinates
|
||||||
},
|
},
|
||||||
customStyle() {
|
customStyle() {
|
||||||
@ -1419,7 +1436,7 @@ export default {
|
|||||||
matrixStyleOriginWidth: this.matrixStyle.originWidth,
|
matrixStyleOriginWidth: this.matrixStyle.originWidth,
|
||||||
matrixStyleOriginHeight: this.matrixStyle.originHeight
|
matrixStyleOriginHeight: this.matrixStyle.originHeight
|
||||||
})
|
})
|
||||||
if(this.canvasId === 'canvas-main'){
|
if (this.canvasId === 'canvas-main') {
|
||||||
this.$store.commit('setPreviewCanvasScale', {
|
this.$store.commit('setPreviewCanvasScale', {
|
||||||
scaleWidth: this.scalePointWidth,
|
scaleWidth: this.scalePointWidth,
|
||||||
scaleHeight: this.scalePointHeight
|
scaleHeight: this.scalePointHeight
|
||||||
|
@ -319,7 +319,7 @@ export default {
|
|||||||
miniWidth() {
|
miniWidth() {
|
||||||
return this.mobileLayoutStatus ? 1 : 4
|
return this.mobileLayoutStatus ? 1 : 4
|
||||||
},
|
},
|
||||||
curCanvasScaleSelf(){
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
class="outer-class"
|
class="outer-class"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(xItem, index) in yItem"
|
v-for="(xItem, idx) in yItem"
|
||||||
:key="index+'x'"
|
:key="idx+'x'"
|
||||||
:style="classInfo"
|
:style="classInfo"
|
||||||
class="inner-class"
|
class="inner-class"
|
||||||
>
|
>
|
||||||
|
@ -68,16 +68,14 @@ import { uuid } from 'vue-uuid'
|
|||||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog'
|
|
||||||
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
|
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
|
||||||
import UserViewMobileDialog from '@/components/canvas/custom-component/UserViewMobileDialog'
|
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||||
import { hasDataPermission } from '@/utils/permission'
|
import { hasDataPermission } from '@/utils/permission'
|
||||||
const erd = elementResizeDetectorMaker()
|
const erd = elementResizeDetectorMaker()
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { UserViewMobileDialog, ComponentWrapper, UserViewDialog, CanvasOptBar },
|
components: { ComponentWrapper, CanvasOptBar },
|
||||||
model: {
|
model: {
|
||||||
prop: 'show',
|
prop: 'show',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
@ -142,10 +140,10 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
previewDomId: 'preview-'+this.canvasId,
|
previewDomId: 'preview-' + this.canvasId,
|
||||||
previewRefId: 'preview-ref-'+this.canvasId,
|
previewRefId: 'preview-ref-' + this.canvasId,
|
||||||
previewTempDomId: 'preview-temp-'+this.canvasId,
|
previewTempDomId: 'preview-temp-' + this.canvasId,
|
||||||
previewTempRefId: 'preview-temp-ref-'+this.canvasId,
|
previewTempRefId: 'preview-temp-ref-' + this.canvasId,
|
||||||
isShowPreview: false,
|
isShowPreview: false,
|
||||||
panelId: '',
|
panelId: '',
|
||||||
needToChangeHeight: [
|
needToChangeHeight: [
|
||||||
@ -441,7 +439,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比
|
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比
|
||||||
}
|
}
|
||||||
if(this.canvasId === 'canvas-main'){
|
if (this.canvasId === 'canvas-main') {
|
||||||
this.$store.commit('setPreviewCanvasScale', { scaleWidth: (this.scaleWidth / 100), scaleHeight: (this.scaleHeight / 100) })
|
this.$store.commit('setPreviewCanvasScale', { scaleWidth: (this.scaleWidth / 100), scaleHeight: (this.scaleHeight / 100) })
|
||||||
}
|
}
|
||||||
this.handleScaleChange()
|
this.handleScaleChange()
|
||||||
|
@ -46,11 +46,10 @@ import { uuid } from 'vue-uuid'
|
|||||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog'
|
|
||||||
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
|
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { ComponentWrapper, UserViewDialog, CanvasOptBar },
|
components: { ComponentWrapper, CanvasOptBar },
|
||||||
model: {
|
model: {
|
||||||
prop: 'show',
|
prop: 'show',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
|
@ -319,7 +319,10 @@
|
|||||||
style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;"
|
style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;"
|
||||||
>
|
>
|
||||||
<el-tooltip :content="$t('panel.data_format')">
|
<el-tooltip :content="$t('panel.data_format')">
|
||||||
<date-format :canvas-id="canvasId" :format-info="curComponent.formatInfo" />
|
<date-format
|
||||||
|
:canvas-id="canvasId"
|
||||||
|
:format-info="curComponent.formatInfo"
|
||||||
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -601,7 +604,7 @@ export default {
|
|||||||
showVertical() {
|
showVertical() {
|
||||||
return !['textSelectGridWidget', 'numberSelectGridWidget'].includes(this.curComponent.serviceName)
|
return !['textSelectGridWidget', 'numberSelectGridWidget'].includes(this.curComponent.serviceName)
|
||||||
},
|
},
|
||||||
curCanvasScaleSelf(){
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
|
@ -136,7 +136,6 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
|
|||||||
// 增加所属画布ID(canvasId)当前所在画布的父ID(canvasPid) 主画布ID为main-canvas, PID = 0 表示当前所属canvas为最顶层
|
// 增加所属画布ID(canvasId)当前所在画布的父ID(canvasPid) 主画布ID为main-canvas, PID = 0 表示当前所属canvas为最顶层
|
||||||
item.canvasId = (item.canvasId || 'canvas-main')
|
item.canvasId = (item.canvasId || 'canvas-main')
|
||||||
item.canvasPid = (item.canvasPid || '0')
|
item.canvasPid = (item.canvasPid || '0')
|
||||||
|
|
||||||
})
|
})
|
||||||
// 初始化密度为最高密度
|
// 初始化密度为最高密度
|
||||||
componentStyle.aidedDesign.matrixBase = 4
|
componentStyle.aidedDesign.matrixBase = 4
|
||||||
@ -149,7 +148,7 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
|
|||||||
export function resetID(data) {
|
export function resetID(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
item.type !== 'custom' && item.type !== 'de-tabs'&& (item.id = uuid.v1())
|
item.type !== 'custom' && item.type !== 'de-tabs' && (item.id = uuid.v1())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
@ -229,6 +228,6 @@ export function imgUrlTrans(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getNowCanvasComponentData(canvasId){
|
export function getNowCanvasComponentData(canvasId) {
|
||||||
return store.state.componentData.filter(item => item.canvasId===canvasId)
|
return store.state.componentData.filter(item => item.canvasId === canvasId)
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
:is="element.component"
|
:is="element.component"
|
||||||
v-if="element.type==='custom'"
|
v-if="element.type==='custom'"
|
||||||
:id="'component' + element.id"
|
:id="'component' + element.id"
|
||||||
:canvas-id="canvasId"
|
|
||||||
ref="deOutWidget"
|
ref="deOutWidget"
|
||||||
|
:canvas-id="canvasId"
|
||||||
class="component-custom"
|
class="component-custom"
|
||||||
:out-style="element.style"
|
:out-style="element.style"
|
||||||
:is-relation="isRelation"
|
:is-relation="isRelation"
|
||||||
@ -59,7 +59,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
|
||||||
import inputStyleMixin from '@/components/widget/DeWidget/inputStyleMixin'
|
import inputStyleMixin from '@/components/widget/DeWidget/inputStyleMixin'
|
||||||
export default {
|
export default {
|
||||||
name: 'DeOutWidget',
|
name: 'DeOutWidget',
|
||||||
|
@ -55,16 +55,16 @@
|
|||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</span>
|
</span>
|
||||||
<de-canvas-tab v-if="item.content && item.content.type==='canvas' && isEdit"
|
<de-canvas-tab
|
||||||
:ref="'canvasTabRef-'+item.name"
|
v-if="item.content && item.content.type==='canvas' && isEdit"
|
||||||
:parent-forbid="true"
|
:ref="'canvasTabRef-'+item.name"
|
||||||
:canvas-style-data="canvasStyleData"
|
:parent-forbid="true"
|
||||||
:component-data="tabCanvasComponentData(item.name)"
|
:canvas-style-data="canvasStyleData"
|
||||||
:canvas-id="element.id+'-'+item.name"
|
:component-data="tabCanvasComponentData(item.name)"
|
||||||
class="tab_canvas"
|
:canvas-id="element.id+'-'+item.name"
|
||||||
:class="moveActive ? 'canvas_move_in':''"
|
class="tab_canvas"
|
||||||
>
|
:class="moveActive ? 'canvas_move_in':''"
|
||||||
</de-canvas-tab>
|
/>
|
||||||
<div style="width: 100%;height:100%">
|
<div style="width: 100%;height:100%">
|
||||||
<Preview
|
<Preview
|
||||||
v-if="item.content && item.content.type==='canvas' && !isEdit"
|
v-if="item.content && item.content.type==='canvas' && !isEdit"
|
||||||
@ -521,7 +521,7 @@ export default {
|
|||||||
name: curName,
|
name: curName,
|
||||||
content: { type: 'canvas' }
|
content: { type: 'canvas' }
|
||||||
}
|
}
|
||||||
//的Tab都是画布
|
// 的Tab都是画布
|
||||||
|
|
||||||
this.element.options.tabList.push(tab)
|
this.element.options.tabList.push(tab)
|
||||||
|
|
||||||
|
@ -912,6 +912,9 @@ export default {
|
|||||||
password_input_error: 'Original password input error'
|
password_input_error: 'Original password input error'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
solid_color: 'Solid color',
|
||||||
|
split_gradient: 'Split gradient',
|
||||||
|
continuous_gradient: 'Continuous gradient',
|
||||||
map_center_lost: 'The graph is missing the centroid or center attribute, please complete it and try again',
|
map_center_lost: 'The graph is missing the centroid or center attribute, please complete it and try again',
|
||||||
margin_model: 'Model',
|
margin_model: 'Model',
|
||||||
margin_model_auto: 'Auto',
|
margin_model_auto: 'Auto',
|
||||||
@ -1485,6 +1488,7 @@ export default {
|
|||||||
field_origin_name: 'Field Origin Name',
|
field_origin_name: 'Field Origin Name',
|
||||||
field_check: 'Selected',
|
field_check: 'Selected',
|
||||||
update_info: 'Update Info',
|
update_info: 'Update Info',
|
||||||
|
update_records: 'Update Records',
|
||||||
join_view: 'Data Associated',
|
join_view: 'Data Associated',
|
||||||
text: 'Text',
|
text: 'Text',
|
||||||
time: 'Time',
|
time: 'Time',
|
||||||
|
@ -912,6 +912,9 @@ export default {
|
|||||||
password_input_error: '原始密碼輸入錯誤'
|
password_input_error: '原始密碼輸入錯誤'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
solid_color: '純色',
|
||||||
|
split_gradient: '分離漸變',
|
||||||
|
continuous_gradient: '連續漸變',
|
||||||
map_center_lost: '圖形缺失中心點centroid或center屬性,請補全後再試',
|
map_center_lost: '圖形缺失中心點centroid或center屬性,請補全後再試',
|
||||||
margin_model: '模式',
|
margin_model: '模式',
|
||||||
margin_model_auto: '自動',
|
margin_model_auto: '自動',
|
||||||
@ -1485,6 +1488,7 @@ export default {
|
|||||||
field_origin_name: '原始名稱',
|
field_origin_name: '原始名稱',
|
||||||
field_check: '選中',
|
field_check: '選中',
|
||||||
update_info: '更新信息',
|
update_info: '更新信息',
|
||||||
|
update_records: '更新記錄',
|
||||||
join_view: '數據關聯',
|
join_view: '數據關聯',
|
||||||
text: '文本',
|
text: '文本',
|
||||||
time: '時間',
|
time: '時間',
|
||||||
|
@ -911,6 +911,9 @@ export default {
|
|||||||
password_input_error: '原始密码输入错误'
|
password_input_error: '原始密码输入错误'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
solid_color: '纯色',
|
||||||
|
split_gradient: '分离渐变',
|
||||||
|
continuous_gradient: '连续渐变',
|
||||||
map_center_lost: '图形缺失中心点centroid或center属性,请补全后再试',
|
map_center_lost: '图形缺失中心点centroid或center属性,请补全后再试',
|
||||||
margin_model: '模式',
|
margin_model: '模式',
|
||||||
margin_model_auto: '自动',
|
margin_model_auto: '自动',
|
||||||
@ -1484,6 +1487,7 @@ export default {
|
|||||||
field_origin_name: '原始名称',
|
field_origin_name: '原始名称',
|
||||||
field_check: '选中',
|
field_check: '选中',
|
||||||
update_info: '更新信息',
|
update_info: '更新信息',
|
||||||
|
update_records: '更新记录',
|
||||||
join_view: '数据关联',
|
join_view: '数据关联',
|
||||||
text: '文本',
|
text: '文本',
|
||||||
time: '时间',
|
time: '时间',
|
||||||
|
@ -290,7 +290,7 @@ const data = {
|
|||||||
const filterComponentId = condition.componentId
|
const filterComponentId = condition.componentId
|
||||||
const canvasId = data.canvasId
|
const canvasId = data.canvasId
|
||||||
|
|
||||||
//过滤时 主画布的过滤组件可以过滤所有的视图
|
// 过滤时 主画布的过滤组件可以过滤所有的视图
|
||||||
const canvasViewIds = state.componentData.filter(item => item.type === 'view' && (canvasId === 'canvas-main' || item.canvasId === canvasId)).map((itemView) => {
|
const canvasViewIds = state.componentData.filter(item => item.type === 'view' && (canvasId === 'canvas-main' || item.canvasId === canvasId)).map((itemView) => {
|
||||||
return itemView.propValue.viewId
|
return itemView.propValue.viewId
|
||||||
})
|
})
|
||||||
@ -492,7 +492,7 @@ const data = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteComponent(state) {
|
deleteComponent(state) {
|
||||||
this.commit('deleteComponentWithId',state.curComponent.id)
|
this.commit('deleteComponentWithId', state.curComponent.id)
|
||||||
},
|
},
|
||||||
setLinkageInfo(state, targetLinkageInfo) {
|
setLinkageInfo(state, targetLinkageInfo) {
|
||||||
state.linkageSettingStatus = true
|
state.linkageSettingStatus = true
|
||||||
|
@ -385,6 +385,10 @@ export default {
|
|||||||
this.editCompare()
|
this.editCompare()
|
||||||
break
|
break
|
||||||
case 'percent':
|
case 'percent':
|
||||||
|
// 选择占比,自动将数值格式设置为百分比并保留2位小数
|
||||||
|
this.item.formatterCfg.type = 'percent'
|
||||||
|
this.item.formatterCfg.decimalCount = 2
|
||||||
|
|
||||||
this.item.compareCalc.type = 'percent'
|
this.item.compareCalc.type = 'percent'
|
||||||
this.$emit('onQuotaItemChange', this.item)
|
this.$emit('onQuotaItemChange', this.item)
|
||||||
break
|
break
|
||||||
|
@ -382,6 +382,10 @@ export default {
|
|||||||
this.editCompare()
|
this.editCompare()
|
||||||
break
|
break
|
||||||
case 'percent':
|
case 'percent':
|
||||||
|
// 选择占比,自动将数值格式设置为百分比并保留2位小数
|
||||||
|
this.item.formatterCfg.type = 'percent'
|
||||||
|
this.item.formatterCfg.decimalCount = 2
|
||||||
|
|
||||||
this.item.compareCalc.type = 'percent'
|
this.item.compareCalc.type = 'percent'
|
||||||
this.$emit('onQuotaItemChange', this.item)
|
this.$emit('onQuotaItemChange', this.item)
|
||||||
break
|
break
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
style="overflow:auto;border-right: 1px solid #e6e6e6;height: 100%;width: 100%;padding-right: 6px"
|
style="overflow:auto;border-right: 1px solid #e6e6e6;height: 100%;width: 100%;padding-right: 6px"
|
||||||
class="attr-style theme-border-class"
|
class="attr-style theme-border-class"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row class="de-collapse-style">
|
||||||
<span class="padding-lr">{{ $t('chart.shape_attr') }}</span>
|
<span class="padding-lr">{{ $t('chart.shape_attr') }}</span>
|
||||||
<el-collapse
|
<el-collapse
|
||||||
v-model="attrActiveNames"
|
v-model="attrActiveNames"
|
||||||
@ -475,6 +475,15 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
.de-collapse-style {
|
||||||
|
.el-collapse-item__header {
|
||||||
|
height: 34px !important;
|
||||||
|
line-height: 34px !important;
|
||||||
|
padding: 0 0 0 6px !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.padding-lr {
|
.padding-lr {
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,6 @@
|
|||||||
{{ $t('deDataset.data_reference') }}
|
{{ $t('deDataset.data_reference') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="mode === '1'"
|
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
style="color: #1f2329"
|
style="color: #1f2329"
|
||||||
@ -1049,7 +1048,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table-sql {
|
.table-sql {
|
||||||
height: calc(100% - 64px);
|
height: calc(100% - 54px);
|
||||||
padding: 18px 25px;
|
padding: 18px 25px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -125,18 +125,26 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-if="
|
v-if="
|
||||||
table.mode === 1 && ['api', 'sql', 'db', 'excel'].includes(table.type)
|
table.mode === 1 && ['api', 'sql', 'db'].includes(table.type)
|
||||||
"
|
"
|
||||||
:label="$t('dataset.update_info')"
|
:label="$t('dataset.update_info')"
|
||||||
name="updateInfo"
|
name="updateInfo"
|
||||||
>
|
>
|
||||||
<update-info
|
<update-info
|
||||||
v-if="tabActive == 'updateInfo' && table.type !== 'excel'"
|
v-if="tabActive == 'updateInfo'"
|
||||||
:param="param"
|
:param="param"
|
||||||
:table="table"
|
:table="table"
|
||||||
/>
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane
|
||||||
|
v-if="
|
||||||
|
table.mode === 1 && ['excel'].includes(table.type)
|
||||||
|
"
|
||||||
|
:label="$t('dataset.update_records')"
|
||||||
|
name="updateInfo"
|
||||||
|
>
|
||||||
<update-records
|
<update-records
|
||||||
v-if="tabActive == 'updateInfo' && table.type === 'excel'"
|
v-if="tabActive == 'updateInfo'"
|
||||||
:param="param"
|
:param="param"
|
||||||
:table="table"
|
:table="table"
|
||||||
/>
|
/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-col style="height: 100%">
|
<el-col style="height: 100%">
|
||||||
<el-empty
|
<el-empty
|
||||||
style="padding-top: 212px"
|
style="padding-top: 202px"
|
||||||
:image-size="125"
|
:image-size="125"
|
||||||
:image="errImg"
|
:image="errImg"
|
||||||
:description="$t('deDataset.on_the_left')"
|
:description="$t('deDataset.on_the_left')"
|
||||||
|
@ -1300,6 +1300,11 @@ export default {
|
|||||||
background: rgba(31, 35, 41, 0.1);
|
background: rgba(31, 35, 41, 0.1);
|
||||||
color: var(--deTextPrimary, #1f2329);
|
color: var(--deTextPrimary, #1f2329);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.is-disabled {
|
||||||
|
background: #BBBFC4;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.de-top-border {
|
.de-top-border {
|
||||||
border-top: 1px solid rgba(31, 35, 41, 0.15);
|
border-top: 1px solid rgba(31, 35, 41, 0.15);
|
||||||
|
@ -407,8 +407,8 @@ import 'codemirror/addon/hint/show-hint'
|
|||||||
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { codemirror, draggable },
|
|
||||||
name: 'LinkJumpSet',
|
name: 'LinkJumpSet',
|
||||||
|
components: { codemirror, draggable },
|
||||||
props: {
|
props: {
|
||||||
viewId: {
|
viewId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -161,21 +161,25 @@
|
|||||||
:modal-append-to-body="true"
|
:modal-append-to-body="true"
|
||||||
>
|
>
|
||||||
<div style="width: 295px">
|
<div style="width: 295px">
|
||||||
<filter-group :canvas-id="canvasId" v-show=" show &&showIndex===1"/>
|
<filter-group
|
||||||
<subject-setting v-show=" show &&showIndex===2"/>
|
v-show=" show &&showIndex===1"
|
||||||
<assist-component v-show=" show &&showIndex===3"/>
|
:canvas-id="canvasId"
|
||||||
|
/>
|
||||||
|
<subject-setting v-show=" show &&showIndex===2" />
|
||||||
|
<assist-component v-show=" show &&showIndex===3" />
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!--PC端画布区域-->
|
<!--PC端画布区域-->
|
||||||
<de-canvas v-if="!previewVisible&&!mobileLayoutStatus"
|
<de-canvas
|
||||||
class="canvas_main_content"
|
v-if="!previewVisible&&!mobileLayoutStatus"
|
||||||
ref="canvasMainRef"
|
ref="canvasMainRef"
|
||||||
:canvas-style-data="canvasStyleData"
|
class="canvas_main_content"
|
||||||
:component-data="mainCanvasComponentData"
|
:canvas-style-data="canvasStyleData"
|
||||||
:canvas-id="canvasId"
|
:component-data="mainCanvasComponentData"
|
||||||
:canvas-pid="'0'"
|
:canvas-id="canvasId"
|
||||||
|
:canvas-pid="'0'"
|
||||||
>
|
>
|
||||||
<canvas-opt-bar slot="optBar"/>
|
<canvas-opt-bar slot="optBar" />
|
||||||
</de-canvas>
|
</de-canvas>
|
||||||
<!--移动端画布区域 保持宽高比2.5-->
|
<!--移动端画布区域 保持宽高比2.5-->
|
||||||
<el-row
|
<el-row
|
||||||
@ -191,7 +195,7 @@
|
|||||||
:style="customCanvasMobileStyle"
|
:style="customCanvasMobileStyle"
|
||||||
class="this_mobile_canvas"
|
class="this_mobile_canvas"
|
||||||
>
|
>
|
||||||
<el-row class="this_mobile_canvas_top"/>
|
<el-row class="this_mobile_canvas_top" />
|
||||||
<el-row class="this_mobile_canvas_inner_top">
|
<el-row class="this_mobile_canvas_inner_top">
|
||||||
{{ panelInfo.name }}
|
{{ panelInfo.name }}
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -200,15 +204,16 @@
|
|||||||
class="this_mobile_canvas_main"
|
class="this_mobile_canvas_main"
|
||||||
:style="mobileCanvasStyle"
|
:style="mobileCanvasStyle"
|
||||||
>
|
>
|
||||||
<de-canvas v-if="!previewVisible&&mobileLayoutStatus"
|
<de-canvas
|
||||||
ref="canvasMainRef"
|
v-if="!previewVisible&&mobileLayoutStatus"
|
||||||
:canvas-style-data="canvasStyleData"
|
ref="canvasMainRef"
|
||||||
:component-data="mainCanvasComponentData"
|
:canvas-style-data="canvasStyleData"
|
||||||
:canvas-id="canvasId"
|
:component-data="mainCanvasComponentData"
|
||||||
:canvas-pid="'0'"
|
:canvas-id="canvasId"
|
||||||
:mobile-layout-status="true"
|
:canvas-pid="'0'"
|
||||||
|
:mobile-layout-status="true"
|
||||||
>
|
>
|
||||||
<canvas-opt-bar slot="optBar"/>
|
<canvas-opt-bar slot="optBar" />
|
||||||
</de-canvas>
|
</de-canvas>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="this_mobile_canvas_inner_bottom">
|
<el-row class="this_mobile_canvas_inner_bottom">
|
||||||
@ -238,7 +243,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="this_mobile_canvas_bottom"/>
|
<el-row class="this_mobile_canvas_bottom" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col
|
<el-col
|
||||||
@ -246,7 +251,7 @@
|
|||||||
class="this_mobile_canvas_cell this_mobile_canvas_wait_cell"
|
class="this_mobile_canvas_cell this_mobile_canvas_wait_cell"
|
||||||
:style="mobileCanvasStyle"
|
:style="mobileCanvasStyle"
|
||||||
>
|
>
|
||||||
<component-wait/>
|
<component-wait />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
@ -264,7 +269,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="showBatchViewToolsAside">
|
<div v-if="showBatchViewToolsAside">
|
||||||
<chart-style-batch-set/>
|
<chart-style-batch-set />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!showViewToolsAside&&!showBatchViewToolsAside">
|
<div v-if="!showViewToolsAside&&!showBatchViewToolsAside">
|
||||||
<el-row style="height: 40px">
|
<el-row style="height: 40px">
|
||||||
@ -280,8 +285,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="view-selected-message-class">
|
<div class="view-selected-message-class">
|
||||||
<span style="font-size: 14px;margin-left: 10px;font-weight: bold;line-height: 20px"
|
<span style="font-size: 14px;margin-left: 10px;font-weight: bold;line-height: 20px">{{ $t('panel.select_view') }}</span>
|
||||||
>{{ $t('panel.select_view') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -441,8 +445,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="21">
|
<el-col :span="21">
|
||||||
<span style="font-size: 13px;margin-left: 10px;font-weight: bold;line-height: 20px"
|
<span style="font-size: 13px;margin-left: 10px;font-weight: bold;line-height: 20px">{{ $t('panel.panel_cache_use_tips') }}</span>
|
||||||
>{{ $t('panel.panel_cache_use_tips') }}</span>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div
|
<div
|
||||||
@ -474,7 +477,6 @@ import { addClass, removeClass } from '@/utils'
|
|||||||
import FilterGroup from '../filter'
|
import FilterGroup from '../filter'
|
||||||
import SubjectSetting from '../SubjectSetting'
|
import SubjectSetting from '../SubjectSetting'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import Editor from '@/components/canvas/components/Editor/index'
|
|
||||||
import { deepCopy, getNowCanvasComponentData, imgUrlTrans, matrixBaseChange } from '@/components/canvas/utils/utils'
|
import { deepCopy, getNowCanvasComponentData, imgUrlTrans, matrixBaseChange } from '@/components/canvas/utils/utils'
|
||||||
import componentList, {
|
import componentList, {
|
||||||
BASE_MOBILE_STYLE,
|
BASE_MOBILE_STYLE,
|
||||||
@ -507,7 +509,6 @@ import ButtonResetDialog from '../filter/ButtonResetDialog'
|
|||||||
import toast from '@/components/canvas/utils/toast'
|
import toast from '@/components/canvas/utils/toast'
|
||||||
import { commonAttr } from '@/components/canvas/custom-component/component-list'
|
import { commonAttr } from '@/components/canvas/custom-component/component-list'
|
||||||
import generateID from '@/components/canvas/utils/generateID'
|
import generateID from '@/components/canvas/utils/generateID'
|
||||||
import TextAttr from '@/components/canvas/components/TextAttr'
|
|
||||||
import ComponentWait from '@/views/panel/edit/ComponentWait'
|
import ComponentWait from '@/views/panel/edit/ComponentWait'
|
||||||
import { deleteEnshrine, saveEnshrine, starStatus } from '@/api/panel/enshrine'
|
import { deleteEnshrine, saveEnshrine, starStatus } from '@/api/panel/enshrine'
|
||||||
import ChartEdit from '@/views/chart/view/ChartEdit'
|
import ChartEdit from '@/views/chart/view/ChartEdit'
|
||||||
@ -517,14 +518,12 @@ import Multiplexing from '@/views/panel/ViewSelect/multiplexing'
|
|||||||
import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
|
import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
|
||||||
import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style'
|
import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import DeEditor from '@/components/canvas/components/Editor/DeEditor'
|
|
||||||
import DeCanvas from '@/components/canvas/DeCanvas'
|
import DeCanvas from '@/components/canvas/DeCanvas'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PanelEdit',
|
name: 'PanelEdit',
|
||||||
components: {
|
components: {
|
||||||
DeCanvas,
|
DeCanvas,
|
||||||
DeEditor,
|
|
||||||
Multiplexing,
|
Multiplexing,
|
||||||
ChartStyleBatchSet,
|
ChartStyleBatchSet,
|
||||||
OuterParamsSet,
|
OuterParamsSet,
|
||||||
@ -533,7 +532,6 @@ export default {
|
|||||||
DeContainer,
|
DeContainer,
|
||||||
DeAsideContainer,
|
DeAsideContainer,
|
||||||
FilterGroup,
|
FilterGroup,
|
||||||
Editor,
|
|
||||||
Toolbar,
|
Toolbar,
|
||||||
FilterDialog,
|
FilterDialog,
|
||||||
ButtonDialog,
|
ButtonDialog,
|
||||||
@ -541,7 +539,6 @@ export default {
|
|||||||
SubjectSetting,
|
SubjectSetting,
|
||||||
Preview,
|
Preview,
|
||||||
AssistComponent,
|
AssistComponent,
|
||||||
TextAttr,
|
|
||||||
ChartGroup,
|
ChartGroup,
|
||||||
ChartEdit,
|
ChartEdit,
|
||||||
CanvasOptBar
|
CanvasOptBar
|
||||||
@ -935,11 +932,11 @@ export default {
|
|||||||
showPanel(type) {
|
showPanel(type) {
|
||||||
if (this.showIndex === -1 || this.showIndex === type) {
|
if (this.showIndex === -1 || this.showIndex === type) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.showIndex === -1
|
this.showIndex === -1
|
||||||
}
|
|
||||||
this.show = !this.show
|
|
||||||
}
|
}
|
||||||
|
this.show = !this.show
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.showIndex = type
|
this.showIndex = type
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
|||||||
'curCanvasScaleMap',
|
'curCanvasScaleMap',
|
||||||
'componentData'
|
'componentData'
|
||||||
]),
|
]),
|
||||||
curCanvasScaleSelf(){
|
curCanvasScaleSelf() {
|
||||||
return this.curCanvasScaleMap[this.canvasId]
|
return this.curCanvasScaleMap[this.canvasId]
|
||||||
},
|
},
|
||||||
searchButtonExist() {
|
searchButtonExist() {
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="data.nodeType === 'folder'">
|
<span v-if="data.nodeType === 'folder'">
|
||||||
<i class="el-icon-folder" />
|
<svg-icon icon-class="scene" />
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
:class="data.status"
|
:class="data.status"
|
||||||
@ -198,7 +198,7 @@
|
|||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:command="beforeClickEdit('folder', 'new', data, node)"
|
:command="beforeClickEdit('folder', 'new', data, node)"
|
||||||
>
|
>
|
||||||
<i class="el-icon-folder" />
|
<svg-icon icon-class="scene" />
|
||||||
<span>{{ $t('panel.groupAdd') }}</span>
|
<span>{{ $t('panel.groupAdd') }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
@ -144,7 +144,7 @@ export default {
|
|||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.el-empty {
|
.el-empty {
|
||||||
height: 100%;
|
padding-top: 202px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ms-aside-container {
|
.ms-aside-container {
|
||||||
|
Loading…
Reference in New Issue
Block a user