WXL
6 天以前 b7092c2bf77696eb13fd680cb006211c17b48f5c
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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!--用户数据-->
      <el-col :span="24" :xs="24">
        <el-form
          :model="queryParams"
          ref="queryForm"
          size="small"
          :inline="true"
          v-show="showSearch"
          label-width="98px"
        >
          <el-form-item label="患者姓名" prop="name">
            <el-input
              v-model="queryParams.patname"
              placeholder="请输入姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="主治医生" prop="name">
            <el-input
              v-model="queryParams.drname"
              placeholder="请输入姓名"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="责任护士" prop="name">
            <el-input
              v-model="queryParams.nurseName"
              placeholder="请输入姓名"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="住院号" prop="inhospno">
            <el-input
              v-model="queryParams.inhospno"
              placeholder="请输入患者编号"
              clearable
              style="width: 250px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
 
          <el-form-item label="患者范围" prop="status">
            <el-cascader
              v-model="queryParams.scopetype"
              placeholder="默认全部科室"
              :options="sourcetype"
              :props="{ expandTrigger: 'hover' }"
              @change="handleChange"
            ></el-cascader>
          </el-form-item>
          <el-form-item label=" 出院日期 " prop="createTime">
            <el-date-picker
              v-model="dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            ></el-date-picker>
          </el-form-item>
 
          <el-row>
            <el-form-item>
              <el-button
                type="primary"
                icon="el-icon-search"
                size="medium"
                @click="handleQuery"
                >搜索</el-button
              >
              <el-button
                icon="el-icon-refresh"
                size="medium"
                @click="resetQuery"
                >重置</el-button
              >
            </el-form-item>
          </el-row>
        </el-form>
 
        <el-row :gutter="10" class="mb8">
          <!-- <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="medium"
              @click="handleAdd"
              v-hasPermi="['system:user:add']"
              >新增</el-button
            >
          </el-col> -->
          <!-- <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="medium"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['system:user:edit']"
              >修改</el-button
            >
          </el-col> -->
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="medium"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['system:user:remove']"
              >删除</el-button
            >
          </el-col>
 
          <!-- <el-col :span="1.5"> </el-col> -->
        </el-row>
        <el-table
          v-loading="loading"
          :data="userList"
          height="808"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="50" align="center" />
          <!-- <el-table-column
            label="序号"
            fixed
            align="center"
            key="id"
            prop="id"
          /> -->
          <el-table-column
            label="出院时间"
            align="center"
            key="endtime"
            prop="endtime"
            width="160"
          >
            <template slot-scope="scope">
              <span>{{ formatTime(scope.row.endtime) }}</span>
            </template>
          </el-table-column>
 
          <el-table-column
            label="住院号"
            align="center"
            key="inhospno"
            prop="inhospno"
            width="120"
          />
          <!-- <el-table-column
            label="姓名"
          width="100"
            align="center"
            key="patname"
            prop="patname"
          /> -->
          <el-table-column
            fixed
            label="姓名"
            width="100"
            align="center"
            key="patname"
            prop="patname"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="
                  gettoken360(
                    scope.row.idcardno,
                    scope.row.drcode,
                    scope.row.drname
                  )
                "
                ><span class="button-textsc">{{
                  scope.row.patname
                }}</span></el-button
              >
            </template>
          </el-table-column>
          <el-table-column
            label="性别"
            width="100"
            align="center"
            key="sex"
            prop="sex"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.sex == 1 ? "男" : "女" }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="年龄"
            align="center"
            key="age"
            prop="age"
            width="80"
          />
          <el-table-column
            label="联系电话"
            align="center"
            key="telcode"
            prop="telcode"
            width="120"
          />
 
          <!-- <el-table-column
            label="入院诊断"
            align="center"
            key="diagname"
            prop="diagname"
            width="190"
          /> -->
          <el-table-column
            label="出院诊断"
            align="center"
            key="leavediagname"
            prop="leavediagname"
            width="190"
          />
          <!-- <el-table-column
            label="主述"
            align="center"
            key="mainsuit"
            prop="mainsuit"
            width="120"
          /> -->
          <el-table-column
            label="科室"
            align="center"
            key="deptname"
            prop="deptname"
            width="120"
          />
          <el-table-column
            label="病区"
            align="center"
            key="leavehospitaldistrictname"
            prop="leavehospitaldistrictname"
            width="120"
          />
          <el-table-column
            label="床位号"
            align="center"
            key="bedNo"
            prop="bedNo"
            width="120"
          />
          <el-table-column
            label="主治医生"
            align="center"
            key="drname"
            prop="drname"
            width="120"
          />
          <el-table-column
            label="责任护士"
            align="center"
            key="nurseName"
            prop="nurseName"
            width="120"
          />
 
          <el-table-column
            label="操作"
            fixed="right"
            align="center"
            width="160"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="
                  $router.push({
                    path: '/patient/patient/profile/',
                    query: { id: scope.row.patid },
                  })
                "
                ><span class="button-textsc"
                  ><i class="el-icon-zoom-in"></i>查看</span
                ></el-button
              >
            </template>
          </el-table-column>
        </el-table>
 
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-col>
    </el-row>
 
    <!-- 用户导入对话框 -->
    <el-dialog
      :title="upload.title"
      :visible.sync="upload.open"
      width="70%"
      append-to-body
    >
      <el-steps :active="dractive" simple>
        <el-step title="上传导入文件" icon="el-icon-upload"></el-step>
        <el-step title="导入检查" icon="el-icon-picture"></el-step>
        <el-step title="导入结果" icon="el-icon-picture"></el-step>
      </el-steps>
      <!-- 上传导入文件 -->
      <div class="download" v-if="dractive == 1">
        <el-upload
          class="upload-demo"
          ref="upload"
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url + '?updateSupport=' + upload.updateSupport"
          :disabled="upload.isUploading"
          :on-progress="handleFileUploadProgress"
          :on-success="handleFileSuccess"
          :auto-upload="false"
          drag
        >
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
          <div class="el-upload__tip text-center" slot="tip">
            <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" />
              是否更新已经存在的用户数据
            </div>
            <span>仅允许导入xls、xlsx格式文件。</span>
            <el-link
              type="primary"
              :underline="false"
              style="font-size: 24px; vertical-align: baseline"
              @click="importTemplate"
              >下载模板</el-link
            >
          </div>
        </el-upload>
      </div>
      <!-- 导入检查 -->
      <div class="uploading" v-else-if="dractive == 2">
        <el-table :data="uploadingData" style="width: 100%">
          <el-table-column prop="serial" label="序号"> </el-table-column>
          <el-table-column prop="name" label="姓名" width="100">
          </el-table-column>
          <el-table-column prop="sex" label="性别" width="100">
          </el-table-column>
          <el-table-column prop="certificate" label="证件类型">
          </el-table-column>
          <el-table-column prop="certificatenum" label="证件号码">
          </el-table-column>
          <el-table-column prop="goday" label="出生日期"> </el-table-column>
          <el-table-column prop="menum" label="本人联系方式"> </el-table-column>
          <el-table-column prop="younum" label="亲属联系方式">
          </el-table-column>
          <el-table-column prop="tag" label="患者标签"> </el-table-column>
          <el-table-column prop="erry" label="错误原因"> </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="geterryList"
        />
      </div>
      <!-- 完成 -->
      <div class="drexamine" v-else-if="dractive == 3">
        <img
          src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
        />
        <p>导入患者成功!</p>
        <p>本次共计导入{{ ImportQuantity }}位患者</p>
      </div>
 
      <div slot="footer" class="dialog-footer" v-if="dractive == 3">
        <!-- <el-button type="primary" @click="submitFileForm">下一步</el-button> -->
        <el-button @click="submitclose">完成</el-button>
      </div>
      <div slot="footer" v-else>
        <el-button type="primary" @click="submitFileForm">下一步</el-button>
        <el-button @click="submitclose">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import { delUser } from "@/api/system/user";
 
