qinxianzhangyao
2023-12-11 83e6634922b704750575d3dbf6275edb0fae4cbb
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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
<template>
  <div class="app-container">
    <div class="hist1">
      <div class="hist2">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="姓名" prop="name">
            <el-input v-model="queryParams.name" placeholder="请输入客户名" clearable @keyup.enter.native="handleQuery"
              style="width:130px" />
          </el-form-item>
          <el-form-item label="体检号" prop="tjNum">
            <el-input ref="inputName" v-model="queryParams.tjNum" placeholder="请输入体检号" style="width: 170px" clearable
              @keyup.enter.native="handleQuery" />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
        <el-table :row-class-name="tableRowClassName" height="650px" v-loading="loading" :data="orderList"
          ref="multipleTable" @selection-change="handleSelectionChange" border style="width: 95%">
          <el-table-column type="selection" width="40px" align="center" />
          <el-table-column label="序号" align="center" prop="newID" width="50px" :show-overflow-tooltip="true"
            fixed="left" />
          <el-table-column label="姓名" align="center" prop="tjCustomerName" width="110px" :show-overflow-tooltip="true" />
          <el-table-column label="性别" align="center" prop="tjCustomerSex" width="55px" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <span v-if="scope.row.tjCustomerSex == '0'">男</span>
              <span v-if="scope.row.tjCustomerSex == '1'">女</span>
            </template>
          </el-table-column>
          <el-table-column label="电话" align="center" prop="tjCustomerPhone" width="120px" :show-overflow-tooltip="true" />
          <el-table-column label="年龄" align="center" prop="tjCustomerAge" width="70" :show-overflow-tooltip="true" />
          <el-table-column label="年龄单位" align="center" prop="ageUnit" width="80" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.dict_ageunit" :value="scope.row.ageUnit" />
            </template>
          </el-table-column>
          <el-table-column label="职业" align="center" prop="career" width="120" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.dict_job" :value="scope.row.career" />
            </template>
          </el-table-column>
        </el-table>
        <div class="pagi">
          <div class="pagi1">
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize" @pagination="getList" />
          </div>
        </div>
      </div>
      <div class="hist3">
        <span class="txt">问诊信息</span>
        <el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true" size="mini">
          <el-collapse class="coll" v-model="activeName" accordion>
            <el-collapse-item class="coll" title="基本信息" name="1" style="width: 900px; font-weight: 600">
              <div style="width: 900px">
                <el-form-item label="姓名" prop="cusName">
                  <el-input v-model="form.cusName" placeholder="请输入姓名" />
                </el-form-item>
                <el-form-item label="职业" prop="work">
                  <el-select filterable v-model="form.work" placeholder="请选择职业" clearable style="width: 150px">
                    <el-option v-for="dict in dict.type.tj_work" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item label="工作状态" prop="workStatus">
                  <el-select filterable v-model="form.workStatus" placeholder="请选择工作状态" clearable style="width: 150px">
                    <el-option v-for="dict in dict.type.tj_work_status" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item label="接触毒物" prop="contactPoison">
                  <el-input type="textarea" rows="4" v-model="form.contactPoison" placeholder="请输入接触毒物"
                    style="width: 700px" />
                </el-form-item>
                <el-form-item label="既往病史" prop="medicalHistory">
                  <el-input type="textarea" rows="4" v-model="form.medicalHistory" placeholder="请输入既往病史"
                    style="width: 700px" />
                </el-form-item>
              </div>
            </el-collapse-item>
            <el-collapse-item title="月经史" name="2" v-show="sex">
              <div style="width: 900px">
                <el-form-item label="初潮(岁)" prop="chuchao">
                  <el-input v-model="form.chuchao" style="width: 70px" />
                </el-form-item>
                <el-form-item label="经期" prop="jingqi">
                  <el-input v-model="form.jingqi" style="width: 70px" />天
                </el-form-item>
                <el-form-item label="周期" prop="zhouqi">
                  <el-input v-model="form.zhouqi" style="width: 70px" />天
                </el-form-item>
                <el-form-item label="末次月经" prop="mociage">
                  <el-input v-model="form.mociage" style="width: 100px" />
                </el-form-item>
              </div>
            </el-collapse-item>
            <el-collapse-item title="生育史" name="3" v-show="sex">
              <div style="width: 900px">
                <el-form-item label="现有子女(人)" prop="zinv">
                  <el-input v-model="form.zinv" style="width: 70px" />
                </el-form-item>
                <el-form-item label="流产(次)" prop="liuchan">
                  <el-input v-model="form.liuchan" style="width: 70px" />
                </el-form-item>
                <el-form-item label="早产(次)" prop="zaochan">
                  <el-input v-model="form.zaochan" style="width: 70px" />
                </el-form-item>
                <el-form-item label="死产(次)" prop="sichan">
                  <el-input v-model="form.sichan" style="width: 70px" />
                </el-form-item>
                <el-form-item label="异常胎(次)" prop="yichangtai">
                  <el-input v-model="form.yichangtai" style="width: 70px" />
                </el-form-item>
              </div>
            </el-collapse-item>
            <el-collapse-item title="烟酒史" name="4">
              <div style="width: 900px">
                <el-form-item label="是否吸烟" prop="xiyan">
                  <!-- <el-input v-model="form.xiyanpinlv" placeholder="请输入吸烟频率" /> -->
                  <el-select filterable v-model="form.xiyan" placeholder="请选择是否吸烟" clearable style="width: 150px">
                    <el-option v-for="dict in dict.type.tj_smoking_pinlv" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item label="吸烟频率" prop="xiyanpinlv">
                  <el-input v-model="form.xiyanpinlv" style="width: 70px" />支/天
                </el-form-item>
                <el-form-item label="吸烟时间" prop="xiyanyear">
                  <el-input v-model="form.xiyanyear" style="width: 70px" />年 </el-form-item><br />
                <el-form-item label="是否饮酒" prop="yinjiu">
                  <!-- <el-input v-model="form.yinjiupinlv" placeholder="请输入饮酒频率" /> -->
                  <el-select filterable v-model="form.yinjiu" placeholder="请选择是否饮酒" clearable style="width: 150px">
                    <el-option v-for="dict in dict.type.tj_smoking_pinlv" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item label="饮酒频率" prop="yinjiupinlv">
                  <el-input v-model="form.yinjiupinlv" style="width: 70px" />ml/天
                </el-form-item>
                <el-form-item label="饮酒时间" prop="yinjiuyear">
                  <el-input v-model="form.yinjiuyear" style="width: 70px" />年
                </el-form-item>
                <el-form-item label="其他" prop="qita">
                  <el-input v-model="form.qita" placeholder="请输入其他" type="textarea" style="width: 600px" rows="2" />
                </el-form-item>
              </div>
            </el-collapse-item>
            <el-collapse-item title="急慢性职业病史信息" name="5">
              <div style="width: 900px">
                <el-row :gutter="10" class="mb8">
                  <el-col :span="1.5">
                    <el-button type="primary" icon="el-icon-plus" size="mini" @click="addmembers()">添加
                    </el-button>
                  </el-col>
                  <el-col :span="1.5">
                    <el-button type="danger" icon="el-icon-delete" size="mini" @click="delemembers()">删除
                    </el-button>
                  </el-col>
                </el-row>
                <el-table border :data="form.tjAskHistorysList" ref="tjAskHistorys" style="width: 98%"
                  @selection-change="handlebingChange">
                  <el-table-column type="selection" width="40" align="center" />
                  <!-- <el-table-column
            label="序号"
            align="center"
            prop="index"
            width="50"
          /> -->
                  <el-table-column label="疾病名称" prop="diseaseName">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.diseaseName" placeholder="请输入疾病名称" />
                    </template>
                  </el-table-column>
                  <el-table-column label="诊断日期" prop="diseaseData">
                    <template slot-scope="scope">
                      <!-- <el-input
                v-model="scope.row.diseaseData"
                placeholder="请输入诊断日期"
              /> -->
                      <el-date-picker size="mini" v-model="scope.row.diseaseData" align="right" type="date"
                        placeholder="选择日期" :picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
                      </el-date-picker>
                    </template>
                  </el-table-column>
                  <el-table-column label="诊断单位" prop="diseaseCompany">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.diseaseCompany" placeholder="请输入诊断单位" />
                    </template>
                  </el-table-column>
                  <el-table-column label="是否痊愈" prop="isOk">
                    <template slot-scope="scope">
                      <!-- <el-input v-model="scope.row.isOk" placeholder="请输入是否痊愈" /> -->
                      <el-select filterable size="mini" v-model="scope.row.isOk" placeholder="请选择是否痊愈" clearable>
                        <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
                          :value="dict.value" />
                      </el-select>
                    </template>
                  </el-table-column>
                  <el-table-column label="备注" prop="remark">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.remark" placeholder="请输入备注" />
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </el-collapse-item>
 
            <el-collapse-item title="职业史" name="7">
              <div style="width: 900px">
                <el-row :gutter="10" class="mb8">
                  <el-col :span="1.5">
                    <el-button type="primary" icon="el-icon-plus" size="mini" @click="addmemberss()">添加
                    </el-button>
                  </el-col>
                  <el-col :span="1.5">
                    <el-button type="danger" icon="el-icon-delete" size="mini" @click="delememberss()">删除
                    </el-button>
                  </el-col>
                </el-row>
                <el-table border :data="form.workLogs" style="width: 98%" @selection-change="handlezhiyeChange">
                  <el-table-column type="selection" width="40" align="center" />
                  <!-- <el-table-column
            label="序号"
            align="center"
            prop="index"
            width="50"
          /> -->
                  <el-table-column label="开始时间" prop="beginTime">
                    <template slot-scope="scope">
                      <el-date-picker size="mini" v-model="scope.row.beginTime" align="right" type="date"
                        placeholder="选择日期" :picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
                      </el-date-picker>
                    </template>
                  </el-table-column>
                  <el-table-column label="结束时间" prop="endTime">
                    <template slot-scope="scope">
                      <el-date-picker size="mini" v-model="scope.row.endTime" align="right" type="date" placeholder="选择日期"
                        :picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
                      </el-date-picker>
                    </template>
                  </el-table-column>
                  <el-table-column label="工作单位" prop="workCompany">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.workCompany" placeholder="请输入工作单位" />
                    </template>
                  </el-table-column>
                  <el-table-column label="部门" prop="workDept">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.workDept" placeholder="请输入部门" />
                    </template>
                  </el-table-column>
                  <el-table-column label="工种" prop="workType">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.workType" placeholder="请输入工种" />
                    </template>
                  </el-table-column>
                  <el-table-column label="有害因素" prop="harmTypeLogs">
                    <template slot-scope="scope">
                      <!-- <el-input v-model="scope.row.isOk" placeholder="请输入是否痊愈" /> -->
                      <el-select filterable size="mini" v-model="scope.row.harmTypeLogs" multiple placeholder="请选择有害因素" clearable>
                        <el-option v-for="dict in harmTypeList" :key="dict.aid" :label="dict.harmType"
                          :value="dict.aid" />
                      </el-select>
                    </template>
                  </el-table-column>
                  <el-table-column label="防护措施" prop="fangHu">
                    <template slot-scope="scope">
                      <el-input size="mini" v-model="scope.row.fangHu" placeholder="请输入防护措施" />
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </el-collapse-item>
          </el-collapse>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="submitForm" style="margin-top: 10px" :disabled="isdisabled">提交</el-button>
        </div>
      </div>
    </div>
 
    <!-- 添加或修改问诊对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
    </el-dialog>
  </div>
