13404089107
2025-05-28 a60dc30be50598fe2d1acb42f8171ec69e37b436
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
464
465
466
<template>
  <div class="login-page">
    <div class="top-nav">
      <HeaderNav class="header-main" :logo="true" />
    </div>
 
    <div class="middleground">
      <!-- 左侧模块区域 -->
      <div class="left-modules">
        <!-- 这里将放置四个模块 -->
        <div class="module-item">
          <!-- 模块内容,例如图标和文字 -->
          <div class="module-icon"></div>
          <div class="module-text">实验室运行模块</div>
        </div>
        <div class="module-item">
          <div class="module-icon"></div>
          <div class="module-text">专业报告库</div>
        </div>
        <div class="module-item">
          <div class="module-icon"></div>
          <div class="module-text">化验师QA专题报告库</div>
        </div>
        <div class="module-item">
          <div class="module-icon"></div>
          <div class="module-text">评定模块</div>
        </div>
      </div>
 
      <!-- 右侧日历和待办事项区域 -->
      <div class="right-content">
        <!-- 日历 -->
        <div class="calendar-section">
          <!-- <h3>日历</h3> -->
          <el-calendar v-model="date" />
        </div>
 
        <!-- 待办事项 -->
        <div class="todo-list-section">
          <div class="title">待办事项</div>
          <!-- 待办事项列表将放置在这里 -->
          <div class="todo-list">
            <div class="todo-item" v-for="i in 6" :key="i">
              <div class="todo-details">
                <div class="notice-card">
                  <div class="todo-icon">
                  </div>
                  <div class="red-notice"></div>
                </div>
 
 
                <span class="todo-title">您有 [1] 条 【项目课题方案】 等待审批</span>
              </div>
              <div class="todo-meta">
                <div class="me"></div>
                <span class="todo-submitter">提交人: 王晓晓</span>
                <div class="time"></div>
                <span class="todo-submitter">2023.12.10 08:00</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
 
 
  </div>
</template>
<script>
import { loginReq } from './service'
import HeaderNav from '../../layouts/components/HeaderNav.vue'
// 引入 Element UI 的日历组件
// import { ElCalendar } from 'element-ui';
export default {
  name: 'Login',
  components: {
    HeaderNav,
    // ElCalendar // 注册 ElCalendar 组件
  },
  data() {
    return {
      windowWidth: window.innerWidth,
 
      loginForm: {
        username: '',
        password: ''
      },
      date: new Date(),
      viewWidth: '',
      scale: 1
    }
  },
  computed: {},
 
  created() { },
  mounted() { },
  methods: {
    // ...mapActions(['setIsFold']),
    handleKeyDown(event) {
      if (event.key === 'Enter') {
        this.login()
      }
    },
    // 添加处理窗口大小变化的方法
    handleResize() {
      this.viewWidth = window.innerWidth
    },
    login() {
      if (this.loginForm.username == '') {
        this.$message.warning('请输入账号')
        return
      }
      if (this.loginForm.password == '') {
        this.$message.warning('请输入密码')
        return
      }
      loginReq(this.loginForm).then(res => {
        sessionStorage.setItem('token', res.token)
        sessionStorage.setItem('userInfo', JSON.stringify(res.userInfo.user))
        this.$router.push('/system')
      })
    }
  }
}
</script>
<style scoped lang="less">
.flex {
  display: flex;
}
 
.j-between {
  justify-content: space-between;
}
 
.mt-40 {
  margin-top: 40px;
}
 
