全部操作日期改成虚拟时间(这个版本读取显示日期,后面再作修改);模型的下拉按从小到大排序;金融市场保险

V0.1
yujialong 10 months ago
parent 4385cfab8c
commit 2350694630
  1. 2
      src/api/bank.ts
  2. 6
      src/api/finance.ts
  3. 2
      src/api/fund.ts
  4. 2
      src/api/system.ts
  5. 13
      src/components/Panel/index.vue
  6. 14
      src/layout/components/AppSidebar/index.vue
  7. 2
      src/router/index.ts
  8. 11
      src/utils/common.ts
  9. 32
      src/views/Role.vue
  10. 2
      src/views/config/param/Financial.vue
  11. 51
      src/views/finance/Bank.vue
  12. 294
      src/views/finance/Fund.vue
  13. 261
      src/views/finance/Insurance.vue
  14. 2
      src/views/product/afterLoan/1031.vue
  15. 12
      src/views/product/bank/Approve.vue
  16. 4
      src/views/product/bank/List.vue
  17. 5
      src/views/product/fund/List.vue
  18. 6
      src/views/product/insurance/List.vue
  19. 2
      src/views/product/interestRate/772.vue
  20. 2
      src/views/product/interestRate/935.vue
  21. 8
      src/views/product/strategy/Credit.vue

@ -1,5 +1,5 @@
import axios from '@/utils/request';
// 银行
export const queryStorageList = async (params?: Record<string, any>): Promise<any> => (await axios.get('/backend/core/storage', { params })).data;
export const queryStorage = async (id: number): Promise<any> => (await axios.get(`/backend/core/storage/${id}`)).data;
export const updateStorage = async (data: Record<string, any>): Promise<any> => (await axios.post('/backend/core/storage?_method=put', data)).data;

@ -0,0 +1,6 @@
import axios from '@/utils/request';
// 金融市场
export const queryStorage = async (id: number): Promise<any> => (await axios.get(`/backend/core/storage/${id}`)).data;
export const bankingProductMarketsList = async (data: Record<string, any>): Promise<any> =>
(await axios.post('/product/product/bank/products/market/bankingProductMarketsList', data)).data;
export const insuranceMarketList = async (data: Record<string, any>): Promise<any> => (await axios.post('/product/insurance/products/market/insuranceMarketList', data)).data;

