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
0c2cf7aa
Commit
0c2cf7aa
authored
Jul 06, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推
parent
3c40b99c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
99 deletions
+126
-99
attendance-performance-manager-ui/admin/src/assets/less/base.css
...nce-performance-manager-ui/admin/src/assets/less/base.css
+5
-0
attendance-performance-manager-ui/admin/src/assets/less/base.less
...ce-performance-manager-ui/admin/src/assets/less/base.less
+5
-0
attendance-performance-manager-ui/admin/src/components/DataTable.vue
...performance-manager-ui/admin/src/components/DataTable.vue
+63
-52
attendance-performance-manager-ui/admin/src/views/Layout.vue
attendance-performance-manager-ui/admin/src/views/Layout.vue
+53
-47
No files found.
attendance-performance-manager-ui/admin/src/assets/less/base.css
View file @
0c2cf7aa
...
@@ -294,3 +294,8 @@ a {
...
@@ -294,3 +294,8 @@ a {
text-align
:
right
;
text-align
:
right
;
word-break
:
break-word
;
word-break
:
break-word
;
}
}
.el-button--primary
{
background
:
linear-gradient
(
90deg
,
#5ab6ff
,
#2e9aff
)
!important
;
color
:
#fff
!important
;
text-align
:
center
!important
;
}
attendance-performance-manager-ui/admin/src/assets/less/base.less
View file @
0c2cf7aa
...
@@ -332,3 +332,8 @@ a {
...
@@ -332,3 +332,8 @@ a {
}
}
}
}
}
}
.el-button--primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important;
color: #fff !important;
text-align: center !important;
}
attendance-performance-manager-ui/admin/src/components/DataTable.vue
View file @
0c2cf7aa
<
template
>
<
template
>
<el-table
<el-table
size=
'small'
size=
"small"
:data=
"tableData"
:data=
"tableData"
:row-key=
"handleRowKeyMethod"
:row-key=
"handleRowKeyMethod"
:span-method=
"handleSpanMethod"
:span-method=
"handleSpanMethod"
...
@@ -9,12 +9,13 @@
...
@@ -9,12 +9,13 @@
@
sort-change=
"handleSortChange"
@
sort-change=
"handleSortChange"
@
row-click=
"handleRowClick"
@
row-click=
"handleRowClick"
:row-class-name=
"tableRowClassName"
:row-class-name=
"tableRowClassName"
:empty-text=
'emptyText'
:empty-text=
"emptytxt ? emptytxt : emptyText"
border
border
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
v-for=
'column in columns'
v-for=
"column in columns"
:key=
'column.prop'
:key=
"column.prop"
:type=
"column.type"
:type=
"column.type"
:index=
"handleIndexMethod"
:index=
"handleIndexMethod"
:selectable=
"handleSelectableMethod"
:selectable=
"handleSelectableMethod"
...
@@ -24,98 +25,108 @@
...
@@ -24,98 +25,108 @@
:sortable=
"column.sortable"
:sortable=
"column.sortable"
:show-overflow-tooltip=
"column.tooltip"
:show-overflow-tooltip=
"column.tooltip"
:align=
"column.align || 'left'"
:align=
"column.align || 'left'"
:formatter=
'column.formatter'
:formatter=
"column.formatter"
:reserve-selection=
'column.reserveSelection'
:reserve-selection=
"column.reserveSelection"
:subColumns=
'column.subColumns'
:subColumns=
"column.subColumns"
:fixed=
"column.fixed"
:fixed=
"column.fixed"
>
>
<el-table-column
<el-table-column
v-for=
'sunColumn in column.subColumns'
v-for=
"sunColumn in column.subColumns"
:key=
'sunColumn.prop'
:key=
"sunColumn.prop"
:type=
"sunColumn.type"
:type=
"sunColumn.type"
:prop=
"sunColumn.prop"
:prop=
"sunColumn.prop"
:label=
"sunColumn.label"
:label=
"sunColumn.label"
:width=
"sunColumn.width"
:width=
"sunColumn.width"
:sortable=
"sunColumn.sortable"
:sortable=
"sunColumn.sortable"
:align=
"sunColumn.align || 'left'"
:align=
"sunColumn.align || 'left'"
:formatter=
'sunColumn.formatter'
:formatter=
"sunColumn.formatter"
/>
/>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
handleRowKeyMethod
:
{
handleRowKeyMethod
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
row
=>
{
return
row
.
id
}
default
:
(
row
)
=>
{
return
row
.
id
;
},
},
},
handleSelectableMethod
:
{
handleSelectableMethod
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
handleIndexMethod
:
{
handleIndexMethod
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
handleSpanMethod
:
{
handleSpanMethod
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
handleSelectionChange
:
{
handleSelectionChange
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
handleRowClick
:
{
handleRowClick
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
handleSortChange
:
{
handleSortChange
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
tableRowClassName
:
{
tableRowClassName
:
{
type
:
Function
,
type
:
Function
,
required
:
false
,
required
:
false
,
default
:
()
=>
{}
default
:
()
=>
{}
,
},
},
loading
:
{
loading
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
true
default
:
true
,
},
},
tableData
:
{
tableData
:
{
type
:
Array
,
type
:
Array
,
required
:
false
,
required
:
false
,
default
:
()
=>
[]
default
:
()
=>
[]
,
},
},
columns
:
{
columns
:
{
type
:
Array
,
type
:
Array
,
required
:
false
,
required
:
false
,
default
:
()
=>
[],
default
:
()
=>
[],
}
}
,
},
},
computed
:
{
computed
:
{
emptyText
()
{
emptyText
()
{
return
(
!
this
.
loading
&&
!
this
.
tableData
.
length
)
?
'
暂无数据
'
:
'
加载中...
'
return
!
this
.
loading
&&
!
this
.
tableData
.
length
?
"
暂无数据
"
:
"
加载中...
"
;
},
},
},
},
methods
:{
mounted
()
{
console
.
log
(
this
.
tableData
);
console
.
log
(
this
.
loading
);
},
},
watch
:
{
tableData
(
val
)
{
val
.
length
==
0
||
val
.
length
>
0
?
(
this
.
emptytxt
=
"
暂无数据
"
)
:
(
this
.
emptytxt
=
"
加载中...
"
);
},
},
methods
:
{},
data
()
{
data
()
{
return
{}
return
{
}
emptytxt
:
""
,
}
};
},
};
</
script
>
</
script
>
attendance-performance-manager-ui/admin/src/views/Layout.vue
View file @
0c2cf7aa
<
template
>
<
template
>
<div
:style=
"menuPageCss"
class=
"pages page-layout"
>
<div
:style=
"menuPageCss"
class=
"pages page-layout"
>
<LayoutHeader
v-if=
"menuPage!=='left'"
@
changePath=
"changePath"
></LayoutHeader>
<LayoutHeader
<LayoutHeaderLeft
@
toggle=
"toggle"
:isOpen=
"isOpen"
v-if=
"menuPage==='left'"
/>
v-if=
"menuPage !== 'left'"
@
changePath=
"changePath"
></LayoutHeader>
<LayoutHeaderLeft
@
toggle=
"toggle"
:isOpen=
"isOpen"
v-if=
"menuPage === 'left'"
/>
<div
style=
"padding:20px"
>
<div
style=
"padding:20px"
>
<router-view
:class=
"
{'active': !isOpen}" />
<router-view
:class=
"
{ active: !isOpen }" />
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
LayoutHeader
from
"
../components/Header
"
;
import
LayoutHeader
from
"
../components/Header
"
;
import
LayoutHeaderLeft
from
"
../components/HeaderLeft
"
;
import
LayoutHeaderLeft
from
"
../components/HeaderLeft
"
;
import
TabPane
from
'
../components/tabPane.vue
'
import
TabPane
from
"
../components/tabPane.vue
"
;
const
isPC
=
/
(
iPhone|iPad|iPod|iOS|Android
)
/i
.
test
(
navigator
.
userAgent
);
const
isPC
=
/
(
iPhone|iPad|iPod|iOS|Android
)
/i
.
test
(
navigator
.
userAgent
);
//菜单位置:取值: left :菜单在左面, top :菜单在上面
//菜单位置:取值: left :菜单在左面, top :菜单在上面
const
MenuPage
=
"
top
"
;
const
MenuPage
=
"
top
"
;
...
@@ -19,15 +26,15 @@ export default {
...
@@ -19,15 +26,15 @@ export default {
components
:
{
components
:
{
LayoutHeader
,
LayoutHeader
,
LayoutHeaderLeft
,
LayoutHeaderLeft
,
TabPane
TabPane
,
},
},
data
()
{
data
()
{
return
{
return
{
isOpen
:
isPC
,
isOpen
:
isPC
,
menuPage
:
MenuPage
,
menuPage
:
MenuPage
,
isfresh
:
true
,
isfresh
:
true
,
path
:
''
path
:
""
,
}
};
},
},
computed
:
{
computed
:
{
menuPageCss
()
{
menuPageCss
()
{
...
@@ -35,16 +42,16 @@ export default {
...
@@ -35,16 +42,16 @@ export default {
return
{
return
{
"
--padding-top
"
:
this
.
menuPage
===
"
left
"
?
"
60px
"
:
"
0px
"
,
"
--padding-top
"
:
this
.
menuPage
===
"
left
"
?
"
60px
"
:
"
0px
"
,
"
--margin-left
"
:
this
.
menuPage
===
"
left
"
?
"
200px
"
:
"
0px
"
,
"
--margin-left
"
:
this
.
menuPage
===
"
left
"
?
"
200px
"
:
"
0px
"
,
}
};
}
},
},
},
methods
:
{
methods
:
{
toggle
()
{
toggle
()
{
this
.
isOpen
=
!
this
.
isOpen
;
this
.
isOpen
=
!
this
.
isOpen
;
},
},
changePath
(
e
)
{
changePath
(
e
)
{
this
.
path
=
e
this
.
path
=
e
;
}
},
},
},
};
};
</
script
>
</
script
>
...
@@ -65,6 +72,5 @@ export default {
...
@@ -65,6 +72,5 @@ export default {
.page-layout {
.page-layout {
background: #eee;
background: #eee;
}
}
</
style
>
</
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