heimawl
2023-06-27 eb29d7570a43ca078aa9568446ec5d0b3e02526a
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
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
<template>
  <div class="Questionnairemanagement">
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">话术类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
      </div>
      <div class="center-ss">
        <el-input
          placeholder="请输入内容"
          v-model="sidecolumnval"
          class="input-with-select"
          size="medium "
        >
          <el-button
            @click="sidecolumnss"
            slot="append"
            icon="el-icon-search"
          ></el-button>
        </el-input>
      </div>
      <div class="bottom-fl">
        <el-tabs tab-position="right">
          <el-tab-pane :label="`全部 (${numberlb})`"></el-tab-pane>
          <el-tab-pane
            class="tab-paness"
            :key="item.title"
            v-for="(item, index) in editableTabs"
          >
            <span slot="label">
              {{
                item.title + " (" + item.number + ")"
              }}&nbsp&nbsp&nbsp<el-popover
                placement="top-start"
                width="100"
                trigger="hover"
              >
                <div style="text-align: center">
                  <el-button type="text" @click="popoveramend(item)"
                    >修改</el-button
                  ><el-button type="text" @click="deletefenlei(item)"
                    ><span style="color: rgb(173, 55, 55)"
                      >删除</span
                    ></el-button
                  >
                </div>
                <i slot="reference" class="el-icon-share"></i> </el-popover
            ></span>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
    <!-- 右侧数据 -->
    <div class="leftvlue">
      <div class="leftvlue-top">
        <el-tabs v-model="topactiveName" @tab-click="tophandleClick">
          <el-tab-pane name="Local">
            <span class="mulsz" slot="label">普通话术库 </span>
          </el-tab-pane>
          <el-tab-pane name="sharing">
            <span class="mulsz" slot="label">特定话术库 </span>
          </el-tab-pane>
        </el-tabs>
      </div>
      <div class="leftvlue-bg">
        <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="userName">
                <el-input
                  v-model="queryParams.userName"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="关联指标" prop="userName">
                <el-input
                  v-model="queryParams.userName"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="语言" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="是否启用" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
                  <el-option
                    v-for="item in qyoptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
 
              <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-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="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"
              :border="true"
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column
                label="序号"
                align="center"
                key="userId"
                prop="userId"
              />
              <el-table-column
                label="主旨"
                align="center"
                key="userName"
                prop="userName"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="问题文本"
                align="center"
                key="nickName"
                prop="nickName"
                width="400"
                :show-overflow-tooltip="true"
              />
 
              <el-table-column
                label="问题语音"
                align="center"
                key="aphonenumber"
                prop="aphonenumber"
                width="400"
              /><el-table-column
                label="关联指标"
                align="center"
                key="bphonenumber"
                prop="bphonenumber"
                width="120"
              />
              <el-table-column
                label="指标选项"
                align="center"
                key="bphonenumber"
                prop="bphonenumber"
                width="120"
              />
              <el-table-column
                label="语言"
                align="center"
                key="indicator"
                prop="indicator"
                width="120"
              />
              <el-table-column label="是否启用" align="center" key="status">
                <template slot-scope="scope">
                  <el-switch
                    v-model="scope.row.status"
                    active-value="0"
                    inactive-value="1"
                    @change="handleStatusChange(scope.row)"
                  ></el-switch>
                </template>
              </el-table-column>
 
              <el-table-column
                label="操作"
                align="center"
                width="200"
                class-name="small-padding fixed-width"
              >
                <template slot-scope="scope">
                  <el-button
                    size="medium"
                    type="text"
                    @click="handleUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textxg"
                      ><i class="el-icon-edit-outline"></i>修改</span
                    ></el-button
                  >
                  <el-button
                    size="medium"
                    type="text"
                    @click="compileUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-bji"
                      ><i class="el-icon-edit"></i>编辑话术</span
                    ></el-button
                  >
                  <el-button
                    size="medium"
                    type="text"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-textsc"
                      ><i class="el-icon-delete-solid"></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="title"
          :visible.sync="indexopen"
          width="900px"
          append-to-body
        >
          <el-form
            ref="form"
            :model="indexform"
            :rules="rules"
            label-width="100px"
          >
            <el-row>
              <el-col :span="24">
                <el-form-item label="语言" prop="deptId">
                  <el-select
                    v-model="indexform.language"
                    placeholder="请选择语言"
                  >
                    <el-option
                      v-for="index in languagelist"
                      :key="index.value"
                      :label="index.label"
                      :value="index.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="话术主旨" prop="nickName">
                  <el-input
                    v-model="indexform.nickName"
                    placeholder="请输入话术主旨"
                    maxlength="80"
                  />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <div
                  style="display: flex; margin-left: 100px; margin-bottom: 10px"
                >
                  <div class="tsgname" @click="tsgnameto()">医院名称</div>
                  <div class="tsgname" @click="tsgnameto()">医院电话</div>
                  <div class="tsgname" @click="tsgnameto()">医院姓名</div>
                  <div class="tsgname" @click="tsgnameto()">随访姓名</div>
                  <div class="tsgname" @click="tsgnameto()">随访电话</div>
                  <div class="tsgname" @click="tsgnameto()">性别</div>
                  <div class="tsgname" @click="tsgnameto()">年龄</div>
                  <div class="tsgname" @click="tsgnameto()">地址</div>
                </div>
              </el-col></el-row
            >
            <el-row>
              <el-col :span="24">
                <el-form-item label="话术文本" prop="verbaltricktext">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="话术语音" prop="verbaltrickyy">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="无匹配文本" prop="matchtext">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="无匹配语音" prop="matchyy">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="无声文本" prop="silenttext">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="无声语音" prop="silentyy">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="通用库文本" prop="librarytext">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="通用库语音" prop="libraryy">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="听不清文本" prop="vaguetext">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="听不清语音" prop="vagueyy">
                  <el-input v-model="indexform.userName" maxlength="30" />
                </el-form-item> </el-col
            ></el-row>
 
            <el-row>
              <el-col :span="24">
                <el-form-item label="话术规则" prop="email">
                  <el-input
                    v-model="indexform.remark"
                    type="textarea"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="是否启用">
                  <el-radio-group v-model="indexform.qystatus">
                    <el-radio
                      v-for="item in qyoptions"
                      :key="item.value"
                      :label="item.value"
                      >{{ item.label }}</el-radio
                    >
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>
 
            <el-row>
              <el-col :span="24">
                <el-form-item label="备注">
                  <el-input
                    v-model="indexform.remark"
                    type="textarea"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="submitForm">确 定</el-button>
            <el-button @click="cancel">取 消</el-button>
          </div>
        </el-dialog>
      </div>
    </div>
    <!-- 添加类别弹框 -->
    <el-dialog
      :title="amendtag ? '修改类别' : '新增类别'"
      width="30%"
      :visible.sync="dialogFormVisible"
    >
      <el-form :model="classifyform">
        <el-form-item
          :label="amendtag ? '请输入新的类别名称' : '请输入类别名称'"
        >
          <el-input
            v-model="classifyform.categoryname"
            autocomplete="off"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="submitsidecolumn">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 删除类别确认框 -->
    <el-dialog title="警告" :visible.sync="deleteVisible" width="40%">
      <div style="font-size: 20px; color: rgb(247, 76, 76)">
        是否确认删除分类:[<span>{{ deletefenl }}</span
        >]?
      </div>
      <div style="font-size: 20px">
        此操作会将该类别下所有模块转移至[未分类],是否继续删除此分类?
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteVisible = false">取 消</el-button>
        <el-button type="primary" @click="deletefenlei">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
 
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
} from "@/api/system/user";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
  name: "questionnaire",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  data() {
    return {
      topactiveName: "Local", //顶部选择
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      namequestionnaire: "",
      haoquestionnaire: "",
      idds: "",
      amendtag: false, //是否修改类别
      dialogFormVisible: false, //修改添加类别弹框
      deleteVisible: false, //分类删除弹框
      deletefenl: "高血压", //删除项
      classifyform: {
        categoryname: "",
      }, //类别表单
      // 表格数据
      userList: [
        {
          userid: 1,
          userName: "血常规、尿常规",
          nickName: "贫血",
          aphonenumber: "(?!不.*|没.*|未.*)^.*([贫平凭血]|贫血|评学|评学),10",
          bphonenumber: "选择",
          cphonenumber: "普通话",
          status: "0",
        },
      ],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 日期范围
      dateRange: [],
      // 岗位选项
      postOptions: [],
      // 角色选项
      roleOptions: [],
      // 添加、修改参数
      indexform: {},
      numberlb: 22,
      numberlbs: 2,
      sidecolumnform: {}, //添加类别表单
      dialogFormVisible: false, //添加类别弹框
      sidecolumnval: "", //类别搜索
      indexopen: false, //弹框展示否
      propss: { multiple: true },
      languagelist: [
        {
          value: 1,
          label: "普通话",
        },
        {
          value: 2,
          label: "粤语",
        },
        {
          value: 3,
          label: "英语",
        },
      ], //语言列表
      qyoptions: [
        {
          value: 1,
          label: "启用",
        },
        {
          value: 2,
          label: "关闭",
        },
      ],
      //类别列表
      editableTabs: [
        {
          title: "话术分类一",
          number: "1",
        },
        {
          title: "话术分类二",
          number: "2",
        },
        {
          title: "话术分类三",
          number: "2",
        },
        {
          title: "话术分类四",
          number: "2",
        },
        {
          title: "话术分类五",
          number: "2",
        },
      ],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userName: undefined,
        phonenumber: undefined,
        status: undefined,
        deptId: undefined,
        IDnumber: undefined,
      },
      // 表单校验
      rules: {
        userName: [
          { required: true, message: "主旨不能为空", trigger: "blur" },
          {
            min: 2,
            max: 20,
            message: "用户名称长度必须介于 2 和 20 之间",
            trigger: "blur",
          },
        ],
        nickName: [
          { required: true, message: "用户昵称不能为空", trigger: "blur" },
        ],
        password: [
          { required: true, message: "用户密码不能为空", trigger: "blur" },
          {
            min: 5,
            max: 20,
            message: "用户密码长度必须介于 5 和 20 之间",
            trigger: "blur",
          },
        ],
        email: [
          {
            type: "email",
            message: "请输入正确的邮箱地址",
            trigger: ["blur", "change"],
          },
        ],
        phonenumber: [
          {
            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
            message: "请输入正确的手机号码",
            trigger: "blur",
          },
        ],
        IDnumber: [
          {
            pattern:
              /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
            message: "请输入正确的身份证号码",
            trigger: "blur",
          },
        ],
      },
    };
  },
  watch: {},
  created() {
    this.getList();
  },
 
  methods: {
    /** 查询用户列表 */
    getList() {
      //   this.loading = true;
      listUser().then((response) => {
        console.log(response);
        console.log(this.userList);
      });
    },
    // 添加、修改类别
    submitsidecolumn() {
      if (this.amendtag) {
        this.classifyform.tagcategoryid = this.idds;
        // toamendtagcategory(this.addDateRange(this.classifyform)).then(
        //   (response) => {
        //     console.log(response);
        //     this.gitclasify();
        //   }
        // );
      } else {
        // addtagcategory(this.addDateRange(this.classifyform)).then(
        //   (response) => {
        //     console.log(response);
        //     this.gitclasify();
        //   }
        // );
      }
      this.classifyform = {
        categoryname: "",
      };
      this.idds = "";
      this.dialogFormVisible = false;
    },
    //删除分类
    deletefenlei(row) {
      if (this.deleteVisible) {
        // deletetagcategory(this.idds).then((response) => {
        //   console.log(response);
        //   this.gitclasify();
        // });
        this.deleteVisible = false;
        this.idds = "";
      } else {
        this.deleteVisible = true;
        this.idds = row.tagcategoryid;
        this.deletefenl = row.title;
      }
    },
    compileUpdate(row) {
      this.$router.push({
        path: "/repositoryai/verbaltrick/particulars/",
        query: { id: "1" },
      });
    },
    // 题目状态修改
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
        .confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
        .then(function () {
          return changeUserStatus(row.userId, row.status);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.status = row.status === "0" ? "1" : "0";
        });
    },
    //搜索类别
    sidecolumnss() {},
    // 便捷标签
    tsgnameto() {},
    // 切换共享/本地
    tophandleClick() {},
    // 取消按钮
    cancel() {
      this.indexopen = false;
      this.reset();
    },
 
    // 表单重置
    reset() {
      this.form = {
        userId: undefined,
        deptId: undefined,
        userName: undefined,
        nickName: undefined,
        password: undefined,
        phonenumber: undefined,
        email: undefined,
        sex: undefined,
        status: "0",
        remark: undefined,
        postIds: [],
        roleIds: [],
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams.deptId = undefined;
      this.$refs.tree.setCurrentKey(null);
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.userId);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.title = "新增话术";
      this.indexopen = true;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.title = "修改话术";
      this.indexopen = true;
    },
    // 修改分类弹框
    popoveramend(tagcategoryid) {
      this.idds = tagcategoryid;
      this.amendtag = true;
      this.dialogFormVisible = true;
    },
 
    /** 更新/修改提交按钮 */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.indexopen = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.indexopen = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return delUser(userIds);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
  },
};
</script>
 
