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-manager-ui
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-manager-ui
Commits
f2a0d247
Commit
f2a0d247
authored
Apr 01, 2024
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tui
parent
0044e4f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
62 deletions
+67
-62
src/views/dept/list.vue
src/views/dept/list.vue
+65
-60
vue.config.js
vue.config.js
+2
-2
No files found.
src/views/dept/list.vue
View file @
f2a0d247
<
template
>
<div
className=
"page"
>
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<div
class=
"page"
>
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</
template
>
<
script
>
import
{
handleTree
}
from
"
@/assets/utils/table
"
;
import
{
handleTree
}
from
"
@/assets/utils/table
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
table
from
"
@/assets/mixins/table
"
;
...
...
@@ -16,15 +21,14 @@ import dialogShow from "./dialogshow";
export
default
{
name
:
"
Dept
"
,
mixins
:
[
table
],
components
:
{
Treeselect
,
dialogShow
},
created
()
{
},
components
:
{
Treeselect
,
dialogShow
},
created
()
{},
methods
:
{
afterRender
(
data
)
{
data
.
data
=
handleTree
(
data
.
data
,
"
id
"
,
"
parentId
"
);
console
.
log
(
"
tree
"
,
data
.
data
)
console
.
log
(
"
tree
"
,
data
.
data
);
this
.
deptOptions
=
data
.
data
;
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
;
},
handleAdd
(
row
)
{
...
...
@@ -38,17 +42,17 @@ export default {
/** 重写编辑方法 */
toEdit
(
row
)
{
this
.
loading
=
true
;
this
.
$post
(
this
.
pageInfo
.
exclude
,
{
id
:
row
.
id
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
deptOptions
=
handleTree
(
res
.
data
.
result
);
this
.
$refs
.
dialogform
.
edit
(
row
,
this
.
deptOptions
);
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
this
.
$post
(
this
.
pageInfo
.
exclude
,
{
id
:
row
.
id
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
deptOptions
=
handleTree
(
res
.
data
.
result
);
this
.
$refs
.
dialogform
.
edit
(
row
,
this
.
deptOptions
);
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
/** 重写查看方法 */
toView
(
row
)
{
...
...
@@ -63,45 +67,46 @@ export default {
showType
:
"
treetable
"
,
search
:
[],
columns
:
[
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
label
:
"
部门编码
"
,
prop
:
"
deptCode
"
},
{
label
:
"
顺序
"
,
prop
:
"
orderNum
"
},
{
label
:
"
部门人数
"
,
prop
:
"
personNum
"
},
{
label
:
"
绩效分数
"
,
prop
:
"
score
"
,
formatter
:
this
.
formatterMoney
},
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
label
:
"
部门编码
"
,
prop
:
"
deptCode
"
},
{
label
:
"
顺序
"
,
prop
:
"
orderNum
"
},
{
label
:
"
部门人数
"
,
prop
:
"
personNum
"
},
{
label
:
"
绩效分数
"
,
prop
:
"
score
"
,
formatter
:
this
.
formatterMoney
},
{
label
:
"
操作
"
,
width
:
280
,
formatter
:
row
=>
{
return
(
<
div
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit-outline
"
onClick
=
{()
=>
{
this
.
handleAdd
(
row
);
}}
>
新增
<
/el-button
>
<
table
-
buttons
noAdd
noEdit
noView
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
/div
>
);
}
}
]
}
// {
// label: "操作",
// width: 280,
// formatter: (row) => {
// return (
//
<
div
>
//
<
el
-
button
// size="mini"
// type="text"
// icon="el-icon-edit-outline"
// onClick={() => {
// this.handleAdd(row);
// }}
// >
// 新增
//
<
/el-button
>
//
<
table
-
buttons
// noAdd
// noEdit
// noView
// noDel
// row={row}
// onEdit={this.toEdit}
// onView={this.toView}
// onDel={this.toDel}
// />
//
<
/div
>
// );
// },
// },
],
},
};
}
}
,
};
</
script
>
<
style
lang=
"scss"
>
...
...
@@ -126,8 +131,8 @@ export default {
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
background
:
rgba
(
0
,
0
,
0
,
0
);
border
:
1px
solid
#3
E7BFA
!
important
;
color
:
#3
E7BFA
;
border
:
1px
solid
#3
e7bfa
!
important
;
color
:
#3
e7bfa
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
...
...
vue.config.js
View file @
f2a0d247
...
...
@@ -8,11 +8,11 @@ module.exports = {
hot
:
true
,
//自动保存
proxy
:
{
'
/attendance
'
:
{
//
target: 'http://192.168.0.98:11039',
target
:
'
http://192.168.0.98:11039
'
,
// target: 'http://112.19.80.237:11039',
// target: 'http://localhost:17500',
// target: 'http://118.122.189.109:11039',
target
:
'
http://10.102.252.13:11039
'
,
//
target: 'http://10.102.252.13:11039',
changeOrigin
:
true
,
secure
:
false
,
cookieDomainRewrite
:
'
localhost
'
,
...
...
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