XMLWAN пре 4 година
родитељ
комит
aa437a3055
1 измењених фајлова са 720 додато и 66 уклоњено
  1. 720 66
      src/xt_pages/role/components/AdminInfoForm.vue

+ 720 - 66
src/xt_pages/role/components/AdminInfoForm.vue Прегледај датотеку

@@ -1,64 +1,403 @@
1 1
 <template>
2
-  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible">
2
+  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible"  width="60%">
3 3
     <el-form :model="form" ref="form" :rules="rules" label-width="60px">
4
-      <el-form-item label="账号 : " prop="mobile">
5
-        <el-input v-model="form.mobile" placeholder="用户手机号"         maxlength="11"
6
-                  :disabled="form.id !==  0"></el-input>
7
-      </el-form-item>
8
-
9
-      <el-form-item label="姓名 : " prop="name">
10
-        <el-input v-model="form.name" placeholder="用户姓名"></el-input>
11
-      </el-form-item>
12
-
4
+     <el-row :gutter="24">
5
+        <el-col :span="24">
6
+        <el-form-item label="账号 : " prop="mobile">
7
+          <el-input v-model="form.mobile" placeholder="用户手机号"         maxlength="11"
8
+                    :disabled="form.id !==  0"></el-input>
9
+        </el-form-item>
10
+      </el-col>
11
+    </el-row>
12
+    <el-row :gutter="24">
13
+      <el-col :span="24">
14
+        <el-form-item label="姓名 : " prop="name">
15
+          <el-input v-model="form.name" placeholder="用户姓名"></el-input>
16
+        </el-form-item>
17
+      </el-col>
18
+    </el-row> 
19
+    <el-row :gutter="24">
20
+      <el-col :span="24">
13 21
       <el-form-item label="角色 : " prop="role_ids">
14
-        <el-checkbox-group v-model="form.role_ids">
22
+        <el-checkbox-group v-model="form.role_ids" @change="changeRole">
15 23
           <el-checkbox v-for="( item,index) in roles" :key="index" :label="item.id" :value="item.id">{{item.name}}
16 24
           </el-checkbox>
17 25
         </el-checkbox-group>
18 26
       </el-form-item>
27
+      </el-col>
28
+    </el-row>
29
+    <el-row :gutter="24">
30
+      <el-col :span="16">
31
+        <el-form-item label="职称 : ">
32
+          <el-select v-model="form.user_type" placeholder="用户类型">
33
+            <el-option
34
+              v-for="item in user_types"
35
+              :label="item.name"
36
+              :value="item.index"
37
+              :key="item.index"
38
+            ></el-option>
39
+          </el-select>
19 40
 
20
-      <el-form-item label="职称 : ">
21
-        <el-select v-model="form.user_type" placeholder="用户类型">
22
-          <el-option
23
-            v-for="item in user_types"
24
-            :label="item.name"
25
-            :value="item.index"
26
-            :key="item.index"
27
-          ></el-option>
28
-        </el-select>
29
-
30
-        <el-select v-model="form.user_title" placeholder="用户职称">
31
-          <el-option
32
-            v-for="item in user_titles"
33
-            :label="item.name"
34
-            :value="item.index"
35
-            :key="item.index"
36
-          ></el-option>
37
-        </el-select>
41
+          <el-select v-model="form.user_title" placeholder="用户职称">
42
+            <el-option
43
+              v-for="item in user_titles"
44
+              :label="item.name"
45
+              :value="item.index"
46
+              :key="item.index"
47
+            ></el-option>
48
+          </el-select>
49
+        </el-form-item>
50
+      </el-col>
51
+       <el-col :span="8">
52
+        <el-form-item label="科室:">
53
+          <el-select v-model="form.department_id" placeholder="科室">
54
+            <el-option
55
+              v-for="item in departMent"
56
+              :label="item.name"
57
+              :value="item.id"
58
+              :key="item.id"
59
+            ></el-option>
60
+          </el-select>
61
+        </el-form-item>
62
+    </el-col>
63
+   </el-row>
64
+   <el-row :span="24">
65
+      <el-col :span="24">
66
+      <el-form-item label="职位: ">
67
+        <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
38 68
       </el-form-item>
69
+    </el-col>
70
+   </el-row>
71
+  
72
+  <div v-show="show">
73
+   <el-row :span="24">
74
+    <el-col :span="8">
75
+      <el-form-item label="性别:">
76
+        <el-select v-model="form.sex" placeholder="性别">
77
+              <el-option
78
+                v-for="item in sexList"
79
+                :label="item.name"
80
+                :value="item.id"
81
+                :key="item.id"
82
+              ></el-option>
83
+      </el-select>
84
+     </el-form-item>
85
+    </el-col>
86
+    <el-col :span="8">
87
+      <el-form-item label="年龄:">
88
+         <el-input v-model="form.age" style="width:200"></el-input>
89
+      </el-form-item>
90
+    </el-col>
91
+    <el-col :span="8">
92
+      <el-form-item label="执业状态">
93
+           <el-select v-model="form.active_status" placeholder="执业状态">
94
+              <el-option
95
+                v-for="item in activeStausList"
96
+                :label="item.name"
97
+                :value="item.id"
98
+                :key="item.id"
99
+              ></el-option>
100
+          </el-select>
101
+      </el-form-item>
102
+      </el-col>
103
+  </el-row>
39 104
 
40 105
 
41
-      <el-form-item label="科室:">
42
-         <el-select v-model="form.department_id" placeholder="科室">
43
-          <el-option
44
-            v-for="item in departMent"
45
-            :label="item.name"
46
-            :value="item.id"
47
-            :key="item.id"
48
-          ></el-option>
49
-        </el-select>
50
-      </el-form-item>
106
+  <el-row :gutter="24">
107
+    <el-col :span="8">
108
+       <el-form-item label="民族:">
109
+          <el-input v-model="form.nation" style="width:180"></el-input>
110
+       </el-form-item>
111
+    </el-col>
112
+     <el-col :span="8">
113
+       <el-form-item label="身份类型:" >
114
+           <el-select v-model="form.card_type" placeholder="性别">
115
+              <el-option
116
+                v-for="item in cardList"
117
+                :label="item.name"
118
+                :value="item.id"
119
+                :key="item.id"
120
+              ></el-option>
121
+          </el-select>
122
+       </el-form-item>
123
+    </el-col>
124
+    <el-col :span="8">
125
+       <el-form-item label="身份证号:">
126
+          <el-input v-model="form.id_card" style="width:200"></el-input>
127
+       </el-form-item>
128
+    </el-col>
129
+  </el-row>
51 130
 
52
-      <el-form-item label="职位 : ">
53
-        <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
54
-      </el-form-item>
131
+   <el-row :gutter="24">
132
+    <el-col :span="8">
133
+       <el-form-item label="学历:">
134
+           <el-select v-model="form.education" placeholder="性别">
135
+              <el-option
136
+                v-for="item in educationList"
137
+                :label="item.name"
138
+                :value="item.id"
139
+                :key="item.id"
140
+              ></el-option>
141
+          </el-select>
142
+        
143
+       </el-form-item>
144
+    </el-col>
145
+     <el-col :span="8">
146
+       <el-form-item label="所学专业:">
147
+           <el-input v-model="form.study_major_name" style="width:200"></el-input>
148
+       </el-form-item>
149
+    </el-col>
150
+    <el-col :span="8">
151
+       <el-form-item label="从事专业:">
152
+          <el-input v-model="form.work_major_name" style="width:200"></el-input>
153
+       </el-form-item>
154
+    </el-col>
155
+  </el-row>
156
+
157
+
158
+  <el-row :gutter="24">
159
+    <el-col :span="8">
160
+       <el-form-item label="人员类别:">
161
+           <el-select v-model="form.role_type" placeholder="人员类别" @change="changeRoleType">
162
+              <el-option
163
+                v-for="item in roleList"
164
+                :label="item.name"
165
+                :value="item.id"
166
+                :key="item.id"
167
+              ></el-option>
168
+          </el-select>
169
+        
170
+       </el-form-item>
171
+    </el-col>
172
+     <el-col :span="8">
173
+       <el-form-item label="医药师资格证编码:">
174
+           <el-input v-model="form.medical_code" style="width:200"></el-input>
175
+       </el-form-item>
176
+    </el-col>
177
+    <el-col :span="8">
178
+       <el-form-item label="医药师职业证编码:">
179
+          <el-input v-model="form.doctor_code" style="width:200"></el-input>
180
+       </el-form-item>
181
+    </el-col>
182
+  </el-row>
183
+
184
+
185
+  <el-row :gutter="24">
186
+    <el-col :span="8">
187
+       <el-form-item label="多点执业标志:">
188
+           <el-select v-model="form.licensing" placeholder="多点执业标志">
189
+              <el-option
190
+                v-for="item in List"
191
+                :label="item.name"
192
+                :value="item.id"
193
+                :key="item.id"
194
+              ></el-option>
195
+          </el-select>
196
+        
197
+       </el-form-item>
198
+    </el-col>
199
+     <el-col :span="8">
200
+       <el-form-item label="工号:">
201
+           <el-input v-model="form.job_number" style="width:200"></el-input>
202
+       </el-form-item>
203
+    </el-col>
204
+    <el-col :span="8">
205
+       <el-form-item label="处方资格标志:">
206
+           <el-select v-model="form.prescription_qualification_identification" placeholder="处方资格标志">
207
+              <el-option
208
+                v-for="item in List"
209
+                :label="item.name"
210
+                :value="item.id"
211
+                :key="item.id"
212
+              ></el-option>
213
+          </el-select>
214
+       </el-form-item>
215
+    </el-col>
216
+  </el-row>
217
+
218
+
219
+  <el-row :gutter="24">
220
+    <el-col :span="8">
221
+       <el-form-item label="门诊医生大病标志:">
222
+           <el-select v-model="form.identification_outpatients" placeholder="门诊医生大病标志">
223
+              <el-option
224
+                v-for="item in List"
225
+                :label="item.name"
226
+                :value="item.id"
227
+                :key="item.id"
228
+              ></el-option>
229
+          </el-select>
230
+        
231
+       </el-form-item>
232
+    </el-col>
233
+     <el-col :span="8">
234
+       <el-form-item label="开始时间:">
235
+            <el-date-picker
236
+              v-model="form.start_time"
237
+              prefix-icon="el-icon-date"
238
+              :editable="false"
239
+              style="width: 150px;"
240
+
241
+              type="date"
242
+              placeholder="选择开始时间"
243
+              align="right"
244
+              format="yyyy-MM-dd"
245
+              value-format="yyyy-MM-dd">
246
+            </el-date-picker>
247
+       </el-form-item>
248
+    </el-col>
249
+    <el-col :span="8">
250
+       <el-form-item label="药师执业范围代码:">
251
+          <el-select v-model="form.medical_range_code" placeholder="药师执业范围代码">
252
+              <el-option
253
+                v-for="item in medicalRangeList"
254
+                :label="item.name"
255
+                :value="item.id"
256
+                :key="item.id"
257
+              ></el-option>
258
+          </el-select>
259
+       </el-form-item>
260
+    </el-col>
261
+  </el-row>
262
+
263
+
264
+<el-row :gutter="24">
265
+    <el-col :span="8">
266
+       <el-form-item label="药师级别:" v-show="showOne">
267
+           <el-select v-model="form.medical_level" placeholder="药师级别">
268
+              <el-option
269
+                v-for="item in doctorRangeList"
270
+                :label="item.name"
271
+                :value="item.id"
272
+                :key="item.id"
273
+              ></el-option>
274
+          </el-select>
275
+        
276
+       </el-form-item>
277
+    </el-col>
278
+     <el-col :span="8">
279
+       <el-form-item label="药师执业类别:" label-width="100" v-show="showOne">
280
+          
281
+             <el-select v-model="form.medical_type_job" placeholder="药师执业类别">
282
+              <el-option
283
+                v-for="item in doctorLevelList"
284
+                :label="item.name"
285
+                :value="item.id"
286
+                :key="item.id"
287
+              ></el-option>
288
+          </el-select>
289
+       </el-form-item>
290
+    </el-col>
291
+    <el-col :span="8" >
292
+       <el-form-item label="执业药师注册证编号:" v-show="showOne">
293
+           <el-input v-model="form.pharmacist_registration_number"></el-input>
294
+       </el-form-item>
295
+    </el-col>
296
+  </el-row>
55 297
 
56
-       
57 298
 
