Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZiBoYingJI
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
Kimber
ZiBoYingJI
Commits
fff35e9c
Commit
fff35e9c
authored
Sep 24, 2024
by
forevertyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:行政区划修改
parent
2ca1f140
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
index.vue
src/views/system/dept/index.vue
+11
-11
No files found.
src/views/system/dept/index.vue
View file @
fff35e9c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<div
v-if=
"crud.props.searchToggle"
>
<div
v-if=
"crud.props.searchToggle"
>
<!-- 搜索 -->
<!-- 搜索 -->
<el-input
v-model=
"query.name"
clearable
size=
"small"
placeholder=
"输入
部门
名称搜索"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<el-input
v-model=
"query.name"
clearable
size=
"small"
placeholder=
"输入
行政区划
名称搜索"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<date-range-picker
v-model=
"query.createTime"
class=
"date-item"
/>
<date-range-picker
v-model=
"query.createTime"
class=
"date-item"
/>
<el-select
v-model=
"query.enabled"
clearable
size=
"small"
placeholder=
"状态"
class=
"filter-item"
style=
"width: 90px"
@
change=
"crud.toQuery"
>
<el-select
v-model=
"query.enabled"
clearable
size=
"small"
placeholder=
"状态"
class=
"filter-item"
style=
"width: 90px"
@
change=
"crud.toQuery"
>
<el-option
v-for=
"item in enabledTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
<el-option
v-for=
"item in enabledTypeOptions"
:key=
"item.key"
:label=
"item.display_name"
:value=
"item.key"
/>
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
<crudOperation
:permission=
"permission"
/>
<crudOperation
:permission=
"permission"
/>
</div>
</div>
<!--表单组件-->
<!--表单组件-->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"crud.cancelCU"
:visible.sync=
"crud.status.cu > 0"
:title=
"crud.status.title"
width=
"
5
00px"
>
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"crud.cancelCU"
:visible.sync=
"crud.status.cu > 0"
:title=
"crud.status.title"
width=
"
6
00px"
>
<el-form
ref=
"form"
inline
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"
8
0px"
>
<el-form
ref=
"form"
inline
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"
12
0px"
>
<el-form-item
label=
"
部门
名称"
prop=
"name"
>
<el-form-item
label=
"
行政区划
名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
style=
"width: 370px;"
/>
<el-input
v-model=
"form.name"
style=
"width: 370px;"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
部门
排序"
prop=
"deptSort"
>
<el-form-item
label=
"
行政区划
排序"
prop=
"deptSort"
>
<el-input-number
<el-input-number
v-model.number=
"form.deptSort"
v-model.number=
"form.deptSort"
:min=
"0"
:min=
"0"
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
style=
"width: 370px;"
style=
"width: 370px;"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"顶级
部门
"
>
<el-form-item
label=
"顶级
行政区划
"
>
<el-radio-group
v-model=
"form.isTop"
style=
"width: 140px"
>
<el-radio-group
v-model=
"form.isTop"
style=
"width: 140px"
>
<el-radio
label=
"1"
>
是
</el-radio>
<el-radio
label=
"1"
>
是
</el-radio>
<el-radio
label=
"0"
>
否
</el-radio>
<el-radio
label=
"0"
>
否
</el-radio>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<el-form-item
label=
"状态"
prop=
"enabled"
>
<el-form-item
label=
"状态"
prop=
"enabled"
>
<el-radio
v-for=
"item in dict.dept_status"
:key=
"item.id"
v-model=
"form.enabled"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
<el-radio
v-for=
"item in dict.dept_status"
:key=
"item.id"
v-model=
"form.enabled"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"form.isTop === '0'"
style=
"margin-bottom: 0;"
label=
"上级
部门
"
prop=
"pid"
>
<el-form-item
v-if=
"form.isTop === '0'"
style=
"margin-bottom: 0;"
label=
"上级
行政区划
"
prop=
"pid"
>
<treeselect
<treeselect
v-model=
"form.pid"
v-model=
"form.pid"
:load-options=
"loadDepts"
:load-options=
"loadDepts"
...
@@ -111,7 +111,7 @@ export default {
...
@@ -111,7 +111,7 @@ export default {
name
:
'
Dept
'
,
name
:
'
Dept
'
,
components
:
{
Treeselect
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
components
:
{
Treeselect
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
cruds
()
{
cruds
()
{
return
CRUD
({
title
:
'
部门
'
,
url
:
'
api/dept
'
,
crudMethod
:
{
...
crudDept
}})
return
CRUD
({
title
:
'
行政区划
'
,
url
:
'
api/dept
'
,
crudMethod
:
{
...
crudDept
}})
},
},
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
// 设置数据字典
// 设置数据字典
...
@@ -188,7 +188,7 @@ export default {
...
@@ -188,7 +188,7 @@ export default {
})
})
})
})
},
},
// 获取弹窗内
部门
数据
// 获取弹窗内
行政区划
数据
loadDepts
({
action
,
parentNode
,
callback
})
{
loadDepts
({
action
,
parentNode
,
callback
})
{
if
(
action
===
LOAD_CHILDREN_OPTIONS
)
{
if
(
action
===
LOAD_CHILDREN_OPTIONS
)
{
crudDept
.
getDepts
({
enabled
:
true
,
pid
:
parentNode
.
id
}).
then
(
res
=>
{
crudDept
.
getDepts
({
enabled
:
true
,
pid
:
parentNode
.
id
}).
then
(
res
=>
{
...
@@ -208,7 +208,7 @@ export default {
...
@@ -208,7 +208,7 @@ export default {
[
CRUD
.
HOOK
.
afterValidateCU
]()
{
[
CRUD
.
HOOK
.
afterValidateCU
]()
{
if
(
this
.
form
.
pid
!==
null
&&
this
.
form
.
pid
===
this
.
form
.
id
)
{
if
(
this
.
form
.
pid
!==
null
&&
this
.
form
.
pid
===
this
.
form
.
id
)
{
this
.
$message
({
this
.
$message
({
message
:
'
上级
部门
不能为空
'
,
message
:
'
上级
行政区划
不能为空
'
,
type
:
'
warning
'
type
:
'
warning
'
})
})
return
false
return
false
...
@@ -220,7 +220,7 @@ export default {
...
@@ -220,7 +220,7 @@ export default {
},
},
// 改变状态
// 改变状态
changeEnabled
(
data
,
val
)
{
changeEnabled
(
data
,
val
)
{
this
.
$confirm
(
'
此操作将 "
'
+
this
.
dict
.
label
.
dept_status
[
val
]
+
'
"
'
+
data
.
name
+
'
部门
, 是否继续?
'
,
'
提示
'
,
{
this
.
$confirm
(
'
此操作将 "
'
+
this
.
dict
.
label
.
dept_status
[
val
]
+
'
"
'
+
data
.
name
+
'
行政区划
, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
type
:
'
warning
'
...
...
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