|
|
@@ -9,7 +9,11 @@ import styles from "./index.module.scss";
|
|
|
import { Button, Cascader, Input, Select, Table, Tooltip } from "antd";
|
|
|
import { useSelector } from "react-redux";
|
|
|
import { RootState } from "@/store";
|
|
|
-import { A1_APIIdowns, A1_APIIgetList } from "@/store/action/A1Project";
|
|
|
+import {
|
|
|
+ A1_APIIdowns,
|
|
|
+ A1_APIIgetIresList,
|
|
|
+ A1_APIIgetList,
|
|
|
+} from "@/store/action/A1Project";
|
|
|
import { A1ItableType } from "@/types";
|
|
|
import { authFilesLookFu, urlChangeFu } from "@/utils/authFilesLook";
|
|
|
import A1IRemove from "./A1IRemove";
|
|
|
@@ -17,6 +21,7 @@ import A1ILack from "./A1ILack";
|
|
|
import A1IAudit from "./A1IAudit";
|
|
|
import A1IupFile from "./A1IupFile";
|
|
|
import { baseURL } from "@/utils/http";
|
|
|
+import { A2Tab2Type } from "@/types/api/A2Dict";
|
|
|
|
|
|
type FromType = {
|
|
|
searchKey: string;
|
|
|
@@ -85,8 +90,19 @@ function A1Inner({ projectId, myTitle, projectName }: Props) {
|
|
|
[fromData]
|
|
|
);
|
|
|
|
|
|
- // 从仓库获取文件类别数据
|
|
|
- const arr1 = useSelector((state: RootState) => state.A2Dict.A2Tab2Arr);
|
|
|
+ // 获取 内控文件属性 下拉 数据(已过滤权限)
|
|
|
+
|
|
|
+ const [iResList, setIResList] = useState<A2Tab2Type[]>([]);
|
|
|
+ const getIresListFu = useCallback(async () => {
|
|
|
+ const res = await A1_APIIgetIresList();
|
|
|
+ if (res.code === 0) {
|
|
|
+ setIResList(res.data);
|
|
|
+ }
|
|
|
+ }, []);
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ getIresListFu();
|
|
|
+ }, [getIresListFu]);
|
|
|
|
|
|
// 从仓库获取部门 级联 信息
|
|
|
const deptList = useSelector((state: RootState) => state.A5Section.tableList);
|
|
|
@@ -115,28 +131,29 @@ function A1Inner({ projectId, myTitle, projectName }: Props) {
|
|
|
|
|
|
const txt = num === 0 ? "待审批" : num === 1 ? "审批通过" : "审批驳回";
|
|
|
|
|
|
- const dom = item.auditDesc&&num !== 0 ? (
|
|
|
- <Tooltip title={item.auditDesc}>
|
|
|
+ const dom =
|
|
|
+ item.auditDesc && num !== 0 ? (
|
|
|
+ <Tooltip title={item.auditDesc}>
|
|
|
+ <div
|
|
|
+ className="iconHoverTit A1ItablauidtBox"
|
|
|
+ onClick={() =>
|
|
|
+ setAuditInfo({ id: item.id, sta: num, txt: item.auditDesc || "" })
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {txt}
|
|
|
+ <div className="iconHoverTitTxt">?</div>
|
|
|
+ </div>
|
|
|
+ </Tooltip>
|
|
|
+ ) : (
|
|
|
<div
|
|
|
- className="iconHoverTit A1ItablauidtBox"
|
|
|
+ className="A1ItablauidtBox"
|
|
|
onClick={() =>
|
|
|
setAuditInfo({ id: item.id, sta: num, txt: item.auditDesc || "" })
|
|
|
}
|
|
|
>
|
|
|
- {txt}
|
|
|
- <div className="iconHoverTitTxt">?</div>
|
|
|
+ {txt}
|
|
|
</div>
|
|
|
- </Tooltip>
|
|
|
- ) : (
|
|
|
- <div
|
|
|
- className="A1ItablauidtBox"
|
|
|
- onClick={() =>
|
|
|
- setAuditInfo({ id: item.id, sta: num, txt: item.auditDesc || "" })
|
|
|
- }
|
|
|
- >
|
|
|
- {txt}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ );
|
|
|
|
|
|
return dom;
|
|
|
}, []);
|
|
|
@@ -272,7 +289,7 @@ function A1Inner({ projectId, myTitle, projectName }: Props) {
|
|
|
onChange={(e) => setFromData({ ...fromData, attrId: e })}
|
|
|
options={[
|
|
|
{ value: "", label: "全部" },
|
|
|
- ...arr1.map((v) => ({ value: v.id, label: v.name })),
|
|
|
+ ...iResList.map((v) => ({ value: v.id, label: v.name })),
|
|
|
]}
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -380,6 +397,7 @@ function A1Inner({ projectId, myTitle, projectName }: Props) {
|
|
|
closeFu={() => setUpFileOpen(false)}
|
|
|
myTitle={myTitle}
|
|
|
projectId={projectId}
|
|
|
+ typeData={iResList}
|
|
|
/>
|
|
|
) : null}
|
|
|
</div>
|