Compare commits

..

No commits in common. "a4ec4eb0d40107b311c8df01679eab8fe4a8b32f" and "b48e4b51a030adc3f0ad3e912458c26fc58d6acb" have entirely different histories.

2 changed files with 41 additions and 55 deletions

View File

@ -389,16 +389,11 @@ export async function initCanvasData(dvId, busiFlag, callBack) {
dvMainStore.setCanvasViewInfo(canvasViewInfoPreview) dvMainStore.setCanvasViewInfo(canvasViewInfoPreview)
// 刷新联动信息 // 刷新联动信息
getPanelAllLinkageInfo(dvInfo.id).then(rsp => { getPanelAllLinkageInfo(dvInfo.id).then(rsp => {
if(rsp && rsp.data){ dvMainStore.setNowPanelTrackInfo(rsp.data)
dvMainStore.setNowPanelTrackInfo(rsp.data)
}
}) })
// 刷新跳转信息 // 刷新跳转信息
queryVisualizationJumpInfo(dvInfo.id).then(rsp => { queryVisualizationJumpInfo(dvInfo.id).then(rsp => {
if(rsp && rsp.data){ dvMainStore.setNowPanelJumpInfo(rsp.data)
dvMainStore.setNowPanelJumpInfo(rsp.data)
}
}) })
callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview })
} }

View File

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch, onMounted, onBeforeUnmount, shallowRef, nextTick } from 'vue' import { ref, watch, onMounted, onBeforeUnmount, shallowRef } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
// import Assocmodule from '@/viewsnew/application/SfcEditor/NavbarEditor/assocPage.vue' // import Assocmodule from '@/viewsnew/application/SfcEditor/NavbarEditor/assocPage.vue'
import PermissionSet from '@/views/system/manage/index.vue' import PermissionSet from '@/views/system/manage/index.vue'
@ -7,7 +7,6 @@ import UserInfoSet from '@/views/system/manage/user/userinfo.vue'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import dataVisualization from '@/data-visualization/index.vue' import dataVisualization from '@/data-visualization/index.vue'
import FormCreate from '@/views/BuiltInPage/FormCreate.vue' import FormCreate from '@/views/BuiltInPage/FormCreate.vue'
const router = useRouter() const router = useRouter()
const navtitle: any = ref('') const navtitle: any = ref('')
const navmenulist: any = ref([ const navmenulist: any = ref([
@ -24,36 +23,9 @@ function menuclick(index: any) {
checkindex.value = index checkindex.value = index
currentMoudleId.value = navmenulist.value[index].module_id currentMoudleId.value = navmenulist.value[index].module_id
if (navmenulist.value[index].module_id && 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 currentMoudleId.value = navmenulist.value[index].module_id
currentrow.value = navmenulist.value[index] 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') { if (currentrow.value.module_type == '03') {
currentMoudleType.value = 'dataV' currentMoudleType.value = 'dataV'
showcontent.value = 'dataVisualization' showcontent.value = 'dataVisualization'
@ -68,7 +40,28 @@ function childmenuclick(item: any) {
currentrow: currentrow.value currentrow: currentrow.value
} }
localStorage.setItem('currentInfo', JSON.stringify(currentInfo)) 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))
} }
} }
// //
@ -116,19 +109,17 @@ onMounted(() => {
onBeforeUnmount(() => { onBeforeUnmount(() => {
}); });
function init() { function init(){
showcontent.value = ''
currentMoudleType.value = ''
userList.value = JSON.parse(localStorage.getItem('userInfo') || '{}') userList.value = JSON.parse(localStorage.getItem('userInfo') || '{}')
navtitle.value = userList.value.app_name navtitle.value = userList.value.app_name
applicationId.value = userList.id applicationId.value = userList.id
const permissions: any = JSON.parse(localStorage.getItem('permissions') || '{}') const permissions:any = JSON.parse(localStorage.getItem('permissions')|| '{}')
navmenulist.value = gettreeData(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) {
if (currentInfo.showcontent !== 'FormCreate' && currentInfo.showcontent !== 'dataVisualization') { if(currentInfo.showcontent !=='FormCreate' && currentInfo.showcontent !=='dataVisualization'){
showcontent.value = currentInfo.showcontent showcontent.value = currentInfo.showcontent
} else { }else{
currentrow.value = currentInfo.currentrow currentrow.value = currentInfo.currentrow
if (currentrow.value.module_type == '03') { if (currentrow.value.module_type == '03') {
currentMoudleType.value = 'dataV' currentMoudleType.value = 'dataV'
@ -142,14 +133,14 @@ function init() {
} }
} }
} }
function gettreeData(orglist: any) { function gettreeData(orglist:any) {
const res: any = {}; const res:any = {};
for (const row of orglist) { for (const row of orglist) {
// parentid // parentid
const parentid = row.parentid || "0"; 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]) { if (res[id]) {
Object.assign(res[id], nodeData); Object.assign(res[id], nodeData);
@ -173,7 +164,7 @@ function permissionClick() {
} }
localStorage.setItem('currentInfo', JSON.stringify(currentInfo)) localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
} }
function routerlink() { function routerlink(){
router.push({ path: '/UserLogin' }) router.push({ path: '/UserLogin' })
} }
function logout() { function logout() {
@ -244,11 +235,11 @@ function userdetails() {
</div> </div>
</div> </div>
<div class="system-box-content" style="height: calc(100vh - 65px);"> <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" /> :busiFlag="currentMoudleType" />
<FormCreate v-if="showcontent === 'FormCreate'" :appId="currentrow.module_id" /> <FormCreate v-if="showcontent == 'FormCreate'" :appId="currentrow.module_id" />
<PermissionSet v-if="showcontent === 'PermissionSet'" :isshowheader="true" /> <PermissionSet v-if="showcontent == 'PermissionSet'" :isshowheader="true" />
<UserInfoSet v-if="showcontent === 'UserInfoSet'" :userList="userList" :applicationId="applicationId" /> <UserInfoSet v-if="showcontent == 'UserInfoSet'" :userList="userList" :applicationId="applicationId" />
</div> </div>
</div> </div>
</template> </template>