|
|
@@ -3,7 +3,8 @@
|
|
|
<app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
:expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
<template #header>
|
|
|
- <app-filter :options="filterOptons" />
|
|
|
+ <el-button type="primary" v-if="authStatus === AuthStatus.Certified" @click="openComponent('sign')">添加签约账户</el-button>
|
|
|
+ <el-button type="warning" v-else @click="openComponent('certification')" plain>实名认证</el-button>
|
|
|
</template>
|
|
|
<!-- 证件类型 -->
|
|
|
<template #cardtype="{ value }">
|
|
|
@@ -28,18 +29,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent, onActivated } from 'vue'
|
|
|
+import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
-import { useDataFilter } from '@/hooks/datatable'
|
|
|
import { queryBankAccountSign } from '@/services/api/bank'
|
|
|
import { getSignStatusName, SignStatus } from '@/constants/bank'
|
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
|
import { queryUserAccount } from '@/services/api/account'
|
|
|
import { AuthStatus } from '@/constants/account'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
-import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
|
@@ -48,7 +47,6 @@ const componentMap = new Map<string, unknown>([
|
|
|
])
|
|
|
|
|
|
const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.BankAccountSignRsp>({ rowKey: 'applyexchticket' })
|
|
|
-const { filterOptons } = useDataFilter<Model.BankAccountSignReq>()
|
|
|
const { loading, dataList, run } = useRequest(queryBankAccountSign, {})
|
|
|
const authStatus = shallowRef(AuthStatus.Uncertified) // 实名认证状态
|
|
|
|
|
|
@@ -68,13 +66,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ prop: 'signstatus', label: '状态' },
|
|
|
])
|
|
|
|
|
|
-filterOptons.buttonList = authStatus.value === AuthStatus.Certified ? [
|
|
|
- { lable: '添加签约账户', className: 'el-button--primary', onClick: () => openComponent('sign') },
|
|
|
-] : [
|
|
|
- { lable: '实名认证', className: 'el-button--warning', onClick: () => openComponent('certification') },
|
|
|
-]
|
|
|
-
|
|
|
-onActivated(() => {
|
|
|
+onMounted(() => {
|
|
|
if (authStatus.value !== AuthStatus.Certified) {
|
|
|
// 获取用户账号信息
|
|
|
queryUserAccount().then((res) => {
|
|
|
@@ -82,4 +74,5 @@ onActivated(() => {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
</script>
|