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