Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
web-template
Commits
7c140b98
Commit
7c140b98
authored
Jan 05, 2021
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典和字典类型的增删改查,导出功能调节
parent
81c27d61
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
122 deletions
+138
-122
data.js
src/api/system/dict/data.js
+17
-5
main.js
src/main.js
+6
-0
data.vue
src/views/system/dict/data.vue
+111
-92
index.vue
src/views/system/dict/index.vue
+4
-25
No files found.
src/api/system/dict/data.js
View file @
7c140b98
...
...
@@ -30,7 +30,10 @@ export function getDicts(dictType) {
export
function
checkDictLabelUnique
(
dictLabel
)
{
return
request
({
url
:
'/system/dict/data/checkDictLabelUnique?dictLabel='
+
dictLabel
,
method
:
'get'
method
:
'get'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
...
...
@@ -40,7 +43,10 @@ export function addData(data) {
return
request
({
url
:
'/system/dict/data/add'
,
method
:
'post'
,
data
:
data
data
:
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
...
...
@@ -51,7 +57,10 @@ export function updateData(data) {
return
request
({
url
:
'/system/dict/data/update/'
+
businessId
,
method
:
'put'
,
data
:
data
data
:
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
...
...
@@ -59,14 +68,17 @@ export function updateData(data) {
export
function
delData
(
dictCode
)
{
return
request
({
url
:
'/system/dict/data/deleteLogical/'
+
dictCode
,
method
:
'delete'
method
:
'delete'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 导出字典数据
export
function
exportData
(
query
)
{
return
request
({
url
:
'/system/dict/data/export'
+
query
.
dictType
,
url
:
'/system/dict/data/export
/
'
+
query
.
dictType
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
...
...
src/main.js
View file @
7c140b98
...
...
@@ -62,6 +62,12 @@ Vue.prototype.$uploadFile = uploadPublic
Vue
.
prototype
.
$haveAuth
=
includePermission
// set ElementUI lang to EN
Vue
.
prototype
.
$axios
=
xhr
// 未解析的函数或方法 msgSuccess(),需添加以下代码
Vue
.
prototype
.
msgSuccess
=
function
(
msg
)
{
this
.
$message
({
showClose
:
true
,
message
:
msg
,
type
:
'success'
})
}
Vue
.
prototype
.
$parseDate
=
(
value
,
format
)
=>
{
if
(
!
value
||
value
===
''
)
{
return
'-'
...
...
src/views/system/dict/data.vue
View file @
7c140b98
This diff is collapsed.
Click to expand it.
src/views/system/dict/index.vue
View file @
7c140b98
...
...
@@ -125,7 +125,7 @@
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"flag"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"备注"
prop=
"remark"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"备注"
prop=
"remark
s
"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
||
'-'
}}
</
template
>
...
...
@@ -205,8 +205,8 @@
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model
.
trim=
"form.remark"
maxlength=
"200"
type=
"textarea"
placeholder=
"请输入内容"
/>
<el-form-item
label=
"备注"
prop=
"remark
s
"
>
<el-input
v-model
.
trim=
"form.remark
s
"
maxlength=
"200"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -417,7 +417,7 @@ export default {
dictName
:
undefined
,
dictType
:
undefined
,
status
:
'0'
,
remark
:
undefined
,
remark
s
:
undefined
,
flag
:
'1'
}
},
...
...
@@ -454,27 +454,6 @@ export default {
this
.
title
=
'修改字典类型'
})
},
// handleUpdate(row) {
// this.reset()
// this.form.dictName = row.dictName
// this.form.dictType = row.dictType
// this.form.remark = row.remark
// this.form.dictNameOne = row.dictName
// this.form.dictTypeOne = row.dictType
// this.form.businessId = row.businessId
// const parentId = row.parentId
// if (parentId) {
// this.form.parentId = parentId
// selectDictType(this.options.find(item => { return item.businessId === parentId }).dictType).then(response => {
// this.optionsDict = response.data
// })
// }
// if (row.dataId) {
// this.form.dataId = row.dataId
// }
// this.open = true
// this.title = 'update'
// },
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment