shaogen1995 1 年之前
父节点
当前提交
96e885ce0b

+ 15 - 16
src/store/action/A1event.ts

@@ -1,5 +1,5 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
+import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  *事件管理-列表
@@ -7,38 +7,37 @@ import { AppDispatch } from "..";
 
 export const A1_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post("cms/event/pageList", data);
+    const res = await http.post('cms/event/pageList', data)
     if (res.code === 0) {
       const obj = {
         list: res.data.records.map((v: any) => ({
           ...v,
-          activityTime:
-            v.dateStart + " 至 " + (v.dateEnd ? v.dateEnd : "长期有效"),
+          activityTime: v.dateStart + ' 至 ' + (v.dateEnd ? v.dateEnd : '长期有效')
         })),
-        total: res.data.total,
-      };
-      dispatch({ type: "A1/getList", payload: obj });
+        total: res.data.total
+      }
+      dispatch({ type: 'A1/getList', payload: obj })
     }
-  };
-};
+  }
+}
 
 /**
  * 事件管理-删除
  */
 export const A1_APIdel = (id: number) => {
-  return http.get(`cms/event/removes/${id}`);
-};
+  return http.get(`cms/event/removes/${id}`)
+}
 
 /**
  * 事件管理-获取详情
  */
 export const A1_APIgetInfo = (id: number) => {
-  return http.get(`cms/event/detail/${id}`);
-};
+  return http.get(`cms/event/detail/${id}`)
+}
 
 /**
  * 事件管理-新增、编辑
  */
 export const A1_APIsave = (data: any) => {
-  return http.post("cms/event/save", data);
-};
+  return http.post('cms/event/save', data)
+}

+ 17 - 20
src/store/action/A2exhibition.ts

@@ -1,5 +1,5 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
+import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  *展览管理-列表
@@ -7,48 +7,45 @@ import { AppDispatch } from "..";
 
 export const A2_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post("cms/exhibition/pageList", data);
+    const res = await http.post('cms/exhibition/pageList', data)
     if (res.code === 0) {
       const obj = {
-        // 待完善
         list: res.data.records.map((v: any) => ({
           ...v,
           activityTime:
-            v.type === "long"
-              ? ""
-              : v.dateStart + " 至 " + (v.dateEnd ? v.dateEnd : "长期有效"),
+            v.type === 'long' ? '' : v.dateStart + ' 至 ' + (v.dateEnd ? v.dateEnd : '长期有效')
         })),
-        total: res.data.total,
-      };
-      dispatch({ type: "A2/getList", payload: obj });
+        total: res.data.total
+      }
+      dispatch({ type: 'A2/getList', payload: obj })
     }
-  };
-};
+  }
+}
 
 /**
  * 展览管理-删除
  */
 export const A2_APIdel = (id: number) => {
-  return http.get(`cms/exhibition/removes/${id}`);
-};
+  return http.get(`cms/exhibition/removes/${id}`)
+}
 
 /**
  * 展览管理-获取详情
  */
 export const A2_APIgetInfo = (id: number) => {
-  return http.get(`cms/exhibition/detail/${id}`);
-};
+  return http.get(`cms/exhibition/detail/${id}`)
+}
 
 /**
  * 展览管理-新增、编辑
  */
 export const A2_APIsave = (data: any) => {
-  return http.post("cms/exhibition/save", data);
-};
+  return http.post('cms/exhibition/save', data)
+}
 
 /**
  * 展览管理-修改 展品 图片的名字
  */
 export const A2_APIchangeImgName = (data: any) => {
-  return http.post("cms/exhibition/file/update", data);
-};
+  return http.post('cms/exhibition/file/update', data)
+}

+ 17 - 20
src/store/action/A3holding.ts

@@ -1,5 +1,5 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
+import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  *馆藏管理-列表
@@ -7,48 +7,45 @@ import { AppDispatch } from "..";
 
 export const A3_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post("cms/collection/pageList", data);
+    const res = await http.post('cms/collection/pageList', data)
     if (res.code === 0) {
       const obj = {
-        // 待完善
         list: res.data.records.map((v: any) => ({
           ...v,
           activityTime:
-            v.type === "long"
-              ? ""
-              : v.dateStart + " 至 " + (v.dateEnd ? v.dateEnd : "长期有效"),
+            v.type === 'long' ? '' : v.dateStart + ' 至 ' + (v.dateEnd ? v.dateEnd : '长期有效')
         })),
-        total: res.data.total,
-      };
-      dispatch({ type: "A3/getList", payload: obj });
+        total: res.data.total
+      }
+      dispatch({ type: 'A3/getList', payload: obj })
     }
