feat
parent
d78705dc15
commit
6391fc4400
|
|
@ -13,8 +13,8 @@ module.exports = {
|
||||||
//API_HOST: "http://localhost:80",
|
//API_HOST: "http://localhost:80",
|
||||||
|
|
||||||
// API_HOST: "http://192.168.0.134",
|
// API_HOST: "http://192.168.0.134",
|
||||||
API_HOST: "http://192.168.0.150", //太浅
|
// API_HOST: "http://192.168.0.150", //太浅
|
||||||
// API_HOST: "https://gbs-gateway.qhdsafety.com",
|
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||||
// API_HOST: "http://192.168.0.103", //huwei
|
// API_HOST: "http://192.168.0.103", //huwei
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
|
|
|
||||||
|
|
@ -230,10 +230,13 @@ const TeamContent = ({ readOnly, ...props }) => {
|
||||||
|
|
||||||
// 导出Word:按当前项目组配置填充模板(聘请所需技术专家、备注事项、部门经理或负责人、年月日保留空白)
|
// 导出Word:按当前项目组配置填充模板(聘请所需技术专家、备注事项、部门经理或负责人、年月日保留空白)
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
|
/** 人员展示文本:姓名后追加能力,如"张三(化工)" */
|
||||||
|
const personText = (m) =>
|
||||||
|
`${m.personnelName}${m.capacity ? `(${m.capacity})` : ""}`;
|
||||||
const namesByRole = (role) =>
|
const namesByRole = (role) =>
|
||||||
teamMembers
|
teamMembers
|
||||||
.filter((m) => m.roles.some((r) => r.role === role))
|
.filter((m) => m.roles.some((r) => r.role === role))
|
||||||
.map((m) => m.personnelName)
|
.map(personText)
|
||||||
.join("、");
|
.join("、");
|
||||||
const data = {
|
const data = {
|
||||||
projectName: evalProjectDetailData?.projectName || "",
|
projectName: evalProjectDetailData?.projectName || "",
|
||||||
|
|
@ -241,7 +244,7 @@ const TeamContent = ({ readOnly, ...props }) => {
|
||||||
projectLeader: namesByRole("PROJECT_LEAD"),
|
projectLeader: namesByRole("PROJECT_LEAD"),
|
||||||
membersText: teamMembers
|
membersText: teamMembers
|
||||||
.filter((m) => !m.roles.some((r) => r.role === "PROJECT_LEAD"))
|
.filter((m) => !m.roles.some((r) => r.role === "PROJECT_LEAD"))
|
||||||
.map((m) => m.personnelName)
|
.map(personText)
|
||||||
.join("、"),
|
.join("、"),
|
||||||
compiler: namesByRole("REPORT_COMPILER"),
|
compiler: namesByRole("REPORT_COMPILER"),
|
||||||
auditor: namesByRole("INTERNAL_AUDITOR"),
|
auditor: namesByRole("INTERNAL_AUDITOR"),
|
||||||
|
|
@ -557,7 +560,7 @@ const TeamContent = ({ readOnly, ...props }) => {
|
||||||
{ (
|
{ (
|
||||||
<LayoutFooterPortal slotId="pf-footer-slot">
|
<LayoutFooterPortal slotId="pf-footer-slot">
|
||||||
<Flex justify="flex-end" gap={8}>
|
<Flex justify="flex-end" gap={8}>
|
||||||
<Button onClick={handleExport}>导出Word</Button>
|
<Button onClick={handleExport}>导出《人员任命书》</Button>
|
||||||
{!readOnly &&<Button
|
{!readOnly &&<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
loading={memberSaveLoading || memberParticipantSaveLoading}
|
loading={memberSaveLoading || memberParticipantSaveLoading}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
* 解析驾驶舱 / 大屏鉴权参数:
|
|
||||||
* - 优先从 URL query 读取(基座跳转携带)
|
|
||||||
* - 其次从 sessionStorage 读取(已登录态)
|
|
||||||
* 返回 { isInstitution, isSupervision, regulatorCode, token }
|
|
||||||
*/
|
|
||||||
export function resolveDriverAuthParams() {
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
|
||||||
const get = (key, fallback) => params.get(key) || sessionStorage.getItem(key) || fallback;
|
|
||||||
|
|
||||||
const role = get("role", "");
|
|
||||||
const isInstitution = role === "institution" || !!get("enterpriseId");
|
|
||||||
const isSupervision = role === "supervision" || !!get("regulatorCode");
|
|
||||||
|
|
||||||
return {
|
|
||||||
isInstitution,
|
|
||||||
isSupervision,
|
|
||||||
regulatorCode: get("regulatorCode", ""),
|
|
||||||
enterpriseId: get("enterpriseId", ""),
|
|
||||||
token: get("token", ""),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue