seimin 3 lat temu
rodzic
commit
599b860259

+ 62 - 0
src/components/AppCumulative.vue

@@ -0,0 +1,62 @@
1
+<template>
2
+  <div class="app-header__contentNews">
3
+    <div class="app-header__contentNewsItem">
4
+      <strong>累计 | </strong>工单数:
5
+      <em>{{allData[0]|formatNum}}</em>
6
+    </div>
7
+    <div class="app-header__contentNewsItem">
8
+      标本送检:
9
+      <em>{{allData[1]|formatNum}}</em>
10
+    </div>
11
+    <div class="app-header__contentNewsItem">
12
+      患者陪检:
13
+      <em>{{allData[2]|formatNum}}</em>
14
+    </div>
15
+  </div>
16
+</template>
17
+
18
+<script>
19
+import { post, timer1 } from './../http/http'
20
+export default {
21
+  name: 'AppCumulative',
22
+  inject: ['hospitalId'],
23
+  data () {
24
+    return {
25
+      allData: [], // 数据
26
+      timer: null// 轮询定时器
27
+    }
28
+  },
29
+  filters: {
30
+    formatNum (v) {
31
+      v = v ? v.toString() : ''
32
+      return v > 100000 ? v.slice(0, v.length - 4) + '万' : v
33
+    }
34
+  },
35
+  methods: {
36
+    // 获取今日新冠送检,今日标本运输数,今日患者陪检
37
+    async getTodayData () {
38
+      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
39
+      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
40
+      const result = await post(`/largeScreen/getData/getOrderTotal/${this.hospitalId}`, { srartTime, endTime })
41
+      this.allData = result.list[0]
42
+      this.polling()
43
+    },
44
+    // 轮询请求
45
+    polling () {
46
+      clearTimeout(this.timer)
47
+      this.timer = setTimeout(() => {
48
+        this.getTodayData()
49
+      }, timer1)
50
+    }
51
+  },
52
+  mounted () {
53
+    this.getTodayData()
54
+  },
55
+  beforeDestroy () {
56
+    clearTimeout(this.timer)
57
+  }
58
+}
59
+</script>
60
+
61
+<style lang="less">
62
+</style>

+ 64 - 29
src/components/AppHeader.vue

@@ -7,50 +7,80 @@
7 7
       <div class="app-header__main--leftBottom"></div>
8 8
       <div class="app-header__main--rightBottom"></div>
9 9
       <h1 class="app-header__title">
10
-        <img class="app-header__logo" src="./../assets/img/logo.png">
10
+        <img class="app-header__logo" src="./../assets/img/logo.png" />
11 11
         大势输送保障管理平台
12 12
       </h1>
13 13
     </div>
14 14
     <!-- /头部线条及标题 -->
15 15
     <div class="app-header__content">
16
-      <!-- 今日新冠送检,标本运输数,患者陪检 -->
17
-      <AppToday></AppToday>
18
-      <!-- /今日新冠送检,标本运输数,患者陪检 -->
19
-      <!-- 时间 -->
20
-      <div class="app-header__contentTime">{{time|weekFormat}}<time>{{time|timeFormat}}</time></div>
21
-      <!-- /时间 -->
16
+      <!-- 累计工单数,标本送检,患者陪检 -->
17
+      <div class="app-header__contentCumulative">
18
+        <!-- 今日工单数,标本送检,陪检人次 -->
19
+        <AppToday></AppToday>
20
+        <!-- /今日工单数,标本送检,陪检人次 -->
21
+      </div>
22
+      <!-- /累计工单数,标本送检,患者陪检 -->
23
+      <div class="app-header__contentWrap">
24
+        <div class="app-header__contentCumulative">
25
+          <AppCumulative></AppCumulative>
26
+        </div>
27
+        <!-- 时间 -->
28
+        <div class="app-header__contentTime">
29
+          {{ time | weekFormat }}<time>{{ time | timeFormat }}</time>
30
+        </div>
31
+        <!-- /时间 -->
32
+      </div>
22 33
     </div>
23 34
   </header>
24 35
 </template>
25 36
 
26 37
 <script>
27 38
 import AppToday from './AppToday'
