licp
2024-04-17 716b89768ab6b8a9146bfe2a27d35ca8522ba7b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<style scoped>
    .index {
        width: 100%;
        height: calc(100% - 50px);
        overflow-y: auto;
        padding: 25px 0;
    }
 
    .left-1 {
        background-image: url("../../../static/img/首页图片1.png");
        background-size: 100% 100%;
        height: 118px;
        margin-bottom: 16px;
    border-radius: 16px;
    }
 
    .left-1 .say {
        height: 100%;
        display: flex;
        align-items: center;
        margin-left: 15%;
        width: 45%;
    }
 
    .left-1 .say div {
        color: #fff;
        margin: 4px 0;
    }
 
    .left-1 .say-1 {
        font-size: 18px;
    }
 
    .left-1 .say-2 {
        font-size: 17px;
    }
 
    ::-webkit-scrollbar {
        width: 0px;
    }
 
    ::-webkit-scrollbar-thumb {
        background-color: transparent;
        border-radius: 3px;
    }
 
  .card{
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }
 
  .right-1{
    padding: 14px 10px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
 
  .right-1-item{
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  .right-1-item .mun{
    margin-left: 6px;
    color: #0166E2;
  }
 
  .right-2{
    padding: 13px 20px;
    margin-bottom: 16px;
  }
 
  .right-2-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
 
  .right-2-body{
    width: 100%;
    margin-top: 20px;
    display: flex;
    align-items: start;
    justify-content: space-between;
  }
  >>>.el-calendar__header {
    display: none;
  }
  >>>.el-calendar__body{
    padding: 0;
  }
  >>>.el-calendar-table:not(.is-range) td.next {
    /*隐藏下个月的日期*/
    display: none;
  }
  >>>.el-calendar-day{
    height: 40px;
  }
  >>>.el-calendar-table td{
    border: 0;
    font-size: 14px;
  }
  >>>.el-calendar-table tr td:first-child{
    border-left: 0;
  }
  .control{
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0px 0 10px;
  }
  .control .el-button{
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    background: #fff;
    padding: 0;
    color: #0166E2;
    font-size: 20px;
  }
  .list2-item{
    line-height: 22px;
    display: flex;
    margin-bottom: 13px;
    font-size: 14px;
  }
  .right-3{
  }
  .right-3-tab{
    display: flex;
    align-items: center;
    margin-bottom: 16px;
  }
  .tab-item{
    width: 50%;
    box-sizing: border-box;
    text-align: center;
    padding: 16px 0;
    font-size: 20px;
    background: #F5F7FB;
    color: #333333;
  }
  .tab-item.active{
    background: #fff;
    color: #FF3838;
  }
  .right-3-list{
    padding: 0 12px 16px;
  }
  .list3-item{
    padding: 6px 4px;
    margin: 8px 0;
  }
  .list3-item:hover{
    background: rgba(58, 123, 250,0.05);
  }
  .list3-item-title{
    display: flex;
    align-items: start;
    margin-bottom: 10px;
  }
  .list3-item-info{
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #666666;
    font-size: 14px;
  }
  .left-2{
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .left-2-item{
    width: 14.1%;
    border-right: 1px solid #F1F1F1;
  }
  .left-2-item:nth-last-child(1){
    border-right: 0;
  }
  .left-2-item:hover{
    background: rgba(58,123,250,0.05);
  }
  .left-2-item:hover .left-item-title span{
    color: #3A7BFA !important;
  }
  .left-item-title{
    border-bottom: 1px solid #F1F1F1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
  }
  .left-item-body{
    box-sizing: border-box;
    padding: 5px;
    max-height: 711px;
    overflow-y: auto;
  }
  .body-item{
    background: #70A090;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .body-item>div{
    height: calc(100% - 16px);
    margin-top: 16px;
    background: rgba(255, 255, 255,0.9);
    padding: 8px 8px 16px;
    display: flex;
    flex-direction: column;
  }
</style>
 
<template>
    <div class="index">
    <el-row :gutter="25">
      <el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="14">
        <div class="left-1">
                    <div class="say">
                        <div style="display: flex;align-items: center;flex-wrap: wrap;">
                            <div class="say-1">{{user.name}} 您好!祝您开心每一天</div>
                            <div class="say-2">当前时间: {{now}}</div>
                        </div>
                    </div>
                </div>
        <div class="left-2 card">
          <div class="left-2-item" v-for="(item,index) in 7" :key="index">
            <div class="left-item-title">
              <span style="font-size: 18px;">25</span>
              <span style="font-size: 14px;color: #999999;">星期四</span>
            </div>
            <div class="left-item-body">
              <div class="body-item" v-for="(m,i) in 8" :key="i">
                <div>
                  <span style="font-size: 12px;margin-bottom: 17px;">委托订单WT20230101 -001检测</span>
                  <el-image style="height: 24px;width: 24px;border-radius: 50%;">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture-outline"></i>
                    </div>
                  </el-image>
                </div>
              </div>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
        <div class="right-1 card">
          <div class="right-1-item">
            <div class="img">
              <img src="../../../static/img/index-0.svg" alt="">
            </div>
            <div class="mun">
              <p style="font-size: 20px;">254</p>
              <p style="font-size: 14px;margin-bottom: 10px;">我的代办</p>
            </div>
          </div>
          <div class="right-1-item">
            <div class="img">
              <img src="../../../static/img/index-1.svg" alt="">
            </div>
            <div class="mun">
              <p style="font-size: 20px;">254</p>
              <p style="font-size: 14px;margin-bottom: 10px;">已办事宜</p>
            </div>
          </div>
          <div class="right-1-item">
            <div class="img">
              <img src="../../../static/img/index-2.svg" alt="">
            </div>
            <div class="mun">
              <p style="font-size: 20px;">254</p>
              <p style="font-size: 14px;margin-bottom: 10px;">剩余待办</p>
            </div>
          </div>
          <div class="right-1-item">
            <div class="img">
              <img src="../../../static/img/index-3.svg" alt="">
            </div>
            <div class="mun">
              <p style="font-size: 20px;">254</p>
              <p style="font-size: 14px;margin-bottom: 10px;">近期事宜</p>
            </div>
          </div>
        </div>
        <div class="right-2 card">
          <div class="right-2-title">
            <span style="color: #333333;font-size: 16px;">我的日程</span>
            <span style="cursor: pointer;font-size: 12px;
color: #3A7BFA;">添加我的日程</span>
          </div>
          <div class="right-2-body">
            <div class="calendar" style="width: 49%;">
              <div class="control">
                <el-button class="prevm" @click="prevMonth(calendarValue)" icon="el-icon-arrow-left"></el-button>
                <span>{{ calendarValue.getFullYear()+'年'+(calendarValue.getMonth() + 1)+'月' }}</span>
                <el-button class="nextm" @click="nextMonth(calendarValue)" icon="el-icon-arrow-right"></el-button>
              </div>
              <el-calendar v-model="calendarValue">
                <template
                    slot="dateCell"
                    slot-scope="{date, data}">
                        <span>
                            {{ data.day.split('-').slice(2)+'' }}
                        </span>
                    <el-badge v-if="data.isSelected" is-dot class="item">
                    </el-badge>
                </template>
              </el-calendar>
            </div>
            <div class="right-2-list" style="width: 49%;">
              <div class="list2-item" v-for="(m,i) in 5" :key="i">
                <span>14:00</span>
                <el-tooltip style="margin-left: 10px;" effect="dark" content="参加LIMS系统培训会议,并签上线上线上线上线上线上线" placement="top">
                  <p class="ellipsis-multiline" >参加LIMS系统培训会议,并签上线上线上线上线上线上线</p>
                </el-tooltip>
              </div>
            </div>
          </div>
        </div>
        <div class="right-3 card" style="overflow: hidden;">
          <div class="right-3-tab">
            <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==0}" @click="currentIndex=0">预警提醒 10</div>
            <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==1}" @click="currentIndex=1">通知通告 12</div>
          </div>
          <div class="right-3-list">
            <div class="list3-item" v-for="(m,i) in 5" :key="i">
              <div class="list3-item-title">
                <img src="../../../static/img/index-tip.svg" alt="">
                <p>设备到期提醒</p>
              </div>
              <div class="list3-item-info">
                <p>编号<span style="color:#3A7BFA;"> SB20240101-001 </span>的设备将于2023-09-09 11:11:11过期</p>
                <p>2023-09-09 09:09:09</p>
              </div>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    </div>
</template>
 
<script>
    export default {
        data() {
            return {
                user: {},
                now: null,
        calendarValue: new Date(),
        currentIndex:0,
            }
        },
        mounted() {
            this.user = JSON.parse(localStorage.getItem('user'))
            this.nowTime()
            // this.getDataList()
            setInterval(() => {
                this.nowTime()
            }, 1000)
        },
        methods: {
            nowTime() {
                var date = new Date();
                var y = date.getFullYear();
                var m = date.getMonth() + 1;
                var d = date.getDate();
                var h = date.getHours();
                this.timeH = h
                var min = date.getMinutes();
                var s = date.getSeconds();
                if (s < 10) {
                    s = "0" + s;
                }
                if (min < 10) {
                    min = "0" + min;
                }
                if (h < 10) {
                    h = "0" + h;
                }
                if (d < 10) {
                    d = "0" + d;
                }
                if (m < 10) {
                    m = "0" + m;
                }
                this.now = y + "-" + m + "-" + d + "  " + h + ":" + min + ":" + s;
            },
            getDataList() {
                this.$axios.get(this.$api.dataReporting.getDataList).then(res => {
                    this.data = res.data
                })
            },
      nextMonth(value) {
        let year = this.calendarValue.getFullYear();// 当前年份
        let month = this.calendarValue.getMonth() + 1;// 当前月份
        let day = this.calendarValue.getDate();// 当前天数
        let nextyear = year;
        let nextmonth = parseInt(month) + 1;
        // 判断下一月是否会进入下一年
        if (nextmonth === 13) {
          nextyear = parseInt(year) + 1;
          nextmonth = 1;
        }
        // 计算下一年下一个月有多少天
        let nextday = new Date(nextyear, nextmonth, 0);
        let nextdays = nextday.getDate();
        if (day > nextdays) {
          day = nextdays;
          if (day < 10) {
            day = '0' + day;
          }
        }
        if (nextmonth < 10) {
          nextmonth = '0' + nextmonth;
        }
        let nexttime = nextyear + '-' + nextmonth + '-' + day;
 
        // 将得到的年月日格式转换为标准时间,与饿了么时间格式相同才能联动
        this.calendarValue = new Date(nexttime);
      },
      prevMonth(time) {
        let year = this.calendarValue.getFullYear();// 当前年份
        let month = this.calendarValue.getMonth() + 1;// 当前月份
        let day = this.calendarValue.getDate();// 当前天数
        let prevyear = year;
        let prevmonth = parseInt(month) - 1;
        // 判断上一月是否会进入上一年
        if (prevmonth === 0) {
          prevyear = parseInt(year) - 1;
          prevmonth = 12;
        }
        // 计算上一年上一个月有多少天
        let prevday = new Date(prevyear, prevmonth, 0);
        let prevdays = prevday.getDate();
        if (day > prevdays) {
          day = prevdays;
          if (day < 10) {
            day = '0' + day;
          }
        }
        if (prevmonth < 10) {
          prevmonth = '0' + prevmonth;
        }
        let prevtime = prevyear + '-' + prevmonth + '-' + day;
 
        // 将得到的年月日格式转换为标准时间,与饿了么时间格式相同才能联动
        this.calendarValue = new Date(prevtime);
      },
        }
    }
</script>