You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
11 KiB
105 lines
11 KiB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { |
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
|
return new (P || (P = Promise))(function (resolve, reject) { |
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
|
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
|
}); |
|
}; |
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; |
|
//专家列表和专家审核 的详情 |
|
import React from 'react'; |
|
import { ModalForm, PageContainer, ProDescriptions, ProFormTextArea, } from '@ant-design/pro-components'; |
|
import { Button, Divider, Input, message, Modal, Space, Tabs, Upload, } from 'antd'; |
|
import Record from '../record'; |
|
import { useRequest } from 'ahooks'; |
|
import { formatImageUrl, useRoutes, themeMessage } from '@component/utils'; |
|
import { getDetail, getRecord, onReject } from './action'; |
|
import { getStorage } from '@component/utils'; |
|
import { CardDetail } from '@component/ui'; |
|
import { PreviewFile } from '@component/ui'; |
|
import { DescriptionsDetail } from '@component/ui'; |
|
const { TabPane } = Tabs; |
|
export default function (props) { |
|
const { paramsParse } = useRoutes(); |
|
const { userId, type } = paramsParse; |
|
return (_jsx(PageContainer, Object.assign({ header: { |
|
title: null, |
|
} }, { children: _jsxs(Tabs, Object.assign({ defaultActiveKey: "1" }, { children: [_jsx(TabPane, Object.assign({ tab: "\u57FA\u672C\u4FE1\u606F" }, { children: _jsx(DetailInfo, { params: userId, type: type }) }), "1"), _jsx(TabPane, Object.assign({ tab: "\u5BA1\u6838\u8BB0\u5F55" }, { children: _jsx(Record, { service: getRecord, params: { businessId: userId, businessType: 'expert' } }) }), "2")] })) }))); |
|
} |
|
//基本信息 |
|
const DetailInfo = (props) => { |
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; |
|
const waitTime = (time = 100) => { |
|
return new Promise((resolve) => { |
|
setTimeout(() => { |
|
resolve(true); |
|
}, time); |
|
}); |
|
}; |
|
const { historyBack } = useRoutes(); |
|
const { type } = props; |
|
const { data, loading } = useRequest(() => getDetail({ userId: props.params })); |
|
const { runAsync } = useRequest(onReject, { |
|
manual: true, |
|
onSuccess(result) { |
|
themeMessage(result, historyBack); |
|
}, |
|
onError(result) { |
|
message.error(result.message); |
|
}, |
|
}); |
|
const submitReview = () => { |
|
const params = { |
|
userId: (data === null || data === void 0 ? void 0 : data.userId) || '', |
|
auditStatus: '2' || '', |
|
rejecReason: '', |
|
supAudit: 'Y', |
|
organId: getStorage('organId') || '', |
|
}; |
|
Modal.confirm({ |
|
content: '请确认是否提交上级审核?', |
|
onOk() { |
|
return runAsync(params); |
|
}, |
|
}); |
|
}; |
|
const reviewPass = () => { |
|
const params = { |
|
userId: (data === null || data === void 0 ? void 0 : data.userId) || '', |
|
auditStatus: '3' || '', |
|
rejecReason: '', |
|
supAudit: 'N', |
|
organId: getStorage('organId') || '', |
|
}; |
|
Modal.confirm({ |
|
content: '请确认是否审核通过?', |
|
onOk() { |
|
return runAsync(params); |
|
}, |
|
}); |
|
}; |
|
return (_jsxs("div", Object.assign({ className: "page-content-detail-tabs" }, { children: [_jsx(CardDetail, Object.assign({ title: "\u670D\u52A1\u4FE1\u606F" }, { children: _jsxs(DescriptionsDetail, Object.assign({ column: 2, layout: "horizontal" }, { children: [_jsx(ProDescriptions.Item, Object.assign({ label: "\u59D3\u540D" }, { children: data === null || data === void 0 ? void 0 : data.userName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6240\u5C5E\u7B2C\u4E09\u65B9\u673A\u6784" }, { children: data === null || data === void 0 ? void 0 : data.organName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC1\u4EF6\u7C7B\u578B" }, { children: "\u8EAB\u4EFD\u8BC1" })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC1\u4EF6\u53F7\u7801" }, { children: data === null || data === void 0 ? void 0 : data.desensitizationIdNumber })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6027\u522B", valueEnum: { |
|
1: { text: '男' }, |
|
2: { text: '女' }, |
|
} }, { children: (_a = data === null || data === void 0 ? void 0 : data.identification) === null || _a === void 0 ? void 0 : _a.sex })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u5E74\u9F84" }, { children: (_b = data === null || data === void 0 ? void 0 : data.identification) === null || _b === void 0 ? void 0 : _b.age })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u8054\u7CFB\u7535\u8BDD" }, { children: data === null || data === void 0 ? void 0 : data.desensitizationPhone })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6240\u5728\u57CE\u5E02" }, { children: data === null || data === void 0 ? void 0 : data.gridName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6BD5\u4E1A\u5B66\u9662" }, { children: (_c = data === null || data === void 0 ? void 0 : data.identification) === null || _c === void 0 ? void 0 : _c.graduationSchool })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u4E13\u4E1A" }, { children: (_d = data === null || data === void 0 ? void 0 : data.identification) === null || _d === void 0 ? void 0 : _d.major })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6700\u9AD8\u5B66\u5386" }, { children: (_e = data === null || data === void 0 ? void 0 : data.identification) === null || _e === void 0 ? void 0 : _e.educationName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u6240\u5728\u5355\u4F4D" }, { children: (_f = data === null || data === void 0 ? void 0 : data.identification) === null || _f === void 0 ? void 0 : _f.workUnit })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u804C\u52A1/\u804C\u79F0" }, { children: (_g = data === null || data === void 0 ? void 0 : data.identification) === null || _g === void 0 ? void 0 : _g.titleName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u64C5\u957F\u9886\u57DF" }, { children: (_h = data === null || data === void 0 ? void 0 : data.identification) === null || _h === void 0 ? void 0 : _h.skilledFieldName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u670D\u52A1\u533A\u57DF" }, { children: (_j = data === null || data === void 0 ? void 0 : data.identification) === null || _j === void 0 ? void 0 : _j.scopeGridName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u4E3B\u8981\u670D\u52A1\u884C\u4E1A" }, { children: (_k = data === null || data === void 0 ? void 0 : data.identification) === null || _k === void 0 ? void 0 : _k.skilledIndustryName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u4E3B\u8981\u670D\u52A1\u9879\u76EE" }, { children: (_l = data === null || data === void 0 ? void 0 : data.identification) === null || _l === void 0 ? void 0 : _l.skilledWorkName })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u4ECE\u4E8B\u5B89\u5168\u751F\u4EA7\u5DE5\u4F5C\u5E74\u9650" }, { children: (_m = data === null || data === void 0 ? void 0 : data.identification) === null || _m === void 0 ? void 0 : _m.workYear })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u5DE5\u4F5C\u7ECF\u5386" }, { children: (_o = data === null || data === void 0 ? void 0 : data.identification) === null || _o === void 0 ? void 0 : _o.experience })), _jsx("br", {}), _jsx(ProDescriptions.Item, Object.assign({ label: "\u4E13\u5BB6\u4EB2\u624B\u7B7E\u540D", span: 2, contentStyle: { |
|
maxWidth: '100%', |
|
} }, { children: ((_p = data === null || data === void 0 ? void 0 : data.identification) === null || _p === void 0 ? void 0 : _p.signAttPath) && (_jsx(PreviewFile, { listType: "picture-card", disabled: true, fileList: formatImageUrl(data.identification.signAttPath) })) }))] })) })), _jsx(Divider, { className: "self-pro-divider" }), _jsx(CardDetail, Object.assign({ title: "\u5B89\u5168\u751F\u4EA7\u8D44\u8D28\u4FE1\u606F" }, { children: _jsx(DescriptionsDetail, Object.assign({ column: 2 }, { children: (_q = data === null || data === void 0 ? void 0 : data.certifications) === null || _q === void 0 ? void 0 : _q.map((item, index) => { |
|
return (_jsx(ProDescriptions.Item, { children: _jsxs(DescriptionsDetail, Object.assign({ title: item.certificationName, column: 1 }, { children: [_jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC1\u4E66\u7F16\u53F7" }, { children: item.certificationNumber })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u8BC1\u4E66\u7167\u7247" }, { children: _jsx(PreviewFile, { listType: "picture-card", disabled: true, fileList: formatImageUrl(item.certifications) }) }))] })) }, index)); |
|
}) })) })), (data === null || data === void 0 ? void 0 : data.auditStatus) == 1 && type == 'review' && (_jsxs(Space, Object.assign({ style: { |
|
marginLeft: '50%', |
|
transform: 'translateX(-50%)', |
|
marginTop: '50px', |
|
} }, { children: [_jsx(ModalForm, Object.assign({ title: "\u62D2\u7EDD\u901A\u8FC7\u7406\u7531", trigger: _jsx(Button, Object.assign({ danger: true }, { children: "\u9A73\u56DE" })), submitTimeout: 2000, onFinish: (values) => __awaiter(void 0, void 0, void 0, function* () { |
|
const params = { |
|
userId: (data === null || data === void 0 ? void 0 : data.userId) || '', |
|
auditStatus: '4' || '', |
|
rejectReason: values.rejectReason || '', |
|
supAudit: 'N', |
|
organId: getStorage('organId') || '', |
|
}; |
|
runAsync(params); |
|
return true; |
|
}) }, { children: _jsx(ProFormTextArea, { name: "rejectReason", placeholder: "\u8BF7\u8F93\u5165\u540D\u79F0" }) })), getStorage('isSup') == 1 && (_jsx(Button, Object.assign({ type: "primary", ghost: true, onClick: submitReview }, { children: "\u63D0\u4EA4\u4E0A\u7EA7\u5BA1\u6838" }))), _jsx(Button, Object.assign({ type: "primary", onClick: reviewPass }, { children: "\u5BA1\u6838\u901A\u8FC7" }))] })))] }))); |
|
};
|
|
|