299
+
300
+
301
+
302
+
303
+   <el-row :gutter="24">
304
+    <el-col :span="8">
305
+       <el-form-item label="医师执业范围代码:" v-show="showTwo">
306
+           <el-select v-model="form.doctor_range_code" placeholder="医生执业范围代码">
307
+              <el-option
308
+                v-for="item in doctorRangeList"
309
+                :label="item.name"
310
+                :value="item.id"
311
+                :key="item.id"
312
+              ></el-option>
313
+          </el-select>
314
+        
315
+       </el-form-item>
316
+    </el-col>
317
+     <el-col :span="8">
318
+       <el-form-item label="医生级别:" label-width="100" v-show="showTwo">
319
+          
320
+             <el-select v-model="form.doctor_level" placeholder="医生级别">
321
+              <el-option
322
+                v-for="item in doctorLevelList"
323
+                :label="item.name"
324
+                :value="item.id"
325
+                :key="item.id"
326
+              ></el-option>
327
+          </el-select>
328
+       </el-form-item>
329
+    </el-col>
330
+    <el-col :span="8">
331
+       <el-form-item label="执业类别:" v-show="showTwo">
332
+            <el-select v-model="form.doctor_type_job" placeholder="执业类别">
333
+              <el-option
334
+                v-for="item in typeJobList"
335
+                :label="item.name"
336
+                :value="item.id"
337
+                :key="item.id"
338
+              ></el-option>
339
+          </el-select>
340
+       </el-form-item>
341
+    </el-col>
342
+  </el-row>
343
+
344
+
345
+  <el-row :gutter="24">
346
+    <el-col :span="8">
347
+       <el-form-item label="医保医师编码:">
348
+         
349
+        <el-input v-model="form.doctor_number"></el-input>
350
+       </el-form-item>
351
+    </el-col>
352
+     <el-col :span="8">
353
+       <el-form-item label="门诊大病类别:" label-width="100">
354
+            <el-select v-model="form.outpatient_illnessCategory" placeholder="门诊大病类别">
355
+              <el-option
356
+                v-for="item in numberList"
357
+                :label="item.name"
358
+                :value="item.id"
359
+                :key="item.id"
360
+              ></el-option>
361
+          </el-select>
362
+       </el-form-item>
363
+    </el-col>
364
+    <el-col :span="8">
365
+       <el-form-item label="在职状态:">
366
+           <el-select v-model="form.is_active" placeholder="在职状态">
367
+              <el-option
368
+                v-for="item in activeList"
369
+                :label="item.name"
370
+                :value="item.id"
371
+                :key="item.id"
372
+              ></el-option>
373
+          </el-select>
374
+       </el-form-item>
375
+    </el-col>
376
+  </el-row>
377
+</div>
378
+  <!-- <el-row :gutter="24">
379
+    <el-col :span="8">
380
+      <el-form-item label="执业状态">
381
+           <el-select v-model="form.active_status" placeholder="执业状态">
382
+              <el-option
383
+                v-for="item in activeStausList"
384
+                :label="item.name"
385
+                :value="item.id"
386
+                :key="item.id"
387
+              ></el-option>
388
+          </el-select>
389
+      </el-form-item>
390
+     </el-col>
391
+  </el-row>      -->
392
+   <el-row :gutter="24">
393
+     <el-col :span="24">
58 394
       <el-form-item label="介绍 : ">
59 395
         <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false"/>
60 396
       </el-form-item>
61
-    </el-form>
397
+      </el-col>
398
+   </el-row>
399
+   </el-form>
400
+  
62 401
     <div slot="footer" class="dialog-footer">
63 402
       <el-button @click="dialogFormVisible = false">取 消</el-button>
64 403
       <el-button type="primary" @click="submitAction">保 存</el-button>
@@ -67,6 +406,7 @@
67 406
 </template>
68 407
 
69 408
 <script>
409
+  import { uParseTime } from '@/utils/tools'
70 410
   import Tinymce from '@/components/Tinymce'
71 411
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
72 412
   import { getAllDePartmentList } from "@/api/project/project"
@@ -134,15 +474,154 @@
134 474
           intro: '',
135 475
           department:'',
136 476
           department_id:"",
477
+          sex:"", //性别
478
+          age:"", //年龄
479
+          nation:"", //民族
480
+          card_type:"", //身份类型
481
+          id_card:"",//身份证
482
+          education:"",//学历
483
+          study_major_name:"",//所学专业
484
+          work_major_name:"",//从事专业
485
+          role_type:"",//人员类别
486
+          medical_code:"",//医药师资格证编码
487
+          doctor_code:"",// 执业证编码
488
+          licensing:"",//多点执业编制
489
+          job_number:"",//工号
490
+          prescription_qualification_identification:"",//处方资格标志
491
+          identification_outpatients:"",//门诊大病资格标志
492
+          start_time:"",//开始时间
493
+          medical_range_code:"",//药师执业范围编码
494
+         
495
+          medical_level:"",//药师级别
496
+          medical_type_job:"",//药师执业类别
497
+          pharmacist_registration_number:"",//执业药师注册证编号
498
+          doctor_range_code:"",//医师执业范围代码
499
+          doctor_level:"",//医师级别
500
+          doctor_type_job:"",//医师执业类别
501
+          doctor_number:"",//医保医生编号
502
+          outpatient_illnessCategory:"",//门诊大病类别
503
+          is_active:"",//在职状态
504
+          active_status:"",//执业状态
137 505
         },
