|
|
|
@ -1,14 +1,14 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<h6 class="pl-3 mb-4 text-lg font-semibold text-[#333] border-l-[5px] border-l-[#006BFF]">保险市场</h6> |
|
|
|
|
<h6 class="pl-3 mb-4 text-lg font-semibold text-[#333] border-l-[5px] border-l-[#006BFF]">基金市场</h6> |
|
|
|
|
<div class="filter block"> |
|
|
|
|
<dl> |
|
|
|
|
<dt>申购费率:</dt> |
|
|
|
|
<div class="vals"> |
|
|
|
|
<dd v-for="(item, i) in rates" |
|
|
|
|
:key="i" |
|
|
|
|
:class="{ active: params.insuranceType === item.id }" |
|
|
|
|
@click="filterClick(item, 'insuranceType')">{{ item.name }}</dd> |
|
|
|
|
:class="{ active: params.subscriptionRate === item.name }" |
|
|
|
|
@click="filterClick(item, 'subscriptionRate')">{{ item.name }}</dd> |
|
|
|
|
</div> |
|
|
|
|
</dl> |
|
|
|
|
<dl> |
|
|
|
@ -16,8 +16,8 @@ |
|
|
|
|
<div class="vals"> |
|
|
|
|
<dd v-for="(item, i) in times" |
|
|
|
|
:key="i" |
|
|
|
|
:class="{ active: params.guarantyStyleId === item.id }" |
|
|
|
|
@click="filterClick(item, 'guarantyStyleId')">{{ item.name }}</dd> |
|
|
|
|
:class="{ active: params.establishmentPeriod === item.name }" |
|
|
|
|
@click="filterClick(item, 'establishmentPeriod')">{{ item.name }}</dd> |
|
|
|
|
</div> |
|
|
|
|
</dl> |
|
|
|
|
<dl> |
|
|
|
@ -25,14 +25,15 @@ |
|
|
|
|
<div class="vals"> |
|
|
|
|
<dd v-for="(item, i) in scales" |
|
|
|
|
:key="i" |
|
|
|
|
:class="{ active: params.loanPeriod === item.name }" |
|
|
|
|
@click="filterClick(item, 'loanPeriod')">{{ item.name }}</dd> |
|
|
|
|
:class="{ active: params.fundraisingScale === item.name }" |
|
|
|
|
@click="filterClick(item, 'fundraisingScale')">{{ item.name }}</dd> |
|
|
|
|
</div> |
|
|
|
|
</dl> |
|
|
|
|
</div> |
|
|
|
|
<div class="block mt-3"> |
|
|
|
|
<div class="search mb-2"> |
|
|
|
|
<input type="text" |
|
|
|
|
v-model="params.fundName" |
|
|
|
|
placeholder="搜索" |
|
|
|
|
maxlength="20" /> |
|
|
|
|
<img src="@/assets/images/search.png" |
|
|
|
@ -42,47 +43,47 @@ |
|
|
|
|
<el-table ref="table" |
|
|
|
|
v-loading="loading" |
|
|
|
|
:data="list"> |
|
|
|
|
<el-table-column prop="productName" |
|
|
|
|
<el-table-column prop="fundCode" |
|
|
|
|
label="基金代码" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="productTypeText" |
|
|
|
|
<el-table-column prop="fundName" |
|
|
|
|
label="基金名称" |
|
|
|
|
min-width="110"></el-table-column> |
|
|
|
|
<el-table-column prop="guarantyStyle" |
|
|
|
|
<el-table-column prop="dailyNetAssetValue" |
|
|
|
|
label="现净值" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="loanPeriod" |
|
|
|
|
<el-table-column prop="dailyGrowthRate" |
|
|
|
|
label="日增长率(%)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="loanLimit" |
|
|
|
|
<el-table-column prop="weeklyGrowthRate" |
|
|
|
|
label="近1周(%)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
<el-table-column prop="monthlyGrowthRate" |
|
|
|
|
label="近1月(%)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
<el-table-column prop="growthRateInRecentMarch" |
|
|
|
|
label="近3月(%)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
<el-table-column prop="growthRateSinceInception" |
|
|
|
|
label="成立来(%)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
<el-table-column prop="fundraisingScale" |
|
|
|
|
label="基金规模(万元)" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="operationTime" |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
label="产品经理" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="operationTime" |
|
|
|
|
label="发布日期" |
|
|
|
|
min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="id" |
|
|
|
|
<!-- <el-table-column prop="id" |
|
|
|
|
label="操作" |
|
|
|
|
width="100"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button type="text" |
|
|
|
|
size="small" |
|
|
|
|
@click="toDetail(row)">查看详情</el-button> |
|
|
|
|
</template></el-table-column> |
|
|
|
|
</template></el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
<el-pagination v-model:currentPage="currentPage" |
|
|
|
|
v-model:pageSize="pageSize" |
|
|
|
@ -102,7 +103,7 @@ |
|
|
|
|
import { onMounted, ref, reactive, watch } from 'vue'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import { pageSizes, pageLayout, toParams } from '@/utils/common'; |
|
|
|
|
import { fundProductList, batchDeletion } from '@/api/fund'; |
|
|
|
|
import { fundProductMarketList } from '@/api/finance'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import Cookies from 'js-cookie'; |
|
|
|
|
|
|
|
|
@ -111,7 +112,9 @@ const route = useRoute(); |
|
|
|
|
const projectId = +Cookies.get('sand-projectId'); |
|
|
|
|
const levelId = +Cookies.get('sand-level'); |
|
|
|
|
const params = reactive({ |
|
|
|
|
createDateSort: '', |
|
|
|
|
establishmentPeriod: '不限', |
|
|
|
|
fundraisingScale: '不限', |
|
|
|
|
subscriptionRate: '不限', |
|
|
|
|
fundName: '', |
|
|
|
|
checkPointId: levelId, |
|
|
|
|
projectId, |
|
|
|
@ -122,75 +125,60 @@ const total = ref<number>(0); |
|
|
|
|
const table = ref<any>(); |
|
|
|
|
const rates = ref<Record<string, any>[]>([ |
|
|
|
|
{ |
|
|
|
|
id: '', |
|
|
|
|
name: '不限', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '0', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '0-0.5%', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '>0.5%', |
|
|
|
|
}, |
|
|
|
|
]); |
|
|
|
|
const times = ref<Record<string, any>[]>([ |
|
|
|
|
{ |
|
|
|
|
id: '', |
|
|
|
|
name: '不限', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '<=1个月', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '1-6个月', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '6个月-1年', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 4, |
|
|
|
|
name: '>1年', |
|
|
|
|
}, |
|
|
|
|
]); |
|
|
|
|
const scales = ref<Record<string, any>[]>([ |
|
|
|
|
{ |
|
|
|
|
id: '', |
|
|
|
|
name: '不限', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '<=300万', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '300-500万', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '500-1000万', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 4, |
|
|
|
|
name: '>1000万', |
|
|
|
|
}, |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
const list = ref<Record<string, any>[]>([]); |
|
|
|
|
const loading = ref<boolean>(false); |
|
|
|
|
const stop = () => {}; |
|
|
|
|
// 列表 |
|
|
|
|
const getList = async () => { |
|
|
|
|
loading.value = true; |
|
|
|
|
try { |
|
|
|
|
const { data } = await fundProductList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) }); |
|
|
|
|
const { data } = await fundProductMarketList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) }); |
|
|
|
|
list.value = data.data.records; |
|
|
|
|
total.value = data.data.total; |
|
|
|
|
} finally { |
|
|
|
@ -207,9 +195,9 @@ onMounted(() => { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
watch([params, () => route.query], initList); |
|
|
|
|
const handleSort = ({ column, prop, order }: { column: any; prop: string; order: string }) => { |
|
|
|
|
params.createDateSort = order === 'descending' ? 'desc' : order === 'ascending' ? 'asc' : ''; |
|
|
|
|
getList(); |
|
|
|
|
// 筛选点击 |
|
|
|
|
const filterClick = (item: Record<string, any>, key: string) => { |
|
|
|
|
params[key] = item.name; |
|
|
|
|
}; |
|
|
|
|
// 新增 |
|
|
|
|
const toAdd = () => { |
|
|
|
@ -221,16 +209,6 @@ const toAdd = () => { |
|
|
|
|
const toDetail = async (path: string, id: number) => { |
|
|
|
|
router.push(`${path}?id=${id}&name=${params.fundName}`); |
|
|
|
|
}; |
|
|
|
|
// 卡片模式 |
|
|
|
|
const toCardList = () => { |
|
|
|
|
router.push(`/product/fund/${list.value.length ? `detail?id=${list.value[0].id}&name=${params.fundName}` : `add?name=${params.fundName}`}`); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleDelete = async (id: number) => { |
|
|
|
|
await batchDeletion([id]); |
|
|
|
|
getList(); |
|
|
|
|
ElMessage.success('删除成功!'); |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.filter { |
|
|
|
|