diff --git a/src/layout/components/AppSidebar/index.vue b/src/layout/components/AppSidebar/index.vue index 6ba8a8e..d49de8d 100644 --- a/src/layout/components/AppSidebar/index.vue +++ b/src/layout/components/AppSidebar/index.vue @@ -5,8 +5,8 @@ -

产品经理

-

产品经理

+

{{roleName}}

+

产品部门

操作日期:2018-02-06

@@ -18,21 +18,19 @@ import { computed } from 'vue'; import { useRouter, useRoute } from 'vue-router'; import Menus from './Menu.vue'; +import Settings from '@/settings'; import { isShowMenu } from '@/store/useCurrentUser'; import { appState } from '@/store/useAppState'; const router = useRouter(); const route = useRoute(); -// const routes = computed(() => router.options.routes); - -const activeMenu = computed(() => { - const { meta, path } = route; - // if set path, the sidebar will highlight the path you set - if (meta.activeMenu) { - return meta.activeMenu as string; +const roleName = computed(() => { + if (route.query.role) { + return Settings.roleIds[+route.query.role]; + } else if (route.path.includes('insurance')) { + return '保险产品经理'; } - return path; }); // Cool Gray 700 diff --git a/src/settings.ts b/src/settings.ts index 3324751..8e19ffe 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -1,7 +1,15 @@ export default { title: import.meta.env.VITE_APP_TITLE || '金融产品设计及数字化营销沙盘', showSettings: true, - + /** + * @type {object} + * @description 各个角色的id + */ + roleIds: { + 41: '产品经理', + 42: '风控经理', + 43: '专家委员会', + }, /** * @type {array} * @description 不显示左侧菜单的路由 diff --git a/src/views/config/level/Index.vue b/src/views/config/level/Index.vue index 6014138..b9b8d48 100644 --- a/src/views/config/level/Index.vue +++ b/src/views/config/level/Index.vue @@ -42,8 +42,7 @@
-
import { computed, onMounted, ref, reactive, watch, nextTick } from 'vue'; -import { ElMessage, ElTable } from 'element-plus'; +import { ElMessage } from 'element-plus'; import { Delete, Edit, Check, MoreFilled, Close } from '@element-plus/icons-vue'; import { listPass, savePass, updatePass } from '@/api/config'; import Search from '@/components/Search.vue'; @@ -164,14 +164,12 @@ const route = useRoute(); const projectId = +Cookies.get('sand-projectId'); const levelId = +Cookies.get('sand-level'); const height = window.innerHeight - 270; -const tableRef = ref>(); const delTitle: string = '删除关卡后,这个关卡的数据将被删除,确定删除吗?'; const params = reactive({ platformId: 3, customsPassName: '', isEnable: '', }); -const table = ref(); const enables = ref>([ { id: 0, @@ -209,16 +207,22 @@ watch([params, () => route.query], getList); const save = async () => { if (saveLoading.value) return false; saveLoading.value = true; - const param = list.value.map((e, i) => { - e.serialNumber = i + 1; - return { - checkpointId: e.checkpointId, - customsPassName: e.customsPassName, - isEnable: e.isEnable, - serialNumber: e.serialNumber, - }; - }); + // 编辑 + const param = list.value + .filter((e) => e.checkpointId) + .map((e, i) => { + e.serialNumber = i + 1; + return { + checkpointId: e.checkpointId, + customsPassName: e.customsPassName, + isEnable: e.isEnable, + serialNumber: e.serialNumber, + }; + }); await updatePass(param); + // 新增 + const addList = list.value.filter((e) => !e.checkpointId); + await savePass(addList); getList(); ElMessage.success('保存成功!'); saveLoading.value = false; diff --git a/src/views/product/bank/Config.vue b/src/views/product/bank/Config.vue index 1a1cf7e..8e174b6 100644 --- a/src/views/product/bank/Config.vue +++ b/src/views/product/bank/Config.vue @@ -140,10 +140,12 @@ class="ml-5" v-model="form.personalCreditScoringStrategies" placeholder="请选择"> - + +
@@ -153,10 +155,12 @@ class="ml-5" v-model="form.corporateCreditScoringStrategies" placeholder="请选择"> - + +
@@ -264,7 +268,7 @@ class="ml-5" v-model="form.loanContract" placeholder="请选择"> - @@ -277,7 +281,7 @@ class="ml-5" v-model="form.mortgageContract" placeholder="请选择"> - @@ -290,7 +294,7 @@ class="ml-5" v-model="form.pledgeContract" placeholder="请选择"> - @@ -303,7 +307,7 @@ class="ml-5" v-model="form.guaranteeContract" placeholder="请选择"> - @@ -345,6 +349,7 @@ import { ElMessage } from 'element-plus'; import type { TabsPaneContext, FormInstance } from 'element-plus'; import { findById, riskSave, riskUpdate } from '@/api/bank'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; +import { listCredit } from '@/api/model'; import { useRouter, useRoute } from 'vue-router'; import { handleId } from '@/utils/common'; import Info from './Info.vue'; @@ -398,6 +403,7 @@ const projectId = +Cookies.get('sand-projectId'); const levelId = +Cookies.get('sand-level'); const curTab = ref('tab1'); const config = ref([]); +const credits = ref[]>([]); const info = ref>({}); const formRef = ref(); const form = reactive({ @@ -450,6 +456,14 @@ const tabChange = (tab: TabsPaneContext, event: Event) => { const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(info.value.productType ? 71 : 70); // 个人70,企业71 config.value = process; + + const { data } = await listCredit({ + checkpointId: levelId, + projectId, + pageNum: 1, + pageSize: 1000, + }); + credits.value = data; }; // 详情 const getDetail = async () => { @@ -481,17 +495,17 @@ const submit = async (formEl: FormInstance | undefined) => { const isEnterprise = info.value.productType === 1; const param = JSON.parse(JSON.stringify(form)); - if (((isEnterprise && param.borrowerMaterial?.includes(316)) || (!isEnterprise && param.borrowerMaterial?.includes(314))) && !param.borrowerMaterialSelect) - return ElMessage.error('请选择借款申请表'); - if ( - (param.personalCreditScoringStrategiesCheck && !param.personalCreditScoringStrategies) || - (param.corporateCreditScoringStrategiesCheck && !param.corporateCreditScoringStrategies) - ) - return ElMessage.error('请选择信用评分策略'); - if (param.loanContractCheck && !param.loanContract) return ElMessage.error('请选择借贷合同'); - if (param.mortgageContractCheck && !param.mortgageContract) return ElMessage.error('请选择抵押合同'); - if (param.pledgeContractCheck && !param.pledgeContract) return ElMessage.error('请选择质押合同'); - if (param.guaranteeContractCheck && !param.guaranteeContract) return ElMessage.error('请选择担保合同'); + // if (((isEnterprise && param.borrowerMaterial?.includes(316)) || (!isEnterprise && param.borrowerMaterial?.includes(314))) && !param.borrowerMaterialSelect) + // return ElMessage.error('请选择借款申请表'); + // if ( + // (param.personalCreditScoringStrategiesCheck && !param.personalCreditScoringStrategies) || + // (param.corporateCreditScoringStrategiesCheck && !param.corporateCreditScoringStrategies) + // ) + // return ElMessage.error('请选择信用评分策略'); + // if (param.loanContractCheck && !param.loanContract) return ElMessage.error('请选择借贷合同'); + // if (param.mortgageContractCheck && !param.mortgageContract) return ElMessage.error('请选择抵押合同'); + // if (param.pledgeContractCheck && !param.pledgeContract) return ElMessage.error('请选择质押合同'); + // if (param.guaranteeContractCheck && !param.guaranteeContract) return ElMessage.error('请选择担保合同'); param.accessStrategy = param.accessStrategy.join(); if ((isEnterprise && param.borrowerMaterial?.includes(316)) || (!isEnterprise && param.borrowerMaterial?.includes(314))) @@ -569,7 +583,9 @@ const addRecord = async (data: Record) => { handleId(127, 51, data.runBatchObject, preIds + ',114,127', 1), handleId(128, 52, data.accessStrategy, preIds + ',114,128', 1), ); - data.personalCreditScoringStrategiesCheck && lcRule.push(handleId(129, 53, '240,' + data.personalCreditScoringStrategies, preIds + ',114,129', 1)); + // 选择了无才需要给 + lcRule.push(handleId(1044, 302, data.personalCreditScoringStrategiesCheck ? 759 : 760, preIds + ',114,129,1046,1044', 1)); + data.personalCreditScoringStrategies === 761 && lcRule.push(handleId(1045, 303, data.personalCreditScoringStrategies, preIds + ',114,129,1046,1045', 1)); data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(129, 53, '241,' + data.corporateCreditScoringStrategies, preIds + ',114,129', 1)); lcRule.push(handleId(130, 54, data.riskDegreeStrategy, preIds + ',114,130', 1)); @@ -603,8 +619,9 @@ const addRecord = async (data: Record) => { handleId(83, 28, data.accessStrategy, preIds + ',74,83', 1), ); - lcRule.push(handleId(1044, 282, data.personalCreditScoringStrategiesCheck ? 683 : 684, preIds + ',74,1046,1044', 1)); - // data.personalCreditScoringStrategiesCheck && lcRule.push(handleId(1045, 283, data.personalCreditScoringStrategies, preIds + ',74,1046,1045', 1)); + // 选择了无才需要给 + lcRule.push(handleId(1044, 302, data.personalCreditScoringStrategiesCheck ? 759 : 760, preIds + ',74,84,1046,1044', 1)); + data.personalCreditScoringStrategies === 761 && lcRule.push(handleId(1045, 303, data.personalCreditScoringStrategies, preIds + ',74,84,1046,1045', 1)); data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(84, 29, '95,' + data.corporateCreditScoringStrategies, preIds + ',74,84', 1)); lcRule.push(handleId(85, 30, data.riskDegreeStrategy, preIds + ',74,85', 1)); diff --git a/src/views/product/bank/List.vue b/src/views/product/bank/List.vue index f0e7e2e..dc9dca3 100644 --- a/src/views/product/bank/List.vue +++ b/src/views/product/bank/List.vue @@ -131,7 +131,6 @@ diff --git a/src/views/product/insurance/List.vue b/src/views/product/insurance/List.vue index e5a5e87..42335a1 100644 --- a/src/views/product/insurance/List.vue +++ b/src/views/product/insurance/List.vue @@ -105,7 +105,6 @@ diff --git a/src/views/product/strategy/150.vue b/src/views/product/strategy/150.vue index 39a09b0..145283c 100644 --- a/src/views/product/strategy/150.vue +++ b/src/views/product/strategy/150.vue @@ -105,6 +105,14 @@ + + +
@@ -163,6 +171,7 @@ const getConfig = async () => { recordChildren: e.recordChildren, isRule: isRule(e.id) ? 1 : 0, corporateMajorityHitRejected: !!cur?.corporateMajorityHitRejected, + hitAccess: !!cur?.hitAccess, mateHitRejected: !!cur?.mateHitRejected, otherFamilyMembersHitRejected: !!cur?.otherFamilyMembersHitRejected, parentsHitRejected: !!cur?.parentsHitRejected, @@ -236,12 +245,22 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { } } }; +const checkNone = (row: Record) => { + if (row.hitAccess) { + row.corporateMajorityHitRejected = false; + row.mateHitRejected = false; + row.otherFamilyMembersHitRejected = false; + row.parentsHitRejected = false; + row.personalHitBlacklist = false; + } +}; // 提交 const submit = async () => { let param = JSON.parse(JSON.stringify(form.value)); param.map((e, i) => { if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id; e.corporateMajorityHitRejected = +e.corporateMajorityHitRejected; + e.hitAccess = +e.hitAccess; e.mateHitRejected = +e.mateHitRejected; e.otherFamilyMembersHitRejected = +e.otherFamilyMembersHitRejected; e.parentsHitRejected = +e.parentsHitRejected; @@ -288,6 +307,7 @@ const addRecord = async (data: Record) => { e.parentsHitRejected && temp.push(302); e.otherFamilyMembersHitRejected && temp.push(303); e.corporateMajorityHitRejected && temp.push(304); + e.hitAccess && temp.push(757); if (isRule(e.stRecordId)) { const len = e?.recordChildren?.length - 1; e?.recordChildren.map((n, j) => { diff --git a/src/views/user/GroupForm.vue b/src/views/user/GroupForm.vue deleted file mode 100644 index 8a0a0e8..0000000 --- a/src/views/user/GroupForm.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - diff --git a/src/views/user/GroupList.vue b/src/views/user/GroupList.vue deleted file mode 100644 index d80c060..0000000 --- a/src/views/user/GroupList.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - diff --git a/src/views/user/RoleForm.vue b/src/views/user/RoleForm.vue deleted file mode 100644 index 8f891d3..0000000 --- a/src/views/user/RoleForm.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - diff --git a/src/views/user/RoleList.vue b/src/views/user/RoleList.vue deleted file mode 100644 index 74934a4..0000000 --- a/src/views/user/RoleList.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - diff --git a/src/views/user/UserForm.vue b/src/views/user/UserForm.vue deleted file mode 100644 index 887b65c..0000000 --- a/src/views/user/UserForm.vue +++ /dev/null @@ -1,248 +0,0 @@ - - - diff --git a/src/views/user/UserList.vue b/src/views/user/UserList.vue deleted file mode 100644 index 6946f01..0000000 --- a/src/views/user/UserList.vue +++ /dev/null @@ -1,259 +0,0 @@ - - -