Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
王刘锁
/
jianlin-tms-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d8e6cfad
authored
Sep 09, 2022
by
郑艺斌
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修复字典管理弹出滚动问题
parent
6e374532
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
108 deletions
src/views/modules/sys/dict/DictValueList.vue
src/views/modules/sys/login/login.vue
src/views/modules/taskPlan/taskChainTemplate/add.vue
src/views/modules/sys/dict/DictValueList.vue
View file @
d8e6cfad
<
template
>
<div
style=
"padding:10px"
>
<vxe-toolbar
:refresh=
"
{query: refreshList}" custom>
<template
#
buttons
>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-plus"
@
click=
"add()"
>
新建
</el-button>
<el-button
v-if=
"hasPermission('sys:dict:del')"
type=
"danger"
size=
"small"
icon=
"el-icon-delete"
@
click=
"del()"
:disabled=
"$refs.dictValueTable && $refs.dictValueTable.getCheckboxRecords().length === 0"
plain
>
删除
</el-button>
</
template
>
</vxe-toolbar>
<vxe-table
border=
"inner"
auto-resize
resizable
height=
"auto"
:loading=
"loading"
size=
"small"
ref=
"dictValueTable"
show-header-overflow
show-overflow
highlight-hover-row
:menu-config=
"{}"
:print-config=
"{}"
:import-config=
"{}"
:export-config=
"{}"
:sort-config=
"{remote:true}"
:data=
"dataList"
:checkbox-config=
"{}"
>
<vxe-column
type=
"seq"
width=
"40"
></vxe-column>
<vxe-column
type=
"checkbox"
width=
"40px"
></vxe-column>
<vxe-column
field=
"label"
title=
"标签"
>
<
template
slot-scope=
"scope"
>
<el-link
type=
"primary"
:underline=
"false"
v-if=
"hasPermission('sys:dict:edit')"
@
click=
"edit(scope.row.id)"
>
{{
scope
.
row
.
label
}}
</el-link>
<span
v-else
>
{{
scope
.
row
.
label
}}
</span>
</
template
>
</vxe-column
>
<vxe-column
title=
"键值"
field=
"value"
></vxe-column>
<vxe-column
title=
"排序"
field=
"sort"
></vxe-column>
<vxe-column
title=
"操作"
width=
"250px"
fixed=
"right"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"hasPermission('sys:dict:edit')"
type=
"text"
size=
"small"
@
click=
"edit(scope.row.id)"
>
修改
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
v-if=
"hasPermission('sys:dict:del')"
type=
"text"
size=
"small"
@
click=
"del(scope.row.id)"
>
删除
</el-button>
</
template
>
</vxe-column>
</vxe-table>
<div
style=
"padding:10px; height: calc(100% - 80px);"
>
<vxe-toolbar
:refresh=
"
{query: refreshList}" custom>
<template
#
buttons
>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-plus"
@
click=
"add()"
>
新建
</el-button>
<el-button
v-if=
"hasPermission('sys:dict:del')"
type=
"danger"
size=
"small"
icon=
"el-icon-delete"
@
click=
"del()"
:disabled=
"$refs.dictValueTable && $refs.dictValueTable.getCheckboxRecords().length === 0"
plain
>
删除
</el-button>
</
template
>
</vxe-toolbar>
<vxe-table
border=
"inner"
auto-resize
resizable
height=
"auto"
:scroll-y=
"{ enabled: false }"
:loading=
"loading"
size=
"small"
ref=
"dictValueTable"
show-header-overflow
show-overflow
highlight-hover-row
:menu-config=
"{}"
:print-config=
"{}"
:import-config=
"{}"
:export-config=
"{}"
:sort-config=
"{remote:true}"
:data=
"dataList"
:checkbox-config=
"{}"
>
<vxe-column
type=
"seq"
width=
"40"
></vxe-column>
<vxe-column
type=
"checkbox"
width=
"40px"
></vxe-column>
<vxe-column
field=
"label"
title=
"标签"
>
<
template
slot-scope=
"scope"
>
<el-link
type=
"primary"
:underline=
"false"
v-if=
"hasPermission('sys:dict:edit')"
@
click=
"edit(scope.row.id)"
>
{{
scope
.
row
.
label
}}
</el-link>
<span
v-else
>
{{
scope
.
row
.
label
}}
</span>
</
template
>
</vxe-column>
<vxe-column
title=
"键值"
field=
"value"
></vxe-column>
<vxe-column
title=
"排序"
field=
"sort"
></vxe-column>
<vxe-column
title=
"操作"
width=
"250px"
fixed=
"right"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"hasPermission('sys:dict:edit')"
type=
"text"
size=
"small"
@
click=
"edit(scope.row.id)"
>
修改
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
v-if=
"hasPermission('sys:dict:del')"
type=
"text"
size=
"small"
@
click=
"del(scope.row.id)"
>
删除
</el-button>
</
template
>
</vxe-column>
</vxe-table>
<!-- 弹窗, 新增 / 修改 -->
<dict-value-form
ref=
"dictValueForm"
@
refreshDataList=
"refreshList"
></dict-value-form>
</div>
</template>
<
script
>
import
DictValueForm
from
'./DictValueForm'
import
DictService
from
'@/api/sys/DictService'
export
default
{
data
()
{
return
{
dataList
:
[],
dictTypeId
:
''
,
loading
:
false
import
DictValueForm
from
'./DictValueForm'
import
DictService
from
'@/api/sys/DictService'
export
default
{
data
()
{
return
{
dataList
:
[],
dictTypeId
:
''
,
loading
:
false
}
},
props
:
[
'dictTypeTitle'
],
components
:
{
DictValueForm
},
dictService
:
null
,
created
()
{
this
.
dictService
=
new
DictService
()
},
methods
:
{
// 获取数据列表
refreshList
(
dictTypeId
)
{
this
.
loading
=
true
if
(
dictTypeId
)
{
this
.
dictTypeId
=
dictTypeId
}
this
.
dictService
.
getDictValue
(
this
.
dictTypeId
).
then
(({
data
})
=>
{
this
.
dataList
=
data
this
.
loading
=
false
})
},
props
:
[
'dictTypeTitle'
],
components
:
{
DictValueForm
// 新增
add
()
{
this
.
dictVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dictValueForm
.
init
(
'add'
,
{
dictValueId
:
''
,
dictTypeId
:
this
.
dictTypeId
})
})
},
dictService
:
null
,
created
()
{
this
.
dictService
=
new
DictService
()
// 修改
edit
(
id
)
{
this
.
dictVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dictValueForm
.
init
(
'edit'
,
{
dictValueId
:
id
,
dictTypeId
:
this
.
dictTypeId
})
})
},
methods
:
{
// 获取数据列表
refreshList
(
dictTypeId
)
{
this
.
loading
=
true
if
(
dictTypeId
)
{
this
.
dictTypeId
=
dictTypeId
}
this
.
dictService
.
getDictValue
(
this
.
dictTypeId
).
then
(({
data
})
=>
{
this
.
dataList
=
data
this
.
loading
=
false
})
},
// 新增
add
()
{
this
.
dictVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dictValueForm
.
init
(
'add'
,
{
dictValueId
:
''
,
dictTypeId
:
this
.
dictTypeId
})
})
},
// 修改
edit
(
id
)
{
this
.
dictVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dictValueForm
.
init
(
'edit'
,
{
dictValueId
:
id
,
dictTypeId
:
this
.
dictTypeId
})
// 删除
del
(
id
)
{
let
ids
=
id
||
this
.
$refs
.
dictValueTable
.
getCheckboxRecords
().
map
(
item
=>
{
return
item
.
id
}).
join
(
','
)
this
.
$confirm
(
`确定删除所选项吗?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
dictService
.
deleteDictValue
(
ids
).
then
(({
data
})
=>
{
this
.
$message
.
success
(
data
)
this
.
refreshList
()
this
.
$dictUtils
.
refreshDictList
()
})
},
// 删除
del
(
id
)
{
let
ids
=
id
||
this
.
$refs
.
dictValueTable
.
getCheckboxRecords
().
map
(
item
=>
{
return
item
.
id
}).
join
(
','
)
this
.
$confirm
(
`确定删除所选项吗?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
dictService
.
deleteDictValue
(
ids
).
then
(({
data
})
=>
{
this
.
$message
.
success
(
data
)
this
.
refreshList
()
this
.
$dictUtils
.
refreshDictList
()
})
})
},
closeRight
()
{
this
.
$emit
(
'closeRight'
)
}
})
},
closeRight
()
{
this
.
$emit
(
'closeRight'
)
}
}
}
</
script
>
src/views/modules/sys/login/login.vue
View file @
d8e6cfad
...
...
@@ -91,7 +91,9 @@ export default {
captchaImg
:
''
,
inputForm
:
{
username
:
'admin'
,
// username: '',
password
:
'admin'
,
// password: '',
uuid
:
''
,
code
:
''
},
...
...
src/views/modules/taskPlan/taskChainTemplate/add.vue
View file @
d8e6cfad
...
...
@@ -150,6 +150,9 @@ export default {
},
// 表格新增
tableDataADD
()
{
if
(
!
this
.
formData
.
childDtoList
)
{
this
.
$set
(
this
.
formData
,
'childDtoList'
,
[])
}
this
.
formData
.
childDtoList
.
push
({})
},
// 表格删除
...
...
@@ -186,4 +189,5 @@ export default {
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
\ No newline at end of file
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