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