Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
V3-TailingPond
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
V3-TailingPond
Commits
b09ad6b3
Commit
b09ad6b3
authored
Sep 11, 2025
by
sxl
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:新增数据字典菜单
parent
e7a1f251
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
339 additions
and
8 deletions
+339
-8
dictDetail.js
src/api/system/dictDetail.js
+4
-6
locationStation.js
src/api/system/locationStation.js
+1
-2
dictDetail.vue
src/views/system/dict/dictDetail.vue
+145
-0
index.vue
src/views/system/dict/index.vue
+189
-0
No files found.
src/api/system/dictDetail.js
View file @
b09ad6b3
...
@@ -14,11 +14,7 @@ export function get(dictName) {
...
@@ -14,11 +14,7 @@ export function get(dictName) {
}
}
export
function
getDictMap
(
dictName
)
{
export
function
getDictMap
(
dictName
)
{
const
params
=
{
const
params
=
{
dictName
,
page
:
0
,
size
:
9999
}
dictName
,
page
:
0
,
size
:
9999
}
return
request
({
return
request
({
url
:
'
api/dictDetail/map
'
,
url
:
'
api/dictDetail/map
'
,
method
:
'
get
'
,
method
:
'
get
'
,
...
@@ -49,4 +45,6 @@ export function edit(data) {
...
@@ -49,4 +45,6 @@ export function edit(data) {
})
})
}
}
export
default
{
add
,
edit
,
del
}
export
default
{
add
,
edit
,
del
}
src/api/system/locationStation.js
View file @
b09ad6b3
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
export
function
reqQuery
(
params
)
{
export
function
reqQuery
(
params
)
{
return
request
({
return
request
({
url
:
'
api/tabZigbee
'
,
url
:
'
api/tabZigbee
'
,
...
@@ -33,4 +32,4 @@ export function reqDelete(params) {
...
@@ -33,4 +32,4 @@ export function reqDelete(params) {
})
})
}
}
export
default
{
reqQuery
,
reqAdd
,
reqEdit
,
reqDelete
}
export
default
{
reqQuery
,
reqAdd
,
reqEdit
,
reqDelete
}
src/views/system/dict/dictDetail.vue
0 → 100644
View file @
b09ad6b3
<
template
>
<div>
<div
v-if=
"query.dictName === ''"
>
<div
class=
"my-code"
>
点击字典查看详情
</div>
</div>
<div
v-else
>
<!--工具栏-->
<div
class=
"head-container"
>
<div
v-if=
"crud.props.searchToggle"
>
<!-- 搜索 -->
<el-input
v-model=
"query.label"
clearable
size=
"small"
placeholder=
"输入字典标签查询"
style=
"width: 200px"
class=
"filter-item"
@
keyup.enter.native=
"toQuery"
/>
<rrOperation
/>
</div>
</div>
<!--表单组件-->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"crud.cancelCU"
:visible=
"crud.status.cu > 0"
:title=
"crud.status.title"
width=
"500px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"字典标签"
prop=
"label"
>
<el-input
v-model=
"form.label"
style=
"width: 370px"
/>
</el-form-item>
<el-form-item
label=
"字典值"
prop=
"value"
>
<el-input
v-model=
"form.value"
style=
"width: 370px"
/>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"dictSort"
>
<el-input-number
v-model.number=
"form.dictSort"
:min=
"0"
:max=
"999"
controls-position=
"right"
style=
"width: 370px"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"crud.cancelCU"
>
取消
</el-button>
<el-button
:loading=
"crud.status.cu === 2"
type=
"primary"
@
click=
"crud.submitCU"
>
确认
</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref=
"table"
v-loading=
"crud.loading"
:data=
"crud.data"
highlight-current-row
style=
"width: 100%"
@
selection-change=
"crud.selectionChangeHandler"
>
<el-table-column
label=
"所属字典"
>
{{
query
.
dictName
}}
</el-table-column>
<el-table-column
prop=
"label"
label=
"字典标签"
/>
<el-table-column
prop=
"value"
label=
"字典值"
/>
<el-table-column
prop=
"dictSort"
label=
"排序"
/>
<el-table-column
v-if=
"checkPer(['admin', 'dict:edit', 'dict:del'])"
label=
"操作"
width=
"130px"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<udOperation
:data=
"scope.row"
:permission=
"permission"
/>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination
/>
</div>
</div>
</template>
<
script
>
import
crudDictDetail
from
'
@/api/system/dictDetail
'
import
CRUD
,
{
presenter
,
header
,
form
}
from
'
@crud/crud
'
import
pagination
from
'
@crud/Pagination
'
import
rrOperation
from
'
@crud/RR.operation
'
import
udOperation
from
'
@crud/UD.operation
'
const
defaultForm
=
{
id
:
null
,
label
:
null
,
value
:
null
,
dictSort
:
999
}
export
default
{
components
:
{
pagination
,
rrOperation
,
udOperation
},
cruds
()
{
return
[
CRUD
({
title
:
'
字典详情
'
,
url
:
'
api/dictDetail
'
,
query
:
{
dictName
:
''
},
sort
:
[
'
dictSort,asc
'
,
'
id,desc
'
],
crudMethod
:
{
...
crudDictDetail
},
optShow
:
{
add
:
true
,
edit
:
true
,
del
:
true
,
reset
:
false
},
queryOnPresenterCreated
:
false
})
]
},
mixins
:
[
presenter
(),
header
(),
form
(
function
()
{
return
Object
.
assign
({
dict
:
{
id
:
this
.
dictId
}},
defaultForm
)
})
],
data
()
{
return
{
dictId
:
null
,
rules
:
{
label
:
[{
required
:
true
,
message
:
'
请输入字典标签
'
,
trigger
:
'
blur
'
}],
value
:
[{
required
:
true
,
message
:
'
请输入字典值
'
,
trigger
:
'
blur
'
}],
dictSort
:
[{
required
:
true
,
message
:
'
请输入序号
'
,
trigger
:
'
blur
'
,
type
:
'
number
'
}]
},
permission
:
{
add
:
[
'
admin
'
,
'
dict:add
'
],
edit
:
[
'
admin
'
,
'
dict:edit
'
],
del
:
[
'
admin
'
,
'
dict:del
'
]
}
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
</
style
>
src/views/system/dict/index.vue
0 → 100644
View file @
b09ad6b3
<
template
>
<div
class=
"app-container"
>
<!--表单组件-->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"crud.cancelCU"
:visible=
"crud.status.cu > 0"
:title=
"crud.status.title"
width=
"500px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"字典名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
style=
"width: 370px"
/>
</el-form-item>
<el-form-item
label=
"描述"
>
<el-input
v-model=
"form.description"
style=
"width: 370px"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"crud.cancelCU"
>
取消
</el-button>
<el-button
:loading=
"crud.status.cu === 2"
type=
"primary"
@
click=
"crud.submitCU"
>
确认
</el-button>
</div>
</el-dialog>
<!-- 字典列表 -->
<el-row
:gutter=
"10"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"10"
:lg=
"11"
:xl=
"11"
style=
"margin-bottom: 10px"
>
<el-card
class=
"box-card"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div
v-if=
"crud.props.searchToggle"
>
<!-- 搜索 -->
<el-input
v-model=
"query.blurry"
clearable
size=
"small"
placeholder=
"输入名称或者描述搜索"
style=
"width: 200px"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<rrOperation
/>
</div>
<crudOperation
:permission=
"permission"
/>
</div>
<!--表格渲染-->
<el-table
ref=
"table"
v-loading=
"crud.loading"
:data=
"crud.data"
highlight-current-row
style=
"width: 100%"
@
selection-change=
"crud.selectionChangeHandler"
@
current-change=
"handleCurrentChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"name"
label=
"名称"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"description"
label=
"描述"
/>
<el-table-column
v-if=
"checkPer(['admin', 'dict:edit', 'dict:del'])"
label=
"操作"
width=
"130px"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<udOperation
:data=
"scope.row"
:permission=
"permission"
/>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination
/>
</el-card>
</el-col>
<!-- 字典详情列表 -->
<el-col
:xs=
"24"
:sm=
"24"
:md=
"14"
:lg=
"13"
:xl=
"13"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
字典详情
</span>
<el-button
v-if=
"checkPer(['admin', 'dict:add']) && this.$refs.dictDetail && this.$refs.dictDetail.query.dictName"
class=
"filter-item"
size=
"mini"
style=
"float: right; padding: 4px 10px"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$refs.dictDetail && $refs.dictDetail.crud.toAdd()"
>
新增
</el-button>
</div>
<dictDetail
ref=
"dictDetail"
:permission=
"permission"
/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<
script
>
import
dictDetail
from
'
./dictDetail
'
import
crudDict
from
'
@/api/system/dict
'
import
{
getSafePeopleInfo
}
from
'
@/api/system/safePeople
'
import
CRUD
,
{
presenter
,
header
,
form
}
from
'
@crud/crud
'
import
crudOperation
from
'
@crud/CRUD.operation
'
import
pagination
from
'
@crud/Pagination
'
import
rrOperation
from
'
@crud/RR.operation
'
import
udOperation
from
'
@crud/UD.operation
'
const
defaultForm
=
{
id
:
null
,
name
:
null
,
description
:
null
,
dictDetails
:
[]
}
export
default
{
name
:
'
Dict
'
,
components
:
{
crudOperation
,
pagination
,
rrOperation
,
udOperation
,
dictDetail
},
cruds
()
{
return
[
CRUD
({
title
:
'
字典
'
,
url
:
'
api/dict
'
,
crudMethod
:
{
...
crudDict
}
})]
},
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
)],
data
()
{
return
{
queryTypeOptions
:
[{
key
:
'
name
'
,
display_name
:
'
字典名称
'
},
{
key
:
'
description
'
,
display_name
:
'
描述
'
}],
rules
:
{
name
:
[{
required
:
true
,
message
:
'
请输入名称
'
,
trigger
:
'
blur
'
}]
},
permission
:
{
add
:
[
'
admin
'
,
'
dict:add
'
],
edit
:
[
'
admin
'
,
'
dict:edit
'
],
del
:
[
'
admin
'
,
'
dict:del
'
]
},
safePeopleList
:
[]
// 安全人员列表数据
}
},
mounted
()
{
// 页面加载时获取安全人员信息
this
.
loadSafePeopleInfo
()
},
methods
:
{
// 获取安全人员信息
async
loadSafePeopleInfo
()
{
try
{
const
params
=
{
page
:
0
,
size
:
10
,
name
:
''
,
// 可以根据需要设置搜索条件
startDate
:
''
,
endDate
:
''
}
const
response
=
await
getSafePeopleInfo
(
params
)
this
.
safePeopleList
=
response
.
data
||
[]
console
.
log
(
'
安全人员信息:
'
,
this
.
safePeopleList
)
}
catch
(
error
)
{
console
.
error
(
'
获取安全人员信息失败:
'
,
error
)
this
.
$message
.
error
(
'
获取安全人员信息失败
'
)
}
},
// 获取数据前设置好接口地址
[
CRUD
.
HOOK
.
beforeRefresh
]()
{
if
(
this
.
$refs
.
dictDetail
)
{
this
.
$refs
.
dictDetail
.
query
.
dictName
=
''
}
return
true
},
// 选中字典后,设置字典详情数据
handleCurrentChange
(
val
)
{
if
(
val
)
{
this
.
$refs
.
dictDetail
.
query
.
dictName
=
val
.
name
this
.
$refs
.
dictDetail
.
dictId
=
val
.
id
this
.
$refs
.
dictDetail
.
crud
.
toQuery
()
}
},
// 编辑前将字典明细临时清空,避免日志入库数据过长
[
CRUD
.
HOOK
.
beforeToEdit
](
crud
,
form
)
{
// 将角色的菜单清空,避免日志入库数据过长
form
.
dictDetails
=
null
}
}
}
</
script
>
<
style
scoped
>
</
style
>
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