Merge branch 'main' of http://121.37.111.42:3000/ThbTech/gis-bi into main
This commit is contained in:
commit
93210dfcab
@ -1,5 +1,6 @@
|
|||||||
package io.gisbi.application.module.controller;
|
package io.gisbi.application.module.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -14,7 +15,6 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 应用_系统模块 前端控制器
|
* 应用_系统模块 前端控制器
|
||||||
@ -49,6 +49,35 @@ public class ModuleController {
|
|||||||
return ResponseResult.successData(moduleService.createModule(module));
|
return ResponseResult.successData(moduleService.createModule(module));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 复制模块
|
||||||
|
@PostMapping("/copy/{id}")
|
||||||
|
public ResponseResult copy(@PathVariable String id) {
|
||||||
|
LambdaQueryWrapper<Module> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(Module::getId, id);
|
||||||
|
Map<String, Object> moduleMap = moduleService.getMap(wrapper);
|
||||||
|
|
||||||
|
if (moduleMap == null || moduleMap.isEmpty()) {
|
||||||
|
return ResponseResult.error("模块不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Module module = BeanUtil.toBean(moduleMap, Module.class);
|
||||||
|
module.setId(null);
|
||||||
|
module.setName(module.getName() + "(复制)");
|
||||||
|
module.setCreateTime(LocalDateTime.now());
|
||||||
|
module.setCreateBy(AuthUtils.getUser().getUserId().toString());
|
||||||
|
|
||||||
|
boolean result = moduleService.createModule(module);
|
||||||
|
if (result) {
|
||||||
|
return ResponseResult.success("模块复制成功");
|
||||||
|
} else {
|
||||||
|
return ResponseResult.error("模块复制失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ResponseResult.error("复制模块失败,请联系管理员");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 修改模块
|
// 修改模块
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult update(@RequestBody Module module) {
|
public ResponseResult update(@RequestBody Module module) {
|
||||||
|
@ -47,6 +47,19 @@ public class MenuController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上移/下移菜单
|
||||||
|
*/
|
||||||
|
@PostMapping("/changeOrder")
|
||||||
|
public ResponseResult changeOrder(@RequestParam String menuId, @RequestParam String direction) {
|
||||||
|
boolean result = menuService.changeOrder(menuId, direction);
|
||||||
|
if (result) {
|
||||||
|
return ResponseResult.success();
|
||||||
|
} else {
|
||||||
|
return ResponseResult.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
* 用途说明:修改菜单及按钮根据ID
|
* 用途说明:修改菜单及按钮根据ID
|
||||||
* 参数说明
|
* 参数说明
|
||||||
|
@ -49,4 +49,7 @@ public interface IMenuService extends IService<Menu> {
|
|||||||
* 返回值说明: 菜单结构树集合
|
* 返回值说明: 菜单结构树集合
|
||||||
***********************************/
|
***********************************/
|
||||||
List<Map<String, Object>> permissionAssignment(String appId ,String roleId);
|
List<Map<String, Object>> permissionAssignment(String appId ,String roleId);
|
||||||
|
|
||||||
|
boolean changeOrder(String menuId, String direction);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -214,6 +214,56 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
|
|||||||
return listTree;
|
return listTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean changeOrder(String menuId, String direction) {
|
||||||
|
Menu currentMenu = menuMapper.selectById(menuId);
|
||||||
|
if (currentMenu == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String parentId = currentMenu.getParentid();
|
||||||
|
|
||||||
|
QueryWrapper<Menu> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("parentid", parentId);
|
||||||
|
wrapper.orderByAsc("orderno");
|
||||||
|
|
||||||
|
List<Menu> siblings = menuMapper.selectList(wrapper);
|
||||||
|
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < siblings.size(); i++) {
|
||||||
|
if (siblings.get(i).getId().equals(menuId)) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("up".equals(direction)) {
|
||||||
|
if (index > 0) {
|
||||||
|
swapOrder(siblings.get(index), siblings.get(index - 1));
|
||||||
|
} else {
|
||||||
|
return false; // 已是第一个,无法上移
|
||||||
|
}
|
||||||
|
} else if ("down".equals(direction)) {
|
||||||
|
if (index < siblings.size() - 1) {
|
||||||
|
swapOrder(siblings.get(index), siblings.get(index + 1));
|
||||||
|
} else {
|
||||||
|
return false; // 已是最后一个,无法下移
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false; // 方向错误
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void swapOrder(Menu m1, Menu m2) {
|
||||||
|
Integer temp = m1.getOrderno();
|
||||||
|
m1.setOrderno(m2.getOrderno());
|
||||||
|
m2.setOrderno(temp);
|
||||||
|
|
||||||
|
menuMapper.updateById(m1);
|
||||||
|
menuMapper.updateById(m2);
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************
|
/**********************************
|
||||||
* 用途说明: 生成权菜单权限树
|
* 用途说明: 生成权菜单权限树
|
||||||
* 参数说明 sysMenus
|
* 参数说明 sysMenus
|
||||||
|
@ -34,7 +34,7 @@ import java.util.Map;
|
|||||||
@RequestMapping("/staticResource")
|
@RequestMapping("/staticResource")
|
||||||
public class StaticResourceServer implements StaticResourceApi {
|
public class StaticResourceServer implements StaticResourceApi {
|
||||||
|
|
||||||
@Value("${gisbi.path.static-resource:/opt/gisbi2.0/data/static-resource/}")
|
@Value("${gisbi.path.static-resource:E:/opt/gisbi2.0/data/static-resource/}")
|
||||||
private String staticDir;
|
private String staticDir;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,9 +36,9 @@ logging:
|
|||||||
file:
|
file:
|
||||||
path: /opt/gisbi2.0/logs
|
path: /opt/gisbi2.0/logs
|
||||||
# sql日志生产环境注释掉
|
# sql日志生产环境注释掉
|
||||||
mybatis-plus:
|
#mybatis-plus:
|
||||||
configuration:
|
# configuration:
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
quartz:
|
quartz:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title></title>
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
|
<script src="https://webapi.amap.com/maps?v=2.0&key=YOUR_KEY&plugin=AMap.TileLayer.Satellite">
|
||||||
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -14,3 +14,8 @@ export const moduleById = id => request.get({ url: '/application/module/'+id })
|
|||||||
|
|
||||||
export const moduleDel = async id =>
|
export const moduleDel = async id =>
|
||||||
request.delete({ url: `/application/module/${id}` })
|
request.delete({ url: `/application/module/${id}` })
|
||||||
|
export const moduleCopy = async id =>
|
||||||
|
request.post({ url: `/application/module/copy/${id}` })
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -522,6 +522,7 @@ const updateFromMobile = (e, type) => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-size: 100% 100% !important;
|
background-size: 100% 100% !important;
|
||||||
|
padding: 0 !important;
|
||||||
.wrapper-inner-adaptor {
|
.wrapper-inner-adaptor {
|
||||||
position: relative;
|
position: relative;
|
||||||
transform-style: preserve-3d;
|
transform-style: preserve-3d;
|
||||||
|
@ -1181,6 +1181,7 @@ onMounted(() => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-size: 100% 100% !important;
|
background-size: 100% 100% !important;
|
||||||
|
padding:0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shape-selected {
|
.shape-selected {
|
||||||
|
@ -1881,6 +1881,7 @@ export default {
|
|||||||
map_style_fresh: 'Grass green',
|
map_style_fresh: 'Grass green',
|
||||||
map_style_grey: 'Gray',
|
map_style_grey: 'Gray',
|
||||||
map_style_blue: 'Indigo blue',
|
map_style_blue: 'Indigo blue',
|
||||||
|
map_style_translate:'Satellite map',
|
||||||
map_style_darkblue: 'Polar night blue',
|
map_style_darkblue: 'Polar night blue',
|
||||||
map_line_type: 'Type',
|
map_line_type: 'Type',
|
||||||
type: 'Type',
|
type: 'Type',
|
||||||
|
@ -1833,6 +1833,7 @@ export default {
|
|||||||
map_style_fresh: '草色青',
|
map_style_fresh: '草色青',
|
||||||
map_style_grey: '雅士灰',
|
map_style_grey: '雅士灰',
|
||||||
map_style_blue: '靛青藍',
|
map_style_blue: '靛青藍',
|
||||||
|
map_style_translate:'衛星地圖',
|
||||||
map_style_darkblue: '極夜藍',
|
map_style_darkblue: '極夜藍',
|
||||||
map_line_type: '類型',
|
map_line_type: '類型',
|
||||||
type: '類型',
|
type: '類型',
|
||||||
|
@ -1838,6 +1838,7 @@ export default {
|
|||||||
map_style_fresh: '草色青',
|
map_style_fresh: '草色青',
|
||||||
map_style_grey: '雅士灰',
|
map_style_grey: '雅士灰',
|
||||||
map_style_blue: '靛青蓝',
|
map_style_blue: '靛青蓝',
|
||||||
|
map_style_translate:'卫星地图',
|
||||||
map_style_darkblue: '极夜蓝',
|
map_style_darkblue: '极夜蓝',
|
||||||
map_line_type: '类型',
|
map_line_type: '类型',
|
||||||
type: '类型',
|
type: '类型',
|
||||||
|
@ -695,3 +695,51 @@ strong {
|
|||||||
.ed-checkbox__label:hover{
|
.ed-checkbox__label:hover{
|
||||||
color: #fff ;
|
color: #fff ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ed-select-dropdown__item.hover, .ed-select-dropdown__item:hover {
|
||||||
|
background-color: rgba(67, 67, 67, 1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ed-input.is-disabled .ed-input__wrapper{
|
||||||
|
background-color: rgba(37, 38, 38, 1) !important;
|
||||||
|
box-shadow: 0 0 0 1px rgba(51, 51, 51, 0)inset;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu .dimension li{
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu .dimension li:hover{
|
||||||
|
background-color: rgba(67, 67, 67, 1)!important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel{
|
||||||
|
background-color: rgba(37, 38, 38, 1)!important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .mod-left{
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .right-top{
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .autochecker-list .right-checkbox__label{
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .right-top .right-btn{
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .right-top .right-btn{
|
||||||
|
background-color: rgba(37, 38, 38, 0) !important;
|
||||||
|
border:1px solid rgba(67, 67, 67, 1) !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-manu{
|
||||||
|
background-color: rgba(37, 38, 38, 1) !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-manu .text-area .input{
|
||||||
|
background-color: rgba(37, 38, 38, 1) !important;
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-manu .text-area .text-area-btn{
|
||||||
|
background-color: rgba(37, 38, 38, 0) !important;
|
||||||
|
}
|
||||||
|
.de-el-dropdown-menu-fixed .de-panel .mod-left .ed-input__wrapper{
|
||||||
|
background-color: rgba(37, 38, 38, 0) !important;
|
||||||
|
}
|
@ -63,6 +63,7 @@ export const gaodeMapStyleOptions = [
|
|||||||
{ name: t('chart.map_style_fresh'), value: 'fresh' },
|
{ name: t('chart.map_style_fresh'), value: 'fresh' },
|
||||||
{ name: t('chart.map_style_grey'), value: 'grey' },
|
{ name: t('chart.map_style_grey'), value: 'grey' },
|
||||||
{ name: t('chart.map_style_blue'), value: 'blue' },
|
{ name: t('chart.map_style_blue'), value: 'blue' },
|
||||||
|
{ name: t('chart.map_style_translate'), value: 'Satellite' },
|
||||||
{ name: t('commons.custom'), value: 'custom' }
|
{ name: t('commons.custom'), value: 'custom' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -8,16 +8,12 @@ import {
|
|||||||
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
||||||
import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
|
import { GaodeMap } from '@antv/l7-maps'
|
||||||
import { Scene } from '@antv/l7-scene'
|
import { Scene } from '@antv/l7-scene'
|
||||||
import { LineLayer } from '@antv/l7-layers'
|
import { LineLayer } from '@antv/l7-layers'
|
||||||
import { PointLayer } from '@antv/l7-layers'
|
import { PointLayer } from '@antv/l7-layers'
|
||||||
import {
|
import { mapRendered, mapRendering } from '@/views/chart/components/js/panel/common/common_antv'
|
||||||
getMapCenter,
|
import { DEFAULT_BASIC_STYLE } from '@/views/chart/components/editor/util/chart'
|
||||||
getMapScene,
|
|
||||||
getMapStyle,
|
|
||||||
mapRendered,
|
|
||||||
qqMapRendered
|
|
||||||
} from '@/views/chart/components/js/panel/common/common_antv'
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,16 +88,103 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
const xAxisExt = deepCopy(chart.xAxisExt)
|
const xAxisExt = deepCopy(chart.xAxisExt)
|
||||||
const { basicStyle, misc } = deepCopy(parseJson(chart.customAttr))
|
const { basicStyle, misc } = deepCopy(parseJson(chart.customAttr))
|
||||||
|
|
||||||
|
let center: [number, number] = [
|
||||||
|
DEFAULT_BASIC_STYLE.mapCenter.longitude,
|
||||||
|
DEFAULT_BASIC_STYLE.mapCenter.latitude
|
||||||
|
]
|
||||||
|
if (basicStyle.autoFit === false) {
|
||||||
|
center = [basicStyle.mapCenter.longitude, basicStyle.mapCenter.latitude]
|
||||||
|
}
|
||||||
|
let mapStyle = basicStyle.mapStyleUrl
|
||||||
|
if (basicStyle.mapStyle !== 'custom') {
|
||||||
|
mapStyle = `amap://styles/${basicStyle.mapStyle ? basicStyle.mapStyle : 'normal'}`
|
||||||
|
}
|
||||||
const mapKey = await this.getMapKey()
|
const mapKey = await this.getMapKey()
|
||||||
const mapStyle = getMapStyle(mapKey, basicStyle)
|
|
||||||
// 底层
|
// 底层
|
||||||
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
||||||
let scene = chartObj?.getScene()
|
let scene = chartObj?.getScene()
|
||||||
|
if(scene){
|
||||||
const center = getMapCenter(basicStyle)
|
if (scene.getLayers()?.length) {
|
||||||
scene = await getMapScene(chart, scene, container, mapKey, basicStyle, misc, mapStyle, center)
|
await scene.removeAllLayer()
|
||||||
|
scene.setPitch(misc.mapPitch)
|
||||||
this.configZoomButton(chart, scene, mapKey)
|
}
|
||||||
|
}
|
||||||
|
if (mapStyle.indexOf('Satellite') == -1) {
|
||||||
|
scene = new Scene({
|
||||||
|
id: container,
|
||||||
|
logoVisible: false,
|
||||||
|
map: new GaodeMap({
|
||||||
|
token: mapKey?.key ?? undefined,
|
||||||
|
style: mapStyle,
|
||||||
|
pitch: misc.mapPitch,
|
||||||
|
center,
|
||||||
|
zoom: basicStyle.autoFit === false ? basicStyle.zoomLevel : undefined,
|
||||||
|
showLabel: !(basicStyle.showLabel === false),
|
||||||
|
WebGLParams: {
|
||||||
|
preserveDrawingBuffer: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
scene = new Scene({
|
||||||
|
id: container,
|
||||||
|
logoVisible: false,
|
||||||
|
map: new GaodeMap({
|
||||||
|
token: mapKey?.key ?? undefined,
|
||||||
|
style: mapStyle,
|
||||||
|
features: ['bg', 'road'], // 必须开启路网层
|
||||||
|
plugin: ['AMap.TileLayer.Satellite'], // 显式声明卫星图层
|
||||||
|
WebGLParams: {
|
||||||
|
preserveDrawingBuffer: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// if (!scene) {
|
||||||
|
// scene = new Scene({
|
||||||
|
// id: container,
|
||||||
|
// logoVisible: false,
|
||||||
|
// map: new GaodeMap({
|
||||||
|
// token: mapKey?.key ?? undefined,
|
||||||
|
// style: mapStyle,
|
||||||
|
// pitch: misc.mapPitch,
|
||||||
|
// center: basicStyle.autoFit === false ? center : undefined,
|
||||||
|
// zoom: basicStyle.autoFit === false ? basicStyle.zoomLevel : undefined,
|
||||||
|
// showLabel: !(basicStyle.showLabel === false),
|
||||||
|
// WebGLParams: {
|
||||||
|
// preserveDrawingBuffer: true
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// if (scene.getLayers()?.length) {
|
||||||
|
// await scene.removeAllLayer()
|
||||||
|
// scene.setPitch(misc.mapPitch)
|
||||||
|
// scene.setMapStyle(mapStyle)
|
||||||
|
// scene.map.showLabel = !(basicStyle.showLabel === false)
|
||||||
|
// }
|
||||||
|
// if (basicStyle.autoFit === false) {
|
||||||
|
// scene.setZoomAndCenter(basicStyle.zoomLevel, center)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
mapRendering(container)
|
||||||
|
if (mapStyle.indexOf('Satellite') == -1) {
|
||||||
|
scene.once('loaded', () => {
|
||||||
|
mapRendered(container)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
scene.once('loaded', () => {
|
||||||
|
// 创建卫星图层实例
|
||||||
|
const satelliteLayer = new AMap.TileLayer.Satellite()
|
||||||
|
// 与矢量图层叠加显示
|
||||||
|
satelliteLayer.setMap(scene.map)
|
||||||
|
mapRendered(container)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// scene.once('loaded', () => {
|
||||||
|
// mapRendered(container)
|
||||||
|
// })
|
||||||
|
this.configZoomButton(chart, scene)
|
||||||
if (xAxis?.length < 2 || xAxisExt?.length < 2) {
|
if (xAxis?.length < 2 || xAxisExt?.length < 2) {
|
||||||
return new L7Wrapper(scene, undefined)
|
return new L7Wrapper(scene, undefined)
|
||||||
}
|
}
|
||||||
@ -112,11 +195,6 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
configList[0].once('inited', () => {
|
configList[0].once('inited', () => {
|
||||||
mapRendered(container)
|
mapRendered(container)
|
||||||
})
|
})
|
||||||
for (let i = 0; i < configList.length; i++) {
|
|
||||||
configList[i].on('inited', () => {
|
|
||||||
qqMapRendered(scene)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return new L7Wrapper(scene, configList)
|
return new L7Wrapper(scene, configList)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,13 +221,13 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
let lineWidthField = null
|
let lineWidthField = null
|
||||||
const yAxis = deepCopy(chart.yAxis)
|
const yAxis = deepCopy(chart.yAxis)
|
||||||
if (yAxis.length > 0) {
|
if (yAxis.length > 0) {
|
||||||
lineWidthField = yAxis[0].gisbiName
|
lineWidthField = yAxis[0].dataeaseName
|
||||||
}
|
}
|
||||||
// 线条颜色
|
// 线条颜色
|
||||||
let lineColorField = null
|
let lineColorField = null
|
||||||
const yAxisExt = deepCopy(chart.yAxisExt)
|
const yAxisExt = deepCopy(chart.yAxisExt)
|
||||||
if (yAxisExt.length > 0) {
|
if (yAxisExt.length > 0) {
|
||||||
lineColorField = yAxisExt[0].gisbiName
|
lineColorField = yAxisExt[0].dataeaseName
|
||||||
}
|
}
|
||||||
const asteriskField = '*'
|
const asteriskField = '*'
|
||||||
const data = []
|
const data = []
|
||||||
@ -173,10 +251,10 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(data, {
|
.source(data, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].gisbiName,
|
x: xAxis[0].dataeaseName,
|
||||||
y: xAxis[1].gisbiName,
|
y: xAxis[1].dataeaseName,
|
||||||
x1: xAxisExt[0].gisbiName,
|
x1: xAxisExt[0].dataeaseName,
|
||||||
y1: xAxisExt[1].gisbiName
|
y1: xAxisExt[1].dataeaseName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.size(flowLineStyle.size)
|
.size(flowLineStyle.size)
|
||||||
@ -226,11 +304,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].gisbiName,
|
x: xAxis[0].dataeaseName,
|
||||||
y: xAxis[1].gisbiName
|
y: xAxis[1].dataeaseName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape(flowMapStartName[0].gisbiName, args => {
|
.shape(flowMapStartName[0].dataeaseName, args => {
|
||||||
if (has.has('from-' + args)) {
|
if (has.has('from-' + args)) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -254,11 +332,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxisExt[0].gisbiName,
|
x: xAxisExt[0].dataeaseName,
|
||||||
y: xAxisExt[1].gisbiName
|
y: xAxisExt[1].dataeaseName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape(flowMapEndName[0].gisbiName, args => {
|
.shape(flowMapEndName[0].dataeaseName, args => {
|
||||||
if (has.has('from-' + args) || has.has('to-' + args)) {
|
if (has.has('from-' + args) || has.has('to-' + args)) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -287,8 +365,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxis[0].gisbiName,
|
x: xAxis[0].dataeaseName,
|
||||||
y: xAxis[1].gisbiName
|
y: xAxis[1].dataeaseName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape('circle')
|
.shape('circle')
|
||||||
@ -301,8 +379,8 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
.source(chart.data?.tableRow, {
|
.source(chart.data?.tableRow, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
x: xAxisExt[0].gisbiName,
|
x: xAxisExt[0].dataeaseName,
|
||||||
y: xAxisExt[1].gisbiName
|
y: xAxisExt[1].dataeaseName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.shape('circle')
|
.shape('circle')
|
||||||
|
@ -8,16 +8,11 @@ import {
|
|||||||
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
||||||
import { flow, parseJson } from '@/views/chart/components/js/util'
|
import { flow, parseJson } from '@/views/chart/components/js/util'
|
||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
|
import { GaodeMap } from '@antv/l7-maps'
|
||||||
import { Scene } from '@antv/l7-scene'
|
import { Scene } from '@antv/l7-scene'
|
||||||
import { HeatmapLayer } from '@antv/l7-layers'
|
import { HeatmapLayer } from '@antv/l7-layers'
|
||||||
import { DEFAULT_BASIC_STYLE } from '@/views/chart/components/editor/util/chart'
|
import { DEFAULT_BASIC_STYLE } from '@/views/chart/components/editor/util/chart'
|
||||||
import {
|
import { mapRendered, mapRendering } from '@/views/chart/components/js/panel/common/common_antv'
|
||||||
getMapCenter,
|
|
||||||
getMapScene,
|
|
||||||
getMapStyle,
|
|
||||||
mapRendered,
|
|
||||||
qqMapRendered
|
|
||||||
} from '@/views/chart/components/js/panel/common/common_antv'
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,31 +69,94 @@ export class HeatMap extends L7ChartView<Scene, L7Config> {
|
|||||||
basicStyle = parseJson(chart.customAttr).basicStyle
|
basicStyle = parseJson(chart.customAttr).basicStyle
|
||||||
miscStyle = parseJson(chart.customAttr).misc
|
miscStyle = parseJson(chart.customAttr).misc
|
||||||
}
|
}
|
||||||
|
let center: [number, number] = [
|
||||||
|
DEFAULT_BASIC_STYLE.mapCenter.longitude,
|
||||||
|
DEFAULT_BASIC_STYLE.mapCenter.latitude
|
||||||
|
]
|
||||||
|
if (basicStyle.autoFit === false) {
|
||||||
|
center = [basicStyle.mapCenter.longitude, basicStyle.mapCenter.latitude]
|
||||||
|
}
|
||||||
|
let mapStyle = basicStyle.mapStyleUrl
|
||||||
|
if (basicStyle.mapStyle !== 'custom') {
|
||||||
|
mapStyle = `amap://styles/${basicStyle.mapStyle ? basicStyle.mapStyle : 'normal'}`
|
||||||
|
}
|
||||||
const mapKey = await this.getMapKey()
|
const mapKey = await this.getMapKey()
|
||||||
const mapStyle = getMapStyle(mapKey, basicStyle)
|
|
||||||
// 底层
|
// 底层
|
||||||
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
const chartObj = drawOption.chartObj as unknown as L7Wrapper<L7Config, Scene>
|
||||||
let scene = chartObj?.getScene()
|
let scene = chartObj?.getScene()
|
||||||
const center = getMapCenter(basicStyle)
|
if(scene){
|
||||||
scene = await getMapScene(
|
if (scene.getLayers()?.length) {
|
||||||
chart,
|
await scene.removeAllLayer()
|
||||||
scene,
|
scene.setPitch(miscStyle.mapPitch)
|
||||||
container,
|
}
|
||||||
mapKey,
|
}
|
||||||
basicStyle,
|
|
||||||
miscStyle,
|
if (mapStyle.indexOf('Satellite') == -1) {
|
||||||
mapStyle,
|
scene = new Scene({
|
||||||
center
|
id: container,
|
||||||
)
|
logoVisible: false,
|
||||||
this.configZoomButton(chart, scene, mapKey)
|
map: new GaodeMap({
|
||||||
|
token: mapKey?.key ?? undefined,
|
||||||
|
style: mapStyle,
|
||||||
|
pitch: miscStyle.mapPitch,
|
||||||
|
center,
|
||||||
|
zoom: basicStyle.autoFit === false ? basicStyle.zoomLevel : undefined,
|
||||||
|
showLabel: !(basicStyle.showLabel === false),
|
||||||
|
WebGLParams: {
|
||||||
|
preserveDrawingBuffer: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
scene = new Scene({
|
||||||
|
id: container,
|
||||||
|
logoVisible: false,
|
||||||
|
map: new GaodeMap({
|
||||||
|
token: mapKey?.key ?? undefined,
|
||||||
|
style: mapStyle,
|
||||||
|
features: ['bg', 'road'], // 必须开启路网层
|
||||||
|
plugin: ['AMap.TileLayer.Satellite'], // 显式声明卫星图层
|
||||||
|
WebGLParams: {
|
||||||
|
preserveDrawingBuffer: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// } else {
|
||||||
|
// // if (scene.getLayers()?.length) {
|
||||||
|
// await scene.removeAllLayer()
|
||||||
|
// scene.setPitch(miscStyle.mapPitch)
|
||||||
|
// scene.setMapStyle(mapStyle)
|
||||||
|
// scene.map.showLabel = !(basicStyle.showLabel === false)
|
||||||
|
// if (basicStyle.autoFit === false) {
|
||||||
|
// scene.setZoomAndCenter(basicStyle.zoomLevel, center)
|
||||||
|
// }
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
mapRendering(container)
|
||||||
|
if (mapStyle.indexOf('Satellite') == -1) {
|
||||||
|
scene.once('loaded', () => {
|
||||||
|
mapRendered(container)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
scene.once('loaded', () => {
|
||||||
|
// 创建卫星图层实例
|
||||||
|
const satelliteLayer = new AMap.TileLayer.Satellite()
|
||||||
|
// 与矢量图层叠加显示
|
||||||
|
satelliteLayer.setMap(scene.map)
|
||||||
|
mapRendered(container)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.configZoomButton(chart, scene)
|
||||||
if (xAxis?.length < 2 || yAxis?.length < 1) {
|
if (xAxis?.length < 2 || yAxis?.length < 1) {
|
||||||
return new L7Wrapper(scene, undefined)
|
return new L7Wrapper(scene, undefined)
|
||||||
}
|
}
|
||||||
const config: L7Config = new HeatmapLayer({
|
const config: L7Config = new HeatmapLayer({
|
||||||
name: 'line',
|
name: 'line',
|
||||||
blend: 'normal',
|
blend: 'normal',
|
||||||
autoFit: !(basicStyle.autoFit === false),
|
autoFit: !(basicStyle.autoFit === false)
|
||||||
zIndex: 10
|
|
||||||
})
|
})
|
||||||
.source(chart.data?.data, {
|
.source(chart.data?.data, {
|
||||||
parser: {
|
parser: {
|
||||||
@ -119,13 +177,6 @@ export class HeatMap extends L7ChartView<Scene, L7Config> {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
config.once('inited', () => {
|
|
||||||
mapRendered(container)
|
|
||||||
})
|
|
||||||
config.on('inited', () => {
|
|
||||||
qqMapRendered(scene)
|
|
||||||
})
|
|
||||||
|
|
||||||
return new L7Wrapper(scene, config)
|
return new L7Wrapper(scene, config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,11 +14,12 @@ import { ChartLibraryType } from '@/views/chart/components/js/panel/types'
|
|||||||
import { G2PlotChartView } from '@/views/chart/components/js/panel/types/impl/g2plot'
|
import { G2PlotChartView } from '@/views/chart/components/js/panel/types/impl/g2plot'
|
||||||
import { L7PlotChartView } from '@/views/chart/components/js/panel/types/impl/l7plot'
|
import { L7PlotChartView } from '@/views/chart/components/js/panel/types/impl/l7plot'
|
||||||
import chartViewManager from '@/views/chart/components/js/panel'
|
import chartViewManager from '@/views/chart/components/js/panel'
|
||||||
|
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import ViewTrackBar from '@/components/visualization/ViewTrackBar.vue'
|
import ViewTrackBar from '@/components/visualization/ViewTrackBar.vue'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { parseJson } from '@/views/chart/components/js/util'
|
import { parseJson } from '@/views/chart/components/js/util'
|
||||||
import { defaultsDeep, cloneDeep, concat } from 'lodash-es'
|
import { defaultsDeep, cloneDeep } from 'lodash-es'
|
||||||
import ChartError from '@/views/chart/components/views/components/ChartError.vue'
|
import ChartError from '@/views/chart/components/views/components/ChartError.vue'
|
||||||
import { BASE_VIEW_CONFIG } from '../../editor/util/chart'
|
import { BASE_VIEW_CONFIG } from '../../editor/util/chart'
|
||||||
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
|
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
|
||||||
@ -27,8 +28,8 @@ import { isDashboard, trackBarStyleCheck } from '@/utils/canvasUtils'
|
|||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
import { L7ChartView } from '@/views/chart/components/js/panel/types/impl/l7'
|
import { L7ChartView } from '@/views/chart/components/js/panel/types/impl/l7'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { ExportImage } from '@antv/l7'
|
import { ExportImage, Scale, Fullscreen, Control, Scene, TileLayer } from '@antv/l7'
|
||||||
import { configEmptyDataStyle } from '@/views/chart/components/js/panel/common/common_antv'
|
import { GaodeMap } from '@antv/l7-maps';
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, embeddedCallBack, inMobile } =
|
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, embeddedCallBack, inMobile } =
|
||||||
@ -75,11 +76,6 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: 'inherit'
|
default: 'inherit'
|
||||||
},
|
|
||||||
active: {
|
|
||||||
type: Boolean,
|
|
||||||
required: false,
|
|
||||||
default: true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -94,14 +90,6 @@ const emit = defineEmits([
|
|||||||
const g2TypeSeries1 = ['bidirectional-bar']
|
const g2TypeSeries1 = ['bidirectional-bar']
|
||||||
const g2TypeSeries0 = ['bar-range']
|
const g2TypeSeries0 = ['bar-range']
|
||||||
const g2TypeTree = ['circle-packing']
|
const g2TypeTree = ['circle-packing']
|
||||||
const g2TypeStack = [
|
|
||||||
'bar-stack',
|
|
||||||
'bar-group-stack',
|
|
||||||
'percentage-bar-stack',
|
|
||||||
'bar-stack-horizontal',
|
|
||||||
'percentage-bar-stack-horizontal'
|
|
||||||
]
|
|
||||||
const g2TypeGroup = ['bar-group']
|
|
||||||
|
|
||||||
const { view, showPosition, scale, terminal, suffixId } = toRefs(props)
|
const { view, showPosition, scale, terminal, suffixId } = toRefs(props)
|
||||||
|
|
||||||
@ -124,7 +112,8 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
linkageActiveParam: null,
|
linkageActiveParam: null,
|
||||||
pointParam: null,
|
pointParam: null,
|
||||||
data: { fields: [] } // 图表数据
|
data: { fields: [] }, // 图表数据
|
||||||
|
satelliteVisible: false, // 新增卫星图层状态
|
||||||
})
|
})
|
||||||
let chartData = shallowRef<Partial<Chart['data']>>({
|
let chartData = shallowRef<Partial<Chart['data']>>({
|
||||||
fields: []
|
fields: []
|
||||||
@ -145,11 +134,8 @@ const clearLinkage = () => {
|
|||||||
}
|
}
|
||||||
const reDrawView = () => {
|
const reDrawView = () => {
|
||||||
linkageActiveHistory.value = false
|
linkageActiveHistory.value = false
|
||||||
const slider = myChart?.chart?.getController('slider')
|
|
||||||
if (!slider) {
|
|
||||||
myChart?.render()
|
myChart?.render()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const linkageActivePre = () => {
|
const linkageActivePre = () => {
|
||||||
if (linkageActiveHistory.value) {
|
if (linkageActiveHistory.value) {
|
||||||
reDrawView()
|
reDrawView()
|
||||||
@ -160,103 +146,43 @@ const linkageActivePre = () => {
|
|||||||
}
|
}
|
||||||
const linkageActive = () => {
|
const linkageActive = () => {
|
||||||
linkageActiveHistory.value = true
|
linkageActiveHistory.value = true
|
||||||
myChart?.setState('active', () => true, false)
|
|
||||||
myChart?.setState('inactive', () => true, false)
|
|
||||||
myChart?.setState('selected', () => true, false)
|
|
||||||
myChart?.setState('active', param => {
|
myChart?.setState('active', param => {
|
||||||
if (Array.isArray(param)) {
|
if (Array.isArray(param)) {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
return checkSelected(param)
|
if (checkSelected(param)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
myChart?.setState('inactive', param => {
|
myChart?.setState('inactive', param => {
|
||||||
if (Array.isArray(param)) {
|
if (Array.isArray(param)) {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
return !checkSelected(param)
|
if (!checkSelected(param)) {
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
})
|
|
||||||
myChart?.setState('selected', param => {
|
|
||||||
if (Array.isArray(param)) {
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return checkSelected(param)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const checkSelected = param => {
|
const checkSelected = param => {
|
||||||
// 获取当前视图的所有联动字段ID
|
|
||||||
const mappingFieldIds = Array.from(
|
|
||||||
new Set(
|
|
||||||
(view.value.type.includes('chart-mix')
|
|
||||||
? concat(chartData.value?.left?.fields, chartData.value?.right?.fields)
|
|
||||||
: chartData.value?.fields
|
|
||||||
)
|
|
||||||
.map(item => item?.id)
|
|
||||||
.filter(id =>
|
|
||||||
Object.keys(nowPanelTrackInfo.value).some(
|
|
||||||
key => key.startsWith(view.value.id) && key.split('#')[1] === id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
// 维度字段匹配
|
|
||||||
const [xAxis, xAxisExt, extStack] = ['xAxis', 'xAxisExt', 'extStack'].map(key =>
|
|
||||||
view.value[key].find(item => mappingFieldIds.includes(item.id))
|
|
||||||
)
|
|
||||||
// 选中字段数据
|
|
||||||
const { group, name, category } = state.linkageActiveParam
|
|
||||||
// 选中字段数据匹配
|
|
||||||
if (g2TypeSeries1.includes(view.value.type)) {
|
if (g2TypeSeries1.includes(view.value.type)) {
|
||||||
return name === param.field
|
return state.linkageActiveParam.name === param.field
|
||||||
} else if (g2TypeSeries0.includes(view.value.type)) {
|
} else if (g2TypeSeries0.includes(view.value.type)) {
|
||||||
return category === param.category
|
return state.linkageActiveParam.category === param.category
|
||||||
} else if (g2TypeTree.includes(view.value.type)) {
|
} else if (g2TypeTree.includes(view.value.type)) {
|
||||||
if (param.path?.startsWith(name) || name === t('commons.all')) {
|
if (
|
||||||
|
param.path?.startsWith(state.linkageActiveParam.name) ||
|
||||||
|
state.linkageActiveParam.name === t('commons.all')
|
||||||
|
) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return name === param.name
|
return state.linkageActiveParam.name === param.name
|
||||||
} else if (g2TypeGroup.includes(view.value.type)) {
|
|
||||||
const isNameMatch = name === param.name || (name === 'NO_DATA' && !param.name)
|
|
||||||
const isCategoryMatch = category === param.category
|
|
||||||
if (xAxis && xAxisExt) {
|
|
||||||
return isNameMatch && isCategoryMatch
|
|
||||||
}
|
|
||||||
if (xAxis && !xAxisExt) {
|
|
||||||
return isNameMatch
|
|
||||||
}
|
|
||||||
if (!xAxis && xAxisExt) {
|
|
||||||
return isCategoryMatch
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
} else if (g2TypeStack.includes(view.value.type)) {
|
|
||||||
const isGroupMatch = group === param.group || (group === 'NO_DATA' && !param.group)
|
|
||||||
const isNameMatch = name === param.name || (name === 'NO_DATA' && !param.name)
|
|
||||||
const isCategoryMatch = category === param.category
|
|
||||||
// 全部匹配
|
|
||||||
if (xAxis && xAxisExt && extStack) {
|
|
||||||
return isNameMatch && isGroupMatch && isCategoryMatch
|
|
||||||
}
|
|
||||||
// 只匹配到维度
|
|
||||||
if (xAxis && !xAxisExt && !extStack) {
|
|
||||||
return isNameMatch
|
|
||||||
} else if (!xAxis && xAxisExt && !extStack) {
|
|
||||||
return isGroupMatch
|
|
||||||
} else if (!xAxis && !xAxisExt && extStack) {
|
|
||||||
return isCategoryMatch
|
|
||||||
} else if (xAxis && xAxisExt && !extStack) {
|
|
||||||
return isNameMatch && isGroupMatch
|
|
||||||
} else if (xAxis && !xAxisExt && extStack) {
|
|
||||||
return isNameMatch && isCategoryMatch
|
|
||||||
} else if (!xAxis && xAxisExt && extStack) {
|
|
||||||
return isGroupMatch && isCategoryMatch
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
(name === param.name || (name === 'NO_DATA' && !param.name)) && category === param.category
|
(state.linkageActiveParam.name === param.name ||
|
||||||
|
(state.linkageActiveParam.name === 'NO_DATA' && !param.name)) &&
|
||||||
|
state.linkageActiveParam.category === param.category
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,8 +276,6 @@ const renderG2Plot = async (chart, chartView: G2PlotChartView<any, any>) => {
|
|||||||
g2Timer && clearTimeout(g2Timer)
|
g2Timer && clearTimeout(g2Timer)
|
||||||
g2Timer = setTimeout(async () => {
|
g2Timer = setTimeout(async () => {
|
||||||
try {
|
try {
|
||||||
// 在这里清理掉之前图表的空dom
|
|
||||||
configEmptyDataStyle([1], containerId)
|
|
||||||
myChart?.destroy()
|
myChart?.destroy()
|
||||||
myChart = await chartView.drawChart({
|
myChart = await chartView.drawChart({
|
||||||
chartObj: myChart,
|
chartObj: myChart,
|
||||||
@ -373,6 +297,7 @@ const renderG2Plot = async (chart, chartView: G2PlotChartView<any, any>) => {
|
|||||||
|
|
||||||
const dynamicAreaId = ref('')
|
const dynamicAreaId = ref('')
|
||||||
const country = ref('')
|
const country = ref('')
|
||||||
|
const appStore = useAppStoreWithOut()
|
||||||
const chartContainer = ref<HTMLElement>(null)
|
const chartContainer = ref<HTMLElement>(null)
|
||||||
let scope
|
let scope
|
||||||
let mapTimer: number
|
let mapTimer: number
|
||||||
@ -409,21 +334,101 @@ const renderL7Plot = async (chart: ChartObj, chartView: L7PlotChartView<any, any
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mapL7Timer: number
|
let mapL7Timer: number
|
||||||
|
let scaleControl: Scale | null = null // 存储比例尺实例
|
||||||
|
let fullscreenControl
|
||||||
|
let satelliteControlInstance = null; // 用于存储卫星控件实例
|
||||||
const renderL7 = async (chart: ChartObj, chartView: L7ChartView<any, any>, callback) => {
|
const renderL7 = async (chart: ChartObj, chartView: L7ChartView<any, any>, callback) => {
|
||||||
mapL7Timer && clearTimeout(mapL7Timer)
|
mapL7Timer && clearTimeout(mapL7Timer);
|
||||||
mapL7Timer = setTimeout(async () => {
|
mapL7Timer = setTimeout(async () => {
|
||||||
myChart = await chartView.drawChart({
|
myChart = await chartView.drawChart({
|
||||||
chartObj: myChart,
|
chartObj: myChart,
|
||||||
container: containerId,
|
container: containerId,
|
||||||
chart: chart,
|
chart: chart,
|
||||||
action
|
action
|
||||||
})
|
});
|
||||||
myChart?.render()
|
|
||||||
callback?.()
|
// 清除已有比例尺
|
||||||
emit('resetLoading')
|
if (!scaleControl) {
|
||||||
}, 500)
|
scaleControl = new Scale({
|
||||||
|
position: 'bottomleft',
|
||||||
|
imperial: false
|
||||||
|
});
|
||||||
|
myChart.getScene()?.addControl(scaleControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 创建并添加新比例尺
|
||||||
|
|
||||||
|
|
||||||
|
// 添加全屏控件
|
||||||
|
if (fullscreenControl) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
fullscreenControl = new Fullscreen({
|
||||||
|
position: 'bottomright',
|
||||||
|
});
|
||||||
|
myChart.getScene()?.addControl(fullscreenControl, 'bottomright');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ====== 使用高德地图原生API实现卫星图层切换 ======
|
||||||
|
let satelliteLayer: any = null;
|
||||||
|
let isSatelliteVisible = false;
|
||||||
|
|
||||||
|
class SatelliteControl extends Control {
|
||||||
|
protected onAdd() {
|
||||||
|
const btn = document.createElement('button');
|
||||||
|
btn.className = 'l7-control-button l7-satellite-control';
|
||||||
|
btn.innerHTML = '卫星';
|
||||||
|
// btn.title = '切换到卫星视图';
|
||||||
|
btn.style.backgroundColor = '#000';
|
||||||
|
btn.style.color = '#fff';
|
||||||
|
btn.style.padding = '2px';
|
||||||
|
btn.style.borderRadius = '4px';
|
||||||
|
btn.style.cursor = 'pointer'
|
||||||
|
btn.style.fontSize = '11px';
|
||||||
|
const scene = myChart.getScene()
|
||||||
|
// 确保地图加载完成
|
||||||
|
scene.on('loaded', () => {
|
||||||
|
// 创建高德卫星图层
|
||||||
|
satelliteLayer = new window.AMap.TileLayer.Satellite();
|
||||||
|
btn.onclick = () => {
|
||||||
|
isSatelliteVisible = !isSatelliteVisible;
|
||||||
|
|
||||||
|
if (isSatelliteVisible) {
|
||||||
|
// 使用 scene.addLayer 方法添加卫星图层
|
||||||
|
btn.style.backgroundColor = '#409eff';
|
||||||
|
scene.map.add(satelliteLayer)
|
||||||
|
} else {
|
||||||
|
// 使用 scene.removeLayer 方法移除卫星图层
|
||||||
|
btn.style.backgroundColor = '#000';
|
||||||
|
scene.map.remove(satelliteLayer)
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return btn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加控件到地图
|
||||||
|
// 移除之前的卫星控件(如果存在)
|
||||||
|
if (satelliteControlInstance) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 添加新的卫星控件到地图
|
||||||
|
satelliteControlInstance = new SatelliteControl({ position: 'bottomright' });
|
||||||
|
myChart.getScene()?.addControl(satelliteControlInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ====== 修复完成 ======
|
||||||
|
|
||||||
|
myChart?.render();
|
||||||
|
callback?.();
|
||||||
|
emit('resetLoading');
|
||||||
|
}, 500);
|
||||||
|
};
|
||||||
const pointClickTrans = () => {
|
const pointClickTrans = () => {
|
||||||
if (embeddedCallBack.value === 'yes') {
|
if (embeddedCallBack.value === 'yes') {
|
||||||
trackClick('pointClick')
|
trackClick('pointClick')
|
||||||
@ -437,8 +442,11 @@ const actionDefault = param => {
|
|||||||
if (param.from === 'word-cloud') {
|
if (param.from === 'word-cloud') {
|
||||||
emitter.emit('word-cloud-default-data-range', param)
|
emitter.emit('word-cloud-default-data-range', param)
|
||||||
}
|
}
|
||||||
if (param.from === 'gauge' || param.from === 'liquid') {
|
if (param.from === 'gauge') {
|
||||||
emitter.emit('gauge-liquid-y-value', param)
|
emitter.emit('gauge-default-data', param)
|
||||||
|
}
|
||||||
|
if (param.from === 'liquid') {
|
||||||
|
emitter.emit('liquid-default-data', param)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,8 +466,7 @@ const action = param => {
|
|||||||
// 下钻 联动 跳转
|
// 下钻 联动 跳转
|
||||||
state.linkageActiveParam = {
|
state.linkageActiveParam = {
|
||||||
category: state.pointParam.data.category ? state.pointParam.data.category : 'NO_DATA',
|
category: state.pointParam.data.category ? state.pointParam.data.category : 'NO_DATA',
|
||||||
name: state.pointParam.data.name ? state.pointParam.data.name : 'NO_DATA',
|
name: state.pointParam.data.name ? state.pointParam.data.name : 'NO_DATA'
|
||||||
group: state.pointParam.data.group ? state.pointParam.data.group : 'NO_DATA'
|
|
||||||
}
|
}
|
||||||
if (trackMenu.value.length < 2) {
|
if (trackMenu.value.length < 2) {
|
||||||
// 只有一个事件直接调用
|
// 只有一个事件直接调用
|
||||||
@ -489,7 +496,7 @@ const action = param => {
|
|||||||
state.trackBarStyle.top = trackBarY + 'px'
|
state.trackBarStyle.top = trackBarY + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
viewTrack.value.trackButtonClick(view.value.id)
|
viewTrack.value.trackButtonClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,28 +505,10 @@ const trackClick = trackAction => {
|
|||||||
if (!param?.data?.dimensionList) {
|
if (!param?.data?.dimensionList) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let checkName = undefined
|
let checkName = state.pointParam.data.name
|
||||||
if (param.data.dimensionList.length > 1) {
|
|
||||||
// 分组堆叠处理 去能比较出来值的那个维度
|
|
||||||
if (view.value.type === 'bar-group-stack') {
|
|
||||||
const length = param.data.dimensionList.length
|
|
||||||
// 存在最后一个id
|
|
||||||
if (param.data.dimensionList[length - 1].id === param.data.dimensionList[length - 2].id) {
|
|
||||||
param.data.dimensionList.pop()
|
|
||||||
}
|
|
||||||
param.data.dimensionList.forEach(dimension => {
|
|
||||||
if (dimension.value === param.data.category) {
|
|
||||||
checkName = dimension.id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!checkName) {
|
|
||||||
// 对多维度的处理 取第一个
|
// 对多维度的处理 取第一个
|
||||||
checkName = param.data.dimensionList[0].id
|
if (state.pointParam.data.dimensionList.length > 1) {
|
||||||
}
|
checkName = state.pointParam.data.dimensionList[0].id
|
||||||
}
|
|
||||||
if (!checkName) {
|
|
||||||
checkName = param.data.name
|
|
||||||
}
|
}
|
||||||
// 跳转字段处理
|
// 跳转字段处理
|
||||||
let jumpName = state.pointParam.data.name
|
let jumpName = state.pointParam.data.name
|
||||||
@ -558,7 +547,7 @@ const trackClick = trackAction => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let quotaList = state.pointParam.data.quotaList
|
let quotaList = state.pointParam.data.quotaList
|
||||||
if (['bar-range', 'bullet-graph'].includes(curView.type)) {
|
if (['bar-range'].includes(curView.type)) {
|
||||||
quotaList = state.pointParam.data.dimensionList
|
quotaList = state.pointParam.data.dimensionList
|
||||||
} else {
|
} else {
|
||||||
quotaList[0]['value'] = state.pointParam.data.value
|
quotaList[0]['value'] = state.pointParam.data.value
|
||||||
@ -613,17 +602,10 @@ const trackMenu = computed(() => {
|
|||||||
let trackMenuInfo = []
|
let trackMenuInfo = []
|
||||||
// 复用、放大状态的仪表板不进行联动、跳转和下钻的动作
|
// 复用、放大状态的仪表板不进行联动、跳转和下钻的动作
|
||||||
if (!['multiplexing', 'viewDialog'].includes(showPosition.value)) {
|
if (!['multiplexing', 'viewDialog'].includes(showPosition.value)) {
|
||||||
let drillFields =
|
|
||||||
curView?.drill && curView?.drillFilters?.length
|
|
||||||
? curView.drillFilters.map(item => item.fieldId)
|
|
||||||
: []
|
|
||||||
let linkageCount = 0
|
let linkageCount = 0
|
||||||
let jumpCount = 0
|
let jumpCount = 0
|
||||||
if (curView?.type?.includes('chart-mix')) {
|
if (curView?.type?.includes('chart-mix')) {
|
||||||
Array.of('left', 'right').forEach(side => {
|
chartData.value?.left?.fields?.forEach(item => {
|
||||||
chartData.value?.[side]?.fields
|
|
||||||
?.filter(item => !drillFields.includes(item.id))
|
|
||||||
.forEach(item => {
|
|
||||||
const sourceInfo = view.value.id + '#' + item.id
|
const sourceInfo = view.value.id + '#' + item.id
|
||||||
if (nowPanelTrackInfo.value[sourceInfo]) {
|
if (nowPanelTrackInfo.value[sourceInfo]) {
|
||||||
linkageCount++
|
linkageCount++
|
||||||
@ -632,11 +614,17 @@ const trackMenu = computed(() => {
|
|||||||
jumpCount++
|
jumpCount++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
chartData.value?.right?.fields?.forEach(item => {
|
||||||
|
const sourceInfo = view.value.id + '#' + item.id
|
||||||
|
if (nowPanelTrackInfo.value[sourceInfo]) {
|
||||||
|
linkageCount++
|
||||||
|
}
|
||||||
|
if (nowPanelJumpInfo.value[sourceInfo]) {
|
||||||
|
jumpCount++
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
chartData.value?.fields
|
chartData.value?.fields?.forEach(item => {
|
||||||
?.filter(item => !drillFields.includes(item.id))
|
|
||||||
.forEach(item => {
|
|
||||||
const sourceInfo = view.value.id + '#' + item.id
|
const sourceInfo = view.value.id + '#' + item.id
|
||||||
if (nowPanelTrackInfo.value[sourceInfo]) {
|
if (nowPanelTrackInfo.value[sourceInfo]) {
|
||||||
linkageCount++
|
linkageCount++
|
||||||
@ -694,7 +682,7 @@ const canvas2Picture = (pictureData, online) => {
|
|||||||
mapDom.appendChild(imgDom)
|
mapDom.appendChild(imgDom)
|
||||||
}
|
}
|
||||||
const preparePicture = id => {
|
const preparePicture = id => {
|
||||||
if (id !== curView?.id) {
|
if (id !== curView.id) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const chartView = chartViewManager.getChartView(curView.render, curView.type)
|
const chartView = chartViewManager.getChartView(curView.render, curView.type)
|
||||||
@ -718,7 +706,7 @@ const preparePicture = id => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const unPreparePicture = id => {
|
const unPreparePicture = id => {
|
||||||
if (id !== curView?.id) {
|
if (id !== curView.id) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const chartView = chartViewManager.getChartView(curView.render, curView.type)
|
const chartView = chartViewManager.getChartView(curView.render, curView.type)
|
||||||
@ -746,7 +734,6 @@ defineExpose({
|
|||||||
trackMenu,
|
trackMenu,
|
||||||
clearLinkage
|
clearLinkage
|
||||||
})
|
})
|
||||||
let intersectionObserver
|
|
||||||
let resizeObserver
|
let resizeObserver
|
||||||
const TOLERANCE = 0.01
|
const TOLERANCE = 0.01
|
||||||
const RESIZE_MONITOR_CHARTS = ['map', 'bubble-map', 'flow-map', 'heat-map']
|
const RESIZE_MONITOR_CHARTS = ['map', 'bubble-map', 'flow-map', 'heat-map']
|
||||||
@ -771,32 +758,13 @@ onMounted(() => {
|
|||||||
preSize[1] = size.blockSize
|
preSize[1] = size.blockSize
|
||||||
})
|
})
|
||||||
resizeObserver.observe(containerDom)
|
resizeObserver.observe(containerDom)
|
||||||
intersectionObserver = new IntersectionObserver(([entry]) => {
|
|
||||||
if (RESIZE_MONITOR_CHARTS.includes(view.value.type)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (entry.intersectionRatio <= 0) {
|
|
||||||
myChart?.emit('tooltip:hidden')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
intersectionObserver.observe(containerDom)
|
|
||||||
useEmitt({ name: 'l7-prepare-picture', callback: preparePicture })
|
useEmitt({ name: 'l7-prepare-picture', callback: preparePicture })
|
||||||
useEmitt({ name: 'l7-unprepare-picture', callback: unPreparePicture })
|
useEmitt({ name: 'l7-unprepare-picture', callback: unPreparePicture })
|
||||||
})
|
})
|
||||||
const MAP_CHARTS = ['map', 'bubble-map', 'flow-map', 'heat-map', 'symbolic-map']
|
|
||||||
const onWheel = (e: WheelEvent) => {
|
|
||||||
if (!MAP_CHARTS.includes(view.value.type)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!props.active) {
|
|
||||||
e.stopPropagation()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
try {
|
try {
|
||||||
myChart?.destroy()
|
myChart?.destroy()
|
||||||
resizeObserver?.disconnect()
|
resizeObserver?.disconnect()
|
||||||
intersectionObserver?.disconnect()
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e)
|
console.warn(e)
|
||||||
}
|
}
|
||||||
@ -805,22 +773,9 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="canvas-area">
|
<div class="canvas-area">
|
||||||
<view-track-bar
|
<view-track-bar ref="viewTrack" :track-menu="trackMenu" :font-family="fontFamily" :is-data-v-mobile="dataVMobile"
|
||||||
ref="viewTrack"
|
class="track-bar" :style="state.trackBarStyle" @trackClick="trackClick" />
|
||||||
:track-menu="trackMenu"
|
<div v-if="!isError" ref="chartContainer" class="canvas-content" :id="containerId"></div>
|
||||||
:font-family="fontFamily"
|
|
||||||
:is-data-v-mobile="dataVMobile"
|
|
||||||
class="track-bar"
|
|
||||||
:style="state.trackBarStyle"
|
|
||||||
@trackClick="trackClick"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
@wheel.capture="onWheel"
|
|
||||||
v-if="!isError"
|
|
||||||
ref="chartContainer"
|
|
||||||
class="canvas-content"
|
|
||||||
:id="containerId"
|
|
||||||
></div>
|
|
||||||
<chart-error v-else :err-msg="errMsg" />
|
<chart-error v-else :err-msg="errMsg" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -831,12 +786,32 @@ onBeforeUnmount(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
|
||||||
.canvas-content {
|
.canvas-content {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
|
|
||||||
:deep(.g2-tooltip) {
|
:deep(.g2-tooltip) {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
:deep(.l7-button-control) {
|
||||||
|
background-color: #000000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.l7-button-control:not(:disabled):hover) {
|
||||||
|
background-color: #000000d5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.l7-button-control .l7-iconfont) {
|
||||||
|
fill: #fff !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// :deep(.l7-control-container .l7-top) {
|
||||||
|
// top: auto !important;
|
||||||
|
// bottom: 133px !important;
|
||||||
|
|
||||||
|
// }</style>
|
||||||
|
@ -194,7 +194,7 @@ init()
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.union-container {
|
.union-container {
|
||||||
height: 275px;
|
height: 270px;
|
||||||
font-family: var(--de-custom_font, 'PingFang');
|
font-family: var(--de-custom_font, 'PingFang');
|
||||||
}
|
}
|
||||||
.union-header {
|
.union-header {
|
||||||
@ -271,7 +271,7 @@ init()
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.union-body-item {
|
.union-body-item {
|
||||||
height: 32px;
|
height: 33px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
@ -4,7 +4,7 @@ import { useRouter, useRoute } from 'vue-router'
|
|||||||
import { ElMessage,ElMessageBox } from 'element-plus-secondary'
|
import { ElMessage,ElMessageBox } from 'element-plus-secondary'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { publicTree } from '@/utils/validate';
|
import { publicTree } from '@/utils/validate';
|
||||||
import { moduleList,moduleAdd,moduleUpdate,moduleDel } from '@/api/application/module'
|
import { moduleList,moduleAdd,moduleUpdate,moduleDel,moduleCopy } from '@/api/application/module'
|
||||||
const emit = defineEmits(['handleNodeClick'])
|
const emit = defineEmits(['handleNodeClick'])
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -207,7 +207,30 @@ function saveData(){ // 保存
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
function moveTreeClic(){ // 移动
|
function copyClick(){
|
||||||
|
ElMessageBox.confirm('是否确定复制该'+ (dataInfo.value.nodeType == '01'?'目录' : '模块'), {
|
||||||
|
confirmButtonType: 'primary',
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
}).then(() => {
|
||||||
|
moduleCopy(dataInfo.value.id).then((res) => {
|
||||||
|
if(res.code == '0' && res.data.code == '0'){
|
||||||
|
ElMessage.success('复制成功')
|
||||||
|
getInit()
|
||||||
|
}else{
|
||||||
|
ElMessage.error(res.data.msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
isDialog.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
isSwitch.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
function moveTreeClic(){ //
|
||||||
|
|
||||||
}
|
}
|
||||||
function editTreeClic(){ // 编辑
|
function editTreeClic(){ // 编辑
|
||||||
isSwitch.value = false
|
isSwitch.value = false
|
||||||
@ -333,8 +356,8 @@ function delTreeClic(){ // 删除
|
|||||||
<div class="drag-main-text" v-if="popupType == 1" @click="addTreeClic('模块')">新建模块</div>
|
<div class="drag-main-text" v-if="popupType == 1" @click="addTreeClic('模块')">新建模块</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="drag-main-text" v-if="popupType == 2" @click="addTreeClic('目录')">复制</div>
|
<div class="drag-main-text" v-if="popupType == 2" @click="copyClick">复制</div>
|
||||||
<div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="moveTreeClic">移动到</div>
|
<!-- <div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="moveTreeClic">移动到</div> -->
|
||||||
<div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="editTreeClic">重命名</div>
|
<div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="editTreeClic">重命名</div>
|
||||||
<div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="delTreeClic">删除</div>
|
<div class="drag-main-text" v-if="popupType == 2 || popupType == 3" @click="delTreeClic">删除</div>
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ init()
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.union-container {
|
.union-container {
|
||||||
height: 275px;
|
height: 270px;
|
||||||
font-family: var(--de-custom_font, 'PingFang');
|
font-family: var(--de-custom_font, 'PingFang');
|
||||||
}
|
}
|
||||||
.union-header {
|
.union-header {
|
||||||
@ -270,7 +270,7 @@ init()
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.union-body-item {
|
.union-body-item {
|
||||||
height: 32px;
|
height: 33px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
Loading…
Reference in New Issue
Block a user