import { listpatient } from "@/api/patient/record";
import {
  messagelistpatient,
  alterpatient,
  addpatient,
  particularpatient,
  deletepatient,
  Exporterrorpatient,
  toleadpatient,
} from "@/api/patient/homepage";
import { listtag } from "@/api/system/label";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import { listDept } from "@/api/system/dept";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { query360PatInfo } from "@/api/AiCentre/index";
 
import store from "@/store";
 
export default {
  name: "behospitalized",
  dicts: ["sys_normal_disable", "sys_user_sex", "nursinggrade"],
  components: { Treeselect },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 用户表格数据
      userList: null,
      // 弹出层标题
      title: "",
      // 部门树选项
      deptOptions: undefined,
      // 是否显示弹出层
      open: false,
      // 部门名称
      deptName: undefined,
      // 默认密码
      initPassword: undefined,
      amendtag: false, //是否修改
      // 日期范围
      dateRange: [],
      source: [
        {
          value: 0,
          label: "所属患者",
        },
        {
          value: 1,
          label: "科室患者",
        },
        {
          value: 2,
          label: "病区患者",
        },
      ],
      postData: {
        XiaoXiTou: {
          FaSongFCSJC: "ZJHES",
          FaSongJGID: localStorage.getItem("orgid"),
          FaSongJGMC: localStorage.getItem("orgname"),
          FaSongSJ: "2025-01-09 17:29:36",
          FaSongXTJC: "SUIFANGXT",
          FaSongXTMC: "随访系统",
          XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
          XiaoXiLX: "SC_LC_360STCX",
          XiaoXiMC: "360 视图查询",
          ZuHuID: localStorage.getItem("ZuHuID"),
          ZuHuMC: localStorage.getItem("orgname"),
        },
        YeWuXX: {
          BingRenXX: {
            ZhengJianHM: "",
            ZhengJianLXDM: "01",
            ZhengJianLXMC: "居民身份证",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
          },
          YongHuXX: {
            XiTongID: "SUIFANGXT",
            XiTongMC: "随访系统",
            YongHuID: "1400466972205912064",
            YongHuXM: "JNRMYY",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
          },
        },
      },
      paperstypes: [
        { papersname: "身份证" },
        { papersname: "护照" },
        { papersname: "中国港澳居民身份证" },
        { papersname: "中国台湾居民身份证" },
      ],
      // 表单参数
      form: {
        name: "",
        age: "",
        sex: "",
        tagList: [],
        idcardno: "",
        telcode: "",
        idcardtype: "",
        relativetelcode: "",
      },
      sourcetype: [
        {
          value: 1,
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部科室",
        },
        {
          value: 4,
          label: "全部病区",
        },
      ],
      //导入进度
      dractive: 1,
      // 导入展示表单
      uploadingData: {},
      total: 0, // 总条数
      ImportQuantity: 999, //导入患者数量
      Labelchange: false, //修改新增弹窗
      propss: { multiple: true },
      optionstag: [], //标签列表
      Patientrange: [
        {
          name: "全部科室",
          id: 999,
        },
        {
          name: "当前科室",
          id: 1,
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
      // 用户导入参数
      upload: {
        // 是否显示弹出层(用户导入)
        open: false,
        // 弹出层标题(用户导入)
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/system/user/importData",
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        cry: 1,
        searchscope: 3,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      },
      // 表单校验
      rules: {},
    };
  },
  watch: {
    // 根据名称筛选部门树
    deptName(val) {
      this.$refs.tree.filter(val);
    },
  },
  created() {
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
      return {
        label: dept.districtName,
        value: dept.districtCode,
      };
    });
    this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
      (obj) => obj.deptCode
    );
    this.getList();
    this.listDept();
    this.gettabList();
  },
  methods: {
    /** 查询患者列表 */
    getList() {
      this.loading = true;
      listpatient(this.queryParams).then((response) => {
        console.log(response);
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    listDept() {
      listDept(this.queryParams).then((res) => {
        this.deptList = res.data;
        console.log(this.deptList, "this.deptList");
      });
    },
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") {
        this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
        this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
      }
      query360PatInfo(this.postData).then((res) => {
        if (res.data.url) {
          window.open(res.data.url, "_blank");
          // this.linkUrl = res.data.url;
        } else {
          this.$modal.msgWarning("360查询无结果");
        }
      });
    },
    /** 查询标签列表 */
    gettabList() {
      const tagqueryParams = {
        pageNum: 1,
        pageSize: 1000,
        tagname: undefined,
        tagdescription: undefined,
        tagcategoryid: "0",
      };
      listtag(tagqueryParams).then((response) => {
        console.log(response);
        this.optionstag = response.rows;
      });
    },
    // 患者范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      this.queryParams.leavehospitaldistrictcodes = [];
      this.queryParams.leaveldeptcodes = [];
 
      if (type == 1) {
        this.queryParams.leaveldeptcodes.push(code);
        this.queryParams.leavehospitaldistrictcodes = [];
        this.queryParams.searchscope = 1;
      } else if (type == 2) {
        this.queryParams.leavehospitaldistrictcodes.push(code);
        this.queryParams.leaveldeptcodes = [];
        this.queryParams.searchscope = 2;
      } else if (type == 3) {
        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.queryParams.searchscope = 3;
        this.queryParams.leavehospitaldistrictcodes = [];
      } else if (type == 4) {
        this.queryParams.leaveldeptcodes = [];
        this.queryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.queryParams.searchscope = 4;
      }
    },
    // 查询导入展示列表
    geterryList() {
      this.loading = true;
      listJob(this.queryParams).then((response) => {
        this.jobList = 1;
        this.total = 1;
        this.loading = false;
      });
    },
 
    // 筛选节点
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // 节点单击事件
    handleNodeClick(data) {
      this.queryParams.deptId = data.id;
      this.handleQuery();
    },
 
    // 取消按钮
    cancel() {
      this.Labelchange = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        name: "",
        age: "",
        sex: "",
        tagList: [],
        idcardno: "",
        telcode: "",
        idcardtype: "",
        relativetelcode: "",
      };
      // this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      if (this.dateRange) {
        this.queryParams.startOutHospTime = this.dateRange[0];
        this.queryParams.endOutHospTime = this.dateRange[1];
      } else {
        this.queryParams.startOutHospTime = "";
        this.queryParams.endOutHospTime = "";
      }
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        cry: 1,
        searchscope: 3,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.patid);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
 
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.Labelchange = true;
      this.amendtag = false;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      console.log(row);
      const userIds = row.patid || this.ids;
      particularpatient(userIds).then((response) => {
        console.log(response);
        this.form = response.data;
      });
      this.amendtag = true;
      this.Labelchange = true;
    },
 
    //修改/新增患者
    submitForm() {
      if (this.amendtag) {
        alterpatient(this.form)
          .then((response) => {
            console.log(response);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess("修改成功");
          });
      } else {
        addpatient(this.form)
          .then((response) => {
            console.log(response);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess("添加成功");
          });
      }
      this.reset();
      // this.idds = "";
      this.Labelchange = false;
    },
 
    /** 删除按钮操作 */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return deletepatient(userIds);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "smartor/patarchive/export",
        {
          ...this.queryParams,
        },
        `user_${new Date().getTime()}.xlsx`
      );
    },
    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "用户导入";
      this.upload.open = true;
    },
    /** 下载模板操作 */
    importTemplate() {
      this.download(
        "smartor/import/getImportPatTemplate",
        {},
        `user_template_${new Date().getTime()}.xlsx`
      );
    },
    // 文件上传中处理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert(
        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
          response.msg +
          "</div>",
        "导入结果",
        { dangerouslyUseHTMLString: true }
      );
      this.getList();
    },
    // 提交上传文件
    submitFileForm() {
      // 上传
      if (this.dractive == 1) {
        this.$refs.upload.submit();
        this.dractive++;
      } else {
        this.dractive++;
      }
    },
    submitclose() {
      this.upload.open = false;
      this.dractive = 1;
    },
  },
};
</script>
 
<style lang="scss" scoped>
.el-button--primary.is-plain {
  color: #ffffff;
  background: #409eff;
  border-color: #4fabe9;
}
.document {
  width: 100px;
  height: 50px;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.download {
  text-align: center;
  .el-upload__tip {
    font-size: 23px;
  }
  .el-upload__text {
    font-size: 23px;
  }
}
.uploading {
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.drexamine {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #daeaf5;
  img {
    width: 100px;
    height: 100px;
  }
}
.button-textsc {
  color: #28cfe6;
}
</style>