Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
74ebbcd5
authored
2023-07-14 13:39:33 +0800
by
yuanbo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
抽取dict.js,修改所有引用文件
1 parent
63a1416b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
64 deletions
src/api/dict.js
src/api/user.js
src/store/modules/dict.js
src/views/system/dictionaries/components/editDialog.vue
src/views/system/dictionaries/dictionaries.vue
src/api/dict.js
0 → 100644
View file @
74ebbcd
/*
* @Description: 字典接口
* @Autor: renchao
* @LastEditTime: 2023-05-16 16:06:51
*/
import
request
from
'@/utils/request'
let
SERVER
=
window
.
config
?
window
.
config
:
JSON
.
parse
(
localStorage
.
getItem
(
'ApiUrl'
))
/**
* @description: 获取全部字典数据
* @author: renchao
*/
export
function
getAllDict
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getAllDict'
,
method
:
'post'
})
}
export
function
getQlxxDictList
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getQlxxDictList'
,
method
:
'post'
,
data
})
}
/**
* @description: 获取字典子级列表
* @param {*} bsmDict
* @author: renchao
*/
export
function
getChildDictList
(
bsmDict
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getChildDictList'
,
method
:
'get'
,
params
:
{
bsmDict
:
bsmDict
}
})
}
/**
* @description: 编辑字典数据
* @param {*} data
* @author: renchao
*/
export
function
editDictNode
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/editDictNode'
,
method
:
'post'
,
data
})
}
/**
* @description: 刷新字典缓存
* @author: renchao
*/
export
function
refreshDictCache
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/refreshDictCache'
,
method
:
'get'
})
}
src/api/user.js
View file @
74ebbcd
...
...
@@ -28,61 +28,3 @@ export function getMenuInfo () {
method
:
'get'
,
})
}
/**
* @description: 获取全部字典数据
* @author: renchao
*/
export
function
getAllDict
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getAllDict'
,
method
:
'post'
})
}
export
function
getQlxxDictList
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getQlxxDictList'
,
method
:
'post'
,
data
})
}
/**
* @description: 获取字典子级列表
* @param {*} bsmDict
* @author: renchao
*/
export
function
getChildDictList
(
bsmDict
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/getChildDictList'
,
method
:
'get'
,
params
:
{
bsmDict
:
bsmDict
}
})
}
/**
* @description: 编辑字典数据
* @param {*} data
* @author: renchao
*/
export
function
editDictNode
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/editDictNode'
,
method
:
'post'
,
data
})
}
/**
* @description: 刷新字典缓存
* @author: renchao
*/
export
function
refreshDictCache
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/refreshDictCache'
,
method
:
'get'
})
}
\ No newline at end of file
...
...
src/store/modules/dict.js
View file @
74ebbcd
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:34:47
*/
import
{
getAllDict
}
from
'@/api/
user
'
import
{
getAllDict
}
from
'@/api/
dict
'
const
state
=
{
dictData
:
{},
addDict
:
false
,
...
...
src/views/system/dictionaries/components/editDialog.vue
View file @
74ebbcd
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:42:17
-->
...
...
@@ -32,7 +32,7 @@
<
script
>
import
{
getUuid
,
judgeSort
,
realMove
,
findParents
,
removeTreeListItem
}
from
'@/utils/operation'
import
{
editDictNode
,
getChildDictList
}
from
'@/api/
user
'
import
{
editDictNode
,
getChildDictList
}
from
'@/api/
dict
'
export
default
{
props
:
{
formData
:
{
...
...
src/views/system/dictionaries/dictionaries.vue
View file @
74ebbcd
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:31:56
-->
...
...
@@ -39,7 +39,7 @@
</
template
>
<
script
>
import
table
from
"@/utils/mixin/table"
import
{
getQlxxDictList
,
getChildDictList
,
refreshDictCache
}
from
"@/api/
user
.js"
import
{
getQlxxDictList
,
getChildDictList
,
refreshDictCache
}
from
"@/api/
dict
.js"
import
{
datas
,
sendThis
}
from
"./dictionaries"
import
editDialog
from
"./components/editDialog.vue"
export
default
{
...
...
Please
register
or
sign in
to post a comment