Преглед изворни кода

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN пре 4 година
родитељ
комит
29462437f8

+ 8 - 29
src/api/role/admin.js Прегледај датотеку

@@ -26,23 +26,13 @@ export function getAddAdminInitData() {
26 26
   })
27 27
 }
28 28
 
29
-export function addAdmin(mobile, name, type, title, role, intro, user_title_name,department,department_id) {
30
-  const params = {
31
-    mobile: mobile,
32
-    name: name,
33
-    type: type,
34
-    title: title,
35
-    role: role,
36
-    intro: intro,
37
-    user_title_name: user_title_name,
38
-    department:department,
39
-    department_id:department_id,
40
-  }
41
-  console.log("epa",department_id,department)
29
+export function addAdmin(params) {
30
+  
31
+  console.log("epa",params)
42 32
   
43 33
   return request({
44 34
     url: '/api/admin/add',
45
-    method: 'post',
35
+    method: 'get',
46 36
     params: params
47 37
   })
48 38
 }
@@ -58,25 +48,14 @@ export function getModifyAdminInitData(uid) {
58 48
   })
59 49
 }
60 50
 
61
-export function modifyAdmin(uid, name, type, title, role, intro, user_title_name, sort,department,department_id) {
62
-  console.log("进来",department,department_id)
63
-  const params = {
64
-    uid: uid,
65
-    name: name,
66
-    type: type,
67
-    title: title,
68
-    role: role,
69
-    intro: intro,
70
-    user_title_name: user_title_name,
71
-    sort: sort,
72
-    department:department,
73
-    department_id:department_id
74
-  }
51
+export function modifyAdmin(params) {
52
+  
53
+  
75 54
  
76 55
  
77 56
   return request({
78 57
     url: '/api/admin/edit',
79
-    method: 'post',
58
+    method: 'get',
80 59
     params: params
81 60
   })
82 61
 }

+ 12 - 0
src/router/modules/dialysis.js Прегледај датотеку

@@ -292,6 +292,18 @@ export default {
292 292
         noCache: true
293 293
       }
294 294
     },
295
+    {
296
+      path: '/dialysis/print/batch/seventeen',
297
+      component: () =>
298
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_seventeen'),
299
+      hidden: true,
300
+      is_menu: false,
301
+      name: 'dialysis_batch_seventeen',
302
+      meta: {
303
+        title: '批量打印',
304
+        noCache: true
305
+      }
306
+    },
295 307
     {
296 308
       path: '/dialysis/print/batch/twenty',
297 309
       component: () =>

Разлика између датотеке није приказан због своје велике величине
+ 2104 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_seventeen.vue


+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue Прегледај датотеку

@@ -160,6 +160,16 @@
160 160
           >批量打印</el-button
161 161
         >
162 162
       </template>
163
+      <template v-if="this.template_id == 17">
164
+        <el-button
165
+          size="small"
166
+          icon="el-icon-printer"
167
+          :disabled="selecting_schs.length == 0"
168
+          @click="batchPrintAction"
169
+          type="primary"
170
+          >批量打印</el-button
171
+        >
172
+      </template>
163 173
       <template v-if="this.template_id == 20">
164 174
         <el-button
165 175
           size="small"
@@ -801,6 +811,8 @@ export default {
801 811
         this.$router.push({ path: "/dialysis/print/batch/thirteen" });
802 812
       } else if (this.template_id == 15) {
803 813
         this.$router.push({ path: "/dialysis/print/batch/fifteen" });
814
+      } else if (this.template_id == 17) {
815
+        this.$router.push({ path: "/dialysis/print/batch/seventeen" });
804 816
       } else if (this.template_id == 20) {
805 817
         this.$router.push({ path: "/dialysis/print/batch/twenty" });
806 818
       } else if (this.template_id == 22) {

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

@@ -1,50 +1,403 @@
1 1
 <template>
2
-  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible">
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
-
2
+  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible"  width="1000px">
3
+    <el-form :model="form" ref="form" :rules="rules" label-width="130px">
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>
38
-      </el-form-item>
39
-
40
-      <el-form-item label="职位 : ">
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="职位: ">
41 67
         <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
42 68
       </el-form-item>
69
+    </el-col>
70
+   </el-row>
71
+  
72
+  <div v-show="show">
73
+   <el-row :gutter="24">
74
+    <el-col :span="8">
75
+      <el-form-item label="性别:">
76
+        <el-select v-model="form.sex" placeholder="性别" style="width:180px;">
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:180px;"></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="执业状态" style="width:180px;">
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>
104
+
105
+
106
+  <el-row :gutter="24">
107
+    <el-col :span="8">
108
+       <el-form-item label="民族:">
109
+          <el-input v-model="form.nation" style="width:180px;"></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="性别" style="width:180px;">
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:180px;"></el-input>
127
+       </el-form-item>
128
+    </el-col>
129
+  </el-row>
130
+
131
+   <el-row :gutter="24">
132
+    <el-col :span="8">
133
+       <el-form-item label="学历:">
134
+           <el-select v-model="form.education" placeholder="性别" style="width:180px;">
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:180px;"></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:180px;"></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" style="width:180px;">
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:180px;"></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:180px;"></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="多点执业标志" style="width:180px;">
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:180px;"></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="处方资格标志" style="width:180px;">
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="门诊医生大病标志" style="width:180px;">
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:180px;"
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="药师执业范围代码" style="width:180px;">
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="药师级别" style="width:180px;">
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="130px" v-show="showOne">
280
+          
281
+             <el-select v-model="form.medical_type_job" placeholder="药师执业类别" style="width:180px;">
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" style="width:180px;"></el-input>
294
+       </el-form-item>
295
+    </el-col>
296
+  </el-row>
297
+
298
+
43 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="医生执业范围代码" style="width:180px;">
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="130px" v-show="showTwo">
319
+          
320
+             <el-select v-model="form.doctor_level" placeholder="医生级别" style="width:180px;">
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="执业类别" style="width:180px;">
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" style="width:180px;"></el-input>
350
+       </el-form-item>
351
+    </el-col>
352
+     <el-col :span="8">
353
+       <el-form-item label="门诊大病类别:" label-width="130px">
354
+            <el-select v-model="form.outpatient_illnessCategory" placeholder="门诊大病类别" style="width:180px;">
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="在职状态" style="width:180px;">
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">
44 394
       <el-form-item label="介绍 : ">
45 395
         <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false"/>
46 396
       </el-form-item>
47
-    </el-form>
397
+      </el-col>
398
+   </el-row>
399
+   </el-form>
400
+  
48 401
     <div slot="footer" class="dialog-footer">
49 402
       <el-button @click="dialogFormVisible = false">取 消</el-button>
50 403
       <el-button type="primary" @click="submitAction">保 存</el-button>
@@ -53,9 +406,10 @@
53 406
 </template>
54 407
 
55 408
 <script>
409
+  import { uParseTime } from '@/utils/tools'
56 410
   import Tinymce from '@/components/Tinymce'
57 411
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
58
-
412
+  import { getAllDePartmentList } from "@/api/project/project"
59 413
   export default {
60 414
     name: 'AdminInfoForm',
61 415
     components: {
@@ -118,14 +472,156 @@
118 472
           user_title: '',
119 473
           role: '', // 其实应该是 int 类型
120 474
           intro: '',
475
+          department:'',
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:"",//执业状态
121 505
         },
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
+        ],
122 615
         rules: {
123 616
           mobile: [{ required: true, validator: checkMobile, trigger: 'blur' }],
124 617
           name: [{ required: true, validator: checkName, trigger: 'blur' }],
125 618
           role_ids: [
126 619
             { type: 'array', required: true, message: '请至少选择一个角色', trigger: 'change' }
127 620
           ]
128
-        }
621
+        },
622
+        show:false,
623
+        showOne:false,
624
+        showTwo:true
129 625
       }
130 626
     },
131 627
     methods: {
@@ -136,7 +632,7 @@
136 632
           this.loading = false
137 633
           return
138 634
         }
139
-        // let localthis.$store.getters.xt_user.user.id
635
+         // let localthis.$store.getters.xt_user.user.id
140 636
         let local_user_id = this.$store.getters.xt_user.user.id
141 637
         this.form.id = this.admin_id
142 638
         if (this.admin_id === 0) {
@@ -159,7 +655,7 @@
159 655
             .then(rs => {
160 656
               this.loading = false
161 657
               var resp = rs.data
162
-
658
+              
163 659
               if (resp.state === 1) {
164 660
                 // this.roles.push(...resp.data.roles)
165 661
                 this.roles = resp.data.roles
@@ -188,8 +684,7 @@
188 684
             })
189 685
         } else {
190 686
           this.formTitle = '编辑用户'
191
-          getModifyAdminInitData(this.form.id)
192
-            .then(rs => {
687
+          getModifyAdminInitData(this.form.id).then(rs => {
193 688
               this.loading = false
194 689
               var resp = rs.data
195 690
               if (resp.state === 1) {
@@ -200,6 +695,7 @@
200 695
 
201 696
 
202 697
                 var admin = resp.data.admin
698
+                console.log("admin2222222",admin)
203 699
                 this.form.name = admin.user_name
204 700
                 this.form.mobile = admin.admin.mobile
205 701
                 this.form.user_type = admin.user_type
@@ -209,6 +705,7 @@
209 705
                 }
210 706
                 this.form.user_title = admin.user_title
211 707
                 this.form.role = admin.role_ids
708
+                this.form.department_id = admin.department_id
212 709
                 this.form.role_ids = []
213 710
                 for (let i = 0; i < this.form.role.split(",").length; i++) {
214 711
                   if (this.form.role.split(',')[i].length > 0) {
@@ -216,12 +713,63 @@
216 713
                   }
217 714
                 }
218 715
 
716
+               
717
+              
219 718
                 this.form.intro = admin.intro
220 719
                 this.form.user_title_name = admin.user_title_name
221
-
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
+                }
222 734
                 this.isSubSuperAdmin = resp.data.isSubSuperAdmin
223 735
                 this.org = resp.data.org
224
-
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
+              
225 773
                 //如果当前用户是超级管理员而且编辑自己的信息
226 774
 
227 775
                 if(!this.isSubSuperAdmin) {
@@ -246,8 +794,7 @@
246 794
               } else {
247 795
                 this.$message.error('该用户不存在')
248 796
               }
249
-            })
250
-            .catch(err => {
797
+            }).catch(err => {
251 798
               this.loading = false
252 799
               this.$message.error('该用户不存在')
253 800
             })
@@ -255,7 +802,16 @@
255 802
 
256 803
         this.dialogFormVisible = true
257 804
       },
258
-      submitAction: function() {
805
+      submitAction: function() {   
806
+       console.log("第是",this.form.department_id)  
807
+        var department = ""
808
+        for(let i=0;i<this.departMent.length;i++){
809
+          if(this.form.department_id == this.departMent[i].id){
810
+              department = this.departMent[i].name
811
+          }
812
+        }
813
+        this.form.department = department
814
+        
259 815
         if (this.admin_id < 0) {
260 816
           return
261 817
         }
@@ -267,47 +823,138 @@
267 823
             }
268 824
 
269 825
             this.loading = true
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
+            }
270 833
             if (this.form.id === 0) {
271 834
               this.form.role = this.form.role_ids.join(',')
272
-              addAdmin(
273
-                this.form.mobile,
274
-                this.form.name,
275
-                this.form.user_type,
276
-                this.form.user_title,
277
-                this.form.role,
278
-                this.form.intro,
279
-                this.form.user_title_name
280
-              ).then(rs => {
281
-                this.loading = false
282
-                var resp = rs.data
283
-                if (resp.state === 1) {
284
-                  this.$store.dispatch('DidChangeAdmins')
285
-                  var _this = this
286
-                  setTimeout(() => {
287
-                    _this.$store.dispatch('RecoverAdminsChangeState')
288
-                  }, 500)
289
-                  this.dialogFormVisible = false
290
-                } else {
291
-                  this.$message.error(resp.msg)
292
-                }
293
-              })
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 => {
880
+                  this.loading = false
881
+                  var resp = rs.data
882
+                  if (resp.state === 1) {
883
+                    this.$store.dispatch('DidChangeAdmins')
884
+                    var _this = this
885
+                    setTimeout(() => {
886
+                      _this.$store.dispatch('RecoverAdminsChangeState')
887
+                    }, 500)
888
+                    this.dialogFormVisible = false
889
+                  } else {
890
+                    this.$message.error(resp.msg)
891
+                  }
892
+                })
294 893
                 .catch(err => {
295 894
                   this.loading = false
296 895
                   this.$message.error(err)
297 896
                 })
298 897
             } else {
299 898
               this.form.role = this.form.role_ids.join(',')
899
+             
900
+               var department = ""
901
+               for(let i=0;i<this.departMent.length;i++){
902
+                if(this.form.department_id == this.departMent[i].id){
903
+                    department = this.departMent[i].name
904
+                }
905
+              }
906
+              this.form.department = department
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,//执业状态
300 954
 
301
-              modifyAdmin(
302
-                this.form.id,
303
-                this.form.name,
304
-                this.form.user_type,
305
-                this.form.user_title,
306
-                this.form.role,
307
-                this.form.intro,
308
-                this.form.user_title_name,
309
-              )
310
-                .then(rs => {
955
+              }
956
+              console.log("params2222222",params)
957
+              modifyAdmin(params).then(rs => {
311 958
                   this.loading = false
312 959
                   var resp = rs.data
313 960
                   if (resp.state === 1) {
@@ -331,7 +978,60 @@
331 978
             return false
332 979
           }
333 980
         })
981
+      },
982
+
983
+      getlist(){
984
+        getAllDePartmentList().then(response=>{
985
+         if(response.data.state == 1){
986
+           var department =   response.data.data.departMent
987
+           console.log("department2222",department)
988
+           this.departMent = department
989
+         
990
+         }
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
+        }
334 1028
       }
1029
+    },
1030
+
1031
+    created(){
1032
+     
1033
+        //获取所有科室
1034
+       this.getlist()
335 1035
     }
336 1036
   }
337 1037
 </script>