feat: application
This commit is contained in:
parent
bce83f7545
commit
20e11f5c87
@ -13,11 +13,8 @@
|
||||
class="shared-knowledge"
|
||||
:class="currentNodeKey === 'share' && 'active'"
|
||||
>
|
||||
<AppIcon
|
||||
:iconName="currentNodeKey === 'share' ? 'app-folder-share-active' : 'app-folder-share'"
|
||||
style="font-size: 20px"
|
||||
></AppIcon>
|
||||
<span class="name">{{ $t('views.system.share_knowledge') }}</span>
|
||||
<AppIcon iconName="app-folder-share-active" style="font-size: 18px"></AppIcon>
|
||||
<span class="ml-8 lighter">{{ $t('views.system.share_knowledge') }}</span>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
@ -123,12 +120,5 @@ const handleSharedNodeClick = () => {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -6,7 +6,7 @@ export const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
redirect: '/knowledge',
|
||||
redirect: '/application',
|
||||
children: [...rolesRoutes],
|
||||
},
|
||||
|
||||
|
||||
@ -80,16 +80,16 @@ const useApplicationStore = defineStore('application', {
|
||||
authentication_value?: any,
|
||||
) {
|
||||
return new Promise((resolve, reject) => {
|
||||
applicationApi
|
||||
.postAppAuthentication(token, loading, authentication_value)
|
||||
.then((res) => {
|
||||
localStorage.setItem(`${token}-accessToken`, res.data)
|
||||
sessionStorage.setItem(`${token}-accessToken`, res.data)
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
// applicationApi
|
||||
// .postAppAuthentication(token, loading, authentication_value)
|
||||
// .then((res) => {
|
||||
// localStorage.setItem(`${token}-accessToken`, res.data)
|
||||
// sessionStorage.setItem(`${token}-accessToken`, res.data)
|
||||
// resolve(res)
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// reject(error)
|
||||
// })
|
||||
})
|
||||
},
|
||||
async refreshAccessToken(token: string) {
|
||||
|
||||
@ -84,6 +84,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="openCreateFolder" divided>
|
||||
<div class="flex align-center">
|
||||
<AppIcon iconName="app-folder" style="font-size: 32px"></AppIcon>
|
||||
<div class="pre-wrap ml-4">
|
||||
<div class="lighter">
|
||||
{{ $t('components.folder.addFolder') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
@ -214,12 +224,14 @@
|
||||
</ContentContainer>
|
||||
<CreateApplicationDialog ref="CreateApplicationDialogRef" />
|
||||
<CopyApplicationDialog ref="CopyApplicationDialogRef" />
|
||||
<CreateFolderDialog ref="CreateFolderDialogRef" @refresh="refreshFolder" />
|
||||
</LayoutContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, computed } from 'vue'
|
||||
import CreateApplicationDialog from '@/views/application/component/CreateApplicationDialog.vue'
|
||||
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
||||
import CopyApplicationDialog from '@/views/application/component/CopyApplicationDialog.vue'
|
||||
import ApplicaitonApi from '@/api/application/application'
|
||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||
@ -398,6 +410,15 @@ const exportApplication = (application: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
const CreateFolderDialogRef = ref()
|
||||
function openCreateFolder() {
|
||||
CreateFolderDialogRef.value.open('APPLICATION', currentFolder.value.parent_id)
|
||||
}
|
||||
function refreshFolder() {
|
||||
getFolder()
|
||||
getList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getFolder()
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user