@ -1,5 +1,5 @@
import axios from '@/utils/request';
// 保险
// 基金
export const saveFund = async (data: Record<string, any>): Promise<any> => (await axios.post('/product/fundProducts/save', data)).data;
export const batchDeletion = async (data: number[]): Promise<any> => (await axios.post(`/product/fundProducts/batchDeletion`, data)).data;
export const fundProductList = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/fundProducts/fundProductList`, data)).data;

@ -15,4 +15,4 @@ export const updateReport = async (data: Record<string, any>): Promise<any> => (
export const editExperimentalData = async (data: Record<string, any>): Promise<any> =>
(await axios.post('/occupationlab/occupationlab/experimentalReport/editExperimentalData', data)).data;
export const getStartTime = async (params: Record<string, any>): Promise<any> => (await axios.get('/python/python/getStartTime', { params })).data;
export const getCurrentTime = async (params: Record<string, any>): Promise<any> => (await axios.get('/competition/competition/management/getCurrentTime', { params })).data;
export const getCurrentTime = async (): Promise<any> => (await axios.get('/competition/competition/management/getCurrentTime')).data;

@ -225,7 +225,7 @@
import { ref, reactive, onMounted, inject, computed, watch } from 'vue';
import { submitOpe } from '@/api/bank';
import { deleteCache } from '@/api/judgment';
import { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition, getStartTime, getCurrentTime } from '@/api/system';
import { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition, getStartTime } from '@/api/system';
import Settings from '@/settings';
import { useRouter, useRoute } from 'vue-router';
import type { Action } from 'element-plus';
@ -238,7 +238,7 @@ import 'mavon-editor/dist/css/index.css';
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import { useDraggable } from '@vueuse/core';
import { logout } from '@/store/useCurrentUser';
import { getIds } from '@/utils/common';
import { getIds, getNow } from '@/utils/common';
const router = useRouter();
const route = useRoute();
@ -340,7 +340,7 @@ watch(
);
//
const getSumTime = () => {
const getSumTime = (): Promise<any> => {
return new Promise(async (resolve, reject) => {
const res = await getStartTime({
permissions: per.value,
@ -349,13 +349,6 @@ const getSumTime = () => {
resolve(res.startTime ? new Date(res.startTime) : '');
});
};
//
const getNow = () => {
return new Promise(async (resolve, reject) => {
const res = await getCurrentTime();
resolve(new Date(res.currentTime));
});
};
//
const timeFormat = (num: number): string | number => {
return num < 10 ? `0${num}` : num;

@ -9,11 +9,11 @@
<p class="text-white text-md">{{ roleName }}</p>
<p class="my-2 text-white text-sm">产品部门</p>
<div class="flex justify-center items-center text-white text-xs">
操作日期{{ date }}
<img class="ml-2 cursor-pointer"
虚拟时间{{ date }}
<!-- <img class="ml-2 cursor-pointer"
src="@/assets/images/date.png"
alt=""
@click="dateVisible = true">
@click="dateVisible = true"> -->
</div>
</div>
<menus></menus>
@ -50,13 +50,14 @@ import { getOperationTime, saveOperationTime } from '@/api/config';
import { appState } from '@/store/useAppState';
import Cookies from 'js-cookie';
import dayjs from 'dayjs';
import { getNow } from '@/utils/common';
const router = useRouter();
const route = useRoute();
const isConfig = computed(() => route.path.startsWith('/config'));
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const date = ref<string>(dayjs(new Date()).format('YYYY-MM-DD'));
const diaDate = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const dateVisible = ref<boolean>(false);
@ -86,8 +87,9 @@ const submitDate = async () => {
getDate();
dateVisible.value = false;
};
onMounted(() => {
getDate();
onMounted(async () => {
// getDate();
date.value = dayjs(await getNow()).format('YYYY-MM-DD');
});
</script>

@ -50,6 +50,8 @@ export const routes: Array<RouteRecordRaw> = [
meta: { title: '金融市场' },
children: [
{ path: 'bank', component: () => import('@/views/finance/Bank.vue'), meta: { title: '银行市场' } },
{ path: 'insurance', component: () => import('@/views/finance/Insurance.vue'), meta: { title: '保险市场' } },
{ path: 'fund', component: () => import('@/views/finance/Fund.vue'), meta: { title: '基金市场' } },
{ path: 'publish', component: () => import('@/views/finance/Publish.vue'), meta: { title: '发布' } },
{ path: 'account', component: () => import('@/views/finance/Account.vue'), meta: { title: '我的账户' } },
{ path: 'order', component: () => import('@/views/finance/Order.vue'), meta: { title: '我的订单' } },

@ -1,4 +1,5 @@
import Cookies from 'js-cookie';
import { getCurrentTime } from '@/api/system';
const UJCMS_LOCALE = 'ujcms-locale';
const UJCMS_SITE_ID = 'ujcms-site-id';
@ -241,3 +242,13 @@ export const getIds = (): Record<string, any> => {
competitionId: +Cookies.get('sand-competitionId') || '',
};
};
/**
*
*/
export const getNow = (): Promise<any> => {
return new Promise(async (resolve) => {
const res = await getCurrentTime();
resolve(new Date(res.currentTime));
});
};

@ -65,8 +65,7 @@
alt="">
<div class="absolute top-5 left-[18px] w-[204px] h-[68px] bg-[url('@/assets/images/role/2.png')] bg-[length:100%_100%] bg-no-repeat"></div>
<div class="date absolute top-[70px] left-[54%] w-[198px] h-[46px] pt-[10px] pl-[56px] text-base text-white bg-[url('@/assets/images/role/date.png')] bg-no-repeat cursor-pointer transition hover:bg-[url('@/assets/images/role/date1.png')]"
@click="dateVisible = true">
<div class="date absolute top-[70px] left-[54%] w-[198px] h-[46px] pt-[10px] pl-[56px] text-base text-white bg-[url('@/assets/images/role/date.png')] bg-no-repeat transition">
{{ date }}
</div>
<div class="role top-[35%] left-[17%] xl:top-[31%] lg:top-[32%] lg:left-[15%] bg-[url('@/assets/images/role/product.png')] hover:bg-[url('@/assets/images/role/product1.png')]"
@ -79,12 +78,12 @@
@click="selecRole(275)"></div>
<div class="role relative bottom-[70px] left-[25%] bg-[url('@/assets/images/role/fund.png')] hover:bg-[url('@/assets/images/role/fund1.png')]"
@click="selecRole(1161)"></div>
<div class="role relative bottom-[255px] left-[41%] bg-[url('@/assets/images/role/market-bank.png')] hover:bg-[url('@/assets/images/role/market-bank1.png')]"
@click="selecRole(1162)"></div>
<!-- <div class="role relative bottom-[255px] left-[41%] bg-[url('@/assets/images/role/market-bank.png')] hover:bg-[url('@/assets/images/role/market-bank1.png')]"
@click="selecRole('bank')"></div>
<div class="role relative bottom-[420px] left-[52%] bg-[url('@/assets/images/role/market-insurance.png')] hover:bg-[url('@/assets/images/role/market-insurance1.png')]"
@click="selecRole(1163)"></div>
@click="selecRole('insurance')"></div>
<div class="role relative bottom-[560px] left-[63%] bg-[url('@/assets/images/role/market-fund.png')] hover:bg-[url('@/assets/images/role/market-fund1.png')]"
@click="selecRole(1164)"></div>
@click="selecRole('fund')"></div> -->
</div>
<!-- <div class="fixed top-[80px] right-[80px]">
<div class="flex items-center h-[60px] px-4 rounded-tl-[20px] rounded-tr-[20px]"
@ -153,6 +152,7 @@ import { useRouter, useRoute } from 'vue-router';
import { logout } from '@/store/useCurrentUser';
import Cookies from 'js-cookie';
import dayjs from 'dayjs';
import { getNow } from '@/utils/common';
const router = useRouter();
const route = useRoute();
@ -161,7 +161,7 @@ const levelId = +Cookies.get('sand-level');
const collected = ref<boolean>(false);
const curLevel = ref<number | string>('');
const dateVisible = ref<boolean>(false);
const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const date = ref<string>(dayjs(new Date()).format('YYYY-MM-DD'));
const diaDate = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const levels = ref<Record<string, any>[]>([]);
const ranges = ref<Record<string, any>[]>([
@ -235,7 +235,18 @@ const getLevel = async () => {
};
//
const selecRole = (id: number) => {
const path = id === 275 ? `/product/insurance` : id === 1161 ? `/product/fund` : id === 1162 ? `/finance/bank` : `/product/bank?type=0&i=1&role=${id}`;
let path = `/product/bank?type=0&i=1&role=${id}`;
if (id === 275) {
path = `/product/insurance`;
} else if (id === 1161) {
path = `/product/fund`;
} else if (id === 'bank') {
path = `/finance/bank`;
} else if (id === 'insurance') {
path = `/finance/insurance`;
} else if (id === 'fund') {
path = `/finance/fund`;
}
router.push(path);
};
//
@ -256,8 +267,9 @@ const submitDate = async () => {
getDate();
dateVisible.value = false;
};
onMounted(() => {
getDate();
onMounted(async () => {
// getDate();
date.value = dayjs(await getNow()).format('YYYY-MM-DD');
});
</script>

@ -1,5 +1,5 @@
<template>
<div class="max-h-[calc(100vh-250px)] overflow-auto">
<div class="max-h-[calc(100vh-290px)] overflow-auto">
<el-form ref="formRef"
label-width="100px"
label-suffix=":"

@ -25,8 +25,8 @@
<div class="vals">
<dd v-for="(item, i) in times"
:key="i"
:class="{ active: params.time === item.id }"
@click="filterClick(item, 'time')">{{ item.name }}</dd>
:class="{ active: params.loanPeriod === item.name }"
@click="filterClick(item, 'loanPeriod')">{{ item.name }}</dd>
</div>
</dl>
<dl>
@ -34,8 +34,8 @@
<div class="vals">
<dd v-for="(item, i) in moneys"
:key="i"
:class="{ active: params.money === item.id }"
@click="filterClick(item, 'time')">{{ item.name }}</dd>
:class="{ active: params.loanLimit === item.name }"
@click="filterClick(item, 'loanLimit')">{{ item.name }}</dd>
</div>
</dl>
</div>
@ -54,25 +54,24 @@
<el-table-column prop="productName"
label="贷款名称"
min-width="110"></el-table-column>
<el-table-column prop="loanCeiling"
<el-table-column prop="productTypeText"
label="贷款对象"
min-width="80">
<template #default="{ row }">
{{ row.productType ? '企业' : '个人' }}
</template>
</el-table-column>
min-width="80"></el-table-column>
<el-table-column prop="guarantyStyle"
label="担保方式"
min-width="80"></el-table-column>
<el-table-column prop="guarantyStyle"
<el-table-column prop="loanPeriod"
label="贷款期限"
min-width="80"></el-table-column>
<el-table-column prop="guarantyStyle"
<el-table-column prop="loanLimit"
label="贷款额度"
min-width="80"></el-table-column>
<el-table-column prop="guarantyStyle"
<el-table-column prop="rateStandard"
label="参考利率范围"
min-width="80"></el-table-column>
<el-table-column prop="userName"
label="产品经理"
min-width="80"></el-table-column>
<el-table-column prop="operationTime"
label="发布日期"
min-width="80"></el-table-column>
@ -100,15 +99,12 @@
</template>
<script setup lang="ts">
import { computed, onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common';
import { onMounted, ref, reactive, watch } from 'vue';
import { pageSizes, pageLayout, toParams } from '@/utils/common';
import { getProcessInformationBasedOnRoles } from '@/api/judgment';
import { bankingProductsList, batchDeletion } from '@/api/bank';
import Search from '@/components/Search.vue';
import { bankingProductMarketsList } from '@/api/finance';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
import { productState, getExpertStatus, getStatus } from '@/store/useProduct';
const router = useRouter();
const route = useRoute();
@ -182,9 +178,8 @@ const params = reactive({
keyWord: '',
productType: '',
status: '',
time: '',
money: '',
roleId: computed(() => +route.query.role || 41),
loanPeriod: '不限',
loanLimit: '不限',
checkPointId: levelId,
projectId,
});
@ -192,8 +187,8 @@ const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const guarantees = ref<Array<any>>([]);
const list = ref<Array<any>>([]);
const guarantees = ref<Record<string, any>[]>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
//
const getGuarantee = async () => {
@ -213,9 +208,9 @@ const getGuarantee = async () => {
const getList = async () => {
loading.value = true;
try {
const { data } = await bankingProductsList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
list.value = data.message.records;
total.value = data.message.total;
const { data } = await bankingProductMarketsList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
list.value = data.data.records;
total.value = data.data.total;
} finally {
loading.value = false;
}
@ -234,7 +229,7 @@ watch([params, () => route.query], initList);
//
const filterClick = (item: Record<string, any>, key: string) => {
params[key] = item.id;
params[key] = item[key === 'loanPeriod' || key === 'loanLimit' ? 'name' : 'id'];
};
//
const toDetail = async (row: Record<string, any>) => {

@ -0,0 +1,294 @@
<template>
<div>
<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>
</div>
</dl>
<dl>
<dt>成立年限</dt>
<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>
</div>
</dl>
<dl>
<dt>基金规模</dt>
<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>
</div>
</dl>
</div>
<div class="block mt-3">
<div class="search mb-2">
<input type="text"
placeholder="搜索"
maxlength="20" />
<img src="@/assets/images/search.png"
alt=""
class="icon" />
</div>
<el-table ref="table"
v-loading="loading"
:data="list">
<el-table-column prop="productName"
label="基金代码"
min-width="80"></el-table-column>
<el-table-column prop="productTypeText"
label="基金名称"
min-width="110"></el-table-column>
<el-table-column prop="guarantyStyle"
label="现净值"
min-width="80"></el-table-column>
<el-table-column prop="loanPeriod"
label="日增长率(%)"
min-width="80"></el-table-column>
<el-table-column prop="loanLimit"
label="近1周(%)"
min-width="80"></el-table-column>
<el-table-column prop="userName"
label="近1月(%)"
min-width="80"></el-table-column>
<el-table-column prop="userName"
label="近3月(%)"
min-width="80"></el-table-column>
<el-table-column prop="userName"
label="成立来(%)"
min-width="80"></el-table-column>
<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="operationTime"
label="发布日期"
min-width="80"></el-table-column>
<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>
</el-table>
<el-pagination v-model:currentPage="currentPage"
v-model:pageSize="pageSize"
:total="total"
:page-sizes="pageSizes"
:layout="pageLayout"
@size-change="getList()"
@current-change="getList()"
small
background
class="px-3 py-2 justify-end"></el-pagination>
</div>
</div>
</template>
<script setup lang="ts">
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 { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
createDateSort: '',
fundName: '',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
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) });
list.value = data.data.records;
total.value = data.data.total;
} finally {
loading.value = false;
}
};
//
const initList = async () => {
currentPage.value = 1;
getList();
};
onMounted(() => {
getList();
});
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 toAdd = () => {
router.push({
path: `/product/fund/add`,
});
};
//
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 {
dl {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: 17px;
&:last-child {
margin-bottom: 0;
}
dt,
dd {
font-size: 14px;
font-family: MiSans;
color: #333;
}
.vals {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
margin-left: 10px;
}
dd {
padding: 6px 10px;
margin-right: 10px;
cursor: pointer;
}
.active {
color: #fff;
background: #006bff;
border-radius: 4px;
}
}
}
.search {
position: relative;
width: 320px;
padding: 0 12px;
background-color: #f6f8fc;
border-radius: 8px;
input {
width: 90%;
height: 36px;
font-size: 14px;
line-height: 36px;
color: #333;
border: 0;
background-color: transparent;
&:focus {
outline: none;
}
}
.icon {
position: absolute;
top: 9px;
right: 12px;
cursor: pointer;
}
}
</style>

@ -0,0 +1,261 @@
<template>
<div>
<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 insuranceTypes"
:key="i"
:class="{ active: params.insuranceType === item.id }"
@click="filterClick(item, 'insuranceType')">{{ item.name }}</dd>
</div>
</dl>
<dl v-if="params.insuranceType !== 311">
<dt>承保年龄</dt>
<div class="vals">
<dd v-for="(item, i) in ages"
:key="i"
:class="{ active: params.coverageAge === item.id }"
@click="filterClick(item, 'coverageAge')">{{ item.id }}</dd>
</div>
</dl>
<dl>
<dt>保障期限</dt>
<div class="vals">
<dd v-for="(item, i) in times"
:key="i"
:class="{ active: params.protectionPeriod === item.id }"
@click="filterClick(item, 'protectionPeriod')">{{ item.id }}</dd>
</div>
</dl>
</div>
<div class="block mt-3">
<div class="search mb-2">
<input type="text"
v-model="params.insuranceName"
placeholder="搜索"
maxlength="20" />
<img src="@/assets/images/search.png"
alt=""
class="icon" />
</div>
<el-table ref="table"
v-loading="loading"
:data="list">
<el-table-column prop="insuranceName"
label="保险名称"
min-width="110"></el-table-column>
<el-table-column prop="insuranceTypeName"
label="险种分类"
min-width="80"></el-table-column>
<el-table-column v-if="params.insuranceType !== 311"
prop="guarantyStyle"
label="承保年龄"
min-width="80">
<template #default="{ row }">
{{ row.minimumAge + '-' + row.maximumAge + '周岁' }}
</template>
</el-table-column>
<el-table-column prop="insuranceDeadline"
label="保险期限"
min-width="80"></el-table-column>
<el-table-column prop="premiumAmount"
label="保费(元)"
min-width="80"></el-table-column>
<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"
label="操作"
width="100">
<template #default="{ row }">
<el-button type="text"
size="small"
@click="toDetail(row)">查看详情</el-button>
</template></el-table-column> -->
</el-table>
<el-pagination v-model:currentPage="currentPage"
v-model:pageSize="pageSize"
:total="total"
:page-sizes="pageSizes"
:layout="pageLayout"
@size-change="getList()"
@current-change="getList()"
small
background
class="px-3 py-2 justify-end"></el-pagination>
</div>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { pageSizes, pageLayout, toParams } from '@/utils/common';
import { insuranceMarketList } from '@/api/finance';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
insuranceName: '',
insuranceType: '',
coverageAge: '不限',
protectionPeriod: '不限',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const insuranceTypes = ref<Record<string, any>[]>([
{
id: '',
name: '不限',
},
{
id: 310,
name: '意外险',
},
{
id: 311,
name: '财产险',
},
]);
const ages = ref<Record<string, any>[]>([
{
id: '不限',
},
{
id: '中年',
},
{
id: '少儿',
},
{
id: '老人',
},
]);
const times = ref<Record<string, any>[]>([
{
id: '不限',
},
{
id: '<=1个月',
},
{
id: '1-6个月',
},
{
id: '6个月-1年',
},
{
id: '>1年',
},
]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
//
const getList = async () => {
loading.value = true;
try {
const { data } = await insuranceMarketList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
list.value = data.records;
total.value = data.total;
} finally {
loading.value = false;
}
};
//
const initList = async () => {
currentPage.value = 1;
getList();
};
onMounted(() => {
getList();
});
watch([params, () => route.query], initList);
//
const filterClick = (item: Record<string, any>, key: string) => {
params[key] = item.id;
};
//
const toAdd = () => {
router.push({
path: `/product/insurance/add`,
});
};
//
const toDetail = async (row: Record<string, any>) => {
router.push(`/product/insurance/detail?id=${row.id}&name=${params.insuranceName}`);
};
</script>
<style lang="scss" scoped>
.filter {
dl {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: 17px;
&:last-child {
margin-bottom: 0;
}
dt,
dd {
font-size: 14px;
font-family: MiSans;
color: #333;
}
.vals {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
margin-left: 10px;
}
dd {
padding: 6px 10px;
margin-right: 10px;
cursor: pointer;
}
.active {
color: #fff;
background: #006bff;
border-radius: 4px;
}
}
}
.search {
position: relative;
width: 320px;
padding: 0 12px;
background-color: #f6f8fc;
border-radius: 8px;
input {
width: 90%;
height: 36px;
font-size: 14px;
line-height: 36px;
color: #333;
border: 0;
background-color: transparent;
&:focus {
outline: none;
}
}
.icon {
position: absolute;
top: 9px;
right: 12px;
cursor: pointer;
}
}
</style>

@ -148,7 +148,7 @@
<template #default="{ row }">
<el-select v-if="row.subject"
v-model="row.score">
<el-option v-for="item in row.subject.itemList"
<el-option v-for="item in row.subject.itemList.sort((a, b) => +a.options - +b.options)"
:key="item"
:label="item.options"
:value="item.itemId" />

@ -58,7 +58,7 @@ import { ElMessage } from 'element-plus';
import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import Info from './Info.vue';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, getNow } from '@/utils/common';
import { findById, examineAndApprove } from '@/api/bank';
import { getTheCurrentUserName, getOperationTime } from '@/api/config';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -98,6 +98,13 @@ const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(43); // 43
config.value = process;
};
//
const getDate = async () => {
const res = await getOperationTime(levelId, projectId);
if (res.operationTime) {
date.value = res.operationTime;
}
};
//
const sign = async () => {
const res = await getTheCurrentUserName();
@ -137,8 +144,9 @@ const submit = async (formEl: FormInstance | undefined) => {
}
});
};
onMounted(() => {
onMounted(async () => {
getConfig();
date.value = dayjs(await getNow()).format('YYYY-MM-DD');
});
</script>

@ -174,8 +174,8 @@ const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const guarantees = ref<Array<any>>([]);
const list = ref<Array<any>>([]);
const guarantees = ref<Record<string, any>[]>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
//
const getGuarantee = async () => {

@ -75,14 +75,13 @@
</template>
<script setup lang="ts">
import { computed, onMounted, ref, reactive, watch } from 'vue';
import { onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common';
import { fundProductList, batchDeletion } from '@/api/fund';
import Search from '@/components/Search.vue';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
import { productState, getExpertStatus, getStatus } from '@/store/useProduct';
const router = useRouter();
const route = useRoute();
@ -99,7 +98,7 @@ const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const list = ref<Array<any>>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const stop = () => {};
//

@ -103,7 +103,7 @@
</template>
<script setup lang="ts">
import { computed, onMounted, ref, reactive, watch } from 'vue';
import { onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common';
import { insuranceList, batchDeletion } from '@/api/insurance';
@ -126,7 +126,7 @@ const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const insuranceTypes = ref<Array<any>>([
const insuranceTypes = ref<Record<string, any>[]>([
{
id: 310,
name: '意外险',
@ -136,7 +136,7 @@ const insuranceTypes = ref<Array<any>>([
name: '财产险',
},
]);
const list = ref<Array<any>>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const stop = () => {};
//

@ -64,7 +64,7 @@
class="mr-2 whitespace-nowrap">{{ row?.subject?.name }}</span>
<el-select v-if="row.subject"
v-model="row.score">
<el-option v-for="item in row?.subject?.itemList"
<el-option v-for="item in row?.subject?.itemList.sort((a, b) => +(a.options.replace(/\D+/, '')) - +(b.options.replace(/\D+/, '')))"
:key="item"
:value="item.options" />
</el-select>

@ -30,7 +30,7 @@
<el-select v-else-if="$index !== 13 && row.subject && row.subject.itemList"
class="w-full"
v-model="row.score">
<el-option v-for="item in row?.subject?.itemList"
<el-option v-for="item in row?.subject?.itemList.sort((a, b) => +a.options - +b.options)"
:key="item"
:value="item.options" />
</el-select>

@ -66,7 +66,7 @@
<template #default="{ row }">
<el-select v-if="isSelect(row.answerId1) && row.subject"
v-model="row.score">
<el-option v-for="item in row?.subject?.itemList"
<el-option v-for="item in row?.subject?.itemList.sort((a, b) => +a.options - +b.options)"
:key="item"
:value="item.options" />
</el-select>
@ -84,7 +84,7 @@
<div class="w-[100px] mx-2">
<el-select v-if="row.recordChildren"
v-model="row.score">
<el-option v-for="item in row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList"
<el-option v-for="item in row?.recordChildren[2]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList.sort((a, b) => +a.options - +b.options)"
:key="item"
:value="item.options" />
</el-select>
@ -105,7 +105,7 @@
<el-select v-if="row.recordChildren"
placeholder=""
v-model="row.percentage">
<el-option v-for="item in row.answerId2 === 669 || row.answerId2 === 671 ? row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList : row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
<el-option v-for="item in row.answerId2 === 669 || row.answerId2 === 671 ? row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList : row?.recordChildren[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList.sort((a, b) => +(a.options.replace('%', '')) - +(b.options.replace('%', '')))"
:key="item"
:value="item.options" />
</el-select>
@ -145,7 +145,7 @@
<template #default="{ row }">
<el-select v-if="row.itemList"
v-model="row.score">
<el-option v-for="item in row?.itemList"
<el-option v-for="item in row?.itemList.sort((a, b) => +a.options - +b.options)"
:key="item"
:value="item.options" />
</el-select>

Loading…
Cancel
Save