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
3aea43de
Commit
3aea43de
authored
Jul 27, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tui
parent
11b25d03
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
375 additions
and
316 deletions
+375
-316
attendance-performance-manager-ui/admin/.env.development
attendance-performance-manager-ui/admin/.env.development
+3
-3
attendance-performance-manager-ui/admin/src/assets/utils/table.js
...ce-performance-manager-ui/admin/src/assets/utils/table.js
+55
-39
attendance-performance-manager-ui/admin/src/views/job/list.vue
...dance-performance-manager-ui/admin/src/views/job/list.vue
+315
-272
attendance-performance-manager-ui/admin/vue.config.js
attendance-performance-manager-ui/admin/vue.config.js
+2
-2
No files found.
attendance-performance-manager-ui/admin/.env.development
View file @
3aea43de
#开发环境
NODE_ENV = "development"
VUE_APP_API_BASE_URL= http://112.19.80.237:11039
VUE_APP_API_ZWFW_URL= http://112.19.80.237:11031
# VUE_APP_API_BASE_URL= http://192.168.0.98:11039
\ No newline at end of file
# VUE_APP_API_BASE_URL= http://112.19.80.237:11039
VUE_APP_API_BASE_URL= http://192.168.0.98:11039
VUE_APP_API_ZWFW_URL= http://112.19.80.237:11031
\ No newline at end of file
attendance-performance-manager-ui/admin/src/assets/utils/table.js
View file @
3aea43de
// table-list 所需的一系列操作方法
/**
* formatter
*
...
...
@@ -10,8 +9,8 @@
*/
const
formatter
=
(
tableData
,
column
,
val
)
=>
{
const
key
=
column
.
property
;
if
(
tableData
.
dict
&&
tableData
.
dict
[
key
])
{
const
dict
=
tableData
.
dict
[
key
]
if
(
tableData
.
dict
&&
tableData
.
dict
[
key
])
{
const
dict
=
tableData
.
dict
[
key
]
;
return
dict
[
val
]
||
val
;
}
return
val
;
...
...
@@ -27,11 +26,11 @@ const formatter = (tableData, column, val) => {
const
formatterAmount
=
(
row
,
column
)
=>
{
const
property
=
column
.
property
;
const
amount
=
row
[
property
];
if
(
!
amount
)
{
return
'
0.00
'
;
if
(
!
amount
)
{
return
"
0.00
"
;
}
if
(
amount
==
0
)
{
return
'
0.00
'
;
if
(
amount
==
0
)
{
return
"
0.00
"
;
}
return
amount
;
};
...
...
@@ -46,15 +45,19 @@ const formatterAmount = (row, column) => {
const
formatterDate
=
(
row
,
column
)
=>
{
const
property
=
column
.
property
;
const
time
=
row
[
property
];
if
(
!
time
)
return
'
--
'
;
let
date
=
time
.
length
<
13
?
new
Date
(
Number
(
time
)
*
1000
)
:
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
panLeft
(
date
.
getDate
())
+
'
'
;
let
h
=
panLeft
(
date
.
getHours
())
+
'
:
'
;
let
m
=
panLeft
(
date
.
getMinutes
())
+
'
:
'
;
if
(
!
time
)
return
"
--
"
;
let
date
=
time
.
length
<
13
?
new
Date
(
Number
(
time
)
*
1000
)
:
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
"
-
"
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
let
D
=
panLeft
(
date
.
getDate
())
+
"
"
;
let
h
=
panLeft
(
date
.
getHours
())
+
"
:
"
;
let
m
=
panLeft
(
date
.
getMinutes
())
+
"
:
"
;
let
s
=
panLeft
(
date
.
getSeconds
());
return
Y
+
M
+
D
+
h
+
m
+
s
;
return
Y
+
M
+
D
+
h
+
m
+
s
;
};
/**
...
...
@@ -67,16 +70,19 @@ const formatterDate = (row, column) => {
const
formatterDateOnly
=
(
row
,
column
)
=>
{
const
property
=
column
.
property
;
const
time
=
row
[
property
];
if
(
!
time
)
return
'
-
'
;
if
(
!
time
)
return
"
-
"
;
let
date
=
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
panLeft
(
date
.
getDate
())
+
'
'
;
return
Y
+
M
+
D
;
let
Y
=
date
.
getFullYear
()
+
"
-
"
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
let
D
=
panLeft
(
date
.
getDate
())
+
"
"
;
return
Y
+
M
+
D
;
};
function
panLeft
(
num
){
return
num
<
10
?
'
0
'
+
num
:
num
;
function
panLeft
(
num
)
{
return
num
<
10
?
"
0
"
+
num
:
num
;
}
/**
...
...
@@ -90,18 +96,18 @@ function panLeft(num){
const
find
=
(
list
,
key
,
val
)
=>
{
let
index
=
-
1
;
let
data
=
null
;
list
.
forEach
((
item
,
i
)
=>
{
if
(
item
[
key
]
===
val
)
{
list
.
forEach
((
item
,
i
)
=>
{
if
(
item
[
key
]
===
val
)
{
index
=
i
;
data
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
return
;
}
})
})
;
return
{
index
,
data
,
}
}
}
;
}
;
/**
* 构造树型结构数据
...
...
@@ -112,24 +118,34 @@ const find = (list, key, val) => {
* @param {*} rootId 根Id 默认 0
*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'
id
'
parentId
=
parentId
||
'
parentId
'
children
=
children
||
'
children
'
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
id
=
id
||
"
id
"
;
parentId
=
parentId
||
"
parentId
"
;
children
=
children
||
"
children
"
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
})
)
||
null
;
//对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
;
//循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
let
branchArr
=
cloneData
.
filter
(
child
=>
{
const
treeData
=
cloneData
.
filter
(
(
father
)
=>
{
let
branchArr
=
cloneData
.
filter
(
(
child
)
=>
{
//返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
console
.
log
(
child
[
parentId
]);
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
;
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
""
;
//返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!=
''
?
treeData
:
data
;
};
console
.
log
(
treeData
);
return
treeData
!=
""
?
treeData
:
data
;
}
export
{
formatter
,
...
...
@@ -137,5 +153,5 @@ export {
formatterDate
,
formatterDateOnly
,
find
,
handleTree
handleTree
,
};
attendance-performance-manager-ui/admin/src/views/job/list.vue
View file @
3aea43de
This diff is collapsed.
Click to expand it.
attendance-performance-manager-ui/admin/vue.config.js
View file @
3aea43de
...
...
@@ -17,8 +17,8 @@ module.exports = {
hot
:
true
,
//自动保存
proxy
:
{
'
/attendance
'
:
{
//
target: 'http://192.168.0.98:11039',
target
:
'
http://112.19.80.237:11039
'
,
target
:
'
http://192.168.0.98:11039
'
,
//
target: 'http://112.19.80.237:11039',
// target: 'http://localhost:17500',
changeOrigin
:
true
,
secure
:
false
,
...
...
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