Merge pull request 'dev-ui' (#1) from dev-ui into dev
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
27
ruoyi-ui/src/api/ccdiEvidence.js
Normal file
27
ruoyi-ui/src/api/ccdiEvidence.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 保存证据
|
||||
export function saveEvidence(data) {
|
||||
return request({
|
||||
url: '/ccdi/evidence',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目证据列表
|
||||
export function listEvidence(params) {
|
||||
return request({
|
||||
url: '/ccdi/evidence/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询证据详情
|
||||
export function getEvidence(evidenceId) {
|
||||
return request({
|
||||
url: '/ccdi/evidence/' + evidenceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/login', '/register', '/prototype/account-library']
|
||||
const whiteList = ['/login', '/register', '/prototype/account-library', '/prototype/staff-recruitment']
|
||||
|
||||
const isWhiteList = (path) => {
|
||||
return whiteList.some(pattern => isPathMatch(pattern, path))
|
||||
|
||||
@@ -85,6 +85,13 @@ export const constantRoutes = [
|
||||
hidden: true,
|
||||
meta: { title: '账户库管理原型', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'prototype/staff-recruitment',
|
||||
component: () => import('@/views/ccdiStaffRecruitment/index'),
|
||||
name: 'StaffRecruitmentPrototype',
|
||||
hidden: true,
|
||||
meta: { title: '招聘信息预览', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'ccdiAccountInfo',
|
||||
component: () => import('@/views/ccdiAccountInfo/index'),
|
||||
|
||||
78
ruoyi-ui/src/utils/ccdiEvidence.js
Normal file
78
ruoyi-ui/src/utils/ccdiEvidence.js
Normal file
@@ -0,0 +1,78 @@
|
||||
import md5 from "@/utils/md5";
|
||||
|
||||
export const FLOW_EVIDENCE_FINGERPRINT_RULE =
|
||||
"md5(leAccountNo+leAccountName+customerAccountNo+customerAccountName+trxDate+displayAmount+userMemo)";
|
||||
|
||||
export const MODEL_EVIDENCE_FINGERPRINT_RULE = "md5(personIdCard+modelCode)";
|
||||
|
||||
export const ASSET_EVIDENCE_FINGERPRINT_RULE =
|
||||
"md5(staffIdCard+totalIncome+totalDebt+totalAsset+riskLevelCode)";
|
||||
|
||||
function normalizeFingerprintValue(value) {
|
||||
if (value === null || value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return String(value).trim();
|
||||
}
|
||||
|
||||
function resolveCounterpartyName(detail) {
|
||||
return detail.customerAccountName || detail.customerName || detail.counterpartyName || "";
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceFingerprintSource(detail = {}) {
|
||||
return [
|
||||
detail.leAccountNo,
|
||||
detail.leAccountName,
|
||||
detail.customerAccountNo,
|
||||
resolveCounterpartyName(detail),
|
||||
detail.trxDate,
|
||||
detail.displayAmount,
|
||||
detail.userMemo,
|
||||
]
|
||||
.map(normalizeFingerprintValue)
|
||||
.join("");
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceFingerprint(detail = {}) {
|
||||
const source = buildFlowEvidenceFingerprintSource(detail);
|
||||
return source ? md5(source) : "";
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceSnapshot(detail = {}) {
|
||||
const evidenceFingerprint = buildFlowEvidenceFingerprint(detail);
|
||||
return {
|
||||
...detail,
|
||||
evidenceFingerprint,
|
||||
evidenceFingerprintRule: FLOW_EVIDENCE_FINGERPRINT_RULE,
|
||||
};
|
||||
}
|
||||
|
||||
export function buildModelEvidenceFingerprint(personIdCard, modelCode) {
|
||||
const idCard = normalizeFingerprintValue(personIdCard);
|
||||
const code = normalizeFingerprintValue(modelCode);
|
||||
return idCard && code ? md5(idCard + code) : "";
|
||||
}
|
||||
|
||||
export function buildAssetEvidenceFingerprint(row = {}) {
|
||||
const idCard = normalizeFingerprintValue(row.staffIdCard);
|
||||
const assetSource = [
|
||||
row.totalIncome,
|
||||
row.totalDebt,
|
||||
row.totalAsset,
|
||||
row.riskLevelCode,
|
||||
]
|
||||
.map(normalizeFingerprintValue)
|
||||
.join("");
|
||||
return idCard && assetSource ? md5(idCard + assetSource) : "";
|
||||
}
|
||||
|
||||
export function buildAssetEvidenceSnapshot(row = {}, detail = {}, summary = {}) {
|
||||
const evidenceFingerprint = buildAssetEvidenceFingerprint(row);
|
||||
return {
|
||||
row,
|
||||
detail,
|
||||
summary,
|
||||
evidenceFingerprint,
|
||||
evidenceFingerprintRule: ASSET_EVIDENCE_FINGERPRINT_RULE,
|
||||
};
|
||||
}
|
||||
161
ruoyi-ui/src/utils/md5.js
Normal file
161
ruoyi-ui/src/utils/md5.js
Normal file
@@ -0,0 +1,161 @@
|
||||
function safeAdd(x, y) {
|
||||
const lsw = (x & 0xffff) + (y & 0xffff);
|
||||
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xffff);
|
||||
}
|
||||
|
||||
function rotateLeft(num, cnt) {
|
||||
return (num << cnt) | (num >>> (32 - cnt));
|
||||
}
|
||||
|
||||
function cmn(q, a, b, x, s, t) {
|
||||
return safeAdd(rotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
||||
}
|
||||
|
||||
function ff(a, b, c, d, x, s, t) {
|
||||
return cmn((b & c) | (~b & d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function gg(a, b, c, d, x, s, t) {
|
||||
return cmn((b & d) | (c & ~d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function hh(a, b, c, d, x, s, t) {
|
||||
return cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
|
||||
function ii(a, b, c, d, x, s, t) {
|
||||
return cmn(c ^ (b | ~d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function wordsToRaw(input) {
|
||||
let output = "";
|
||||
for (let i = 0; i < input.length * 32; i += 8) {
|
||||
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function rawToWords(input) {
|
||||
const output = [];
|
||||
output[(input.length >> 2) - 1] = undefined;
|
||||
for (let i = 0; i < output.length; i++) {
|
||||
output[i] = 0;
|
||||
}
|
||||
for (let i = 0; i < input.length * 8; i += 8) {
|
||||
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function calculate(words, len) {
|
||||
words[len >> 5] |= 0x80 << (len % 32);
|
||||
words[(((len + 64) >>> 9) << 4) + 14] = len;
|
||||
|
||||
let a = 1732584193;
|
||||
let b = -271733879;
|
||||
let c = -1732584194;
|
||||
let d = 271733878;
|
||||
|
||||
for (let i = 0; i < words.length; i += 16) {
|
||||
const olda = a;
|
||||
const oldb = b;
|
||||
const oldc = c;
|
||||
const oldd = d;
|
||||
|
||||
a = ff(a, b, c, d, words[i], 7, -680876936);
|
||||
d = ff(d, a, b, c, words[i + 1], 12, -389564586);
|
||||
c = ff(c, d, a, b, words[i + 2], 17, 606105819);
|
||||
b = ff(b, c, d, a, words[i + 3], 22, -1044525330);
|
||||
a = ff(a, b, c, d, words[i + 4], 7, -176418897);
|
||||
d = ff(d, a, b, c, words[i + 5], 12, 1200080426);
|
||||
c = ff(c, d, a, b, words[i + 6], 17, -1473231341);
|
||||
b = ff(b, c, d, a, words[i + 7], 22, -45705983);
|
||||
a = ff(a, b, c, d, words[i + 8], 7, 1770035416);
|
||||
d = ff(d, a, b, c, words[i + 9], 12, -1958414417);
|
||||
c = ff(c, d, a, b, words[i + 10], 17, -42063);
|
||||
b = ff(b, c, d, a, words[i + 11], 22, -1990404162);
|
||||
a = ff(a, b, c, d, words[i + 12], 7, 1804603682);
|
||||
d = ff(d, a, b, c, words[i + 13], 12, -40341101);
|
||||
c = ff(c, d, a, b, words[i + 14], 17, -1502002290);
|
||||
b = ff(b, c, d, a, words[i + 15], 22, 1236535329);
|
||||
|
||||
a = gg(a, b, c, d, words[i + 1], 5, -165796510);
|
||||
d = gg(d, a, b, c, words[i + 6], 9, -1069501632);
|
||||
c = gg(c, d, a, b, words[i + 11], 14, 643717713);
|
||||
b = gg(b, c, d, a, words[i], 20, -373897302);
|
||||
a = gg(a, b, c, d, words[i + 5], 5, -701558691);
|
||||
d = gg(d, a, b, c, words[i + 10], 9, 38016083);
|
||||
c = gg(c, d, a, b, words[i + 15], 14, -660478335);
|
||||
b = gg(b, c, d, a, words[i + 4], 20, -405537848);
|
||||
a = gg(a, b, c, d, words[i + 9], 5, 568446438);
|
||||
d = gg(d, a, b, c, words[i + 14], 9, -1019803690);
|
||||
c = gg(c, d, a, b, words[i + 3], 14, -187363961);
|
||||
b = gg(b, c, d, a, words[i + 8], 20, 1163531501);
|
||||
a = gg(a, b, c, d, words[i + 13], 5, -1444681467);
|
||||
d = gg(d, a, b, c, words[i + 2], 9, -51403784);
|
||||
c = gg(c, d, a, b, words[i + 7], 14, 1735328473);
|
||||
b = gg(b, c, d, a, words[i + 12], 20, -1926607734);
|
||||
|
||||
a = hh(a, b, c, d, words[i + 5], 4, -378558);
|
||||
d = hh(d, a, b, c, words[i + 8], 11, -2022574463);
|
||||
c = hh(c, d, a, b, words[i + 11], 16, 1839030562);
|
||||
b = hh(b, c, d, a, words[i + 14], 23, -35309556);
|
||||
a = hh(a, b, c, d, words[i + 1], 4, -1530992060);
|
||||
d = hh(d, a, b, c, words[i + 4], 11, 1272893353);
|
||||
c = hh(c, d, a, b, words[i + 7], 16, -155497632);
|
||||
b = hh(b, c, d, a, words[i + 10], 23, -1094730640);
|
||||
a = hh(a, b, c, d, words[i + 13], 4, 681279174);
|
||||
d = hh(d, a, b, c, words[i], 11, -358537222);
|
||||
c = hh(c, d, a, b, words[i + 3], 16, -722521979);
|
||||
b = hh(b, c, d, a, words[i + 6], 23, 76029189);
|
||||
a = hh(a, b, c, d, words[i + 9], 4, -640364487);
|
||||
d = hh(d, a, b, c, words[i + 12], 11, -421815835);
|
||||
c = hh(c, d, a, b, words[i + 15], 16, 530742520);
|
||||
b = hh(b, c, d, a, words[i + 2], 23, -995338651);
|
||||
|
||||
a = ii(a, b, c, d, words[i], 6, -198630844);
|
||||
d = ii(d, a, b, c, words[i + 7], 10, 1126891415);
|
||||
c = ii(c, d, a, b, words[i + 14], 15, -1416354905);
|
||||
b = ii(b, c, d, a, words[i + 5], 21, -57434055);
|
||||
a = ii(a, b, c, d, words[i + 12], 6, 1700485571);
|
||||
d = ii(d, a, b, c, words[i + 3], 10, -1894986606);
|
||||
c = ii(c, d, a, b, words[i + 10], 15, -1051523);
|
||||
b = ii(b, c, d, a, words[i + 1], 21, -2054922799);
|
||||
a = ii(a, b, c, d, words[i + 8], 6, 1873313359);
|
||||
d = ii(d, a, b, c, words[i + 15], 10, -30611744);
|
||||
c = ii(c, d, a, b, words[i + 6], 15, -1560198380);
|
||||
b = ii(b, c, d, a, words[i + 13], 21, 1309151649);
|
||||
a = ii(a, b, c, d, words[i + 4], 6, -145523070);
|
||||
d = ii(d, a, b, c, words[i + 11], 10, -1120210379);
|
||||
c = ii(c, d, a, b, words[i + 2], 15, 718787259);
|
||||
b = ii(b, c, d, a, words[i + 9], 21, -343485551);
|
||||
|
||||
a = safeAdd(a, olda);
|
||||
b = safeAdd(b, oldb);
|
||||
c = safeAdd(c, oldc);
|
||||
d = safeAdd(d, oldd);
|
||||
}
|
||||
|
||||
return [a, b, c, d];
|
||||
}
|
||||
|
||||
function rawToHex(input) {
|
||||
const hex = "0123456789abcdef";
|
||||
let output = "";
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const x = input.charCodeAt(i);
|
||||
output += hex.charAt((x >>> 4) & 0x0f) + hex.charAt(x & 0x0f);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function toUtf8Raw(input) {
|
||||
return unescape(encodeURIComponent(input));
|
||||
}
|
||||
|
||||
export default function md5(input) {
|
||||
const value = input === null || input === undefined ? "" : String(input);
|
||||
const raw = toUtf8Raw(value);
|
||||
return rawToHex(wordsToRaw(calculate(rawToWords(raw), raw.length * 8)));
|
||||
}
|
||||
@@ -283,10 +283,23 @@
|
||||
:visible.sync="detailVisible"
|
||||
append-to-body
|
||||
custom-class="detail-dialog"
|
||||
title="流水详情"
|
||||
width="980px"
|
||||
@close="closeDetailDialog"
|
||||
>
|
||||
<template slot="title">
|
||||
<div class="detail-dialog-title">
|
||||
<span>流水详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="detailLoading || !buildFlowEvidenceFingerprint(detailData)"
|
||||
@click="handleAddEvidence"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div v-loading="detailLoading" class="detail-dialog-body">
|
||||
<div class="detail-overview-grid">
|
||||
<div class="detail-field">
|
||||
@@ -394,6 +407,7 @@ import {
|
||||
getBankStatementOptions,
|
||||
getBankStatementDetail,
|
||||
} from "@/api/ccdiProjectBankStatement";
|
||||
import { buildFlowEvidenceFingerprint, buildFlowEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
|
||||
const TAB_MAP = {
|
||||
all: "all",
|
||||
@@ -518,6 +532,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildFlowEvidenceFingerprint,
|
||||
async getList() {
|
||||
this.syncProjectId();
|
||||
if (!this.queryParams.projectId) {
|
||||
@@ -638,6 +653,29 @@ export default {
|
||||
this.detailLoading = false;
|
||||
this.detailData = createEmptyDetailData();
|
||||
},
|
||||
handleAddEvidence() {
|
||||
const detail = this.detailData || {};
|
||||
const sourceRecordId = buildFlowEvidenceFingerprint(detail);
|
||||
const amountText = this.formatSignedAmount(detail.displayAmount);
|
||||
const counterparty = this.formatCounterpartyName(detail);
|
||||
const hitTagText = Array.isArray(detail.hitTags) && detail.hitTags.length
|
||||
? `,命中${detail.hitTags.map((tag) => tag.ruleName).filter(Boolean).join("、")}标签`
|
||||
: "";
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "FLOW",
|
||||
relatedPersonName: this.resolveFlowRelatedPerson(detail),
|
||||
relatedPersonId: detail.cretNo || "",
|
||||
evidenceTitle: `${this.resolveFlowRelatedPerson(detail)} / ${this.formatField(detail.leAccountNo)}`,
|
||||
evidenceSummary: `${this.formatField(detail.trxDate)},${this.resolveFlowRelatedPerson(detail)}账户与${counterparty}发生交易,金额${amountText}${hitTagText}。`,
|
||||
sourceType: "BANK_STATEMENT",
|
||||
sourceRecordId,
|
||||
sourcePage: "流水详情",
|
||||
snapshotJson: JSON.stringify(buildFlowEvidenceSnapshot(detail)),
|
||||
});
|
||||
},
|
||||
resolveFlowRelatedPerson(detail) {
|
||||
return this.formatField(detail.leAccountName) === "-" ? "关联人员" : this.formatField(detail.leAccountName);
|
||||
},
|
||||
handleExport() {
|
||||
if (this.total === 0) {
|
||||
return;
|
||||
@@ -751,6 +789,26 @@ export default {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.detail-dialog-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.shell-sidebar,
|
||||
.shell-main {
|
||||
border: 1px solid #ebeef5;
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
append-to-body
|
||||
title="确认为证据"
|
||||
width="560px"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form label-position="top" class="evidence-confirm-form">
|
||||
<el-form-item label="证据类型">
|
||||
<el-input :value="typeLabel" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联人员">
|
||||
<el-input :value="payload.relatedPersonName || '-'" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="证据摘要">
|
||||
<el-input
|
||||
:value="payload.evidenceSummary || '-'"
|
||||
readonly
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认理由/备注" required>
|
||||
<el-input
|
||||
v-model.trim="confirmReason"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
placeholder="请填写为什么将该详情确认为证据"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="handleSubmit">
|
||||
确认入库
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveEvidence } from "@/api/ccdiEvidence";
|
||||
|
||||
const TYPE_LABEL_MAP = {
|
||||
FLOW: "流水证据",
|
||||
MODEL: "模型证据",
|
||||
ASSET: "资产证据",
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "EvidenceConfirmDialog",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
payload: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
confirmReason: "",
|
||||
submitting: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible;
|
||||
},
|
||||
set(value) {
|
||||
if (!value) {
|
||||
this.handleClose();
|
||||
}
|
||||
},
|
||||
},
|
||||
typeLabel() {
|
||||
return TYPE_LABEL_MAP[this.payload.evidenceType] || this.payload.evidenceType || "-";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (value) {
|
||||
this.confirmReason = "";
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
if (this.submitting) {
|
||||
return;
|
||||
}
|
||||
this.$emit("update:visible", false);
|
||||
},
|
||||
async handleSubmit() {
|
||||
if (!this.confirmReason) {
|
||||
this.$message.warning("请填写确认理由/备注");
|
||||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
try {
|
||||
const data = {
|
||||
...this.payload,
|
||||
confirmReason: this.confirmReason,
|
||||
};
|
||||
const response = await saveEvidence(data);
|
||||
this.$message.success("证据入库成功");
|
||||
this.$emit("saved", response.data);
|
||||
this.$emit("update:visible", false);
|
||||
} catch (error) {
|
||||
this.$message.error("证据入库失败");
|
||||
console.error("证据入库失败", error);
|
||||
} finally {
|
||||
this.submitting = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.evidence-confirm-form {
|
||||
:deep(.el-form-item__label) {
|
||||
padding-bottom: 6px;
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="drawerVisible"
|
||||
append-to-body
|
||||
title="证据线索"
|
||||
size="420px"
|
||||
custom-class="evidence-drawer"
|
||||
@open="loadEvidence"
|
||||
>
|
||||
<div class="evidence-drawer-body">
|
||||
<el-input
|
||||
v-model.trim="keyword"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
placeholder="搜索姓名、账号、证据编号"
|
||||
@keyup.enter.native="loadEvidence"
|
||||
@clear="loadEvidence"
|
||||
>
|
||||
<el-button slot="append" @click="loadEvidence">查询</el-button>
|
||||
</el-input>
|
||||
|
||||
<div class="evidence-list" v-loading="loading">
|
||||
<el-empty
|
||||
v-if="!loading && evidenceList.length === 0"
|
||||
:image-size="80"
|
||||
description="暂无证据线索"
|
||||
/>
|
||||
<article
|
||||
v-for="item in evidenceList"
|
||||
:key="item.evidenceId"
|
||||
class="evidence-card"
|
||||
>
|
||||
<div class="evidence-card__header">
|
||||
<span class="evidence-code">EV-{{ formatEvidenceId(item.evidenceId) }} {{ formatType(item.evidenceType) }}</span>
|
||||
<el-tag size="mini" type="danger" effect="plain">确认可疑</el-tag>
|
||||
</div>
|
||||
<div class="evidence-title">{{ item.evidenceTitle }}</div>
|
||||
<div class="evidence-summary">{{ item.evidenceSummary }}</div>
|
||||
<div class="evidence-meta">
|
||||
来源:{{ item.sourcePage || formatSource(item.sourceType) }};确认人:{{ item.confirmBy || "-" }}
|
||||
</div>
|
||||
<div v-if="item.confirmReason" class="evidence-meta">
|
||||
备注:{{ item.confirmReason }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEvidence } from "@/api/ccdiEvidence";
|
||||
|
||||
const TYPE_LABEL_MAP = {
|
||||
FLOW: "流水证据",
|
||||
MODEL: "模型证据",
|
||||
ASSET: "资产证据",
|
||||
};
|
||||
|
||||
const SOURCE_LABEL_MAP = {
|
||||
BANK_STATEMENT: "流水详情",
|
||||
MODEL_DETAIL: "模型详情",
|
||||
ASSET_DETAIL: "资产详情",
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "EvidenceDrawer",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
projectId: {
|
||||
type: [String, Number],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
loading: false,
|
||||
evidenceList: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
drawerVisible: {
|
||||
get() {
|
||||
return this.visible;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:visible", value);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async loadEvidence() {
|
||||
if (!this.projectId) {
|
||||
this.evidenceList = [];
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
try {
|
||||
const response = await listEvidence({
|
||||
projectId: this.projectId,
|
||||
keyword: this.keyword,
|
||||
});
|
||||
this.evidenceList = response.data || [];
|
||||
} catch (error) {
|
||||
this.evidenceList = [];
|
||||
this.$message.error("加载证据线索失败");
|
||||
console.error("加载证据线索失败", error);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
formatEvidenceId(value) {
|
||||
return String(value || "").padStart(3, "0");
|
||||
},
|
||||
formatType(type) {
|
||||
return TYPE_LABEL_MAP[type] || type || "证据";
|
||||
},
|
||||
formatSource(sourceType) {
|
||||
return SOURCE_LABEL_MAP[sourceType] || sourceType || "-";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.evidence-drawer-body {
|
||||
padding: 0 16px 16px;
|
||||
}
|
||||
|
||||
.evidence-list {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.evidence-card {
|
||||
padding: 14px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #e5eaf2;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.evidence-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-code {
|
||||
color: #2474e8;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.evidence-title {
|
||||
margin-top: 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.evidence-summary {
|
||||
margin-top: 8px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: #475467;
|
||||
}
|
||||
|
||||
.evidence-meta {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #8a96a8;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
@@ -21,10 +21,24 @@
|
||||
</template>
|
||||
<el-table-column type="expand" width="1">
|
||||
<template slot-scope="scope">
|
||||
<family-asset-liability-detail
|
||||
:detail="detailCache[scope.row.staffIdCard]"
|
||||
:loading="Boolean(detailLoadingMap[scope.row.staffIdCard])"
|
||||
/>
|
||||
<div class="family-detail-wrapper">
|
||||
<div class="family-detail-toolbar">
|
||||
<span class="family-detail-title">资产详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="Boolean(detailLoadingMap[scope.row.staffIdCard]) || !buildAssetEvidenceFingerprint(scope.row)"
|
||||
@click="handleAddEvidence(scope.row)"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
<family-asset-liability-detail
|
||||
:detail="detailCache[scope.row.staffIdCard]"
|
||||
:loading="Boolean(detailLoadingMap[scope.row.staffIdCard])"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
@@ -67,6 +81,7 @@
|
||||
|
||||
<script>
|
||||
import { getFamilyAssetLiabilityDetail } from "@/api/ccdi/projectSpecialCheck";
|
||||
import { buildAssetEvidenceFingerprint, buildAssetEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
import FamilyAssetLiabilityDetail from "./FamilyAssetLiabilityDetail";
|
||||
|
||||
export default {
|
||||
@@ -114,6 +129,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildAssetEvidenceFingerprint,
|
||||
resolveRiskTagType(riskLevelCode) {
|
||||
const riskTagTypeMap = {
|
||||
NORMAL: "success",
|
||||
@@ -164,6 +180,30 @@ export default {
|
||||
this.detailCache = {};
|
||||
this.detailLoadingMap = {};
|
||||
},
|
||||
handleAddEvidence(row) {
|
||||
if (!row || !row.staffIdCard) {
|
||||
return;
|
||||
}
|
||||
const sourceRecordId = buildAssetEvidenceFingerprint(row);
|
||||
if (!sourceRecordId) {
|
||||
this.$message.warning("缺少人员身份证或资产字段,暂不能加入证据库");
|
||||
return;
|
||||
}
|
||||
const detail = this.detailCache[row.staffIdCard] || {};
|
||||
const summary = detail.summary || {};
|
||||
const evidenceSummary = `${row.staffName}家庭资产负债核查:家庭总年收入${this.formatAmount(row.totalIncome)},家庭总负债${this.formatAmount(row.totalDebt)},家庭总资产${this.formatAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "ASSET",
|
||||
relatedPersonName: row.staffName || "关联人员",
|
||||
relatedPersonId: row.staffIdCard || "",
|
||||
evidenceTitle: `${row.staffName || "关联人员"} / 家庭资产负债核查`,
|
||||
evidenceSummary,
|
||||
sourceType: "ASSET_DETAIL",
|
||||
sourceRecordId,
|
||||
sourcePage: "资产详情",
|
||||
snapshotJson: JSON.stringify(buildAssetEvidenceSnapshot(row, detail, summary)),
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -204,6 +244,39 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.family-detail-wrapper {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.family-detail-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.family-detail-title {
|
||||
margin-right: auto;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.family-table th) {
|
||||
background: #f8fafc;
|
||||
color: #64748b;
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
@selection-change="handleRiskModelSelectionChange"
|
||||
@view-project-analysis="handleRiskModelProjectAnalysis"
|
||||
/>
|
||||
<risk-detail-section :section-data="currentData.riskDetails" />
|
||||
<risk-detail-section
|
||||
:section-data="currentData.riskDetails"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</div>
|
||||
<project-analysis-dialog
|
||||
:visible.sync="projectAnalysisDialogVisible"
|
||||
@@ -43,6 +46,7 @@
|
||||
:model-summary="projectAnalysisModelSummary"
|
||||
:project-name="projectInfo.projectName"
|
||||
@close="handleProjectAnalysisDialogClose"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -75,15 +75,28 @@
|
||||
<div v-else-if='group.groupType === "OBJECT"' class="object-card-grid">
|
||||
<article
|
||||
v-for="(item, index) in group.records || []"
|
||||
:key="`${item.title || index}-object`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || 'object'}-${index}`"
|
||||
class="object-card"
|
||||
>
|
||||
<div class="object-card__title">{{ item.title || "-" }}</div>
|
||||
<div class="object-card__subtitle">{{ item.subtitle || "-" }}</div>
|
||||
<div class="object-card__header">
|
||||
<div>
|
||||
<div class="object-card__title">{{ item.title || "-" }}</div>
|
||||
<div class="object-card__subtitle">{{ item.subtitle || "-" }}</div>
|
||||
</div>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="!buildModelEvidenceFingerprint(resolvePersonIdCard(), item.modelCode)"
|
||||
@click="handleAddModelEvidence(item, group)"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="item.riskTags && item.riskTags.length" class="tag-list">
|
||||
<el-tag
|
||||
v-for="(tag, tagIndex) in item.riskTags"
|
||||
:key="`${item.title || index}-risk-${tagIndex}`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || index}-risk-${tagIndex}`"
|
||||
size="mini"
|
||||
effect="plain"
|
||||
>
|
||||
@@ -97,7 +110,7 @@
|
||||
<p class="object-card__summary">{{ item.summary || "-" }}</p>
|
||||
<div
|
||||
v-for="(field, fieldIndex) in item.extraFields || []"
|
||||
:key="`${item.title || index}-field-${fieldIndex}`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || index}-field-${fieldIndex}`"
|
||||
class="summary-row"
|
||||
>
|
||||
<span class="summary-row__label">{{ field.label }}</span>
|
||||
@@ -113,6 +126,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { buildModelEvidenceFingerprint, MODEL_EVIDENCE_FINGERPRINT_RULE } from "@/utils/ccdiEvidence";
|
||||
|
||||
export default {
|
||||
name: "ProjectAnalysisAbnormalTab",
|
||||
props: {
|
||||
@@ -122,6 +137,14 @@ export default {
|
||||
groups: [],
|
||||
}),
|
||||
},
|
||||
person: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
projectId: {
|
||||
type: [String, Number],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -150,6 +173,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildModelEvidenceFingerprint,
|
||||
resolveGroupKey(group, index = 0) {
|
||||
return group.groupCode || group.groupName || `BANK_STATEMENT_${index}`;
|
||||
},
|
||||
@@ -170,6 +194,48 @@ export default {
|
||||
const groupKey = this.resolveGroupKey(group);
|
||||
this.$set(this.statementPageMap, groupKey, page);
|
||||
},
|
||||
handleAddModelEvidence(item, group) {
|
||||
const safeItem = item || {};
|
||||
const safeGroup = group || {};
|
||||
const relatedPersonName = this.resolveRelatedPersonName(safeItem);
|
||||
const personIdCard = this.resolvePersonIdCard();
|
||||
const sourceRecordId = buildModelEvidenceFingerprint(personIdCard, safeItem.modelCode);
|
||||
if (!sourceRecordId) {
|
||||
this.$message.warning("缺少人员身份证或模型编码,暂不能加入证据库");
|
||||
return;
|
||||
}
|
||||
const riskTags = Array.isArray(safeItem.riskTags) ? safeItem.riskTags.join("、") : "";
|
||||
const reason = safeItem.reasonDetail || safeItem.summary || "-";
|
||||
const payload = {
|
||||
evidenceType: "MODEL",
|
||||
relatedPersonName,
|
||||
relatedPersonId: personIdCard,
|
||||
evidenceTitle: `${relatedPersonName} / ${safeItem.title || safeGroup.groupName || "模型异常"}`,
|
||||
evidenceSummary: `${safeItem.title || safeGroup.groupName || "模型异常"}:${reason}`,
|
||||
sourceType: "MODEL_DETAIL",
|
||||
sourceRecordId,
|
||||
sourcePage: "模型详情",
|
||||
snapshotJson: JSON.stringify({
|
||||
group: safeGroup,
|
||||
item: safeItem,
|
||||
person: this.person,
|
||||
riskTags,
|
||||
evidenceFingerprint: sourceRecordId,
|
||||
evidenceFingerprintRule: MODEL_EVIDENCE_FINGERPRINT_RULE,
|
||||
}),
|
||||
};
|
||||
this.$emit("evidence-confirm", payload);
|
||||
this.$root.$emit("ccdi-evidence-confirm", payload);
|
||||
},
|
||||
resolvePersonIdCard() {
|
||||
return (this.person && (this.person.idNo || this.person.staffIdCard)) || "";
|
||||
},
|
||||
resolveRelatedPersonName(item) {
|
||||
if (this.person && (this.person.name || this.person.staffName)) {
|
||||
return this.person.name || this.person.staffName;
|
||||
}
|
||||
return item.title || "关联人员";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -252,12 +318,35 @@ export default {
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.object-card__header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.object-card__title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
flex: 0 0 auto;
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.object-card__subtitle {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -46,7 +46,12 @@
|
||||
</el-alert>
|
||||
<el-tabs v-model="activeTab" class="project-analysis-tabs" stretch>
|
||||
<el-tab-pane label="异常明细" name="abnormalDetail">
|
||||
<project-analysis-abnormal-tab :detail-data="dialogData.abnormalDetail" />
|
||||
<project-analysis-abnormal-tab
|
||||
:detail-data="dialogData.abnormalDetail"
|
||||
:person="person"
|
||||
:project-id="projectId"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="资产分析" name="assetAnalysis">
|
||||
<project-analysis-placeholder-tab :tab-data="getTabData('assetAnalysis')" />
|
||||
|
||||
@@ -220,10 +220,23 @@
|
||||
:visible.sync="detailVisible"
|
||||
append-to-body
|
||||
custom-class="detail-dialog"
|
||||
title="流水详情"
|
||||
width="980px"
|
||||
@close="closeDetailDialog"
|
||||
>
|
||||
<template slot="title">
|
||||
<div class="detail-dialog-title">
|
||||
<span>流水详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="detailLoading || !buildFlowEvidenceFingerprint(detailData)"
|
||||
@click="handleAddEvidence"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div v-loading="detailLoading" class="detail-dialog-body">
|
||||
<div class="detail-overview-grid">
|
||||
<div class="detail-field">
|
||||
@@ -332,6 +345,7 @@ import {
|
||||
getOverviewSuspiciousTransactions,
|
||||
} from "@/api/ccdi/projectOverview";
|
||||
import { getBankStatementDetail } from "@/api/ccdiProjectBankStatement";
|
||||
import { buildFlowEvidenceFingerprint, buildFlowEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
|
||||
const SUSPICIOUS_TYPE_OPTIONS = [
|
||||
{ value: "ALL", label: "全部可疑人员类型" },
|
||||
@@ -452,6 +466,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildFlowEvidenceFingerprint,
|
||||
async handleSuspiciousTypeChange(command) {
|
||||
this.currentSuspiciousType = command;
|
||||
this.suspiciousPageNum = 1;
|
||||
@@ -646,6 +661,31 @@ export default {
|
||||
this.detailLoading = false;
|
||||
this.detailData = createEmptyDetailData();
|
||||
},
|
||||
handleAddEvidence() {
|
||||
const detail = this.detailData || {};
|
||||
const sourceRecordId = buildFlowEvidenceFingerprint(detail);
|
||||
const amountText = this.formatSignedAmount(detail.displayAmount);
|
||||
const counterparty = this.formatCounterpartyName(detail);
|
||||
const relatedPersonName = this.resolveFlowRelatedPerson(detail);
|
||||
const hitTagText = Array.isArray(detail.hitTags) && detail.hitTags.length
|
||||
? `,命中${detail.hitTags.map((tag) => tag.ruleName).filter(Boolean).join("、")}标签`
|
||||
: "";
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "FLOW",
|
||||
relatedPersonName,
|
||||
relatedPersonId: detail.cretNo || "",
|
||||
evidenceTitle: `${relatedPersonName} / ${this.formatField(detail.leAccountNo)}`,
|
||||
evidenceSummary: `${this.formatField(detail.trxDate)},${relatedPersonName}账户与${counterparty}发生交易,金额${amountText}${hitTagText}。`,
|
||||
sourceType: "BANK_STATEMENT",
|
||||
sourceRecordId,
|
||||
sourcePage: "流水详情",
|
||||
snapshotJson: JSON.stringify(buildFlowEvidenceSnapshot(detail)),
|
||||
});
|
||||
},
|
||||
resolveFlowRelatedPerson(detail) {
|
||||
const value = this.formatField(detail.leAccountName);
|
||||
return value === "-" ? "关联人员" : value;
|
||||
},
|
||||
handleRiskDetailExport() {
|
||||
if (!this.projectId) {
|
||||
return;
|
||||
@@ -1020,6 +1060,26 @@ export default {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.detail-dialog-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.detail-dialog) {
|
||||
border-radius: 8px;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:project-id="projectId"
|
||||
:title="sectionTitle"
|
||||
:subtitle="sectionSubtitle"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
|
||||
<section class="graph-placeholder-card">
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<el-button
|
||||
class="evidence-entry-btn"
|
||||
size="mini"
|
||||
plain
|
||||
icon="el-icon-collection-tag"
|
||||
@click="evidenceDrawerVisible = true"
|
||||
>
|
||||
证据线索
|
||||
</el-button>
|
||||
<el-menu
|
||||
:default-active="activeTab"
|
||||
mode="horizontal"
|
||||
@@ -59,6 +68,18 @@
|
||||
@name-selected="handleNameSelected"
|
||||
@generate-report="handleGenerateReport"
|
||||
@fetch-bank-info="handleFetchBankInfo"
|
||||
@evidence-confirm="handleEvidenceConfirm"
|
||||
/>
|
||||
|
||||
<evidence-confirm-dialog
|
||||
:visible.sync="evidenceConfirmVisible"
|
||||
:payload="evidencePayload"
|
||||
@saved="handleEvidenceSaved"
|
||||
/>
|
||||
<evidence-drawer
|
||||
ref="evidenceDrawer"
|
||||
:visible.sync="evidenceDrawerVisible"
|
||||
:project-id="projectId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -69,6 +90,8 @@ import ParamConfig from "./components/detail/ParamConfig";
|
||||
import PreliminaryCheck from "./components/detail/PreliminaryCheck";
|
||||
import SpecialCheck from "./components/detail/SpecialCheck";
|
||||
import DetailQuery from "./components/detail/DetailQuery";
|
||||
import EvidenceConfirmDialog from "./components/detail/EvidenceConfirmDialog";
|
||||
import EvidenceDrawer from "./components/detail/EvidenceDrawer";
|
||||
import { getProject } from "@/api/ccdiProject";
|
||||
|
||||
export default {
|
||||
@@ -79,6 +102,8 @@ export default {
|
||||
PreliminaryCheck,
|
||||
SpecialCheck,
|
||||
DetailQuery,
|
||||
EvidenceConfirmDialog,
|
||||
EvidenceDrawer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -102,6 +127,9 @@ export default {
|
||||
warningThreshold: 60,
|
||||
projectStatus: "0",
|
||||
},
|
||||
evidenceConfirmVisible: false,
|
||||
evidenceDrawerVisible: false,
|
||||
evidencePayload: {},
|
||||
projectStatusPollingTimer: null,
|
||||
projectStatusPollingInterval: 1000,
|
||||
projectStatusPollingLoading: false,
|
||||
@@ -139,8 +167,10 @@ export default {
|
||||
// 初始化页面数据
|
||||
this.initActiveTabFromRoute();
|
||||
this.initPageData();
|
||||
this.$root.$on("ccdi-evidence-confirm", this.handleEvidenceConfirm);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$root.$off("ccdi-evidence-confirm", this.handleEvidenceConfirm);
|
||||
this.stopProjectStatusPolling();
|
||||
},
|
||||
methods: {
|
||||
@@ -400,6 +430,21 @@ export default {
|
||||
handleRefreshProject() {
|
||||
this.initPageData();
|
||||
},
|
||||
handleEvidenceConfirm(payload) {
|
||||
this.evidencePayload = {
|
||||
projectId: this.projectId,
|
||||
...(payload || {}),
|
||||
};
|
||||
this.evidenceConfirmVisible = true;
|
||||
},
|
||||
handleEvidenceSaved() {
|
||||
this.evidenceDrawerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.evidenceDrawer) {
|
||||
this.$refs.evidenceDrawer.loadEvidence();
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出报告 */
|
||||
handleExport() {
|
||||
console.log("导出报告");
|
||||
@@ -496,6 +541,21 @@ export default {
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.evidence-entry-btn {
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: var(--ccdi-primary);
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
// 移除默认背景色和边框
|
||||
|
||||
@@ -44,6 +44,16 @@
|
||||
<el-option label="放弃" value="放弃" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="招聘类型" prop="recruitType">
|
||||
<el-select v-model="queryParams.recruitType" placeholder="请选择招聘类型" clearable style="width: 240px">
|
||||
<el-option
|
||||
v-for="item in recruitTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -53,6 +63,15 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
@@ -63,6 +82,15 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
>导入</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
@@ -73,6 +101,34 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handleWorkImport"
|
||||
>导入工作经历</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handleWorkImport"
|
||||
v-hasPermi="['ccdi:staffRecruitment:import']"
|
||||
>导入工作经历</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
@@ -100,13 +156,10 @@
|
||||
|
||||
<el-table v-loading="loading" :data="recruitmentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="招聘项目编号" align="center" prop="recruitId" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘项目名称" align="center" prop="recruitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘记录编号" align="center" prop="recruitId" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘项目名称" align="center" prop="recruitName" min-width="220" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位名称" align="center" prop="posName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="候选人姓名" align="center" prop="candName" width="120"/>
|
||||
<el-table-column label="证件号码" align="center" prop="candId" width="180"/>
|
||||
<el-table-column label="毕业院校" align="center" prop="candSchool" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="专业" align="center" prop="candMajor" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="录用情况" align="center" prop="admitStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.admitStatus === '录用'" type="success" size="small">录用</el-tag>
|
||||
@@ -114,14 +167,34 @@
|
||||
<el-tag v-else type="warning" size="small">放弃</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="学历 / 毕业学校" align="center" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
<span>{{ formatEducationSchool(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="招聘类型" align="center" prop="recruitType" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.recruitType === 'SOCIAL' ? 'success' : 'info'" size="small">
|
||||
{{ formatRecruitType(scope.row.recruitType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="历史工作经历" align="center" prop="workExperienceCount" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ formatWorkExperienceCount(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@@ -129,6 +202,14 @@
|
||||
v-hasPermi="['ccdi:staffRecruitment:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@@ -136,6 +217,14 @@
|
||||
v-hasPermi="['ccdi:staffRecruitment:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@@ -157,11 +246,11 @@
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-divider content-position="left">招聘项目信息</el-divider>
|
||||
<el-divider content-position="left">招聘岗位信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="招聘项目编号" prop="recruitId">
|
||||
<el-input v-model="form.recruitId" placeholder="请输入招聘项目编号" maxlength="32" :disabled="!isAdd" />
|
||||
<el-form-item label="招聘记录编号" prop="recruitId">
|
||||
<el-input v-model="form.recruitId" placeholder="请输入招聘记录编号" maxlength="32" :disabled="!isAdd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -171,7 +260,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">职位信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职位名称" prop="posName">
|
||||
@@ -188,18 +276,43 @@
|
||||
<el-input v-model="form.posDesc" type="textarea" :rows="3" placeholder="请输入职位描述" />
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">候选人信息</el-divider>
|
||||
<el-divider content-position="left">录用情况</el-divider>
|
||||
<el-form-item label="录用情况" prop="admitStatus">
|
||||
<el-radio-group v-model="form.admitStatus">
|
||||
<el-radio label="录用">录用</el-radio>
|
||||
<el-radio label="未录用">未录用</el-radio>
|
||||
<el-radio label="放弃">放弃</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">候选人情况</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="候选人姓名" prop="candName">
|
||||
<el-input v-model="form.candName" placeholder="请输入候选人姓名" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="招聘类型" prop="recruitType">
|
||||
<el-radio-group v-model="form.recruitType">
|
||||
<el-radio
|
||||
v-for="item in recruitTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学历" prop="candEdu">
|
||||
<el-input v-model="form.candEdu" placeholder="请输入学历" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12"></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
@@ -226,15 +339,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">录用信息</el-divider>
|
||||
<el-form-item label="录用情况" prop="admitStatus">
|
||||
<el-radio-group v-model="form.admitStatus">
|
||||
<el-radio label="录用">录用</el-radio>
|
||||
<el-radio label="未录用">未录用</el-radio>
|
||||
<el-radio label="放弃">放弃</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">面试官信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
@@ -270,30 +374,16 @@
|
||||
<!-- 详情对话框 -->
|
||||
<el-dialog title="招聘信息详情" :visible.sync="detailOpen" width="900px" append-to-body>
|
||||
<div class="detail-container">
|
||||
<el-divider content-position="left">招聘项目信息</el-divider>
|
||||
<el-divider content-position="left">招聘岗位信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="招聘项目编号">{{ recruitmentDetail.recruitId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘记录编号">{{ recruitmentDetail.recruitId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘项目名称">{{ recruitmentDetail.recruitName || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">职位信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="职位名称">{{ recruitmentDetail.posName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职位类别">{{ recruitmentDetail.posCategory || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职位描述" :span="2">{{ recruitmentDetail.posDesc || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">候选人信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="候选人姓名">{{ recruitmentDetail.candName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">{{ recruitmentDetail.candEdu || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ recruitmentDetail.candId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业年月">{{ recruitmentDetail.candGrad || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业院校">{{ recruitmentDetail.candSchool || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业">{{ recruitmentDetail.candMajor || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">录用信息</el-divider>
|
||||
<el-divider content-position="left">录用情况</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="录用情况">
|
||||
<el-tag v-if="recruitmentDetail.admitStatus === '录用'" type="success" size="small">录用</el-tag>
|
||||
@@ -302,18 +392,48 @@
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">候选人情况</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="候选人姓名">{{ recruitmentDetail.candName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘类型">{{ formatRecruitType(recruitmentDetail.recruitType) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">{{ recruitmentDetail.candEdu || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ recruitmentDetail.candId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业年月">{{ recruitmentDetail.candGrad || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业院校">{{ recruitmentDetail.candSchool || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业">{{ recruitmentDetail.candMajor || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-if="isSocialRecruitment(recruitmentDetail)">
|
||||
<el-divider content-position="left">候选人历史工作经历</el-divider>
|
||||
<el-table
|
||||
v-if="recruitmentDetail.workExperienceList && recruitmentDetail.workExperienceList.length"
|
||||
:data="recruitmentDetail.workExperienceList"
|
||||
border
|
||||
>
|
||||
<el-table-column label="序号" align="center" prop="sortOrder" width="80" />
|
||||
<el-table-column label="工作单位" align="center" prop="companyName" min-width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="岗位" align="center" prop="positionName" min-width="140" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="任职时间" align="center" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ getEmploymentPeriod(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职原因" align="center" prop="departureReason" min-width="220" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<el-empty
|
||||
v-else
|
||||
description="暂无历史工作经历"
|
||||
:image-size="72"
|
||||
class="work-experience-empty"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<el-divider content-position="left">面试官信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="面试官1">{{ recruitmentDetail.interviewerName1 || '-' }} ({{ recruitmentDetail.interviewerId1 || '-' }})</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2">{{ recruitmentDetail.interviewerName2 || '-' }} ({{ recruitmentDetail.interviewerId2 || '-' }})</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">
|
||||
{{ recruitmentDetail.createTime ? parseTime(recruitmentDetail.createTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人">{{ recruitmentDetail.createdBy || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">
|
||||
{{ recruitmentDetail.updateTime ? parseTime(recruitmentDetail.updateTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="更新人">{{ recruitmentDetail.updatedBy || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官1姓名">{{ recruitmentDetail.interviewerName1 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官1工号">{{ recruitmentDetail.interviewerId1 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2姓名">{{ recruitmentDetail.interviewerName2 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2工号">{{ recruitmentDetail.interviewerId2 || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -341,7 +461,7 @@
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<span>仅允许导入"xls"或"xlsx"格式文件。</span>
|
||||
<span>{{ upload.tip }}</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -374,11 +494,33 @@
|
||||
/>
|
||||
|
||||
<el-table :data="failureList" v-loading="failureLoading">
|
||||
<el-table-column label="招聘项目编号" prop="recruitId" align="center" width="150" />
|
||||
<el-table-column label="招聘记录编号" prop="recruitId" align="center" width="150" />
|
||||
<el-table-column label="招聘项目名称" prop="recruitName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位名称" prop="posName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="候选人姓名" prop="candName" align="center" width="120"/>
|
||||
<el-table-column label="证件号码" prop="candId" align="center" width="180"/>
|
||||
<el-table-column
|
||||
v-if="currentImportType !== 'work'"
|
||||
label="证件号码"
|
||||
prop="candId"
|
||||
align="center"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="currentImportType === 'work'"
|
||||
label="工作单位"
|
||||
prop="companyName"
|
||||
align="center"
|
||||
min-width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="currentImportType === 'work'"
|
||||
label="岗位"
|
||||
prop="positionName"
|
||||
align="center"
|
||||
min-width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="失败原因" prop="errorMessage" align="center" min-width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
@@ -416,6 +558,109 @@ import ImportResultDialog from "@/components/ImportResultDialog.vue";
|
||||
const idCardPattern = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
|
||||
// 毕业年月校验正则 (YYYYMM)
|
||||
const gradPattern = /^((19|20)\d{2})(0[1-9]|1[0-2])$/;
|
||||
const previewRecruitmentList = [
|
||||
{
|
||||
recruitId: "RC2025001205",
|
||||
recruitName: "2024年社会招聘-技术部",
|
||||
posName: "Java开发工程师",
|
||||
posCategory: "技术研发",
|
||||
posDesc: "负责核心业务系统设计、开发与维护。",
|
||||
candName: "杨丽思思",
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: "本科",
|
||||
candId: "330101199403150021",
|
||||
candSchool: "四川大学",
|
||||
candMajor: "法学",
|
||||
candGrad: "202110",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 2,
|
||||
interviewerName1: "陈志远",
|
||||
interviewerId1: "I0001",
|
||||
interviewerName2: "王晨",
|
||||
interviewerId2: "I0002",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:00:00",
|
||||
updateTime: "2026-04-15 09:20:00",
|
||||
workExperienceList: [
|
||||
{
|
||||
sortOrder: 1,
|
||||
companyName: "杭州数联科技有限公司",
|
||||
positionName: "Java开发工程师",
|
||||
jobStartMonth: "2022-07",
|
||||
jobEndMonth: "2024-12",
|
||||
departureReason: "个人职业发展需要,期望参与更大规模系统建设"
|
||||
},
|
||||
{
|
||||
sortOrder: 2,
|
||||
companyName: "成都云启信息技术有限公司",
|
||||
positionName: "初级开发工程师",
|
||||
jobStartMonth: "2021-07",
|
||||
jobEndMonth: "2022-06",
|
||||
departureReason: "项目阶段结束后选择新的发展机会"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
recruitId: "RC2025001206",
|
||||
recruitName: "2024年社会招聘-技术部",
|
||||
posName: "数据分析师",
|
||||
posCategory: "数据分析",
|
||||
posDesc: "负责经营分析、指标体系建设与专题分析。",
|
||||
candName: "罗军晓东",
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: "本科",
|
||||
candId: "420106199603120018",
|
||||
candSchool: "华中科技大学",
|
||||
candMajor: "软件工程",
|
||||
candGrad: "202003",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 1,
|
||||
interviewerName1: "李倩",
|
||||
interviewerId1: "I0003",
|
||||
interviewerName2: "周腾",
|
||||
interviewerId2: "I0004",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:05:00",
|
||||
updateTime: "2026-04-15 09:25:00",
|
||||
workExperienceList: [
|
||||
{
|
||||
sortOrder: 1,
|
||||
companyName: "上海明策数据服务有限公司",
|
||||
positionName: "数据分析师",
|
||||
jobStartMonth: "2021-03",
|
||||
jobEndMonth: "2025-01",
|
||||
departureReason: "期望转向更深入的数据建模分析工作"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
recruitId: "RC2025001003",
|
||||
recruitName: "2024年春季校园招聘",
|
||||
posName: "Java开发工程师",
|
||||
posCategory: "技术研发",
|
||||
posDesc: "参与项目需求开发与系统维护。",
|
||||
candName: "黄伟梓萱",
|
||||
recruitType: "CAMPUS",
|
||||
candEdu: "本科",
|
||||
candId: "440105200001018888",
|
||||
candSchool: "中山大学",
|
||||
candMajor: "建筑学",
|
||||
candGrad: "202108",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 0,
|
||||
interviewerName1: "陈志远",
|
||||
interviewerId1: "I0001",
|
||||
interviewerName2: "王晨",
|
||||
interviewerId2: "I0002",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:10:00",
|
||||
updateTime: "2026-04-15 09:30:00",
|
||||
workExperienceList: []
|
||||
}
|
||||
];
|
||||
|
||||
export default {
|
||||
name: "StaffRecruitment",
|
||||
@@ -436,6 +681,10 @@ export default {
|
||||
total: 0,
|
||||
// 招聘信息表格数据
|
||||
recruitmentList: [],
|
||||
recruitTypeOptions: [
|
||||
{ value: "SOCIAL", label: "社招" },
|
||||
{ value: "CAMPUS", label: "校招" }
|
||||
],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -455,6 +704,7 @@ export default {
|
||||
candName: null,
|
||||
candId: null,
|
||||
admitStatus: null,
|
||||
recruitType: null,
|
||||
interviewerName: null,
|
||||
interviewerId: null
|
||||
},
|
||||
@@ -463,8 +713,8 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
recruitId: [
|
||||
{ required: true, message: "招聘项目编号不能为空", trigger: "blur" },
|
||||
{ max: 32, message: "招聘项目编号长度不能超过32个字符", trigger: "blur" }
|
||||
{ required: true, message: "招聘记录编号不能为空", trigger: "blur" },
|
||||
{ max: 32, message: "招聘记录编号长度不能超过32个字符", trigger: "blur" }
|
||||
],
|
||||
recruitName: [
|
||||
{ required: true, message: "招聘项目名称不能为空", trigger: "blur" },
|
||||
@@ -485,6 +735,9 @@ export default {
|
||||
{ required: true, message: "候选人姓名不能为空", trigger: "blur" },
|
||||
{ max: 20, message: "候选人姓名长度不能超过20个字符", trigger: "blur" }
|
||||
],
|
||||
recruitType: [
|
||||
{ required: true, message: "招聘类型不能为空", trigger: "change" }
|
||||
],
|
||||
candEdu: [
|
||||
{ required: true, message: "学历不能为空", trigger: "blur" },
|
||||
{ max: 20, message: "学历长度不能超过20个字符", trigger: "blur" }
|
||||
@@ -515,6 +768,10 @@ export default {
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 导入类型
|
||||
importType: "recruitment",
|
||||
// 弹窗提示
|
||||
tip: "仅允许导入\"xls\"或\"xlsx\"格式文件。",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
@@ -531,6 +788,8 @@ export default {
|
||||
showFailureButton: false,
|
||||
// 当前导入任务ID
|
||||
currentTaskId: null,
|
||||
// 当前导入类型
|
||||
currentImportType: "recruitment",
|
||||
// 失败记录对话框
|
||||
failureDialogVisible: false,
|
||||
failureList: [],
|
||||
@@ -549,12 +808,16 @@ export default {
|
||||
lastImportInfo() {
|
||||
const savedTask = this.getImportTaskFromStorage();
|
||||
if (savedTask && savedTask.totalCount) {
|
||||
return `导入时间: ${this.parseTime(savedTask.saveTime)} | 总数: ${savedTask.totalCount}条 | 成功: ${savedTask.successCount}条 | 失败: ${savedTask.failureCount}条`;
|
||||
return `导入类型: ${this.getImportTypeLabel(savedTask.importType || 'recruitment')} | 导入时间: ${this.parseTime(savedTask.saveTime)} | 总数: ${savedTask.totalCount}条 | 成功: ${savedTask.successCount}条 | 失败: ${savedTask.failureCount}条`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.loadPreviewPage();
|
||||
return;
|
||||
}
|
||||
this.getList();
|
||||
this.restoreImportState(); // 恢复导入状态
|
||||
},
|
||||
@@ -568,6 +831,10 @@ export default {
|
||||
methods: {
|
||||
/** 查询招聘信息列表 */
|
||||
getList() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.loadPreviewList();
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
listStaffRecruitment(this.queryParams).then(response => {
|
||||
this.recruitmentList = response.rows;
|
||||
@@ -589,12 +856,15 @@ export default {
|
||||
posCategory: null,
|
||||
posDesc: null,
|
||||
candName: null,
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: null,
|
||||
candId: null,
|
||||
candSchool: null,
|
||||
candMajor: null,
|
||||
candGrad: null,
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 0,
|
||||
workExperienceList: [],
|
||||
interviewerName1: null,
|
||||
interviewerId1: null,
|
||||
interviewerName2: null,
|
||||
@@ -629,8 +899,26 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recruitId = row.recruitId || this.ids[0];
|
||||
if (this.isPreviewMode()) {
|
||||
const target = this.findPreviewRecruitment(recruitId);
|
||||
if (target) {
|
||||
this.form = {
|
||||
...this.form,
|
||||
...target,
|
||||
workExperienceList: this.normalizeWorkExperienceList(target.workExperienceList)
|
||||
};
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改招聘信息";
|
||||
this.isAdd = false;
|
||||
return;
|
||||
}
|
||||
getStaffRecruitment(recruitId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form = {
|
||||
...this.form,
|
||||
...response.data,
|
||||
workExperienceList: this.normalizeWorkExperienceList(response.data && response.data.workExperienceList)
|
||||
};
|
||||
this.open = true;
|
||||
this.title = "修改招聘信息";
|
||||
this.isAdd = false;
|
||||
@@ -639,15 +927,114 @@ export default {
|
||||
/** 详情按钮操作 */
|
||||
handleDetail(row) {
|
||||
const recruitId = row.recruitId;
|
||||
if (this.isPreviewMode()) {
|
||||
const target = this.findPreviewRecruitment(recruitId);
|
||||
if (target) {
|
||||
this.recruitmentDetail = {
|
||||
...target,
|
||||
workExperienceList: this.normalizeWorkExperienceList(target.workExperienceList)
|
||||
};
|
||||
this.detailOpen = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
getStaffRecruitment(recruitId).then(response => {
|
||||
this.recruitmentDetail = response.data;
|
||||
this.recruitmentDetail = {
|
||||
...response.data,
|
||||
workExperienceList: this.normalizeWorkExperienceList(response.data && response.data.workExperienceList)
|
||||
};
|
||||
this.detailOpen = true;
|
||||
});
|
||||
},
|
||||
/** 招聘类型格式化 */
|
||||
formatRecruitType(value) {
|
||||
const matched = this.recruitTypeOptions.find(item => item.value === value);
|
||||
return matched ? matched.label : "-";
|
||||
},
|
||||
/** 学历与毕业学校格式化 */
|
||||
formatEducationSchool(row) {
|
||||
if (!row) {
|
||||
return "-";
|
||||
}
|
||||
const edu = row.candEdu || "-";
|
||||
const school = row.candSchool || "-";
|
||||
return `${edu} / ${school}`;
|
||||
},
|
||||
/** 历史工作经历展示 */
|
||||
formatWorkExperienceCount(row) {
|
||||
if (!row || row.recruitType !== "SOCIAL") {
|
||||
return "-";
|
||||
}
|
||||
const count = Number(row.workExperienceCount || 0);
|
||||
return `${count}段`;
|
||||
},
|
||||
/** 是否为社招 */
|
||||
isSocialRecruitment(row) {
|
||||
return row && row.recruitType === "SOCIAL";
|
||||
},
|
||||
/** 任职时间展示 */
|
||||
getEmploymentPeriod(row) {
|
||||
if (!row) {
|
||||
return "-";
|
||||
}
|
||||
const start = row.jobStartMonth || "-";
|
||||
const end = row.jobEndMonth || "至今";
|
||||
return `${start} ~ ${end}`;
|
||||
},
|
||||
/** 工作经历列表归一化 */
|
||||
normalizeWorkExperienceList(list) {
|
||||
if (!Array.isArray(list)) {
|
||||
return [];
|
||||
}
|
||||
return list.slice().sort((a, b) => {
|
||||
const first = Number(a.sortOrder || 0);
|
||||
const second = Number(b.sortOrder || 0);
|
||||
return first - second;
|
||||
});
|
||||
},
|
||||
/** 是否为预览模式 */
|
||||
isPreviewMode() {
|
||||
return this.$route && this.$route.query && this.$route.query.preview === "1";
|
||||
},
|
||||
/** 加载预览页面 */
|
||||
loadPreviewPage() {
|
||||
this.loadPreviewList();
|
||||
const mode = this.$route.query.mode;
|
||||
const recruitId = this.$route.query.recruitId || "RC2025001205";
|
||||
if (mode === "detail") {
|
||||
this.handleDetail({ recruitId });
|
||||
} else if (mode === "edit") {
|
||||
this.handleUpdate({ recruitId });
|
||||
} else if (mode === "workImport") {
|
||||
this.handleWorkImport();
|
||||
} else if (mode === "import") {
|
||||
this.handleImport();
|
||||
} else if (mode === "add") {
|
||||
this.handleAdd();
|
||||
}
|
||||
},
|
||||
/** 加载预览列表 */
|
||||
loadPreviewList() {
|
||||
this.loading = false;
|
||||
this.recruitmentList = previewRecruitmentList.map(item => ({
|
||||
...item,
|
||||
workExperienceList: this.normalizeWorkExperienceList(item.workExperienceList)
|
||||
}));
|
||||
this.total = this.recruitmentList.length;
|
||||
},
|
||||
/** 查找预览记录 */
|
||||
findPreviewRecruitment(recruitId) {
|
||||
return previewRecruitmentList.find(item => item.recruitId === recruitId) || null;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(this.isAdd ? "预览模式:新增成功" : "预览模式:修改成功");
|
||||
this.open = false;
|
||||
return;
|
||||
}
|
||||
if (this.isAdd) {
|
||||
addStaffRecruitment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
@@ -667,6 +1054,10 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recruitIds = row.recruitId || this.ids;
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(`预览模式:已模拟删除 ${recruitIds}`);
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认删除招聘信息编号为"' + recruitIds + '"的数据项?').then(function() {
|
||||
return delStaffRecruitment(recruitIds);
|
||||
}).then(() => {
|
||||
@@ -682,11 +1073,36 @@ export default {
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "招聘信息数据导入";
|
||||
this.openImportDialog("recruitment");
|
||||
},
|
||||
/** 导入工作经历按钮操作 */
|
||||
handleWorkImport() {
|
||||
this.openImportDialog("work");
|
||||
},
|
||||
/** 打开导入弹窗 */
|
||||
openImportDialog(importType) {
|
||||
const isWorkImport = importType === "work";
|
||||
this.upload.importType = importType;
|
||||
this.currentImportType = importType;
|
||||
this.upload.title = isWorkImport ? "历史工作经历数据导入" : "招聘信息数据导入";
|
||||
this.upload.url = process.env.VUE_APP_BASE_API + (isWorkImport
|
||||
? "/ccdi/staffRecruitment/importWorkData"
|
||||
: "/ccdi/staffRecruitment/importData");
|
||||
this.upload.tip = isWorkImport
|
||||
? "仅允许导入\"xls\"或\"xlsx\"格式文件;招聘记录编号用于匹配,姓名/项目/职位用于校验。"
|
||||
: "仅允许导入\"xls\"或\"xlsx\"格式文件。";
|
||||
if (this.isPreviewMode()) {
|
||||
this.upload.open = true;
|
||||
return;
|
||||
}
|
||||
this.upload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
if (this.upload.importType === "work") {
|
||||
this.download('ccdi/staffRecruitment/workImportTemplate', {}, `历史工作经历导入模板_${new Date().getTime()}.xlsx`);
|
||||
return;
|
||||
}
|
||||
this.download('ccdi/staffRecruitment/importTemplate', {}, `招聘信息导入模板_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
// 文件上传中处理
|
||||
@@ -722,17 +1138,19 @@ export default {
|
||||
taskId: taskId,
|
||||
status: 'PROCESSING',
|
||||
timestamp: Date.now(),
|
||||
hasFailures: false
|
||||
hasFailures: false,
|
||||
importType: this.upload.importType
|
||||
});
|
||||
|
||||
// 重置状态
|
||||
this.showFailureButton = false;
|
||||
this.currentTaskId = taskId;
|
||||
this.currentImportType = this.upload.importType;
|
||||
|
||||
// 显示后台处理提示
|
||||
this.$notify({
|
||||
title: '导入任务已提交',
|
||||
message: '正在后台处理中,处理完成后将通知您',
|
||||
message: `${this.getImportTypeLabel(this.upload.importType)}正在后台处理中,处理完成后将通知您`,
|
||||
type: 'info',
|
||||
duration: 3000
|
||||
});
|
||||
@@ -780,14 +1198,15 @@ export default {
|
||||
hasFailures: statusResult.failureCount > 0,
|
||||
totalCount: statusResult.totalCount,
|
||||
successCount: statusResult.successCount,
|
||||
failureCount: statusResult.failureCount
|
||||
failureCount: statusResult.failureCount,
|
||||
importType: this.currentImportType
|
||||
});
|
||||
|
||||
if (statusResult.status === 'SUCCESS') {
|
||||
// 全部成功
|
||||
this.$notify({
|
||||
title: '导入完成',
|
||||
message: `全部成功!共导入${statusResult.totalCount}条数据`,
|
||||
message: `${this.getImportTypeLabel(this.currentImportType)}全部成功!共导入${statusResult.totalCount}条数据`,
|
||||
type: 'success',
|
||||
duration: 5000
|
||||
});
|
||||
@@ -797,7 +1216,7 @@ export default {
|
||||
// 部分失败
|
||||
this.$notify({
|
||||
title: '导入完成',
|
||||
message: `成功${statusResult.successCount}条,失败${statusResult.failureCount}条`,
|
||||
message: `${this.getImportTypeLabel(this.currentImportType)}成功${statusResult.successCount}条,失败${statusResult.failureCount}条`,
|
||||
type: 'warning',
|
||||
duration: 5000
|
||||
});
|
||||
@@ -866,6 +1285,7 @@ export default {
|
||||
// 如果有失败记录,恢复按钮显示
|
||||
if (savedTask.hasFailures && savedTask.taskId) {
|
||||
this.currentTaskId = savedTask.taskId;
|
||||
this.currentImportType = savedTask.importType || "recruitment";
|
||||
this.showFailureButton = true;
|
||||
}
|
||||
},
|
||||
@@ -875,7 +1295,7 @@ export default {
|
||||
if (savedTask && savedTask.saveTime) {
|
||||
const date = new Date(savedTask.saveTime);
|
||||
const timeStr = this.parseTime(date, '{y}-{m}-{d} {h}:{i}');
|
||||
return `上次导入: ${timeStr}`;
|
||||
return `上次${this.getImportTypeLabel(savedTask.importType || 'recruitment')}: ${timeStr}`;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@@ -954,12 +1374,21 @@ export default {
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(`预览模式:已模拟提交${this.getImportTypeLabel(this.upload.importType)}`);
|
||||
this.upload.open = false;
|
||||
return;
|
||||
}
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 关闭导入对话框
|
||||
handleImportDialogClose() {
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
},
|
||||
/** 导入类型展示 */
|
||||
getImportTypeLabel(importType) {
|
||||
return importType === "work" ? "历史工作经历导入" : "招聘信息导入";
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -973,4 +1402,8 @@ export default {
|
||||
.el-divider {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.work-experience-empty {
|
||||
padding: 24px 0 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user