.login-page {
  width: 100%;
  height: 100vh;
  background: url('../../assets/login/midBg.png') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  // background-attachment: fixed;
  // display: flex;
  // justify-content: center;
  // align-items: center;
 
  .top-nav {
    display: flex;
    // justify-content: space-between;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease-in-out;
    height: 70px;
 
    .header-main {
      height: 70px;
      min-width: 200px;
    }
  }
 
  .middleground {
    flex: 1;
    height: calc(100vh - 70px);
    display: flex;
    justify-content: space-between;
    padding: 20px 20px 20px 108px;
    /* 调整左右内边距 */
 
    .left-modules {
      width: 38%;
      align-items: center;
 
      // padding: 140px 0;
      display: flex;
      flex-wrap: wrap;
      box-sizing: content-box;
      justify-content: space-between;
      /* 水平居中 */
      align-items: center;
      /* 垂直居中 */
      padding: 100px 0;
    }
 
    .module-item {
      width: 37%;
      height: 30%;
      // width: 307px;
      // height: 307px;
      background-color: red;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      background: url('../../assets/login/cardBg.png');
      /* 设置模块背景图 */
      background-size: cover;
      /* 背景图覆盖整个元素 */
      background-position: center top;
      /* 调整背景图位置:顶部居中 */
 
      .module-icon {
        width: 80px;
        height: 80px;
        // background-color: #eee; /* Placeholder for icon */
        z-index: 1;
        /* 确保图标在背景之上 */
        background-size: contain;
        /* 图标背景图包含在元素内 */
        background-repeat: no-repeat;
        /* 不重复 */
        background-position: 100% 100%;
        /* 图标背景图居中 */
      }
 
      /* 为每个模块图标设置特定的背景图片 */
      &:nth-child(1) .module-icon {
        background-image: url('../../assets/login/img1.png');
      }
 
      &:nth-child(2) .module-icon {
        background-image: url('../../assets/login/img2.png');
      }
 
      &:nth-child(3) .module-icon {
        background-image: url('../../assets/login/img3.png');
      }
 
      &:nth-child(4) .module-icon {
        background-image: url('../../assets/login/img4.png');
      }
 
      .module-text {
        font-size: 16px;
        font-weight: bold;
        position: relative;
        /* 为下划线定位 */
        z-index: 1;
        /* 确保文字在背景之上 */
        margin-bottom: 50px;
 
        &::after {
          content: '';
          position: absolute;
          left: 50%;
          /* 从文字中间开始 */
          bottom: -5px;
          /* 调整下划线位置 */
          transform: translateX(-50%);
          /* 使下划线居中 */
          width: 50%;
          /* 调整下划线宽度 */
          height: 2px;
          /* 调整下划线粗细 */
          background-color: #007bff;
          /* 示例下划线颜色 */
        }
      }
    }
 
    .right-content {
      width: 45%;
      height: calc(100vh - 150px);
 
      display: flex;
      /* 使日历和待办事项垂直排列 */
      flex-direction: column;
 
      .calendar-section {
        margin-bottom: 20px;
        /* 日历下方间距 */
        height: 59%;
        padding: 20px;
        border-radius: 14px;
        background: url(../../assets/login/rili.png) no-repeat center;
 
        h3 {
          margin-top: 0;
          margin-bottom: 10px;
          font-size: 18px;
          color: #333;
        }
 
        .calendar {
          height: 100% !important;
          width: 100% !important;
        }
 
        /* 尝试调整 Element UI 日历的样式 */
        ::v-deep .el-calendar {
          height: 100%;
          width: 100%;
          background: none !important;
 
          .el-calendar__header {
            padding: 12px 0;
          }
 
          .el-calendar__body {
            padding: 0;
          }
 
          .el-calendar-table {
            thead th {
              padding: 5px 0;
              font-weight: normal;
            }
 
            tbody td {
              border: none;
 
              .el-calendar-day {
                /* 调整日期单元格高度 */
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: 4px;
                /* 圆角 */
                margin: 2px;
                /* 单元格间距 */
                cursor: pointer;
                width: 90px;
 
                height: 58px;
                background: #FFFFFF;
                border-radius: 8px;
                border: 1px solid #EDEDED;
 
                &:hover {
                  background-color: #f0f0f0;
                }
              }
 
              /* 当前日期样式 */
              &.is-selected .el-calendar-day {
                background-color: #007bff;
                /* 示例选中颜色 */
                color: #fff;
              }
            }
          }
        }
      }
 
      .todo-list-section {
        height: 32%;
        border-radius: 14px;
        background-color: rgba(255, 255, 255, 1);
        // overflow: auto;
        padding: 24px 34px;
        display: flex;
        flex-direction: column;
 
        .title {
          height: 22px;
          font-family: SourceHanSansCN, SourceHanSansCN;
          font-weight: bold;
          font-size: 18px;
          color: #222222;
          line-height: 22px;
          margin-bottom: 20px;
        }
 
        .todo-list {
          flex: 1;
          height: 100%;
          overflow: auto;
        }
 
        /* 待办事项列表样式 */
        .todo-item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 20PX;
 
          /* 分隔线 */
          &:first-child {
            margin-top: 3px;
          }
 
          .todo-details {
            display: flex;
            align-content: center;
          }
 
          .notice-card {
            position: relative;
            margin-right: 12px;
 
          }
 
          .todo-icon {
            position: relative;
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            background: url('../../assets//login/notice.png') no-repeat center;
            background-position: center;
            background-size: 100% 100%;
 
          }
 
          .red-notice {
            position: absolute;
            top: -3px;
            right: -3px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(235, 65, 65, 1);
          }
 
          .todo-title {
            font-family: SourceHanSansCN, SourceHanSansCN;
            font-weight: 500;
            font-size: 14px;
            color: #303133;
            line-height: 24px;
          }
 
          .todo-meta {
            display: flex;
            align-items: center;
          }
 
          .time {
            width: 14px;
            height: 14px;
            margin-right: 6px;
            margin-left: 20px;
            flex-shrink: 0;
            background: url('../../assets//login/time.png') no-repeat center;
            background-position: center;
            background-size: 100% 100%;
          }
 
          .me {
            width: 14px;
            height: 14px;
            margin-right: 6px;
            flex-shrink: 0;
            background: url('../../assets//login/mi.png') no-repeat center;
            background-position: center;
            background-size: 100% 100%;
          }
 
          .todo-submitter {
            font-family: SourceHanSansCN, SourceHanSansCN;
            font-weight: 400;
            font-size: 12px;
            color: #909399;
            // line-height: 18px;
          }
        }
      }
    }
  }
 
 
}
</style>