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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
253 additions
and
205 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
editDictNode
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sys/dict/editDictNode'
,
method
:
'post'
,
data
})
}
// 获取菜单信息
export
function
getMenuInfo
()
{
/*
刷新字典缓存
*/
export
function
refreshDictCache
()
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/
user/getUserAuthorizationMenus
'
,
method
:
'get'
,
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
This diff is collapsed.
Click to expand it.
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