全部模块的列表新增加上考核id、竞赛id

V0.1
yujialong 9 months ago
parent b455947c6a
commit e2c1376608
  1. 2
      .env
  2. 67
      src/api/model.ts
  3. 258
      src/components/DialogForm.vue
  4. 30
      src/components/HelloI18n.vue
  5. 17
      src/components/LabelTip.vue
  6. 27
      src/components/ListMove.vue
  7. 60
      src/components/Panel/index.vue
  8. 59
      src/components/QueryForm/QueryForm.vue
  9. 16
      src/components/QueryForm/QueryInput.vue
  10. 64
      src/components/QueryForm/QueryItem.vue
  11. 2
      src/components/QueryForm/index.ts
  12. 45
      src/components/TableList/ColumnList.vue
  13. 40
      src/components/TableList/ColumnSetting.vue
  14. 2
      src/components/TableList/index.ts
  15. 55
      src/components/TableList/useColumns.ts
  16. 11
      src/utils/common.ts
  17. 2
      src/views/Home.vue
  18. 2
      src/views/config/level/Index.vue
  19. 8
      src/views/finance/Bank.vue
  20. 20
      src/views/finance/Fund.vue
  21. 8
      src/views/finance/Insurance.vue
  22. 26
      src/views/product/bank/Add.vue
  23. 6
      src/views/product/bank/CardList.vue
  24. 3
      src/views/product/bank/Config.vue
  25. 5
      src/views/product/bank/List.vue
  26. 17
      src/views/product/fund/Add.vue
  27. 6
      src/views/product/fund/CardList.vue
  28. 2
      src/views/product/fund/Info.vue
  29. 5
      src/views/product/fund/List.vue
  30. 9
      src/views/product/insurance/Add.vue
  31. 4
      src/views/product/insurance/CardList.vue
  32. 2
      src/views/product/insurance/Info.vue
  33. 5
      src/views/product/insurance/List.vue
  34. 5
      src/views/product/strategy/150.vue
  35. 36
      src/views/product/strategy/151.vue
  36. 14
      src/views/product/strategy/152.vue
  37. 31
      src/views/product/strategy/153.vue
  38. 5
      src/views/product/strategy/154.vue
  39. 11
      src/views/product/strategy/155.vue
  40. 8
      src/views/product/strategy/156.vue
  41. 4
      src/views/product/strategy/CardList.vue
  42. 4
      src/views/product/strategy/Credit.vue
  43. 6
      src/views/product/strategy/Risk1.vue
  44. 6
      src/views/product/strategy/Risk2.vue
  45. 6
      src/views/product/strategy/Risk3.vue

@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘
VITE_PORT=9520
VITE_PROXY=http://192.168.31.125:8080
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_I18N_LOCALE=zh-cn
VITE_I18N_FALLBACK_LOCALE=zh-cn

@ -1,84 +1,81 @@
import axios from '@/utils/request';
import { getIds } from '@/utils/common';
export const accessStrategyGovernmentBlacklistFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyGovernmentBlacklist/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
const host = `http://192.168.31.51:9000`;
export const accessStrategyGovernmentBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyGovernmentBlacklist/details`, getIds())).data;
export const accessStrategyGovernmentBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyGovernmentBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyEnterpriseBlacklistFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyEnterpriseBlacklist/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyEnterpriseBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyEnterpriseBlacklist/details`, getIds())).data;
export const accessStrategyEnterpriseBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyEnterpriseBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyAntiFraudStrategyFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyAntiFraudStrategy/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyAntiFraudStrategyFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyAntiFraudStrategy/details`, getIds())).data;
export const accessStrategyAntiFraudStrategySave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyAntiFraudStrategy/saveOrUpdate`, data)).data;
export const accessStrategyBusinessBlacklistFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyBusinessBlacklist/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyBusinessBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyBusinessBlacklist/details`, getIds())).data;
export const accessStrategyBusinessBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyBusinessBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyCreditBlacklistFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyCreditBlacklist/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyCreditBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyCreditBlacklist/details`, getIds())).data;
export const accessStrategyCreditBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyCreditBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyInlineBlacklistFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyInlineBlacklist/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyInlineBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyInlineBlacklist/details`, getIds())).data;
export const accessStrategyInlineBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyInlineBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyNegativeIndustryStrategyFind = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/accessStrategyNegativeIndustryStrategy/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const accessStrategyNegativeIndustryStrategyFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyNegativeIndustryStrategy/details`, getIds())).data;
export const accessStrategyNegativeIndustryStrategySave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyNegativeIndustryStrategy/saveOrUpdate`, data)).data;
export const delCredit = async (id: number): Promise<any> => (await axios.post(`/product/creditScoringStrategy/delete?strategyId=${id}`)).data;
export const findCredit = async (id: number): Promise<any> => (await axios.post(`/product/creditScoringStrategy/details?strategyId=${id}`)).data;
export const listCredit = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/creditScoringStrategy/list?checkpointId=${data.checkpointId}&projectId=${data.projectId}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`)).data;
(
await axios.post(`/product/creditScoringStrategy/list`, {
...data,
...getIds(),
})
).data;
export const saveCredit = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/creditScoringStrategy/saveOrUpdate`, data)).data;
export const detailRick = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/riskDegreeStrategy/details?checkpointId=${data.checkpointId}&projectId=${data.projectId}&type=${data.type}`)).data;
export const detailRick = async (type: number): Promise<any> =>
(
await axios.post(`/product/riskDegreeStrategy/details`, {
...getIds(),
type,
})
).data;
export const saveRick = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/riskDegreeStrategy/saveOrUpdate`, data)).data;
export const businessInterestRateDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/interestRateModel/businessInterestRateDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const businessInterestRateDetails = async (): Promise<any> => (await axios.post(`/product/interestRateModel/businessInterestRateDetails`, getIds())).data;
export const businessInterestRateSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/interestRateModel/businessInterestRateSaveOrUpdate`, data)).data;
export const personalInterestRateDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/interestRateModel/personalInterestRateDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const personalInterestRateDetails = async (): Promise<any> => (await axios.post(`/product/interestRateModel/personalInterestRateDetails`, getIds())).data;
export const personalInterestRateSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/interestRateModel/personalInterestRateSaveOrUpdate`, data)).data;
export const businessQuotaModelDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/quotaModel/businessQuotaModelDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const businessQuotaModelDetails = async (): Promise<any> => (await axios.post(`/product/quotaModel/businessQuotaModelDetails`, getIds())).data;
export const businessQuotaModelSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/businessQuotaModelSaveOrUpdate`, data)).data;
export const personalCreditModelDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/quotaModel/personalCreditModelDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const personalCreditModelDetails = async (): Promise<any> => (await axios.post(`/product/quotaModel/personalCreditModelDetails`, getIds())).data;
export const personalCreditModelSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/personalCreditModelSaveOrUpdate`, data)).data;
export const fiveLevelClassificationDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/fiveLevelClassification/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const fiveLevelClassificationDetails = async (): Promise<any> => (await axios.post(`/product/fiveLevelClassification/details`, getIds())).data;
export const fiveLevelClassificationSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/fiveLevelClassification/saveOrUpdate`, data)).data;
export const postLoanInspectionDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postLoanInspection/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postLoanInspectionDetails = async (): Promise<any> => (await axios.post(`/product/postLoanInspection/details`, getIds())).data;
export const postLoanInspectionSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postLoanInspection/saveOrUpdate`, data)).data;
export const postCreditScoreDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postCreditScore/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postCreditScoreDetails = async (): Promise<any> => (await axios.post(`/product/postCreditScore/details`, getIds())).data;
export const postCreditScoreSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postCreditScore/saveOrUpdate`, data)).data;
export const postLoanWarningDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postLoanWarning/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postLoanWarningDetails = async (): Promise<any> => (await axios.post(`/product/postLoanWarning/details`, getIds())).data;
export const postLoanWarningSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postLoanWarning/saveOrUpdate`, data)).data;
export const collectionAfterLoanDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/collectionAfterLoan/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const collectionAfterLoanDetails = async (): Promise<any> => (await axios.post(`/product/collectionAfterLoan/details`, getIds())).data;
export const collectionAfterLoanSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/collectionAfterLoan/saveOrUpdate`, data)).data;