39
+import AppCumulative from './AppCumulative'
28 40
 export default {
29 41
   name: 'AppHeader',
30 42
   components: {
31
-    AppToday
43
+    AppToday,
44
+    AppCumulative
32 45
   },
33 46
   data () {
34 47
     return {
35 48
       time: new Date().getTime(), // 时间戳
36 49
       timer: null, // 时间定时器
37
-      week: ''// 星期
50
+      week: '' // 星期
38 51
     }
39 52
   },
40 53
   filters: {
41 54
     // 格式化时间
42 55
     timeFormat (time) {
43 56
       const newDate = new Date(time)
44
-      const hours = newDate.getHours().toString().padStart(2, '0')
45
-      const minutes = newDate.getMinutes().toString().padStart(2, '0')
46
-      const seconds = newDate.getSeconds().toString().padStart(2, '0')
57
+      const hours = newDate
58
+        .getHours()
59
+        .toString()
60
+        .padStart(2, '0')
61
+      const minutes = newDate
62
+        .getMinutes()
63
+        .toString()
64
+        .padStart(2, '0')
65
+      const seconds = newDate
66
+        .getSeconds()
67
+        .toString()
68
+        .padStart(2, '0')
47 69
       return `${hours}:${minutes}:${seconds}`
48 70
     },
49 71
     // 获得当前的星期
50 72
     weekFormat (time) {
51 73
       const newDate = new Date(time)
52 74
       const week = newDate.getDay()
53
-      const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
75
+      const weeks = [
76
+        '星期日',
77
+        '星期一',
78
+        '星期二',
79
+        '星期三',
80
+        '星期四',
81
+        '星期五',
82
+        '星期六'
83
+      ]
54 84
       return `${weeks[week]}`
55 85
     }
56 86
   },
@@ -89,12 +119,12 @@ export default {
89 119
     margin: 0 auto;
90 120
     border-bottom: 1px solid #68ffff;
91 121
     position: relative;
92
-    .app-header__title{
122
+    .app-header__title {
93 123
       display: flex;
94 124
       justify-content: center;
95 125
       align-items: center;
96
-      .app-header__logo{
97
-        height: .6125rem;
126
+      .app-header__logo {
127
+        height: 0.6125rem;
98 128
       }
99 129
     }
100 130
     .app-header__main--left {
@@ -165,7 +195,7 @@ export default {
165 195
     }
166 196
   }
167 197
   // 头部内容
168
-  .app-header__content{
198
+  .app-header__content {
169 199
     position: absolute;
170 200
     left: 0;
171 201
     top: 0.4rem;
@@ -174,28 +204,33 @@ export default {
174 204
     align-items: center;
175 205
     width: 100%;
176 206
     height: 0.475rem;
177
-    .app-header__contentNews{
207
+    .app-header__contentNews {
178 208
       display: flex;
179 209
       justify-content: space-between;
180 210
       align-items: center;
181
-      .app-header__contentNewsItem{
182
-        font-size: .2rem;
211
+      .app-header__contentNewsItem {
212
+        font-size: 0.2rem;
183 213
         color: #fff;
184
-        margin-right: .4rem;
185
-        em{
214
+        margin-right: 0.2rem;
215
+        em {
186 216
           color: #70c2ab;
187
-          margin-left: .2rem;
188
-          i{
217
+          // margin-left: 0.1rem;
218
+          i {
189 219
             color: #c27073;
190 220
           }
191 221
         }
192 222
       }
193 223
     }
194
-    .app-header__contentTime{
195
-      color: #fff;
196
-      font-size: .3rem;
197
-      time{
198
-        margin-left: .2rem;
224
+    .app-header__contentWrap {
225
+      width: 8.8rem;
226
+      display: flex;
227
+      justify-content: space-between;
228
+      .app-header__contentTime {
229
+        color: #fff;
230
+        font-size: 0.26rem;
231
+        time {
232
+          margin-left: 0.1rem;
233
+        }
199 234
       }
200 235
     }
201 236
   }

+ 11 - 13
src/components/AppToday.vue

@@ -1,20 +1,16 @@
1 1
 <template>
2 2
   <div class="app-header__contentNews">
3 3
     <div class="app-header__contentNewsItem">
4
-      今日新冠送检
5
-      <em>
6
-        <i>{{allData.todayNovelCoronavirus}}</i>/{{allData.todayNovelCoronavirusAll}}
7
-      </em>
4
+      <strong>今日</strong>工单数:
5
+      <em>{{allData[0]}}</em>
8 6
     </div>
9 7
     <div class="app-header__contentNewsItem">
10
-      今日标本运输数
11
-      <em>
12
-        <i>{{allData.todaySample}}</i>/{{allData.todaySampleAll}}
13
-      </em>
8
+      <strong>今日</strong>标本送检:
9
+      <em>{{allData[1]}}</em>
14 10
     </div>
15 11
     <div class="app-header__contentNewsItem">
16
-      今日患者陪检
17
-      <em>{{allData.todayPaiJian}}/{{allData.todayPaiJianAll}}</em>
12
+      <strong>今日</strong>陪检人次:
13
+      <em>{{allData[2]}}</em>
18 14
     </div>
19 15
   </div>
20 16
 </template>
@@ -26,15 +22,17 @@ export default {
26 22
   inject: ['hospitalId'],
27 23
   data () {
28 24
     return {
29
-      allData: {}, // 数据对象
25
+      allData: [], // 数据
30 26
       timer: null// 轮询定时器
31 27
     }
32 28
   },
33 29
   methods: {
34 30
     // 获取今日新冠送检,今日标本运输数,今日患者陪检
35 31
     async getTodayData () {
36
-      const result = await post(`/largeScreen/getData/todayTitle/${this.hospitalId}`, {})
37
-      this.allData = result
32
+      const srartTime = this.$moment().format('YYYY-MM-DD') // 今天
33
+      const endTime = this.$moment().format('YYYY-MM-DD') // 今天
34
+      const result = await post(`/largeScreen/getData/getTodayTitleNew/${this.hospitalId}`, { srartTime, endTime })
35
+      this.allData = result.list[0]
38 36
       this.polling()
39 37
     },
40 38
     // 轮询请求

+ 2 - 2
src/components/BusinessTypeRatio.vue

@@ -104,8 +104,8 @@ export default {
104 104
             label: {
105 105
               normal: {
106 106
                 show: true,
107
-                position: [365, 0],
108
-                formatter: '{c}',
107
+                position: [330, 0],
108
+                formatter: '{c}',
109 109
                 textStyle: {
110 110
                   color: '#fff'
111 111
                 }

+ 1 - 1
src/components/GroupPerformance.vue

@@ -108,7 +108,7 @@ export default {
108 108
               normal: {
109 109
                 show: true,
110 110
                 position: [300, 0],
111
-                formatter: '{c}',
111
+                formatter: '{c}',
112 112
                 textStyle: {
113 113
                   color: '#fff'
114 114
                 }

+ 3 - 0
src/components/OnTimeArrivalRate.vue

@@ -61,6 +61,9 @@ export default {
61 61
           type: 'value',
62 62
           show: false,
63 63
           position: 'top',
64
+          max: function (value) {
65
+            return value.max * 1.1
66
+          },
64 67
           axisTick: {
65 68
             show: false
66 69
           },