This commit is contained in:
parent
a158f1403f
commit
2b4edb3815
|
|
@ -37,6 +37,7 @@ export default defineComponent({
|
||||||
// fullname is now the id of resources
|
// fullname is now the id of resources
|
||||||
const fullName = String(router.currentRoute.value.query.prefix || '')
|
const fullName = String(router.currentRoute.value.query.prefix || '')
|
||||||
const tenantCode = String(router.currentRoute.value.query.tenantCode || '')
|
const tenantCode = String(router.currentRoute.value.query.tenantCode || '')
|
||||||
|
const alias = String(router.currentRoute.value.query.alias || '')
|
||||||
|
|
||||||
const { state } = useForm()
|
const { state } = useForm()
|
||||||
const { getResourceView, handleUpdateContent } = useEdit(state)
|
const { getResourceView, handleUpdateContent } = useEdit(state)
|
||||||
|
|
@ -61,6 +62,7 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
componentName,
|
componentName,
|
||||||
resourceViewRef,
|
resourceViewRef,
|
||||||
|
alias,
|
||||||
handleReturn,
|
handleReturn,
|
||||||
handleFileContent,
|
handleFileContent,
|
||||||
...toRefs(state)
|
...toRefs(state)
|
||||||
|
|
@ -73,7 +75,7 @@ export default defineComponent({
|
||||||
{this.resourceViewRef.isReady.value ? (
|
{this.resourceViewRef.isReady.value ? (
|
||||||
<div class={styles['file-edit-content']}>
|
<div class={styles['file-edit-content']}>
|
||||||
<h2>
|
<h2>
|
||||||
<span>{this.resourceViewRef.state.value.alias}</span>
|
<span>{this.alias}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<NForm
|
<NForm
|
||||||
rules={this.rules}
|
rules={this.rules}
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,18 @@ export default defineComponent({
|
||||||
return !(flag && size < 1000000)
|
return !(flag && size < 1000000)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEditFile = (item: { fullName: string; user_name: string }) => {
|
const handleEditFile = (item: {
|
||||||
|
fullName: string
|
||||||
|
user_name: string
|
||||||
|
alias: string
|
||||||
|
}) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'resource-file-edit',
|
name: 'resource-file-edit',
|
||||||
query: { prefix: item.fullName, tenantCode: item.user_name }
|
query: {
|
||||||
|
prefix: item.fullName,
|
||||||
|
tenantCode: item.user_name,
|
||||||
|
alias: item.alias
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,7 +134,8 @@ export default defineComponent({
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.handleEditFile({
|
this.handleEditFile({
|
||||||
fullName: this.row.fullName,
|
fullName: this.row.fullName,
|
||||||
user_name: this.row.user_name
|
user_name: this.row.user_name,
|
||||||
|
alias: this.row.alias
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
style={{ marginRight: '-5px' }}
|
style={{ marginRight: '-5px' }}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ export interface ResourceFileTableData {
|
||||||
user_name: string
|
user_name: string
|
||||||
directory: string
|
directory: string
|
||||||
file_name: string
|
file_name: string
|
||||||
|
alias: string
|
||||||
description: string
|
description: string
|
||||||
size: number
|
size: number
|
||||||
type: ResourceType
|
type: ResourceType
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue