Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
32935e0a
Commit
32935e0a
authored
Mar 29, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时修改部门
parent
8ff04d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
100 deletions
+56
-100
attendance-performance-manager-ui/admin/src/views/dept/list.vue
...ance-performance-manager-ui/admin/src/views/dept/list.vue
+56
-100
No files found.
attendance-performance-manager-ui/admin/src/views/dept/list.vue
View file @
32935e0a
<
template
>
<
template
>
<div
class=
"page"
>
<div
className=
"page"
>
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
:config=
"tableConfig"
/>
<el-card
style=
"height:80vh;overflow:scroll-y"
>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<LayoutTable
notPagination
:data=
"tableData"
ref=
"layoutTable"
:config=
"tableConfig"
notSearch
></LayoutTable>
</el-card>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
/** 表单弹出框模式需引入 */
import
{
handleTree
}
from
"
@/assets/utils/table
"
;
import
{
handleTree
}
from
"
@/assets/utils/table
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
drawerShow
from
"
./drawershow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
export
default
{
name
:
"
Dept
"
,
name
:
"
DeptList
"
,
components
:
{
drawerShow
,
Treeselect
,
},
mixins
:
[
table
],
mixins
:
[
table
],
components
:
{
Treeselect
,
dialogShow
},
created
()
{
created
()
{
this
.
query
=
{
page
:
1
,
size
:
-
1
};
},
},
methods
:
{
methods
:
{
afterRender
(
data
)
{
data
.
data
=
handleTree
(
data
.
data
,
"
id
"
,
"
parentId
"
);
this
.
deptOptions
=
data
.
data
;
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
},
handleAdd
(
row
)
{
this
.
$refs
.
dialogform
.
add
(
row
,
this
.
deptOptions
);
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
this
.
$refs
.
d
ialogform
.
add
(
row
,
this
.
dept
Options
);
this
.
$refs
.
d
rawerform
.
add
(
row
,
this
.
menu
Options
);
},
},
/** 重写编辑方法 */
/** 重写编辑方法 */
toEdit
(
row
)
{
toEdit
(
row
)
{
this
.
loading
=
true
;
this
.
$refs
.
drawerform
.
edit
(
row
,
this
.
menuOptions
);
this
.
$post
(
this
.
pageInfo
.
exclude
,
{
id
:
row
.
id
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
deptOptions
=
handleTree
(
res
.
data
.
data
);
this
.
$refs
.
dialogform
.
edit
(
row
,
this
.
deptOptions
);
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
},
/** 重写查看方法 */
/** 重写查看方法 */
toView
(
row
)
{
toView
(
row
)
{
this
.
$refs
.
dialogform
.
view
(
row
,
this
.
deptOptions
);
this
.
$refs
.
drawerform
.
view
(
row
,
this
.
menuOptions
);
},
afterRender
(
data
)
{
data
.
data
=
handleTree
(
data
.
data
,
"
id
"
,
"
parentId
"
);
console
.
log
(
"
tree data:
"
,
data
.
data
);
this
.
menuOptions
=
data
.
data
;
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
;
},
},
},
},
data
()
{
data
()
{
return
{
return
{
config
:
{
config
:
{
/** 树表是否默认展开 */
expand
:
true
,
showType
:
"
treetable
"
,
showType
:
"
treetable
"
,
search
:
[
isshowTabPane
:
true
,
],
/** 树表是否默认展开 */
expand
:
true
,
columns
:
[
columns
:
[
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
type
:
"
selection
"
,
width
:
60
},
{
label
:
"
部门编码
"
,
prop
:
"
deptCode
"
},
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
label
:
"
顺序
"
,
prop
:
"
orderNum
"
},
{
label
:
"
成员数量
"
,
prop
:
"
personNum
"
},
{
label
:
"
负责人
"
,
prop
:
"
workName
"
},
// {label: "部门状态", prop: "deptStatus",formatter: this.formatter},
// {label: "顺序", prop: "orderNum",formatter: this.formatter},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
width
:
2
8
0
,
width
:
2
4
0
,
formatter
:
row
=>
{
formatter
:
(
row
)
=>
{
return
(
return
(
<
div
>
<
table
-
buttons
<
el
-
button
noAdd
size
=
"
mini
"
noView
type
=
"
text
"
row
=
{
row
}
icon
=
"
el-icon-edit-outline
"
onEdit
=
{
this
.
toEdit
}
onClick
=
{()
=>
{
onView
=
{
this
.
toView
}
this
.
handleAdd
(
row
);
onDel
=
{
this
.
toDel
}
}}
/
>
>
新增
<
/el-button
>
<
table
-
buttons
noAdd
noView
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
/div
>
);
);
}
}
,
}
}
,
]
]
,
}
}
,
};
};
}
}
,
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
.ml-row
{
margin-bottom
:
5px
;
}
.el-radio-button__inner
{
// width: 82px;
height
:
36px
;
border-radius
:
4px
0px
0px
4px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
)
!
important
;
border-radius
:
2px
!
important
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
14px
;
font-weight
:
400
;
color
:
#606677
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
background
:
rgba
(
0
,
0
,
0
,
0
);
border
:
1px
solid
#3E7BFA
!
important
;
color
:
#3E7BFA
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
.ml-top-button
{
border-color
:
#ffffff
;
background
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
16px
;
margin
:
0
10px
0
10px
;
}
</
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