抽取sysNotice.js,修改所有引用文件
Showing
8 changed files
with
130 additions
and
122 deletions
src/api/sysNotice.js
0 → 100644
1 | /* | ||
2 | * @Description: 系统通知 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:02:32 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | /** | ||
11 | * @description: 新增系统通知 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function addSysNotice (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 编辑系统通知 | ||
25 | * @param {*} data | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function updateSysNotice (data) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
31 | method: 'post', | ||
32 | data | ||
33 | }) | ||
34 | } | ||
35 | |||
36 | // 获取通知列表 | ||
37 | /** | ||
38 | * @description: | ||
39 | * @param {*} data | ||
40 | * @author: renchao | ||
41 | */ | ||
42 | export function getSysNoticeList (data) { | ||
43 | return request({ | ||
44 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @description: 获取法律法规列表 | ||
52 | * @param {*} data | ||
53 | * @author: renchao | ||
54 | */ | ||
55 | export function getSysPolicyList (data) { | ||
56 | return request({ | ||
57 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
58 | method: 'post', | ||
59 | data | ||
60 | }) | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * @description: 删除系统通知 | ||
65 | * @param {*} params | ||
66 | * @author: renchao | ||
67 | */ | ||
68 | export function deleteSysNotice (params) { | ||
69 | return request({ | ||
70 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
71 | method: 'get', | ||
72 | params: params | ||
73 | }) | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * @description: 发布通知 | ||
78 | * @param {*} params | ||
79 | * @author: renchao | ||
80 | */ | ||
81 | export function publishNotice (params) { | ||
82 | return request({ | ||
83 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
84 | method: 'get', | ||
85 | params: params | ||
86 | }) | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * @description: 取消发布通知 | ||
91 | * @param {*} params | ||
92 | * @author: renchao | ||
93 | */ | ||
94 | export function unPublishNotice (params) { | ||
95 | return request({ | ||
96 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
97 | method: 'get', | ||
98 | params: params | ||
99 | }) | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * @description: 设置已读状态 | ||
104 | * @param {*} params | ||
105 | * @author: renchao | ||
106 | */ | ||
107 | export function setReadStatus (params) { | ||
108 | return request({ | ||
109 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
110 | method: 'get', | ||
111 | params: params | ||
112 | }) | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * @description: 一键设置已读 | ||
117 | * @author: renchao | ||
118 | */ | ||
119 | export function setAllRead () { | ||
120 | return request({ | ||
121 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
122 | method: 'get' | ||
123 | }) | ||
124 | } |
... | @@ -8,122 +8,6 @@ import request from '@/utils/request' | ... | @@ -8,122 +8,6 @@ import request from '@/utils/request' |
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * @description: 新增系统通知 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function addSysNotice (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 编辑系统通知 | ||
25 | * @param {*} data | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function updateSysNotice (data) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
31 | method: 'post', | ||
32 | data | ||
33 | }) | ||
34 | } | ||
35 | |||
36 | // 获取通知列表 | ||
37 | /** | ||
38 | * @description: | ||
39 | * @param {*} data | ||
40 | * @author: renchao | ||
41 | */ | ||
42 | export function getSysNoticeList (data) { | ||
43 | return request({ | ||
44 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @description: 获取法律法规列表 | ||
52 | * @param {*} data | ||
53 | * @author: renchao | ||
54 | */ | ||
55 | export function getSysPolicyList (data) { | ||
56 | return request({ | ||
57 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
58 | method: 'post', | ||
59 | data | ||
60 | }) | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * @description: 删除系统通知 | ||
65 | * @param {*} params | ||
66 | * @author: renchao | ||
67 | */ | ||
68 | export function deleteSysNotice (params) { | ||
69 | return request({ | ||
70 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
71 | method: 'get', | ||
72 | params: params | ||
73 | }) | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * @description: 发布通知 | ||
78 | * @param {*} params | ||
79 | * @author: renchao | ||
80 | */ | ||
81 | export function publishNotice (params) { | ||
82 | return request({ | ||
83 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
84 | method: 'get', | ||
85 | params: params | ||
86 | }) | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * @description: 取消发布通知 | ||
91 | * @param {*} params | ||
92 | * @author: renchao | ||
93 | */ | ||
94 | export function unPublishNotice (params) { | ||
95 | return request({ | ||
96 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
97 | method: 'get', | ||
98 | params: params | ||
99 | }) | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * @description: 设置已读状态 | ||
104 | * @param {*} params | ||
105 | * @author: renchao | ||
106 | */ | ||
107 | export function setReadStatus (params) { | ||
108 | return request({ | ||
109 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
110 | method: 'get', | ||
111 | params: params | ||
112 | }) | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * @description: 一键设置已读 | ||
117 | * @author: renchao | ||
118 | */ | ||
119 | export function setAllRead () { | ||
120 | return request({ | ||
121 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
122 | method: 'get' | ||
123 | }) | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * @description: 获取打印模板列表 | 11 | * @description: 获取打印模板列表 |
128 | * @param {*} data | 12 | * @param {*} data |
129 | * @author: renchao | 13 | * @author: renchao | ... | ... |
... | @@ -112,7 +112,7 @@ | ... | @@ -112,7 +112,7 @@ |
112 | import * as G2 from '@antv/g2' | 112 | import * as G2 from '@antv/g2' |
113 | import vueSeamlessScroll from "vue-seamless-scroll" | 113 | import vueSeamlessScroll from "vue-seamless-scroll" |
114 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/home.js"; | 114 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/home.js"; |
115 | import { setReadStatus } from '@/api/system' | 115 | import { setReadStatus } from '@/api/sysNotice' |
116 | import addDialog from "./components/addProject.vue"; | 116 | import addDialog from "./components/addProject.vue"; |
117 | export default { | 117 | export default { |
118 | name: 'home', | 118 | name: 'home', | ... | ... |
... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
25 | </template> | 25 | </template> |
26 | 26 | ||
27 | <script> | 27 | <script> |
28 | import { addSysNotice } from "@/api/system.js" | 28 | import { addSysNotice } from "@/api/sysNotice.js" |
29 | import { upload } from "@/api/file.js" | 29 | import { upload } from "@/api/file.js" |
30 | export default { | 30 | export default { |
31 | props: { | 31 | props: { | ... | ... |
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | <script> | 31 | <script> |
32 | import table from "@/utils/mixin/table"; | 32 | import table from "@/utils/mixin/table"; |
33 | import { datas, sendThis } from "./flfgdata"; | 33 | import { datas, sendThis } from "./flfgdata"; |
34 | import { getSysPolicyList, deleteSysNotice } from "@/api/system.js" | 34 | import { getSysPolicyList, deleteSysNotice } from "@/api/sysNotice.js" |
35 | import addDialog from "./components/addDialog.vue"; | 35 | import addDialog from "./components/addDialog.vue"; |
36 | export default { | 36 | export default { |
37 | name: "flfg", | 37 | name: "flfg", | ... | ... |
... | @@ -54,7 +54,7 @@ | ... | @@ -54,7 +54,7 @@ |
54 | </el-form> | 54 | </el-form> |
55 | </template> | 55 | </template> |
56 | <script> | 56 | <script> |
57 | import { addSysNotice, updateSysNotice } from "@/api/system.js"; | 57 | import { addSysNotice, updateSysNotice } from "@/api/sysNotice.js"; |
58 | import { upload } from "@/api/file.js"; | 58 | import { upload } from "@/api/file.js"; |
59 | import { quillEditor } from "vue-quill-editor"; | 59 | import { quillEditor } from "vue-quill-editor"; |
60 | export default { | 60 | export default { | ... | ... |
... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
39 | <script> | 39 | <script> |
40 | import table from "@/utils/mixin/table"; | 40 | import table from "@/utils/mixin/table"; |
41 | import { datas, sendThis } from "./xttzdata"; | 41 | import { datas, sendThis } from "./xttzdata"; |
42 | import { getSysNoticeList, deleteSysNotice, publishNotice, unPublishNotice } from "@/api/system.js" | 42 | import { getSysNoticeList, deleteSysNotice, publishNotice, unPublishNotice } from "@/api/sysNotice.js" |
43 | import addDialog from "./components/addDialog.vue"; | 43 | import addDialog from "./components/addDialog.vue"; |
44 | export default { | 44 | export default { |
45 | name: "xttz", | 45 | name: "xttz", | ... | ... |
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | <script> | 31 | <script> |
32 | import table from "@/utils/mixin/table"; | 32 | import table from "@/utils/mixin/table"; |
33 | import { datas, sendThis } from "./xttzviewdata"; | 33 | import { datas, sendThis } from "./xttzviewdata"; |
34 | import { getSysNoticeList, setReadStatus, setAllRead } from "@/api/system.js" | 34 | import { getSysNoticeList, setReadStatus, setAllRead } from "@/api/sysNotice.js" |
35 | import addDialog from "./components/addDialog.vue"; | 35 | import addDialog from "./components/addDialog.vue"; |
36 | export default { | 36 | export default { |
37 | name: "xttzview", | 37 | name: "xttzview", | ... | ... |
-
Please register or sign in to post a comment