<style lang="scss" scoped>
.Questionnairemanagement {
  display: flex;
}
.sidecolumn {
  width: 300px;
  min-height: 100vh;
  text-align: center;
  //   display: flex;
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  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);
  .sidecolumn-top {
    display: flex;
    justify-content: space-between;
    .top-wj {
      font-size: 20px;
    }
    .top-tj {
      font-size: 18px;
 
      color: rgb(0, 89, 255);
      cursor: pointer;
    }
  }
  .center-ss {
    margin-top: 30px;
    .input-with-select {
      height: 40px !important;
    }
  }
  .bottom-fl {
    margin-top: 30px;
    display: center !important;
  }
}
.qrcode-dialo {
  text-align: center;
  //   display: flex;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  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);
  .qrcode-text {
    font-size: 20px;
    span {
      margin-left: 20px;
    }
  }
  .qrcode-img {
    width: 300px;
    height: 400px;
  }
}
.tsgname {
  width: 90px;
  margin-right: 10px;
  text-align: center;
  cursor: pointer;
  height: 40px;
  line-height: 40px;
  background: #7799fa;
  color: #ffff;
  font-size: 18px;
  border-radius: 5px;
}
.tsgname:hover {
  background: #3366f5;
}
::v-deep.el-tabs--left,
.el-tabs--right {
  overflow: hidden;
  align-items: center;
  display: flex;
}
::v-deep.el-input--medium .el-input__inner {
  height: 40px !important;
}
::v-deep.el-tabs--right .el-tabs__active-bar.is-right {
  height: 40px;
  width: 5px;
  left: 0;
}
::v-deep.el-tabs--right .el-tabs__item.is-right {
  display: block;
  font-size: 20px;
}
.leftvlue {
  //   display: flex;
  //   flex: 1;
  width: 80%;
  margin-top: 20px;
  //   margin: 20px;
  padding: 30px;
  background: #ffff;
  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);
  .mulsz {
    font-size: 20px;
  }
}
.button-text {
  color: rgb(70, 204, 238);
}
.button-bji {
  color: rgb(39, 167, 67);
}
.button-textxg {
  color: rgb(35, 81, 233);
}
.button-textsc {
  color: rgb(235, 23, 23);
}
</style>