138 506
         departMent:[],
507
+        sexList:[
508
+          {id:1,name:"男"},
509
+          {id:2,name:"女"}
510
+         ],
511
+         //id号按深圳社保编号命名
512
+         cardList:[
513
+          {id:1,name:"内地身份证"},
514
+          {id:90,name:"社保卡"},
515
+          {id:8,name:"护照"},
516
+          {id:4,name:"港澳身份证号"},
517
+          {id:2,name:"居官证"},
518
+          {id:6,name:"台胞证"}
519
+         ],
520
+         educationList:[
521
+           {id:31,name:"大专"},
522
+           {id:21,name:"本科"},
523
+           {id:14,name:"硕士"},
524
+           {id:11,name:"博士"},
525
+         ],
526
+         roleList:[
527
+           {id:1,name:"医师"},
528
+           {id:2,name:"药师"}
529
+         ],
530
+         List:[
531
+           {id:1,name:"是"},
532
+           {id:2,name:"否"},
533
+         ],
534
+         medicalRangeList:[
535
+           {id:1,name:"药品生产"},
536
+           {id:2,name:"药品经营"},
537
+           {id:3,name:"药品使用"}
538
+         ],
539
+        doctorRangeList:[
540
+          {id:101,name:"内科专业"},
541
+          {id:102,name:"外科专业"},
542
+          {id:103,name:"妇产科专业"},
543
+          {id:104,name:"儿科专业"},
544
+          {id:105,name:"眼耳鼻咽喉科专业"},
545
+          {id:106,name:"皮肤科与性病专业"},
546
+          {id:107,name:"精神卫生专业"},
547
+          {id:108,name:"职业病专业"},
548
+          {id:109,name:"医学影像和放射治理专业"},
549
+          {id:110,name:"医学检验、病理专业"},
550
+          {id:111,name:"全科医学专业"},
551
+          {id:112,name:"急救医学专业"},
552
+          {id:113,name:"康复医学专业"},
553
+          {id:114,name:"预防保健专业"},
554
+          {id:115,name:"特种医学与军事医学专业"},
555
+          {id:116,name:"计划生育技术服务专业"},
556
+          {id:199,name:"省级以上卫生行政部门规定的其他专业"},
557
+          {id:201,name:"口腔专业"},
558
+          {id:299,name:"省级以上卫生行政部门规定的其他专业"},
559
+          {id:301,name:"公共卫生类别专业"},
560
+          {id:399,name:"省级以上卫生行政部门规定的其他专业"},
561
+          {id:401,name:"中医专业"},
562
+          {id:402,name:"中西医结合专业"},
563
+          {id:403,name:"蒙医专业"},
564
+          {id:404,name:"藏医专业"},
565
+          {id:405,name:"维医专业"},
566
+          {id:406,name:"傣医专业"},
567
+          {id:499,name:"省级以上卫生行政部门规定的其他专业"}
568
+        ],
569
+        doctorLevelList:[
570
+          {id:1,name:"执业医师"},
571
+          {id:2,name:"执业助理医师"},
572
+          {id:3,name:"执业药师"},
573
+          {id:4,name:"从业药师"}
574
+        ],
575
+        typeJobList:[
576
+         {id:1,name:"临床"},
577
+         {id:2,name:"口腔"},
578
+         {id:3,name:"公共卫生"},
579
+         {id:4,name:"中医"}
580
+        ],
581
+        numberList:[
582
+          {id:1,name:"肺结核专科门诊治疗"},
583
+          {id:2,name:"艾滋病门诊专科治疗"},
584
+          {id:3,name:"再生障碍性贫血"},
585
+          {id:4,name:"地中海贫血"},
586
+          {id:5,name:"血友病"},
587
+          {id:6,name:"精神分裂症门诊专科治疗"},
588
+          {id:7,name:"分裂情感性障碍门诊专科治疗"},
589
+          {id:8,name:"持久的妄想性障碍(偏执性精神病)门诊专科治疗"},
590
+          {id:9,name:"双相(情感)障碍门诊专科治疗"},
591
+          {id:10,name:"癫痫所致精神障碍门诊专科治疗"},
592
+          {id:11,name:"精神发育迟滞伴发精神障碍门诊专科治疗"},
593
+          {id:12,name:"颅内良性肿瘤专科治疗"},
594
+          {id:13,name:"器官移植后抗排斥"},
595
+          {id:14,name:"放、化、核素治疗"},
596
+          {id:15,name:"恶性肿瘤放疗"},
597
+          {id:16,name:"恶性肿瘤化疗 "},
598
+          {id:17,name:"恶性肿瘤介入或核素治疗 "},
599
+          {id:18,name:"肾衰腹透 "},
600
+          {id:19,name:"肾衰血透 "},
601
+          {id:20,name:"肺结核专科门诊治疗"},
602
+          {id:21,name:"放、化、核素治疗"}
603
+        ],
604
+        activeList:[
605
+          {id:1,name:"在职"},
606
+          {id:2,name:"离职"},
607
+          {id:3,name:"返聘"},
608
+          {id:4,name:"临聘"}
609
+        ],
610
+        activeStausList:[
611
+          {id:1,name:"正常"},
612
+          {id:2,name:"注销"},
613
+          {id:3,name:"暂停"}
614
+        ],
139 615
         rules: {
140 616
           mobile: [{ required: true, validator: checkMobile, trigger: 'blur' }],
141 617
           name: [{ required: true, validator: checkName, trigger: 'blur' }],
142 618
           role_ids: [
143 619
             { type: 'array', required: true, message: '请至少选择一个角色', trigger: 'change' }
144 620
           ]
145
-        }
621
+        },
622
+        show:false,
623
+        showOne:false,
624
+        showTwo:true
146 625
       }
