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
afe73a7d
authored
2022-08-23 15:29:16 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:字典
1 parent
6dbd007b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
29 deletions
.env.development
src/api/dict.js
src/styles/index.scss
src/views/system/dictionaries/components/editDialog.vue
src/views/system/dictionaries/dictionaries.js
src/views/system/dictionaries/dictionaries.vue
.env.development
View file @
afe73a7
...
...
@@ -5,4 +5,4 @@ NODE_ENV=development
VUE_APP_BASE_API = '/dev-api'
# 开发环境
VUE_APP_API_BASE_URL = 'http://192.168.2.
88
:8009'
VUE_APP_API_BASE_URL = 'http://192.168.2.
95
:8009'
...
...
src/api/dict.js
View file @
afe73a7
...
...
@@ -8,4 +8,20 @@ export function getAllDict () {
method
:
'post'
})
}
export
function
getQlxxDictList
(
data
)
{
return
request
({
url
:
'/sys/dict/getQlxxDictList'
,
method
:
'post'
,
data
})
}
// 获取字典子级列表
export
function
getChildDictList
(
bsmDict
)
{
return
request
({
url
:
'/sys/dict/getChildDictList'
,
method
:
'get'
,
params
:
{
bsmDict
:
bsmDict
}
})
}
\ No newline at end of file
...
...
src/styles/index.scss
View file @
afe73a7
...
...
@@ -322,4 +322,35 @@ aside {
color
:
#f00
;
background-color
:
#fff
;
cursor
:
not
-
allowed
}
.allow
,
.prohibit
{
position
:
relative
;
width
:
60px
;
margin
:
0
auto
;
}
.
allow
:
:
before
{
content
:
''
;
position
:
absolute
;
left
:
5px
;
top
:
45%
;
background-color
:
$green
;
display
:
inline-block
;
// 此句为css样式展示重点🏁
width
:
5px
;
height
:
5px
;
border-radius
:
50%
;
}
.
prohibit
:
:
before
{
content
:
''
;
position
:
absolute
;
left
:
5px
;
top
:
45%
;
background-color
:
$pink
;
display
:
inline-block
;
// 此句为css样式展示重点🏁
width
:
5px
;
height
:
5px
;
border-radius
:
50%
;
}
\ No newline at end of file
...
...
src/views/system/dictionaries/components/editDialog.vue
View file @
afe73a7
<
template
>
<!-- 编辑 -->
<dialogBox
submitForm=
"submitForm"
@
closeDialog=
"closeDialog"
v-model=
"myValue"
title=
"字典信息"
>
<dialogBox
submitForm=
"submitForm"
@
closeDialog=
"closeDialog"
v-model=
"myValue"
:isSave=
"!details.isenable == 2"
title=
"字典信息"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
...
...
@@ -15,7 +16,7 @@
</el-col>
</el-row>
</el-form>
<lb-table
:column=
"column"
:heightNum=
"5
20"
:key=
"key"
:expand-row-keys=
"keyList"
row-key=
"dictid
"
<lb-table
:column=
"column"
:heightNum=
"5
00"
:key=
"key"
:expand-row-keys=
"keyList"
row-key=
"bsmDict
"
:tree-props=
"
{ children: 'children' }" :pagination="false" :data="tableData">
</lb-table>
</dialogBox>
...
...
@@ -25,6 +26,10 @@
export
default
{
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
details
:
{
type
:
Object
,
default
:
{}
}
},
data
()
{
return
{
...
...
@@ -39,7 +44,13 @@ export default {
{
width
:
'60'
,
renderHeader
:
(
h
,
scope
)
=>
{
return
<
i
class
=
"el-icon-plus"
onClick
=
{()
=>
{
this
.
handleAdd
()
}}
style
=
"cursor:pointer;color:#409EFF"
><
/i
>
return
(
<
div
>
{
this
.
details
.
isenable
==
2
?
<
span
>
序号
<
/span>
:
<
i
class
=
"el-icon-plus"
onClick
=
{()
=>
{
this
.
handleAdd
()
}}
style
=
"cursor:pointer;color:#409EFF"
><
/i
>
}
<
/div>
)
},
render
:
(
h
,
scope
)
=>
{
return
(
...
...
@@ -53,12 +64,12 @@ export default {
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
input
placeholder
=
"字典项编码"
v
-
show
=
{
scope
.
row
.
codeShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
<
el
-
input
placeholder
=
"字典项编码"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
scope
.
row
.
codeShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
}}
><
/el-input
>
<
el
-
input
placeholder
=
"字典项编码"
v
-
show
=
{
!
scope
.
row
.
codeShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
<
el
-
input
placeholder
=
"字典项编码"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
!
scope
.
row
.
codeShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
}}
><
/el-input
>
<
/div
>
...
...
@@ -71,11 +82,11 @@ export default {
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
input
placeholder
=
"字典项编码"
v
-
show
=
{
scope
.
row
.
nameShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
<
el
-
input
placeholder
=
"字典项编码"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
scope
.
row
.
nameShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
nameShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
}}
><
/el-input
>
<
el
-
input
placeholder
=
"字典项名称"
v
-
show
=
{
!
scope
.
row
.
nameShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
<
el
-
input
placeholder
=
"字典项名称"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
!
scope
.
row
.
nameShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
nameShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
}}
><
/el-input
>
<
/div
>
...
...
@@ -115,6 +126,16 @@ export default {
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
},
details
:
{
handler
:
function
(
newValue
)
{
this
.
tableData
=
newValue
.
dataList
if
(
newValue
.
isenable
==
2
)
{
this
.
column
=
this
.
column
.
slice
(
0
,
3
)
}
this
.
addIndexes
()
},
deep
:
true
}
},
methods
:
{
...
...
src/views/system/dictionaries/dictionaries.js
View file @
afe73a7
...
...
@@ -23,20 +23,24 @@ class data extends filter {
}
},
{
prop
:
"
zdlxbm
"
,
prop
:
"
dcode
"
,
label
:
"字典类型编码"
,
},
{
prop
:
"
zdlxmc
"
,
prop
:
"
dname
"
,
label
:
"字典类型名称"
,
},
{
prop
:
"sfyxxg"
,
label
:
"是否允许修改"
,
width
:
'150'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
scope
.
row
.
sfyxxg
}
{
scope
.
row
.
sfyxxg
==
'1'
?
<
div
class
=
'allow'
>
允许
<
/div>
:
<
div
class
=
'prohibit'
>
禁止
<
/div
>
}
<
/div
>
)
}
...
...
@@ -49,7 +53,11 @@ class data extends filter {
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
icon
=
"el-icon-edit-outline"
onClick
=
{()
=>
{
vm
.
editClick
(
scope
)
}}
>
修改
<
/el-button
>
{
scope
.
row
.
sfyxxg
==
'1'
?
<
el
-
button
type
=
"text"
icon
=
"el-icon-edit-outline"
onClick
=
{()
=>
{
vm
.
editClick
(
scope
.
row
,
1
)
}}
>
修改
<
/el-button>
:
<
el
-
button
type
=
"text"
icon
=
"el-icon-view"
onClick
=
{()
=>
{
vm
.
editClick
(
scope
.
row
,
2
)
}}
>
查看
<
/el-button
>
}
<
/div
>
)
}
...
...
src/views/system/dictionaries/dictionaries.vue
View file @
afe73a7
...
...
@@ -2,21 +2,21 @@
<div
class=
"from-clues"
>
<!-- 表单部分 -->
<div
class=
"from-clues-header"
>
<el-form
:model=
"ruleForm"
ref=
"ruleForm"
>
<el-form
:model=
"ruleForm"
>
<el-row>
<el-col
:span=
"6"
>
<el-form-item
label=
"字典类型编码"
>
<el-input
v-model=
"ruleForm.
zdlxbm
"
placeholder=
"字典类型编码"
></el-input>
<el-input
v-model=
"ruleForm.
dcode
"
placeholder=
"字典类型编码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"字典类型名称"
>
<el-input
v-model=
"ruleForm.
zdlxmc
"
placeholder=
"字典类型名称"
></el-input>
<el-input
v-model=
"ruleForm.
dname
"
placeholder=
"字典类型名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
class=
"btnCol"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"fetchData
()
"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"fetchData"
>
查询
</el-button>
<el-button
@
click=
"moreQueryClick()"
>
高级查询
</el-button>
</el-form-item>
</el-col>
...
...
@@ -30,11 +30,12 @@
:data=
"tableData.data"
>
</lb-table>
</div>
<editDialog
v-model=
"isDialog"
/>
<editDialog
v-model=
"isDialog"
:details=
"details"
/>
</div>
</
template
>
<
script
>
import
table
from
"@/utils/mixin/table"
import
{
getQlxxDictList
,
getChildDictList
}
from
"@/api/dict.js"
import
{
datas
,
sendThis
}
from
"./dictionaries"
import
editDialog
from
"./components/editDialog.vue"
export
default
{
...
...
@@ -49,30 +50,40 @@ export default {
data
()
{
return
{
isDialog
:
false
,
details
:
{
dataList
:
[],
isenable
:
1
},
ruleForm
:
{
zdlxbm
:
''
,
zdlxmc
:
''
dcode
:
''
,
dname
:
''
},
tableData
:
{
total
:
0
,
columns
:
datas
.
columns
(),
data
:
[
{
zdlxbm
:
"66666666666666"
,
}
]
data
:
[]
}
}
},
methods
:
{
// 初始化数据
fetchData
()
{
getQlxxDictList
({
...
this
.
ruleForm
,
...
this
.
pageData
}).
then
(
res
=>
{
let
{
records
,
total
}
=
res
.
result
this
.
tableData
.
data
=
records
this
.
tableData
.
total
=
total
})
},
moreQueryClick
()
{
},
editClick
()
{
this
.
isDialog
=
true
editClick
(
row
,
val
)
{
this
.
details
.
isenable
=
val
getChildDictList
(
row
.
bsmDict
).
then
(
res
=>
{
this
.
isDialog
=
true
let
{
result
}
=
res
this
.
details
.
dataList
=
result
})
}
}
,
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
Please
register
or
sign in
to post a comment