diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index c0d2922..3dbd25b 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -212,7 +212,6 @@ const publishStatusChange = status => { } const saveCanvasWithCheck = (withPublish = false, status?) => { - debugger if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) { ElMessageBox.confirm(t('components.from_other_organizations'), { confirmButtonType: 'primary', @@ -263,7 +262,7 @@ const saveResource = (checkParams?) => { canvasSaveWithParams(checkParams, () => { snapshotStore.resetStyleChangeTimes() let url = window.location.href - url = url.replace(/(#\/[^?]*)(?:\?[^#]*)?/, `$1?resourceId=${dvInfo.value.id}`) + url = url.replace(/(#\/[^?]*)(?:\?[^#]*)?/, `$1?resourceId=${dvInfo.value.id}&appId=${route.query.appId}`) if (!embeddedStore.baseUrl) { window.history.replaceState( { diff --git a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue index a40f475..1fb67a6 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue @@ -105,7 +105,7 @@ const onImgChange = imgUrl => { text-align: left; } .m-label { - color: #1f2329; + color: #ffffff; font-size: 14px; font-style: normal; font-weight: 400; diff --git a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue index 018f61b..4add996 100644 --- a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue +++ b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue @@ -185,7 +185,9 @@ onUnmounted(() => { :deep(.ed-input-number--dark:not(.is-disabled) .ed-input-number__increase:not(.is-disabled)) { background-color: #1a1a1a; } - +:deep(.ed-input-number__increase){ + background-color: #1a1a1a !important; +} .custom-divider_scale { height: 18px; border-color: #ffffff26; @@ -204,7 +206,7 @@ onUnmounted(() => { position: absolute; content: '%'; right: 35px; - top: 1px; + top: -1px; height: 24px; line-height: 24px; } diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 7f05d6e..973e184 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -184,7 +184,7 @@ const saveResource = (checkParams?) => { snapshotStore.resetStyleChangeTimes() wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id) let url = window.location.href - url = url.replace(/(#\/[^?]*)(?:\?[^#]*)?/, `$1?dvId=${dvInfo.value.id}`) + url = url.replace(/(#\/[^?]*)(?:\?[^#]*)?/,`$1?dvId=${dvInfo.value.id}&appId=${route.query.appId}`) if (!embeddedStore.baseUrl) { window.history.replaceState( { diff --git a/core/core-frontend/src/components/visualization/DatasetParamsComponent.vue b/core/core-frontend/src/components/visualization/DatasetParamsComponent.vue index eba82dc..b724219 100644 --- a/core/core-frontend/src/components/visualization/DatasetParamsComponent.vue +++ b/core/core-frontend/src/components/visualization/DatasetParamsComponent.vue @@ -115,7 +115,7 @@ defineExpose({ text-align: left; } .m-label { - color: #1f2329; + color: #ffffff; font-size: 14px; font-style: normal; font-weight: 400; diff --git a/core/core-frontend/src/components/visualization/DvSidebar.vue b/core/core-frontend/src/components/visualization/DvSidebar.vue index 611cf45..48af89b 100644 --- a/core/core-frontend/src/components/visualization/DvSidebar.vue +++ b/core/core-frontend/src/components/visualization/DvSidebar.vue @@ -125,39 +125,22 @@ const onComponentNameChange = () => { @@ -212,14 +183,17 @@ const onComponentNameChange = () => { .aside-area-light { color: #ebebeb; - background-color: #1a1a1a; + background-color: #1a1a1a !important; + :deep(.title) { border-bottom: rgba(255, 255, 255, 0.15) 1px solid !important; } } + .dv-aside { position: relative; transition: 0.5s; + .title-dark { font-size: 14px; font-weight: 500; @@ -230,6 +204,7 @@ const onComponentNameChange = () => { text-overflow: ellipsis; padding: 8px 10px 8px 8px; } + .title-light { font-size: 14px; font-weight: 500; @@ -240,6 +215,7 @@ const onComponentNameChange = () => { text-overflow: ellipsis; padding: 8px 10px 8px 8px; } + .collapse-title { width: 35px; font-size: 14px; @@ -247,15 +223,18 @@ const onComponentNameChange = () => { text-align: center; padding: 5px; margin-top: 5px; + span { writing-mode: vertical-rl; text-orientation: mixed; } } + .main-content { height: calc(100% - 45px); overflow-y: auto; } + .custom-icon { position: absolute; right: 5px; @@ -271,9 +250,11 @@ const onComponentNameChange = () => { width: var(--de-scroll-width); } } + .aside-left-dark { border-right: @side-outline-border-color 1px solid; } + .aside-right-dark { border-left: @side-outline-border-color 1px solid; } @@ -281,18 +262,23 @@ const onComponentNameChange = () => { .aside-left-light { border-right: @side-outline-border-color-light 1px solid; } + .aside-right-light { border-left: @side-outline-border-color-light 1px solid; } + .ed-collapse { border-top: 0; } + :deep(.ed-collapse) { border-top: unset; } + :deep(.ed-collapse-item__header.is-active) { border-bottom-color: rgba(31, 35, 41, 0.15); } + :deep(.ed-collapse-item.ed-collapse--dark .ed-collapse-item__header) { border-color: rgba(255, 255, 255, 0.15); border-top: unset; @@ -321,6 +307,7 @@ const onComponentNameChange = () => { cursor: pointer; display: flex; align-items: center; + input { position: absolute; left: 0; @@ -346,209 +333,387 @@ const onComponentNameChange = () => { padding: 0 4px; height: 100%; } - .ed-icon{ - } + .ed-icon {} } diff --git a/core/core-frontend/src/components/visualization/LinkageSet.vue b/core/core-frontend/src/components/visualization/LinkageSet.vue index a9a6dbf..6fac81d 100644 --- a/core/core-frontend/src/components/visualization/LinkageSet.vue +++ b/core/core-frontend/src/components/visualization/LinkageSet.vue @@ -673,7 +673,7 @@ defineExpose({ .preview { margin-top: 5px; - border: 1px solid #e6e6e6; + border: 1px solid #434343; border-radius: 4px; height: 470px !important; overflow: hidden; @@ -681,7 +681,7 @@ defineExpose({ } .preview-show { - border-left: 1px solid #e6e6e6; + border-left: 1px solid #434343; height: 470px; background-size: 100% 100% !important; } diff --git a/core/core-frontend/src/components/visualization/OuterParamsSet.vue b/core/core-frontend/src/components/visualization/OuterParamsSet.vue index c42dd3c..95ae8fe 100644 --- a/core/core-frontend/src/components/visualization/OuterParamsSet.vue +++ b/core/core-frontend/src/components/visualization/OuterParamsSet.vue @@ -785,7 +785,7 @@ defineExpose({ .preview { margin-top: 5px; - border: 1px solid #e6e6e6; + border: 1px solid #434343; border-radius: 4px; height: 470px !important; overflow: hidden; @@ -1100,6 +1100,7 @@ defineExpose({ .ed-select-dropdown__header { padding: 0 8px; + border-bottom: 1px solid #434343 !important; .params-select--header { --ed-tabs-header-height: 32px; .ed-tabs__item { @@ -1114,7 +1115,7 @@ defineExpose({ } .params-attach-setting { - border-left: 1px solid #e6e6e6; + border-left: 1px solid #434343; } .params-attach-content { @@ -1135,7 +1136,7 @@ defineExpose({ cursor: pointer; font-size: 14px; color: #646a73; - margin: 10px 0 0 4px; + margin: 3px 0 0 4px; } :deep(.ed-tree--highlight-current .ed-tree-node.is-current > .ed-tree-node__content){ background: rgb(47,47,47) !important; @@ -1159,3 +1160,14 @@ box-shadow: 0 0 0 1px #434343 inset; color: #3370ff; } + diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue index 189f5ca..0ec0a5d 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue @@ -440,7 +440,7 @@ init() - + {
{ }; // 新增方法 - 根据经纬度放置模型 const placeModelByLngLat = (lng: number, lat: number) => { - debugger if (!model || !myChart?.getScene()) { console.warn('模型或地图场景未初始化'); return; diff --git a/core/core-frontend/src/views/common/DeResourceCreateOpt.vue b/core/core-frontend/src/views/common/DeResourceCreateOpt.vue index 5657e68..a4438f3 100644 --- a/core/core-frontend/src/views/common/DeResourceCreateOpt.vue +++ b/core/core-frontend/src/views/common/DeResourceCreateOpt.vue @@ -246,14 +246,14 @@ defineExpose({ .preview { margin-top: 5px; - border: 1px solid #e6e6e6; + border: 1px solid #434343; height: 310px !important; overflow: hidden; background-size: 100% 100% !important; } .preview-show { - border-left: 1px solid #e6e6e6; + border-left: 1px solid #434343; height: 310px; background-size: 100% 100% !important; } diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue index b359627..942b998 100644 --- a/core/core-frontend/src/views/dashboard/index.vue +++ b/core/core-frontend/src/views/dashboard/index.vue @@ -227,6 +227,18 @@ onMounted(async () => { // do init }) } + if (createType === 'template') { + let deTemplateData + let preName + const templateParamsApply = JSON.parse(Base64.decode(decodeURIComponent(templateParams + ''))) + await decompressionPre(templateParamsApply, result => { + deTemplateData = result + preName = deTemplateData.baseInfo?.preName + dvMainStore.setComponentData(deTemplateData['componentData']) + dvMainStore.setCanvasStyle(deTemplateData['canvasStyleData']) + dvMainStore.setCanvasViewInfo(deTemplateData['canvasViewInfo']) + }) + } } else if (opt && opt === 'create') { dataInitState.value = false let watermarkBaseInfo diff --git a/core/core-frontend/src/views/template/component/DeTemplateImport.vue b/core/core-frontend/src/views/template/component/DeTemplateImport.vue index 74b1782..a7abb2f 100644 --- a/core/core-frontend/src/views/template/component/DeTemplateImport.vue +++ b/core/core-frontend/src/views/template/component/DeTemplateImport.vue @@ -322,14 +322,14 @@ if (props.templateId) { } .preview { margin-top: -8px; - border: 1px solid #e6e6e6; + border: 1px solid #434343; height: 300px !important; overflow: auto; background-size: 100% 100% !important; border-radius: 4px; } .preview-show { - border-left: 1px solid #e6e6e6; + border-left: 1px solid #434343; height: 300px; background-size: 100% 100% !important; } diff --git a/core/core-frontend/src/viewsnew/TemplateResource/addclass.vue b/core/core-frontend/src/viewsnew/TemplateResource/addclass.vue index b9a1fe8..4b62581 100644 --- a/core/core-frontend/src/viewsnew/TemplateResource/addclass.vue +++ b/core/core-frontend/src/viewsnew/TemplateResource/addclass.vue @@ -64,7 +64,7 @@ function cancel() { \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue b/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue index 0982ba4..5e7c83e 100644 --- a/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue +++ b/core/core-frontend/src/viewsnew/TemplateResource/templateinfo.vue @@ -12,6 +12,7 @@ import { useAppStoreWithOut } from '@/store/modules/app' import { useEmitt } from '@/hooks/web/useEmitt' import { Base64 } from 'js-base64' import { useCache } from '@/hooks/web/useCache' +import { moduleAdd } from '@/api/application/module' const props = defineProps({ templateinfo: { type: Object, @@ -142,9 +143,47 @@ const state = reactive({ ] } }) +const isDialog = ref(false) +const dataInfo: any = ref({ + pid: '', + level: '', + type: '', + nodeType: '', + name: '', + appId: '' +}) +const typeList: any = ref([{ + code: '01', + name: '登录页面' +}, { + code: '02', + name: '主框架页面' +}, { + code: '03', + name: 'GIS大屏页面' +}, { + code: '0301', + name: '数据看板页面' +}, { + code: '04', + name: '二级弹窗页面' +}, { + code: '05', + name: '数据填报页面' +}, { + code: '06', + name: '文档资源页面' +}, { + code: '09', + name: '自定义页面' +}]) onMounted(() => { + console.log(props.templateinfo, 66) init() }) +function paramsCloseForm() { + isDialog.value = false +} function init() { treedata.value = [] templateList.value = [] @@ -171,9 +210,37 @@ function init() { function preview(item) { } +const createTemplateInfo = ref({}) function design(item) { - templateApply(item) - state.pid = props.templateinfo.pid + createTemplateInfo.value = item + dataInfo.value = { + appId: props.templateinfo.appId, + pid: props.templateinfo.pid, + level: 2, + nodeType: '02', + name: item.name, + type: props.templateinfo.type, + } + isDialog.value = true + +} +const isSwitch = ref(false) +const projectId = ref('') +function saveData() { + if (isSwitch.value == true) { + return + } + isSwitch.value = true + moduleAdd(dataInfo.value).then((res) => { + console.log(res) + projectId.value = res.data.data + ElMessage.success('添加成功') + isDialog.value = false + state.pid = props.templateinfo.pid + templateApply(createTemplateInfo.value) + }).catch(() => { + isSwitch.value = false + }) } const templateApply = (template: any) => { state.curApplyTemplate = template @@ -204,9 +271,9 @@ const apply = () => { state.curApplyTemplate.categoryNames.push(t('work_branch.recent')) const baseUrl = (['dataV', 'SCREEN'].includes(state.dvCreateForm.nodeType) - ? '#/dvCanvas?opt=create&createType=template' - : '#/dashboard?opt=create&createType=template') + - '&templateParams=' + + ? '#/dvsCanvas?opt=create&createType=template&dvId=' + projectId.value + : '#/dashboard?opt=create&createType=template&resourceId=' + projectId.value) + + '&pid=' + props.templateinfo.pid + '&appId='+ props.templateinfo.appId+ '&templateParams=' + encodeURIComponent(Base64.encode(JSON.stringify(templateTemplate))) let newWindow = null if (isEmbedded.value) { @@ -254,7 +321,7 @@ function mouseleave() { // 鼠标移出遮罩层 } 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 e22eb1e..7714a4d 100644 --- a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue @@ -59,6 +59,7 @@ const dataInfo:any =ref({ const treeData:any=ref([])// 树数据 const defaultProps = { label: "name" } const templatedialog = ref(false) +const templateinfo = ref({}) watch(() => props.projectInfo, val => { // 初始化数据 projectInfo.value = val getInit() @@ -92,8 +93,6 @@ function addClic(name:any,level:any,pid:any){ // 新建目录、模块 dataInfo.value.nodeType = '02' } title.value = '新建' + name - - isSwitch.value = false isDialog.value=true @@ -260,7 +259,7 @@ function delTreeClic(){ // 删除 }) } -const templateinfo = ref({}) + function templateAdd(){ templateinfo.value = dataInfo.value templatedialog.value = true @@ -287,17 +286,17 @@ function templatedialogClose(){ - + + @node-click="handleNodeClick" style="height: calc(100vh - 170px);overflow: auto;"> - + { // do init }) } + if (createType === 'template') { + let deTemplateData + let preName + const templateParamsApply = JSON.parse(Base64.decode(decodeURIComponent(templateParams + ''))) + await decompressionPre(templateParamsApply, result => { + deTemplateData = result + preName = deTemplateData.baseInfo?.preName + dvMainStore.setComponentData(deTemplateData['componentData']) + dvMainStore.setCanvasStyle(deTemplateData['canvasStyleData']) + dvMainStore.setCanvasViewInfo(deTemplateData['canvasViewInfo']) + }) + } } else if (opt && opt === 'create') { state.canvasInitStatus = false let watermarkBaseInfo