@ -1,258 +0,0 @@
<template>
<el-dialog
:title="title"
:close-on-click-modal="!unsaved"
:model-value="modelValue"
@update:model-value="$emit('update:modelValue', $event)"
@opened="!isEdit && focus?.focus()"
:width="large ? '98%' : '683px'"
:top="large ? '16px' : undefined"
>
<div>
<el-button v-if="isEdit && addable" :disabled="perm(`${perms}:create`)" type="primary" :icon="Plus" @click="handleAdd">{{ $t('add') }}</el-button>
<el-popconfirm v-if="isEdit" :title="$t('confirmDelete')" @confirm="handleDelete">
<template #reference>
<el-button :loading="buttonLoading" :disabled="disableDelete?.(bean) || perm(`${perms}:delete`)" :icon="Delete">{{ $t('delete') }}</el-button>
</template>
</el-popconfirm>
<el-button v-if="isEdit" @click="handlePrev" :disabled="!hasPrev">{{ $t('form.prev') }}</el-button>
<el-button v-if="isEdit" @click="handleNext" :disabled="!hasNext">{{ $t('form.next') }}</el-button>
<el-button @click="handleCancel" type="primary">{{ $t('back') }}</el-button>
<el-tooltip :content="$t('form.continuous')" placement="top">
<el-switch v-model="continuous" size="small" class="ml-2"></el-switch>
</el-tooltip>
<el-tag v-if="unsaved" type="danger" class="ml-2">{{ $t('form.unsaved') }}</el-tag>
<slot name="header" :values="values" :bean="bean" :isEdit="isEdit"></slot>
</div>
<el-form
:class="['mt-5', 'pr-5']"
ref="form"
v-loading="loading"
:model="values"
:disabled="!editable"
:label-width="labelWidth ?? '150px'"
:label-position="labelPosition ?? 'right'"
>
<slot :values="values" :bean="bean" :isEdit="isEdit"></slot>
<div v-if="editable">
<el-button :disabled="perm(isEdit ? `${perms}:update` : `${perms}:create`)" :loading="buttonLoading" @click.prevent="handleSubmit" type="primary" native-type="submit">
{{ $t('submit') }}
</el-button>
</div>
</el-form>
</el-dialog>
</template>
<script lang="ts">
import { computed, defineComponent, PropType, ref, toRefs, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { Plus, Delete } from '@element-plus/icons-vue';
import { useI18n } from 'vue-i18n';
import _ from 'lodash';
import { perm } from '@/store/useCurrentUser';
const CONTINUOUS_SETTINGS = 'ujcms_continuous_settings';
function fetchContinuous(): Record<string, boolean> {
const settings = localStorage.getItem(CONTINUOUS_SETTINGS);
return settings ? JSON.parse(settings) : {};
}
function storeContinuous(settings: Record<string, boolean>) {
localStorage.setItem(CONTINUOUS_SETTINGS, JSON.stringify(settings));
}
function getContinuous(name: string) {
const settings = fetchContinuous();
return settings[name] ?? false;
}
function setContinuous(name: string, continuous: boolean) {
const settings = fetchContinuous();
settings[name] = continuous;
storeContinuous(settings);
}
export default defineComponent({
name: 'DialogForm',
props: {
modelValue: { type: Boolean, required: true },
name: { type: String, required: true },
beanId: { required: true },
beanIds: { type: Array, required: true },
initValues: { type: Function as PropType<(bean?: any) => any>, required: true },
toValues: { type: Function as PropType<(bean: any) => any>, required: true },
queryBean: { type: Function as PropType<(id: any) => Promise<any>>, required: true },
createBean: { type: Function as PropType<(bean: any) => Promise<any>>, required: true },
updateBean: { type: Function as PropType<(bean: any) => Promise<any>>, required: true },
deleteBean: { type: Function as PropType<(ids: any[]) => Promise<any>>, required: true },
disableDelete: { type: Function as PropType<(bean: any) => boolean> },
addable: { type: Boolean, default: true },
editable: { type: Boolean, default: true },
perms: String,
focus: Object,
large: Boolean,
labelPosition: String,
labelWidth: String,
},
emits: {
'update:modelValue': null,
finished: null,
beanChange: null,
beforeSubmit: null,
},
setup(props, { emit }) {
const { name, beanId, beanIds, focus, modelValue: visible } = toRefs(props);
const { t } = useI18n();
const loading = ref<boolean>(false);
const buttonLoading = ref<boolean>(false);
const continuous = ref<boolean>(getContinuous(name.value));
const reseted = ref<boolean>(false);
const unsaved = ref<boolean>(false);
const form = ref<any>();
const values = ref<any>(props.initValues());
const bean = ref<any>({});
const id = ref<any>();
const ids = ref<Array<any>>([]);
const isEdit = computed(() => id.value != null);
const title = computed(() => `${name.value} - ${isEdit.value ? `${t('edit')} (ID: ${id.value})` : `${t('add')}`}`);
const idChanged = async () => {
loading.value = true;
unsaved.value = false;
reseted.value = true;
try {
bean.value = id.value != null ? await props.queryBean(id.value) : {};
values.value = id.value != null ? props.toValues(bean.value) : props.initValues(values.value);
emit('beanChange', bean.value);
form.value.resetFields();
} finally {
loading.value = false;
}
};
watch(visible, () => {
if (visible.value) {
ids.value = beanIds.value;
if (id.value !== beanId.value) {
id.value = beanId.value;
} else if (id.value != null) {
idChanged();
}
if (id.value == null) {
reseted.value = true;
values.value = props.initValues();
}
}
});
watch(id, () => {
idChanged();
});
watch(
// 使 lodash
// https://v3.vuejs.org/guide/reactivity-computed-watchers.html#watching-reactive-objects
() => _.cloneDeep(values.value),
(curr, prev) => {
// bean
if (reseted.value) {
reseted.value = false;
} else if (JSON.stringify(curr) !== JSON.stringify(prev)) {
// values.customsundefined
// watchjsonjsonunsaved
unsaved.value = true;
}
},
{ deep: true },
);
watch(continuous, () => setContinuous(name.value, continuous.value));
const index = computed(() => ids.value.indexOf(id.value));
const hasPrev = computed(() => index.value > 0);
const hasNext = computed(() => index.value < ids.value.length - 1);
const handlePrev = () => {
if (hasPrev.value) {
id.value = ids.value[index.value - 1];
}
};
const handleNext = () => {
if (hasNext.value) {
id.value = ids.value[index.value + 1];
}
};
const handleAdd = () => {
// eslint-disable-next-line no-unused-expressions
focus?.value?.focus?.();
id.value = undefined;
};
const handleCancel = () => {
emit('update:modelValue', false);
};
const handleSubmit = () => {
form.value.validate(async (valid: boolean) => {
if (!valid) return;
buttonLoading.value = true;
try {
emit('beforeSubmit', values.value);
if (isEdit.value) {
await props.updateBean(values.value);
unsaved.value = false;
} else {
await props.createBean(values.value);
// eslint-disable-next-line no-unused-expressions
focus?.value?.focus?.();
unsaved.value = false;
reseted.value = true;
values.value = props.initValues(values.value);
form.value.resetFields();
}
ElMessage.success(t('success'));
if (!continuous.value) emit('update:modelValue', false);
emit('finished', bean.value);
} finally {
buttonLoading.value = false;
}
});
};
const handleDelete = async () => {
buttonLoading.value = true;
try {
await props.deleteBean([id.value]);
if (!continuous.value) emit('update:modelValue', false);
if (hasNext.value) {
handleNext();
ids.value.splice(index.value - 1, 1);
} else if (hasPrev.value) {
handlePrev();
ids.value.splice(index.value + 1, 1);
} else {
emit('update:modelValue', false);
}
ElMessage.success(t('success'));
emit('finished');
} finally {
buttonLoading.value = false;
}
};
const setUnsaved = (bool: boolean) => {
unsaved.value = bool;
};
return {
perm,
handleAdd,
handleDelete,
handleSubmit,
handleCancel,
handlePrev,
handleNext,
hasPrev,
hasNext,
loading,
buttonLoading,
continuous,
unsaved,
isEdit,
form,
values,
bean,
id,
title,
setUnsaved,
Plus,
Delete,
};
},
});
</script>

@ -1,30 +0,0 @@
<template>
<p>{{ t('hello') }}</p>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useI18n } from 'vue-i18n';
export default defineComponent({
name: 'HelloI18n',
setup() {
const { t } = useI18n({
inheritLocale: true,
useScope: 'local',
});
// Something todo ..
return { t };
},
});
</script>
<i18n>
{
"en": {
"hello": "Hello i18n in SFC!"
}
}
</i18n>

