|
|
@ -26,9 +26,9 @@ import { |
|
|
|
} from 'naive-ui' |
|
|
|
} from 'naive-ui' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { SearchOutlined } from '@vicons/antd' |
|
|
|
import { SearchOutlined } from '@vicons/antd' |
|
|
|
|
|
|
|
import { useTable } from './use-table' |
|
|
|
import Card from '@/components/card' |
|
|
|
import Card from '@/components/card' |
|
|
|
import FolderModal from './components/function-modal' |
|
|
|
import FolderModal from './components/function-modal' |
|
|
|
import { useTable } from './use-table' |
|
|
|
|
|
|
|
import styles from './index.module.scss' |
|
|
|
import styles from './index.module.scss' |
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
export default defineComponent({ |
|
|
@ -94,68 +94,64 @@ export default defineComponent({ |
|
|
|
const { loadingRef } = this |
|
|
|
const { loadingRef } = this |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div class={styles.content}> |
|
|
|
<NSpace vertical> |
|
|
|
<Card class={styles.card}> |
|
|
|
<Card> |
|
|
|
<div class={styles.header}> |
|
|
|
<NSpace justify='space-between'> |
|
|
|
|
|
|
|
<NButton |
|
|
|
|
|
|
|
type='primary' |
|
|
|
|
|
|
|
size='small' |
|
|
|
|
|
|
|
onClick={this.handleCreateFolder} |
|
|
|
|
|
|
|
class='btn-create-udf-function' |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{t('resource.function.create_udf_function')} |
|
|
|
|
|
|
|
</NButton> |
|
|
|
<NSpace> |
|
|
|
<NSpace> |
|
|
|
<NButton |
|
|
|
<NInput |
|
|
|
type='primary' |
|
|
|
allowInput={this.trim} |
|
|
|
onClick={this.handleCreateFolder} |
|
|
|
size='small' |
|
|
|
class='btn-create-udf-function' |
|
|
|
placeholder={t('resource.function.enter_keyword_tips')} |
|
|
|
> |
|
|
|
v-model={[this.searchVal, 'value']} |
|
|
|
{t('resource.function.create_udf_function')} |
|
|
|
/> |
|
|
|
|
|
|
|
<NButton type='primary' size='small' onClick={this.handleSearch}> |
|
|
|
|
|
|
|
<NIcon> |
|
|
|
|
|
|
|
<SearchOutlined/> |
|
|
|
|
|
|
|
</NIcon> |
|
|
|
</NButton> |
|
|
|
</NButton> |
|
|
|
</NSpace> |
|
|
|
</NSpace> |
|
|
|
<div class={styles.right}> |
|
|
|
</NSpace> |
|
|
|
<div class={styles.search}> |
|
|
|
|
|
|
|
<div class={styles.list}> |
|
|
|
|
|
|
|
<NButton type='primary' onClick={this.handleSearch}> |
|
|
|
|
|
|
|
<NIcon> |
|
|
|
|
|
|
|
<SearchOutlined /> |
|
|
|
|
|
|
|
</NIcon> |
|
|
|
|
|
|
|
</NButton> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class={styles.list}> |
|
|
|
|
|
|
|
<NInput |
|
|
|
|
|
|
|
allowInput={this.trim} |
|
|
|
|
|
|
|
placeholder={t('resource.function.enter_keyword_tips')} |
|
|
|
|
|
|
|
v-model={[this.searchVal, 'value']} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|
<Card title={t('resource.function.udf_function')}> |
|
|
|
<Card title={t('resource.function.udf_function')}> |
|
|
|
<NDataTable |
|
|
|
<NSpace vertical> |
|
|
|
loading={loadingRef} |
|
|
|
<NDataTable |
|
|
|
columns={this.columns} |
|
|
|
loading={loadingRef} |
|
|
|
data={this.tableData} |
|
|
|
columns={this.columns} |
|
|
|
striped |
|
|
|
data={this.tableData} |
|
|
|
size={'small'} |
|
|
|
striped |
|
|
|
class={styles.table} |
|
|
|
size={'small'} |
|
|
|
row-class-name='items' |
|
|
|
class={styles.table} |
|
|
|
scrollX={this.tableWidth} |
|
|
|
row-class-name='items' |
|
|
|
/> |
|
|
|
scrollX={this.tableWidth} |
|
|
|
<div class={styles.pagination}> |
|
|
|
|
|
|
|
<NPagination |
|
|
|
|
|
|
|
v-model:page={this.page} |
|
|
|
|
|
|
|
v-model:page-size={this.pageSize} |
|
|
|
|
|
|
|
page-count={this.totalPage} |
|
|
|
|
|
|
|
show-size-picker |
|
|
|
|
|
|
|
page-sizes={[10, 30, 50]} |
|
|
|
|
|
|
|
show-quick-jumper |
|
|
|
|
|
|
|
onUpdatePage={this.requestData} |
|
|
|
|
|
|
|
onUpdatePageSize={this.handleChangePageSize} |
|
|
|
|
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<NSpace justify='center'> |
|
|
|
|
|
|
|
<NPagination |
|
|
|
|
|
|
|
v-model:page={this.page} |
|
|
|
|
|
|
|
v-model:page-size={this.pageSize} |
|
|
|
|
|
|
|
page-count={this.totalPage} |
|
|
|
|
|
|
|
show-size-picker |
|
|
|
|
|
|
|
page-sizes={[10, 30, 50]} |
|
|
|
|
|
|
|
show-quick-jumper |
|
|
|
|
|
|
|
onUpdatePage={this.requestData} |
|
|
|
|
|
|
|
onUpdatePageSize={this.handleChangePageSize} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</NSpace> |
|
|
|
|
|
|
|
</NSpace> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|
<FolderModal |
|
|
|
<FolderModal |
|
|
|
v-model:row={this.row} |
|
|
|
v-model:row={this.row} |
|
|
|
v-model:show={this.showRef} |
|
|
|
v-model:show={this.showRef} |
|
|
|
onUpdateList={this.handleUpdateList} |
|
|
|
onUpdateList={this.handleUpdateList} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</NSpace> |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|