|
@@ -21,6 +21,7 @@ import mapDataAll from "../C1User/AddUser/city";
|
|
|
import { B1options1, B1options1Obj } from "../B1Plan/data";
|
|
|
import {
|
|
|
B2_APIgetlist,
|
|
|
+ B2_APIgetlistAll,
|
|
|
B2_APIremove,
|
|
|
B2_APIreset,
|
|
|
} from "@/store/action/B2Scene";
|
|
@@ -296,62 +297,71 @@ function B2Scene() {
|
|
|
return MessageFu.warning("当前搜索条件没有数据!");
|
|
|
const name = "场景审核" + dayjs(new Date()).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
- const option = {
|
|
|
- fileName: name,
|
|
|
- datas: [
|
|
|
- {
|
|
|
- sheetData: B2TableList.list.map((v) => ({
|
|
|
- roomNum: v.roomNum || "(空)",
|
|
|
- myCity:
|
|
|
- !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
|
|
|
- pmName: v.creatorId === 1 ? "管理员" : v.pmName || "(空)",
|
|
|
- sceneName: v.sceneName || "(空)",
|
|
|
- link: v.link || "(空)",
|
|
|
- sceneCode: v.sceneCode || "(空)",
|
|
|
- cameraSn: v.cameraSn || "(空)",
|
|
|
- shootTime: v.shootTime || "(空)",
|
|
|
- snapUseDept: v.snapUseDept || "(空)",
|
|
|
- snapUseName: v.snapUseName || "(空)",
|
|
|
- auditStatus: Reflect.get(B1options1Obj, v.auditStatus) || "(空)",
|
|
|
- auditTime: v.auditTime || "(空)",
|
|
|
- })),
|
|
|
- sheetName: name,
|
|
|
- sheetFilter: [
|
|
|
- "roomNum",
|
|
|
- "myCity",
|
|
|
- "pmName",
|
|
|
- "sceneName",
|
|
|
- "link",
|
|
|
- "sceneCode",
|
|
|
- "cameraSn",
|
|
|
- "shootTime",
|
|
|
- "snapUseDept",
|
|
|
- "snapUseName",
|
|
|
- "auditStatus",
|
|
|
- "auditTime",
|
|
|
- ],
|
|
|
- sheetHeader: [
|
|
|
- "机房编码",
|
|
|
- "站址地区",
|
|
|
- "项目经理",
|
|
|
- "场景名称",
|
|
|
- "场景链接",
|
|
|
- "场景码",
|
|
|
- "相机SN码",
|
|
|
- "拍摄时间",
|
|
|
- "领用单位",
|
|
|
- "领用人员",
|
|
|
- "审核状态",
|
|
|
- "审核时间",
|
|
|
- ],
|
|
|
- columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
+ const res = await B2_APIgetlistAll({
|
|
|
+ ...tableSelect,
|
|
|
+ site: tableSelect.site ? tableSelect.site[1] : null,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 99999,
|
|
|
+ });
|
|
|
+ if (res.code === 0) {
|
|
|
+ const option = {
|
|
|
+ fileName: name,
|
|
|
+ datas: [
|
|
|
+ {
|
|
|
+ sheetData: res.data.records.map((v: B2tableType) => ({
|
|
|
+ roomNum: v.roomNum || "(空)",
|
|
|
+ myCity:
|
|
|
+ !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
|
|
|
+ pmName: v.creatorId === 1 ? "管理员" : v.pmName || "(空)",
|
|
|
+ sceneName: v.sceneName || "(空)",
|
|
|
+ link: v.link || "(空)",
|
|
|
+ sceneCode: v.sceneCode || "(空)",
|
|
|
+ cameraSn: v.cameraSn || "(空)",
|
|
|
+ shootTime: v.shootTime || "(空)",
|
|
|
+ snapUseDept: v.snapUseDept || "(空)",
|
|
|
+ snapUseName: v.snapUseName || "(空)",
|
|
|
+ auditStatus:
|
|
|
+ Reflect.get(B1options1Obj, v.auditStatus) || "(空)",
|
|
|
+ auditTime: v.auditTime || "(空)",
|
|
|
+ })),
|
|
|
+ sheetName: name,
|
|
|
+ sheetFilter: [
|
|
|
+ "roomNum",
|
|
|
+ "myCity",
|
|
|
+ "pmName",
|
|
|
+ "sceneName",
|
|
|
+ "link",
|
|
|
+ "sceneCode",
|
|
|
+ "cameraSn",
|
|
|
+ "shootTime",
|
|
|
+ "snapUseDept",
|
|
|
+ "snapUseName",
|
|
|
+ "auditStatus",
|
|
|
+ "auditTime",
|
|
|
+ ],
|
|
|
+ sheetHeader: [
|
|
|
+ "机房编码",
|
|
|
+ "站址地区",
|
|
|
+ "项目经理",
|
|
|
+ "场景名称",
|
|
|
+ "场景链接",
|
|
|
+ "场景码",
|
|
|
+ "相机SN码",
|
|
|
+ "拍摄时间",
|
|
|
+ "领用单位",
|
|
|
+ "领用人员",
|
|
|
+ "审核状态",
|
|
|
+ "审核时间",
|
|
|
+ ],
|
|
|
+ columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
|
|
|
- const toExcel = new ExportJsonExcel(option); //new
|
|
|
- toExcel.saveExcel(); //保存
|
|
|
- }, [B2TableList.list]);
|
|
|
+ const toExcel = new ExportJsonExcel(option); //new
|
|
|
+ toExcel.saveExcel(); //保存
|
|
|
+ }
|
|
|
+ }, [B2TableList.list, tableSelect]);
|
|
|
|
|
|
// 审核弹窗的信息
|
|
|
const [auditInfo, setAuditInfo] = useState({
|
|
@@ -436,7 +446,7 @@ function B2Scene() {
|
|
|
pagination={{
|
|
|
showQuickJumper: true,
|
|
|
position: ["bottomCenter"],
|
|
|
- // showSizeChanger: true,
|
|
|
+ showSizeChanger: true,
|
|
|
current: tableSelect.pageNum,
|
|
|
pageSize: tableSelect.pageSize,
|
|
|
total: B2TableList.total,
|