소스 검색

透析监测打印按钮不激活的bug,权限管理的面包屑,排班周数需切换tab才显示的bug

zhengchengwu 6 년 전
부모
커밋
a4fb30f346

+ 459 - 0
src/xt_pages/dialysis/bloodPresssWatch.1.vue 파일 보기

@@ -0,0 +1,459 @@
1
+<template>
2
+ <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button size="small" icon="el-icon-printer" :disabled="selecting_schs.length == 0" @click="batchPrintAction" type="primary">打印</el-button>
6
+    </div>
7
+    <div class="app-container">
8
+      <!-- <div class="filter-container">
9
+        <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
10
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
11
+      </div>-->
12
+      <div class="cell clearfix">
13
+        <label class="title">
14
+          <span class="name">{{ search_mode == 1 ? "日期查询" : "病人查询" }}</span> :
15
+        </label>
16
+        <el-date-picker
17
+          v-show="search_mode == 1"
18
+          v-model="time"
19
+          prefix-icon="el-icon-date"
20
+          @change="changeTime"
21
+          :editable="false"
22
+          style="width: 250px;"
23
+          type="date"
24
+          placeholder="选择日期时间"
25
+          align="right"
26
+          :picker-options="pickerOptions1"
27
+          format="yyyy-MM-dd"
28
+          value-format="timestamp"
29
+        ></el-date-picker>
30
+        <el-input
31
+          v-show="search_mode == 2"
32
+          v-model="patient_search_keyword"
33
+          style="width: 250px;"
34
+          placeholder="病人名字、透析号"
35
+        >
36
+          <el-button
37
+            slot="append"
38
+            style="background-color: #409EFF; color: white; border-radius: 0;"
39
+            icon="el-icon-search"
40
+            @click="searchPatientAction"
41
+          ></el-button>
42
+        </el-input>
43
+        <el-button
44
+          type="primary"
45
+          @click="changeSearchMode"
46
+        >{{ search_mode == 1 ? "改为病人查询" : "改为日期查询" }}</el-button>
47
+        <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
48
+      </div>
49
+      <div class="cell clearfix">
50
+        <label class="title">
51
+          <span class="name">排班班次</span> :
52
+        </label>
53
+        <div class="time">
54
+          <ul class>
55
+            <li
56
+              :class="item.value==schedulType?'active':''"
57
+              @click="selectSchedulType(item.value)"
58
+              v-for="item in schedulArr"
59
+              :key="item.value"
60
+            >{{item.label}}</li>
61
+          </ul>
62
+        </div>
63
+      </div>
64
+      <div class="cell clearfix">
65
+        <label class="title">
66
+          <span class="name">分区</span> :
67
+        </label>
68
+        <div class="time">
69
+          <ul class>
70
+            <li
71
+              :class="item.id==partitionType?'active':''"
72
+              @click="selectPartitionType(item.id)"
73
+              v-for="item in partitionArr"
74
+              :key="item.id"
75
+            >{{item.name}}</li>
76
+          </ul>
77
+        </div>
78
+      </div>
79
+
80
+    <el-table
81
+      :data="SchedualPatientsTableData"
82
+      style="width: 100%"
83
+      v-loading="loading"
84
+      @current-change="handleSelectionChange"
85
+      :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
86
+      >
87
+        <el-table-column type="selection" width="45" align="center"></el-table-column>
88
+        <el-table-column prop="number" label="机号" align="center"></el-table-column>
89
+        <el-table-column label="排班日期" prop="sch_time" align="center" width="120"></el-table-column>
90
+        <el-table-column prop="dialysis_no" label="透析号" align="center"></el-table-column>
91
+        <el-table-column prop="name" label="姓名" align="center"></el-table-column>
92
+
93
+        <el-table-column prop="mode_name" label="透析模式" align="center"></el-table-column>
94
+
95
+        <el-table-column prop="dialysis_before_weight" label="透前体重 (kg)" align="center"></el-table-column>
96
+        <el-table-column prop="dialysis_after_weight" label="透后体重 (kg)" align="center"></el-table-column>
97
+        <el-table-column label="透中血压">
98
+          <el-table-column v-for="(item, index) in labelArr" :key="index" :label="item">
99
+            <!-- 数据的遍历  scope.row就代表数据的每一个对象-->
100
+            <template slot-scope="scope">
101
+              <!--<span>{{scope.row.bp[index].value}}</span>-->
102
+              <span>{{getValue(scope.row.bp[index])}}</span>
103
+            </template>
104
+          </el-table-column>
105
+        </el-table-column>
106
+      </el-table>
107
+
108
+      <el-pagination
109
+      align="right"
110
+        @current-change="handleCurrentChange"
111
+        :page-sizes="[10]"
112
+        :page-size="10"
113
+        background
114
+        style="margin-top:20px;"
115
+        layout="total, sizes, prev, pager, next, jumper"
116
+        :total="total"
117
+      ></el-pagination>
118
+    </div>
119
+  </div>
120
+</template>
121
+
122
+
123
+<script>
124
+import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
125
+import { parseTime } from "@/utils";
126
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
127
+
128
+export default {
129
+  name: "Patient",
130
+  data() {
131
+    return {
132
+      crumbs:[
133
+        {path:false, name:'透析管理'},
134
+        {path:false, name:'透析监测'},
135
+      ],
136
+      loading: false,
137
+      time: "",
138
+
139
+      search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
140
+      patient_search_keyword: "",
141
+
142
+      SchedualPatientsTableData: [],
143
+      active: true,
144
+      schedulType: 0,
145
+      schedulArr: [
146
+        { value: 0, label: "全部" },
147
+        { value: 1, label: "上午" },
148
+        { value: 2, label: "下午" },
149
+        { value: 3, label: "晚上" }
150
+      ],
151
+
152
+      partitionType: 0,
153
+
154
+      labelArr: ["第1次", "第2次", "第3次", "第4次", "第5次", "第6次", "第7次"],
155
+
156
+      pickerOptions1: {
157
+        shortcuts: [
158
+          {
159
+            text: "今天",
160
+            onClick(picker) {
161
+              picker.$emit("pick", new Date());
162
+            }
163
+          },
164
+          {
165
+            text: "昨天",
166
+            onClick(picker) {
167
+              const date = new Date();
168
+              date.setTime(date.getTime() - 3600 * 1000 * 24);
169
+              picker.$emit("pick", date);
170
+            }
171
+          },
172
+          {
173
+            text: "一周前",
174
+            onClick(picker) {
175
+              const date = new Date();
176
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
177
+              picker.$emit("pick", date);
178
+            }
179
+          },
180
+          {
181
+            text: "清空",
182
+            onClick(picker) {
183
+              picker.$emit("pick");
184
+            }
185
+          }
186
+        ]
187
+      },
188
+
189
+      total: 0,
190
+      listQuery: {
191
+        page: 1,
192
+        limit: 10,
193
+        schedul_type: 0,
194
+        partition_type: 0,
195
+        schedul_time: "",
196
+        keywords: ""
197
+      },
198
+      selecting_schs: [],
199
+      partitionArr: []
200
+    };
201
+  },
202
+  created() {
203
+    var date = new Date();
204
+    this.time = date;
205
+    var year = date.getFullYear();
206
+    var month = date.getMonth() + 1;
207
+    var day = date.getDate();
208
+    if (month < 10) {
209
+      month = "0" + month;
210
+    }
211
+    if (day < 10) {
212
+      day = "0" + day;
213
+    }
214
+    var nowDate = year + "-" + month + "-" + day;
215
+    var date = new Date(nowDate + " 00:00:00");
216
+    this.listQuery.schedul_time = date.getTime();
217
+    this.getAllZone();
218
+    this.getSchedualPatientList();
219
+  },
220
+  methods: {
221
+    clickCurrent(val) {
222
+      console.log(val);
223
+      this.$router.push({
224
+        path: "/dialysis/details",
225
+        query: { patient_id: val.patient_id, date: val.sch_time_int }
226
+      });
227
+    },
228
+    handleSelectionChange(val) {
229
+      console.log(val);
230
+      this.selecting_schs = val;
231
+      console.log(this.selecting_schs,this.selecting_schs.length);
232
+    },
233
+
234
+    selectSchedulType(scheduleType) {
235
+      // alert(scheduleType);/
236
+      this.schedulType = scheduleType;
237
+      this.listQuery.schedul_type = scheduleType;
238
+      this.getSchedualPatientList();
239
+    },
240
+    selectPartitionType(partitionType) {
241
+      this.partitionType = partitionType;
242
+      this.listQuery.partition_type = partitionType;
243
+      this.getSchedualPatientList();
244
+    },
245
+
246
+    changeTime() {
247
+      console.log(this.time);
248
+      this.listQuery.schedul_time = this.time;
249
+      this.getSchedualPatientList();
250
+    },
251
+    getAllZone: function() {
252
+      GetAllZone().then(response => {
253
+        if (response.data.state == 0) {
254
+          this.$message.error(response.data.msg);
255
+          return false;
256
+        } else {
257
+          this.partitionArr = response.data.data.zone;
258
+          this.partitionArr.unshift({ id: 0, name: "全部" });
259
+        }
260
+      });
261
+    },
262
+    getSchedualPatientList: function() {
263
+      this.loading = true;
264
+      if (this.search_mode == 1) {
265
+        this.listQuery.keywords = "";
266
+      } else {
267
+        this.listQuery.schedul_time = "";
268
+      }
269
+      this.SchedualPatientsTableData = [];
270
+      getSchedualPatient(this.listQuery).then(response => {
271
+        if (response.data.state == 0) {
272
+          this.loading = false;
273
+          this.$message.error(response.data.msg);
274
+          return false;
275
+        } else {
276
+          this.loading = false;
277
+          this.total = response.data.data.total;
278
+          // console.log(response.data.data)
279
+          for (let i = 0; i < response.data.data.schedule.length; i++) {
280
+            if (response.data.data.schedule[i].patient.id > 0) {
281
+              let SchedualPatientsTable = {
282
+                bp: []
283
+              };
284
+
285
+              SchedualPatientsTable["sch_id"] = response.data.data.schedule[i].id
286
+              SchedualPatientsTable["sch_time_int"] =
287
+                response.data.data.schedule[i].schedule_date;
288
+              SchedualPatientsTable["sch_time"] = parseTime(
289
+                response.data.data.schedule[i].schedule_date,
290
+                "{y}-{m}-{d}"
291
+              );
292
+              SchedualPatientsTable["dialysis_no"] =
293
+                response.data.data.schedule[i].patient.dialysis_no;
294
+              SchedualPatientsTable["name"] =
295
+                response.data.data.schedule[i].patient.name;
296
+              SchedualPatientsTable["number"] =
297
+                response.data.data.schedule[i].device_number.number;
298
+              SchedualPatientsTable["gender"] =
299
+                response.data.data.schedule[i].patient.gender;
300
+              SchedualPatientsTable["source"] =
301
+                response.data.data.schedule[i].patient.source;
302
+              SchedualPatientsTable["patient_id"] =
303
+                response.data.data.schedule[i].patient_id;
304
+              SchedualPatientsTable["mode_name"] =
305
+                response.data.data.schedule[i].treatment_mode.name;
306
+              if (
307
+                response.data.data.schedule[i].assessment_before_dislysis.id > 0
308
+              ) {
309
+                SchedualPatientsTable["dialysis_before_weight"] =
310
+                  response.data.data.schedule[
311
+                    i
312
+                  ].assessment_before_dislysis.weight_before;
313
+              }
314
+              if (
315
+                response.data.data.schedule[i].assessment_after_dislysis.id > 0
316
+              ) {
317
+                SchedualPatientsTable["dialysis_after_weight"] =
318
+                  response.data.data.schedule[
319
+                    i
320
+                  ].assessment_after_dislysis.weight_after;
321
+              }
322
+
323
+              SchedualPatientsTable.bp = [];
324
+              for (
325
+                let a = 0;
326
+                a < response.data.data.schedule[i].monitoring_record.length;
327
+                a++
328
+              ) {
329
+                let bp = {};
330
+                bp["value"] =
331
+                  response.data.data.schedule[i].monitoring_record[
332
+                    a
333
+                  ].systolic_blood_pressure.toString() +
334
+                  "/" +
335
+                  response.data.data.schedule[i].monitoring_record[
336
+                    a
337
+                  ].diastolic_blood_pressure.toString();
338
+
339
+                SchedualPatientsTable.bp.unshift(bp);
340
+              }
341
+
342
+              this.SchedualPatientsTableData.push(SchedualPatientsTable);
343
+            }
344
+          }
345
+        }
346
+      });
347
+    },
348
+    getValue: function(val) {
349
+      if (val != undefined) {
350
+        return val.value;
351
+      } else {
352
+        return "";
353
+      }
354
+    },
355
+    handleCurrentChange(val) {
356
+      this.listQuery.page = val;
357
+      this.getSchedualPatientList();
358
+    },
359
+    changeSearchMode: function() {
360
+      if (this.search_mode == 1) {
361
+        this.search_mode = 2;
362
+      } else {
363
+        this.search_mode = 1;
364
+      }
365
+    },
366
+    searchPatientAction: function() {
367
+      this.listQuery.keywords = this.patient_search_keyword;
368
+      console.log(this.patient_search_keyword);
369
+      if (this.patient_search_keyword.length == 0) {
370
+        return;
371
+      }
372
+      this.getSchedualPatientList();
373
+    },
374
+    batchPrintAction: function() {
375
+      var sch_ids = []
376
+      for (let index = 0; index < this.selecting_schs.length; index++) {
377
+        sch_ids.push(this.selecting_schs[index].sch_id)
378
+      }
379
+      this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids)
380
+      this.$router.push({ path: "/dialysis/print/batch" });
381
+    }
382
+  },
383
+  components: {
384
+      BreadCrumb
385
+  }
386
+};
387
+</script>
388
+
389
+<style rel="stylesheet/scss" lang="scss" scoped>
390
+.app-container {
391
+//   margin: 20px;
392
+  font-size: 15px;
393
+  .filter-container {
394
+    padding-bottom: 5px;
395
+  }
396
+  .cqd-dataTitle{
397
+    color: #303133;
398
+    font-size: 14px;
399
+    border-bottom: 2px #E4E7ED solid;
400
+    height: 36px;
401
+    line-height: 36px;
402
+    margin: 0 0 25px 0;
403
+    position: relative;
404
+  }
405
+  .cqd-dataTitle::before {
406
+      position: absolute;
407
+      left: 0;
408
+      bottom: -2px;
409
+      content: "";
410
+      width: 42px;
411
+      height: 2px;
412
+      background: #409eff;
413
+  }
414
+  .search-component {
415
+    width: 500px;
416
+    .searchBox {
417
+      width: 300px;
418
+      height: 36px;
419
+      line-height: 36px;
420
+      padding-left: 15px;
421
+      border: 1px #dcdfe6 solid;
422
+      border-right: none;
423
+      outline: none;
424
+      float: left;
425
+      border-radius: 6px 0 0 6px;
426
+      font-size: 14px;
427
+      color: #333;
428
+      background: #fff;
429
+      box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
430
+    }
431
+    .searchBtn {
432
+      background-color: #409eff;
433
+      color: #fff;
434
+      font-size: 15px;
435
+      text-align: center;
436
+      height: 36px;
437
+      line-height: 36px;
438
+      float: left;
439
+      outline: none;
440
+      width: 70px;
441
+      border: none;
442
+      border-radius: 0 6px 6px 0;
443
+      font-family: "Microsoft Yahei";
444
+      cursor: pointer;
445
+    }
446
+  }
447
+  .amount {
448
+    font-weight: normal;
449
+    padding: 10px 0 0 0;
450
+    color: #606266;
451
+    font-size: 14px;
452
+    span {
453
+      color: #ef2525;
454
+      font-family: "Arial";
455
+      padding: 0 2px;
456
+    }
457
+  }
458
+}
459
+</style>

