Compare commits
2 Commits
b48e4b51a0
...
a4ec4eb0d4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a4ec4eb0d4 | ||
![]() |
5124f180a6 |
@ -389,11 +389,16 @@ export async function initCanvasData(dvId, busiFlag, callBack) {
|
||||
dvMainStore.setCanvasViewInfo(canvasViewInfoPreview)
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(dvInfo.id).then(rsp => {
|
||||
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
||||
if(rsp && rsp.data){
|
||||
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
||||
}
|
||||
|
||||
})
|
||||
// 刷新跳转信息
|
||||
queryVisualizationJumpInfo(dvInfo.id).then(rsp => {
|
||||
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
||||
if(rsp && rsp.data){
|
||||
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
||||
}
|
||||
})
|
||||
callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview })
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, onMounted, onBeforeUnmount, shallowRef } from 'vue'
|
||||
import { ref, watch, onMounted, onBeforeUnmount, shallowRef, nextTick } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
// import Assocmodule from '@/viewsnew/application/SfcEditor/NavbarEditor/assocPage.vue'
|
||||
import PermissionSet from '@/views/system/manage/index.vue'
|
||||
@ -7,6 +7,7 @@ import UserInfoSet from '@/views/system/manage/user/userinfo.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import dataVisualization from '@/data-visualization/index.vue'
|
||||
import FormCreate from '@/views/BuiltInPage/FormCreate.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const navtitle: any = ref('')
|
||||
const navmenulist: any = ref([
|
||||
@ -23,9 +24,36 @@ function menuclick(index: any) {
|
||||
checkindex.value = index
|
||||
currentMoudleId.value = navmenulist.value[index].module_id
|
||||
if (navmenulist.value[index].module_id && navmenulist.value[index].module_id !== '') {
|
||||
showcontent.value = ''
|
||||
showcontent.value = ''
|
||||
currentMoudleType.value = ''
|
||||
currentMoudleId.value = navmenulist.value[index].module_id
|
||||
currentrow.value = navmenulist.value[index]
|
||||
nextTick(() => {
|
||||
if (currentrow.value.module_type == '03') {
|
||||
currentMoudleType.value = 'dataV'
|
||||
showcontent.value = 'dataVisualization'
|
||||
} else if (currentrow.value.module_type == '0301') {
|
||||
currentMoudleType.value = 'dashboard'
|
||||
showcontent.value = 'dataVisualization'
|
||||
} else if (currentrow.value.module_type == '05') {
|
||||
showcontent.value = 'FormCreate'
|
||||
}
|
||||
const currentInfo = {
|
||||
showcontent: showcontent.value,
|
||||
currentrow: currentrow.value
|
||||
}
|
||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
function childmenuclick(item: any) {
|
||||
if (item.module_id && item.module_id !== '') {
|
||||
showcontent.value = ''
|
||||
currentMoudleType.value = ''
|
||||
currentrow.value = item
|
||||
currentMoudleId.value = item.module_id
|
||||
nextTick(() => {
|
||||
if (currentrow.value.module_type == '03') {
|
||||
currentMoudleType.value = 'dataV'
|
||||
showcontent.value = 'dataVisualization'
|
||||
@ -40,28 +68,7 @@ function menuclick(index: any) {
|
||||
currentrow: currentrow.value
|
||||
}
|
||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||
}
|
||||
}
|
||||
}
|
||||
function childmenuclick(item: any) {
|
||||
showcontent.value = ''
|
||||
if (item.module_id && item.module_id !== '') {
|
||||
currentrow.value = item
|
||||
currentMoudleId.value = item.module_id
|
||||
if (currentrow.value.module_type == '03') {
|
||||
currentMoudleType.value = 'dataV'
|
||||
showcontent.value = 'dataVisualization'
|
||||
} else if (currentrow.value.module_type == '0301') {
|
||||
currentMoudleType.value = 'dashboard'
|
||||
showcontent.value = 'dataVisualization'
|
||||
} else if (currentrow.value.module_type == '05') {
|
||||
showcontent.value = 'FormCreate'
|
||||
}
|
||||
const currentInfo = {
|
||||
showcontent: showcontent.value,
|
||||
currentrow: currentrow.value
|
||||
}
|
||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||
})
|
||||
}
|
||||
}
|
||||
// 时间相关逻辑移动到独立组件中
|
||||
@ -109,17 +116,19 @@ onMounted(() => {
|
||||
onBeforeUnmount(() => {
|
||||
|
||||
});
|
||||
function init(){
|
||||
function init() {
|
||||
showcontent.value = ''
|
||||
currentMoudleType.value = ''
|
||||
userList.value = JSON.parse(localStorage.getItem('userInfo') || '{}')
|
||||
navtitle.value = userList.value.app_name
|
||||
applicationId.value = userList.id
|
||||
const permissions:any = JSON.parse(localStorage.getItem('permissions')|| '{}')
|
||||
const permissions: any = JSON.parse(localStorage.getItem('permissions') || '{}')
|
||||
navmenulist.value = gettreeData(permissions)
|
||||
const currentInfo:any = JSON.parse(localStorage.getItem('currentInfo')|| '{}')
|
||||
const currentInfo: any = JSON.parse(localStorage.getItem('currentInfo') || '{}')
|
||||
if (currentInfo?.showcontent) {
|
||||
if(currentInfo.showcontent !=='FormCreate' && currentInfo.showcontent !=='dataVisualization'){
|
||||
if (currentInfo.showcontent !== 'FormCreate' && currentInfo.showcontent !== 'dataVisualization') {
|
||||
showcontent.value = currentInfo.showcontent
|
||||
}else{
|
||||
} else {
|
||||
currentrow.value = currentInfo.currentrow
|
||||
if (currentrow.value.module_type == '03') {
|
||||
currentMoudleType.value = 'dataV'
|
||||
@ -133,14 +142,14 @@ function init(){
|
||||
}
|
||||
}
|
||||
}
|
||||
function gettreeData(orglist:any) {
|
||||
const res:any = {};
|
||||
function gettreeData(orglist: any) {
|
||||
const res: any = {};
|
||||
for (const row of orglist) {
|
||||
// 处理 parentid 并解构需要字段
|
||||
// 处理 parentid 并解构需要字段
|
||||
const parentid = row.parentid || "0";
|
||||
const { id, name,code, isdisplay, appId, type,module_id,module_type } = row;
|
||||
const { id, name, code, isdisplay, appId, type, module_id, module_type } = row;
|
||||
// 统一节点数据对象
|
||||
const nodeData = { parentid, id, name,code, isdisplay, appId, type,module_id,module_type }
|
||||
const nodeData = { parentid, id, name, code, isdisplay, appId, type, module_id, module_type }
|
||||
// 更新或创建节点
|
||||
if (res[id]) {
|
||||
Object.assign(res[id], nodeData);
|
||||
@ -164,7 +173,7 @@ function permissionClick() {
|
||||
}
|
||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||
}
|
||||
function routerlink(){
|
||||
function routerlink() {
|
||||
router.push({ path: '/UserLogin' })
|
||||
}
|
||||
function logout() {
|
||||
@ -235,11 +244,11 @@ function userdetails() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="system-box-content" style="height: calc(100vh - 65px);">
|
||||
<dataVisualization v-if="showcontent == 'dataVisualization'" :appId="currentrow.module_id"
|
||||
<dataVisualization v-if="showcontent === 'dataVisualization'" :appId="currentrow.module_id"
|
||||
:busiFlag="currentMoudleType" />
|
||||
<FormCreate v-if="showcontent == 'FormCreate'" :appId="currentrow.module_id" />
|
||||
<PermissionSet v-if="showcontent == 'PermissionSet'" :isshowheader="true" />
|
||||
<UserInfoSet v-if="showcontent == 'UserInfoSet'" :userList="userList" :applicationId="applicationId" />
|
||||
<FormCreate v-if="showcontent === 'FormCreate'" :appId="currentrow.module_id" />
|
||||
<PermissionSet v-if="showcontent === 'PermissionSet'" :isshowheader="true" />
|
||||
<UserInfoSet v-if="showcontent === 'UserInfoSet'" :userList="userList" :applicationId="applicationId" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user