refactor: 优化代码结构去掉无用的注释

This commit is contained in:
wangjiahao 2022-06-16 18:29:30 +08:00
parent 7673e58088
commit 3b64979625
61 changed files with 271 additions and 823 deletions

View File

@ -14,6 +14,7 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.util.*;
@ -24,14 +25,13 @@ import java.util.stream.Collectors;
public class DePermissionAnnotationHandler {
@Around(value = "@annotation(io.dataease.auth.annotation.DePermissions)")
public Object PermissionsAround(ProceedingJoinPoint point) throws Throwable{
public Object PermissionsAround(ProceedingJoinPoint point) throws Throwable {
if (AuthUtils.getUser().getIsAdmin()) {
return point.proceed(point.getArgs());
}
Boolean access = false;
try {
MethodSignature ms = (MethodSignature) point.getSignature();
Method method = ms.getMethod();
DePermissions annotation = method.getAnnotation(DePermissions.class);
@ -66,17 +66,15 @@ public class DePermissionAnnotationHandler {
throw exceptions.get(0);
}
}
} catch (Throwable throwable) {
LogUtil.error(throwable.getMessage(), throwable);
throw new RuntimeException(throwable.getMessage());
}
return access ? point.proceed(point.getArgs()) : null;
}
@Around(value = "@annotation(io.dataease.auth.annotation.DePermission)")
public Object PermissionAround(ProceedingJoinPoint point) throws Throwable{
public Object PermissionAround(ProceedingJoinPoint point) throws Throwable {
Boolean access = false;
try {
if (AuthUtils.getUser().getIsAdmin()) {
@ -84,7 +82,6 @@ public class DePermissionAnnotationHandler {
}
MethodSignature ms = (MethodSignature) point.getSignature();
Method method = ms.getMethod();
DePermission annotation = method.getAnnotation(DePermission.class);
Object arg = point.getArgs()[annotation.paramIndex()];
if (access(arg, annotation, 0)) {
@ -94,7 +91,6 @@ public class DePermissionAnnotationHandler {
LogUtil.error(throwable.getMessage(), throwable);
throw new RuntimeException(throwable.getMessage());
}
return access ? point.proceed(point.getArgs()) : null;
}
@ -104,10 +100,8 @@ public class DePermissionAnnotationHandler {
String type = annotation.type().name().toLowerCase();
String value = annotation.value();
Integer requireLevel = annotation.level().getLevel();
Set<String> resourceIds = AuthUtils.permissionByType(type).stream().filter(
item -> item.getLevel() >= requireLevel).map(AuthItem::getAuthSource).collect(Collectors.toSet());
Class<?> parameterType = arg.getClass();
if (parameterType.isPrimitive() || ReflectUtil.isWrapClass(parameterType) || ReflectUtil.isString(parameterType)) {
boolean permissionValid = resourceIds.contains(arg);
@ -122,7 +116,6 @@ public class DePermissionAnnotationHandler {
return false;
}
}
} else if (ReflectUtil.isCollection(parameterType)) {
Object[] array = ((Collection) arg).toArray();
for (int i = 0; i < array.length; i++) {
@ -140,14 +133,10 @@ public class DePermissionAnnotationHandler {
// 当作自定义类处理
String[] values = value.split("\\.");
String fieldName = values[layer];
Object fieldValue = ReflectUtil.getFieldValue(arg, fieldName);
return access(fieldValue, annotation, ++layer);
}
return true;
}
}

View File

@ -35,21 +35,13 @@ public class DePermissionProxyHandler {
Object[] args = point.getArgs();
if (null == args || args.length == 0) {
return point.proceed(args);
}
Object arg = point.getArgs()[annotation.paramIndex()];
/*
* if (arg instanceof PermissionProxy) {
* PermissionProxy proxy = (PermissionProxy) arg;
* AuthUtils.setProxyUser(proxy.getUserId());
* }
*/
PermissionProxy proxy = getProxy(arg, annotation, 0);
if (null != proxy && null != proxy.getUserId()) {
AuthUtils.setProxyUser(proxy.getUserId());
}
return point.proceed(args);
} catch (Throwable throwable) {
LogUtil.error(throwable.getMessage(), throwable);
/* throw new RuntimeException(throwable.getMessage()); */
@ -69,26 +61,8 @@ public class DePermissionProxyHandler {
if (arg instanceof PermissionProxy) {
return (PermissionProxy) arg;
} else if (isArray(parameterType)) {
/*
* for (int i = 0; i < Array.getLength(arg); i++) {
* Object o = Array.get(arg, i);
* if ((result = getProxy(o, annotation, layer)) != null) {
* return result;
* }
* }
*/
return null;
} else if (isCollection(parameterType)) {
/*
* Object[] array = ((Collection) arg).toArray();
* for (int i = 0; i < array.length; i++) {
* Object o = array[i];
* if ((result = getProxy(o, annotation, layer)) != null) {
* return result;
* }
* }
*/
return null;
} else if (isMap(parameterType)) {
Map<String, Object> argMap = (Map) arg;
@ -99,10 +73,8 @@ public class DePermissionProxyHandler {
// 当作自定义类处理
String[] values = value.split("\\.");
String fieldName = values[layer];
Object fieldValue = getFieldValue(arg, fieldName);
return getProxy(fieldValue, annotation, ++layer);
}
}

View File

@ -16,8 +16,6 @@ public class SqlFilter implements Filter {
@Override
public void destroy() {
// TODO Auto-generated method stub
}
@Override
@ -43,9 +41,7 @@ public class SqlFilter implements Filter {
if (xssRequest.checkXSSAndSql(param)) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json;charset=UTF-8");
// PrintWriter out = response.getWriter();
String msg = ThreadLocalContextHolder.getData().toString();
// out.write(msg);
DEException.throwException(msg);
return;
}
@ -54,9 +50,7 @@ public class SqlFilter implements Filter {
if (xssRequest.checkParameter()) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json;charset=UTF-8");
// PrintWriter out = response.getWriter();
String msg = ThreadLocalContextHolder.getData().toString();
// out.write(msg);
DEException.throwException(msg);
return;
}

View File

@ -243,22 +243,12 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
ThreadLocalContextHolder.setData("包含SQL注入的参数请检查参数");
return true;
}
// NOTE: It's highly recommended to use the ESAPI library and
// uncomment the following line to
// avoid encoded attacks.
// value = ESAPI.encoder().canonicalize(value);
// Avoid null characters
/** value = value.replaceAll("", ""); ***/
// Avoid anything between script tags
Pattern scriptPattern = Pattern.compile(
"<[\r\n| | ]*script[\r\n| | ]*>(.*?)</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);
flag = scriptPattern.matcher(value).find();
if (flag) {
return flag;
}
// Avoid anything in a
// src="http://www.yihaomen.com/article/java/..." type of
// e-xpression
scriptPattern = Pattern.compile("src[\r\n| | ]*=[\r\n| | ]*[\\\"|\\\'](.*?)[\\\"|\\\']",
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
flag = scriptPattern.matcher(value).find();

View File

@ -1,14 +1,7 @@
package io.dataease.controller.panel;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.plugins.common.base.domain.PanelGroup;
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
import io.dataease.controller.handler.annotation.I18n;
import io.dataease.controller.request.panel.PanelGroupRequest;
import io.dataease.dto.chart.ChartViewDTO;
import io.dataease.dto.panel.PanelGroupDTO;
import io.dataease.dto.panel.PanelViewTableDTO;
import io.dataease.service.panel.PanelGroupService;
import io.dataease.service.panel.PanelViewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@ -50,9 +50,4 @@ public class SysPluginController {
return pluginService.uninstall(pluginId);
}
// @ApiOperation("切换插件状态")
// @PostMapping("/changeStatus")
// public Boolean changeStatus(@RequestBody PluginStatus pluginStatus) {
// return pluginService.changeStatus(pluginStatus.getPluginId(), pluginStatus.getStatus());
// }
}

View File

@ -12,8 +12,6 @@ import java.util.List;
public interface ExtChartViewMapper {
List<ChartViewDTO> search(ChartViewRequest request);
// ChartViewDTO searchOne(ChartViewRequest request);
void chartCopy(@Param("newChartId")String newChartId,@Param("oldChartId")String oldChartId,@Param("panelId")String panelId);
@Select("select id from chart_view where table_id = #{tableId}")
@ -35,8 +33,6 @@ public interface ExtChartViewMapper {
List<ChartViewDTO> searchViewsWithPanelId(@Param("panelId") String panelId);
// ChartViewDTO searchOneFromCache(@Param("id") String id );
void copyToCache(@Param("id") String id );
void deleteCacheWithPanel(@Param("viewIds") List<String> viewIds,@Param("panelId") String panelId );

View File

@ -91,9 +91,6 @@
<if test="level != null">
and panel_group.level = #{level}
</if>
<!-- <if test="isAdmin != null and !isAdmin">-->
<!-- and (panel_group.node_type='folder' or (panel_group.node_type='panel' and panel_group.`status`='publish') or (panel_group.node_type='panel' and panel_group.`status`='unpublished' and authInfo.privileges like '%manage%') )-->
<!-- </if>-->
</where>
ORDER BY CONVERT(panel_group.name using gbk)
</select>
@ -170,9 +167,6 @@
<if test="level != null">
and panel_group.level = #{level}
</if>
<!-- <if test="isAdmin != null and !isAdmin">-->
<!-- and (panel_group.node_type='folder' or (panel_group.node_type='panel' and panel_group.`status`='publish') or (panel_group.node_type='panel' and panel_group.`status`='unpublished' and authInfo.privileges like '%manage%') )-->
<!-- </if>-->
</where>
ORDER BY panel_group.node_type desc, CONVERT(panel_group.name using gbk)
</select>

View File

@ -222,22 +222,16 @@ public class PanelGroupService {
//清理view view cache
extPanelGroupMapper.deleteCircleView(id);
extPanelGroupMapper.deleteCircleViewCache(id);
// 同时会删除对应默认仪表盘
extPanelGroupMapper.deleteCircle(id);
storeService.removeByPanelId(id);
shareService.delete(id, null);
panelLinkService.deleteByResourceId(id);
//清理跳转信息
extPanelLinkJumpMapper.deleteJumpTargetViewInfoWithPanel(id);
extPanelLinkJumpMapper.deleteJumpInfoWithPanel(id);
extPanelLinkJumpMapper.deleteJumpWithPanel(id);
DeLogUtils.save(sysLogDTO);
}
@ -285,7 +279,6 @@ public class PanelGroupService {
List<String> panelIds = panelResult.stream().map(VAuthModelDTO::getId).collect(Collectors.toList());
VAuthModelRequest viewRequest = new VAuthModelRequest();
viewRequest.setPids(panelIds);
// Version 1.11 only gets the current panel
List<VAuthModelDTO> viewResult = extVAuthModelMapper.queryAuthModelViews(viewRequest);
if (CollectionUtils.isNotEmpty(viewResult)) {
result.addAll(viewResult);
@ -316,10 +309,6 @@ public class PanelGroupService {
VAuthModelRequest viewRequest = new VAuthModelRequest();
viewRequest.setPids(panelIds);
// Version 1.11 only gets the current panel
// List<VAuthModelDTO> viewResult = extVAuthModelMapper.queryAuthModelViews(viewRequest);
// if (CollectionUtils.isNotEmpty(viewResult)) {
// result.addAll(viewResult);
// }
result = TreeUtils.mergeTree(result, "panel_list");
if (AuthUtils.getUser().getIsAdmin()) {
// 原有视图的目录结构

View File

@ -125,7 +125,6 @@ public class PanelViewService {
extPanelViewMapper.savePanelView(panelViewInsertDTOList);
//将视图从cache表中更新到正式表中
viewIds = panelViewInsertDTOList.stream().map(panelView -> panelView.getChartViewId()).collect(Collectors.toList());
// extChartViewMapper.copyCacheToView(viewIds);
}
extChartViewMapper.deleteCacheWithPanel(viewIds, panelId);
extChartViewMapper.deleteNoUseView(viewIds, panelId);

View File

@ -54,7 +54,7 @@ public class ShareService {
* 5.批量新增
* 6.发送取消分享消息
* 7.发送新增分享消息
*
*
* @param panelShareFineDto
*/
@Transactional
@ -72,12 +72,6 @@ public class ShareService {
authURDMap.put(0, authURD.getUserIds());
authURDMap.put(1, authURD.getRoleIds());
authURDMap.put(2, authURD.getDeptIds());
/*
* PanelShareExample example = new PanelShareExample();
* example.createCriteria().andPanelGroupIdEqualTo(panelGroupId);
* List<PanelShare> panelShares = mapper.selectByExample(example);
*/
PanelShareSearchRequest request = new PanelShareSearchRequest();
request.setCurrentUserName(AuthUtils.getUser().getUsername());
request.setResourceId(panelGroupId);
@ -322,7 +316,7 @@ public class ShareService {
/**
* panel_group_id建了索引 效率不会很差
*
*
* @param panel_group_id
*/
@Transactional

View File

@ -47,11 +47,6 @@ public class LogService {
// 驱动文件操作 上传 删除
private static Integer[] driver_file_ope = {11, 3};
// 排除驱动和驱动文件的公共操作的资源类型
// 暂时屏蔽视图日志
// private static Integer[] COMMON_SOURCE = {1, 2,3,4,6,7,8,9};
private static Integer[] COMMON_SOURCE = {1, 2, 3, 6, 7, 8, 9};
// 针对公共资源的操作

View File

@ -25,6 +25,5 @@ public class PrincipalHandshakeHandler extends DefaultHandshakeHandler {
return new DePrincipal(userId);
}
return null;
//return super.determineUser(request, wsHandler, attributes);
}
}

View File

@ -37,10 +37,5 @@ public class WsUtil {
return ONLINE_USERS.contains(userId);
}
/*public static void releaseMessage(WsMessage wsMessage){
if(ObjectUtils.isEmpty(wsMessage) || ObjectUtils.isEmpty(wsMessage.getUserId()) || ObjectUtils.isEmpty(wsMessage.getTopic())) return;
CommonBeanFactory.getBean()
}*/
}

View File

@ -8,14 +8,6 @@ export const areaMapping = () => {
})
}
// export function geoJson(areaCode) {
// return request({
// url: '/api/map/resourceFull/' + areaCode,
// method: 'get',
// loading: true
// })
// }
export function geoJson(areaCode) {
return request({
url: '/geo/' + areaCode + '_full.json',

View File

@ -17,35 +17,9 @@ export function loadTable(data) {
})
}
// export function addDept(data) {
// return request({
// url: '/api/dept/create',
// method: 'post',
// data
// })
// }
// export function delDept(ids) {
// return request({
// url: '/api/dept/delete',
// method: 'post',
// data: ids
// })
// }
// export function editDept(data) {
// return request({
// url: '/api/dept/update',
// method: 'post',
// data
// })
// }
export function treeByDeptId(deptId) {
return request({
url: '/api/dept/nodesByDeptId/' + deptId,
method: 'post'
})
}
// export default { addDept, delDept, editDept, getDeptTree, loadTable, treeByDeptId }

View File

@ -1,57 +0,0 @@
// import request from '@/utils/request'
// export function allRoles() {
// return request({
// url: '/api/user/all',
// method: 'post',
// loading: true
// })
// }
// export function roleGrid(pageIndex, pageSize, data) {
// return request({
// url: '/api/role/roleGrid/' + pageIndex + '/' + pageSize,
// method: 'post',
// data,
// loading: true
// })
// }
// export function delRole(pid) {
// return request({
// url: '/api/role/delete/' + pid,
// method: 'post'
// })
// }
// export function addRole(data) {
// return request({
// url: '/api/role/create',
// method: 'post',
// data
// })
// }
// export function editRole(data) {
// return request({
// url: '/api/role/update',
// method: 'post',
// data
// })
// }
// export function addRoleMenus(data) {
// return request({
// url: '/api/role/saveRolesMenus',
// method: 'post',
// data
// })
// }
// export function menuIds(roleId) {
// return request({
// url: '/api/role/menuIds/' + roleId,
// method: 'post'
// })
// }
// export default { addRole, editRole, delRole, roleGrid, allRoles, addRoleMenus, menuIds }

View File

@ -31,9 +31,24 @@
]"
:style="mainSlotStyle"
>
<edit-bar v-if="editBarShow" style="transform: translateZ(10px)" :active-model="'edit'" :element="element" @showViewDetails="showViewDetails" @amRemoveItem="amRemoveItem" @amAddItem="amAddItem" @resizeView="resizeView" @linkJumpSet="linkJumpSet" @boardSet="boardSet" />
<edit-bar
v-if="editBarShow"
style="transform: translateZ(10px)"
:active-model="'edit'"
:element="element"
@showViewDetails="showViewDetails"
@amRemoveItem="amRemoveItem"
@amAddItem="amAddItem"
@resizeView="resizeView"
@linkJumpSet="linkJumpSet"
@boardSet="boardSet"
/>
<mobile-check-bar v-if="mobileCheckBarShow" :element="element" @amRemoveItem="amRemoveItem" />
<div v-if="resizing" style="transform: translateZ(11px);position: absolute; z-index: 3" :style="resizeShadowStyle" />
<div
v-if="resizing"
style="transform: translateZ(11px);position: absolute; z-index: 3"
:style="resizeShadowStyle"
/>
<div
v-for="(handlei, indexi) in actualHandles"
:key="indexi"
@ -55,6 +70,7 @@
import { matchesSelectorToParentElements, getComputedSize, addEvent, removeEvent } from '../../utils/dom'
import { computeWidth, computeHeight, restrictToBounds, snapToGrid, rotatedPoint, getAngle } from '../../utils/fns'
import { events, userSelectNone, userSelectAuto } from './option.js'
let eventsFor = events.mouse
// private
@ -1782,7 +1798,7 @@ export default {
.vdr {
touch-action: none;
position: absolute;
transform-style:preserve-3d;
transform-style: preserve-3d;
border: 1px
}
@ -1794,30 +1810,39 @@ export default {
border-radius: 50%;
z-index: 2;
}
.handle-tl {
cursor: nw-resize;
}
.handle-tm {
cursor: n-resize;
}
.handle-tr {
cursor: ne-resize;
}
.handle-ml {
cursor: w-resize;
}
.handle-mr {
cursor: e-resize;
}
.handle-bl {
cursor: sw-resize;
}
.handle-bm {
cursor: s-resize;
}
.handle-br {
cursor: se-resize;
}
/* 新增 旋转控制柄 */
.handle-rot {
@ -1830,6 +1855,7 @@ export default {
text-indent: -9999px;
vertical-align: middle;
}
.handle-rot:before,
.handle-rot:after {
content: "";
@ -1839,6 +1865,7 @@ export default {
top: 50%;
transform: translate(-50%, -50%);
}
.handle-rot:before {
/* display: block; */
width: 1em;
@ -1847,6 +1874,7 @@ export default {
border-right-color: transparent;
border-radius: 50%;
}
.handle-rot:after {
width: 0px;
height: 0px;
@ -1862,29 +1890,30 @@ export default {
user-select: none;
}
.linkageSetting{
.linkageSetting {
opacity: 0.5;
}
.batchSetting{
.batchSetting {
opacity: 0.9;
}
.positionChange{
.positionChange {
transition: 0.2s
}
.de-drag-active{
.de-drag-active {
user-select: none;
}
.de-drag-active-inner{
.de-drag-active-inner {
outline: 1px solid #70c0ff;
}
.main-background{
overflow: hidden;
width: 100%;
height: 100%;
background-size: 100% 100% !important;
}
.main-background {
overflow: hidden;
width: 100%;
height: 100%;
background-size: 100% 100% !important;
}
</style>

View File

@ -1,7 +1,5 @@
<template>
<div class="main-shadow" style="z-index:-1" :style="styleInfo">
<!-- {{ curComponent }}-->
</div>
<div class="main-shadow" style="z-index:-1" :style="styleInfo" />
</template>
<script>
@ -31,7 +29,6 @@ export default {
width = this.dragComponentInfo.style.width
height = this.dragComponentInfo.style.height
}
} else {
// temp
// left = this.curComponent.style.left * this.curCanvasScale.scaleWidth / 100

View File

@ -6,14 +6,20 @@
{{ item.name }}<i class="el-icon-arrow-down el-icon--right" />
</el-tag>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="isSortWidget" :disabled="disabledSort" :command="beforeClickItem('none')">
<span class="de-sort-menu" :class="!disabledSort && (!sortNode || sortNode.sort === 'none') ? 'de-active-li': ''">{{ $t('chart.none') }}</span>
<span
class="de-sort-menu"
:class="!disabledSort && (!sortNode || sortNode.sort === 'none') ? 'de-active-li': ''"
>{{
$t('chart.none')
}}</span>
</el-dropdown-item>
<el-dropdown-item v-if="isSortWidget" :disabled="disabledSort" :command="beforeClickItem('asc')">
<span v-popover:popoverasc class="el-dropdown-link inner-dropdown-menu de-sort-menu" :class="!disabledSort && sortNode.sort === 'asc' ? 'de-active-li': ''">
<span
v-popover:popoverasc
class="el-dropdown-link inner-dropdown-menu de-sort-menu"
:class="!disabledSort && sortNode.sort === 'asc' ? 'de-active-li': ''"
>
<span>
<span>{{ $t('chart.asc') }}</span>
</span>
@ -28,7 +34,6 @@
trigger="hover"
>
<ul class="de-ul">
<li
v-for="(node, i) in allFields"
:key="node.id"
@ -39,14 +44,15 @@
>
<span>{{ node.name }}</span>
</li>
</ul>
</el-popover>
</el-dropdown-item>
<el-dropdown-item v-if="isSortWidget" :disabled="disabledSort" :command="beforeClickItem('desc')">
<span v-popover:popoverdesc class="el-dropdown-link inner-dropdown-menu de-sort-menu" :class="!disabledSort && sortNode.sort === 'desc' ? 'de-active-li': ''">
<span
v-popover:popoverdesc
class="el-dropdown-link inner-dropdown-menu de-sort-menu"
:class="!disabledSort && sortNode.sort === 'desc' ? 'de-active-li': ''"
>
<span>
<span>{{ $t('chart.desc') }}</span>
</span>
@ -61,7 +67,6 @@
trigger="hover"
>
<ul class="de-ul">
<li
v-for="(node, i) in allFields"
:key="node.id"
@ -72,14 +77,9 @@
>
<span>{{ node.name }}</span>
</li>
</ul>
</el-popover>
</el-dropdown-item>
<!-- <el-dropdown-item :disabled="index" :command="beforeClickItem('customSort')">
<span class="de-sort-menu" :class="sortNode.sort === 'custom' ? 'de-active-li': ''">{{ $t('chart.custom_sort') }}</span>
</el-dropdown-item> -->
<el-dropdown-item :divided="isSortWidget" icon="el-icon-delete" :command="beforeClickItem('remove')">
<span class="de-delete-field">{{ $t('chart.delete') }}</span>
</el-dropdown-item>
@ -137,7 +137,6 @@ export default {
created() {
if (!this.sortNode) {
this.sortNode = this.sort && this.sort.id ? JSON.parse(JSON.stringify(this.sort)) : JSON.parse(JSON.stringify(this.defaultSortProp))
// this.sortChange('none')
}
},
methods: {
@ -199,67 +198,72 @@ export default {
</script>
<style scoped lang="scss">
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
display: inline-block;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
}
span {
font-size: 12px;
}
.de-ul li {
margin: 5px 2px;
cursor: pointer;
&:hover {
color: #409EFF;
border-color: rgb(198, 226, 255);
background-color: rgb(236, 245, 255);
}
&:before {
content: "";
width: 6px;
height: 6px;
display: inline-block;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
border-radius: 50%;
vertical-align: middle;
margin-right: 5px;
}
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
.de-active-li {
&:before {
background: #409EFF;
}
}
span {
font-size: 12px;
}
.de-ul li {
margin: 5px 2px;
cursor: pointer;
&:hover {
color: #409EFF;
border-color: rgb(198, 226, 255);
background-color: rgb(236, 245, 255);
}
&:before {
content: "";
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
vertical-align: middle;
margin-right: 5px;
}
}
.de-active-li {
&:before {
background: #409EFF;
}
}
.de-sort-menu::before {
content: "";
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
vertical-align: middle;
margin-right: 5px;
}
.de-delete-field {
margin-left: 4px;
}
.de-sort-field-span {
/* width: 80px;
max-width: 80px; */
display: inline-flexbox;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.de-sort-menu::before {
content: "";
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
vertical-align: middle;
margin-right: 5px;
}
.de-delete-field {
margin-left: 4px;
}
.de-sort-field-span {
display: inline-flexbox;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -33,34 +33,6 @@ import 'tinymce/plugins/nonbreaking'
import 'tinymce/plugins/pagebreak'
import { mapState } from 'vuex'
// const fonts = [
// '=',
// '=',
// '=',
// '=',
// '=',
// '=',
// 'Courier New=courier new,courier',
// 'AkrutiKndPadmini=Akpdmi-n',
// 'Andale Mono=andale mono,times',
// 'Arial=arial,helvetica,sans-serif',
// 'Arial Black=arial black,avant garde',
// 'Book Antiqua=book antiqua,palatino',
// 'Comic Sans MS=comic sans ms,sans-serif',
// 'Courier New=courier new,courier',
// 'Georgia=georgia,palatino',
// 'Helvetica=helvetica',
// 'Impact=impact,chicago',
// 'Symbol=symbol',
// 'Tahoma=tahoma,arial,helvetica,sans-serif',
// 'Terminal=terminal,monaco',
// 'Times New Roman=times new roman,times',
// 'Trebuchet MS=trebuchet ms,geneva',
// 'Verdana=verdana,geneva',
// 'Webdings=webdings',
// 'Wingdings=wingdings,zapf dingbats'
// ]
export default {
name: 'DeRichText',
components: {
@ -106,7 +78,6 @@ export default {
content_css: '/tinymce/skins/content/default/content.css',
plugins: 'advlist autolink link image lists charmap media wordcount table contextmenu directionality pagebreak', //
//
// toolbar: 'undo redo | fontsizeselect fontselect | bold italic forecolor backcolor underline strikethrough | alignleft aligncenter alignright | lists image media table link | bullist numlist ',
toolbar: 'undo redo |fontselect fontsizeselect |forecolor backcolor bold italic |underline strikethrough link| formatselect |' +
'alignleft aligncenter alignright | bullist numlist |' +
' blockquote subscript superscript removeformat | table image media | fullscreen ' +

View File

@ -26,20 +26,16 @@
</template>
<script>
// custom skin css
import '@/custom-theme.css'
import { mapState } from 'vuex'
import bus from '@/utils/bus'
// import SWF_URL from 'videojs-swf/dist/video-js.swf'
export default {
props: {
// eslint-disable-next-line vue/require-default-prop
propValue: {
type: String,
require: true
},
// eslint-disable-next-line vue/require-default-prop
element: {
type: Object
},
@ -124,15 +120,9 @@ export default {
},
onPlayerCanplaythrough(player) {
},
// or listen state event
playerStateChanged(playerCurrentState) {
},
// player is ready
playerReadied(player) {
// seek to 10s
// player.currentTime(10): the player is readied', player)
}
}
}

View File

@ -25,7 +25,6 @@ export default {
type: Array,
default: () => []
},
// eslint-disable-next-line vue/require-default-prop
element: {
type: Object
}

View File

@ -7,7 +7,6 @@
<script>
export default {
props: {
// eslint-disable-next-line vue/require-default-prop
element: {
type: Object
}

View File

@ -149,7 +149,6 @@ export default {
required: false,
default: false
},
// eslint-disable-next-line vue/require-default-prop
componentIndex: {
type: Number,
required: false
@ -390,7 +389,6 @@ export default {
}
},
'chartType': function(newVal, oldVal) {
// this.isPlugin = this.plugins.some(plugin => plugin.value === this.chart.type)
if ((newVal === 'map' || newVal === 'buddle-map') && newVal !== oldVal) {
this.initAreas()
}
@ -927,32 +925,4 @@ export default {
z-index: 2;
display: block !important;
}
/*.rect-shape > i {*/
/* right: 5px;*/
/* color: gray;*/
/* position: absolute;*/
/*}*/
/*.rect-shape > > > i:hover {*/
/* color: red;*/
/*}*/
/*.rect-shape:hover > > > .icon-fangda {*/
/* z-index: 2;*/
/* display: block;*/
/*}*/
/*.rect-shape > > > .icon-fangda {*/
/* display: none*/
/*}*/
/*.rect-shape:hover > > > .icon-shezhi {*/
/* z-index: 2;*/
/* display: block;*/
/*}*/
/*.rect-shape > > > .icon-shezhi {*/
/* display: none*/
/*}*/
</style>

View File

@ -32,7 +32,6 @@ import LabelNormal from '@/views/chart/components/normal/LabelNormal'
import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
// import { export_json_to_excel } from '@/plugins/Export2Excel'
import { mapState } from 'vuex'
import ChartComponentG2 from '@/views/chart/components/ChartComponentG2'
import PluginCom from '@/views/system/plugin/PluginCom'
@ -167,15 +166,6 @@ export default {
})
} else {
_this.exportExcelDownload()
// const dom = document.getElementById('user-view-' + this.chart.id)
// if (dom) {
// html2canvas(dom).then(canvas => {
// const snapshot = canvas.toDataURL('image/jpeg', 1) //
// _this.exportExcelDownload(snapshot, canvas.width, canvas.height)
// })
// } else {
// _this.exportExcelDownload()
// }
}
}
},

View File

@ -37,12 +37,10 @@ import { mapState } from 'vuex'
export default {
props: {
// eslint-disable-next-line vue/require-default-prop
propValue: {
type: String,
require: true
},
// eslint-disable-next-line vue/require-default-prop
element: {
type: Object
},
@ -136,20 +134,10 @@ export default {
setEdit() {
this.canEdit = true
// // //
// setTimeout(() => {
// this.$refs['text'].focus()
// }, 500)
//
this.selectText(this.$refs.text)
},
selectText(element) {
const selection = window.getSelection()
const range = document.createRange()
// range.selectNodeContents(element)
// selection.removeAllRanges()
// selection.addRange(range)
},
removeSelectText() {
@ -162,26 +150,27 @@ export default {
<style lang="scss" scoped>
.v-text {
width: 100%;
height: 100%;
display: table;
div {
display: table-cell;
width: 100%;
height: 100%;
display: table;
outline: none;
div {
display: table-cell;
width: 100%;
height: 100%;
outline: none;
}
}
.canEdit {
cursor: text;
height: 100%;
}
.canEdit {
cursor: text;
height: 100%;
}
}
::v-deep a:hover {
text-decoration: underline!important;
color: blue!important;
text-decoration: underline !important;
color: blue !important;
}
</style>

View File

@ -1,13 +1,7 @@
<template>
<div class="home">
<Toolbar />
<Toolbar/>
<main>
<!-- 左侧组件列表 -->
<!-- <section class="left">-->
<!-- <ComponentList />-->
<!-- </section>-->
<!-- 中间画布 -->
<section class="center">
<div
class="content"
@ -16,7 +10,7 @@
@mousedown="handleMouseDown"
@mouseup="deselectCurComponent"
>
<Editor />
<Editor/>
</div>
</section>
@ -26,20 +20,14 @@
<script>
import Editor from '@/components/Editor/index'
import ComponentList from '@/components/ComponentList' //
import AttrList from '@/components/canvas/components/AttrList' //
import AnimationList from '@/components/canvas/components/AnimationList' //
import EventList from '@/components/canvas/components/EventList' //
import componentList from '@/components/canvas/custom-component/component-list' //
import Toolbar from '@/components/Toolbar'
import { deepCopy } from '@/utils/utils'
import { mapState } from 'vuex'
import {deepCopy} from '@/utils/utils'
import {mapState} from 'vuex'
import generateID from '@/utils/generateID'
// import { listenGlobalKeyDown } from '@/utils/shortcutKey'
export default {
// eslint-disable-next-line vue/no-unused-components
components: { Editor, ComponentList, AttrList, AnimationList, EventList, Toolbar },
components: {Editor, Toolbar},
data() {
return {
activeName: 'attr',
@ -54,8 +42,6 @@ export default {
]),
created() {
this.restore()
//
// listenGlobalKeyDown()
},
methods: {
restore() {
@ -72,7 +58,6 @@ export default {
resetID(data) {
if (data) {
data.forEach(item => {
// eslint-disable-next-line no-undef
item.type !== 'custom' && (item.id = uuid.v1())
})
}
@ -95,8 +80,8 @@ export default {
component.style.top = e.offsetY
component.style.left = e.offsetX
component.id = generateID()
this.$store.commit('addComponent', { component })
this.$store.commit('recordSnapshot','handleDrop')
this.$store.commit('addComponent', {component})
this.$store.commit('recordSnapshot', 'handleDrop')
},
handleDragOver(e) {
@ -110,7 +95,7 @@ export default {
deselectCurComponent(e) {
if (!this.isClickComponent) {
this.$store.commit('setCurComponent', { component: null, index: null })
this.$store.commit('setCurComponent', {component: null, index: null})
}
// 0 1 2
@ -124,49 +109,49 @@ export default {
<style lang="scss">
.home {
height: 100vh;
background: #fff;
height: 100vh;
background: #fff;
main {
height: calc(100% - 64px);
position: relative;
main {
height: calc(100% - 64px);
position: relative;
.left {
position: absolute;
height: 100%;
width: 200px;
left: 0;
top: 0;
padding-top: 10px;
}
.right {
position: absolute;
height: 100%;
width: 262px;
right: 0;
top: 0;
}
.center {
margin-left: 200px;
margin-right: 262px;
background: #f5f5f5;
height: 100%;
overflow: auto;
padding: 20px;
.content {
width: 100%;
height: 100%;
overflow: auto;
}
}
.left {
position: absolute;
height: 100%;
width: 200px;
left: 0;
top: 0;
padding-top: 10px;
}
.placeholder {
text-align: center;
color: #333;
.right {
position: absolute;
height: 100%;
width: 262px;
right: 0;
top: 0;
}
.center {
margin-left: 200px;
margin-right: 262px;
background: #f5f5f5;
height: 100%;
overflow: auto;
padding: 20px;
.content {
width: 100%;
height: 100%;
overflow: auto;
}
}
}
.placeholder {
text-align: center;
color: #333;
}
}
</style>

View File

@ -3,20 +3,6 @@ function checkDataPermission(el, binding, vnode) {
const dataPermission = vnode.privileges
// eslint-disable-next-line no-unused-vars
const { value } = binding
// // 数据授权采用并集的方式 部门 角色 用户 有一个有权限即可
// if (value && value instanceof Array) {
// const needPermissions = value
// // 满足任意一个即可
// const hasPermission = needPermissions.some(needP => {
// const result = dataPermission.indexOf(needP) > -1
// return result
// })
// if (!hasPermission) {
// el.parentNode && el.parentNode.removeChild(el)
// }
// } else {
// throw new Error(`使用方式: v-data-permission="['1:1']"`)
// }
el.parentNode && el.parentNode.removeChild(el)
}

View File

@ -1,6 +1,5 @@
import defaultSettings from '@/settings'
import variables from '@/styles/variables.scss'
// const { showSettings, fixedHeader, sidebarLogo } = defaultSettings
const { showSettings, sidebarLogo } = defaultSettings
const state = {
theme: variables.theme,

View File

@ -199,20 +199,6 @@ export function param2Obj(url) {
)
}
// export function formatCondition(param) {
// if (!param) {
// return null
// }
// const condition = {}
// for (const key in param) {
// if (Object.hasOwnProperty.call(param, key)) {
// const element = param[key]
// condition[element.field] = element.value
// }
// }
// return condition
// }
export function formatCondition(param) {
if (!param) {
return null

View File

@ -11,9 +11,6 @@ export const tryHideLoading = identification => {
if (!identification) return
const count = store.getters.loadingMap[identification]
if (count > 0) {
// setTimeout(() => {
// store.dispatch('request/reduceLoading', identification)
// }, 1000)
store.dispatch('request/reduceLoading', identification)
}
}

View File

@ -141,7 +141,6 @@ const checkAuth = response => {
})
}
// token到期后自动续命 刷新token
// if (response.headers[RefreshTokenKey] && !interruptTokenContineUrls.some(item => response.config.url.indexOf(item) >= 0)) {
if (response.headers[RefreshTokenKey]) {
const refreshToken = response.headers[RefreshTokenKey]
store.dispatch('user/refreshToken', refreshToken)

View File

@ -555,10 +555,6 @@ export const BASE_FUNNEL = {
maxSize: '100%',
sort: 'descending',
gap: 1,
// label: {
// show: true,
// position: 'inside'
// },
labelLine: {
length: 10,
lineStyle: {
@ -754,16 +750,12 @@ export const BASE_MAP = {
},
right: 0
},
// legend: {},
series: [
{
name: '',
type: 'map',
map: 'MAP',
roam: true,
// label: {
// show: true
// },
data: []
}
]
@ -855,15 +847,6 @@ export const BASE_TREEMAP = {
breadcrumb: {
show: false
},
// radius: ['0%', '60%'],
// avoidLabelOverlap: false,
// emphasis: {
// itemStyle: {
// shadowBlur: 10,
// shadowOffsetX: 0,
// shadowColor: 'rgba(0, 0, 0, 0.5)'
// }
// },
data: []
}
]

View File

@ -47,12 +47,6 @@ export function baseFunnelOptionAntV(plot, container, chart, action) {
end: [{ trigger: 'interval:mouseleave', action: 'tooltip:hide' }]
}
}
// {
// type: 'active-region', cfg: {
// start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
// end: [{ trigger: 'interval:mouseleave', action: 'active-region:hide' }]
// }
// }
]
}
// size

View File

@ -94,12 +94,6 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
}
}
}
// range: {
// width: 12
// },
// gaugeStyle: {
// lineCap: 'round'
// }
}
if (hasThreshold) {
options.range = {

View File

@ -65,17 +65,8 @@ export function baseMapOption(chart_option, chart) {
chart_option.visualMap.inRange.colorAlpha = customAttr.color.alpha / 100
}
for (let i = 0; i < valueArr.length; i++) {
// const y = {
// name: chart.data.x[i],
// value: valueArr[i]
// }
const y = valueArr[i]
y.name = chart.data.x[i]
// color
// y.itemStyle = {
// color: hexColorToRGBA(customAttr.color.colors[i % customAttr.color.colors.length], customAttr.color.alpha),
// borderRadius: 0
// }
chart_option.series[0].data.push(y)
}
}

View File

@ -33,10 +33,6 @@ export function basePieOption(chart_option, chart) {
}
const valueArr = chart.data.series[0].data
for (let i = 0; i < valueArr.length; i++) {
// const y = {
// name: chart.data.x[i],
// value: valueArr[i]
// }
const y = valueArr[i]
y.name = chart.data.x[i]
// color
@ -85,10 +81,6 @@ export function rosePieOption(chart_option, chart) {
}
const valueArr = chart.data.series[0].data
for (let i = 0; i < valueArr.length; i++) {
// const y = {
// name: chart.data.x[i],
// value: valueArr[i]
// }
const y = valueArr[i]
y.name = chart.data.x[i]
// color

View File

@ -41,10 +41,6 @@ export function baseTreemapOption(chart_option, chart) {
}
const valueArr = chart.data.series[0].data
for (let i = 0; i < valueArr.length; i++) {
// const y = {
// name: chart.data.x[i],
// value: valueArr[i]
// }
const y = valueArr[i]
y.name = chart.data.x[i]
// color

View File

@ -47,12 +47,6 @@ export function baseTreemapOptionAntV(plot, container, chart, action) {
end: [{ trigger: 'element:mouseleave', action: 'tooltip:hide' }]
}
}
// {
// type: 'active-region', cfg: {
// start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
// end: [{ trigger: 'interval:mouseleave', action: 'active-region:hide' }]
// }
// }
]
}
// size

View File

@ -75,29 +75,12 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
// {
// type: 'legend-active', cfg: {
// start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
// end: [{ trigger: 'legend-item:mouseleave', action: ['element-active:reset'] }]
// }
// },
// {
// type: 'legend-filter', cfg: {
// start: [{ trigger: 'legend-item:click', action: ['list-unchecked:toggle', 'data-filter:filter', 'element-active:reset', 'element-highlight:reset'] }]
// }
// },
{
type: 'tooltip', cfg: {
start: [{ trigger: 'interval:mousemove', action: 'tooltip:show' }],
end: [{ trigger: 'interval:mouseleave', action: 'tooltip:hide' }]
}
}
// {
// type: 'active-region', cfg: {
// start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
// end: [{ trigger: 'interval:mouseleave', action: 'active-region:hide' }]
// }
// }
]
}
// size

View File

@ -38,19 +38,6 @@ export function baseWordCloudOptionAntV(plot, container, chart, action) {
}
]
}
// size
// let customAttr = {}
// if (chart.customAttr) {
// customAttr = JSON.parse(chart.customAttr)
// if (customAttr.size) {
// const s = JSON.parse(JSON.stringify(customAttr.size))
// if (s.barDefault) {
// delete options.marginRatio
// } else {
// options.marginRatio = s.barGap
// }
// }
// }
// 开始渲染
if (plot) {

View File

@ -17,8 +17,6 @@
</span>
</transition-group>
</draggable>
<!--tips-->
<!--<p style="margin-top: 10px;color:#F56C6C;font-size: 12px;">{{ $t('chart.custom_sort_tip') }}</p>-->
</div>
</template>

View File

@ -13,32 +13,9 @@
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('chart.axis_line')" class="form-item">-->
<!-- <el-checkbox v-model="splitForm.axisLine.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>-->
<!-- </el-form-item>-->
<el-form-item v-show="showProperty('lineStyle')" :label="$t('chart.axis_color')" class="form-item">
<el-color-picker v-model="splitForm.axisLine.lineStyle.color" class="color-picker-style" :predefine="predefineColors" @change="changeSplitStyle('axisLine')" />
</el-form-item>
<!-- <el-form-item :label="$t('chart.axis_label')" class="form-item">-->
<!-- <el-checkbox v-model="splitForm.axisLabel.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('chart.axis_label_color')" class="form-item">-->
<!-- <el-color-picker v-model="splitForm.axisLabel.color" class="color-picker-style" @change="changeSplitStyle" />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('chart.label_fontsize')" class="form-item form-item-slider">-->
<!-- <el-select v-model="splitForm.axisLabel.fontSize" :placeholder="$t('chart.label_fontsize')" @change="changeSplitStyle">-->
<!-- <el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('chart.split_line')" class="form-item">-->
<!-- <el-checkbox v-model="splitForm.splitLine.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('chart.split_color')" class="form-item">-->
<!-- <el-color-picker v-model="splitForm.splitLine.lineStyle.color" class="color-picker-style" @change="changeSplitStyle" />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('chart.shadow')" class="form-item">-->
<!-- <el-checkbox v-model="splitForm.splitArea.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>-->
<!-- </el-form-item>-->
</el-form>
</el-col>
</div>

View File

@ -39,10 +39,6 @@
</el-dropdown-menu>
</el-dropdown>
</el-dropdown-item>
<!-- <el-dropdown-item icon="el-icon-files" :command="beforeClickItem('filter')">-->
<!-- <span>{{ $t('chart.filter') }}...</span>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item v-show="item.deType === 1" divided>
<el-dropdown placement="right-start" size="mini" style="width: 100%" @command="dateStyle">
<span class="el-dropdown-link inner-dropdown-menu">

View File

@ -13,7 +13,6 @@
</span>
<span v-if="dimensionShow" :style="label_space">
<p :style="label_class">
<!-- {{ chart.data.x[0] }}-->
{{ chart.data.series[0].name }}
</p>
</span>

View File

@ -100,10 +100,6 @@
<el-form-item v-show="showProperty('tableBorderColor')" :label="$t('chart.table_border_color')" class="form-item">
<el-color-picker v-model="colorForm.tableBorderColor" class="color-picker-style" :predefine="predefineColors" @change="changeColorCase('tableBorderColor')" />
</el-form-item>
<!-- 暂时不支持该功能-->
<!-- <el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.stripe')" class="form-item">-->
<!-- <el-checkbox v-model="colorForm.tableStripe" @change="changeColorCase('tableStripe')">{{ $t('chart.stripe') }}</el-checkbox>-->
<!-- </el-form-item>-->
</div>
<el-form-item v-show="showProperty('alpha')" :label="$t('chart.not_alpha')" class="form-item form-item-slider">
@ -265,10 +261,6 @@ export default {
const items = this.colorCases.filter(ele => {
return ele.value === that.colorForm.value
})
// const val = JSON.parse(JSON.stringify(this.colorForm))
// val.value = items[0].value
// val.colors = items[0].colors
// this.colorForm.value = items[0].value
this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors))
this.customColor = this.colorForm.colors[0]
@ -285,8 +277,6 @@ export default {
this.$emit('onColorChange', this.colorForm)
this.colorForm['modifyName'] = 'colors'
this.$emit('onColorChange', this.colorForm)
// this.customColor = null
// this.colorIndex = 0
},
init() {
const chart = JSON.parse(JSON.stringify(this.chart))

View File

@ -47,25 +47,11 @@
<div style="display: flex;align-items: center;margin-top: 10px;">
<span class="color-label" />
<span>
<!-- 色系自定义-->
<!-- <el-radio-group v-model="customColor" class="color-type">-->
<!-- <el-radio v-for="(c,index) in colorForm.colors" :key="index" :label="c" style="padding: 2px;" @change="switchColor(index)">-->
<!-- <span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" />-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<span v-for="(c,index) in colorForm.colors" :key="index" style="padding: 2px;">
<span :style="{width: '20px',height: '20px',display:'inline-block',backgroundColor: c}" />
</span>
</span>
</div>
<!-- 色系自定义-->
<!-- <div style="display: flex;align-items: center;margin-top: 10px;">-->
<!-- <span class="color-label" />-->
<!-- <span>-->
<!-- <el-color-picker v-model="customColor" class="color-picker-style" :predefine="predefineColors" @change="switchColorCase" />-->
<!-- </span>-->
<!-- </div>-->
<div class="custom-color-style">
<div
v-for="(item,index) in colorForm.seriesColors"
@ -275,10 +261,6 @@ export default {
const items = this.colorCases.filter(ele => {
return ele.value === that.colorForm.value
})
// const val = JSON.parse(JSON.stringify(this.colorForm))
// val.value = items[0].value
// val.colors = items[0].colors
// this.colorForm.value = items[0].value
this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors))
this.customColor = this.colorForm.colors[0]
@ -292,8 +274,6 @@ export default {
},
changeColorCase() {
this.$emit('onColorChange', this.colorForm)
// this.customColor = null
// this.colorIndex = 0
},
init() {
const chart = JSON.parse(JSON.stringify(this.chart))

View File

@ -34,10 +34,6 @@
<br><br>
折线区域柱状条形仪表盘 : {a}系列名称{b}类目值{c}数值
<br>
<!-- 散点图气泡 : {a}系列名称{b}数据名称{c}数值数组, {d}-->
<!-- <br>-->
<!-- 地图 : {a}系列名称{b}区域名称{c}合并数值, {d}-->
<!-- <br>-->
饼图漏斗图: {a}系列名称{b}数据项名称{c}数值, {d}百分比
</div>
<i class="el-icon-info" style="cursor: pointer;" />

View File

@ -25,9 +25,6 @@
:title="field.name"
:width="columnWidth"
>
<!-- <template slot="header">-->
<!-- <span>{{ field.name }}</span>-->
<!-- </template>-->
</ux-table-column>
</ux-grid>

View File

@ -6,7 +6,6 @@
</de-aside-container>
<de-main-container>
<!-- <router-view />-->
<component :is="component" :param="param" @switchComponent="switchComponent" @saveSuccess="saveSuccess" @typeChange="typeChange" />
</de-main-container>
</de-container>

View File

@ -9,7 +9,6 @@
@click="closePanelEdit"
/>
</el-tooltip>
<!-- <i class="el-icon-d-arrow-right" style="position:absolute;left: 4px;top: 11px"></i>-->
<el-row style="height: 40px;" class="padding-lr">
<el-popover
placement="right-start"
@ -27,15 +26,9 @@
</el-popover>
<span class="title-text view-title-name" style="line-height: 40px;">{{ view.name }}</span>
<span style="float: right;line-height: 40px;">
<!-- <el-button size="mini" @click="closePanelEdit">-->
<!-- {{ $t('chart.draw_back') }}-->
<!-- </el-button>-->
<el-button round size="mini" :disabled="!hasEdit" @click="reset">
{{ $t('chart.recover') }}
</el-button>
<!-- <el-button size="mini" type="primary" @click="closeEdit">-->
<!-- {{ $t('commons.save') }}-->
<!-- </el-button>-->
</span>
</el-row>
<el-row class="view-panel-row">
@ -236,19 +229,6 @@
</el-radio-group>
</div>
</el-row>
<!-- <el-row class="title-text" style="color: #909399;">-->
<!-- <span>-->
<!-- <span v-show="chart.type && (chart.type.includes('pie') || chart.type.includes('funnel') || chart.type.includes('text') || chart.type.includes('gauge') || chart.type.includes('treemap'))">-->
<!-- Tips: {{ $t('chart.only_one_quota') }}-->
<!-- </span>-->
<!-- &lt;!&ndash; <span v-show="chart.type && (chart.type.includes('text'))">&ndash;&gt;-->
<!-- &lt;!&ndash; Tips: {{ $t('chart.only_one_result') }}&ndash;&gt;-->
<!-- &lt;!&ndash; </span>&ndash;&gt;-->
<!-- &lt;!&ndash; <span v-show="chart.type && chart.type.includes('gauge')">&ndash;&gt;-->
<!-- &lt;!&ndash; Tips: {{ $t('chart.only_one_quota') }},{{ $t('chart.only_one_result') }}&ndash;&gt;-->
<!-- &lt;!&ndash; </span>&ndash;&gt;-->
<!-- </span>-->
<!-- </el-row>-->
</div>
<el-button
slot="reference"
@ -618,9 +598,6 @@
</el-row>
<el-row class="padding-lr" style="margin-top: 6px;">
<span>{{ $t('chart.result_filter') }}</span>
<!-- <el-button :disabled="!hasDataPermission('manage',param.privileges)" size="mini" class="filter-btn-class" @click="showResultFilter">-->
<!-- {{ $t('chart.filter_condition') }}<i class="el-icon-setting el-icon&#45;&#45;right" />-->
<!-- </el-button>-->
<draggable
v-model="view.customFilter"
group="drag"

View File

@ -137,14 +137,6 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column property="groupType" :label="$t('dataset.field_group_type')" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-radio-group v-model="scope.row.groupType" size="mini">-->
<!-- <el-radio-button label="d">{{ $t('chart.dimension') }}</el-radio-button>-->
<!-- <el-radio-button label="q">{{ $t('chart.quota') }}</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column property="fromType" :label="$t('chart.form_type')" width="120">
<template slot-scope="scope">
<span v-if="scope.row.extField === 1" class="from-type-span">{{ $t('chart.copy_field') }}</span>
@ -293,14 +285,6 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column property="groupType" :label="$t('dataset.field_group_type')" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-radio-group v-model="scope.row.groupType" size="mini">-->
<!-- <el-radio-button label="d">{{ $t('chart.dimension') }}</el-radio-button>-->
<!-- <el-radio-button label="q">{{ $t('chart.quota') }}</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column property="fromType" :label="$t('chart.form_type')" width="120">
<template slot-scope="scope">
<span v-if="scope.row.extField === 1" class="from-type-span">{{ $t('chart.copy_field') }}</span>

View File

@ -197,11 +197,6 @@ export default {
border: 1px solid #e8eaed;
display: block;
}
// .div-input {
// inset: 2px 4px;
// position: absolute;
// display: block;
// }
.abs-input {
height: 20px;
position: relative;
@ -221,18 +216,6 @@ export default {
color: #E65251;
box-sizing: border-box;
}
// .real-input {
// width: 100%;
// height: 100%;
// border: none;
// outline: none;
// padding: 0px;
// margin: 0px;
// inset: 0px;
// position: absolute;
// display: block;
// }
.auth-root-class {
margin: 15px 0px 5px;
text-align: center;

View File

@ -64,11 +64,6 @@ export default {
data() {
return {
selectType: -1,
// msgTypes: [
// { value: -1, label: '' },
// { value: 0, label: '' },
// { value: 1, label: '' }
// ],
msgTypes: msgTypes,
data: [],
allTypes: [{ name: 'mysql', type: 'jdbc' }, { name: 'sqlServer', type: 'jdbc' }],

View File

@ -78,11 +78,6 @@ export default {
data() {
return {
selectType: -1,
// msgTypes: [
// { value: -1, label: '' },
// { value: 0, label: '' },
// { value: 1, label: '' }
// ],
msgTypes: msgTypes,
data: [],
allTypes: [{ name: 'mysql', type: 'jdbc' }, { name: 'sqlServer', type: 'jdbc' }],

View File

@ -74,11 +74,6 @@ export default {
data() {
return {
selectType: -1,
// msgTypes: [
// { value: -1, label: '' },
// { value: 0, label: '' },
// { value: 1, label: '' }
// ],
msgTypes: msgTypes,
data: [],
allTypes: [{ name: 'mysql', type: 'jdbc' }, { name: 'sqlServer', type: 'jdbc' }],
@ -141,8 +136,6 @@ export default {
},
toDetail(row) {
const param = { ...{ msgNotification: true, msgType: row.typeId, sourceParam: row.param }}
// this.$router.push({ name: row.router, params: param })
// this.setReaded(row)
if (this.hasPermissionRoute(row.router)) {
this.$router.push({ name: row.router, params: param })
this.setReaded(row)

View File

@ -7,7 +7,7 @@ const white_list = Config.WHITE_LIST
let service = axios.create({
// baseURL: 'http://localhost:8081',
// baseURL: 'http://localhost:8081',
baseURL: process.env.VUE_APP_BASE_API,
timeout: 5000
})
@ -15,7 +15,7 @@ let service = axios.create({
// request interceptor
service.interceptors.request.use(
config => {
let lang = parseLanguage() || uni.getLocale()
if (lang === 'en') {
config.headers['Accept-Language'] = 'en-US'
@ -24,8 +24,8 @@ service.interceptors.request.use(
}else {
config.headers['Accept-Language'] = 'zh-CN'
}
if (white_list.includes(config.url)) {
return config
}
@ -36,11 +36,11 @@ service.interceptors.request.use(
else {
logout()
}
return config
},
error => {
return Promise.reject(error)
}
)
@ -81,7 +81,7 @@ const checkAuth = response => {
});
logout()
}
if (response.headers['authentication-status'] === 'invalid') {
uni.showToast({
icon: 'none',
@ -90,13 +90,12 @@ const checkAuth = response => {
logout()
}
// token到期后自动续命 刷新token
// if (response.headers[RefreshTokenKey] && !interruptTokenContineUrls.some(item => response.config.url.indexOf(item) >= 0)) {
if (response.headers[RefreshTokenKey]) {
const refreshToken = response.headers[RefreshTokenKey]
setToken(refreshToken)
}
}

View File

@ -159,7 +159,6 @@ const util = {
key: 'search:history',
data: searchHistory,
success: function() {
// console.log('success');
}
});
},

View File

@ -1,6 +1,6 @@
<template>
<view>
<uni-nav-bar :fixed="true" left-icon="arrowleft" @clickLeft="back" :title="banner.title" >
<block slot="right">
<uni-row class="demo-uni-row" >
@ -13,37 +13,34 @@
<uni-icons type="star" size="18" color="#fff"></uni-icons>
</view>
</uni-col>
<uni-col :span="12" style="margin: 0 10rpx;">
<view @click="refresh">
<uni-icons type="reload" size="18" color="#999" ></uni-icons>
</view>
</uni-col>
</uni-row>
</block>
</uni-nav-bar>
<scroll-view
:scroll-top="scrollTop"
scroll-y="true"
class="scroll-Y"
@scrolltoupper="upper"
<scroll-view
:scroll-top="scrollTop"
scroll-y="true"
class="scroll-Y"
@scrolltoupper="upper"
@scrolltolower="lower"
@scroll="scroll">
<!-- <web-view v-if="url" :style="{height: 'calc(100vh - ' + ktxStatusHeight +'px)'}" /> -->
<!-- <web-view v-if="url" style="height: 100vh;" /> -->
<web-view v-if="url" :style="{height: viewHeight}" />
</scroll-view>
</view>
</template>
@ -86,7 +83,7 @@
title: '',
banner: {},
htmlNodes: [],
url: '',
hasStar: false,
refreshCount: 0,
@ -129,12 +126,12 @@
}
this.refreshCount -= 1
uni.navigateBack()
},
methods: {
addRecent() {
const item = {id: this.banner.id, title: this.banner.title, index: this.banner.index, userId: this.banner.userId}
addRecent(item)
@ -152,17 +149,17 @@
uni.$emit('loadHomeIndex', {
index: 0
})
})
},
refresh() {
uni.showLoading({
title: this.$t('commons.loading')
});
this.url = null
this.loadLinkUrl()
this.refreshCount += 1
this.loadLinkUrl()
this.refreshCount += 1
},
loadStarStatus() {
starStatus(this.banner.id).then(res => {
@ -173,23 +170,23 @@
const baseUrl = process.env.VUE_APP_BASE_API + 'tempMobileLink/'
let resource = this.banner.id
const token = getToken()
if (this.banner.index && this.banner.index === 2 && this.banner.userId) {
resource = this.banner.id + '|' + this.banner.userId
//this.url = process.env.VUE_APP_BASE_API + 'tempMobileLink/' + this.banner.id + '|' + this.banner.userId + "/" + getToken()
}
this.url = baseUrl + encodeURIComponent(encodeURIComponent(resource)) + "/" + encodeURIComponent(token)
const url = this.url
/* uni.hideLoading() */
setTimeout(() => {
const iframe = document.getElementsByTagName("iframe")[0]
// iframe.style.height = (ktxScreentHeight - ktxStatusHeight) + 'px'
iframe.src = url
iframe.onload = e => {
uni.hideLoading()
}
iframe.onload = e => {
uni.hideLoading()
}
}, 1000);
},
@ -200,26 +197,26 @@
h5Height = h5Height - systemInfo.navigationBarHeight
}
this.viewHeight = h5Height + 'px'
},
back() {
// #ifdef H5
let canBack = true
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack(1)
return;
}
let a = this.$router.go(-1)
// router.go失败之后则重定向到首页
if (a == undefined) {
uni.reLaunch({
url: "/pages/index/index"
})
}
back() {
// #ifdef H5
let canBack = true
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack(1)
return;
}
let a = this.$router.go(-1)
// router.go失败之后则重定向到首页
if (a == undefined) {
uni.reLaunch({
url: "/pages/index/index"
})
}
return
// #endif
uni.navigateBack(1)
// #endif
uni.navigateBack(1)
},
upper: function(e) {
console.log(e)

View File

@ -8,7 +8,7 @@
<view class="line-h"></view>
<swiper :current="tabIndex" class="swiper-box" style="flex: 1;" :duration="300" @change="ontabchange">
<swiper-item class="swiper-item" v-for="(tab,index1) in newsList" :key="index1">
<!-- #ifndef APP-NVUE -->
<scroll-view class="scroll-v list" enableBackToTop="true" scroll-y @scrolltolower="loadMore(index1)">
<view v-for="(newsitem,index2) in tab.data" :key="newsitem.id">
@ -18,23 +18,23 @@
<text class="loading-more-text">{{tab.loadingText}}</text>
</view>
</scroll-view>
<!-- #endif -->
<!-- <uni-list>
<uni-list-item
v-for="(node, i) in tab.data"
<uni-list-item
v-for="(node, i) in tab.data"
:key="i"
clickable
@click="goDetail(node)"
:title="node.title"
thumb="../../../static/yibiaobans.png"
thumb-size="base"
:rightText="node.rightText"
:title="node.title"
thumb="../../../static/yibiaobans.png"
thumb-size="base"
:rightText="node.rightText"
/>
</uni-list> -->
</swiper-item>
</swiper>
@ -58,7 +58,7 @@
newsList: [],
cacheTab: [],
tabIndex: 0,
scrollInto: "",
showTips: false,
navigateFlag: false,
@ -69,8 +69,8 @@
computed: {
tabBars() {
return [
{name: this.$t('home.tab1'), id: 'guanzhu'},
{name: this.$t('home.tab2'), id: 'tuijian' },
{name: this.$t('home.tab1'), id: 'guanzhu'},
{name: this.$t('home.tab2'), id: 'tuijian' },
{name: this.$t('home.tab3'), id: 'tiyu'}
]
}
@ -99,19 +99,19 @@
this.getList(this.tabIndex, true)
},
methods: {
getList(index, replace) {
let activeTab = this.newsList[index]
if(replace) {
activeTab.lastTime = null
}
if (index === 1) {
this.loadRecentDats()
return
return
}
requestHome({type: index, lastTime: activeTab.lastTime}).then(res => {
var datas = res.data.listObject
if(datas.length > 0) {
@ -130,12 +130,12 @@
}else {
activeTab.data = activeTab.data.concat(datas)
}
}
activeTab.isLoading = false
uni.stopPullDownRefresh()
})
})
},
loadRecentDats() {
let activeTab = this.newsList[1]
@ -161,7 +161,7 @@
param.index = node.index
param.userId = node.userId
}
uni.navigateTo({
url: './detail?detailDate=' + encodeURIComponent(JSON.stringify(param))
})
@ -171,18 +171,6 @@
this.clearTabData(index)
this.getList(index)
},
// goDetail(e) {
// if (this.navigateFlag) {
// return;
// }
// this.navigateFlag = true;
// uni.navigateTo({
// url: './detail/detail?title=' + e.title
// });
// setTimeout(() => {
// this.navigateFlag = false;
// }, 200)
// },
close(index1, index2) {
uni.showModal({
content: '是否删除本条信息?',
@ -240,7 +228,6 @@
let cacheIndex = this.cacheTab[0];
this.clearTabData(cacheIndex);
this.cacheTab.splice(0, 1);
//console.log("remove cache index:: " + cacheIndex);
}
},
clearTabData(e) {