diff --git a/core/core-frontend/src/viewsnew/application/addpopup.vue b/core/core-frontend/src/viewsnew/application/addpopup.vue index 3f1ae39..afeff80 100644 --- a/core/core-frontend/src/viewsnew/application/addpopup.vue +++ b/core/core-frontend/src/viewsnew/application/addpopup.vue @@ -51,8 +51,8 @@ function paramsResetForm() { emit('closeClick', false) } function saveParamsObj(){ - - if(isSwitch.value == false){ +debugger + if(isSwitch.value == true){ return } isSwitch.value = true diff --git a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue index 6a11e5a..f2a152b 100644 --- a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue @@ -5,6 +5,7 @@ import { ElMessage,ElMessageBox } from 'element-plus-secondary' import { useI18n } from '@/hooks/web/useI18n' import { publicTree } from '@/utils/validate'; import { moduleList,moduleAdd,moduleUpdate,moduleDel } from '@/api/application/module' +const emit = defineEmits(['handleNodeClick']) const { t } = useI18n() const props = defineProps({ projectInfo: { @@ -12,6 +13,28 @@ const props = defineProps({ default: '' } }) +const typeList:any = ref([{ + code:'01', + name:'登录页面' +},{ + code:'02', + name:'主框架页面' +},{ + code:'03', + name:'GIS大屏页面' +},{ + code:'04', + name:'二级弹窗页面' +},{ + code:'05', + name:'数据填报页面' +},{ + code:'06', + name:'文档资源页面' +},{ + code:'09', + name:'自定义页面' +}]) const popupType:any = ref(0) const isSwitch =ref(false) const treeloading = ref(false) // 树加载中 @@ -23,6 +46,7 @@ const isTreeDrag =ref(false) const dataInfo:any =ref({ pid: '', level: '', + type: '', nodeType: '', name:'', appId:'' @@ -35,6 +59,11 @@ watch(() => props.projectInfo, val => { // 初始化数据 getInit() }) onMounted(()=>{ + + const canvas_style_data= {"width":1920,"height":1080,"refreshViewEnable":false,"refreshViewLoading":false,"refreshUnit":"minute","refreshTime":5,"scale":60,"scaleWidth":100,"scaleHeight":100,"backgroundColorSelect":false,"backgroundImageEnable":true,"backgroundType":"backgroundColor","background":"/static-resource/7127292608094670848.png","openCommonStyle":true,"opacity":1,"fontSize":14,"themeId":"10001","color":"#000000","backgroundColor":"rgba(245, 246, 247, 1)","dashboard":{"gap":"yes","gapSize":5,"resultMode":"all","resultCount":1000,"themeColor":"light","mobileSetting":{"customSetting":false,"imageUrl":null,"backgroundType":"image","color":"#000"}},"component":{"chartTitle":{"show":true,"fontSize":"18","hPosition":"left","vPosition":"top","isItalic":false,"isBolder":true,"remarkShow":false,"remark":"","fontFamily":"Microsoft YaHei","letterSpace":"0","fontShadow":false,"color":"#000000","remarkBackgroundColor":"#ffffff","modifyName":"color"},"chartColor":{"basicStyle":{"colorScheme":"default","colors":["#1E90FF","#90EE90","#00CED1","#E2BD84","#7A90E0","#3BA272","#2BE7FF","#0A8ADA","#FFD700"],"alpha":100,"gradient":true,"mapStyle":"normal","areaBaseColor":"#FFFFFF","areaBorderColor":"#303133","gaugeStyle":"default","tableBorderColor":"#E6E7E4","tableScrollBarColor":"#00000024"},"misc":{"mapLineGradient":false,"mapLineSourceColor":"#146C94","mapLineTargetColor":"#576CBC","nameFontColor":"#000000","valueFontColor":"#5470c6"},"tableHeader":{"tableHeaderBgColor":"#1E90FF","tableHeaderFontColor":"#000000"},"tableCell":{"tableItemBgColor":"#FFFFFF","tableFontColor":"#000000"},"modifyName":"gradient"},"chartCommonStyle":{"backgroundColorSelect":true,"backgroundImageEnable":false,"backgroundType":"innerImage","innerImage":"board/board_1.svg","outerImage":null,"innerPadding":12,"borderRadius":8,"backgroundColor":"rgba(255, 255, 255, 1)","innerImageColor":"rgba(16, 148, 229,1)"},"filterStyle":{"layout":"horizontal","titleLayout":"left","labelColor":"#1F2329","titleColor":"#1F2329","color":"#1f2329","borderColor":"#BBBFC4","text":"#1F2329","bgColor":"#FFFFFF"},"tabStyle":{"headPosition":"left","headFontColor":"#000000","headFontActiveColor":"#000000","headBorderColor":"#ffffff","headBorderActiveColor":"#ffffff"}}} + + console.log(canvas_style_data) + projectInfo.value = props.projectInfo }) function getInit() { // 初始化 @@ -50,6 +79,7 @@ function addClic(name:any,level:any,pid:any){ // 新建目录、模块 level: level, nodeType: "", name:'', + type:'', } if(name == '目录'){ @@ -68,7 +98,13 @@ function handleDatasetName(){ // 关键字搜索 } const handleNodeClick = (data: any) => { // 树节点点击 - + if(data.nodeType == '01'){ + }else{ + data.id = '1097641013486424064' + emit('handleNodeClick', data) + + } + } function moreClic(event:any ,data:any){ // 更多操作 let element = document.getElementById("drag_main_area") @@ -88,7 +124,8 @@ function moreClic(event:any ,data:any){ // 更多操作 isTreeDrag.value = true } function editClic(data:any){ - ElMessage.success('页面跳转,暂无页面') + window.open('/#/dvsCanvas?dvId=' +data.id, '_blank'); + // window.open('/#/dvCanvas?dvId=' + "1097641013486424064", '_blank'); } function addTreeChildNode(event:any,level:any,pid:any){ // // 添加子节点 let element = document.getElementById("drag_main_area") @@ -105,6 +142,7 @@ function addTreeChildNode(event:any,level:any,pid:any){ // // 添加子节点 level: level, nodeType: "", name:'', + type:'' } isTreeDrag.value = true } @@ -130,16 +168,21 @@ function saveData(){ // 保存 if(dataInfo.value.id !=null && dataInfo.value.id !=''){ let data = { id:dataInfo.value.id, - name:dataInfo.value.name + name:dataInfo.value.name, + type:dataInfo.value.type, } moduleUpdate(data).then(() => { - ElMessage.success('添加成功') + ElMessage.success('修改成功') getInit() isDialog.value = false }).catch(() => { isSwitch.value = false }) }else{ + // const canvas_style_data= {"width":1920,"height":1080,"refreshViewEnable":false,"refreshViewLoading":false,"refreshUnit":"minute","refreshTime":5,"scale":60,"scaleWidth":100,"scaleHeight":100,"backgroundColorSelect":false,"backgroundImageEnable":true,"backgroundType":"backgroundColor","background":"/static-resource/7127292608094670848.png","openCommonStyle":true,"opacity":1,"fontSize":14,"themeId":"10001","color":"#000000","backgroundColor":"rgba(245, 246, 247, 1)","dashboard":{"gap":"yes","gapSize":5,"resultMode":"all","resultCount":1000,"themeColor":"light","mobileSetting":{"customSetting":false,"imageUrl":null,"backgroundType":"image","color":"#000"}},"component":{"chartTitle":{"show":true,"fontSize":"18","hPosition":"left","vPosition":"top","isItalic":false,"isBolder":true,"remarkShow":false,"remark":"","fontFamily":"Microsoft YaHei","letterSpace":"0","fontShadow":false,"color":"#000000","remarkBackgroundColor":"#ffffff","modifyName":"color"},"chartColor":{"basicStyle":{"colorScheme":"default","colors":["#1E90FF","#90EE90","#00CED1","#E2BD84","#7A90E0","#3BA272","#2BE7FF","#0A8ADA","#FFD700"],"alpha":100,"gradient":true,"mapStyle":"normal","areaBaseColor":"#FFFFFF","areaBorderColor":"#303133","gaugeStyle":"default","tableBorderColor":"#E6E7E4","tableScrollBarColor":"#00000024"},"misc":{"mapLineGradient":false,"mapLineSourceColor":"#146C94","mapLineTargetColor":"#576CBC","nameFontColor":"#000000","valueFontColor":"#5470c6"},"tableHeader":{"tableHeaderBgColor":"#1E90FF","tableHeaderFontColor":"#000000"},"tableCell":{"tableItemBgColor":"#FFFFFF","tableFontColor":"#000000"},"modifyName":"gradient"},"chartCommonStyle":{"backgroundColorSelect":true,"backgroundImageEnable":false,"backgroundType":"innerImage","innerImage":"board/board_1.svg","outerImage":null,"innerPadding":12,"borderRadius":8,"backgroundColor":"rgba(255, 255, 255, 1)","innerImageColor":"rgba(16, 148, 229,1)"},"filterStyle":{"layout":"horizontal","titleLayout":"left","labelColor":"#1F2329","titleColor":"#1F2329","color":"#1f2329","borderColor":"#BBBFC4","text":"#1F2329","bgColor":"#FFFFFF"},"tabStyle":{"headPosition":"left","headFontColor":"#000000","headFontActiveColor":"#000000","headBorderColor":"#ffffff","headBorderActiveColor":"#ffffff"}}} + // const canvasStyleData = JSON.stringify(canvas_style_data) + // const component_data = [] + // const componentData = JSON.stringify(component_data) moduleAdd(dataInfo.value).then(() => { ElMessage.success('添加成功') getInit() @@ -179,6 +222,7 @@ function delTreeClic(){ // 删除 }) } +