From db9197061aa8e3eebb2bcec93ce830136c6736f3 Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Fri, 4 Jul 2025 18:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=B8=8A=E7=A7=BB=E4=B8=8B?= =?UTF-8?q?=E7=A7=BB=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/api/permission/menu.ts | 7 +- .../components/visualization/DvSidebar.vue | 7 +- .../components/visualization/LinkJumpSet.vue | 22 +- .../components/visualization/LinkageSet.vue | 2 +- .../MultiplexPreviewShow.vue | 2 +- .../data/dataset/form/CodeMirror.vue | 6 +- .../src/viewsnew/TemplateResource/index.vue | 2 +- .../TemplateResource/templateinfo.vue | 9 +- .../SfcEditor/NavbarEditor/Navbar.vue | 2 + .../viewsnew/application/menuconfig/index.vue | 1025 ++++++++++------- .../application/service/dataset/index.vue | 2 +- .../service/datasource/form/index.vue | 3 + .../application/service/datasource/index.vue | 4 +- .../MultiplexPreviewShow.vue | 2 +- 14 files changed, 644 insertions(+), 451 deletions(-) diff --git a/core/core-frontend/src/api/permission/menu.ts b/core/core-frontend/src/api/permission/menu.ts index 345393a..1219306 100644 --- a/core/core-frontend/src/api/permission/menu.ts +++ b/core/core-frontend/src/api/permission/menu.ts @@ -4,4 +4,9 @@ export const getMenuTree = params => request.post({ url: '/menuInterface/getMenu export const addMenu = data => request.post({ url: '/menuInterface/addMenu', data }) // 新增菜单 export const updateMenuById = data => request.post({ url: '/menuInterface/updateMenuById', data }) //修改菜单 export const deleteMenuById = id => request.post({ url: '/menuInterface/deleteMenuById?id=' + id }) //删除菜单 -export const setModuleId = params => request.post({ url: '/menuInterface/setModuleId',params }) //关联模块 \ No newline at end of file +export const setModuleId = params => request.post({ url: '/menuInterface/setModuleId',params }) //关联模块 +export const changeOrder = params => request.post({ url: '/menuInterface/changeOrder',params }) //上移下移模块 +export const moveMenu = params => request.post({ url: '/menuInterface/moveMenu',params }) //移动菜单 + +//192.168.1.20:8100/de2api/menuInterface/moveMenu?menuId=1926935293735411714&targetParentId=1930886238383067138 +// http://192.168.1.20:8100/de2api/menuInterface/changeOrder?menuId=1926935415483473921&direction=down \ No newline at end of file diff --git a/core/core-frontend/src/components/visualization/DvSidebar.vue b/core/core-frontend/src/components/visualization/DvSidebar.vue index 48af89b..3a62ea8 100644 --- a/core/core-frontend/src/components/visualization/DvSidebar.vue +++ b/core/core-frontend/src/components/visualization/DvSidebar.vue @@ -638,7 +638,7 @@ const onComponentNameChange = () => { } .ed-select-dropdown__item.is-hovering { - background: #434343 !important; + background: transparent !important; } .ed-select-dropdown__item { @@ -667,8 +667,9 @@ const onComponentNameChange = () => { border:1px solid #636363 !important; } .ed-select__wrapper.is-disabled{ - background-color:#434343; - box-shadow:0 0 0 1px #787878 inset; + background-color:#2f2f2f; + box-shadow:none; + border: 1px solid #636363; } .ed-checkbox__input .ed-checkbox__inner:after{ background: transparent!important; diff --git a/core/core-frontend/src/components/visualization/LinkJumpSet.vue b/core/core-frontend/src/components/visualization/LinkJumpSet.vue index 694ec55..7f05d9b 100644 --- a/core/core-frontend/src/components/visualization/LinkJumpSet.vue +++ b/core/core-frontend/src/components/visualization/LinkJumpSet.vue @@ -1118,7 +1118,7 @@ defineExpose({ .preview { margin-top: 5px; - border: 1px solid #e6e6e6; + border: 1px solid #434343; border-radius: 4px; height: 470px !important; overflow: hidden; @@ -1254,11 +1254,11 @@ defineExpose({ text-overflow: ellipsis; border-radius: 4px; - border: 1px solid #dee0e3; + border: 1px solid #434343; - background: #fff; + background: #212121; - color: var(--neutral-900, #1f2329); + color: var(--neutral-900, #ffffff); /* 中文/桌面端/正文 14 22 Regular */ font-family: var(--de-custom_font, 'PingFang'); font-size: 14px; @@ -1421,7 +1421,7 @@ span { .top-area-value { font-weight: 400; font-size: 14px; - color: #1f2329; + color: #ffffff; display: flex; flex-direction: row; align-items: center; @@ -1492,7 +1492,7 @@ span { color: var(--deTextDisable); } .outer-content-mirror { - border: 1px solid #bbbfc4; + border: 1px solid #434343; border-radius: 4px; height: calc(100% - 30px); width: 100%; @@ -1505,13 +1505,13 @@ span { font-size: 14px; font-style: normal; font-weight: 400; - color: #1f2329; + color: #ffffff; display: flex; align-items: center; } .outer-content-right { - border: 1px solid #bbbfc4; + border: 1px solid #434343; border-radius: 4px; height: calc(100% - 30px); width: 100%; @@ -1578,7 +1578,7 @@ span { --ed-tabs-header-height: 36px; margin-bottom: 12px; position: sticky; - background: #fff; + background: #212121; .ed-tabs__header { &::before { content: ''; @@ -1587,7 +1587,7 @@ span { position: absolute; bottom: 0; left: 0; - background: #1f232926; + background: #ffffff; } } } @@ -1597,7 +1597,7 @@ span { } :deep(.ed-tabs__item):not(.is-active) { - color: #646a73; + color: #ffffff; } } diff --git a/core/core-frontend/src/components/visualization/LinkageSet.vue b/core/core-frontend/src/components/visualization/LinkageSet.vue index 6fac81d..f4ef5da 100644 --- a/core/core-frontend/src/components/visualization/LinkageSet.vue +++ b/core/core-frontend/src/components/visualization/LinkageSet.vue @@ -883,7 +883,7 @@ span { .top-area-value { font-weight: 400; font-size: 14px; - color: #1f2329; + color: #ffffff; display: flex; flex-direction: row; align-items: center; diff --git a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue index ef443ff..f8c604c 100644 --- a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue +++ b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue @@ -448,7 +448,7 @@ span { .top-area-value { font-weight: 400; font-size: 14px; - color: #1f2329; + color: #ffffff; display: flex; flex-direction: row; align-items: center; diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/CodeMirror.vue b/core/core-frontend/src/views/visualized/data/dataset/form/CodeMirror.vue index 662a98c..fa79a27 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/CodeMirror.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/CodeMirror.vue @@ -11,6 +11,7 @@ import { keymap } from '@codemirror/view' import { propTypes } from '@/utils/propTypes' +import { nextTick } from 'vue' const props = defineProps({ domId: propTypes.string.def('editor'), @@ -24,7 +25,7 @@ const props = defineProps({ }) const emits = defineEmits(['change']) -const codeComInit = (doc: string, sqlMode?: boolean) => { +const codeComInit = async (doc: string, sqlMode?: boolean) => { function _optionalChain(ops) { let lastAccessLHS = undefined let value = ops[0] @@ -129,6 +130,9 @@ const codeComInit = (doc: string, sqlMode?: boolean) => { }) ] : [basicSetup, placeholders, keymap.of([indentWithTab])] + // 确保 DOM 渲染完成 + await nextTick() + return new EditorView({ doc, extensions: extensionsAttach, diff --git a/core/core-frontend/src/viewsnew/TemplateResource/index.vue b/core/core-frontend/src/viewsnew/TemplateResource/index.vue index 5fc73c6..448906a 100644 --- a/core/core-frontend/src/viewsnew/TemplateResource/index.vue +++ b/core/core-frontend/src/viewsnew/TemplateResource/index.vue @@ -774,7 +774,7 @@ background: #434343; } .ed-select-dropdown__item.is-hovering { - background: #434343 !important; + background: transparent !important; } .ed-select-dropdown__item { diff --git a/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue b/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue index fbb4fdd..f3b820c 100644 --- a/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue +++ b/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue @@ -538,14 +538,13 @@ function mouseleave() { // 鼠标移出遮罩层 } \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/SfcEditor/NavbarEditor/Navbar.vue b/core/core-frontend/src/viewsnew/application/SfcEditor/NavbarEditor/Navbar.vue index ac1bba8..b40b468 100644 --- a/core/core-frontend/src/viewsnew/application/SfcEditor/NavbarEditor/Navbar.vue +++ b/core/core-frontend/src/viewsnew/application/SfcEditor/NavbarEditor/Navbar.vue @@ -114,6 +114,8 @@ onMounted(() => { navmenulist.value = props.menuList navtitle.value = props.projectName userList.value = wsCache.get('Permission-userinfo') + checkindex.value = 0 + menuclick(checkindex.value) }) onBeforeUnmount(() => { diff --git a/core/core-frontend/src/viewsnew/application/menuconfig/index.vue b/core/core-frontend/src/viewsnew/application/menuconfig/index.vue index de47c1d..f684ec1 100644 --- a/core/core-frontend/src/viewsnew/application/menuconfig/index.vue +++ b/core/core-frontend/src/viewsnew/application/menuconfig/index.vue @@ -4,24 +4,24 @@ import Assocmodule from './assocmodule.vue' import Assocmenu from './assocmenu.vue' import { findApplicationById } from "@/api/application/application" import { useRoute, useRouter } from 'vue-router' -import { ref, onMounted,reactive,nextTick } from 'vue' +import { ref, onMounted, reactive, nextTick } from 'vue' import menuconfig_treeadd_white from '@/assets/svg/menuconfig_treeadd_white.svg' import icon_user_connect_white from '@/assets/svg/user_connect_white.svg' import icon_permission_more_white from '@/assets/svg/icon_more-vertical_outlined_white.svg' -import { ElTree,FormInstance } from 'element-plus' +import { ElTree, FormInstance } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus' -import { getMenuTree,addMenu,updateMenuById,deleteMenuById } from '@/api/permission/menu' +import { getMenuTree, addMenu, updateMenuById, deleteMenuById, changeOrder, moveMenu } from '@/api/permission/menu' import type { NodeDropType, } from 'element-plus/es/components/tree/src/tree.type' import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode' -const projectInfo:any =ref({}) +const projectInfo: any = ref({}) const route = useRoute() const router = useRouter() -const applicationId:any =ref("") +const applicationId: any = ref("") const filterText = ref('') const treeRef = ref>() -const treeData:any = ref([]) +const treeData: any = ref([]) const defaultProps = { children: 'children', label: 'name' @@ -32,7 +32,7 @@ const currentNodeId = ref(null) const preventcombo = ref(false) const dialogVisible = ref(false) const title = ref('') -const ruleForm:any = ref({}) +const ruleForm: any = ref({}) const ruleFormRef = ref() const rules = ref({ name: [ @@ -49,8 +49,15 @@ const dataInitState = ref(true) const rightloading = ref(false) const moduleinfo = ref({}) +const menudialog = ref(false) +const moveId = ref('') +const menuAllData = ref([]) +const selecprops= { + children: 'children', + label: 'name' +} const handleMouseEnter = (node) => { - hoverNodeId.value = node.key; + hoverNodeId.value = node.key; }; const handleMouseLeave = () => { hoverNodeId.value = null; @@ -59,11 +66,11 @@ const submitForm = (formEl: FormInstance | undefined) => { if (!formEl) return formEl.validate((valid) => { if (valid) { - if(preventcombo.value){ + if (preventcombo.value) { return } preventcombo.value = true - if(ruleForm.value.id !== ''){ + if (ruleForm.value.id !== '') { updateMenuById(ruleForm.value).then(res => { ElMessage({ type: 'success', @@ -73,7 +80,7 @@ const submitForm = (formEl: FormInstance | undefined) => { preventcombo.value = false gettree() }) - }else{ + } else { addMenu(ruleForm.value).then(res => { ElMessage({ type: 'success', @@ -104,86 +111,87 @@ onMounted(() => { gettree() } }) -function assocclick(data:any){ +function assocclick(data: any) { isFormCreate.value = false dataInitState.value = false assocmenuname.value = data.name currentNodeId.value = data.id - if(data.module_id !== '' && data.module_id !== undefined){ + if (data.module_id !== '' && data.module_id !== undefined) { assoccurrentid.value = data.module_id - }else{ + } else { assoccurrentid.value = '' } assocdialog.value = true } function gettree() { - treeloading.value = true - const params = { + treeloading.value = true + const params = { appId: applicationId.value, - name:'', - isdisplay:'' - } - getMenuTree(params).then(res => { + name: '', + isdisplay: '' + } + getMenuTree(params).then(res => { treeloading.value = false treeData.value = res.data - }) + menuAllData.value = res.data + }) } function querytree() { treeloading.value = true - const params = { + const params = { appId: applicationId.value, - name:filterText.value, - isdisplay:'' - } - getMenuTree(params).then(res => { + name: filterText.value, + isdisplay: '' + } + getMenuTree(params).then(res => { treeloading.value = false treeData.value = res.data - }) + }) } -function nodeclick(data:any,node:any){ +function nodeclick(data: any, node: any) { moduleinfo.value = {} currentNodeId.value = node.key showmodule.value = false assocdialog.value = false - if(data.module_id !== '' && data.module_id !== undefined){ + if (data.module_id !== '' && data.module_id !== undefined) { moduleinfo.value = data showmodule.value = true - }else{ + } else { showmodule.value = false } } -function addtree(){ +function addtree() { title.value = '新增菜单' ruleForm.value = { - id:'', - appId:applicationId.value, + id: '', + appId: applicationId.value, name: '', - code:'', - parentid:'0', - type:'01' + code: '', + parentid: '0', + type: '01' } dialogVisible.value = true; } -function addchilnode(data:any){ +function addchilnode(data: any) { title.value = '新增子菜单' ruleForm.value = { - id:'', - appId:applicationId.value, + id: '', + appId: applicationId.value, name: '', - code:'', - parentid:data.id, - type:'01' + code: '', + parentid: data.id, + type: '01' } dialogVisible.value = true; } -function rename(data:any){ +function rename(data: any) { title.value = '重命名' ruleForm.value = JSON.parse(JSON.stringify(data)) dialogVisible.value = true; } -function deltree(data:any){ - ElMessageBox.confirm( +function deltree(data: any) { + ElMessageBox.confirm( '确定删除该条信息吗?', '提示', { @@ -193,15 +201,15 @@ function deltree(data:any){ } ).then(() => { deleteMenuById(data.id).then(res => { - ElMessage({ - type: 'success', - message: '删除成功', - }) - gettree() + ElMessage({ + type: 'success', + message: '删除成功', }) + gettree() }) + }) .catch(() => { - + }) } function handleClose() { @@ -211,133 +219,197 @@ function handleClose() { function assochandleClose() { assocdialog.value = false; } -function assocsubmit(){ +function assocsubmit() { assocdialog.value = false; gettree() } +function ordermenu(data: any, type: any) { + const params = { + menuId: data.id, + direction: type, + } + changeOrder(params).then(res => { + if (res.data.code == '0') { + ElMessage.success('操作成功') + gettree() + }else{ + ElMessage.success('移动失败') + } + }) +} +function movemenu(data: any) { + console.log(data) + moveId.value = data.id + menudialog.value = true +} +function movemenusubmit() { + if(moveId.value == ''){ + ElMessage.error('请选择移动位置') + return + } + const params = { + menuId:currentNodeId.value, + targetParentId:moveId.value, + } + moveMenu(params).then(res => { + menudialog.value = false + if(res.data.code == '0'){ + menudialog.value = false + ElMessage.success('移动成功') + gettree() + }else{ + menudialog.value = false + ElMessage.error('移动失败') + } + }) +} +function menuhandleClose() { + menudialog.value = false +} \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/index.vue b/core/core-frontend/src/viewsnew/application/service/dataset/index.vue index be7d551..4f88cb2 100644 --- a/core/core-frontend/src/viewsnew/application/service/dataset/index.vue +++ b/core/core-frontend/src/viewsnew/application/service/dataset/index.vue @@ -1743,7 +1743,7 @@ border-right: 1px solid rgba(54, 54, 54, 1) background: #3f3f3f !important; } .ed-table th.ed-table__cell:hover{ - background-color: #282828; + background-color: #282828 !important; } .ed-table.is-scrolling-right th.ed-table-fixed-column--right{ background-color: #434343 !important; diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue index 8b094c1..c04e218 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue @@ -1324,4 +1324,7 @@ defineExpose({ .ed-step__title.is-process{ color: #ffffff; } +.ed-input-number.is-controls-right .ed-input-number__decrease [class*=ed-icon], .ed-input-number.is-controls-right .ed-input-number__increase [class*=ed-icon]{ + color: #ffffff !important; +} diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/index.vue b/core/core-frontend/src/viewsnew/application/service/datasource/index.vue index 3f2e326..4f6d94d 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/index.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/index.vue @@ -2651,7 +2651,7 @@ border-right: 1px solid rgba(54, 54, 54, 1); } .ed-select-dropdown__item.is-hovering { - background: #393939; + background: transparent; } .ed-select-dropdown__item { @@ -2662,7 +2662,7 @@ border-right: 1px solid rgba(54, 54, 54, 1); border-top: 1px solid #434343 !important; } .ed-table th.ed-table__cell:hover{ - background-color: #282828; + background-color: #282828 !important; } .ed-dialog__header { padding: 0px !important; diff --git a/core/core-frontend/src/viewsnew/data-visualization/MultiplexPreviewShow.vue b/core/core-frontend/src/viewsnew/data-visualization/MultiplexPreviewShow.vue index d328317..f46cd9e 100644 --- a/core/core-frontend/src/viewsnew/data-visualization/MultiplexPreviewShow.vue +++ b/core/core-frontend/src/viewsnew/data-visualization/MultiplexPreviewShow.vue @@ -448,7 +448,7 @@ span { .top-area-value { font-weight: 400; font-size: 14px; - color: #1f2329; + color: #ffffff; display: flex; flex-direction: row; align-items: center;