This commit is contained in:
jingna 2025-05-30 18:30:32 +08:00
commit 2959b0db06
26 changed files with 8902 additions and 8894 deletions

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.baseinfo.mapper.ApplicationMapper">
</mapper>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.module.mapper.ModuleMapper">
</mapper>

View File

@ -47,7 +47,7 @@ public class ModuleServiceImpl extends ServiceImpl<ModuleMapper, Module> impleme
public boolean createModule(Module module) {
boolean isok=this.save(module);
if(isok){
if(module.getType().equals("03"))//GIS大屏页面
if(module.getType().equals("03"))//GIS大屏页面和数据大屏页面
{
DataVisualizationInfo visualizationInfo = new DataVisualizationInfo();
visualizationInfo.setId(Long.parseLong(module.getId()));
@ -60,6 +60,18 @@ public class ModuleServiceImpl extends ServiceImpl<ModuleMapper, Module> impleme
visualizationInfo.setComponentData("[]");
long id=coreVisualizationManage.preInnerSave(visualizationInfo);
return true;
}else if(module.getType().equals("0301")){//数据大屏页面
DataVisualizationInfo visualizationInfo = new DataVisualizationInfo();
visualizationInfo.setId(Long.parseLong(module.getId()));
visualizationInfo.setAppId(module.getAppId());
visualizationInfo.setName(module.getName());
visualizationInfo.setPid(Long.parseLong(module.getPid()));
visualizationInfo.setNodeType("leaf");
visualizationInfo.setType("dashboard");
visualizationInfo.setCanvasStyleData("{\"width\":1920,\"height\":1080,\"refreshViewEnable\":false,\"refreshViewLoading\":true,\"refreshUnit\":\"minute\",\"refreshTime\":5,\"scale\":78,\"scaleWidth\":78,\"scaleHeight\":78,\"backgroundColorSelect\":true,\"backgroundImageEnable\":false,\"backgroundType\":\"backgroundColor\",\"background\":\"\",\"openCommonStyle\":true,\"opacity\":1,\"fontSize\":14,\"themeId\":\"10002\",\"color\":\"#000000\",\"backgroundColor\":\"rgba(166, 227, 123, 1)\",\"dashboard\":{\"gap\":\"yes\",\"gapSize\":5,\"resultMode\":\"all\",\"resultCount\":1000,\"themeColor\":\"dark\",\"mobileSetting\":{\"customSetting\":false,\"imageUrl\":null,\"backgroundType\":\"image\",\"color\":\"#000\"},\"showGrid\":false,\"matrixBase\":4},\"component\":{\"chartTitle\":{\"show\":true,\"fontSize\":16,\"hPosition\":\"left\",\"vPosition\":\"top\",\"isItalic\":false,\"isBolder\":true,\"remarkShow\":false,\"remark\":\"\",\"fontFamily\":\"\",\"letterSpace\":\"0\",\"fontShadow\":false,\"color\":\"#FFFFFF\",\"remarkBackgroundColor\":\"#5A5C62\"},\"chartColor\":{\"basicStyle\":{\"colorScheme\":\"default\",\"colors\":[\"#1E90FF\",\"#90EE90\",\"#00CED1\",\"#E2BD84\",\"#7A90E0\",\"#3BA272\",\"#2BE7FF\",\"#0A8ADA\",\"#FFD700\"],\"alpha\":100,\"gradient\":false,\"mapStyle\":\"darkblue\",\"areaBaseColor\":\"#5470C6\",\"areaBorderColor\":\"#EBEEF5\",\"gaugeStyle\":\"default\",\"tableBorderColor\":\"#CCCCCC\",\"tableScrollBarColor\":\"#FFFFFF80\",\"zoomButtonColor\":\"#fff\",\"zoomBackground\":\"#000\"},\"misc\":{\"flowMapConfig\":{\"lineConfig\":{\"mapLineGradient\":false,\"mapLineSourceColor\":\"#146C94\",\"mapLineTargetColor\":\"#576CBC\"}},\"nameFontColor\":\"#ffffff\",\"valueFontColor\":\"#5470c6\"},\"tableHeader\":{\"tableHeaderBgColor\":\"#1E90FF\",\"tableHeaderCornerBgColor\":\"#1E90FF\",\"tableHeaderColBgColor\":\"#1E90FF\",\"tableHeaderFontColor\":\"#FFFFFF\",\"tableHeaderCornerFontColor\":\"#FFFFFF\",\"tableHeaderColFontColor\":\"#FFFFFF\"},\"tableCell\":{\"tableItemBgColor\":\"#131E42\",\"tableFontColor\":\"#FFFFFF\",\"tableItemSubBgColor\":\"#EEEEEE\"}},\"chartCommonStyle\":{\"backgroundColorSelect\":true,\"backdropFilterEnable\":true,\"backgroundImageEnable\":false,\"backgroundType\":\"innerImage\",\"innerImage\":\"board/board_1.svg\",\"outerImage\":null,\"innerPadding\":1,\"borderRadius\":0,\"backdropFilter\":4,\"backgroundColor\":\"rgba(19,28,66,1)\",\"innerImageColor\":\"#1094E5\"},\"filterStyle\":{\"layout\":\"vertical\",\"titleLayout\":\"left\",\"labelColor\":\"#FFFFFF\",\"titleColor\":\"#FFFFFF\",\"color\":\"#FFFFFF\",\"borderColor\":\"#484747\",\"text\":\"#AFAFAF\",\"bgColor\":\"#131C42\"},\"tabStyle\":{\"headPosition\":\"left\",\"headFontColor\":\"#FFFFFF\",\"headFontActiveColor\":\"#FFFFFF\",\"headBorderColor\":\"#131E42\",\"headBorderActiveColor\":\"#131E42\"},\"seniorStyleSetting\":{\"linkageIconColor\":\"#FFFFFF\",\"drillLayerColor\":\"#FFFFFF\",\"pagerColor\":\"#FFFFFFFF\"}},\"fontFamily\":\"PingFang\",\"suspensionButtonAvailable\":false,\"screenAdaptor\":\"widthFirst\",\"dashboardAdaptor\":\"keepHeightAndWidth\",\"refreshBrowserEnable\":false,\"refreshBrowserUnit\":\"minute\",\"refreshBrowserTime\":5,\"popupAvailable\":true,\"popupButtonAvailable\":true}");
visualizationInfo.setComponentData("[]");
long id=coreVisualizationManage.preInnerSave(visualizationInfo);
return true;
}
}
return false;
@ -79,9 +91,10 @@ public class ModuleServiceImpl extends ServiceImpl<ModuleMapper, Module> impleme
list.add(createInitModule(appId,"登录页面","01",1));
list.add(createInitModule(appId,"主框架页面","02",2));
list.add(createInitModule(appId,"GIS大屏页面","03",3));
list.add(createInitModule(appId,"二级弹窗页面","04",4));
list.add(createInitModule(appId,"数据填报页面","05",5));
list.add(createInitModule(appId,"文档资源页面","06",6));
list.add(createInitModule(appId,"数据看板页面","0301",4));
list.add(createInitModule(appId,"二级弹窗页面","04",5));
list.add(createInitModule(appId,"数据填报页面","05",6));
list.add(createInitModule(appId,"文档资源页面","06",7));
list.add(createInitModule(appId,"自定义页面","09",9));
boolean isok=this.saveBatch(list);
return isok;

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.system.mapper.MenuMapper">
</mapper>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.system.mapper.OrganizationMapper">
</mapper>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.system.mapper.RoleMapper">
</mapper>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.gisbi.application.system.mapper.UserMapper">
</mapper>

View File

@ -14,7 +14,7 @@ import java.util.List;
public interface CoreDataSetExtMapper {
@Select("""
select id, name, node_type, pid from core_dataset_group
select id, name, node_type, pid,app_id from core_dataset_group
${ew.customSqlSegment}
""")
List<DataSetNodePO> query(@Param("ew") QueryWrapper queryWrapper);

View File

@ -14,7 +14,7 @@ public class DataSetNodePO implements Serializable {
@Serial
private static final long serialVersionUID = -4457506330575500164L;
private String appId;
private Long id;
private String name;
private String nodeType;

View File

@ -15,7 +15,7 @@ public class DataSetNodeBO implements TreeBaseModel {
@Serial
private static final long serialVersionUID = 728340676442387790L;
private String appId;
private Long id;
private String name;
private Boolean leaf;

View File

@ -228,7 +228,7 @@ public class DatasetGroupManage {
queryWrapper.orderByDesc("create_time");
List<DataSetNodePO> pos = coreDataSetExtMapper.query(queryWrapper);
List<DataSetNodeBO> nodes = new ArrayList<>();
if (ObjectUtils.isEmpty(request.getLeaf()) || !request.getLeaf()) nodes.add(rootNode());
if (ObjectUtils.isEmpty(request.getLeaf()) || !request.getLeaf()) nodes.add(rootNode(request.getAppId()));
List<DataSetNodeBO> bos = pos.stream().map(this::convert).toList();
if (CollectionUtils.isNotEmpty(bos)) {
nodes.addAll(bos);
@ -275,12 +275,12 @@ public class DatasetGroupManage {
return datasourceDTOList;
}
private DataSetNodeBO rootNode() {
return new DataSetNodeBO(0L, "root", false, 7, -1L, 0);
private DataSetNodeBO rootNode(String appId) {
return new DataSetNodeBO(appId,0L, "root", false, 7, -1L, 0);
}
private DataSetNodeBO convert(DataSetNodePO po) {
return new DataSetNodeBO(po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), leafType), 9, po.getPid(), 0);
return new DataSetNodeBO(po.getAppId(),po.getId(), po.getName(), StringUtils.equals(po.getNodeType(), leafType), 9, po.getPid(), 0);
}
public void checkName(DatasetGroupInfoDTO dto) {

View File

@ -2,13 +2,13 @@ export default {
server: {
proxy: {
'/api/f': {
target: 'http://192.168.1.38:8100',
target: 'http://192.168.1.58:8100',
changeOrigin: true,
rewrite: path => path.replace(/^\/api\/f/, '')
},
// 使用 proxy 实例
'/api': {
target: 'http://192.168.1.38:8100',
target: 'http://192.168.1.58:8100',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}

View File

@ -49,6 +49,8 @@ import { useCache } from '@/hooks/web/useCache'
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
import DeAppApply from '@/views/common/DeAppApply.vue'
import { useUserStoreWithOut } from '@/store/modules/user'
import { useRoute } from 'vue-router'
const route = useRoute()
const { t } = useI18n()
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
@ -265,9 +267,10 @@ const clearCanvas = () => {
}
const backToMain = () => {
let url = '#/panel/index'
if (dvInfo.value.id) {
url = url + '?dvId=' + dvInfo.value.id
let url = '#/module'
const appId:any = route.query.appId
if (appId) {
url = url + '?id=' + appId
}
if (styleChangeTimes.value > 0) {
ElMessageBox.confirm(t('components.sure_to_exit'), {

View File

@ -73,6 +73,8 @@ const dvModel = 'dataV'
const outerParamsSetRef = ref(null)
const fullScreeRef = ref(null)
const userStore = useUserStoreWithOut()
import { useRoute } from 'vue-router'
const route = useRoute()
const { t } = useI18n()
const props = defineProps({
@ -221,10 +223,13 @@ const editCanvasName = () => {
}
const backToMain = () => {
let url = '#/screen/index'
if (dvInfo.value.id) {
url = url + '?dvId=' + dvInfo.value.id
let url = '#/module'
const appId:any = route.query.appId
if (appId) {
url = url + '?id=' + appId
}
if (styleChangeTimes.value > 0) {
ElMessageBox.confirm(t('visualization.change_save_tips'), {
confirmButtonType: 'primary',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -104,6 +104,8 @@ function handleDatasetName(){ // 关键字搜索
const handleNodeClick = (data: any) => { //
if(data.node_type == '02'){
emit('handleNodeClick', data)
}else{
emit('handleNodeClick', {})
}
}
function moreClic(event:any ,data:any){ //
@ -124,12 +126,11 @@ function moreClic(event:any ,data:any){ // 更多操作
isTreeDrag.value = true
}
function editClic(data:any){
console.log(data)
if(data.type == '03'){
window.open('/#/dvsCanvas?dvId=' + data.id+'&appId=' + projectInfo.value.id, '_blank');
}else if(data.type == '0301'){
window.open('/#/dashboard?resourceId=' + data.id + '&appId='+projectInfo.value.id, '_blank');
}else if(data.type == '09'){
}else if(data.type == '04'||data.type == '05'||data.type == '06'){
window.open('/#/formcreatedesigner?moduleId=' +data.id + '&appId='+projectInfo.value.id, '_blank');
} else if(data.type == '02'){
const route = router.resolve({

View File

@ -10,8 +10,13 @@ const props = defineProps({
projectInfo: {
type: String,
default: ''
},
treeInfo: {
type: String,
default: ''
}
})
const treeInfo:any = ref({})
const appStore = useAppStoreWithOut()
const embeddedStore = useEmbedded()
const dvMainStore = dvMainStoreWithOut()
@ -20,12 +25,27 @@ const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const projectInfo:any=ref({
})
watch(() => props.projectInfo, val => {
projectInfo.value = props.projectInfo
watch(() => props.projectInfo, (val:any) => {
projectInfo.value = val
})
watch(() => props.treeInfo, (val:any) => {
treeInfo.value = val
})
onMounted(()=>{
projectInfo.value = props.projectInfo
})
function designClick(){
if(treeInfo.value.type == '03'){
window.open('/#/dvsCanvas?dvId=' + treeInfo.value.id+'&appId=' + projectInfo.value.id, '_blank');
}else if(treeInfo.value.type == '0301'){
window.open('/#/dashboard?resourceId=' + treeInfo.value.id + '&appId='+projectInfo.value.id, '_blank');
}else if(treeInfo.value.type == '04'||treeInfo.value.type == '05'||treeInfo.value.type == '06'){
window.open('/#/formcreatedesigner?moduleId=' +treeInfo.value.id + '&appId='+projectInfo.value.id, '_blank');
}
}
//
const previewpage=()=>{
if(dvInfo.value.id !== null){
@ -57,7 +77,7 @@ const initOpenHandler = newWindow => {
</div>
<div class="project-header-right">
<div class="preview-button" @click="previewpage">预览</div>
<div class="design-button">设计</div>
<div class="design-button" @click="designClick">设计</div>
</div>
</div>
</template>

View File

@ -23,6 +23,7 @@ const state = reactive({
dvInfo: null,
curPreviewGap: 0
})
const treeInfo:any = ref({})
const dataInitState = ref(true)
const downloadStatus = ref(false)
const dvPreviewRef = ref(null)
@ -110,6 +111,7 @@ const loadCanvasData = (dvId, weight?, ext?) => {
}
function handleNodeClick(e){
treeInfo.value = e
isFormCreate.value = false
dataInitState.value = false
isNavbar.value = false
@ -119,7 +121,7 @@ function handleNodeClick(e){
}else if(e.type == '03'){
busiFlag.value = 'dataV'
loadCanvasData(e.id,9,0)
}else if(e.type == '09'){
}else if(e.type == '04'||e.type == '05'||e.type == '06'){
moduleInfo.value = e
isFormCreate.value = true
} else if(e.type == '02'){
@ -142,7 +144,7 @@ onBeforeMount(() => {
</script>
<template>
<div class="project-box">
<Header :projectInfo="projectInfo"/>
<Header :projectInfo="projectInfo" :treeInfo="treeInfo" />
<div class="project-content" v-if="applicationId != ''">
<Leftmenu class="Leftmenu" v-if="applicationId != ''" :projectInfo="projectInfo" @handleNodeClick="handleNodeClick"/>
<dv-preview

View File

@ -42,7 +42,7 @@ const state = reactive({
const placeholder = ref('')
const nodeType = ref()
const pid = ref()
const appId = ref()
const appId:any = ref("")
const id = ref()
const cmd = ref('')
const treeRef = ref()
@ -154,7 +154,7 @@ const createInit = (type, data: Tree, exec, name: string) => {
datasetForm.name = ''
filterText.value = ''
nodeType.value = type
if(type === 'folder' && data !=null && data.appId !=null){
if(data !=null && data.appId !=null){
appId.value = data.appId
}
placeholder.value =
@ -164,7 +164,7 @@ const createInit = (type, data: Tree, exec, name: string) => {
allfields = data.allfields
}
if (data.id) {
const request = { leaf: false, weight: 7 } as BusiTreeRequest
const request = { leaf: false, weight: 7,appId: data.appId } as BusiTreeRequest
getDatasetTree(request).then(res => {
filterFreeFolder(res, 'dataset')
dfs(res as unknown as Tree[])
@ -254,7 +254,6 @@ const saveDataset = () => {
name: datasetForm.name,
appId: appId.value
}
switch (cmd.value) {
case 'move':
params.pid = activeAll.value ? '0' : (datasetForm.pid as string)

View File

@ -1409,7 +1409,7 @@ const datasetSave = () => {
creatDsFolder.value.createInit(
'dataset',
{ id: pid || '0', union, allfields: allfields.value },
{ id: pid || '0', union,appId:appId.value, allfields: allfields.value },
'',
datasetName.value
)

View File

@ -46,7 +46,7 @@ const cmd = ref('')
const treeRef = ref()
const filterText = ref('')
const datasetForm = reactive({
pid: '',
pid: '0',
name: ''
})
const searchEmpty = ref(false)
@ -371,7 +371,7 @@ const emits = defineEmits(['finish', 'handleShowFinishPage'])
<el-form-item v-if="showName" :label="labelName" prop="name">
<el-input :placeholder="placeholder" v-model="datasetForm.name" />
</el-form-item>
<el-form-item v-if="showPid" :label="t('deDataset.folder')" prop="pid">
<!-- <el-form-item v-if="showPid" :label="t('deDataset.folder')" prop="pid">
<el-tree-select
v-model="datasetForm.pid"
:data="state.tData"
@ -427,7 +427,7 @@ const emits = defineEmits(['finish', 'handleShowFinishPage'])
<span>{{ t('data_source.relevant_content_found') }}</span>
</div>
</div>
</div>
</div> -->
</el-form>
<template #footer>
<el-button secondary @click="resetForm">{{ t('dataset.cancel') }} </el-button>

View File

@ -20,6 +20,8 @@ public class BusiNodeVO implements TreeResultModel<BusiNodeVO>, Serializable {
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "ID")
private Long id;
@Schema(description = "项目id")
private String appId;
@Schema(description = "名称")
private String name;
@Schema(description = "是否叶子")

View File

@ -8,8 +8,6 @@ import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
public class TokenUtils {
public static TokenUserBO userBOByToken(String token) {
DecodedJWT jwt = JWT.decode(token);
Long userId = jwt.getClaim("uid").asLong();