From f69fdd1a8a7be3eeaf2e75c2d4971f16dd610104 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 20 Sep 2023 14:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=A7=E5=93=81=E5=92=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bank.ts | 5 +- src/api/judgment.ts | 2 +- src/utils/common.ts | 19 +++ src/views/product/Add.vue | 217 +++++++++++++++++++++++---------- src/views/product/CardList.vue | 20 +-- src/views/product/Detail.vue | 40 +++--- src/views/product/List.vue | 24 +++- 7 files changed, 224 insertions(+), 103 deletions(-) diff --git a/src/api/bank.ts b/src/api/bank.ts index fd9ea4b..5346907 100644 --- a/src/api/bank.ts +++ b/src/api/bank.ts @@ -7,8 +7,9 @@ export const updateStorage = async (data: Record): Promise => export const primaryTypeOfGuarantee = async (): Promise => (await axios.post('/product/bankGuaranteeType/primaryTypeOfGuarantee')).data; export const typeOfGuarantee = async (): Promise => (await axios.post('/product/bankGuaranteeType/typeOfGuarantee')).data; export const bankingProductsList = async (data: Record): Promise => (await axios.post('/product/product/bank/products/bankingProductsList', data)).data; -export const batchDeletion = async (data: Record): Promise => (await axios.post('/product/product/bank/products/batchDeletion', data)).data; +export const batchDeletion = async (ids: number[]): Promise => (await axios.post('/product/product/bank/products/batchDeletion', ids)).data; export const personalRiskControlConfigurationField = async (): Promise => (await axios.post('/product/riskControlConfigurationField/personalRiskControlConfigurationField')).data; -export const productElement = async (data: Record): Promise => (await axios.post('/product/product/bank/products/productElement', data)).data; +export const productElement = async (id: number): Promise => (await axios.post(`/product/product/bank/products/productElement?id=${id}`)).data; export const findById = async (id: number): Promise => (await axios.post(`/product/product/bank/products/findById?id=${id}`)).data; +export const save = async (data: Record): Promise => (await axios.post(`/product/product/bank/products/save`, data)).data; diff --git a/src/api/judgment.ts b/src/api/judgment.ts index b163246..5fcc3ca 100644 --- a/src/api/judgment.ts +++ b/src/api/judgment.ts @@ -1,8 +1,8 @@ import axios from '@/utils/request'; export const imageUploadUrl = `${import.meta.env.VITE_BASE_API}/backend/image-upload`; -export const cropImage = async (data: Record): Promise => (await axios.post('/backend/image-crop', data)).data; export const getProcess = async (): Promise => (await axios.post('/judgment/judgment/stRecord/getProcess?systemId=19')).data; export const getProcessInformationBasedOnRoles = async (id: number): Promise => (await axios.post(`/judgment/judgment/stRecord/getProcessInformationBasedOnRoles?systemId=19&parentId=${id}`)).data; export const getAllBusiness = async (): Promise => (await axios.post('/judgment/judgment/stRecord/getAllBusiness?systemId=19')).data; +export const addOperation = async (data: Record): Promise => (await axios.post('/product/product/bank/operation/addOperation', data)).data; diff --git a/src/utils/common.ts b/src/utils/common.ts index b315566..2f0bb9e 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -113,3 +113,22 @@ export const moveList = (selected: any[], list: any[], type: 'top' | 'up' | 'dow } return list; }; + +/** + * 返回添加记录所需lcJudgmentRuleReq + */ +export const handleId = ( + answerId: number | string, + emptyOne: number | string, + emptyTwo: number | string, + operationIds: number | string, + type: number | string, +): Record => { + return { + answerId, + emptyOne, + emptyTwo, + operationIds, + type, + }; +}; diff --git a/src/views/product/Add.vue b/src/views/product/Add.vue index ce37019..66e79b5 100644 --- a/src/views/product/Add.vue +++ b/src/views/product/Add.vue @@ -1,127 +1,180 @@ @@ -121,7 +127,7 @@ const handleDelete = async (id: number[]) => { } .products { li { - @apply relative p-5 mb-5 rounded-[10px] cursor-pointer border border-solid; + @apply relative p-5 pt-7 mb-5 rounded-[10px] cursor-pointer border border-solid; background: url(../../assets/images/10.png) 0 0/100% 100% no-repeat; &.active { @apply border-[#CAE0FF]; diff --git a/src/views/product/Detail.vue b/src/views/product/Detail.vue index da7ed72..ab0c31b 100644 --- a/src/views/product/Detail.vue +++ b/src/views/product/Detail.vue @@ -9,36 +9,26 @@

{{ info.productDefinition }}

产品要素
-

{{ info.productName }}

- -

人民币

+

贷款币种:人民币

-
- -

{{ info.productName }}

-
-
- -

{{ info.productName }}

-
-
- -

{{ info.productName }}

+
+

{{ info.loanPurpose }}

-
- -

{{ info.productName }}

+
+

{{ info.guarantyStyleList }}

-
- -

{{ info.productName }}

+
+

{{ info.lengthOfMaturity }}

-
- -

{{ info.productName }}

+
+

{{ info.loanCommitment }}

@@ -50,7 +40,7 @@ import { ref, computed, watch, onMounted } from 'vue'; import { ElMessage } from 'element-plus'; import type { TabsPaneContext } from 'element-plus'; -import { findById } from '@/api/bank'; +import { productElement } from '@/api/bank'; import { useRouter, useRoute } from 'vue-router'; defineProps({ modelValue: { type: Object, required: true } }); @@ -70,7 +60,7 @@ const tabChange = (tab: TabsPaneContext, event: Event) => { const getDetail = async () => { if (id.value) { try { - const { data } = await findById(id.value); + const { data } = await productElement(id.value); info.value = data; } finally { } diff --git a/src/views/product/List.vue b/src/views/product/List.vue index 315935c..64c1ce9 100644 --- a/src/views/product/List.vue +++ b/src/views/product/List.vue @@ -79,11 +79,15 @@ @click="handleEdit(row.id)" size="small">配置要素 产品详情 - 删除 + + + { query: route.query, }); }; +// 产品详情 +const toDetail = async (id: number) => { + router.push({ + path: `/product/cardList/detail`, + query: { + ...route.query, + id, + }, + }); +}; // 卡片模式 const toCardList = () => { router.push('/product/cardList/config'); }; -const handleDelete = async (id: number[]) => { +const handleDelete = async (id: number) => { await batchDeletion([id]); getList(); ElMessage.success(t('success'));