Merge remote-tracking branch 'origin/dev' into dev
commit
17106eec15
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
javaGitBranch: "dev",
|
javaGitBranch: "dev",
|
||||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
API_HOST: "http://127.0.0.1",
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
|
|
|
||||||
|
|
@ -17,16 +17,23 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return { fileList: value };
|
return { fileList: value };
|
||||||
}
|
}
|
||||||
return {
|
if (typeof value === "string" && value) {
|
||||||
fileList: value
|
try {
|
||||||
? value.split(",").map((item) => ({
|
const parsed = JSON.parse(value);
|
||||||
url: item,
|
if (Array.isArray(parsed)) {
|
||||||
uid: item,
|
return { fileList: parsed };
|
||||||
status: "done",
|
}
|
||||||
name: "附件",
|
} catch {}
|
||||||
}))
|
return {
|
||||||
: [],
|
fileList: value.split(",").map((item) => ({
|
||||||
};
|
url: item,
|
||||||
|
uid: item,
|
||||||
|
status: "done",
|
||||||
|
name: "附件",
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { fileList: [] };
|
||||||
}}
|
}}
|
||||||
getValueFromEvent={({ fileList }) => {
|
getValueFromEvent={({ fileList }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_EQUIP_INFO } from "~/enumerate/namespace";
|
import { NS_EQUIP_INFO } from "~/enumerate/namespace";
|
||||||
import { positiveNumberRule } from "~/utils/validators";
|
import { positiveNumberRule } from "~/utils/validators";
|
||||||
|
import { toEquipPageQuery } from "../equipPageQuery";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
const DUAL_CHANNEL_MAP = { 1: "是", 2: "否" };
|
const DUAL_CHANNEL_MAP = { 1: "是", 2: "否" };
|
||||||
|
|
@ -41,9 +42,7 @@ function EquipInfoPage(props) {
|
||||||
} = equipInfo || {};
|
} = equipInfo || {};
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
props.equipInfoList({
|
props.equipInfoList(toEquipPageQuery(router.query));
|
||||||
...router.query,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -143,17 +142,6 @@ function EquipInfoPage(props) {
|
||||||
<Select.Option value="便携式">便携式</Select.Option>
|
<Select.Option value="便携式">便携式</Select.Option>
|
||||||
</ControlWrapper.Select>
|
</ControlWrapper.Select>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="enableFlag" name="enableFlag">
|
|
||||||
<ControlWrapper.Select
|
|
||||||
label="设备状态"
|
|
||||||
placeholder="请选择"
|
|
||||||
allowClear
|
|
||||||
style={{ width: "100%" }}
|
|
||||||
>
|
|
||||||
<Select.Option value={1}>启用</Select.Option>
|
|
||||||
<Select.Option value={2}>禁用</Select.Option>
|
|
||||||
</ControlWrapper.Select>
|
|
||||||
</Form.Item>,
|
|
||||||
]}
|
]}
|
||||||
onReset={(value) => {
|
onReset={(value) => {
|
||||||
router.query = { ...value, current: 1, size: 10 };
|
router.query = { ...value, current: 1, size: 10 };
|
||||||
|
|
|
||||||
|
|
@ -341,11 +341,7 @@ function OrgInfoPage(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
|
||||||
<Form.Item name="safetyDeputyManager" label="主管安全副总">
|
|
||||||
<Input placeholder="请输入主管安全副总" allowClear />
|
|
||||||
</Form.Item>
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="safetyDeputyPhone"
|
name="safetyDeputyPhone"
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function FiledManageListPage(props) {
|
||||||
<FilingListTable
|
<FilingListTable
|
||||||
PageLayout={PageLayout}
|
PageLayout={PageLayout}
|
||||||
listTitle="已备案资质管理"
|
listTitle="已备案资质管理"
|
||||||
listDesc="对已备案资质进行周期性填报与维护。"
|
|
||||||
createLabel="资质备案填报"
|
createLabel="资质备案填报"
|
||||||
mode={FILING_FORM_MODE.FILED}
|
mode={FILING_FORM_MODE.FILED}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ function FilingApplicationListPage(props) {
|
||||||
<FilingListTable
|
<FilingListTable
|
||||||
PageLayout={PageLayout}
|
PageLayout={PageLayout}
|
||||||
listTitle="资质备案申请"
|
listTitle="资质备案申请"
|
||||||
listDesc="机构提交资质备案申请,填写备案基本信息、材料、人员及装备清单。"
|
|
||||||
createLabel="申请备案"
|
createLabel="申请备案"
|
||||||
mode={FILING_FORM_MODE.APPLICATION}
|
mode={FILING_FORM_MODE.APPLICATION}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function FilingChangeListPage(props) {
|
||||||
<FilingListTable
|
<FilingListTable
|
||||||
PageLayout={PageLayout}
|
PageLayout={PageLayout}
|
||||||
listTitle="备案变更管理"
|
listTitle="备案变更管理"
|
||||||
listDesc="对已备案资质发起变更申请,查看变更次数与变更明细。"
|
|
||||||
mode={FILING_FORM_MODE.CHANGE}
|
mode={FILING_FORM_MODE.CHANGE}
|
||||||
showChangeCount
|
showChangeCount
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
|
|
@ -90,18 +90,7 @@ function FilingChangeListPage(props) {
|
||||||
onSearch={handleSearch}
|
onSearch={handleSearch}
|
||||||
onPageChange={handlePageChange}
|
onPageChange={handlePageChange}
|
||||||
onChangeCountClick={(record) => setHistoryRecord(record)}
|
onChangeCountClick={(record) => setHistoryRecord(record)}
|
||||||
extraActions={(record) =>
|
|
||||||
[ 1,3].includes(record.filingStatusCode) ? (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
size="small"
|
|
||||||
|
|
||||||
onClick={() => handleStartChange(record)}
|
|
||||||
>
|
|
||||||
修改备案信息
|
|
||||||
</Button>
|
|
||||||
) : null
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<ChangeHistoryModal
|
<ChangeHistoryModal
|
||||||
open={!!historyRecord}
|
open={!!historyRecord}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Input, Modal, Table } from "antd";
|
import { Button, Form, Input, Modal, Table } from "antd";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { NS_EQUIP_INFO } from "~/enumerate/namespace";
|
import { NS_EQUIP_INFO } from "~/enumerate/namespace";
|
||||||
|
import { toEquipPageQuery } from "~/pages/Container/EnterpriseInfo/equipPageQuery";
|
||||||
|
|
||||||
function OrgEquipmentSelectModalInner(props) {
|
function OrgEquipmentSelectModalInner(props) {
|
||||||
const { open, onCancel, onConfirm, existingIds = [] } = props;
|
const { open, onCancel, onConfirm, existingIds = [] } = props;
|
||||||
|
|
@ -15,11 +16,13 @@ function OrgEquipmentSelectModalInner(props) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const values = searchForm.getFieldsValue();
|
const values = searchForm.getFieldsValue();
|
||||||
const res = await props.equipInfoList({
|
const res = await props.equipInfoList(
|
||||||
current: page,
|
toEquipPageQuery({
|
||||||
size: pageSize,
|
current: page,
|
||||||
deviceName: values.deviceName || undefined,
|
size: pageSize,
|
||||||
});
|
deviceName: values.deviceName || undefined,
|
||||||
|
}),
|
||||||
|
);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
setDataSource(res?.data || []);
|
setDataSource(res?.data || []);
|
||||||
setPagination((prev) => ({ ...prev, current: page, pageSize, total: res?.total || 0 }));
|
setPagination((prev) => ({ ...prev, current: page, pageSize, total: res?.total || 0 }));
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,12 @@ export default function FilingListTable({
|
||||||
const statusOptions = getFilingStatusOptions(mode);
|
const statusOptions = getFilingStatusOptions(mode);
|
||||||
|
|
||||||
const canEditRow = (record) => {
|
const canEditRow = (record) => {
|
||||||
if (mode === FILING_FORM_MODE.FILED) {
|
|
||||||
return Number(record.filingStatusCode) === 3;
|
if (mode === FILING_FORM_MODE.CHANGE) {
|
||||||
|
|
||||||
|
return [1,3,5].includes(record.filingStatusCode);
|
||||||
}
|
}
|
||||||
return isQualFilingEditable(record.filingStatusCode);
|
return [3,5].includes(record.filingStatusCode);
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
@ -101,7 +103,7 @@ export default function FilingListTable({
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
{extraActions?.(record)}
|
{extraActions?.(record)}
|
||||||
{canEditRow(record) && mode !== FILING_FORM_MODE.CHANGE && (
|
{canEditRow(record) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
||||||
|
|
@ -276,14 +276,14 @@ export function mergeDetailFromForms(detail, { basicValues, commitmentValues })
|
||||||
return {
|
return {
|
||||||
...detail,
|
...detail,
|
||||||
...basicValues,
|
...basicValues,
|
||||||
attachmentUrl: Array.isArray(basicValues?.attachmentUrl) ? basicValues?.attachmentUrl?.map((file) => file.url).join(",") : basicValues?.attachmentUrl,
|
attachmentUrl: Array.isArray(basicValues?.attachmentUrl) ? JSON.stringify(basicValues?.attachmentUrl) : basicValues?.attachmentUrl,
|
||||||
materials: detail.materials,
|
materials: detail.materials,
|
||||||
personnelList: detail.personnelList,
|
personnelList: detail.personnelList,
|
||||||
equipmentList: detail.equipmentList,
|
equipmentList: detail.equipmentList,
|
||||||
commitment: {
|
commitment: {
|
||||||
...detail.commitment,
|
...detail.commitment,
|
||||||
...commitmentValues,
|
...commitmentValues,
|
||||||
legalRepSignatureUrl: Array.isArray(commitmentValues?.legalRepSignatureUrl) ? commitmentValues?.legalRepSignatureUrl?.map((file) => file.url).join(",") : commitmentValues?.legalRepSignatureUrl,
|
legalRepSignatureUrl: Array.isArray(commitmentValues?.legalRepSignatureUrl) ? commitmentValues?.legalRepSignatureUrl[0]?.url : commitmentValues?.legalRepSignatureUrl,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect, useMemo } from "react";
|
||||||
import { Button, Descriptions, Table, Tag, Tabs, Select, Modal, Space, Image } from "antd";
|
import { Button, Descriptions, Table, Tag, Tabs, Select, Modal, Space, Image } from "antd";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
|
|
@ -26,6 +26,17 @@ const FilingTabs = ({
|
||||||
|
|
||||||
const [viewId, setViewId] = useState("");
|
const [viewId, setViewId] = useState("");
|
||||||
|
|
||||||
|
const attachmentList = useMemo(() => {
|
||||||
|
const v = detail.attachmentUrl;
|
||||||
|
if (!v) return [];
|
||||||
|
try {
|
||||||
|
const p = JSON.parse(v);
|
||||||
|
return Array.isArray(p) ? p : [];
|
||||||
|
} catch {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}, [detail.attachmentUrl]);
|
||||||
|
|
||||||
|
|
||||||
const baseCols = [
|
const baseCols = [
|
||||||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||||
|
|
@ -87,6 +98,20 @@ const FilingTabs = ({
|
||||||
<Descriptions.Item label="专职安全评价师数量">{detail.fulltimeEvaluatorCount}人</Descriptions.Item>
|
<Descriptions.Item label="专职安全评价师数量">{detail.fulltimeEvaluatorCount}人</Descriptions.Item>
|
||||||
<Descriptions.Item label="注册安全工程师数量">{detail.registeredEngineerCount}人</Descriptions.Item>
|
<Descriptions.Item label="注册安全工程师数量">{detail.registeredEngineerCount}人</Descriptions.Item>
|
||||||
<Descriptions.Item label="单位基本情况介绍" span={2}>{detail.unitIntro}</Descriptions.Item>
|
<Descriptions.Item label="单位基本情况介绍" span={2}>{detail.unitIntro}</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="附件" span={2}>
|
||||||
|
{attachmentList.length
|
||||||
|
? attachmentList.map((item, i) => {
|
||||||
|
const isImg = /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(item.url || "");
|
||||||
|
return isImg ? (
|
||||||
|
<Image key={item.url || i} src={item.url} style={{ width: 100, height: 100, objectFit: "cover", marginRight: 8 }} />
|
||||||
|
) : (
|
||||||
|
<PreviewUrlButton key={item.url || i} url={item.url}>
|
||||||
|
{item.name || `附件${i + 1}`}
|
||||||
|
</PreviewUrlButton>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue