diff --git a/jjb.config.js b/jjb.config.js index acaeda2..0dc50cd 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -12,9 +12,9 @@ module.exports = { // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 //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: "https://gbs-gateway.qhdsafety.com", + API_HOST: "https://gbs-gateway.qhdsafety.com", //API_HOST: "http://192.168.0.103", //huwei }, production: { diff --git a/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js b/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js index 7442489..0757989 100644 --- a/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js +++ b/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js @@ -28,6 +28,9 @@ import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { tools } from "@cqsjjb/jjb-common-lib"; import dayjs from "dayjs"; +import {EVAL_TYPE_OPTIONS} from '~/enumerate/constant'; +import {QUALIFICATION_INDUSTRY_OPTIONS} from '~/enumerate/enterpriseOptions'; + import "./index.less"; /** @@ -44,23 +47,7 @@ const { TextArea } = Input; const UPLOAD_ACTION = `${window.process?.env?.app?.API_HOST || ""}/safetyEval/file/upload`; -/** 评价类型(对齐原型文案;编码对齐 OpenAPI PRE/ACCEPT/STATUS) */ -const REPORT_EVAL_TYPE_OPTIONS = [ - { label: "安全预评价", value: "PRE" }, - { label: "安全验收评价", value: "ACCEPT" }, - { label: "安全现状评价", value: "STATUS" }, -]; -/** 所属行业(原型选项;编码仅 OpenAPI 示例给出 HAZCHEM,其余按命名约定) */ -const REPORT_INDUSTRY_OPTIONS = [ - { label: "危险化学品", value: "HAZCHEM" }, - { label: "金属非金属矿山", value: "METAL_NONMETAL_MINE" }, - { label: "金属冶炼", value: "METAL_SMELTING" }, - { label: "烟花爆竹", value: "FIREWORKS" }, - { label: "城镇燃气", value: "URBAN_GAS" }, - { label: "工贸", value: "INDUSTRY_TRADE" }, - { label: "其他", value: "OTHER" }, -]; /** 保密属性(OpenAPI 仅示例 NORMAL) */ const SECRET_LEVEL_OPTIONS = [ @@ -231,7 +218,7 @@ const EvalReportLibrary = (props) => { uploadForm.setFieldsValue({ reportYear: dayjs().year(), evalTypeCode: "PRE", - industryCode: "HAZCHEM", + secretLevelCode: "NORMAL", issueDate: dayjs(), submitToRegulator: 0, @@ -311,12 +298,12 @@ const EvalReportLibrary = (props) => { reportYear: values.reportYear, evalTypeCode: values.evalTypeCode, evalTypeName: getOptionLabel( - REPORT_EVAL_TYPE_OPTIONS, + EVAL_TYPE_OPTIONS, values.evalTypeCode, ), industryCode: values.industryCode, industryName: getOptionLabel( - REPORT_INDUSTRY_OPTIONS, + QUALIFICATION_INDUSTRY_OPTIONS, values.industryCode, ), evaluatedUnitName: values.evaluatedUnitName?.trim(), @@ -609,14 +596,14 @@ const EvalReportLibrary = (props) => { dataIndex: "evalTypeName", width: 120, render: (val, record) => - val || getOptionLabel(REPORT_EVAL_TYPE_OPTIONS, record.evalTypeCode), + val || getOptionLabel(EVAL_TYPE_OPTIONS, record.evalTypeCode), }, { title: "所属行业", dataIndex: "industryName", width: 120, render: (val, record) => - val || getOptionLabel(REPORT_INDUSTRY_OPTIONS, record.industryCode), + val || getOptionLabel(QUALIFICATION_INDUSTRY_OPTIONS, record.industryCode), }, { title: "被评价单位", @@ -838,7 +825,7 @@ const EvalReportLibrary = (props) => { label="评价类型" placeholder="全部" allowClear - options={REPORT_EVAL_TYPE_OPTIONS} + options={EVAL_TYPE_OPTIONS} /> ,