抽取dict.js,修改所有引用文件
Showing
5 changed files
with
72 additions
and
64 deletions
src/api/dict.js
0 → 100644
1 | /* | ||
2 | * @Description: 字典接口 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:06:51 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | |||
9 | |||
10 | /** | ||
11 | * @description: 获取全部字典数据 | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | export function getAllDict () { | ||
15 | return request({ | ||
16 | url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict', | ||
17 | method: 'post' | ||
18 | }) | ||
19 | } | ||
20 | export function getQlxxDictList (data) { | ||
21 | return request({ | ||
22 | url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList', | ||
23 | method: 'post', | ||
24 | data | ||
25 | }) | ||
26 | } | ||
27 | |||
28 | /** | ||
29 | * @description: 获取字典子级列表 | ||
30 | * @param {*} bsmDict | ||
31 | * @author: renchao | ||
32 | */ | ||
33 | export function getChildDictList (bsmDict) { | ||
34 | return request({ | ||
35 | url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList', | ||
36 | method: 'get', | ||
37 | params: { | ||
38 | bsmDict: bsmDict | ||
39 | } | ||
40 | }) | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * @description: 编辑字典数据 | ||
45 | * @param {*} data | ||
46 | * @author: renchao | ||
47 | */ | ||
48 | export function editDictNode (data) { | ||
49 | return request({ | ||
50 | url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode', | ||
51 | method: 'post', | ||
52 | data | ||
53 | }) | ||
54 | } | ||
55 | |||
56 | |||
57 | /** | ||
58 | * @description: 刷新字典缓存 | ||
59 | * @author: renchao | ||
60 | */ | ||
61 | export function refreshDictCache () { | ||
62 | return request({ | ||
63 | url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache', | ||
64 | method: 'get' | ||
65 | }) | ||
66 | } |
... | @@ -28,61 +28,3 @@ export function getMenuInfo () { | ... | @@ -28,61 +28,3 @@ export function getMenuInfo () { |
28 | method: 'get', | 28 | method: 'get', |
29 | }) | 29 | }) |
30 | } | 30 | } |
31 | |||
32 | /** | ||
33 | * @description: 获取全部字典数据 | ||
34 | * @author: renchao | ||
35 | */ | ||
36 | export function getAllDict () { | ||
37 | return request({ | ||
38 | url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict', | ||
39 | method: 'post' | ||
40 | }) | ||
41 | } | ||
42 | export function getQlxxDictList (data) { | ||
43 | return request({ | ||
44 | url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @description: 获取字典子级列表 | ||
52 | * @param {*} bsmDict | ||
53 | * @author: renchao | ||
54 | */ | ||
55 | export function getChildDictList (bsmDict) { | ||
56 | return request({ | ||
57 | url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList', | ||
58 | method: 'get', | ||
59 | params: { | ||
60 | bsmDict: bsmDict | ||
61 | } | ||
62 | }) | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * @description: 编辑字典数据 | ||
67 | * @param {*} data | ||
68 | * @author: renchao | ||
69 | */ | ||
70 | export function editDictNode (data) { | ||
71 | return request({ | ||
72 | url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode', | ||
73 | method: 'post', | ||
74 | data | ||
75 | }) | ||
76 | } | ||
77 | |||
78 | |||
79 | /** | ||
80 | * @description: 刷新字典缓存 | ||
81 | * @author: renchao | ||
82 | */ | ||
83 | export function refreshDictCache () { | ||
84 | return request({ | ||
85 | url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache', | ||
86 | method: 'get' | ||
87 | }) | ||
88 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:34:47 | 4 | * @LastEditTime: 2023-05-17 10:34:47 |
5 | */ | 5 | */ |
6 | import { getAllDict } from '@/api/user' | 6 | import { getAllDict } from '@/api/dict' |
7 | const state = { | 7 | const state = { |
8 | dictData: {}, | 8 | dictData: {}, |
9 | addDict: false, | 9 | addDict: false, | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-07-13 16:42:17 | 4 | * @LastEditTime: 2023-07-13 16:42:17 |
5 | --> | 5 | --> |
... | @@ -32,7 +32,7 @@ | ... | @@ -32,7 +32,7 @@ |
32 | 32 | ||
33 | <script> | 33 | <script> |
34 | import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation' | 34 | import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation' |
35 | import { editDictNode, getChildDictList } from '@/api/user' | 35 | import { editDictNode, getChildDictList } from '@/api/dict' |
36 | export default { | 36 | export default { |
37 | props: { | 37 | props: { |
38 | formData: { | 38 | formData: { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-07-13 16:31:56 | 4 | * @LastEditTime: 2023-07-13 16:31:56 |
5 | --> | 5 | --> |
... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
39 | </template> | 39 | </template> |
40 | <script> | 40 | <script> |
41 | import table from "@/utils/mixin/table" | 41 | import table from "@/utils/mixin/table" |
42 | import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/user.js" | 42 | import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/dict.js" |
43 | import { datas, sendThis } from "./dictionaries" | 43 | import { datas, sendThis } from "./dictionaries" |
44 | import editDialog from "./components/editDialog.vue" | 44 | import editDialog from "./components/editDialog.vue" |
45 | export default { | 45 | export default { | ... | ... |
-
Please register or sign in to post a comment