+ 21 - 2
src/xt_pages/role/CreateAdmin.vue 파일 보기

@@ -1,16 +1,35 @@
1 1
 <template>
2
+<div class="main-contain">
3
+  <div class="position">
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        <!-- <router-link to="/role/admin/create">
6
+          <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="float:right;">保存</el-button>
7
+        </router-link> -->
8
+  </div>
2 9
     <div class="app-container">
3 10
         <edit-admin-info :admin_id="0"></edit-admin-info>
4 11
     </div>
12
+</div>
5 13
 </template>
6 14
 
7 15
 <script>
8 16
 import EditAdminInfo from './components/EditAdminInfo.vue'
17
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
9 18
 
10 19
 export default {
11 20
     name: 'CreateAdmin',
12 21
     components: {
13
-        EditAdminInfo
14
-    }
22
+        EditAdminInfo,
23
+        BreadCrumb
24
+    },
25
+    data() {
26
+        return {
27
+            crumbs:[
28
+                {path:false, name:'权限管理'},
29
+                {path:false, name:'用户管理'},
30
+                {path:false, name:'新增用户'},
31
+            ],
32
+        }
33
+    },
15 34
 }
16 35
 </script>

+ 16 - 1
src/xt_pages/role/EditAdmin.vue 파일 보기