@ -1,17 +0,0 @@
<template>
{{ label ?? $t(message) }}
<el-tooltip :content="tooltip ?? $t(message + '.tooltip')"
placement="top">
<el-icon class="text-base align-text-top"><question-filled /></el-icon>
</el-tooltip>
</template>
<script setup lang="ts">
import { QuestionFilled } from '@element-plus/icons-vue';
defineProps({
label: { type: String },
tooltip: { type: String },
message: { type: String, required: true },
});
</script>

@ -1,27 +0,0 @@
<template>
<el-button-group>
<el-button :disabled="disabled"
:icon="Top"
@click="$emit('move', 'top')">{{ $t('moveTop') }}</el-button>
<el-button :disabled="disabled"
:icon="ArrowUp"
@click="$emit('move', 'up')">{{ $t('moveUp') }}</el-button>
<el-button :disabled="disabled"
:icon="ArrowDown"
@click="$emit('move', 'down')">{{ $t('moveDown') }}</el-button>
<el-button :disabled="disabled"
:icon="Bottom"
@click="$emit('move', 'bottom')">{{ $t('moveBottom') }}</el-button>
</el-button-group>
</template>
<script setup lang="ts">
import { Top, Bottom, ArrowUp, ArrowDown } from '@element-plus/icons-vue';
defineProps({
disabled: { type: Boolean, required: true },
});
defineEmits({
move: null,
});
</script>

