Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-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
0ad07283
authored
2022-12-07 11:06:57 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:系统
1 parent
2a6afc13
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
576 additions
and
206 deletions
src/api/user.js
src/router/index.js
src/views/system/dictionaries/components/editDialog.vue
src/views/system/dictionaries/dictionaries.js
src/views/system/dictionaries/dictionaries.vue
src/views/system/dictionary-config/data/index.js
src/views/system/dictionary-config/index.scss
src/views/system/dictionary-config/index.vue
src/views/zxrz/index.vue
src/api/user.js
View file @
0ad0728
import
request
from
'@/utils/request'
import
SERVER
from
'./config'
// 用户首页
// 获取首页待办事项
export
function
getHomeTodoList
()
{
// 获取用户信息
export
function
getUserInfo
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
workBench/getHomeTodoList
'
,
method
:
'get'
url
:
SERVER
.
SERVERAPI
+
'/rest/
user/getUserInfo
'
,
method
:
'get'
,
})
}
//
获取首页已办事项
export
function
get
HomeDoneList
()
{
//
获取菜单信息
export
function
get
MenuInfo
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
workBench/getHomeDoneList
'
,
method
:
'get'
url
:
SERVER
.
SERVERAPI
+
'/rest/
user/getUserAuthorizationMenus
'
,
method
:
'get'
,
})
}
//获取首页常办项目
export
function
getHomeFrequentProjects
()
{
/*
获取全部字典数据
*/
export
function
getAllDict
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
workBench/getHomeFrequentProjects
'
,
method
:
'
ge
t'
url
:
SERVER
.
SERVERAPI
+
'/rest/
sys/dict/getAllDict
'
,
method
:
'
pos
t'
})
}
//保存常办项目
export
function
saveFrequentProjectsList
(
data
)
{
export
function
getQlxxDictList
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
workBench/saveFrequentProjects
List'
,
url
:
SERVER
.
SERVERAPI
+
'/rest/
sys/dict/getQlxxDict
List'
,
method
:
'post'
,
data
})
}
// 获取用户信息
export
function
get
UserInfo
(
)
{
/*
获取字典子级列表
*/
export
function
get
ChildDictList
(
bsmDict
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
user/getUserInfo
'
,
url
:
SERVER
.
SERVERAPI
+
'/rest/
sys/dict/getChildDictList
'
,
method
:
'get'
,
params
:
{
bsmDict
:
bsmDict
}
})
}
// 获取菜单信息
export
function
getMenuInfo
()
{
/*
编辑字典数据
*/
export
function
editDictNode
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/user/getUserAuthorizationMenus'
,
method
:
'get'
,
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/editDictNode'
,
method
:
'post'
,
data
})
}
/*
刷新字典缓存
*/
export
function
refreshDictCache
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/refreshDictCache'
,
method
:
'get'
})
}
\ No newline at end of file
...
...
src/router/index.js
View file @
0ad0728
...
...
@@ -270,14 +270,14 @@ export const asyncRoutes = [
path
:
'/system'
,
component
:
Layout
,
meta
:
{
title
:
'系统管理'
,
icon
:
'sqcx'
,
breadcrumb
:
false
},
redirect
:
'/system/dictionar
y-config
'
,
redirect
:
'/system/dictionar
ies
'
,
alwaysShow
:
true
,
name
:
'system'
,
children
:
[
{
path
:
'dictionar
y-config
'
,
component
:
()
=>
import
(
'@/views/system/dictionar
y-config
'
),
name
:
'dictionar
y-config
'
,
path
:
'dictionar
ies
'
,
component
:
()
=>
import
(
'@/views/system/dictionar
ies/dictionaries.vue
'
),
name
:
'dictionar
ies
'
,
meta
:
{
title
:
'字典管理'
}
},
{
...
...
src/views/system/dictionaries/components/editDialog.vue
0 → 100644
View file @
0ad0728
<
template
>
<!-- 编辑 -->
<dialogBox
submitForm=
"submitForm"
@
closeDialog=
"closeDialog"
@
submitForm=
"handleSubmit"
width=
"80%"
v-model=
"myValue"
:isSave=
"details.isenable == 1"
title=
"字典信息"
>
<el-form
:model=
"ruleForm"
ref=
"ruleForm"
label-width=
"100px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"字典类型编码"
>
{{
ruleForm
.
dcode
}}
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"字典类型名称"
>
{{
ruleForm
.
dname
}}
</el-form-item>
</el-col>
</el-row>
</el-form>
<lb-table
:column=
"column"
:heightNum=
"420"
:key=
"key"
:expand-row-keys=
"keyList"
row-key=
"bsmDict"
:tree-props=
"
{ children: 'children' }" :pagination="false" :data="tableData">
</lb-table>
</dialogBox>
</
template
>
<
script
>
import
{
getUuid
,
judgeSort
,
realMove
,
findParents
,
removeTreeListItem
}
from
'@/utils/operation'
import
{
editDictNode
}
from
'@/api/user'
export
default
{
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
details
:
{
type
:
Object
,
default
:
{}
}
},
data
()
{
return
{
key
:
0
,
myValue
:
this
.
value
,
keyList
:
[],
ruleForm
:
{
dcode
:
''
,
dname
:
''
},
column
:
[],
columns
:
[
{
width
:
'70'
,
renderHeader
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
this
.
details
.
isenable
===
'0'
?
<
span
>
序号
<
/span>
:
<
i
class
=
"el-icon-plus"
onClick
=
{()
=>
{
this
.
handleAdd
()
}}
style
=
"cursor:pointer;color:#409EFF"
><
/i
>
}
<
/div>
)
},
render
:
(
h
,
scope
)
=>
{
return
(
<
span
>
{
scope
.
row
.
index
}
<
/span
>
)
}
},
{
prop
:
'dcode'
,
width
:
'100'
,
label
:
'字典项编码'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
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
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
maxlength
=
'8'
><
/el-input
>
<
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
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
maxlength
=
'8'
><
/el-input
>
<
/div
>
)
}
},
{
prop
:
'dname'
,
label
:
'字典项名称'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
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
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
><
/el-input
>
<
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
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
><
/el-input
>
<
/div
>
)
}
},
{
prop
:
'normcode'
,
label
:
'部标编码'
,
width
:
'100'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
input
placeholder
=
"部标编码"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
scope
.
row
.
normcodeShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
normcodeShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
maxlength
=
'8'
><
/el-input
>
<
el
-
input
placeholder
=
"部标编码"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
!
scope
.
row
.
normcodeShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
normcodeShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
maxlength
=
'8'
><
/el-input
>
<
/div
>
)
}
},
{
prop
:
'normname'
,
label
:
'部标名称'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
input
placeholder
=
"部标名称"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
scope
.
row
.
normnameShow
}
v
-
fo
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
normnameShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
><
/el-input
>
<
el
-
input
placeholder
=
"部标名称"
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
show
=
{
!
scope
.
row
.
normnameShow
}
value
=
{
scope
.
row
[
scope
.
column
.
property
]}
onFocus
=
{()
=>
{
this
.
itemShowFalse
();
scope
.
row
.
normnameShow
=
true
;
}}
onInput
=
{(
val
)
=>
{
scope
.
row
[
scope
.
column
.
property
]
=
val
;
this
.
itemShowFalse
();
scope
.
row
.
codeShow
=
true
;
}}
><
/el-input
>
<
/div
>
)
}
},
{
prop
:
'isenable'
,
width
:
'160'
,
label
:
'是否禁用'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
el
-
radio
-
group
disabled
=
{
this
.
details
.
isenable
==
2
}
v
-
model
=
{
scope
.
row
.
isenable
}
>
<
el
-
radio
label
=
"1"
>
启用
<
/el-radio
>
<
el
-
radio
label
=
"0"
>
禁用
<
/el-radio
>
<
/el-radio-group
>
)
}
},
{
width
:
'130'
,
label
:
'移动'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
'text'
disabled
=
{
scope
.
row
.
isTop
}
onClick
=
{()
=>
{
this
.
moveUpward
(
scope
.
$index
,
scope
.
row
)
}}
>
上移
<
/el-button
>
<
el
-
button
type
=
'text'
disabled
=
{
scope
.
row
.
isBottom
}
onClick
=
{()
=>
{
this
.
moveDown
(
scope
.
$index
,
scope
.
row
)
}}
>
下移
<
/el-button
>
<
/div
>
)
}
},
{
width
:
'150'
,
label
:
'操作'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
style
=
"margin-right:10px"
onClick
=
{()
=>
{
this
.
handleAddSubordinate
(
scope
.
row
)
}}
>
增加下级
<
/el-button
>
<
el
-
button
type
=
"text"
style
=
"margin-left:0"
onClick
=
{()
=>
{
this
.
handleMinus
(
scope
.
$index
,
scope
.
row
)
}}
>
删除
<
/el-button
>
<
/div
>
)
}
}
],
tableData
:
[]
}
},
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
},
details
:
{
handler
:
function
(
newValue
)
{
this
.
tableData
=
judgeSort
(
_
.
cloneDeep
(
newValue
.
dataList
))
if
(
newValue
.
isenable
==
2
)
{
this
.
column
=
this
.
columns
.
slice
(
0
,
6
)
}
else
{
this
.
column
=
this
.
columns
}
this
.
ruleForm
=
newValue
.
rowData
this
.
addIndexes
()
this
.
key
++
},
deep
:
true
}
},
methods
:
{
// 添加索引
addIndexes
(
data
=
this
.
tableData
,
isAdd
=
true
)
{
data
.
forEach
((
item
,
index
)
=>
{
if
(
index
==
0
)
{
item
.
codeShow
=
true
item
.
nameShow
=
false
item
.
normcodeShow
=
false
item
.
normnameShow
=
false
}
else
{
item
.
codeShow
=
false
item
.
nameShow
=
false
item
.
normcodeShow
=
false
item
.
normnameShow
=
false
}
if
(
isAdd
)
{
item
.
index
=
index
+
1
}
if
(
item
.
children
)
{
this
.
addIndexes
(
item
.
children
,
false
)
}
})
},
itemShowFalse
()
{
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
item
.
codeShow
=
false
item
.
nameShow
=
false
item
.
normcodeShow
=
false
item
.
normnameShow
=
false
})
},
handleMinus
(
index
,
row
)
{
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
removeTreeListItem
(
this
.
tableData
,
row
.
bsmDict
)
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
},
handleSubmit
()
{
editDictNode
({
bsmDict
:
this
.
details
.
rowData
.
bsmDict
,
typeid
:
this
.
details
.
rowData
.
typeid
,
children
:
this
.
tableData
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
message
:
'修改成功'
,
type
:
'success'
})
this
.
$emit
(
'input'
,
false
)
}
})
},
closeDialog
()
{
this
.
$emit
(
'input'
,
false
)
},
// 增加下级
handleAddSubordinate
(
row
)
{
if
(
!
row
.
children
)
{
row
.
children
=
[]
}
row
.
children
.
push
(
{
dcode
:
''
,
dname
:
''
,
isenable
:
'1'
,
normcode
:
''
,
normname
:
''
,
bsmDict
:
getUuid
(
32
),
typeid
:
row
.
typeid
,
}
)
this
.
keyList
=
[];
this
.
keyList
.
push
(
row
.
bsmDict
)
},
// 增加
handleAdd
()
{
this
.
$nextTick
(()
=>
{
let
container
=
this
.
$el
.
querySelector
(
'.el-table__body-wrapper'
);
container
.
scrollTop
=
container
.
scrollHeight
;
})
this
.
tableData
.
push
(
{
dcode
:
''
,
dname
:
''
,
isenable
:
'1'
,
normcode
:
''
,
normname
:
''
,
bsmDict
:
getUuid
(
32
),
typeid
:
this
.
ruleForm
.
typeid
,
}
)
this
.
addIndexes
()
this
.
key
++
},
// 上移下移
moveUpward
(
index
,
row
)
{
realMove
(
row
.
bsmDict
,
'UP'
,
this
.
tableData
)
this
.
key
++
let
id
=
findParents
(
this
.
tableData
,
row
.
bsmDict
)
this
.
keyList
=
id
},
moveDown
(
index
,
row
)
{
realMove
(
row
.
bsmDict
,
'DOWN'
,
this
.
tableData
)
this
.
key
++
let
id
=
findParents
(
this
.
tableData
,
row
.
bsmDict
)
this
.
keyList
=
id
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
/
deep
/
.el-radio
{
margin-right
:
5px
!important
;
}
</
style
>
src/views/system/dictionaries/dictionaries.js
0 → 100644
View file @
0ad0728
import
filter
from
'@/utils/filter.js'
let
vm
=
null
const
sendThis
=
(
_this
)
=>
{
vm
=
_this
}
class
data
extends
filter
{
constructor
()
{
super
()
}
columns
()
{
return
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
'50'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{(
vm
.
pageData
.
currentPage
-
1
)
*
vm
.
pageData
.
pageSize
+
scope
.
$index
+
1
}
<
/div
>
)
}
},
{
prop
:
"dcode"
,
label
:
"字典类型编码"
,
},
{
prop
:
"dname"
,
label
:
"字典类型名称"
,
},
{
label
:
"是否允许修改"
,
width
:
'150'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
scope
.
row
.
isenable
==
'1'
?
<
div
class
=
'allow'
>
允许
<
/div>
:
<
div
class
=
'prohibit'
>
禁止
<
/div
>
}
<
/div
>
)
}
},
{
label
:
'操作'
,
width
:
'150'
,
align
:
'center'
,
fixed
:
'right'
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
scope
.
row
.
isenable
==
'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
>
)
}
}
]
}
}
let
datas
=
new
data
()
export
{
datas
,
sendThis
}
src/views/system/dictionaries/dictionaries.vue
0 → 100644
View file @
0ad0728
<
template
>
<div
class=
"from-clues"
>
<!-- 表单部分 -->
<div
class=
"from-clues-header"
>
<el-form
@
submit
.
native
.
prevent
:model=
"ruleForm"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"字典类型编码"
>
<el-input
v-model=
"ruleForm.dcode"
@
clear=
"queryClick"
clearable
placeholder=
"字典类型编码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"字典类型名称"
>
<el-input
v-model=
"ruleForm.dname"
@
clear=
"queryClick"
clearable
placeholder=
"字典类型名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
class=
"btnColRight"
>
<el-form-item>
<el-button
type=
"primary"
native-type=
"submit"
icon=
"el-icon-search"
@
click=
"queryClick"
>
查询
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"handleRefresh"
>
刷新缓存
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 表格 -->
<div
class=
"from-clues-content"
>
<lb-table
:page-size=
"pageData.pageSize"
class=
"loadingtext"
:current-page
.
sync=
"pageData.currentPage"
:total=
"tableData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
</div>
<editDialog
v-model=
"isDialog"
:details=
"details"
/>
</div>
</
template
>
<
script
>
import
table
from
"@/utils/mixin/table"
import
{
getQlxxDictList
,
getChildDictList
,
refreshDictCache
}
from
"@/api/user.js"
import
{
datas
,
sendThis
}
from
"./dictionaries"
import
editDialog
from
"./components/editDialog.vue"
export
default
{
name
:
"djbcx"
,
components
:
{
editDialog
},
mixins
:
[
table
],
mounted
()
{
sendThis
(
this
);
this
.
queryClick
()
},
data
()
{
return
{
isDialog
:
false
,
details
:
{
dataList
:
[],
isenable
:
1
,
rowData
:
{}
},
ruleForm
:
{
dcode
:
''
,
dname
:
''
},
tableData
:
{
total
:
0
,
columns
:
datas
.
columns
(),
data
:
[]
}
}
},
methods
:
{
// 初始化数据
queryClick
()
{
this
.
$startLoading
();
getQlxxDictList
({
...
this
.
ruleForm
,
...
this
.
pageData
}).
then
(
res
=>
{
this
.
$endLoading
();
let
{
records
,
total
}
=
res
.
result
this
.
tableData
.
data
=
records
?
records
:
[]
this
.
tableData
.
total
=
total
?
total
:
0
})
},
handleRefresh
()
{
this
.
$confirm
(
'是否确认刷新'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$startLoading
()
refreshDictCache
().
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
refech
=
this
.
$store
.
dispatch
(
'dict/generateDic'
)
this
.
$endLoading
()
refech
&&
this
.
$message
({
message
:
'刷新成功'
,
type
:
'success'
});
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'取消刷新'
});
});
},
editClick
(
row
,
val
)
{
this
.
details
.
rowData
=
row
this
.
details
.
isenable
=
val
getChildDictList
(
row
.
bsmDict
).
then
(
res
=>
{
this
.
isDialog
=
true
let
{
result
}
=
res
this
.
details
.
dataList
=
result
?
result
:
[]
})
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/public.scss"
;
</
style
>
src/views/system/dictionary-config/data/index.js
deleted
100644 → 0
View file @
2a6afc1
import
filter
from
'@/utils/filter.js'
class
data
extends
filter
{
constructor
()
{
super
()
}
columns
()
{
return
[
{
label
:
"序号"
,
prop
:
'ROWNUM'
,
width
:
60
},
{
prop
:
"DCODE"
,
label
:
"字典类型编码"
},
{
prop
:
"DNAME"
,
label
:
"字典类型名称"
},
{
label
:
"字典结构"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
scope
.
row
.
ISTREE
==
1
?
'树形'
:
'列表'
}
<
/div
>
)
},
},
]
}
}
export
default
new
data
()
src/views/system/dictionary-config/index.scss
deleted
100644 → 0
View file @
2a6afc1
File mode changed
src/views/system/dictionary-config/index.vue
deleted
100644 → 0
View file @
2a6afc1
<
template
>
<div
class=
"dictionary-config from-clues"
>
<div
class=
"from-clues-header"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"125px"
>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"字典类型编码"
>
<el-input
v-model=
"form.DCODE"
placeholder=
"字典类型编码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"字典类型名称"
>
<el-input
v-model=
"form.DNAME"
placeholder=
"字典类型名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"14"
class=
"btnColRight"
>
<el-button
@
click=
"handleUpdateDic"
>
刷新字典缓存
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
查询结果
</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div
class=
"from-clues-content"
>
<lb-table
:page-size=
"pageData.size"
:current-page
.
sync=
"pageData.current"
:total=
"pageData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
<message-tips
ref=
"msg"
:message=
"message"
/>
</div>
<edit-dictionary
ref=
"dictionary"
:dictList=
"dictList"
:dicData=
"dicRowData"
></edit-dictionary>
</div>
</
template
>
<
script
>
// 字典
import
data
from
"./data"
import
dictionaries
from
'@/api/dictionaries'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
editDictionary
from
'../components/editDictionary.vue'
export
default
{
name
:
"dictionary-config"
,
mixins
:
[
tableMixin
],
components
:
{
editDictionary
},
data
()
{
return
{
message
:
''
,
form
:
{
DCODE
:
''
,
DNAME
:
''
,
currentPage
:
1
},
preContent
:
''
,
tableData
:
{
columns
:
data
.
columns
().
concat
([
{
label
:
"操作"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
size
=
"mini"
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
)
}}
>
编辑
<
/el-button
>
<
/div
>
);
},
}
]),
data
:
[]
},
pageData
:
{
total
:
0
,
pageSize
:
15
,
current
:
1
,
},
dictList
:
[],
dicRowData
:
null
}
},
methods
:
{
async
featchData
()
{
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
:
{
list
,
total
,
pages
:
pageSize
,
pageNum
:
current
}
}
=
await
dictionaries
.
getSysDictParent
(
this
.
form
)
this
.
tableData
.
data
=
list
this
.
pageData
=
{
pageSize
,
current
,
total
}
}
catch
(
error
)
{
this
.
message
=
error
this
.
$refs
.
msg
.
messageShow
()
}
},
async
handleEdit
(
row
)
{
this
.
dicRowData
=
row
try
{
let
{
result
:
res
}
=
await
dictionaries
.
getSysDictByTypeId
(
row
.
TYPEID
)
this
.
dictList
=
res
this
.
$refs
.
dictionary
.
isShow
()
}
catch
(
error
)
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
}
},
// 更新字典
handleUpdateDic
()
{
this
.
$store
.
dispatch
(
'dictionaries/generateDic'
).
then
((
res
)
=>
{
if
(
res
)
{
this
.
$message
({
message
:
'刷新成功!'
,
type
:
'success'
});
}
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/public.scss"
;
@import
"./index.scss"
;
</
style
>
src/views/zxrz/index.vue
View file @
0ad0728
<
template
>
<!-- 中心日志 -->
<div
class=
"from-clues"
>
<!-- 头部搜索 -->
<div
class=
"from-clues-header"
>
<el-form
ref=
"ruleForm"
:model=
"form"
label-width=
"80px"
>
<el-row>
...
...
@@ -28,6 +30,7 @@
</el-select>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col
:span=
"4"
class=
"btnColRight"
>
<el-button
@
click=
"resetForm('ruleForm')"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
查询结果
</el-button>
...
...
@@ -35,6 +38,7 @@
</el-row>
</el-form>
</div>
<!-- 列表 -->
<div
class=
"from-clues-content"
>
<lb-table
ref=
"table"
:page-size=
"pageData.size"
:current-page
.
sync=
"pageData.current"
:total=
"pageData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
...
...
@@ -44,10 +48,13 @@
</div>
</
template
>
<
script
>
// 中心日志
// 引入列表头部数据
import
data
from
"./data"
// 引入列表混入方法
import
tableMixin
from
'@/mixins/tableMixin.js'
export
default
{
name
:
"
reportLog
"
,
name
:
"
zxrz
"
,
mixins
:
[
tableMixin
],
data
()
{
return
{
...
...
@@ -71,8 +78,7 @@ export default {
}
}
},
bsmSjsb
:
''
,
diaData
:
[],
// 表单
form
:
{
name
:
''
,
startTime
:
''
,
...
...
@@ -81,6 +87,7 @@ export default {
czlx
:
''
,
currentPage
:
1
},
// 表单校验
rules
:
{
name
:
[
{
required
:
true
,
message
:
'用户名称'
,
trigger
:
'change'
}
...
...
@@ -95,7 +102,9 @@ export default {
{
required
:
true
,
message
:
'操作类型'
,
trigger
:
'change'
}
]
},
// 列表
tableData
:
{
// 列表头部数据
columns
:
[{
label
:
'序号'
,
type
:
'index'
,
...
...
@@ -122,8 +131,10 @@ export default {
}
}
]),
// 列表
data
:
[]
},
// 分页
pageData
:
{
total
:
0
,
pageSize
:
15
,
...
...
@@ -132,6 +143,7 @@ export default {
}
},
methods
:
{
// 重置表单
resetForm
()
{
this
.
$refs
.
ruleForm
.
resetFields
();
},
...
...
Please
register
or
sign in
to post a comment