shaogen1995 2 years ago
parent
commit
2455e0a139

+ 3 - 3
src/pages/A1Project/A1Add/index.tsx

@@ -21,7 +21,7 @@ import Z3upFiles from "@/components/Z3upFiles";
 import classNames from "classnames";
 import { useSelector } from "react-redux";
 import { RootState } from "@/store";
-import { A2_APIaddProject, A2_APIgetInfoById } from "@/store/action/A1Project";
+import { A1_APIaddProject, A1_APIgetInfoById } from "@/store/action/A1Project";
 import { A1TableType, FileImgListType } from "@/types";
 
 const { RangePicker } = DatePicker;
@@ -47,7 +47,7 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
   const [isOk, setIsOk] = useState(false);
 
   const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2_APIgetInfoById(id);
+    const res = await A1_APIgetInfoById(id);
     if (res.code === 0) {
       const info = res.data.entity;
       setLookInfo(info);
@@ -171,7 +171,7 @@ function A1Add({ pageType, closeFu, addFu, editFu }: Props) {
         province,
         dirCode,
       };
-      const res = await A2_APIaddProject(obj);
+      const res = await A1_APIaddProject(obj);
       if (res.code === 0) {
         if (pageType.txt === "add") {
           MessageFu.success("新增成功!");

+ 2 - 2
src/pages/A1Project/A1Down/index.tsx

@@ -1,7 +1,7 @@
 import React, { useCallback, useEffect, useState } from "react";
 import styles from "./index.module.scss";
 import { Button, Checkbox, Empty, Modal } from "antd";
-import { A2_APIgetDownList } from "@/store/action/A1Project";
+import { A1_APIgetDownList } from "@/store/action/A1Project";
 import { A1getStorage, A1setStorage } from "@/utils/storage";
 import { MessageFu } from "@/utils/message";
 
@@ -18,7 +18,7 @@ type Props = {
 
 function A1Down({ downId, closeFu }: Props) {
   const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2_APIgetDownList(id);
+    const res = await A1_APIgetDownList(id);
     if (res.code === 0) {
       // setCheckedList(res.data || []);
       let arr = [

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

@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useState } from "react";
 import styles from "./index.module.scss";
 import { Button } from "antd";
 import classNames from "classnames";
+import A1User from "../A1User";
 
 const A1Add = React.lazy(() => import("../A1Add"));
 const A1Outer = React.lazy(() => import("../A1Outer"));
@@ -106,7 +107,9 @@ function A1Look({ pageType, closeFu, tabType, lookTit, editTopFu }: Props) {
             editFu={(val) => editSuFu(val)}
           />
         ) : topType === 2 ? (
-          <A1Outer projectId={pageType.id} />
+          <A1Outer projectId={pageType.id} projectName={myTitle} />
+        ) : topType === 3 ? null : topType === 4 ? (
+          <A1User projectId={pageType.id}/>
         ) : null}
       </div>
     </div>

+ 3 - 2
src/pages/A1Project/A1Outer/A1OMove/index.tsx

@@ -6,7 +6,7 @@ import { MessageFu } from "@/utils/message";
 import { useSelector } from "react-redux";
 import { RootState } from "@/store";
 import { A1OFileType } from "@/types";
-import { A1_APIOgetListMove, A2_APIOmove } from "@/store/action/A1Project";
+import { A1_APIOgetListMove, A1_APIOmove } from "@/store/action/A1Project";
 
 type Props = {
   mId: { id: number; name: string };
@@ -42,6 +42,7 @@ function A1OMove({ mId, id1, id2, closeFu, projectId, moveSuFu }: Props) {
       const res = await A1_APIOgetListMove(projectId, id);
 
       if (res.code === 0) {
+        
         setTableInfo(res.data.records);
       }
     },
@@ -99,7 +100,7 @@ function A1OMove({ mId, id1, id2, closeFu, projectId, moveSuFu }: Props) {
       if (tab1.id === id1.id) return MessageFu.warning("不能和之前的位置一样!");
     }
 
-    const res = await A2_APIOmove(mId.id, tab2.id ? tab2.id : tab1.id);
+    const res = await A1_APIOmove(mId.id, tab2.id ? tab2.id : tab1.id);
 
     if (res.code === 0) {
       MessageFu.success("移动成功!");

+ 2 - 2
src/pages/A1Project/A1Outer/A1ORenFile/index.tsx

@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react";
 import styles from "./index.module.scss";
 import { Button, Input, Modal, Popconfirm } from "antd";
 import { MessageFu } from "@/utils/message";
-import { A2_APIOadd } from "@/store/action/A1Project";
+import { A1_APIOadd } from "@/store/action/A1Project";
 import { A1OFileType } from "@/types";
 
 type Props = {
@@ -49,7 +49,7 @@ function A1ORenFile({ closeFu, fileInfo, addFu, editFu, projectId }: Props) {
       projectId,
     };
 
-    const res = await A2_APIOadd(obj);
+    const res = await A1_APIOadd(obj);
 
     if (res.code === 0) {
       if (fileInfo.id === -1) {

+ 17 - 11
src/pages/A1Project/A1Outer/A1OupFile/index.tsx

@@ -18,7 +18,7 @@ import history from "@/utils/history";
 import React from "react";
 import { getTokenFu } from "@/utils/storage";
 import { MessageFu } from "@/utils/message";
-import { A2_APIOupFileIds } from "@/store/action/A1Project";
+import { A1_APIOupFileIds, A1_APIremoveSure } from "@/store/action/A1Project";
 import { authFilesLookFu, urlChangeFu } from "@/utils/authFilesLook";
 
 const { Dragger } = Upload;
@@ -102,19 +102,25 @@ function A1OupFile({ myUrl, fromData, nowLoc, closeFu, upFileFu }: props) {
     async onRemove(info) {
       const promiseFu = new Promise((resolve: (value: boolean) => void) => {
         modal.confirm({
-          title: "操作确认",
-          content: "是否确认删除?",
-          okText: "确定",
+          title: "删除确认",
+          content: "删除后无法恢复,是否删除?",
+          okText: "删除",
           cancelText: "取消",
-          onOk() {
-            console.log("-----", info);
+          async onOk() {
             if (info.percent === 100) {
+              // console.log("-----还没有发请求删除", info);
+              const id = info.response.data.id;
               // 已经上传完成,发请求删除
+              const res = await A1_APIremoveSure([id + ""]);
+
+              if (res.code === 0) {
+                resolve(true);
+                MessageFu.success("删除成功!");
+              }
+            } else {
+              resolve(true);
+              MessageFu.success("删除成功!");
             }
-
-            MessageFu.success("删除成功!");
-
-            resolve(true);
           },
           onCancel() {
             resolve(false);
@@ -142,7 +148,7 @@ function A1OupFile({ myUrl, fromData, nowLoc, closeFu, upFileFu }: props) {
       ids.push(v.response.data.id);
     });
 
-    const res = await A2_APIOupFileIds(ids.join(","));
+    const res = await A1_APIOupFileIds(ids.join(","));
 
     if (res.code === 0) {
       MessageFu.success("保存成功!");

+ 15 - 1
src/pages/A1Project/A1Outer/index.module.scss

@@ -13,13 +13,27 @@
           padding: 0 5px;
           margin-top: 15px;
           font-size: 16px;
+
+          &>span {
+            color: var(--themeColor);
+            cursor: pointer;
+            &:hover{
+              text-decoration: underline;
+            }
+
+            &:last-child {
+              color: black;
+              pointer-events: none;
+            }
+          }
+
         }
       }
     }
 
     .A1OtableBox {
       margin-top: 15px;
-      border-radius: 10px;
+      border-radius: 10px 10px 10px 0;
       height: calc(100% - 43px);
       overflow: hidden;
       display: flex;

+ 33 - 14
src/pages/A1Project/A1Outer/index.tsx

@@ -16,8 +16,8 @@ import { useDispatch, useSelector } from "react-redux";
 import { RootState } from "@/store";
 import {
   A1_APIOgetList,
-  A2_APIOdel,
-  A2_APIOdownload,
+  A1_APIOdel,
+  A1_APIOdownload,
 } from "@/store/action/A1Project";
 import { MessageFu } from "@/utils/message";
 import A1OupFile from "./A1OupFile";
@@ -25,9 +25,10 @@ import { authFilesLookFu, urlChangeFu } from "@/utils/authFilesLook";
 
 type Props = {
   projectId: number;
+  projectName: string;
 };
 
-function A1Outer({ projectId }: Props) {
+function A1Outer({ projectId, projectName }: Props) {
   const dispatch = useDispatch();
 
   // 从仓库获取左侧写死列表 和 展示列表
@@ -122,7 +123,7 @@ function A1Outer({ projectId }: Props) {
   // 点击表格里面的删除
   const delById = useCallback(
     async (id: number) => {
-      const res = await A2_APIOdel(id);
+      const res = await A1_APIOdel(id);
       if (res.code === 0) {
         MessageFu.success("删除成功!");
         getListFu();
@@ -132,17 +133,22 @@ function A1Outer({ projectId }: Props) {
   );
 
   // 点击表格里面的 文件夹 的下载
-  const downFilesFu = useCallback((id: number) => {
-    console.log("ssss,点击文件夹的下载", id);
+  const downFilesFu = useCallback(async (id: number, name: string) => {
+    const res = await A1_APIOdownload(id);
+    if (res.code === 0) {
+      urlChangeFu(res.data, true, undefined, name);
+    }
   }, []);
 
   // 点击批量下载
   const downSelectFu = useCallback(async () => {
-    const res = await A2_APIOdownload(selectedRowKeys.join(","));
+    const res = await A1_APIOdownload(selectedRowKeys.join(","));
     if (res.code === 0) {
-      console.log("批量下载", res);
+      urlChangeFu(res.data, true, undefined, projectName);
+      // 清空选中
+      setSelectedRowKeys([]);
     }
-  }, [selectedRowKeys]);
+  }, [projectName, selectedRowKeys]);
 
   // 点击-批量上传
   const [upFileId, setUpFileId] = useState(0);
@@ -196,7 +202,7 @@ function A1Outer({ projectId }: Props) {
               <Button
                 size="small"
                 type="text"
-                onClick={() => downFilesFu(item.id)}
+                onClick={() => downFilesFu(item.id, item.name)}
               >
                 下载
               </Button>
@@ -244,8 +250,21 @@ function A1Outer({ projectId }: Props) {
 
   // 当前位置
   const nowLoc = useMemo(() => {
-    return tab1.name + (tab2.id ? ` / ${tab2.name}` : "");
-  }, [tab1.name, tab2.id, tab2.name]);
+    return {
+      tag: (
+        <>
+          <span
+            className="A1OnowLocRow"
+            onClick={() => cutTab1Fu(tab1.id, tab1.name)}
+          >
+            {tab1.name}
+          </span>
+          {tab2.id ? <span> / {tab2.name}</span> : null}
+        </>
+      ),
+      txt: tab1.name + (tab2.id ? ` / ${tab2.name}` : ""),
+    };
+  }, [cutTab1Fu, tab1.id, tab1.name, tab2.id, tab2.name]);
 
   return (
     <div className={styles.A1Outer}>
@@ -260,7 +279,7 @@ function A1Outer({ projectId }: Props) {
             onChange={(e) => searchKeyChange(e)}
           />
           &emsp;&emsp;
-          <span className="A1OnowLoc">当前位置:{nowLoc}</span>
+          <span className="A1OnowLoc">当前位置:{nowLoc.tag}</span>
         </div>
         <div className="A1Otop2">
           {tab2.id ? null : (
@@ -370,7 +389,7 @@ function A1Outer({ projectId }: Props) {
         <A1OupFile
           myUrl={baseURL + "cms/item/upload"}
           fromData={{ parentId: upFileId, projectId }}
-          nowLoc={nowLoc}
+          nowLoc={nowLoc.txt}
           closeFu={() => setUpFileId(0)}
           upFileFu={() => getListFu()}
         />

+ 102 - 0
src/pages/A1Project/A1User/A1UserAdd.tsx

@@ -0,0 +1,102 @@
+import { A1UtableType } from "@/types";
+import { Button, Form, FormInstance, Modal, Popconfirm, Select } from "antd";
+import React, { useCallback, useRef } from "react";
+import styles from "./index.module.scss";
+import { useSelector } from "react-redux";
+import { RootState } from "@/store";
+
+type Props = {
+  info: A1UtableType;
+  closeFu: () => void;
+  editFu: () => void;
+};
+
+function A1UserAdd({ info, closeFu, editFu }: Props) {
+  // 表单的ref
+  const FormBoxRef = useRef<FormInstance>(null);
+
+  // 从仓库拿 项目职能 下拉框
+  const arr1 = useSelector((state: RootState) => state.A2Dict.A2Tab1_1Obj.job);
+
+  // 从仓库拿 用户姓名 下拉框
+  const arr2 = useSelector((state: RootState) => state.A3User.tableInfo.list);
+
+  // 没有通过校验
+  const onFinishFailed = useCallback(() => {}, []);
+
+  // 通过校验点击确定
+  const onFinish = useCallback(async (value: any) => {
+    console.log("ccc");
+  }, []);
+
+  return (
+    <Modal
+      wrapClassName={styles.A1UAdd}
+      destroyOnClose
+      open={true}
+      title={info.id === -1 ? "新增成员" : "编辑成员"}
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className="A1UAmain">
+        <Form
+          scrollToFirstError={true}
+          ref={FormBoxRef}
+          labelCol={{ span: 5 }}
+          name="basic"
+          onFinish={onFinish}
+          onFinishFailed={onFinishFailed}
+          autoComplete="off"
+        >
+          <Form.Item
+            label="项目职能"
+            name="aaaa"
+            rules={[{ required: true, message: "请选择项目职能!" }]}
+          >
+            <Select
+              placeholder="请选择"
+              options={arr1.map((v) => ({ label: v.name, value: v.id }))}
+            />
+          </Form.Item>
+
+          <Form.Item
+            label="用户"
+            name="bbbb"
+            rules={[{ required: true, message: "请选择用户!" }]}
+          >
+            <Select
+              placeholder="请选择"
+              options={arr2
+                .filter((v) => v.userName !== "admin")
+                .map((v) => ({
+                  label: v.userName + " - " + v.realName,
+                  value: v.id,
+                }))}
+            />
+          </Form.Item>
+
+          <div className="A1UAbtn">
+            <Popconfirm
+              title="放弃编辑后,信息将不会保存!"
+              okText="放弃"
+              cancelText="取消"
+              onConfirm={closeFu}
+              okButtonProps={{ loading: false }}
+            >
+              <Button>取消</Button>
+            </Popconfirm>
+            &emsp;
+            <Button type="primary" htmlType="submit">
+              确定
+            </Button>
+          </div>
+        </Form>
+      </div>
+    </Modal>
+  );
+}
+
+const MemoA1UserAdd = React.memo(A1UserAdd);
+
+export default MemoA1UserAdd;

+ 60 - 0
src/pages/A1Project/A1User/index.module.scss

@@ -0,0 +1,60 @@
+.A1User {
+  width: 100%;
+  height: 100%;
+
+  :global {
+    .A1Utop {
+      padding: 0 30px 0 5px;
+      margin-top: 15px;
+      display: flex;
+      justify-content: space-between;
+    }
+
+    .A1UTableBox {
+      margin-top: 15px;
+      height: calc(100% - 60px);
+      overflow: hidden;
+      .ant-table-body {
+        height: 610px;
+        overflow-y: auto !important;
+
+        .ant-table-row {
+          .ant-table-cell {
+            padding: 10px;
+          }
+        }
+      }
+    }
+
+  }
+}
+
+
+
+// 弹窗--------
+.A1UAdd {
+  :global {
+
+    .ant-modal-close {
+      display: none;
+    }
+
+    // .ant-modal {
+    //   width: 800px !important;
+    // }
+
+
+    .A1UAmain {
+      margin-top: 10px;
+      border-top: 1px solid #999999;
+      padding: 50px 30px 20px;
+
+      .A1UAbtn {
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        margin-top: 60px;
+      }
+    }
+  }
+}

+ 150 - 0
src/pages/A1Project/A1User/index.tsx

@@ -0,0 +1,150 @@
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import styles from "./index.module.scss";
+import { Button, Input, Popconfirm, Table } from "antd";
+import { A1_APIUgeiList } from "@/store/action/A1Project";
+import { A1UtableType } from "@/types";
+import A1UserAdd from "./A1UserAdd";
+
+type Props = {
+  projectId: number;
+};
+
+function A1User({ projectId }: Props) {
+  const [searchKey, setSearchKey] = useState("");
+
+  const getListFu = useCallback(
+    async (val: string) => {
+      const res = await A1_APIUgeiList(projectId, val);
+      if (res.code === 0) setData(res.data);
+    },
+    [projectId]
+  );
+
+  useEffect(() => {
+    getListFu(searchKey);
+  }, [getListFu, searchKey]);
+
+  const [data, setData] = useState<A1UtableType[]>([]);
+
+  // 搜索项的输入
+  const searchKeyTime = useRef(-1);
+  const searchKeyChange = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>) => {
+      clearTimeout(searchKeyTime.current);
+      searchKeyTime.current = window.setTimeout(() => {
+        setSearchKey(e.target.value);
+      }, 500);
+    },
+    []
+  );
+
+  // 点击删除
+  const delById = useCallback((id: number) => {}, []);
+
+  const columns = useMemo(() => {
+    return [
+      // {
+      //   width: 100,
+      //   title: "序号",
+      //   render: (item: A1UtableType) =>()
+      // },
+      {
+        title: "项目职能",
+        dataIndex: "name",
+      },
+      {
+        title: "部门",
+        dataIndex: "deptId",
+      },
+      {
+        title: "角色",
+        dataIndex: "projectId",
+      },
+      {
+        title: "姓名",
+        dataIndex: "realName",
+      },
+      {
+        title: "操作",
+        render: (item: A1UtableType) => (
+          <>
+            <Button size="small" type="text">
+              编辑
+            </Button>
+
+            <Popconfirm
+              title="删除后无法恢复,是否删除?"
+              okText="删除"
+              cancelText="取消"
+              onConfirm={() => delById(item.id)}
+              okButtonProps={{ loading: false }}
+            >
+              <Button size="small" type="text" danger>
+                删除
+              </Button>
+            </Popconfirm>
+          </>
+        ),
+      },
+    ];
+  }, [delById]);
+
+  // 编辑 新增 的数据
+  const [addInfo, setAddInfo] = useState({} as A1UtableType);
+
+  return (
+    <div className={styles.A1User}>
+      {/* 顶部 */}
+      <div className="A1Utop">
+        <div className="A1Utop1">
+          <span>搜索项:</span>
+          <Input
+            maxLength={30}
+            style={{ width: 300 }}
+            placeholder="请输入成员姓名"
+            allowClear
+            onChange={(e) => searchKeyChange(e)}
+          />
+        </div>
+        <div className="A1Utop2">
+          <Button
+            type="primary"
+            onClick={() => setAddInfo({ id: -1, projectId } as A1UtableType)}
+          >
+            新增
+          </Button>
+        </div>
+      </div>
+
+      {/* 表格主体 */}
+      <div className="A1UTableBox">
+        <Table
+          scroll={{ y: 610 }}
+          dataSource={data}
+          columns={columns}
+          rowKey="id"
+          pagination={false}
+        />
+      </div>
+
+      {/* 编辑和新增出来的弹窗 */}
+      {addInfo.id ? (
+        <A1UserAdd
+          info={addInfo}
+          closeFu={() => setAddInfo({ id: 0 } as A1UtableType)}
+          editFu={() => getListFu(searchKey)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoA1User = React.memo(A1User);
+
+export default MemoA1User;

+ 2 - 2
src/pages/A1Project/index.tsx

@@ -13,7 +13,7 @@ import { A1TableType } from "@/types";
 import A1Add from "./A1Add";
 import A1Down from "./A1Down";
 import A1Look from "./A1Look";
-import { A1_APIgetList, A2_APIdelProject } from "@/store/action/A1Project";
+import { A1_APIgetList, A1_APIdelProject } from "@/store/action/A1Project";
 import { getUserListAPI } from "@/store/action/A3User";
 import { A2_APIgetList1 } from "@/store/action/A2Dict";
 import { scheduleCollectArr, scheduleAuditArr, projectRoleArr } from "./data";
@@ -160,7 +160,7 @@ function A1Project() {
   // 点击删除
   const delById = useCallback(
     async (id: number) => {
-      const res = await A2_APIdelProject(id);
+      const res = await A1_APIdelProject(id);
       if (res.code === 0) {
         MessageFu.success("删除成功!");
         A1getListFu();

+ 2 - 2
src/pages/Layout/index.tsx

@@ -27,7 +27,7 @@ import NotFound from "@/components/NotFound";
 import tabLeftArr from "./data";
 import { RootState } from "@/store";
 import { RouterType } from "@/types";
-import { A2_APIOgetHardCoded } from "@/store/action/A1Project";
+import { A1_APIOgetHardCoded } from "@/store/action/A1Project";
 
 function Layout() {
   const dispatch = useDispatch();
@@ -43,7 +43,7 @@ function Layout() {
     dispatch(A2_APIgetListFile());
 
     // 获取 项目管理-项目文件-左侧一级写死目录
-    dispatch(A2_APIOgetHardCoded())
+    dispatch(A1_APIOgetHardCoded())
 
   }, [dispatch]);
 

+ 34 - 20
src/store/action/A1Project.ts

@@ -19,36 +19,36 @@ export const A1_APIgetList = (data: any) => {
 /**
  * 新增、编辑 项目
  */
-export const A2_APIaddProject = (data: any) => {
+export const A1_APIaddProject = (data: any) => {
   return http.post("cms/project/save", data);
 };
 
 /**
  * 通过id获取项目详情
  */
-export const A2_APIgetInfoById = (id: number) => {
+export const A1_APIgetInfoById = (id: number) => {
   return http.get(`cms/project/detail/${id}`);
 };
 
 /**
  * 通过id删除项目
  */
-export const A2_APIdelProject = (id: number) => {
+export const A1_APIdelProject = (id: number) => {
   return http.get(`cms/project/remove/${id}`);
 };
 
 /**
- * 通过id删除项目
+ * 通过id获取下载列表
  */
-export const A2_APIgetDownList = (id: number) => {
+export const A1_APIgetDownList = (id: number) => {
   return http.get(`cms/inside/download/echoList/${id}`);
 };
 
-// --------------------------  项目文件
+// --------------------------  项目文件  --------------------------
 /**
- * 获取 左侧一级 写死目录
+ * 项目文件---------获取 左侧一级 写死目录
  */
-export const A2_APIOgetHardCoded = () => {
+export const A1_APIOgetHardCoded = () => {
   return async (dispatch: AppDispatch) => {
     const res = await http.get("cms/item/getHardCoded");
     if (res.code === 0) {
@@ -58,14 +58,14 @@ export const A2_APIOgetHardCoded = () => {
 };
 
 /**
- * 新增、修改
+ * 项目文件---------新增、修改
  */
-export const A2_APIOadd = (data: any) => {
+export const A1_APIOadd = (data: any) => {
   return http.post("cms/item/save", data);
 };
 
 /**
- * 获取列表
+ * 项目文件---------获取列表
  */
 export const A1_APIOgetList = (data: any) => {
   return async (dispatch: AppDispatch) => {
@@ -81,29 +81,28 @@ export const A1_APIOgetList = (data: any) => {
 };
 
 /**
- * 批量下载
+ * 项目文件---------批量下载
  */
-export const A2_APIOdownload = (ids: string) => {
+export const A1_APIOdownload = (ids: string | number) => {
   return http.get(`cms/item/download/${ids}`);
 };
 
 /**
- * 批量下载
+ * 项目文件---------删除文件
  */
-export const A2_APIOdel = (id: number) => {
+export const A1_APIOdel = (id: number) => {
   return http.get(`cms/item/remove/${id}`);
 };
 
 /**
  * 项目文件---------批量上传点击确定
  */
-export const A2_APIOupFileIds = (ids: string) => {
+export const A1_APIOupFileIds = (ids: string) => {
   return http.post(`cms/item/update/display?fileId=${ids}`);
 };
 
-
 /**
- * 获取列表 ---- 文件移动的展示
+ * 项目文件---------获取列表 ---- 文件移动的展示
  */
 export const A1_APIOgetListMove = (projectId: number, parentId: number) => {
   return http.post("cms/item/pageList", {
@@ -117,6 +116,21 @@ export const A1_APIOgetListMove = (projectId: number, parentId: number) => {
 /**
  * 项目文件---------移动文件
  */
-export const A2_APIOmove = (id:number,parentId:number) => {
+export const A1_APIOmove = (id: number, parentId: number) => {
   return http.get(`cms/item/move/${id}/${parentId}`);
-};
+};
+
+/**
+ * 项目文件(内控文件)---------上传文件成功 还没有点确定 的时候的 真删除
+ */
+export const A1_APIremoveSure = (fileIds: string[]) => {
+  return http.post("cms/dict/delFile", { fileIds });
+};
+
+// --------------------------  项目成员  --------------------------
+/**
+ * 项目成员---------获取列表
+ */
+export const A1_APIUgeiList = (projectId: number, val: string) => {
+  return http.get(`cms/member/getList/${projectId}?searchKey=${val}`);
+};

+ 13 - 0
src/types/api/A1Project.d.ts

@@ -32,4 +32,17 @@ export type A1OFileType ={
 	projectId?: any;
 	type: 0|1;
 	updateTime: string;
+}
+
+export type A1UtableType ={
+	createTime: string;
+	creatorName: string;
+	deptId: number;
+	id: number;
+	name: string;
+	projectId: number;
+	realName: string;
+	roleName: string;
+	updateTime: string;
+	userId: number;
 }

+ 10 - 13
src/utils/authFilesLook.ts

@@ -7,7 +7,7 @@ export const urlChangeFu = (
   url: string,
   flag: boolean,
   type?: "img" | "video" | "audio" | "pdf",
-  name?:string
+  name?: string
 ) => {
   // flag true 为 生成 a标签 下载
 
@@ -24,18 +24,15 @@ export const urlChangeFu = (
       const srcRes = window.URL.createObjectURL(blob);
 
       if (flag) {
-       
         // 创建a标签下载
-        let link = document.createElement('a') //创建a标签
-        link.style.display = 'none'  //使其隐藏
-        link.href = srcRes //赋予文件下载地址
-        link.setAttribute('download',name!) //设置下载属性 以及文件名
-        document.body.appendChild(link) //a标签插至页面中
-        link.click() //强制触发a标签事件
-        document.body.removeChild(link)
-
-      }
-      else {
+        let link = document.createElement("a"); //创建a标签
+        link.style.display = "none"; //使其隐藏
+        link.href = srcRes; //赋予文件下载地址
+        link.setAttribute("download", name!); //设置下载属性 以及文件名
+        document.body.appendChild(link); //a标签插至页面中
+        link.click(); //强制触发a标签事件
+        document.body.removeChild(link);
+      } else {
         if (type === "img") {
           store.dispatch({
             type: "layout/lookBigImg",
@@ -60,6 +57,7 @@ export const urlChangeFu = (
     }
   };
 
+  // 携带token
   xhr.setRequestHeader("token", getTokenFu());
 
   xhr.send();
@@ -103,4 +101,3 @@ export const authFilesLookFu = (name: string, url?: string) => {
 
   return flag;
 };
-