@ -24,7 +24,7 @@
placeholder="请选择"
class="select"
:disabled="per != 0"
@change="selectProject">
@change="getCache(1)">
<el-option v-for="(item, i) in projectList"
:key="item.projectId"
:label="i + 1 + '. ' + item.projectName"
@ -271,6 +271,7 @@ const countVal = ref<any>('');
const getLevel = ref();
const container = ref<HTMLElement | null>(null);
const handle = ref<HTMLElement | null>(null);
const isFirst = ref<boolean>(true);
//
const { x, y, style } = useDraggable(container, {
initialValue: { x: 0, y: 200 },
@ -305,6 +306,7 @@ if (param.token) {
Cookies.set('sand-account', param.account ?? '');
Cookies.set('sand-admin', param.admin ?? ''); //
Cookies.remove('sand-submit');
Cookies.remove('sand-loaded');
router.replace(route.path);
} else {
param.systemId = Cookies.get('sand-systemId');
@ -387,24 +389,10 @@ const setSubmit = (val: boolean) => {
};
//
const getAssList = async () => {
// const { list } = await pageStuAssessment({
// pageNum: 1,
// pageSize: 10000,
// });
// let done = false;
// // reportIdclassIdclassId
// if (list.find((e) => e.assessmentId == param.assessmentId && e.reportId && e.classId == param.classId)) {
// done = true;
// setSubmit(true);
// ElMessage.error('');
// setTimeout((_) => {
// window.history.back(); //
// }, 1500);
// }
getProDetail();
getAssStatus();
await getAssStatus();
await getProDetail();
};
//
//
const getAssStatus = async () => {
//
if (!isSubmit.value) {
@ -423,7 +411,7 @@ const getAssStatus = async () => {
}
};
//
//
const getCompetitionStatus = async () => {
//
if (!isSubmit.value) {
@ -470,11 +458,13 @@ const setNewProject = (reloadPage?: number) => {
}
};
//
const selectProject = async () => {
const getCache = async (reloadPage?: number) => {
//
const res = await getSandTableLastCache({
cid: param.cid,
projectId: param.projectId,
assessmentId: param.assessmentId,
competitionId: param.competitionId,
});
//
if (res.getLastCache) {
@ -484,7 +474,7 @@ const selectProject = async () => {
type: 'success',
})
.then(async () => {
setNewProject(1);
setNewProject(reloadPage);
})
.catch(async () => {
setNewProject();
@ -495,11 +485,13 @@ const selectProject = async () => {
competitionId: param.competitionId,
});
//
if (reloadPage) {
if (route.path === '/') {
location.reload();
} else {
getLevel.value && getLevel.value();
}
}
});
} else {
setNewProject();
@ -685,24 +677,34 @@ const initSocket = () => {
// socket
socket.onmessage = getMessage;
};
onMounted(() => {
const handleCache = () => {
visible.value && !Cookies.get('sand-loaded') && getCache(0); //
};
//
const init = async () => {
getLevel.value = inject('getLevel'); //
per.value = param.assessmentId ? 1 : param.competitionId ? 2 : 0;
param.cid && getEntryTime();
if (param.assessmentId) {
getAssList();
//
await getAssList();
handleCache();
initSocket();
} else {
param.cid && getList();
if (param.competitionId) {
} else if (param.competitionId) {
//
getCompetitionStatus();
handleCache();
initSocket();
} else {
//
param.cid && getList();
handleCache();
}
}
});
Cookies.set('sand-loaded', 1);
};
onMounted(init);
</script>
<style lang="scss" scoped>

@ -1,59 +0,0 @@
<template>
<form class="flex">
<div class="space-y-1">
<div v-for="(name, index) in names" :key="name" class="flex">
<el-button :icon="index == 0 ? Plus : Minus" @click="handelRow(index)" :disabled="index <= 0 && remains.length <= 0" circle></el-button>
<el-select v-model="names[index]" @change="clearParams()" class="w-36">
<el-option v-for="item in data.filter((it) => it.name === names[index] || remains.includes(it))" :key="item.name" :label="item.label" :value="item.name"></el-option>
</el-select>
<query-input :inputs="inputs" :name="names[index]"></query-input>
</div>
</div>
<div>
<el-button-group class="ml-2">
<el-button native-type="submit" :icon="Search" @click.prevent="$emit('search')">{{ $t('search') }}</el-button>
<el-button :icon="Refresh" @click="$emit('reset')">{{ $t('reset') }}</el-button>
</el-button-group>
</div>
</form>
</template>
<script setup lang="ts">
import { defineEmits, useSlots, provide, computed, ref, toRefs } from 'vue';
import { Plus, Minus, Search, Refresh } from '@element-plus/icons-vue';
import QueryInput from './QueryInput.vue';
const props = defineProps({ params: { type: Object, required: true } });
const { params } = toRefs(props);
const slots = useSlots();
provide('params', params);
defineEmits({
search: null,
reset: null,
});
const data = ref<any[]>([]);
const inputs = ref<any[]>([]);
inputs.value = slots.default?.() ?? [];
data.value = inputs.value.map((item) => ({ label: item.props?.label, name: item.props?.name }));
const [first] = data.value;
const names = ref<string[]>([first.name]);
const remains = computed(() => data.value.filter((it) => !names.value.includes(it.name)));
const clearParams = () => {
Object.keys(params.value).forEach((key) => {
if (!names.value.includes(key) && names.value.findIndex((item) => item.split(',').includes(key)) === -1) {
delete params.value[key];
}
});
};
const handelRow = (index: number) => {
if (index === 0) {
const [item] = remains.value;
names.value[names.value.length] = item.name;
} else {
names.value.splice(index, 1);
clearParams();
}
};
</script>

@ -1,16 +0,0 @@
<script lang="ts">
import { defineComponent, computed, toRefs } from 'vue';
export default defineComponent({
name: 'QueryInput',
props: { inputs: { type: Array, required: true }, name: { type: String, required: true } },
setup(props) {
const { inputs, name } = toRefs(props);
const input = computed(() => inputs.value.find((item: any) => item.props.name === name.value));
return { input };
},
render() {
return this.input;
},
});
</script>

@ -1,64 +0,0 @@
<template>
<slot>
<div v-if="type === 'number'"
class="inline-block">
<el-input-number v-model="params[first]"
:placeholder="$t('begin.number')"
class="w-48"></el-input-number>
<el-input-number v-model="params[second]"
:placeholder="$t('end.number')"
class="w-48"></el-input-number>
</div>
<el-date-picker v-else-if="type === 'date'"
v-model="params[name]"
type="daterange"
:start-placeholder="$t('begin.date')"
:end-placeholder="$t('end.date')"
class="w-96"></el-date-picker>
<el-date-picker v-else-if="type === 'datetime'"
v-model="params[name]"
type="datetimerange"
:start-placeholder="$t('begin.date')"
:end-placeholder="$t('end.date')"
class="w-96">
</el-date-picker>
<!--
<div v-else-if="type === 'date'" class="inline-block">
<el-date-picker v-model="params[first]" type="date" :placeholder="$t('begin.date')" class="w-48"></el-date-picker>
<el-date-picker v-model="params[second]" type="date" :placeholder="$t('end.date')" class="w-48"></el-date-picker>
</div>
<div v-else-if="type === 'datetime'" class="inline-block">
<el-date-picker v-model="params[first]" type="datetime" class="w-48"></el-date-picker>
<el-date-picker v-model="params[second]" type="datetime" class="w-48"></el-date-picker>
</div>
-->
<el-select v-else-if="options"
v-model="params[name]"
multiple
class="w-96">
<el-option v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input v-else
v-model="params[name]"
class="w-96"></el-input>
</slot>
</template>
<script setup lang="ts">
import { inject, PropType, ref, toRefs } from 'vue';
const props = defineProps({
label: { type: String, required: true },
name: { type: String, required: true },
// 'string' | 'date' | 'datetime' | 'number'
type: { type: String },
options: { type: Object as PropType<Array<{ label: string; value: string | number }>> },
});
const params = inject<any>('params');
const { name } = toRefs(props);
const [firstName, secondName] = name.value.split(',');
const first = ref<string>(firstName);
const second = ref<string>(secondName);
</script>

@ -1,2 +0,0 @@
export { default as QueryForm } from './QueryForm.vue';
export { default as QueryItem } from './QueryItem.vue';

@ -1,45 +0,0 @@
<script lang="ts">
import { computed, defineComponent, toRefs } from 'vue';
import { useI18n } from 'vue-i18n';
import { ColumnState, getColumnSettings, setColumnOrigins } from './useColumns';
export default defineComponent({
name: 'ColumnList',
props: { name: { type: String, required: true } },
setup(props, { slots }) {
const { name } = toRefs(props);
const { t } = useI18n();
const slotColumns = slots.default?.() ?? [];
//
const getColumnTitle = (columnProps: any) => {
// checkbox
if (columnProps?.type === 'selection') return t('table.selection');
return columnProps?.label;
};
// el-table-column
const origins: ColumnState[] = slotColumns.map((column) => ({ title: getColumnTitle(column.props), display: column.props?.display !== 'none' }));
setColumnOrigins(name.value, origins);
const settings = getColumnSettings(name.value);
const columns = computed(() =>
slotColumns
.filter((column) => {
const matched = settings.value.find((item) => getColumnTitle(column.props) === item.title);
return !matched || matched.display;
})
.map((column) => ({ ...column, key: getColumnTitle(column.props) }))
.sort((a, b) => {
let indexA = settings.value.findIndex((item) => item.title === getColumnTitle(a));
if (indexA < 0) indexA = slotColumns.findIndex((item) => getColumnTitle(item) === getColumnTitle(a));
let indexB = settings.value.findIndex((item) => item.title === getColumnTitle(b));
if (indexB < 0) indexB = slotColumns.findIndex((item) => getColumnTitle(item) === getColumnTitle(b));
return indexA - indexB;
}),
);
return { columns };
},
render() {
return this.columns;
},
});
</script>

@ -1,40 +0,0 @@
<template>
<el-dropdown class="align-middle"
trigger="click"
:hide-on-click="false">
<el-tooltip :content="$t('table.columnsSetting')"
placement="top">
<el-icon class="text-base">
<setting />
</el-icon>
</el-tooltip>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>
<el-button @click="resetColumns"
type="text">{{ $t('table.columnsReset') }}</el-button>
</el-dropdown-item>
<el-dropdown-item v-for="(column, index) in settings"
:key="column.title"
:divided="index === 0">
<el-checkbox v-model="column.display">{{ column.title }}</el-checkbox>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<script setup lang="ts">
import { toRefs, watch } from 'vue';
import { Setting } from '@element-plus/icons-vue';
import { getColumnOrigins, getColumnSettings, mergeColumns, storeColumnSettings } from './useColumns';
const props = defineProps({ name: { type: String, required: true } });
const { name } = toRefs(props);
const settings = getColumnSettings(name.value);
const origins = getColumnOrigins(name.value);
watch(settings, () => storeColumnSettings(), { deep: true });
const resetColumns = () => {
settings.value = mergeColumns([], origins.value);
};
</script>

@ -1,2 +0,0 @@
export { default as ColumnSetting } from './ColumnSetting.vue';
export { default as ColumnList } from './ColumnList.vue';

@ -1,55 +0,0 @@
import { reactive, toRef } from 'vue';
export interface ColumnState {
title: string;
display: boolean;
}
const COLUMN_SETTINGS = 'ujcms_column_settings';
function fetchColumnSettings(): Record<string, ColumnState[]> {
const settings = localStorage.getItem(COLUMN_SETTINGS);
return settings ? JSON.parse(settings) : {};
}
const originStore: Record<string, ColumnState[]> = reactive({});
const settingStore: Record<string, ColumnState[]> = reactive(fetchColumnSettings());
export function storeColumnSettings() {
localStorage.setItem(COLUMN_SETTINGS, JSON.stringify(settingStore));
}
export const getColumnOrigins = (name: string) => {
if (!originStore[name]) originStore[name] = [];
return toRef(originStore, name);
};
export const mergeColumns = (settings: ColumnState[], origins: ColumnState[]) => {
// 去除不存在的列
for (let i = 0, len = settings.length; i < len; ) {
if (origins.findIndex((column) => column.title === settings[i].title) === -1) {
settings.splice(i, 1);
len -= 1;
} else {
i += 1;
}
}
// 增加未记录的列
origins.forEach((column) => {
if (settings.findIndex((item) => item.title === column.title) === -1) {
settings.push({ ...column });
}
});
return settings;
};
export const setColumnOrigins = (name: string, origins: ColumnState[]) => {
originStore[name] = origins;
if (!settingStore[name]) settingStore[name] = [];
const settings = settingStore[name];
mergeColumns(settings, origins);
};
export const getColumnSettings = (name: string) => {
if (!settingStore[name]) settingStore[name] = [];
return toRef(settingStore, name);
};
// export const setColumnSettings = (name: string, settings: ColumnState[]) => {
// settingStore[name] = settings;
// };

@ -253,3 +253,14 @@ export const getNow = (): Promise<any> => {
resolve(new Date(res.currentTime));
});
};
export const whethers = [
{
id: 795,
name: '是',
},
{
id: 796,
name: '否',
},
];

@ -98,7 +98,7 @@ const collectItem = async (item: Record<string, any>) => {
await cancelCollection(item.favoriteId);
} else {
await collect({
checkPointId: item.checkpointId,
checkpointId: item.checkpointId,
projectId,
});
}

@ -239,7 +239,7 @@ const save = async () => {
await updatePass(param);
//
const addList = list.value.filter((e) => !e.checkpointId && e.customsPassName);
await savePass(addList);
if (addList.length) await savePass(addList);
getList();
ElMessage.success('保存成功!');
saveLoading.value = false;

@ -101,11 +101,10 @@
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { pageSizes, pageLayout, toParams } from '@/utils/common';
import { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { getProcessInformationBasedOnRoles } from '@/api/judgment';
import { bankingProductMarketsList } from '@/api/finance';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
@ -171,9 +170,8 @@ const moneys = ref<Record<string, any>[]>([
name: '>1000万',
},
]);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
...getIds(),
createDateSort: '',
guarantyStyleId: '',
keyWord: '',
@ -181,8 +179,6 @@ const params = reactive({
status: '',
loanPeriod: '不限',
loanLimit: '不限',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);

@ -7,7 +7,7 @@
<div class="vals">
<dd v-for="(item, i) in rates"
:key="i"
:class="{ active: params.subscriptionRate === item.name }"
:class="{ active: params.subscriptionRate === item.id }"
@click="filterClick(item, 'subscriptionRate')">{{ item.name }}</dd>
</div>
</dl>
@ -102,7 +102,7 @@
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams } from '@/utils/common';
import { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { fundProductMarketList } from '@/api/finance';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
@ -112,12 +112,11 @@ const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
...getIds(),
establishmentPeriod: '不限',
fundraisingScale: '不限',
subscriptionRate: '不限',
fundName: '',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
@ -125,15 +124,19 @@ const total = ref<number>(0);
const table = ref<any>();
const rates = ref<Record<string, any>[]>([
{
id: '不限',
name: '不限',
},
{
id: 0,
name: '0',
},
{
id: 1,
name: '0-0.5%',
},
{
id: 2,
name: '>0.5%',
},
]);
@ -197,14 +200,9 @@ onMounted(() => {
watch([params, () => route.query], initList);
//
const filterClick = (item: Record<string, any>, key: string) => {
params[key] = item.name;
};
//
const toAdd = () => {
router.push({
path: `/product/fund/add`,
});
params[key] = item[key === 'subscriptionRate' ? 'id' : 'name'];
};
//
const toDetail = async (path: string, id: number) => {
router.push(`${path}?id=${id}&name=${params.fundName}`);

@ -95,22 +95,18 @@
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { pageSizes, pageLayout, toParams } from '@/utils/common';
import { pageSizes, pageLayout, toParams, getIds } 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({
...getIds(),
insuranceName: '',
insuranceType: '',
coverageAge: '不限',
protectionPeriod: '不限',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);

@ -341,7 +341,7 @@ import { findById, save, update } from '@/api/bank';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { getTheCurrentUserName } from '@/api/config';
import { useRouter, useRoute } from 'vue-router';
import { handleId, isIllegalNum, getIds } from '@/utils/common';
import { handleId, isIllegalNum, getIds, whethers } from '@/utils/common';
import { getStatus } from '@/store/useProduct';
import Info from './Info.vue';
import Cookies from 'js-cookie';
@ -381,26 +381,14 @@ interface RuleForm {
const router = useRouter();
const route = useRoute();
const id = computed(() => route.query.id);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1');
const config = ref<any[]>([]);
const info = ref<Record<string, any>>(null);
const whethers = ref<Record<string, any>>([
{
id: 795,
name: '是',
},
{
id: 796,
name: '否',
},
]);
const formRef = ref<FormInstance>();
const userName = ref<string>();
const form = reactive<RuleForm>({
checkPointId: levelId,
projectId,
...getIds(),
productDefinition: '',
productName: '',
productCurrency: 1,
@ -511,14 +499,14 @@ const submit = async (formEl: FormInstance | undefined) => {
//
param.bankGuarantee1 === 795 &&
graIds.push({
bankGuaranteeTypeId: 108,
pid: '',
bankGuaranteeTypeId: '',
pid: 108,
});
//
param.bankGuarantee2 === 795 &&
graIds.push({
bankGuaranteeTypeId: 109,
pid: '',
bankGuaranteeTypeId: '',
pid: 109,
});
//
param.bankGuarantee3 === 795 &&

@ -65,12 +65,11 @@ import Detail from './Detail.vue';
import Add from './Add.vue';
import Approve from './Approve.vue';
import Cookies from 'js-cookie';
import { getIds } from '@/utils/common';
const router = useRouter();
const route = useRoute();
const action = ref<any>('');
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
// const modules: any = import.meta.glob('./*.vue');
// let currentSubApp = defineAsyncComponent(modules[`./${route.params.action}.vue`]);
@ -84,11 +83,10 @@ const getList = async (refresh?: number) => {
loading.value = true;
try {
const { data } = await bankingProductsList({
...getIds(),
pageNum: 1,
pageSize: 1000,
productType: productType.value,
checkPointId: levelId,
projectId,
roleId: route.query.role,
keyWord: route.query.name ?? '',
createDateSort: route.query.createDateSort ?? '',

@ -654,8 +654,7 @@ const whethers = ref<Record<string, any>>([
]);
const formRef = ref<FormInstance>();
const form = reactive<RuleForm>({
checkPointId: levelId,
projectId,
...getIds(),
accessStrategyCheck: '',
accessStrategy: [],
accountMaterialsCheck: '',

@ -139,7 +139,7 @@
<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 { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { getProcessInformationBasedOnRoles } from '@/api/judgment';
import { bankingProductsList, batchDeletion } from '@/api/bank';
import Search from '@/components/Search.vue';
@ -153,6 +153,7 @@ const productTypes = ref<number[]>([0, 1]);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
...getIds(),
createDateSort: '',
guarantyStyleId: '',
keyWord: '',
@ -167,8 +168,6 @@ const params = reactive({
}),
status: '',
roleId: computed(() => +route.query.role || 41),
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);

@ -332,9 +332,9 @@ const config = ref<any[]>([]);
const units = ref<string[]>(['%', '元']);
const times = ref<string[]>(['分钟', '天', '小时', '月']);
const loading = ref<boolean>(false);
const stockTimer = ref<any>(null);
const form = reactive({
checkPointId: levelId,
projectId,
...getIds(),
buyingDuration: '',
buyingUnit: '',
fundName: '',
@ -418,14 +418,17 @@ const delStock = (i: number) => {
const remoteMethod = (query: string, item: Record<string, any>) => {
if (query !== '') {
loading.value = true;
setTimeout(async () => {
loading.value = false;
clearTimeout(stockTimer.value);
stockTimer.value = setTimeout(async () => {
if (query) {
const { aShares } = await getAListOfAShares(query);
aShares.forEach((e) => {
e.label = e.f14;
e.value = e.f12;
});
item.stocks = aShares;
}
loading.value = false;
}, 200);
} else {
item.stocks = [];
@ -441,12 +444,12 @@ const addRatio = (type: number) => {
input1: '',
input2: '',
rate: '',
rateUnit: '%',
rateUnit: '',
type,
};
if (type) {
temp.soldUnit1 = '分钟';
temp.soldUnit2 = '分钟';
temp.soldUnit1 = '';
temp.soldUnit2 = '';
}
form['buySellRatioList' + type].push(temp);
}

@ -54,12 +54,11 @@ import { useRouter, useRoute } from 'vue-router';
import Detail from './Detail.vue';
import Add from './Add.vue';
import Cookies from 'js-cookie';
import { getIds } from '@/utils/common';
const router = useRouter();
const route = useRoute();
const action = ref<any>('');
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const list = ref<Array<any>>([]);
const loading = ref<boolean>(false);
@ -69,10 +68,9 @@ const getList = async (refresh?: number) => {
loading.value = true;
try {
const { data } = await fundProductList({
...getIds(),
pageNum: 1,
pageSize: 1000,
checkPointId: levelId,
projectId,
fundName: route.query.name ?? '',
createDateSort: route.query.createDateSort ?? '',
});

@ -1,5 +1,5 @@
<template>
<div class="info mt-2">
<div class="info my-2">
<h2 class="text-center text-lg">{{ info.fundName }}</h2>
<p class="text">基金类型{{ info.fundType }}</p>
<p class="text">基金规模{{ info.fundraisingScale }}万元</p>

@ -77,7 +77,7 @@
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common';
import { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { fundProductList, batchDeletion } from '@/api/fund';
import Search from '@/components/Search.vue';
import { useRouter, useRoute } from 'vue-router';
@ -88,10 +88,9 @@ const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
...getIds(),
createDateSort: '',
fundName: '',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);

@ -125,15 +125,12 @@ const emit = defineEmits(['getList']);
const router = useRouter();
const route = useRoute();
const id = computed(() => route.query.id);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1');
const config = ref<any[]>([]);
const info = ref<Record<string, any>>(null);
const units: Array<string> = ['年', '个月', '天', '小时'];
const form = reactive({
checkPointId: levelId,
projectId,
...getIds(),
insuranceName: '',
applicationMaterial: [],
exemptionFromLiability: [],
@ -229,7 +226,7 @@ const submit = async () => {
}
param.insuranceCoverageConfigList.push({
insuredLiabilityId: e.id,
sumInsured: Number(e.sumInsured).toFixed(2),
sumInsured: Math.round(Number(e.sumInsured) * 100) / 100,
});
}
}
@ -238,7 +235,7 @@ const submit = async () => {
if (isIllegalNum(param.premiumAmount)) {
return ElMessage.error('请输入合理的保费金额');
} else {
param.premiumAmount = Number(param.premiumAmount).toFixed(2);
param.premiumAmount = Math.round(Number(param.premiumAmount) * 100) / 100;
}
if (!param.formOfPayment) return ElMessage.error('请选择缴纳形式');
if (isIllegalNum(param.insuranceDeadline)) return ElMessage.error('请输入合理的保险期限');

@ -56,6 +56,7 @@ import { useRouter, useRoute } from 'vue-router';
import Detail from './Detail.vue';
import Add from './Add.vue';
import Cookies from 'js-cookie';
import { getIds } from '@/utils/common';
const router = useRouter();
const route = useRoute();
@ -71,10 +72,9 @@ const getList = async (first: any) => {
loading.value = true;
try {
const { data } = await insuranceList({
...getIds(),
pageNum: 1,
pageSize: 1000,
checkPointId: levelId,
projectId,
insuranceName: route.query.name ?? '',
createDateSort: route.query.createDateSort ?? '',
insuranceType: route.query.insuranceType ?? '',

@ -1,5 +1,5 @@
<template>
<div class="info mt-2">
<div class="info my-2">
<h2 class="text-center text-lg">{{info.insuranceName}}</h2>
<p class="text">险种分类{{ info.insuranceType }}</p>
<p v-if="info.minimumAge && info.maximumAge"

@ -105,7 +105,7 @@
<script setup lang="ts">
import { onMounted, ref, reactive, watch } from 'vue';
import { ElMessage } from 'element-plus';
import { pageSizes, pageLayout, toParams, resetParams } from '@/utils/common';
import { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { insuranceList, batchDeletion } from '@/api/insurance';
import Search from '@/components/Search.vue';
import { useRouter, useRoute } from 'vue-router';
@ -116,11 +116,10 @@ const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const params = reactive({
...getIds(),
createDateSort: '',
insuranceName: '',
insuranceType: '',
checkPointId: levelId,
projectId,
});
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);

@ -167,8 +167,7 @@ const getConfig = async () => {
let symbol = cur?.ruleOne.match(/[<>=]+/g);
let had = cur?.ruleOne.match(/[有无]+/g);
let temp = {
checkpointId: levelId,
projectId,
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
isRule: isRule(e.id) ? 1 : 0,
@ -211,7 +210,7 @@ const getDetail = async () => {
// });
// cache.value = !!res.judgmentRuleReqs; //
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
const { data } = await accessStrategyGovernmentBlacklistFind();
info.value = data;
getConfig();
} finally {

@ -6,11 +6,11 @@
max-height="calc(100vh - 230px)"
border>
<el-table-column prop="name"
label="进入黑名单指标"
label="征信黑名单指标"
min-width="220"
align="center">
</el-table-column>
<el-table-column label="本人进黑名单规则"
<el-table-column label="规则"
width="700"
align="center">
<template #default="{ row }">
@ -89,11 +89,26 @@
</div>
</template>
</el-table-column>
<el-table-column label="配偶拒入标准同本人"
<el-table-column label="本人命中是否进黑名单"
min-width="160"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateRejectedStandardIdentity"></el-checkbox>
<el-radio-group v-model="row.hitTheBlacklist">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶命中是否拒入"
min-width="160"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.mateRejectedStandardIdentity">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
</el-table>
@ -110,7 +125,7 @@ import { ElMessage } from 'element-plus';
import { accessStrategyCreditBlacklistFind, accessStrategyCreditBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import { handleId, getIds, whethers } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
@ -147,11 +162,11 @@ const getConfig = async () => {
let symbol = cur?.ruleOne?.match(/[<>=]+/g);
let symbol1 = cur?.ruleTwo?.match(/[<>=]+/g);
let temp = {
checkpointId: levelId,
projectId,
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
mateRejectedStandardIdentity: !!cur?.mateRejectedStandardIdentity,
hitTheBlacklist: cur?.hitTheBlacklist,
mateRejectedStandardIdentity: cur?.mateRejectedStandardIdentity,
symbol: symbol?.length ? symbol[0] : '',
symbol1: symbol1?.length ? symbol1[0] : '',
num: num?.length ? num[0] : '',
@ -168,7 +183,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyCreditBlacklistFind(levelId, projectId);
const { data } = await accessStrategyCreditBlacklistFind();
info.value = data;
getConfig();
} finally {
@ -193,7 +208,6 @@ 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.mateRejectedStandardIdentity = +e.mateRejectedStandardIdentity;
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
e.ruleOne = e.symbol + e.num;
if (isRule(e.stRecordId)) {
@ -226,7 +240,7 @@ const addRecord = async (data: Record<string, any>) => {
});
}
//
e.mateRejectedStandardIdentity && rule.push(handleId(274, e.subjectId, 309, preIds + ',' + e.stRecordId + ',274', 1));
e.mateRejectedStandardIdentity && rule.push(handleId(274, e.subjectId, e.mateRejectedStandardIdentity, preIds + ',' + e.stRecordId + ',274', 1));
});
await addOperation({

@ -239,8 +239,7 @@ const getConfig = async () => {
let symbol = getSymbol(cur?.ruleOne);
let had = getChinese(cur?.ruleOne);
let temp = {
checkpointId: levelId,
projectId,
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
isRule: 0,
@ -328,7 +327,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyBusinessBlacklistFind(levelId, projectId);
const { data } = await accessStrategyBusinessBlacklistFind();
info.value = data;
getConfig();
} finally {
@ -388,8 +387,7 @@ const submit = async () => {
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].symbol + form.value[1].num,
ruleThree: form.value[2].symbol + form.value[2].num,
@ -398,16 +396,14 @@ const submit = async () => {
{
id: info.value.find((n) => n.stRecordId === 320)?.id,
stRecordId: 320,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num + ',' + form.value[14].had,
ruleTwo: form.value[15].num + form.value[15].symbol + ',' + form.value[15].symbol1 + form.value[15].num1 + ',' + form.value[15].had,
},
{
id: info.value.find((n) => n.stRecordId === 322)?.id,
stRecordId: 322,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[18].symbol,
ruleTwo: form.value[20].num + form.value[20].symbol,
ruleThree: form.value[21].num + form.value[21].symbol,

@ -16,8 +16,12 @@
align="center">
<template #default="{ row, $index }">
<span v-if="$index == 4">不存在未结清情况</span>
<el-checkbox v-else
v-model="row.enterBlacklist"></el-checkbox>
<el-radio-group v-else
v-model="row.enterBlacklist">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="进入黑名单规则"
@ -60,7 +64,11 @@
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.outBlacklist"></el-checkbox>
<el-radio-group v-model="row.outBlacklist">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="结清出黑名单规则"
@ -134,7 +142,7 @@ import { accessStrategyInlineBlacklistFind, accessStrategyInlineBlacklistSave }
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRoute } from 'vue-router';
import { handleId, getNum, getChinese, getIds } from '@/utils/common';
import { handleId, getNum, getChinese, getIds, whethers } from '@/utils/common';
import Cookies from 'js-cookie';
const route = useRoute();
@ -151,12 +159,11 @@ const getConfig = async () => {
process.map((e) => {
const cur = info.value.find((n) => n.stRecordId === e.id);
let temp = {
checkpointId: levelId,
projectId,
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
enterBlacklist: !!cur?.enterBlacklist,
outBlacklist: !!cur?.outBlacklist,
enterBlacklist: cur?.enterBlacklist,
outBlacklist: cur?.outBlacklist,
enterRuleOne: cur?.enterRuleOne || '',
enterRuleTwo: cur?.enterRuleTwo || '',
num: getNum(cur?.outRuleOne) || '',
@ -172,7 +179,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyInlineBlacklistFind(levelId, projectId);
const { data } = await accessStrategyInlineBlacklistFind();
info.value = data;
getConfig();
} finally {
@ -216,8 +223,6 @@ 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.enterBlacklist = +e.enterBlacklist;
e.outBlacklist = +e.outBlacklist;
e.outRuleOne = e.num + e.symbol;
e.outRuleTwo = e.num1 + e.symbol1;
});
@ -235,9 +240,9 @@ const addRecord = async (data: Record<string, any>) => {
const rule: Array<Record<string, any>> = [];
data.map((e) => {
e.enterBlacklist && rule.push(handleId(363, '', '', preIds + ',' + e.stRecordId + ',363', ''));
e.enterBlacklist && rule.push(handleId(363, 324, e.enterBlacklist, preIds + ',' + e.stRecordId + ',363', ''));
rule.push(handleId(367, 166, e.enterRuleOne, preIds + ',' + e.stRecordId + ',364,367', 5), handleId(368, 167, e.enterRuleTwo, preIds + ',' + e.stRecordId + ',364,368', 5));
e.outBlacklist && rule.push(handleId(365, '', '', preIds + ',' + e.stRecordId + ',365', ''));
e.outBlacklist && rule.push(handleId(365, 324, e.outBlacklist, preIds + ',' + e.stRecordId + ',365', ''));
rule.push(handleId(367, 166, e.outRuleOne, preIds + ',' + e.stRecordId + ',366,367', 5), handleId(368, 167, e.outRuleTwo, preIds + ',' + e.stRecordId + ',366,368', 5));
});

@ -325,7 +325,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyEnterpriseBlacklistFind(levelId, projectId);
const { data } = await accessStrategyEnterpriseBlacklistFind();
info.value = data;
getConfig();
} finally {
@ -349,8 +349,7 @@ const submit = async () => {
const temp = {
id: info.value.find((n) => n.stRecordId === e.stRecordId)?.id ?? '',
stRecordId: e.stRecordId,
checkpointId: levelId,
projectId,
...getIds(),
};
let rule;
if (!i || i === 13) {

@ -253,7 +253,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyAntiFraudStrategyFind(levelId, projectId);
const { data } = await accessStrategyAntiFraudStrategyFind();
info.value = data;
getConfig();
} finally {
@ -308,8 +308,7 @@ const submit = async () => {
{
id: info.value.find((n) => n.stRecordId === 384)?.id,
stRecordId: 384,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].had,
ruleThree: form.value[2].had,
@ -319,8 +318,7 @@ const submit = async () => {
{
id: info.value.find((n) => n.stRecordId === 385)?.id,
stRecordId: 385,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[5].select,
ruleTwo: form.value[6].select,
ruleThree: form.value[7].select,
@ -334,8 +332,7 @@ const submit = async () => {
{
id: info.value.find((n) => n.stRecordId === 386)?.id,
stRecordId: 386,
checkpointId: levelId,
projectId,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num,
ruleTwo: form.value[15].symbol + form.value[15].num,
ruleThree: form.value[16].symbol + form.value[16].num,

@ -91,8 +91,7 @@ const getConfig = async () => {
let index = 0;
process.map((e) => {
let temp = {
checkpointId: levelId,
projectId,
...getIds(),
name: e.name,
};
result.push(temp);
@ -118,7 +117,7 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyNegativeIndustryStrategyFind(levelId, projectId);
const { data } = await accessStrategyNegativeIndustryStrategyFind();
info.value = data;
getConfig();
} finally {
@ -177,8 +176,7 @@ const submit = async () => {
form.value.map((e, i) => {
if (e.index) {
param.push({
checkpointId: levelId,
projectId,
...getIds(),
stRecordId: e.stRecordId,
id: info.value.find((j) => j.stRecordId === e.stRecordId)?.id ?? '',
myselfEnterprise: e.myselfEnterprise ? 1 : 0,

@ -119,6 +119,7 @@ import { delCredit, listCredit } from '@/api/model';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage } from 'element-plus';
import Cookies from 'js-cookie';
import { getIds } from '@/utils/common';
import Com1 from './150.vue';
import Com2 from './151.vue';
import Com3 from './152.vue';
@ -164,8 +165,7 @@ const getList = async (refresh?: number) => {
list.value = process;
} else if (curTab.value === 'tab2') {
const res = await listCredit({
checkpointId: levelId,
projectId,
...getIds(),
pageNum: 1,
pageSize: 50,
});

@ -616,7 +616,6 @@ const getConfig = async () => {
result1[51].score = detail.value[37]?.dimensionIndexList[0]?.score;
}
list1.value = result1;
console.log('🚀 ~ getConfig ~ result1:', result1);
loading.close();
};
//
@ -848,7 +847,6 @@ const submit = async () => {
}
});
}
console.log(333, list1.value);
// debugger;
await saveCredit({
...form,
@ -876,7 +874,6 @@ const addRecord = async () => {
}
//
if (isSelect(e.answerId1)) {
console.log('🚀 ~ list1.value.forEach ~ answerId1:', e.score, e);
e.score &&
lcRule.push(
handleId(
@ -911,7 +908,6 @@ const addRecord = async () => {
1,
),
);
console.log(111, e, e?.recordChildren[2]?.id);
//
e.percentage &&
lcRule.push(

@ -95,11 +95,7 @@ const getConfig = async () => {
const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try {
const { data } = await detailRick({
checkpointId: levelId,
projectId,
type: 1,
});
const { data } = await detailRick(1);
info.value = data;
getConfig();
} finally {

@ -90,11 +90,7 @@ const getConfig = async () => {
const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try {
const { data } = await detailRick({
checkpointId: levelId,
projectId,
type: 2,
});
const { data } = await detailRick(2);
info.value = data;
if (data.length) {
form.value = data;

@ -83,11 +83,7 @@ const getConfig = async () => {
const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try {
const { data } = await detailRick({
checkpointId: levelId,
projectId,
type: 3,
});
const { data } = await detailRick(3);
info.value = data;
if (data.length) {
form.value = data;

Loading…
Cancel
Save