|
@@ -24,6 +24,7 @@ export type Fire = {
|
|
|
createTime: string;
|
|
|
creatorDeptId: string;
|
|
|
caseId: number;
|
|
|
+ mapShow: boolean;
|
|
|
creatorId: string;
|
|
|
creatorName: string;
|
|
|
deptId: string;
|
|
@@ -36,17 +37,28 @@ export type Fire = {
|
|
|
organizerDeptName: string;
|
|
|
organizerUsers: string;
|
|
|
projectAddress: string;
|
|
|
+ latAndLong: string;
|
|
|
+ latlng: string;
|
|
|
projectName: string;
|
|
|
projectSite: string;
|
|
|
projectSiteCode: string;
|
|
|
- mapUrl: string;
|
|
|
- latAndLong: string;
|
|
|
projectSn: string;
|
|
|
status: FireStatus;
|
|
|
statusDesc: string;
|
|
|
updateTime: string;
|
|
|
isDelete?: number;
|
|
|
- mapShow?: boolean;
|
|
|
+
|
|
|
+ field1: string;
|
|
|
+ field2: string;
|
|
|
+ field3: string;
|
|
|
+ field4: string;
|
|
|
+
|
|
|
+ field5: string;
|
|
|
+ field6: string;
|
|
|
+ field7: string;
|
|
|
+ field8: string;
|
|
|
+ field9: string;
|
|
|
+ field10: string;
|
|
|
};
|
|
|
|
|
|
export enum FirePaggingRoute {
|
|
@@ -58,11 +70,13 @@ type FirePaggingParams = PaggingReq<Fire & { queryType: FirePaggingRoute }>;
|
|
|
export const getFirePagging = async (params: FirePaggingParams) =>
|
|
|
(await axios.get(getFireList, { params })).data as PaggingRes<Fire>;
|
|
|
|
|
|
-export const addFire = async (fire: Omit<Fire, "id">) => axios.post(insertFire, fire);
|
|
|
+export const addFire = async (fire: Omit<Fire, "id">) =>
|
|
|
+ axios.post(insertFire, fire);
|
|
|
|
|
|
export const setFire = async (fire: Fire) => await axios.post(updateFire, fire);
|
|
|
|
|
|
-export const delFire = (fire: Fire) => setFire({ ...fire, isDelete: 1 });
|
|
|
+export const delFire = (fire: Fire, isDelete = 1) =>
|
|
|
+ setFire({ ...fire, isDelete: isDelete });
|
|
|
|
|
|
export const getFire = async (projectId: string) =>
|
|
|
(await axios.get<Fire>(fireDetail, { params: { type: 0, projectId } })).data;
|
|
@@ -80,8 +94,13 @@ export type FireLeaveMsg = {
|
|
|
createTime: number;
|
|
|
};
|
|
|
|
|
|
-export const getFireLeaveMsgPagging = async (params: PaggingReq<{ projectId: string }>) =>
|
|
|
- (await axios.get(getMessageList, { params })).data as PaggingRes<FireLeaveMsg>;
|
|
|
+export const getFireLeaveMsgPagging = async (
|
|
|
+ params: PaggingReq<{ projectId: string }>
|
|
|
+) =>
|
|
|
+ (await axios.get(getMessageList, { params }))
|
|
|
+ .data as PaggingRes<FireLeaveMsg>;
|
|
|
|
|
|
-export const addFireLeaveMsg = (params: { content: string; projectId: string }) =>
|
|
|
- axios.post(insertMessage, params);
|
|
|
+export const addFireLeaveMsg = (params: {
|
|
|
+ content: string;
|
|
|
+ projectId: string;
|
|
|
+}) => axios.post(insertMessage, params);
|