7417f6b3 by 任超

chore:字典文件夹整理

1 parent 880ffe12
1 import request from '@/utils/request'
2 import SERVER from './config'
3 /*
4 获取全部字典数据
5 */
6 export function getAllDict () {
7 return request({
8 url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict',
9 method: 'post'
10 })
11 }
12 export function getQlxxDictList (data) {
13 return request({
14 url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList',
15 method: 'post',
16 data
17 })
18 }
19 /*
20 获取字典子级列表
21 */
22 export function getChildDictList (bsmDict) {
23 return request({
24 url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList',
25 method: 'get',
26 params: {
27 bsmDict: bsmDict
28 }
29 })
30 }
31 /*
32 编辑字典数据
33 */
34 export function editDictNode (data) {
35 return request({
36 url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode',
37 method: 'post',
38 data
39 })
40 }
41
42 /*
43 刷新字典缓存
44 */
45 export function refreshDictCache () {
46 return request({
47 url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache',
48 method: 'get'
49 })
50 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -15,4 +15,52 @@ export function getMenuInfo () { ...@@ -15,4 +15,52 @@ export function getMenuInfo () {
15 url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus', 15 url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus',
16 method: 'get', 16 method: 'get',
17 }) 17 })
18 }
19 /*
20 获取全部字典数据
21 */
22 export function getAllDict () {
23 return request({
24 url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict',
25 method: 'post'
26 })
27 }
28 export function getQlxxDictList (data) {
29 return request({
30 url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList',
31 method: 'post',
32 data
33 })
34 }
35 /*
36 获取字典子级列表
37 */
38 export function getChildDictList (bsmDict) {
39 return request({
40 url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList',
41 method: 'get',
42 params: {
43 bsmDict: bsmDict
44 }
45 })
46 }
47 /*
48 编辑字典数据
49 */
50 export function editDictNode (data) {
51 return request({
52 url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode',
53 method: 'post',
54 data
55 })
56 }
57
58 /*
59 刷新字典缓存
60 */
61 export function refreshDictCache () {
62 return request({
63 url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache',
64 method: 'get'
65 })
18 } 66 }
...\ No newline at end of file ...\ No newline at end of file
......
1 import { getAllDict } from '@/api/dict' 1 import { getAllDict } from '@/api/user'
2 const state = { 2 const state = {
3 dictData: {}, 3 dictData: {},
4 addDict: false, 4 addDict: false,
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
24 24
25 <script> 25 <script>
26 import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation' 26 import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation'
27 import { editDictNode } from '@/api/dict' 27 import { editDictNode } from '@/api/user'
28 export default { 28 export default {
29 props: { 29 props: {
30 value: { type: Boolean, default: false }, 30 value: { type: Boolean, default: false },
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 </template> 35 </template>
36 <script> 36 <script>
37 import table from "@/utils/mixin/table" 37 import table from "@/utils/mixin/table"
38 import { getQlxxDictList, getChildDictList,refreshDictCache } from "@/api/dict.js" 38 import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/user.js"
39 import { datas, sendThis } from "./dictionaries" 39 import { datas, sendThis } from "./dictionaries"
40 import editDialog from "./components/editDialog.vue" 40 import editDialog from "./components/editDialog.vue"
41 export default { 41 export default {
......