yujialong 1 year ago
parent 245def3fe0
commit 34be320ee1
  1. 2
      .env
  2. 125
      src/views/Home.vue
  3. 2
      src/views/product/bank/Add.vue
  4. 2
      src/views/product/bank/Approve.vue
  5. 2
      src/views/product/bank/Config.vue
  6. 21
      src/views/product/insurance/Add.vue

@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘
VITE_PORT=9520 VITE_PORT=9520
VITE_PROXY=http://192.168.31.125:8080 VITE_PROXY=http://192.168.31.125:8080
VITE_PUBLIC_PATH=./ VITE_PUBLIC_PATH=./
VITE_BASE_API=http://192.168.31.217:9000 VITE_BASE_API=http://192.168.31.51:9000
# VITE_BASE_API=http://121.37.12.51 # VITE_BASE_API=http://121.37.12.51
VITE_I18N_LOCALE=zh-cn VITE_I18N_LOCALE=zh-cn
VITE_I18N_FALLBACK_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn

@ -12,7 +12,8 @@
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<div class="relative min-h-[calc(100vh-64px)] pt-5 pl-5 bg-[url('@/assets/images/level/4.png')] bg-[length:100%_100%] bg-no-repeat"> <div class="relative h-[calc(100vh-64px)] pt-5 pl-5 bg-[url('@/assets/images/level/4.png')] bg-[length:100%_100%] bg-no-repeat bg-fixed overflow-auto"
id="wrap">
<div class="relative"> <div class="relative">
<div class="w-[354px] h-[68px] bg-[url('@/assets/images/level/5.png')] bg-[length:100%_100%] bg-no-repeat"></div> <div class="w-[354px] h-[68px] bg-[url('@/assets/images/level/5.png')] bg-[length:100%_100%] bg-no-repeat"></div>
<div class="absolute top-5 left-40 flex items-center cursor-pointer" <div class="absolute top-5 left-40 flex items-center cursor-pointer"
@ -49,12 +50,15 @@
</div> </div>
</div> </div>
<div class="arrow top-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-up.png')]"></div> <div class="arrow top-[68px] left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-up.png')]"
<div class="arrow right-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-right.png')]"></div> @click="move('up')"></div>
<div class="arrow right-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-right.png')]"
@click="move('right')"></div>
<div class="arrow bottom-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-down.png')]" <div class="arrow bottom-0 left-[50%] translate-x-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-down.png')]"
@click="move"></div> @click="move('down')"></div>
<div class="arrow left-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-left.png')]"></div> <div class="arrow left-0 top-[50%] translate-y-[-50%] w-[64px] h-[64px] bg-[url('@/assets/images/level/arrow-left.png')]"
<div class="absolute bottom-2 right-1 w-[262px] h-[74px] bg-[url('@/assets/images/level/submit.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer hover:bg-[url('@/assets/images/level/submit-hover.png')]" @click="move('left')"></div>
<div class="fixed bottom-2 right-1 w-[262px] h-[74px] bg-[url('@/assets/images/level/submit.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer hover:bg-[url('@/assets/images/level/submit-hover.png')]"
@click="toRole"></div> @click="toRole"></div>
</div> </div>
<Panel /> <Panel />
@ -77,6 +81,7 @@ const collected = ref<boolean>(false);
const curLevel = ref<number | string>(''); const curLevel = ref<number | string>('');
const levels = ref<Record<string, any>[]>([]); const levels = ref<Record<string, any>[]>([]);
const projectId = Cookies.get('sand-projectId') ?? route.query.projectId; const projectId = Cookies.get('sand-projectId') ?? route.query.projectId;
const step = 150;
// //
const getLevel = async (only: any = '') => { const getLevel = async (only: any = '') => {
if (only) collected.value = !collected.value; if (only) collected.value = !collected.value;
@ -113,8 +118,14 @@ const toRole = () => {
ElMessage.error('请选择关卡!'); ElMessage.error('请选择关卡!');
} }
}; };
const move = () => { const move = (dir: string) => {
window.scrollTo(0, 100); const el = document.querySelector('#wrap');
const param = {
behavior: 'smooth',
};
if (dir === 'left' || dir === 'right') param.left = el.scrollLeft + (dir === 'left' ? -150 : 150);
if (dir === 'up' || dir === 'down') param.top = el.scrollTop + (dir === 'up' ? -150 : 150);
el.scrollTo(param);
}; };
onMounted(() => { onMounted(() => {
getLevel(); getLevel();
@ -122,11 +133,18 @@ onMounted(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@mixin verticalLine {
@apply left-[108px] h-[98px] bg-[url('@/assets/images/level/line3.png')];
}
.item { .item {
--w: 330px; --w: 330px;
--line2: 160px; --line2: 160px;
--line3: 360px; --line3: 360px;
--line4: 520px; --line4: 520px;
--line5: 680px;
--line6: 840px;
--line7: 1000px;
--line8: 1160px;
@apply absolute w-[218px] h-[120px] text-white bg-[url('@/assets/images/level/8.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer; @apply absolute w-[218px] h-[120px] text-white bg-[url('@/assets/images/level/8.png')] bg-[length:100%_100%] bg-no-repeat cursor-pointer;
&:before, &:before,
&:after { &:after {
@ -192,9 +210,22 @@ onMounted(() => {
} }
&:nth-child(10) { &:nth-child(10) {
@apply top-[var(--line2)] left-[1500px]; @apply top-[var(--line2)] left-[1500px];
&:before {
display: none;
}
&:after {
@include verticalLine;
}
} }
&:nth-child(11) { &:nth-child(11) {
@apply top-[var(--line3)] left-[1500px]; @apply top-[var(--line3)] left-[1500px];
&:before {
@apply left-[40px] bg-[url('@/assets/images/level/line2.png')];
transform: rotateX(180deg);
}
&:after {
display: none;
}
} }
&:nth-child(12) { &:nth-child(12) {
@apply top-[var(--line4)] left-[calc(var(--w)*4)]; @apply top-[var(--line4)] left-[calc(var(--w)*4)];
@ -222,6 +253,9 @@ onMounted(() => {
} }
&:nth-child(20) { &:nth-child(20) {
@apply top-[var(--line4)]; @apply top-[var(--line4)];
&:after {
@include verticalLine;
}
} }
&:nth-child(odd) { &:nth-child(odd) {
@ -242,15 +276,47 @@ onMounted(() => {
@apply bg-[url('@/assets/images/level/line2.png')]; @apply bg-[url('@/assets/images/level/line2.png')];
} }
} }
&:nth-child(10) { &:nth-child(21) {
@apply top-[var(--line5)];
&:before {
display: none;
}
}
&:nth-child(22) {
@apply top-[var(--line6)] left-[160px];
}
&:nth-child(23) {
@apply top-[var(--line5)] left-[var(--w)];
}
&:nth-child(24) {
@apply top-[var(--line6)] left-[510px];
}
&:nth-child(25) {
@apply top-[var(--line5)] left-[calc(var(--w)*2)];
}
&:nth-child(26) {
@apply top-[var(--line6)] left-[820px];
}
&:nth-child(27) {
@apply top-[var(--line5)] left-[calc(var(--w)*3)];
}
&:nth-child(28) {
@apply top-[var(--line6)] left-[1170px];
}
&:nth-child(29) {
@apply top-[var(--line5)] left-[calc(var(--w)*4)];
}
&:nth-child(30) {
@apply top-[var(--line6)] left-[1500px];
&:before { &:before {
display: none; display: none;
} }
&:after { &:after {
@apply left-[108px] h-[98px] bg-[url('@/assets/images/level/line3.png')]; @include verticalLine;
} }
} }
&:nth-child(11) { &:nth-child(31) {
@apply top-[var(--line7)] left-[1500px];
&:before { &:before {
@apply left-[40px] bg-[url('@/assets/images/level/line2.png')]; @apply left-[40px] bg-[url('@/assets/images/level/line2.png')];
transform: rotateX(180deg); transform: rotateX(180deg);
@ -259,9 +325,44 @@ onMounted(() => {
display: none; display: none;
} }
} }
&:nth-child(32) {
@apply top-[var(--line8)] left-[calc(var(--w)*4)];
}
&:nth-child(33) {
@apply top-[var(--line7)] left-[1170px];
}
&:nth-child(34) {
@apply top-[var(--line8)] left-[calc(var(--w)*3)];
}
&:nth-child(35) {
@apply top-[var(--line7)] left-[820px];
}
&:nth-child(36) {
@apply top-[var(--line8)] left-[calc(var(--w)*2)];
}
&:nth-child(37) {
@apply top-[var(--line7)] left-[510px];
}
&:nth-child(38) {
@apply top-[var(--line8)] left-[var(--w)];
}
&:nth-child(39) {
@apply top-[var(--line7)] left-[160px];
}
&:nth-child(40) {
@apply top-[var(--line8)];
&:after {
@include verticalLine;
}
}
&:last-child {
&:before {
display: none;
}
}
} }
.arrow { .arrow {
@apply absolute bg-[length:100%_100%] bg-no-repeat animate-bounce cursor-pointer; @apply fixed bg-[length:100%_100%] bg-no-repeat animate-bounce cursor-pointer;
} }
@keyframes bounce { @keyframes bounce {

@ -437,7 +437,7 @@ const submit = async (formEl: FormInstance | undefined) => {
const addRecord = async (data: Record<string, any>) => { const addRecord = async (data: Record<string, any>) => {
const isEnterprise = data.productType === 1; const isEnterprise = data.productType === 1;
const preIds = `1,${Cookies.get('sand-level')},41,${data.productType ? 45 : 44}`; // 1id/44/45 const preIds = `1,${Cookies.get('sand-level')},41,${data.productType ? 45 : 44}`; // 1id/44/45
const lcRule = <Record<string, any>[]>[ const lcRule: Array<Record<string, any>> = [
handleId(48, 1, data.productDefinition, preIds + ',48', 3), handleId(48, 1, data.productDefinition, preIds + ',48', 3),
handleId(49, 2, data.productName, preIds + ',49', 3), handleId(49, 2, data.productName, preIds + ',49', 3),
handleId(50, 3, 1, preIds + ',50', 1), handleId(50, 3, 1, preIds + ',50', 1),

@ -123,7 +123,7 @@ const submit = async (formEl: FormInstance | undefined) => {
// //
const addRecord = async (data: Record<string, any>, newId: number) => { const addRecord = async (data: Record<string, any>, newId: number) => {
const preIds = `1,2,43,${data.productType ? 45 : 44},${newId}`; // 1id/44/45 const preIds = `1,2,43,${data.productType ? 45 : 44},${newId}`; // 1id/44/45
const lcRule = <Record<string, any>[]>[handleId(145, 69, data.status, preIds + ',145', 1), handleId(146, 70, data.opinionDescription, preIds + ',146', 3)]; const lcRule: Array<Record<string, any>> = [handleId(145, 69, data.status, preIds + ',145', 1), handleId(146, 70, data.opinionDescription, preIds + ',146', 3)];
await addOperation({ await addOperation({
checkpointId: +Cookies.get('sand-level'), checkpointId: +Cookies.get('sand-level'),

@ -553,7 +553,7 @@ const submit = async (formEl: FormInstance | undefined) => {
const addRecord = async (data: Record<string, any>) => { const addRecord = async (data: Record<string, any>) => {
const isEnterprise = info.value.productType === 1; const isEnterprise = info.value.productType === 1;
const preIds = `1,${Cookies.get('sand-level')},42,${data.productType ? 71 : 70}`; // 1id/70/71 const preIds = `1,${Cookies.get('sand-level')},42,${data.productType ? 71 : 70}`; // 1id/70/71
const lcRule = <Record<string, any>[]>[]; const lcRule: Array<Record<string, any>> = [];
// //
if (isEnterprise) { if (isEnterprise) {

@ -37,7 +37,8 @@
:value="item.itemId" /> :value="item.itemId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="承保年龄"> <el-form-item v-if="form.insuranceType === 310"
label="承保年龄">
<div class="flex items-center"> <div class="flex items-center">
<div class="num-inputs"> <div class="num-inputs">
<el-input placeholder="最小年龄" <el-input placeholder="最小年龄"
@ -203,7 +204,7 @@ const submit = async () => {
param.applicationMaterial = param.applicationMaterial.join(); param.applicationMaterial = param.applicationMaterial.join();
param.exemptionFromLiability = param.exemptionFromLiability.join(); param.exemptionFromLiability = param.exemptionFromLiability.join();
await addInsuranceProducts(param); await addInsuranceProducts(param);
// addRecord(param); addRecord(param);
ElMessage.success('提交成功!'); ElMessage.success('提交成功!');
emit('getList', 1); emit('getList', 1);
} finally { } finally {
@ -211,12 +212,24 @@ const submit = async () => {
}; };
// //
const addRecord = async (data: Record<string, any>) => { const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},41,${data.productType ? 45 : 44}`; // 1id/44/45 const preIds = `1,${Cookies.get('sand-level')},275,${data.insuranceType === 310 ? 276 : 277}`; // 1id/44/45
const rule: Array<Record<string, any>> = [handleId(278, 118, data.insuranceName, preIds + ',278', 3), handleId(279, 119, data.insuranceType, preIds + ',279', 1)];
data.minimumAge && rule.push(handleId(680, 219, data.minimumAge, preIds + '678,680', 3));
data.maximumAge && rule.push(handleId(679, 218, data.maximumAge, preIds + '678,679', 3));
//
config.value[form.insuranceType === 310 ? 0 : 1]?.recordChildren[2]?.recordChildren?.map((e) => {
e.check && e.sumInsured && rule.push(handleId(e.id, e.subjectId, e.sumInsured, preIds + ',280,' + e.id, 3));
});
data.premiumAmount && rule.push(handleId(296, 134, data.premiumAmount, preIds + ',296', 3));
data.formOfPayment && rule.push(handleId(297, 135, data.formOfPayment, preIds + ',297', 1));
data.insuranceDeadline && rule.push(handleId(298, 136, data.insuranceDeadline, preIds + ',298', 3));
data.applicationMaterial && rule.push(handleId(299, 137, data.applicationMaterial, preIds + ',299', 1));
data.exemptionFromLiability && rule.push(handleId(301, 139, data.exemptionFromLiability, preIds + ',301', 1));
await addOperation({ await addOperation({
checkpointId: levelId, checkpointId: levelId,
parentId: preIds, parentId: preIds,
// lcJudgmentRuleReq: lcRule, lcJudgmentRuleReq: rule,
projectId, projectId,
}); });
}; };

Loading…
Cancel
Save