File tree Expand file tree Collapse file tree 4 files changed +34
-23
lines changed
Expand file tree Collapse file tree 4 files changed +34
-23
lines changed Original file line number Diff line number Diff line change 1313 class =" shared-knowledge"
1414 :class =" currentNodeKey === 'share' && 'active'"
1515 >
16- <AppIcon
17- :iconName =" currentNodeKey === 'share' ? 'app-folder-share-active' : 'app-folder-share'"
18- style =" font-size : 20px "
19- ></AppIcon >
20- <span class =" name" >{{ $t('views.system.share_knowledge') }}</span >
16+ <AppIcon iconName =" app-folder-share-active" style =" font-size : 18px " ></AppIcon >
17+ <span class =" ml-8 lighter" >{{ $t('views.system.share_knowledge') }}</span >
2118 </div >
2219 <el-tree
2320 ref =" treeRef"
@@ -123,12 +120,5 @@ const handleSharedNodeClick = () => {
123120 width : 100% ;
124121 height : 1px ;
125122 }
126-
127- .name {
128- font-weight : 500 ;
129- font-size : 14px ;
130- line-height : 22px ;
131- margin-left : 8px ;
132- }
133123}
134124 </style >
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export const routes: Array<RouteRecordRaw> = [
66 {
77 path : '/' ,
88 name : 'home' ,
9- redirect : '/knowledge ' ,
9+ redirect : '/application ' ,
1010 children : [ ...rolesRoutes ] ,
1111 } ,
1212
Original file line number Diff line number Diff line change @@ -80,16 +80,16 @@ const useApplicationStore = defineStore('application', {
8080 authentication_value ?: any ,
8181 ) {
8282 return new Promise ( ( resolve , reject ) => {
83- applicationApi
84- . postAppAuthentication ( token , loading , authentication_value )
85- . then ( ( res ) => {
86- localStorage . setItem ( `${ token } -accessToken` , res . data )
87- sessionStorage . setItem ( `${ token } -accessToken` , res . data )
88- resolve ( res )
89- } )
90- . catch ( ( error ) => {
91- reject ( error )
92- } )
83+ // applicationApi
84+ // .postAppAuthentication(token, loading, authentication_value)
85+ // .then((res) => {
86+ // localStorage.setItem(`${token}-accessToken`, res.data)
87+ // sessionStorage.setItem(`${token}-accessToken`, res.data)
88+ // resolve(res)
89+ // })
90+ // .catch((error) => {
91+ // reject(error)
92+ // })
9393 } )
9494 } ,
9595 async refreshAccessToken ( token : string ) {
Original file line number Diff line number Diff line change 8484 </div >
8585 </div >
8686 </el-dropdown-item >
87+ <el-dropdown-item @click =" openCreateFolder" divided >
88+ <div class =" flex align-center" >
89+ <AppIcon iconName =" app-folder" style =" font-size : 32px " ></AppIcon >
90+ <div class =" pre-wrap ml-4" >
91+ <div class =" lighter" >
92+ {{ $t('components.folder.addFolder') }}
93+ </div >
94+ </div >
95+ </div >
96+ </el-dropdown-item >
8797 </el-dropdown-menu >
8898 </template >
8999 </el-dropdown >
214224 </ContentContainer >
215225 <CreateApplicationDialog ref =" CreateApplicationDialogRef" />
216226 <CopyApplicationDialog ref =" CopyApplicationDialogRef" />
227+ <CreateFolderDialog ref =" CreateFolderDialogRef" @refresh =" refreshFolder" />
217228 </LayoutContainer >
218229</template >
219230
220231<script lang="ts" setup>
221232import { onMounted , ref , reactive , computed } from ' vue'
222233import CreateApplicationDialog from ' @/views/application/component/CreateApplicationDialog.vue'
234+ import CreateFolderDialog from ' @/components/folder-tree/CreateFolderDialog.vue'
223235import CopyApplicationDialog from ' @/views/application/component/CopyApplicationDialog.vue'
224236import ApplicaitonApi from ' @/api/application/application'
225237import { MsgSuccess , MsgConfirm , MsgError } from ' @/utils/message'
@@ -398,6 +410,15 @@ const exportApplication = (application: any) => {
398410 })
399411}
400412
413+ const CreateFolderDialogRef = ref ()
414+ function openCreateFolder() {
415+ CreateFolderDialogRef .value .open (' APPLICATION' , currentFolder .value .parent_id )
416+ }
417+ function refreshFolder() {
418+ getFolder ()
419+ getList ()
420+ }
421+
401422onMounted (() => {
402423 getFolder ()
403424})
You can’t perform that action at this time.
0 commit comments