-  };
-};
+  }
+}
 
 /**
  * 馆藏管理-删除
  */
 export const A3_APIdel = (id: number) => {
-  return http.get(`cms/collection/removes/${id}`);
-};
+  return http.get(`cms/collection/removes/${id}`)
+}
 
 /**
  * 馆藏管理-获取详情
  */
 export const A3_APIgetInfo = (id: number) => {
-  return http.get(`cms/collection/detail/${id}`);
-};
+  return http.get(`cms/collection/detail/${id}`)
+}
 
 /**
  * 馆藏管理-新增、编辑
  */
 export const A3_APIsave = (data: any) => {
-  return http.post("cms/collection/save", data);
-};
+  return http.post('cms/collection/save', data)
+}
 
 /**
  * 馆藏管理-修改 展品 图片的名字
  */
 export const A3_APIchangeImgName = (data: any) => {
-  return http.post("cms/collection/file/update", data);
-};
+  return http.post('cms/collection/file/update', data)
+}

+ 14 - 15
src/store/action/A4study.ts

@@ -1,5 +1,5 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
+import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  *学习参与管理-列表
@@ -7,35 +7,34 @@ import { AppDispatch } from "..";
 
 export const A4_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post("cms/learn/pageList", data);
+    const res = await http.post('cms/learn/pageList', data)
     if (res.code === 0) {
       const obj = {
-        // 待完善
         list: res.data.records,
-        total: res.data.total,
-      };
-      dispatch({ type: "A4/getList", payload: obj });
+        total: res.data.total
+      }
+      dispatch({ type: 'A4/getList', payload: obj })
     }
-  };
-};
+  }
+}
 
 /**
  * 学习参与管理-删除
  */
 export const A4_APIdel = (id: number) => {
-  return http.get(`cms/learn/removes/${id}`);
-};
+  return http.get(`cms/learn/removes/${id}`)
+}
 
 /**
  * 学习参与管理-获取详情
  */
 export const A4_APIgetInfo = (id: number) => {
-  return http.get(`cms/learn/detail/${id}`);
-};
+  return http.get(`cms/learn/detail/${id}`)
+}
 
 /**
  * 学习参与管理-新增、编辑
  */
 export const A4_APIsave = (data: any) => {
-  return http.post("cms/learn/save", data);
-};
+  return http.post('cms/learn/save', data)
+}

+ 14 - 15
src/store/action/A5publish.ts

@@ -1,5 +1,5 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
+import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  *出版物-列表
@@ -7,35 +7,34 @@ import { AppDispatch } from "..";
 
 export const A5_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post("cms/publish/pageList", data);
+    const res = await http.post('cms/publish/pageList', data)
     if (res.code === 0) {
       const obj = {
-        // 待完善
         list: res.data.records,
-        total: res.data.total,
-      };
-      dispatch({ type: "A5/getList", payload: obj });
+        total: res.data.total
+      }
+      dispatch({ type: 'A5/getList', payload: obj })
     }
-  };
-};
+  }
+}
 
 /**
  * 出版物-删除
  */
 export const A5_APIdel = (id: number) => {
-  return http.get(`cms/publish/removes/${id}`);
-};
+  return http.get(`cms/publish/removes/${id}`)
+}
 
 /**
  * 出版物-获取详情
  */
 export const A5_APIgetInfo = (id: number) => {
-  return http.get(`cms/publish/detail/${id}`);
-};
+  return http.get(`cms/publish/detail/${id}`)
+}
 
 /**
  * 出版物-新增、编辑
  */
 export const A5_APIsave = (data: any) => {
-  return http.post("cms/publish/save", data);
-};
+  return http.post('cms/publish/save', data)
+}

+ 0 - 1
src/utils/tableData.ts

@@ -16,7 +16,6 @@
 
 import { A5topType } from '@/pages/A5publish/data'
 
-// };
 export const A1tableC = [
   ['text', '标题', 'name', 100],
   ['img', 'PC端封面', 'thumb'],