147 626
     },
148 627
     methods: {
@@ -205,8 +684,7 @@
205 684
             })
206 685
         } else {
207 686
           this.formTitle = '编辑用户'
208
-          getModifyAdminInitData(this.form.id)
209
-            .then(rs => {
687
+          getModifyAdminInitData(this.form.id).then(rs => {
210 688
               this.loading = false
211 689
               var resp = rs.data
212 690
               if (resp.state === 1) {
@@ -217,6 +695,7 @@
217 695
 
218 696
 
219 697
                 var admin = resp.data.admin
698
+                console.log("admin2222222",admin)
220 699
                 this.form.name = admin.user_name
221 700
                 this.form.mobile = admin.admin.mobile
222 701
                 this.form.user_type = admin.user_type
@@ -234,12 +713,63 @@
234 713
                   }
235 714
                 }
236 715
 
716
+               
717
+              
237 718
                 this.form.intro = admin.intro
238 719
                 this.form.user_title_name = admin.user_title_name
239
-
720
+                if(admin.role_ids.indexOf("1349")!=-1){
721
+                   this.show = true
722
+                }else{
723
+                  this.show = false
724
+                }
725
+                if(admin.role_type == 1){
726
+                   this.showTwo = true
727
+                   this.showOne = false
728
+                }
729
+                if(this.role_type == 2){
730
+                  this.showOne = true
731
+                   this.showTwo = false
732
+                   
733
+                }
240 734
                 this.isSubSuperAdmin = resp.data.isSubSuperAdmin
241 735
                 this.org = resp.data.org
242
-
736
+                this.form.sex = admin.sex
737
+                this.form.age = admin.age
738
+                this.form.nation = admin.nation
739
+                this.form.card_type = admin.card_type
740
+                this.form.id_card = admin.id_card
741
+                this.form.education = admin.education
742
+                this.form.study_major_name = admin.study_major_name
743
+                this.form.work_major_name = admin.work_major_name
744
+                this.form.role_type = admin.role_type
745
+                this.form.medical_code = admin.medical_code
746
+                this.form.doctor_code = admin.doctor_code
747
+                this.form.licensing = admin.licensing
748
+                this.form.job_number = admin.job_number
749
+                this.form.prescription_qualification_identification = admin.prescription_qualification_identification
750
+                this.form.identification_outpatients = admin.identification_outpatients
751
+                this.form.start_time = this.getTime(admin.start_time)
752
+                this.form.medical_range_code = admin.medical_range_code
753
+                this.form.medical_level =admin.medical_level
754
+                this.form.medical_type_job = admin.medical_type_job
755
+                this.form.pharmacist_registration_number = admin.pharmacist_registration_number
756
+                this.form.doctor_range_code = admin.doctor_range_code
757
+                this.form.doctor_level = admin.doctor_level
758
+                this.form.doctor_type_job = admin.doctor_type_job
759
+                this.form.doctor_number = admin.doctor_number
760
+                this.form.is_active = admin.is_active
761
+                console.log("2222222",this.form.is_active)
762
+                this.form.active_status = admin.active_status
763
+              
764
+                var id = 0
765
+                for(let i=0;i<this.numberList.length;i++){
766
+                   if(this.numberList[i].name == admin.outpatient_illness_category){
767
+                        id = this.numberList[i].id
768
+                   }
769
+                }
770
+                console.log("id2222222",id)
771
+                this.form.outpatient_illnessCategory = id
772
+              
243 773
                 //如果当前用户是超级管理员而且编辑自己的信息
244 774
 
245 775
                 if(!this.isSubSuperAdmin) {
@@ -264,8 +794,7 @@
264 794
               } else {
265 795
                 this.$message.error('该用户不存在')
266 796
               }
267
-            })
268
-            .catch(err => {
797
+            }).catch(err => {
269 798
               this.loading = false
270 799
               this.$message.error('该用户不存在')
271 800
             })
@@ -294,20 +823,60 @@
294 823
             }
295 824
 
296 825
             this.loading = true
297
-            console.log("id-----",this.form.id)
826
+            
827
+            var name = ""
828
+            for(let i=0;i<this.numberList.length;i++){
829
+               if(this.form.outpatient_illnessCategory == this.numberList[i].id){
830
+                   name = this.numberList[i].name
831
+               }
832
+            }
298 833
             if (this.form.id === 0) {
299 834
               this.form.role = this.form.role_ids.join(',')
300
-              addAdmin(
301
-                this.form.mobile,
302
-                this.form.name,
303
-                this.form.user_type,
304
-                this.form.user_title,
305
-                this.form.role,
306
-                this.form.intro,
307
-                this.form.user_title_name,
308
-                this.form.department,
309
-                this.form.department_id,
310
-              ).then(rs => {
835
+              var params = {
836
+                mobile:this.form.mobile,
837
+                name:this.form.name,
838
+                type:this.form.user_type,
839
+                title:this.form.user_title,
840
+                role:this.form.role,
841
+                intro:this.form.intro,
842
+                user_title_name:this.form.user_title_name,
843
+                department:this.form.department,
844
+                department_id:this.form.department_id,
845
+                
846
+
847
+                sex:this.form.sex, //性别
848
+                age:parseInt(this.form.age), //年龄
849
+                nation:this.form.nation, //民族
850
+                card_type:this.form.card_type, //身份类型
851
+                id_card:this.form.id_card,//身份证
852
+                education:this.form.education,//学历
853
+                study_major_name:this.form.study_major_name,//所学专业
854
+                work_major_name:this.form.work_major_name,//从事专业
855
+                role_type:this.form.role_type,//人员类别
856
+                medical_code:this.form.medical_code,//医药师资格证编码
857
+                doctor_code:this.form.doctor_code,// 执业证编码
858
+                licensing:this.form.licensing,//多点执业编制
859
+                job_number:this.form.job_number,//工号
860
+                prescription_qualification_identification:this.form.prescription_qualification_identification,//处方资格标志
861
+                identification_outpatients:this.form.identification_outpatients,//门诊大病资格标志
862
+                start_time:this.form.start_time,//开始时间
863
+                medical_range_code:this.form.medical_range_code,//药师执业范围编码
864
+              
865
+                medical_level:this.form.medical_level,//药师级别
866
+                medical_type_job:this.form.medical_type_job,//药师执业类别
867
+                pharmacist_registration_number:this.form.pharmacist_registration_number,//执业药师注册证编号
868
+                doctor_range_code:this.form.doctor_range_code,//医师执业范围代码
869
+                doctor_level:this.form.doctor_level,//医师级别
870
+                doctor_type_job:this.form.doctor_type_job,//医师执业类别
871
+                doctor_number:this.form.doctor_number,//医保医生编号
872
+                outpatient_illnessCategory:name,//门诊大病类别
873
+                is_active:this.form.is_active,//在职状态
874
+                active_status:this.form.active_status,//执业状态
875
+                
876
+              }
877
+              console.log("params",params)
878
+             
879
+              addAdmin(params).then(rs => {
311 880
                   this.loading = false
312 881
                   var resp = rs.data
313 882
                   if (resp.state === 1) {
@@ -335,9 +904,57 @@
335 904
                 }
336 905
               }
337 906
               this.form.department = department
338
-           
339
-             
340
-              modifyAdmin(this.form.id,this.form.name,this.form.user_type,this.form.user_title,this.form.role,this.form.intro, this.form.user_title_name,this.form.sort,this.form.department,this.form.department_id).then(rs => {
907
+               var name = ""
908
+              for(let i=0;i<this.numberList.length;i++){
909
+                if(this.form.outpatient_illnessCategory == this.numberList[i].id){
910
+                    name = this.numberList[i].name
911
+                }
912
+              }
913
+              var params = {
914
+                uid:this.form.id,
915
+                name:this.form.name,
916
+                type:this.form.user_type,
917
+                title:this.form.user_title,
918
+                role:this.form.role,
919
+                intro:this.form.intro,
920
+                user_title_name:this.form.user_title_name,
921
+                sort:0,
922
+                department:this.form.department,
923
+                department_id:this.form.department_id,
924
+
925
+
926
+                sex:this.form.sex, //性别
927
+                age:parseInt(this.form.age), //年龄
928
+                nation:this.form.nation, //民族
929
+                card_type:this.form.card_type, //身份类型
930
+                id_card:this.form.id_card,//身份证
931
+                education:this.form.education,//学历
932
+                study_major_name:this.form.study_major_name,//所学专业
933
+                work_major_name:this.form.work_major_name,//从事专业
934
+                role_type:this.form.role_type,//人员类别
935
+                medical_code:this.form.medical_code,//医药师资格证编码
936
+                doctor_code:this.form.doctor_code,// 执业证编码
937
+                licensing:this.form.licensing,//多点执业编制
938
+                job_number:this.form.job_number,//工号
939
+                prescription_qualification_identification:this.form.prescription_qualification_identification,//处方资格标志
940
+                identification_outpatients:this.form.identification_outpatients,//门诊大病资格标志
941
+                start_time:this.form.start_time,//开始时间
942
+                medical_range_code:this.form.medical_range_code,//药师执业范围编码
943
+              
944
+                medical_level:this.form.medical_level,//药师级别
945
+                medical_type_job:this.form.medical_type_job,//药师执业类别
946
+                pharmacist_registration_number:this.form.pharmacist_registration_number,//执业药师注册证编号
947
+                doctor_range_code:this.form.doctor_range_code,//医师执业范围代码
948
+                doctor_level:this.form.doctor_level,//医师级别
949
+                doctor_type_job:this.form.doctor_type_job,//医师执业类别
950
+                doctor_number:this.form.doctor_number,//医保医生编号
951
+                outpatient_illnessCategory:name,//门诊大病类别
952
+                is_active:this.form.is_active,//在职状态
953
+                active_status:this.form.active_status,//执业状态
954
+
955
+              }
956
+              console.log("params2222222",params)
957
+              modifyAdmin(params).then(rs => {
341 958
                   this.loading = false
342 959
                   var resp = rs.data
343 960
                   if (resp.state === 1) {
@@ -372,10 +989,47 @@
372 989
          
373 990
          }
374 991
         })
992
+      },
993
+      changeRole(arr){
994
+        console.log("roles",this.roles)
995
+        // var id = 0
996
+        // for(let i=0;i<this.roles.length;i++){
997
+        //    if(this.roles[i].name="医生"){
998
+        //       id = this.roles[i].id
999
+        //    }
1000
+        // }
1001
+        this.form.role_type = 1
1002
+        var ids = arr.join(";")
1003
+        console.log("valee22222",ids)
1004
+        if(ids.indexOf("1349")!=-1){
1005
+           this.show = true
1006
+        }else{
1007
+           this.show = false
1008
+        }
1009
+      },
1010
+       getTime(val) {
1011
+         if(val == ""){
1012
+          return ""
1013
+         }else {
1014
+          return uParseTime(val, '{y}-{m}-{d}')
1015
+         }
1016
+      },
1017
+      changeRoleType(val){
1018
+        console.log("val",val)
1019
+        if(val == 1){
1020
+          this.showTwo = true
1021
+          this.showOne = false
1022
+          
1023
+        }
1024
+        if(val == 2){
1025
+          this.showTwo =false
1026
+          this.showOne = true
1027
+        }
375 1028
       }
376 1029
     },
377 1030
 
378 1031
     created(){
1032
+     
379 1033
         //获取所有科室
380 1034
        this.getlist()
381 1035
     }