</template>
 
<script>
import {
  updateHistory,
  getInfoById,
} from "@/api/hosp/history";
import { Message } from "element-ui";
import { getOrderList } from "@/api/hosp/order";
import {
  listHarmType,
} from "@/api/hosp/harmType";
export default {
  name: "History",
  dicts: ["tj_smoking_pinlv", "sys_yes_no", "tj_work_status", "tj_work", "dict_ageunit", "dict_job"],
  data() {
    return {
      selectList: [],
      dataList:[],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      sex: true,
      activeName: "1",
      // 遮罩层
      loading: true,
      isdisabled: false,
      // 选中数组
      ids: [],
      // 子表选中数据
      checkedTjAskHistorys: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 问诊表格数据
      historyList: [],
      // 体检记录表格数据
      orderList: [],
      // ${subTable.functionName}表格数据
      tjAskHistorysList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        cusName: null,
      },
      harmTypeList:[],
      // 表单参数
      form: {},
      chageall: [],
      bingshiall: [],
      rew: [],
      // 表单校验
      rules: {
        deleted: [
          {
            required: true,
            message: "",
            trigger: "blur",
          },
        ],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询问诊列表 */
    // getList() {
    //   this.loading = true;
    //   listHistory(this.queryParams).then((response) => {
    //     this.historyList = response.rows;
    //     response.rows.forEach((item, index) => {
    //       item.newID =
    //         (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
    //         index +
    //         1;
    //     });
    //     this.total = response.total;
    //     this.loading = false;
    //   });
    // },
    /** 查询体检记录列表 */
    getList() {
      this.loading = true;
      listHarmType().then(response => {
        this.harmTypeList = response.rows;
        this.loading = false;
      });
      getOrderList(this.queryParams).then((response) => {
        this.orderList = response.data.list;
        if (this.orderList) {
          this.orderList.forEach((item, index) => {
            item.newID =
              (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
              index +
              1;
          });
          if (response.code === 200) {
            if (this.orderList.length != 0) {
              this.$nextTick(() => {
                this.$refs.multipleTable.toggleRowSelection(
                  this.orderList[0],
                  true
                );
                
              });
              this.dataList =  this.orderList[0]
            } else {
              this.$refs.multipleTable.clearSelection();
            }
          }
        }
        this.total = response.data.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        askId: null,
        cusId: null,
        cusName: null,
        work: null,
        workStatus: null,
        medicalHistory: null,
        chuchao: null,
        jingqi: null,
        zhouqi: null,
        mociage: null,
        zinv: null,
        liuchan: null,
        zaochan: null,
        sichan: null,
        yichangtai: null,
        xiyan: null,
        xiyanpinlv: null,
        xiyanyear: null,
        yinjiu: null,
        yinjiupinlv: null,
        yinjiuyear: null,
        qita: null,
        remark: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        deleted: null,
        userId: null,
      };
      this.tjAskHistorysList = [];
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 单选框选中数据
    handleSelectionChange(selection) {
      this.dataList = []
      this.selectList = selection;
      // this.ids = selection.map((item) => item.askId);
      // this.single = selection.length !== 1;
      // this.multiple = !selection.length;
      this.dataList = this.$refs.multipleTable.selection;
      this.dataList.forEach((item) => {
        // this.allList = item.tjTollCollectorDetailList
        // this.id = item.id;
        // this.tollCollectorId = item.tollCollectorId
      });
      if (selection.length > 1) {
        let del_row = selection.shift();
        this.$refs.multipleTable.toggleRowSelection(del_row, false);
      }
      selection.forEach(item1 => {
        if (item1.tjCustomerSex === 1) {
          this.sex = true;
        } else {
          this.sex = false;
        }
      })
      let tjNumber = selection.map((item) => item.tjNumber);
      getInfoById(tjNumber).then((response) => {
        this.form = response.data;
        if (this.form.xiyan == null) {
          this.form.xiyan = "1"
        }
        if (this.form.xiyanpinlv == null) {
          this.form.xiyanpinlv = "0"
        }
        if (this.form.xiyanyear == null) {
          this.form.xiyanyear = "0"
        }
        if (this.form.yinjiu == null) {
          this.form.yinjiu = "1"
        }
        if (this.form.yinjiupinlv == null) {
          this.form.yinjiupinlv = "0"
        }
        if (this.form.yinjiuyear == null) {
          this.form.yinjiuyear = "0"
        }
        this.form.tjAskHistorysList = response.data.tjAskHistorysList;
        // this.isdisabled= true
      });
    },
    tableRowClassName({ row, rowIndex }) {
      for (let i = 0; i < this.selectList.length; i++) {
        if (row === this.selectList[i]) {
          return "warning-row";
        }
      }
    },
    // 新增行
    addmembers() {
      if (this.form.cusName) {
        if (!this.form.tjAskHistorysList) {
          this.form.tjAskHistorysList = [];
          this.form.tjAskHistorysList.push({
            id: parseInt(length),
            diseaseName: "",
            diseaseData: "",
            diseaseCompany: "",
            isOk: "",
            remark: "",
            Selection,
          });
        } else {
          this.form.tjAskHistorysList.push({
            id: parseInt(length),
            diseaseName: "",
            diseaseData: "",
            diseaseCompany: "",
            isOk: "",
            remark: "",
            Selection,
          });
        }
      } else {
        Message.warning("请先填写客户名");
      }
      this.$forceUpdate();
    },
 
    handlebingChange(selection) {
      this.bingshiall = []
      this.bingshiall = selection
    },
 
    delemembers() {
      let that = this
      if (that.form.tjAskHistorysList.length == that.bingshiall.length) {
        that.form.tjAskHistorysList = []
      } else {
        that.bingshiall.forEach((item1, index1) => {
          that.form.tjAskHistorysList.forEach((item, index) => {
            if (item == item1) {
              that.form.tjAskHistorysList.splice(index, 1)
            }
          })
        })
      }
    },
 
 
    addmemberss() {
      if (this.form.cusName) {
        if (!this.form.workLogs) {
          this.form.workLogs = [];
          this.form.workLogs.push({
            id: parseInt(length),
            beginTime: "",
            endTime: "",
            workCompany: "",
            workDept: "",
            workType: "",
            harmTypeLogs: "",
            fangHu: "",
            Selection,
          });
        } else {
          this.form.workLogs.push({
            id: parseInt(length),
            beginTime: "",
            endTime: "",
            workCompany: "",
            workDept: "",
            workType: "",
            harmTypeLogs: "",
            fangHu: "",
            Selection,
          });
        }
      } else {
        Message.warning("请先填写客户名");
      }
      this.$forceUpdate();
    },
 
    handlezhiyeChange(selection) {
      this.chageall = []
      this.chageall = selection
 
    },
 
    delememberss() {
      let that = this
      if (that.form.workLogs.length == that.chageall.length) {
        that.form.workLogs = []
      } else {
        that.chageall.forEach((item1, index1) => {
          that.form.workLogs.forEach((item, index) => {
            if (item == item1) {
              that.form.workLogs.splice(index, 1)
            }
          })
        })
      }
 
    },
    /** 提交按钮 */
    submitForm() {
      this.form.tjNum = this.dataList[0].tjNumber
      updateHistory(this.form).then((response) => {
        this.$modal.msgSuccess("修改成功");
      });
    },
  },
};
</script>
<style lang="scss" scoped >
.pagi {
  margin-right: -10px;
}
 
/* .pag1 {
  width: 30%;
} */
.hist1 {
  width: 1580px;
  display: flex;
  justify-content: space-evenly;
}
 
.hist2 {
  width: 708px;
}
 
.hist3 {
  margin-top: 60px;
}
 
.coll {
  width: 100%;
}
 
::v-deep .el-collapse-item__header {
  font-weight: 800;
  font-size: 16px;
}
 
.txt {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
 
.el-table .warning-row {
  background: #e5f3ff !important;
}
</style>