diff --git a/jjb.config.js b/jjb.config.js index 8211aa1..6b9539b 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -9,7 +9,8 @@ module.exports = { // 应用后端分支名称,部署上线需要 javaGitBranch: "", // 接口服务地址 - API_HOST: "http://192.168.20.100:30140", + // API_HOST: "http://192.168.20.100:30140", + API_HOST: "https://gbs-gateway.qhdsafety.com", }, production: { // 应用后端分支名称,部署上线需要 @@ -24,7 +25,8 @@ module.exports = { contextInject: { // 应用Key appKey: "", - fileUrl: "http://192.168.20.240:9787/mnt/", + // fileUrl: "http://192.168.20.240:9787/mnt/", + fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", }, // public/index.html注入全局变量 windowInject: { @@ -46,7 +48,7 @@ module.exports = { // 开发服务 server: { // 监听端口号 - port: "8080", + port: "8081", // 服务地址 host: "127.0.0.1", // 是否自动打开浏览器 diff --git a/package.json b/package.json index 82d0275..1c7c815 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-to-print": "^3.2.0", - "zy-react-library": "^1.1.10" + "zy-react-library": "^1.1.15" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", diff --git a/src/main.js b/src/main.js index c1cdccb..7f79acf 100644 --- a/src/main.js +++ b/src/main.js @@ -6,6 +6,7 @@ import "dayjs/locale/zh-cn"; import "../blessed_by_buddha"; require("antd/dist/reset.css"); +require("zy-react-library/css/common.less"); dayjs.locale("zh-cn"); setJJBCommonAntdMessage(message); diff --git a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js index db7e587..88b9211 100644 --- a/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js +++ b/src/pages/Container/BranchCompany/Inspection/Inspection/Add/index.js @@ -64,17 +64,19 @@ function Add(props) { const { data } = await props["inspectionView"]({ inspectionId: query.id }); situationList.push(...data.content); for (let i = 0; i < situationList.length; i++) { - const files = await getFile({ - eqType: UPLOAD_FILE_TYPE_ENUM["140"], - eqForeignKey: situationList[i].contentId, - }); - situationList[i].files = files; + if (situationList[i].contentId) { + const files = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["140"], + eqForeignKey: situationList[i].contentId, + }); + situationList[i].files = files; + } } const currentInspectorUser = data.inspectorVerificationList.filter(item => item.userId === userInfo.id)[0]; setSignatureFilePath(currentInspectorUser.signature ? getFileUrl() + currentInspectorUser.signature : ""); form.setFieldsValue({ ...data, - situationList:situationList.length > 0 ? situationList : [{ content: undefined }], + situationList: situationList.length > 0 ? situationList : [{ content: undefined }], inspectorList: data.inspectorVerificationList, personUnderInspection: data.inspectedPartyConfirmation, initiator: { @@ -346,7 +348,7 @@ function Add(props) { render: FORM_ITEM_RENDER_ENUM.RADIO, items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })), span: planType === 0 ? 24 : 12, - componentProps: { disabled: query.planId }, + componentProps: { disabled: true }, }, { name: "planId", @@ -356,7 +358,7 @@ function Add(props) { itemsField: { labelKey: "planName", valueKey: "id" }, dependencies: ["planType"], hidden: formValues => !(formValues.planType === 1), - componentProps: { disabled: query.planId }, + componentProps: { disabled: true }, }, { name: ["personUnderInspection", "departmentId"], @@ -382,7 +384,7 @@ function Add(props) { onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)} /> ), - formItemProps: { labelCol: { span: 8 } }, + formItemProps: { labelCol: { span: 6 } }, }, { name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true }, { name: "place", label: "检查场所", span: 24 }, @@ -468,6 +470,7 @@ function Add(props) { { name: [field.name, "files"], label: "图片", + required: false, render: ( } onClick={() => { - props.history.push("./add"); + props.history.push(`./add?planId=${query.planId || ""}`); }} > 新增 @@ -93,20 +93,31 @@ function List(props) { width: 200, render: (_, record) => ( - {(props.permission(props.updatePermissionKey || "inspection-qy-check-edit") && (record.status === 98 || record.status === 600)) && ( - - )} + { + ( + props.permission(props.updatePermissionKey || "inspection-qy-check-edit") + && query.edit !== "0" + && (record.status === 98 || record.status === 600) + ) + && ( + + ) + }