@@ -1,19 +1,34 @@
1 1
 <template>
2
+<div class="main-contain">
3
+  <div class="position">
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        <!-- <router-link to="/role/admin/create">
6
+          <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="float:right;">保存</el-button>
7
+        </router-link> -->
8
+  </div>
2 9
     <div class="app-container">
3 10
         <edit-admin-info :admin_id="admin_id"></edit-admin-info>
4 11
     </div>
12
+</div>
5 13
 </template>
6 14
 
7 15
 <script>
8 16
 import EditAdminInfo from './components/EditAdminInfo.vue'
17
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
9 18
 
10 19
 export default {
11 20
     name: 'EditAdmin',
12 21
     components: {
13
-        EditAdminInfo
22
+        EditAdminInfo,
23
+        BreadCrumb
14 24
     },
15 25
     data() {
16 26
         return {
27
+            crumbs:[
28
+                {path:false, name:'权限管理'},
29
+                {path:false, name:'用户管理'},
30
+                {path:false, name:'编辑用户信息'},
31
+            ],
17 32
             admin_id: 0
18 33
         }
19 34
     },

+ 15 - 1
src/xt_pages/role/EditPerview.vue 파일 보기

@@ -1,4 +1,8 @@
1 1
 <template>
2
+<div class="main-contain">
3
+  <div class="position">
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+  </div>
2 6
     <div class="app-container">
3 7
         <template v-if="purviews.length > 0">
4 8
             <el-row>
@@ -15,20 +19,30 @@
15 19
                     <router-link :to="{ path:'/role/manage' }">
16 20
                         <el-button>取消</el-button>
17 21
                     </router-link>
18
-                    <el-button type="primary" @click="submitAction()">确定</el-button>
22
+                    <el-button type="primary" @click="submitAction()">保存</el-button>
19 23
                 </el-col>
20 24
             </el-row>
21 25
         </template>
22 26
     </div>
27
+  </div>
23 28
 </template>
24 29
 
25 30
 <script>
26 31
 import {getEditPurviewInitData, editPurview} from '@/api/role/role'
32
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
27 33
 
28 34
 export default {
29 35
     name: 'EditPerview',
36
+    components: {
37
+        BreadCrumb
38
+    },
30 39
     data() {
31 40
         return {
41
+            crumbs:[
42
+                {path:false, name:'权限管理'},
43
+                {path:false, name:'角色管理'},
44
+                {path:false, name:'权限设置'},
45
+            ],
32 46
             role_id: 0,
33 47
             purviews: [], // [{id, pid, name, childs}]
34 48
             treeProps: {

+ 5 - 1
src/xt_pages/role/admin.vue 파일 보기

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
         <router-link to="/role/admin/create">
6 6
           <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="float:right;">新增</el-button>
7 7
         </router-link>
@@ -63,6 +63,10 @@ export default {
63 63
   name: 'adminManage',
64 64
   data() {
65 65
     return {  
66
+      crumbs:[
67
+        {path:false, name:'权限管理'},
68
+        {path:false, name:'用户管理'},
69
+      ],
66 70
       is_loading_admins: true,
67 71
       admins: [], // [{user_id, user_name, role_name, title_name, ip, last_login_time, status}]
68 72
       admin_total_count: 0,

+ 1 - 1
src/xt_pages/role/components/EditAdminInfo.vue 파일 보기

@@ -34,7 +34,7 @@
34 34
                     <router-link to="/role/admin/manage">
35 35
                         <el-button>取消</el-button>
36 36
                     </router-link>
37
-                    <el-button type="primary" @click="submitAction">确定</el-button>
37
+                    <el-button type="primary" @click="submitAction">保存</el-button>
38 38
                 </el-form-item>
39 39
 
40 40
             </el-form>

+ 5 - 1
src/xt_pages/role/role.vue 파일 보기

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
     <el-button type="primary" size="small" icon="el-icon-circle-plus" style="float:right;" @click="addRoleAction">新增</el-button>
6 6
   </div>
7 7
   <div class="app-container">
@@ -64,6 +64,10 @@ export default {
64 64
   },
65 65
   data: function() {
66 66
     return {
67
+      crumbs:[
68
+          {path:false, name:'权限管理'},
69
+          {path:false, name:'角色管理'},
70
+      ],
67 71
       loading_roles: true,
68 72
       roles: [],
69 73
       role_total_count: 0,

+ 5 - 1
src/xt_pages/role/special_permission.vue 파일 보기

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
     
6 6
   </div>
7 7
     <div class="app-container">
@@ -38,6 +38,10 @@ export default {
38 38
     name: "SpecialPermissionManage",
39 39
     data() {
40 40
         return {
41
+            crumbs:[
42
+                {path:false, name:'权限管理'},
43
+                {path:false, name:'特殊权限管理'},
44
+            ],
41 45
             origin_users: [],
42 46
 
43 47
             users: [],

+ 7 - 1
src/xt_pages/workforce/appointment.vue 파일 보기

@@ -10,7 +10,7 @@
10 10
   <div class="app-container">
11 11
     <!-- <el-row>
12 12
       <el-col :span="24"> -->
13
-        <el-tabs v-model="activeName" :tab-position="tabPosition"  >
13
+        <el-tabs v-model="activeName" :tab-position="tabPosition"  ref="elTabs">
14 14
           <el-tab-pane name="lastWeek">
15 15
               <span slot="label"><i class="el-icon-date"></i> 上周 ({{theWeek.lastWeek}})</span>
16 16
           </el-tab-pane>
@@ -73,6 +73,12 @@ export default {
73 73
         this.theWeek.lastWeek = this.theWeek.thisWeek - 1;
74 74
         this.theWeek.nextWeek = this.theWeek.thisWeek + 1;
75 75
         this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2;
76
+        // 在控制变量改变的时候进行 强制渲染更新
77
+        let childrenRefs = this.$refs.elTabs.$children
78
+        this.$nextTick(() => {
79
+          childrenRefs.forEach(child => child.$forceUpdate())
80
+        })
81
+
76 82
         var that = this;
77 83
         if (partitions.length > 0) {
78 84
           partitions.forEach(function(partition) {

+ 6 - 1
src/xt_pages/workforce/remind.vue 파일 보기

@@ -4,7 +4,7 @@
4 4
      <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
   </div>
6 6
   <div class="app-container">
7
-    <el-tabs v-model="activeName">
7
+    <el-tabs v-model="activeName"  ref="elTabs">
8 8
         <el-tab-pane name="thisWeek">
9 9
             <span slot="label"><i class="el-icon-date"></i> 本周({{theWeek.thisWeek}})</span>
10 10
         </el-tab-pane>
@@ -49,6 +49,11 @@ export default {
49 49
           }
50 50
           this.theWeek.thisWeek = response.data.data.theWeek;
51 51
           this.theWeek.nextWeek = this.theWeek.thisWeek+1;
52
+          
53
+          let childrenRefs = this.$refs.elTabs.$children
54
+          this.$nextTick(() => {
55
+            childrenRefs.forEach(child => child.$forceUpdate())
56
+          })
52 57
         });
53 58
       },
54 59
       handleClick(tab, event) {