Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
刘怀志
pet-business-web
Commits
30a9f6e0
Commit
30a9f6e0
authored
Sep 18, 2023
by
陈明豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改67915
parent
637df8b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
statistics.js
src/api/business/statistics.js
+8
-0
hospital-data-statistics.vue
...ics/hospital-data-statistics/hospital-data-statistics.vue
+12
-6
No files found.
src/api/business/statistics.js
View file @
30a9f6e0
...
...
@@ -67,3 +67,11 @@ export function listOwner(query) {
params
:
query
})
}
// 获取服务器时间
export
function
getServerTime
()
{
return
request
({
url
:
'/business/statistics/getServerTime'
,
method
:
'get'
})
}
src/views/data-statistics/hospital-data-statistics/hospital-data-statistics.vue
View file @
30a9f6e0
...
...
@@ -300,8 +300,8 @@
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"状态"
align
=
"left"
prop
=
"state"
min
-
width
=
"60px"
>
<
template
slot
-
scope
=
"scope"
>
<
span
:
style
=
"showStatus(scope.row.authorizationExpirationDate) === '• 过期' ? 'color: #F8CA96' : 'color: #67C23A'"
>
{{
showStatus
(
scope
.
row
.
authorizationExpirationDate
)
||
'-'
}}
<
/span
>
<
template
>
<
span
style
=
"color: #67C23A"
>
•
有效
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"left"
class
-
name
=
"small-padding fixed-width"
min
-
width
=
"50"
>
...
...
@@ -339,7 +339,7 @@ import ProgressColor from '@/views/data-statistics/other-components/progress-col
import
OverlongTool
from
'@/views/data-statistics/other-components/overlong-tool.vue'
import
ColumnarChart
from
'@/views/data-statistics/echars-components/columnarChart.vue'
import
RadarChartForHospital
from
'@/views/data-statistics/echars-components/radar-chart-for-hospital.vue'
import
{
getHospitalStatistics
,
listHospital
}
from
'@/api/business/statistics'
import
{
getHospitalStatistics
,
getServerTime
,
listHospital
}
from
'@/api/business/statistics'
import
{
parseTime
}
from
'@/utils/ruoyi'
import
EmptyTool
from
'@/views/data-statistics/other-components/emptyTool.vue'
import
{
moneyFormat
}
from
'@/utils'
...
...
@@ -393,12 +393,18 @@ export default {
expiredState
:
'1'
,
orderByColumn
:
'authorizationExpirationDate'
,
isAsc
:
'ascending'
}
}
,
serverTime
:
undefined
}
}
,
watch
:
{
}
,
created
()
{
this
.
loading
=
true
getServerTime
().
then
(
res
=>
{
if
(
res
)
{
this
.
serverTime
=
res
.
data
}
}
)
this
.
getStatistics
()
this
.
getHospitalList
()
// this.justTest()
...
...
@@ -475,8 +481,8 @@ export default {
}
,
getHospitalExpireDays
(
date
)
{
const
expirationDate
=
new
Date
(
date
)
const
now
=
new
Date
()
return
(
expirationDate
-
now
)
/
(
1
*
24
*
60
*
60
*
1000
)
const
now
=
new
Date
(
this
.
serverTime
)
return
(
expirationDate
-
now
)
/
(
24
*
60
*
60
*
1000
)
}
,
/** 通过授权历史获取到期日期 */
addDays
(
date
,
str
)
{
...
...
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