|
@@ -1,5 +1,6 @@
|
|
import http from "@/utils/http";
|
|
import http from "@/utils/http";
|
|
import { AppDispatch } from "..";
|
|
import { AppDispatch } from "..";
|
|
|
|
+import { B1tableAreaType } from "@/types";
|
|
/**
|
|
/**
|
|
* 获取 进度统计 表格列表(存到仓库)-按机房
|
|
* 获取 进度统计 表格列表(存到仓库)-按机房
|
|
*/
|
|
*/
|
|
@@ -33,13 +34,23 @@ export const B1_APIgetlistArea = (data: any) => {
|
|
return async (dispatch: AppDispatch) => {
|
|
return async (dispatch: AppDispatch) => {
|
|
const res = await http.post("cms/schedule/report/region", data);
|
|
const res = await http.post("cms/schedule/report/region", data);
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- const obj = {
|
|
|
|
- list: res.data.map((v: any) => ({
|
|
|
|
|
|
+ const arr: any = res.data;
|
|
|
|
+
|
|
|
|
+ const arr2: any = [];
|
|
|
|
+
|
|
|
|
+ arr.forEach((v: any, i: number) => {
|
|
|
|
+ const cityTxt = `${v.province}${v.city ? "/" + v.city : ""}${
|
|
|
|
+ v.region ? "/" + v.region : ""
|
|
|
|
+ }`;
|
|
|
|
+ arr2.push({
|
|
...v,
|
|
...v,
|
|
- id: `${v.province}${v.city ? "/" + v.city : ""}${
|
|
|
|
- v.region ? "/" + v.region : ""
|
|
|
|
- }`,
|
|
|
|
- })),
|
|
|
|
|
|
+ cityAll: cityTxt,
|
|
|
|
+ id: cityTxt ? cityTxt : i,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const obj = {
|
|
|
|
+ list: arr2,
|
|
total: res.data.length,
|
|
total: res.data.length,
|
|
};
|
|
};
|
|
dispatch({ type: "B1/getListArea", payload: obj });
|
|
dispatch({ type: "B1/getListArea", payload: obj });
|