Merge branch 'main' of http://192.168.1.22:3000/zcy/canneng-admin
This commit is contained in:
46
src/views/govern/user/roleCode/index.vue
Normal file
46
src/views/govern/user/roleCode/index.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:operation>
|
||||
<el-button :icon='Refresh' type='primary' @click='refresh'>刷新推荐码</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
<popupForm ref='popupRef'></popupForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { Refresh } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { refreshReferralCode } from '@/api/user-boot/referralCode'
|
||||
|
||||
defineOptions({
|
||||
name: 'auth/menu'
|
||||
})
|
||||
const tableRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
method: 'POST',
|
||||
url: '/user-boot/referralCode/findReferralCode',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 60 },
|
||||
{ title: '角色名称', field: 'roleName' },
|
||||
{ title: '推荐码', field: 'roleReferralCode' }
|
||||
]
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.table.ref = tableRef.value
|
||||
tableStore.index()
|
||||
tableStore.table.loading = false
|
||||
})
|
||||
const refresh = () => {
|
||||
refreshReferralCode().then(res => {
|
||||
tableStore.table.data = res.data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user