浏览代码

feat: 项目成果

chenlei 1 年之前
父节点
当前提交
eb00a46f13

+ 7 - 4
src/components/Z3upFiles/index.tsx

@@ -26,10 +26,13 @@ type Props = {
   myUrl: string;
   fromData?: any;
   lookData: FileImgListType[]; //编辑或者 查看 回显
+  accept?: string;
+  // result:成果 | list:清单
+  type?: string;
 };
 
 function Z3upFiles(
-  { max, isLook, fileCheck, dirCode, myUrl, fromData, lookData }: Props,
+  { max, isLook, type="doc", fileCheck, dirCode, myUrl, fromData, lookData, accept=".zip" }: Props,
   ref: any
 ) {
   const [fileList, setFileList] = useState<FileImgListType[]>([]);
@@ -48,7 +51,7 @@ function Z3upFiles(
         const filesInfo = e.target.files[0];
 
         // 校验格式
-        if (!filesInfo.name.includes(".zip")) {
+        if (!filesInfo.name.includes(".zip") && accept !== '*') {
           e.target.value = "";
           return MessageFu.warning(`只支持zip格式!`);
         }
@@ -56,7 +59,7 @@ function Z3upFiles(
         // 创建FormData对象
         const fd = new FormData();
         // 把files添加进FormData对象(‘photo’为后端需要的字段)
-        fd.append("type", "doc");
+        fd.append("type", type);
         fd.append("dirCode", dirCode);
         fd.append("file", filesInfo);
 
@@ -111,7 +114,7 @@ function Z3upFiles(
       <input
         id="upInput"
         type="file"
-        accept='.zip'
+        accept={accept}
         ref={myInput}
         onChange={(e) => handeUpPhoto(e)}
       />

+ 40 - 212
src/pages/A1Project/A1Add/index.tsx

@@ -1,4 +1,4 @@
-import React, { useCallback, useEffect, useRef, useState } from "react";
+import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
 import styles from "./index.module.scss";
 import {
   Button,
@@ -14,25 +14,17 @@ import {
 import mapDataAll from "./data";
 import dayjs from "dayjs";
 import TextArea from "antd/es/input/TextArea";
-import Z1upImgs from "@/components/Z1upImgs";
-import Z2upVideos from "@/components/Z2upVideos";
 import { MessageFu } from "@/utils/message";
-import Z3upFiles from "@/components/Z3upFiles";
 import classNames from "classnames";
 import { useSelector } from "react-redux";
 import { RootState } from "@/store";
 import { A1_APIaddProject, A1_APIgetInfoById } from "@/store/action/A1Project";
-import { A1TableType, FileImgListType } from "@/types";
+import { A1TableType } from "@/types";
 import AuthCom from "@/components/AuthCom";
+import { getTokenInfo } from "@/utils/storage";
 
 const { RangePicker } = DatePicker;
 
-type LinkType = {
-  id: number;
-  name: string;
-  link: string;
-};
-
 type Props = {
   pageType: { txt: string; id: number };
   closeFu: () => void;
@@ -43,23 +35,18 @@ type Props = {
 function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
   const [lookInfo, setLookInfo] = useState({} as A1TableType);
 
-  const [lookFile, setLookFile] = useState([] as FileImgListType[]);
-
   const [isOk, setIsOk] = useState(false);
 
+  const userInfo = useMemo(() => {
+    return getTokenInfo().user;
+  }, []);
+
   const getInfoFu = useCallback(async (id: number) => {
     const res = await A1_APIgetInfoById(id);
     if (res.code === 0) {
       const info = res.data.entity;
       setLookInfo(info);
 
-      setDirCode(info.dirCode);
-
-      const file = res.data.file || [];
-      setLookFile(file);
-
-      setLinkArr(JSON.parse(info.linkJson||"[]"));
-
       const province = info.province ? info.province.split("-") : "";
 
       const dateScope = info.dateScope ? info.dateScope.split(" 至 ") : "";
@@ -79,7 +66,6 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
     if (!pageType.id) {
       // 新增
       setIsOk(true);
-      setDirCode(Date.now() + "");
     } else {
       // 编辑
       getInfoFu(pageType.id);
@@ -91,45 +77,9 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
     (state: RootState) => state.A2Dict.A2Tab1_1Obj.status
   );
 
-  // 上传附件的code码
-  const [dirCode, setDirCode] = useState("");
-
   // 表单的ref
   const FormBoxRef = useRef<FormInstance>(null);
 
-  // 图片数组的ref
-  const imgsRef = useRef<any>(null);
-
-  // 视频数组的ref
-  const videosRef = useRef<any>(null);
-
-  // 有关 项目链接
-  const [linkArr, setLinkArr] = useState<LinkType[]>([]);
-
-  const addLinkFu = useCallback(() => {
-    if (linkArr.length >= 10) return;
-    setLinkArr([...linkArr, { id: Date.now(), name: "", link: "" }]);
-  }, [linkArr]);
-
-  const delLinkFu = useCallback(
-    (id: number) => {
-      setLinkArr(linkArr.filter((v) => v.id !== id));
-    },
-    [linkArr]
-  );
-
-  const linkChangeFu = useCallback(
-    (id: number, val: string, type: "name" | "link") => {
-      setLinkArr(
-        linkArr.map((v) => ({
-          ...v,
-          [type]: v.id === id ? val.replace(/\s+/g, "") : v[type],
-        }))
-      );
-    },
-    [linkArr]
-  );
-
   // 没有通过校验
   const onFinishFailed = useCallback(() => {}, []);
 
@@ -150,32 +100,12 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
       if (value.province && value.province.length)
         province = value.province.join("-");
 
-      // 获取图片地址
-      const imgsRes = imgsRef.current.imgIdsRes();
-
-      // 获取视频地址
-      const videosRes = videosRef.current.videoIdsRes();
-
-      // 检查链接填写完整情况
-      const linkArrFlag = linkArr.some((v) => !v.name || !v.link);
-      if (linkArrFlag) return MessageFu.warning("请完整填写 项目链接 !");
-
-      // 项目成果
-      const filesRes = filesRef.current.filesIdRes();
-
-      const fileIdsArr = [...imgsRes, ...videosRes, ...filesRes];
-
-      const fileIds = fileIdsArr.join(",");
-
       const obj = {
         ...value,
         id: pageType.txt === "add" ? null : pageType.id,
         dateScope,
-        fileIds,
-        linkJson: JSON.stringify(linkArr)||"[]",
         amount: value.amount ? value.amount : "",
         province,
-        dirCode,
       };
       const res = await A1_APIaddProject(obj);
       if (res.code === 0) {
@@ -189,11 +119,10 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
         closeFu();
       }
     },
-    [addFu, closeFu, dirCode, editFu, linkArr, pageType.id, pageType.txt]
+    [addFu, closeFu, editFu, pageType.id, pageType.txt]
   );
 
-  // 项目成功的 ref
-  const filesRef = useRef<any>(null);
+  
 
   return (
     <div className={styles.A1Add}>
@@ -210,6 +139,9 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
           onFinish={onFinish}
           onFinishFailed={onFinishFailed}
           autoComplete="off"
+          initialValues={{
+            snapPmUser: userInfo.realName
+          }}
         >
           <Form.Item
             label="项目编号"
@@ -219,7 +151,6 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
           >
             <Input
               style={{ width: 600 }}
-              disabled={pageType.txt === "edit"}
               maxLength={30}
               showCount
               placeholder={
@@ -283,6 +214,34 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
             />
           </Form.Item>
 
+          <Form.Item
+            label="项目经理"
+            name="snapPmUser"
+          >
+            <Input
+              style={{ width: 600 }}
+              maxLength={30}
+              showCount
+              placeholder={
+                isOk ? (pageType.txt === "look" ? "(空)" : "请输入内容") : ""
+              }
+            />
+          </Form.Item>
+
+          <Form.Item
+            label="商务经理"
+            name="snapBmUser"
+          >
+            <Input
+              style={{ width: 600 }}
+              maxLength={30}
+              showCount
+              placeholder={
+                isOk ? (pageType.txt === "look" ? "(空)" : "请输入内容") : ""
+              }
+            />
+          </Form.Item>
+
           {pageType.txt === "look" ? (
             <div className="e_row">
               <div className="e_rowL">
@@ -340,137 +299,6 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
             </Form.Item>
           )}
 
-          <div className="e_row">
-            <div className="e_rowL e_rowRML">
-              <span> </span>项目图片:
-            </div>
-            <div className="e_rowR">
-              <Z1upImgs
-                max={50}
-                isLook={pageType.txt === "look"}
-                ref={imgsRef}
-                fileCheck={false}
-                size={10}
-                isCoverShow={true}
-                dirCode={dirCode}
-                myUrl="cms/project/upload"
-                lookData={lookFile.filter((v) => v.type === "img")}
-              />
-            </div>
-          </div>
-
-          <div className="e_row">
-            <div className="e_rowL e_rowL2 e_rowRML">
-              <span> </span>项目视频:
-            </div>
-            <div className="e_rowR">
-              <Z2upVideos
-                max={10}
-                isLook={pageType.txt === "look"}
-                ref={videosRef}
-                fileCheck={false}
-                size={500}
-                dirCode={dirCode}
-                myUrl="cms/project/upload"
-                lookData={lookFile.filter((v) => v.type === "video")}
-              />
-            </div>
-          </div>
-
-          <div className="e_row">
-            <div className="e_rowL e_rowL2">
-              <span> </span>项目链接:
-            </div>
-            <div className="e_rowR">
-              {pageType.txt === "look" && linkArr.length <= 0 ? (
-                <div className="lookNoneOne">{isOk ? "(空)" : ""}</div>
-              ) : (
-                <div className="erLinkTop" hidden={pageType.txt === "look"}>
-                  <Button onClick={addLinkFu} disabled={linkArr.length >= 10}>
-                    新&emsp;增
-                  </Button>
-                  <span className="e_rowRtit">&emsp;最多支持10条链接</span>
-                </div>
-              )}
-
-              {pageType.txt === "look" ? (
-                <>
-                  {linkArr.map((v) => (
-                    <div className="lookErLink" key={v.id}>
-                      <div className="lookErLink1">{v.name}:</div>
-                      <a
-                        title={v.link}
-                        className="lookErLink2"
-                        href={v.link}
-                        target="_blank"
-                        rel="noreferrer"
-                      >
-                        {v.link}
-                      </a>
-                    </div>
-                  ))}
-                </>
-              ) : (
-                <div className="erLinkMain">
-                  {linkArr.map((v) => (
-                    <div className="erLinkRow" key={v.id}>
-                      <Input
-                        value={v.name}
-                        onChange={(e) =>
-                          linkChangeFu(v.id, e.target.value, "name")
-                        }
-                        style={{ width: 240 }}
-                        maxLength={10}
-                        showCount
-                        placeholder="请输入链接标题"
-                      />
-                      &emsp;
-                      <Input
-                        value={v.link}
-                        onChange={(e) =>
-                          linkChangeFu(v.id, e.target.value, "link")
-                        }
-                        style={{ width: 800 }}
-                        maxLength={100}
-                        showCount
-                        placeholder="请输入链接"
-                      />
-                      &emsp;
-                      <Popconfirm
-                        title="删除后无法恢复,是否删除?"
-                        okText="删除"
-                        cancelText="取消"
-                        onConfirm={() => delLinkFu(v.id)}
-                        okButtonProps={{ loading: false }}
-                      >
-                        <Button>删除</Button>
-                      </Popconfirm>
-                    </div>
-                  ))}
-                </div>
-              )}
-            </div>
-          </div>
-
-          <br />
-
-          <div className="e_row">
-            <div className="e_rowL e_rowL2">
-              <span> </span>项目成果:
-            </div>
-            <div className="e_rowR e_rowRML">
-              <Z3upFiles
-                max={10}
-                isLook={pageType.txt === "look"}
-                ref={filesRef}
-                fileCheck={false}
-                dirCode={dirCode}
-                myUrl="cms/project/upload"
-                lookData={lookFile.filter((v) => v.type === "doc")}
-              />
-            </div>
-          </div>
-
           {/* 确定和取消按钮 */}
           <div className="A1AddBtn">
             {pageType.txt === "look" ? null : ( // <Button onClick={closeFu}>关 闭</Button>

+ 1 - 1
src/pages/A1Project/A1Inner/A1IupFile/index.tsx

@@ -132,7 +132,7 @@ function A1IupFile({
 
         const str = arr2[arr2.length - 1]; //66666.pdf  =>pdf
 
-        if (arr.every((v2) => v2 !== str)) flag = true;
+        if (arr.every((v2:any) => v2 !== str)) flag = true;
       }
     });
     return flag;

+ 10 - 1
src/pages/A1Project/A1Look/index.tsx

@@ -7,12 +7,14 @@ import A1Inner from "../A1Inner";
 import { useSelector } from "react-redux";
 import { RootState } from "@/store";
 import AuthCom from "@/components/AuthCom";
+import { A1Result } from "../A1Result";
 
 const A1Add = React.lazy(() => import("../A1Add"));
 const A1Outer = React.lazy(() => import("../A1Outer"));
 
 const A1Tab = [
   { id: "1080", name: "项目介绍" },
+  { id: "1111", name: "项目成果" },
   { id: "1090", name: "项目文件" },
   { id: "1101", name: "内控文件" },
   { id: "1110", name: "项目成员" },
@@ -96,7 +98,7 @@ function A1Look({ pageType, closeFu, tabType, lookTit }: Props) {
         ))}
       </div>
       <div className="A1LookMain">
-        {topType === "1080" && sonPageType.txt === "look" ? (
+        {["1080", "1111"].includes(topType) && sonPageType.txt === "look" ? (
           <AuthCom aId="1081">
             <div className="A1lrBtn">
               <Button
@@ -127,6 +129,13 @@ function A1Look({ pageType, closeFu, tabType, lookTit }: Props) {
           />
         ) : topType === "1110" ? (
           <A1User projectId={pageType.id} />
+        ) : topType === "1111" ? (
+          <A1Result
+            closeFu={tab1CloseFu}
+            pageType={sonPageType}
+            addFu={() => {}}
+            editFu={(val) => editSuFu(val)}
+          />
         ) : (
           <div className="noAuth">您没有这个页面的权限,请联系管理员添加</div>
         )}

+ 11 - 2
src/pages/A1Project/A1Outer/index.module.scss

@@ -55,17 +55,26 @@
 
         .A1OtableBox1_2 {
           margin-top: 15px;
-          height: 40px;
-          line-height: 40px;
+          padding: 5px;
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+          min-height: 40px;
           text-align: center;
           font-size: 16px;
           border-radius: 6px;
           cursor: pointer;
+          box-sizing: border-box;
 
           &:hover {
             background-color: var(--themeColor);
             color: #fff;
           }
+          span {
+            margin-top: 5px;
+            font-size: 12px;
+          }
         }
 
         .A1OtableBox1_2Ac {

+ 23 - 12
src/pages/A1Project/A1Outer/index.tsx

@@ -336,18 +336,29 @@ function A1Outer({ projectId, projectName }: Props) {
       <div className="A1OtableBox">
         <div className="A1OtableBox1">
           <div className="A1OtableBox1_1">目录</div>
-          {A1OleftArr.map((v) => (
-            <div
-              onClick={() => cutTab1Fu(v.id, v.name)}
-              className={classNames(
-                "A1OtableBox1_2",
-                tab1.id === v.id ? "A1OtableBox1_2Ac" : ""
-              )}
-              key={v.id}
-            >
-              {v.name}
-            </div>
-          ))}
+          {A1OleftArr.map((v) => {
+            // 子标题用 , 隔开
+            const temp = v.name.split(',')
+
+            return (
+              <div
+                onClick={() => cutTab1Fu(v.id, temp[0])}
+                className={classNames(
+                  "A1OtableBox1_2",
+                  tab1.id === v.id ? "A1OtableBox1_2Ac" : ""
+                )}
+                key={v.id}
+              >
+                <p>{temp[0]}</p>
+
+                {temp[1] && (
+                  <span style={{
+                    textAlign: 'center'
+                  }}>{temp[1]}</span>
+                )}
+              </div>
+            )
+          })}
         </div>
         <div className="A1OtableBox2">
           <Table

+ 321 - 0
src/pages/A1Project/A1Result/index.tsx

@@ -0,0 +1,321 @@
+import { FC, useCallback, useEffect, useRef, useState } from "react";
+import { FileImgListType } from "@/types";
+import Z1upImgs from "@/components/Z1upImgs";
+import Z2upVideos from "@/components/Z2upVideos";
+import Z3upFiles from "@/components/Z3upFiles";
+import { Button, Form, Input, Popconfirm } from "antd";
+import classNames from "classnames";
+import styles from "../A1Add/index.module.scss";
+import { A1_APIaddProject, A1_APIgetInfoById } from "@/store/action/A1Project";
+import { MessageFu } from "@/utils/message";
+
+type LinkType = {
+  id: number;
+  name: string;
+  link: string;
+};
+
+interface A1ResultProps {
+  pageType: { txt: string; id: number };
+  closeFu: () => void;
+  addFu: () => void;
+  editFu: (val: string) => void;
+}
+
+export const A1Result: FC<A1ResultProps> = ({ pageType, closeFu, addFu, editFu }) => {
+  const [isOk, setIsOk] = useState(false);
+  const [lookFile, setLookFile] = useState([] as FileImgListType[]);
+  // 有关 项目链接
+  const [linkArr, setLinkArr] = useState<LinkType[]>([]);
+  // 上传附件的code码
+  const [dirCode, setDirCode] = useState("");
+
+  // 项目成功的 ref
+  const filesRef = useRef<any>(null);
+  const listFilesRef =  useRef<any>(null);
+
+  // 图片数组的ref
+  const imgsRef = useRef<any>(null);
+
+  // 视频数组的ref
+  const videosRef = useRef<any>(null);
+
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await A1_APIgetInfoById(id);
+    if (res.code === 0) {
+      const info = res.data.entity;
+
+      setDirCode(info.dirCode);
+
+      const file = res.data.file || [];
+      setLookFile(file);
+
+      setLinkArr(JSON.parse(info.linkJson||"[]"));
+
+      // 回显的时候闪动 问题
+      setIsOk(true);
+    }
+  }, []);
+
+  useEffect(() => {
+    if (!pageType.id) {
+      // 新增
+      setIsOk(true);
+      setDirCode(Date.now() + "");
+    } else {
+      // 编辑
+      getInfoFu(pageType.id);
+    }
+  }, [getInfoFu, pageType.id]);
+
+  const addLinkFu = useCallback(() => {
+    if (linkArr.length >= 10) return;
+    setLinkArr([...linkArr, { id: Date.now(), name: "", link: "" }]);
+  }, [linkArr]);
+
+  const delLinkFu = useCallback(
+    (id: number) => {
+      setLinkArr(linkArr.filter((v) => v.id !== id));
+    },
+    [linkArr]
+  );
+
+  const linkChangeFu = useCallback(
+    (id: number, val: string, type: "name" | "link") => {
+      setLinkArr(
+        linkArr.map((v) => ({
+          ...v,
+          [type]: v.id === id ? val.replace(/\s+/g, "") : v[type],
+        }))
+      );
+    },
+    [linkArr]
+  );
+
+  // 通过校验点击确定
+  const onFinish = useCallback(
+    async (value: any) => {
+      // 获取图片地址
+      const imgsRes = imgsRef.current.imgIdsRes();
+
+      // 获取视频地址
+      const videosRes = videosRef.current.videoIdsRes();
+
+      // 检查链接填写完整情况
+      const linkArrFlag = linkArr.some((v) => !v.name || !v.link);
+      if (linkArrFlag) return MessageFu.warning("请完整填写 项目链接 !");
+
+      // 项目成果
+      const filesRes = filesRef.current.filesIdRes();
+      const listFilesRes = listFilesRef.current.filesIdRes();
+
+      const fileIdsArr = [...imgsRes, ...videosRes, ...filesRes, ...listFilesRes];
+
+      const fileIds = fileIdsArr.join(",");
+
+      const obj = {
+        ...value,
+        id: pageType.txt === "add" ? null : pageType.id,
+        fileIds,
+        linkJson: JSON.stringify(linkArr)||"[]",
+        dirCode,
+      };
+      const res = await A1_APIaddProject(obj);
+      if (res.code === 0) {
+        if (pageType.txt === "add") {
+          MessageFu.success("新增成功!");
+          addFu();
+        } else if (pageType.txt === "edit") {
+          MessageFu.success("编辑成功!");
+          editFu(value.num + " - " + value.name);
+        }
+        closeFu();
+      }
+    },
+    [addFu, closeFu, editFu, linkArr, dirCode, pageType.id, pageType.txt]
+  );
+
+  return (
+    <div className={styles.A1Add}>
+      <div
+        className={classNames(
+          "A1AddMain",
+          pageType.txt === "look" ? "A1AddMainLook" : ""
+        )}
+      >
+        <Form onFinish={onFinish}>
+          <div className="e_row">
+            <div className="e_rowL e_rowL2">
+              <span> </span>交付清单:
+            </div>
+            <div className="e_rowR e_rowRML">
+              <Z3upFiles
+                max={1}
+                accept="*"
+                type="list"
+                isLook={pageType.txt === "look"}
+                ref={listFilesRef}
+                fileCheck={false}
+                dirCode={dirCode}
+                myUrl="cms/project/upload"
+                lookData={lookFile.filter((v) => v.type === "list")}
+              />
+            </div>
+          </div>
+
+          <div className="e_row">
+            <div className="e_rowL e_rowRML">
+              <span> </span>项目图片:
+            </div>
+            <div className="e_rowR">
+              <Z1upImgs
+                max={50}
+                isLook={pageType.txt === "look"}
+                ref={imgsRef}
+                fileCheck={false}
+                size={10}
+                isCoverShow={true}
+                dirCode={dirCode}
+                myUrl="cms/project/upload"
+                lookData={lookFile.filter((v) => v.type === "img")}
+              />
+            </div>
+          </div>
+
+          <div className="e_row">
+            <div className="e_rowL e_rowL2 e_rowRML">
+              <span> </span>项目视频:
+            </div>
+            <div className="e_rowR">
+              <Z2upVideos
+                max={10}
+                isLook={pageType.txt === "look"}
+                ref={videosRef}
+                fileCheck={false}
+                size={500}
+                dirCode={dirCode}
+                myUrl="cms/project/upload"
+                lookData={lookFile.filter((v) => v.type === "video")}
+              />
+            </div>
+          </div>
+
+          <div className="e_row">
+            <div className="e_rowL e_rowL2">
+              <span> </span>项目链接:
+            </div>
+            <div className="e_rowR">
+              {pageType.txt === "look" && linkArr.length <= 0 ? (
+                <div className="lookNoneOne">{isOk ? "(空)" : ""}</div>
+              ) : (
+                <div className="erLinkTop" hidden={pageType.txt === "look"}>
+                  <Button onClick={addLinkFu} disabled={linkArr.length >= 10}>
+                    新&emsp;增
+                  </Button>
+                  <span className="e_rowRtit">&emsp;最多支持10条链接</span>
+                </div>
+              )}
+
+              {pageType.txt === "look" ? (
+                <>
+                  {linkArr.map((v) => (
+                    <div className="lookErLink" key={v.id}>
+                      <div className="lookErLink1">{v.name}:</div>
+                      <a
+                        title={v.link}
+                        className="lookErLink2"
+                        href={v.link}
+                        target="_blank"
+                        rel="noreferrer"
+                      >
+                        {v.link}
+                      </a>
+                    </div>
+                  ))}
+                </>
+              ) : (
+                <div className="erLinkMain">
+                  {linkArr.map((v) => (
+                    <div className="erLinkRow" key={v.id}>
+                      <Input
+                        value={v.name}
+                        onChange={(e) =>
+                          linkChangeFu(v.id, e.target.value, "name")
+                        }
+                        style={{ width: 240 }}
+                        maxLength={10}
+                        showCount
+                        placeholder="请输入链接标题"
+                      />
+                      &emsp;
+                      <Input
+                        value={v.link}
+                        onChange={(e) =>
+                          linkChangeFu(v.id, e.target.value, "link")
+                        }
+                        style={{ width: 800 }}
+                        maxLength={100}
+                        showCount
+                        placeholder="请输入链接"
+                      />
+                      &emsp;
+                      <Popconfirm
+                        title="删除后无法恢复,是否删除?"
+                        okText="删除"
+                        cancelText="取消"
+                        onConfirm={() => delLinkFu(v.id)}
+                        okButtonProps={{ loading: false }}
+                      >
+                        <Button>删除</Button>
+                      </Popconfirm>
+                    </div>
+                  ))}
+                </div>
+              )}
+            </div>
+          </div>
+
+          <br />
+
+          <div className="e_row">
+            <div className="e_rowL e_rowL2">
+              <span> </span>成果文件:
+            </div>
+            <div className="e_rowR e_rowRML">
+              <Z3upFiles
+                max={10}
+                isLook={pageType.txt === "look"}
+                ref={filesRef}
+                fileCheck={false}
+                dirCode={dirCode}
+                myUrl="cms/project/upload"
+                lookData={lookFile.filter((v) => v.type === "doc")}
+              />
+            </div>
+          </div>
+
+          {/* 确定和取消按钮 */}
+          <div className="A1AddBtn">
+            {pageType.txt === "look" ? null : ( // <Button onClick={closeFu}>关 闭</Button>
+              <>
+                <Popconfirm
+                  title="放弃编辑后,信息将不会保存!"
+                  okText="放弃"
+                  cancelText="取消"
+                  onConfirm={closeFu}
+                  okButtonProps={{ loading: false }}
+                >
+                  <Button>取消</Button>
+                </Popconfirm>{" "}
+                &emsp;&emsp;
+                <Button type="primary" htmlType="submit">
+                  保存
+                </Button>
+              </>
+            )}
+          </div>
+        </Form>
+      </div>
+    </div>
+  )
+}

+ 1 - 1
src/types/api/layot.d.ts

@@ -15,5 +15,5 @@ export type FileImgListType = {
   id: number;
   fileName: string;
   filePath: string;
-  type:'img'|'video'|'doc'
+  type:'img'|'video'|'doc'|'list'|'result'
 };