From 2350694630cfb543c0378aeb27ff07e2a3f2cb0d Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Sun, 4 Feb 2024 18:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=93=8D=E4=BD=9C=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=94=B9=E6=88=90=E8=99=9A=E6=8B=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=88=E8=BF=99=E4=B8=AA=E7=89=88=E6=9C=AC=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=97=A5=E6=9C=9F=EF=BC=8C=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E5=86=8D=E4=BD=9C=E4=BF=AE=E6=94=B9=EF=BC=89=EF=BC=9B=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E4=B8=8B=E6=8B=89=E6=8C=89=E4=BB=8E=E5=B0=8F?= =?UTF-8?q?=E5=88=B0=E5=A4=A7=E6=8E=92=E5=BA=8F=EF=BC=9B=E9=87=91=E8=9E=8D?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=BF=9D=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bank.ts | 2 +- src/api/finance.ts | 6 + src/api/fund.ts | 2 +- src/api/system.ts | 2 +- src/components/Panel/index.vue | 13 +- src/layout/components/AppSidebar/index.vue | 14 +- src/router/index.ts | 2 + src/utils/common.ts | 11 + src/views/Role.vue | 32 ++- src/views/config/param/Financial.vue | 2 +- src/views/finance/Bank.vue | 51 ++-- src/views/finance/Fund.vue | 294 +++++++++++++++++++++ src/views/finance/Insurance.vue | 261 ++++++++++++++++++ src/views/product/afterLoan/1031.vue | 2 +- src/views/product/bank/Approve.vue | 12 +- src/views/product/bank/List.vue | 4 +- src/views/product/fund/List.vue | 5 +- src/views/product/insurance/List.vue | 6 +- src/views/product/interestRate/772.vue | 2 +- src/views/product/interestRate/935.vue | 2 +- src/views/product/strategy/Credit.vue | 8 +- 21 files changed, 658 insertions(+), 75 deletions(-) create mode 100644 src/api/finance.ts create mode 100644 src/views/finance/Fund.vue create mode 100644 src/views/finance/Insurance.vue diff --git a/src/api/bank.ts b/src/api/bank.ts index 0867144..b686e39 100644 --- a/src/api/bank.ts +++ b/src/api/bank.ts @@ -1,5 +1,5 @@ import axios from '@/utils/request'; - +// 银行 export const queryStorageList = async (params?: Record): Promise => (await axios.get('/backend/core/storage', { params })).data; export const queryStorage = async (id: number): Promise => (await axios.get(`/backend/core/storage/${id}`)).data; export const updateStorage = async (data: Record): Promise => (await axios.post('/backend/core/storage?_method=put', data)).data; diff --git a/src/api/finance.ts b/src/api/finance.ts new file mode 100644 index 0000000..af1aa70 --- /dev/null +++ b/src/api/finance.ts @@ -0,0 +1,6 @@ +import axios from '@/utils/request'; +// 金融市场 +export const queryStorage = async (id: number): Promise => (await axios.get(`/backend/core/storage/${id}`)).data; +export const bankingProductMarketsList = async (data: Record): Promise => + (await axios.post('/product/product/bank/products/market/bankingProductMarketsList', data)).data; +export const insuranceMarketList = async (data: Record): Promise => (await axios.post('/product/insurance/products/market/insuranceMarketList', data)).data; diff --git a/src/api/fund.ts b/src/api/fund.ts index 8f5efe9..6c40355 100644 --- a/src/api/fund.ts +++ b/src/api/fund.ts @@ -1,5 +1,5 @@ import axios from '@/utils/request'; -// 保险 +// 基金 export const saveFund = async (data: Record): Promise => (await axios.post('/product/fundProducts/save', data)).data; export const batchDeletion = async (data: number[]): Promise => (await axios.post(`/product/fundProducts/batchDeletion`, data)).data; export const fundProductList = async (data: Record): Promise => (await axios.post(`/product/fundProducts/fundProductList`, data)).data; diff --git a/src/api/system.ts b/src/api/system.ts index d8b0ff3..cada3df 100644 --- a/src/api/system.ts +++ b/src/api/system.ts @@ -15,4 +15,4 @@ export const updateReport = async (data: Record): Promise => ( export const editExperimentalData = async (data: Record): Promise => (await axios.post('/occupationlab/occupationlab/experimentalReport/editExperimentalData', data)).data; export const getStartTime = async (params: Record): Promise => (await axios.get('/python/python/getStartTime', { params })).data; -export const getCurrentTime = async (params: Record): Promise => (await axios.get('/competition/competition/management/getCurrentTime', { params })).data; +export const getCurrentTime = async (): Promise => (await axios.get('/competition/competition/management/getCurrentTime')).data; diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index 858b103..981908e 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -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 => { 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; diff --git a/src/layout/components/AppSidebar/index.vue b/src/layout/components/AppSidebar/index.vue index 8f2f56c..869ba0e 100644 --- a/src/layout/components/AppSidebar/index.vue +++ b/src/layout/components/AppSidebar/index.vue @@ -9,11 +9,11 @@

{{ roleName }}

产品部门

- 操作日期:{{ date }} - + @click="dateVisible = true"> -->
@@ -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(dayjs(new Date()).format('YYYY-M-D')); +const date = ref(dayjs(new Date()).format('YYYY-MM-DD')); const diaDate = ref(dayjs(new Date()).format('YYYY-M-D')); const dateVisible = ref(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'); }); diff --git a/src/router/index.ts b/src/router/index.ts index e0c1d87..6a858f0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -50,6 +50,8 @@ export const routes: Array = [ 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: '我的订单' } }, diff --git a/src/utils/common.ts b/src/utils/common.ts index 712ea3b..6ef5682 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -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 => { competitionId: +Cookies.get('sand-competitionId') || '', }; }; + +/** + * 获取当前时间 + */ +export const getNow = (): Promise => { + return new Promise(async (resolve) => { + const res = await getCurrentTime(); + resolve(new Date(res.currentTime)); + }); +}; diff --git a/src/views/Role.vue b/src/views/Role.vue index 701b56d..0e868a2 100644 --- a/src/views/Role.vue +++ b/src/views/Role.vue @@ -65,8 +65,7 @@ alt="">
-
+
{{ date }}
-
+
+ + + + + + + + diff --git a/src/views/product/afterLoan/1031.vue b/src/views/product/afterLoan/1031.vue index 161702b..3225dbc 100644 --- a/src/views/product/afterLoan/1031.vue +++ b/src/views/product/afterLoan/1031.vue @@ -148,7 +148,7 @@