|
|
@@ -5,42 +5,46 @@
|
|
5
|
5
|
size="medium" style="width: 150px;" clearable placeholder="选择日期" />
|
|
6
|
6
|
<el-select v-model="searchData.hosid" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
7
|
7
|
placeholder="请选择院区" @change="handleHospital">
|
|
8
|
|
- <el-option
|
|
9
|
|
- v-for="(item, index) in hosarr"
|
|
10
|
|
- :key="index"
|
|
11
|
|
- :label="item.hospitalname"
|
|
12
|
|
- :value="item.hospitalcode"
|
|
13
|
|
- />
|
|
|
8
|
+ <el-option v-for="(item, index) in hosarr" :key="index" :label="item.yymc" :value="item.yydm" />
|
|
14
|
9
|
</el-select>
|
|
15
|
10
|
<el-select v-model="searchData.deptid" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
16
|
11
|
placeholder="请选择科室" @change="handleDept">
|
|
17
|
|
- <el-option
|
|
18
|
|
- v-for="(item, index) in deptarr"
|
|
19
|
|
- :key="index"
|
|
20
|
|
- :label="item.name"
|
|
21
|
|
- :value="item.id"
|
|
22
|
|
- />
|
|
|
12
|
+ <el-option v-for="(item, index) in deptarr" :key="index" :label="item.yjksmc" :value="item.yjksdm" />
|
|
23
|
13
|
</el-select>
|
|
24
|
|
- <el-input v-model="searchData.deptname" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
|
14
|
+ <el-select v-model="searchData.doctorid" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
|
15
|
+ placeholder="请选择医生" @change="handleDoctor">
|
|
|
16
|
+ <el-option v-for="(item, index) in doctorarr" :key="index" :label="item.ysmc" :value="item.ysdm" />
|
|
|
17
|
+ </el-select>
|
|
|
18
|
+ <el-select v-model="searchData.hyId" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
|
19
|
+ placeholder="请选择号源" @change="handleHy">
|
|
|
20
|
+ <el-option v-for="(item, index) in hytarr" :key="index" :label="item.zzlxmc" :value="item.pbxh" />
|
|
|
21
|
+ </el-select>
|
|
|
22
|
+
|
|
|
23
|
+ <!-- <el-input v-model="searchData.deptname" size="medium" class="filter-item" style="width: 150px;" clearable
|
|
25
|
24
|
placeholder="医生姓名" />
|
|
26
|
|
- <el-button type="primary" size="medium" @click="btn_search">搜索</el-button>
|
|
|
25
|
+ <el-button type="primary" size="medium" @click="btn_search">搜索</el-button> -->
|
|
27
|
26
|
</div>
|
|
28
|
27
|
<div class="regList">
|
|
29
|
28
|
<div class="regItem" v-for="(item, index) in tableData">
|
|
30
|
29
|
<div class="itemLine1">
|
|
31
|
|
- <div class="lineSpan1">{{item.doctorname}}</div>
|
|
32
|
|
- <div class="lineSpan2">{{ rankidObj[item.rankid]}}</div>
|
|
33
|
|
- <div class="lineSpan3">{{item.czlx == 1 ? '专家':item.czlx == 8 ?'普通':'未知'}}</div>
|
|
|
30
|
+ <div class="lineSpan1">{{ item.doctorName }}</div>
|
|
|
31
|
+ <div class="lineSpan2">{{ item.yszc }}</div>
|
|
|
32
|
+ <div class="lineSpan3">{{ item.czlx ? item.czlx : '未知' }}</div>
|
|
|
33
|
+ </div>
|
|
|
34
|
+ <div class="itemLine2">
|
|
|
35
|
+ <div class="lineSpan1">{{ item.hosName }}</div>
|
|
|
36
|
+ <div class="lineSpan2">{{ item.deptName ? item.deptName : '未知' }}</div>
|
|
|
37
|
+ <div class="lineSpan3">坐诊时间:{{ item.zzlxmc ? item.zzlxmc : '未知' }}</div>
|
|
|
38
|
+ <div class="lineSpan4">挂号费用:{{ item.ghf }}</div>
|
|
34
|
39
|
</div>
|
|
35
|
40
|
<div class="itemLine2">
|
|
36
|
|
- <div class="lineSpan1">{{ hospitalcodObj[item.hospitalcod] ? hospitalcodObj[item.hospitalcod]: '未知'}}</div>
|
|
37
|
|
- <div class="lineSpan2">{{item.ksmc?item.ksmc:'未知'}}</div>
|
|
38
|
|
- <div class="lineSpan3">坐诊时间:{{pcodeObj[item.pcode]?pcodeObj[item.pcode]:'未知'}} {{item.date}} {{item.stime}}-{{item.etime}}</div>
|
|
39
|
|
- <div class="lineSpan4">挂号费用:{{item.price}}</div>
|
|
40
|
|
- <div class="lineSpan4">余号:{{item.acount}}</div>
|
|
|
41
|
+ <div class="lineSpan1">挂号号序:{{ item.ghhx }}</div>
|
|
|
42
|
+ <div class="lineSpan2">状态:{{ item.hxzt ? item.hxzt : '未知' }}</div>
|
|
|
43
|
+ <div class="lineSpan3">时段: {{ item.kssj ? item.kssj : '未知' }} - {{ item.jssj ? item.jssj : '未知' }}</div>
|
|
41
|
44
|
<div class="lineSpan4">
|
|
42
|
|
- <el-button class="btn" size="small" @click="handleReg(item)" type="primary" v-if="item.acount">预约</el-button>
|
|
43
|
|
- <el-button class="btn" size="small" type="primary" v-if="!item.acount" disabled>预约</el-button>
|
|
|
45
|
+ <el-button class="btn" size="small" @click="handleReg(item)" type="primary"
|
|
|
46
|
+ v-if="item.hxzt === '未使用'">预约</el-button>
|
|
|
47
|
+ <el-button class="btn" size="small" type="primary" v-if="item.hxzt !== '未使用'" disabled>预约</el-button>
|
|
44
|
48
|
</div>
|
|
45
|
49
|
|
|
46
|
50
|
</div>
|
|
|
@@ -50,18 +54,8 @@
|
|
50
|
54
|
<el-form label-width="120px" style="width: 90%;">
|
|
51
|
55
|
<el-row>
|
|
52
|
56
|
<el-col :span="20">
|
|
53
|
|
- <el-form-item label="预约时间" >
|
|
54
|
|
- <el-select v-model="ruleForm.PatientCode"
|
|
55
|
|
- size="medium" clearable
|
|
56
|
|
- @change="handlePatient"
|
|
57
|
|
- placeholder="请选择预约时间">
|
|
58
|
|
- <el-option
|
|
59
|
|
- v-for="(item, index) in PatientArr"
|
|
60
|
|
- :key="index"
|
|
61
|
|
- :label="item.time"
|
|
62
|
|
- :value="item.id"
|
|
63
|
|
- />
|
|
64
|
|
- </el-select>
|
|
|
57
|
+ <el-form-item label="预约时间">
|
|
|
58
|
+ <el-input v-model="tableItem.zzlxmc" disabled placeholder="请输入预约时间" />
|
|
65
|
59
|
</el-form-item>
|
|
66
|
60
|
</el-col>
|
|
67
|
61
|
</el-row>
|
|
|
@@ -69,7 +63,7 @@
|
|
69
|
63
|
<el-row>
|
|
70
|
64
|
<el-col :span="20">
|
|
71
|
65
|
<el-form-item label="患者姓名">
|
|
72
|
|
- <el-input v-model="ruleForm.PatientName" placeholder="请输入患者姓名" />
|
|
|
66
|
+ <el-input v-model="ruleForm.patientName" placeholder="请输入患者姓名" @change="handlePatient($event.target.value, 'patientName')" />
|
|
73
|
67
|
</el-form-item>
|
|
74
|
68
|
</el-col>
|
|
75
|
69
|
</el-row>
|
|
|
@@ -77,15 +71,17 @@
|
|
77
|
71
|
<el-row>
|
|
78
|
72
|
<el-col :span="20">
|
|
79
|
73
|
<el-form-item label="身份证号">
|
|
80
|
|
- <el-input v-model="ruleForm.identityCard" placeholder="请输入身份证号" />
|
|
|
74
|
+ <el-input v-model="ruleForm.identityCard" placeholder="请输入身份证号" @change="handlePatient($event.target.value, 'identityCard')"/>
|
|
81
|
75
|
</el-form-item>
|
|
82
|
76
|
</el-col>
|
|
83
|
77
|
</el-row>
|
|
84
|
|
-
|
|
85
|
78
|
<el-row>
|
|
86
|
79
|
<el-col :span="20">
|
|
87
|
80
|
<el-form-item label="性别">
|
|
88
|
|
- <el-input v-model="ruleForm.Sex" placeholder="请输入性别" />
|
|
|
81
|
+ <el-radio-group v-model="ruleForm.sex">
|
|
|
82
|
+ <el-radio label="男">男</el-radio>
|
|
|
83
|
+ <el-radio label="女">女</el-radio>
|
|
|
84
|
+ </el-radio-group>
|
|
89
|
85
|
</el-form-item>
|
|
90
|
86
|
</el-col>
|
|
91
|
87
|
</el-row>
|
|
|
@@ -93,11 +89,34 @@
|
|
93
|
89
|
<el-row>
|
|
94
|
90
|
<el-col :span="20">
|
|
95
|
91
|
<el-form-item label="出生日期">
|
|
96
|
|
- <el-input v-model="ruleForm.Birthday" placeholder="请输入出生日期" />
|
|
|
92
|
+ <el-input v-model="ruleForm.birthday" placeholder="请输入出生日期" />
|
|
97
|
93
|
</el-form-item>
|
|
98
|
94
|
</el-col>
|
|
99
|
95
|
</el-row>
|
|
100
|
96
|
|
|
|
97
|
+ <el-row v-if="ruleFormAge<=12">
|
|
|
98
|
+ <el-col :span="20">
|
|
|
99
|
+ <el-form-item label="监护人姓名">
|
|
|
100
|
+ <el-input v-model="ruleForm.lxrxm" placeholder="请输入监护人姓名" />
|
|
|
101
|
+ </el-form-item>
|
|
|
102
|
+ </el-col>
|
|
|
103
|
+ </el-row>
|
|
|
104
|
+
|
|
|
105
|
+ <el-row v-if="ruleFormAge<=12">
|
|
|
106
|
+ <el-col :span="20">
|
|
|
107
|
+ <el-form-item label="监护人电话">
|
|
|
108
|
+ <el-input v-model="ruleForm.lxrdh" placeholder="请输入监护人电话" />
|
|
|
109
|
+ </el-form-item>
|
|
|
110
|
+ </el-col>
|
|
|
111
|
+ </el-row>
|
|
|
112
|
+
|
|
|
113
|
+ <el-row v-if="ruleFormAge<=12">
|
|
|
114
|
+ <el-col :span="20">
|
|
|
115
|
+ <el-form-item label="监护人证件号">
|
|
|
116
|
+ <el-input v-model="ruleForm.lxrzjh" placeholder="请输入监护人证件号" />
|
|
|
117
|
+ </el-form-item>
|
|
|
118
|
+ </el-col>
|
|
|
119
|
+ </el-row>
|
|
101
|
120
|
<!-- <el-row>
|
|
102
|
121
|
<el-col :span="20">
|
|
103
|
122
|
<el-form-item label="民族">
|
|
|
@@ -116,16 +135,8 @@
|
|
116
|
135
|
|
|
117
|
136
|
<el-row>
|
|
118
|
137
|
<el-col :span="20">
|
|
119
|
|
- <el-form-item label="家庭住址">
|
|
120
|
|
- <el-input v-model="ruleForm.Address" placeholder="请输入家庭住址" />
|
|
121
|
|
- </el-form-item>
|
|
122
|
|
- </el-col>
|
|
123
|
|
- </el-row>
|
|
124
|
|
-
|
|
125
|
|
- <el-row>
|
|
126
|
|
- <el-col :span="20">
|
|
127
|
138
|
<el-form-item label="预约医生姓名">
|
|
128
|
|
- <el-input v-model="ruleForm.doctor" placeholder="请输入医生姓名" />
|
|
|
139
|
+ <el-input v-model="tableItem.doctorName" disabled placeholder="请输入医生姓名" />
|
|
129
|
140
|
</el-form-item>
|
|
130
|
141
|
</el-col>
|
|
131
|
142
|
</el-row>
|
|
|
@@ -133,7 +144,7 @@
|
|
133
|
144
|
<el-row>
|
|
134
|
145
|
<el-col :span="20">
|
|
135
|
146
|
<el-form-item label="预约院区">
|
|
136
|
|
- <el-input v-model="ruleForm.hospital" placeholder="请输入预约院区" />
|
|
|
147
|
+ <el-input v-model="tableItem.hosName" disabled placeholder="请输入预约院区" />
|
|
137
|
148
|
</el-form-item>
|
|
138
|
149
|
</el-col>
|
|
139
|
150
|
</el-row>
|
|
|
@@ -141,17 +152,10 @@
|
|
141
|
152
|
<el-row>
|
|
142
|
153
|
<el-col :span="20">
|
|
143
|
154
|
<el-form-item label="预约科室">
|
|
144
|
|
- <el-input v-model="ruleForm.dept" placeholder="请输入预约科室" />
|
|
|
155
|
+ <el-input v-model="tableItem.deptName" disabled placeholder="请输入预约科室" />
|
|
145
|
156
|
</el-form-item>
|
|
146
|
157
|
</el-col>
|
|
147
|
158
|
</el-row>
|
|
148
|
|
- <!-- <el-row>
|
|
149
|
|
- <el-col :span="20">
|
|
150
|
|
- <el-form-item label="预约时间">
|
|
151
|
|
- <el-input v-model="ruleForm.name2" placeholder="请输入客户电话" />
|
|
152
|
|
- </el-form-item>
|
|
153
|
|
- </el-col>
|
|
154
|
|
- </el-row> -->
|
|
155
|
159
|
|
|
156
|
160
|
<el-row>
|
|
157
|
161
|
<el-form-item>
|
|
|
@@ -165,244 +169,410 @@
|
|
165
|
169
|
</template>
|
|
166
|
170
|
|
|
167
|
171
|
<script>
|
|
168
|
|
- import axios from 'axios'
|
|
169
|
|
- import { getHos,GetRegHospital,GetRegDept, GetRegistrationl,GetRegWid,GetYygh,getinum } from '@/api/callScreen/callScreen'
|
|
170
|
|
-
|
|
171
|
|
- import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
|
|
172
|
|
- import hischange from './hischange'
|
|
173
|
|
- export default {
|
|
174
|
|
- name: 'VisitList',
|
|
175
|
|
- components: {
|
|
176
|
|
- Pagination
|
|
177
|
|
- },
|
|
178
|
|
- props: {
|
|
179
|
|
- callinNum: {
|
|
180
|
|
- type: String,
|
|
181
|
|
- default: ''
|
|
182
|
|
- }
|
|
183
|
|
- },
|
|
|
172
|
+import { GetRegHospital, GetRegDept, GetRegWid, GetYygh, Gethy, gethx,getZLId } from '@/api/callScreen/callScreen'
|
|
|
173
|
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
|
|
|
174
|
+import { decrypt } from '@/utils/secretKey'
|
|
184
|
175
|
|
|
185
|
|
- data() {
|
|
186
|
|
- return {
|
|
187
|
|
- widarr:[],
|
|
188
|
|
- deptarr:[],
|
|
189
|
|
- drawer: false,
|
|
190
|
|
- direction: 'rtl',
|
|
191
|
|
- PatientArr:[],
|
|
192
|
|
- ruleForm: {
|
|
193
|
|
- PatientCode:'',
|
|
194
|
|
- PatientName: '', // 患者姓名
|
|
195
|
|
- identityCard: '', // 身份证号
|
|
196
|
|
- Sex: '', // 性别
|
|
197
|
|
- Birthday: '', // 出生日期
|
|
198
|
|
- tel: '', // 联系方式
|
|
199
|
|
- Address: '', // 家庭住址
|
|
200
|
|
- doctor: '', // 预约医生姓名
|
|
201
|
|
- hospital: '', // hospital
|
|
202
|
|
- dept: '', // 预约科室
|
|
203
|
|
- inum:'', // 挂号序号 Registration/getinum
|
|
204
|
|
- wid:'', // 排班标识 Registration/getwid
|
|
205
|
|
- price : '', // 挂号费 Registration/getwid
|
|
206
|
|
- },
|
|
207
|
|
- searchData: {
|
|
208
|
|
- searchTime: '',
|
|
209
|
|
- hosid: '',
|
|
210
|
|
- deptid:'',
|
|
211
|
|
- deptname: ''
|
|
212
|
|
- },
|
|
213
|
|
- hospitalcodObj:{
|
|
214
|
|
- 1:'总院',
|
|
215
|
|
- 11:'和平分院',
|
|
216
|
|
- 12:'胜利分院',
|
|
217
|
|
- },
|
|
218
|
|
- pcodeObj:{
|
|
219
|
|
- 10:'上午',
|
|
220
|
|
- 20: '中午',
|
|
221
|
|
- 30:'下午',
|
|
222
|
|
- 40:'夜班',
|
|
223
|
|
- 50:'全天',
|
|
224
|
|
- 60:'急诊上午',
|
|
225
|
|
- 70:'急诊下午',
|
|
226
|
|
- 80:'夏令',
|
|
227
|
|
- 90:'绿色通道',
|
|
228
|
|
- },
|
|
229
|
|
- rankidObj:{
|
|
230
|
|
- 10:'名特专家',
|
|
231
|
|
- 11:'省优秀专家',
|
|
232
|
|
- 12:'保健干部医师',
|
|
233
|
|
- 13:'主任医师',
|
|
234
|
|
- 14:'主治医师',
|
|
235
|
|
- 15:'住院医师',
|
|
236
|
|
- 16:'急诊医师',
|
|
237
|
|
- 3:'副主任医师',
|
|
238
|
|
- 4:'国家特贴主任医师',
|
|
239
|
|
- 6:'建议书',
|
|
240
|
|
- 9:'门诊挂号',
|
|
241
|
|
- 5:'未知'
|
|
242
|
|
- },
|
|
243
|
|
- wrankObj:{
|
|
244
|
|
- 1 :'名特专家',
|
|
245
|
|
- 2 :'省优秀专家',
|
|
246
|
|
- 3 :'保健干部医师',
|
|
247
|
|
- 4:'主任医师',
|
|
248
|
|
- 5:'主治医师',
|
|
249
|
|
- 6:'住院医师',
|
|
250
|
|
- 7:'急诊医师',
|
|
251
|
|
- 8:'副主任医师',
|
|
252
|
|
- 9:'国家特贴主任医师'
|
|
253
|
|
- },
|
|
254
|
|
- hosarr: [],
|
|
255
|
|
- tableData: []
|
|
256
|
|
- }
|
|
257
|
|
- },
|
|
258
|
|
- created() {
|
|
259
|
|
- this.getHospital()
|
|
260
|
|
- // this.handleDept()
|
|
261
|
|
- // this.getList()
|
|
262
|
|
- },
|
|
263
|
|
- methods: {
|
|
264
|
|
- submitForm() {
|
|
265
|
|
- console.log(this.ruleForm)
|
|
266
|
|
- const params = this.ruleForm
|
|
267
|
|
- // axios.get('http://192.168.1.37:8000/Registration/Yygh',
|
|
268
|
|
- // {
|
|
269
|
|
- // params,
|
|
270
|
|
- // headers: {
|
|
271
|
|
- // 'Content-Type':'pplication/x-www-form-urlencoded;charset=UTF-8'
|
|
272
|
|
- // }
|
|
273
|
|
- // }).then(function (response) {
|
|
274
|
|
- // console.log(response)
|
|
275
|
|
- // }).catch(function (error) {
|
|
276
|
|
- // console.log(error);
|
|
277
|
|
- // });
|
|
278
|
|
- GetYygh(this.ruleForm).then((res) => {
|
|
279
|
|
- console.log(res)
|
|
280
|
|
- this.drawer = false
|
|
281
|
|
- })
|
|
282
|
|
- },
|
|
283
|
|
- handlePatient(e){
|
|
284
|
|
- const resultValue = this.PatientArr.find(function(item, index, arr){
|
|
285
|
|
- return item.id === e
|
|
286
|
|
- })
|
|
287
|
|
- console.log(resultValue.inum)
|
|
288
|
|
- this.ruleForm.inum = resultValue.inum
|
|
|
176
|
+export default {
|
|
|
177
|
+ name: 'VisitList',
|
|
|
178
|
+ components: {
|
|
|
179
|
+ Pagination
|
|
|
180
|
+ },
|
|
|
181
|
+ props: {
|
|
|
182
|
+ callinNum: {
|
|
|
183
|
+ type: String,
|
|
|
184
|
+ default: ''
|
|
|
185
|
+ }
|
|
|
186
|
+ },
|
|
|
187
|
+
|
|
|
188
|
+ data() {
|
|
|
189
|
+ return {
|
|
|
190
|
+ hosarr: [], // 院区数据
|
|
|
191
|
+ deptarr: [], // 科室数据
|
|
|
192
|
+ doctorarr: [], // 医生数据
|
|
|
193
|
+ hytarr: [], // 号源数据
|
|
|
194
|
+ tableObj: {},
|
|
|
195
|
+ tableData: [], // 预约数据
|
|
|
196
|
+ patientData:{}, // 患者数据
|
|
|
197
|
+ // 搜索字段
|
|
|
198
|
+ searchData: {
|
|
|
199
|
+ searchTime: '',
|
|
|
200
|
+ hosid: '',
|
|
|
201
|
+ deptid: '',
|
|
|
202
|
+ deptname: '',
|
|
|
203
|
+ doctorid: '',
|
|
|
204
|
+ hyId: '',
|
|
|
205
|
+ hxId: '',
|
|
289
|
206
|
},
|
|
290
|
|
- handleReg(item) {
|
|
291
|
|
- this.drawer = true
|
|
292
|
|
- this.ruleForm.wid = item.wid
|
|
293
|
|
- this.ruleForm.price = item.price
|
|
294
|
|
- const params = {
|
|
295
|
|
- wid:item.wid
|
|
296
|
|
- }
|
|
297
|
|
- getinum(params).then((res) => {
|
|
298
|
|
- console.log(res)
|
|
299
|
|
- if (res.no.length > 0) {
|
|
300
|
|
- this.PatientArr = res.no
|
|
301
|
|
- }
|
|
302
|
|
- console.log(this.PatientArr)
|
|
303
|
|
- })
|
|
|
207
|
+ // 预约选中数据
|
|
|
208
|
+ tableItem: {},
|
|
|
209
|
+ // 添加工单
|
|
|
210
|
+ drawer: false,
|
|
|
211
|
+ direction: 'rtl',
|
|
|
212
|
+ ruleFormAge:false,
|
|
|
213
|
+ hyName:'',
|
|
|
214
|
+ ruleForm: {
|
|
|
215
|
+ patientName: '', // 患者姓名
|
|
|
216
|
+ identityCard: '', // 身份证号
|
|
|
217
|
+ sex: '', // 性别
|
|
|
218
|
+ birthday: '', // 出生日期
|
|
|
219
|
+ lxrxm: '', // 监护人姓名
|
|
|
220
|
+ lxrdh: '', // 监护人电话
|
|
|
221
|
+ lxrzjh: '', // 监护人证件号
|
|
|
222
|
+ tel: '', // 联系方式
|
|
|
223
|
+ pid:'',
|
|
|
224
|
+ // 隐藏表单数据
|
|
|
225
|
+ yyhx: '', // 预约号序
|
|
|
226
|
+ pbxh: '', // 排班序号
|
|
|
227
|
+ yydm: '' // 院区代码
|
|
304
|
228
|
},
|
|
305
|
|
- handleClose(done) {
|
|
306
|
|
- this.drawer = false
|
|
|
229
|
+
|
|
|
230
|
+ // 数据过滤
|
|
|
231
|
+ hxztObj: {
|
|
|
232
|
+ 0: '未使用',
|
|
|
233
|
+ 1: '已预约',
|
|
|
234
|
+ 2: '已确号'
|
|
307
|
235
|
},
|
|
308
|
|
- btn_search() {
|
|
309
|
|
- this.getList()
|
|
|
236
|
+ // 0 普通 1专家 2特需 3远程门诊 4 专病专家 5专病 6 整合门诊中医膏方门诊 8 普通医生门诊 9 线上门诊 10 敷贴门诊
|
|
|
237
|
+ rankidObj: {
|
|
|
238
|
+ 0: '普通',
|
|
|
239
|
+ 1: '专家',
|
|
|
240
|
+ 2: '特需',
|
|
|
241
|
+ 3: '远程门诊',
|
|
|
242
|
+ 4: '专病专家',
|
|
|
243
|
+ 5: '专病',
|
|
|
244
|
+ 6: '整合门诊中医膏方门诊',
|
|
|
245
|
+ 8: '普通医生门诊',
|
|
|
246
|
+ 9: '线上门诊',
|
|
|
247
|
+ 10: '敷贴门诊'
|
|
310
|
248
|
},
|
|
311
|
|
- handleDept(e){
|
|
312
|
|
- console.log(e)
|
|
313
|
|
- const params = {
|
|
314
|
|
- deptid:e
|
|
|
249
|
+
|
|
|
250
|
+ }
|
|
|
251
|
+ },
|
|
|
252
|
+ created() {
|
|
|
253
|
+ this.getHospital()
|
|
|
254
|
+ },
|
|
|
255
|
+ methods: {
|
|
|
256
|
+ submitForm() {
|
|
|
257
|
+ console.log(this.ruleForm)
|
|
|
258
|
+ const params = this.ruleForm
|
|
|
259
|
+ if(!this.ruleForm.patientName){
|
|
|
260
|
+ this.$message.error('请填入患者姓名')
|
|
|
261
|
+ return
|
|
|
262
|
+ }
|
|
|
263
|
+ if(!this.ruleForm.identityCard){
|
|
|
264
|
+ this.$message.error('请填入身份证号')
|
|
|
265
|
+ return
|
|
|
266
|
+ }
|
|
|
267
|
+ if(!this.ruleForm.tel){
|
|
|
268
|
+ this.$message.error('请填入电话')
|
|
|
269
|
+ return
|
|
|
270
|
+ }
|
|
|
271
|
+ if (this.ruleFormAge <= 12) {
|
|
|
272
|
+ if(!this.ruleForm.lxrxm){
|
|
|
273
|
+ this.$message.error('请填入监护人姓名')
|
|
|
274
|
+ return
|
|
315
|
275
|
}
|
|
316
|
|
- GetRegWid(params).then((res) => {
|
|
317
|
|
- this.widarr = []
|
|
318
|
|
- if (res.works.length>0) {
|
|
319
|
|
- // this.widarr = res.works
|
|
320
|
|
- this.tableData = res.works
|
|
321
|
|
- }
|
|
322
|
|
-
|
|
323
|
|
- })
|
|
324
|
|
- },
|
|
325
|
|
-
|
|
326
|
|
- handleHospital(e){
|
|
327
|
|
- console.log(e)
|
|
|
276
|
+ if(!this.ruleForm.lxrdh){
|
|
|
277
|
+ this.$message.error('请填入监护人电话')
|
|
|
278
|
+ return
|
|
|
279
|
+ }
|
|
|
280
|
+ if(!this.ruleForm.lxrzjh){
|
|
|
281
|
+ this.$message.error('请填入监护人证件号')
|
|
|
282
|
+ return
|
|
|
283
|
+ }
|
|
|
284
|
+ }
|
|
|
285
|
+ console.log(params)
|
|
|
286
|
+
|
|
|
287
|
+ GetYygh(params).then((res) => {
|
|
|
288
|
+ console.log(res)
|
|
|
289
|
+ this.drawer = false
|
|
|
290
|
+ this.handleHy(this.hyName)
|
|
|
291
|
+ this.$message.success('预约成功')
|
|
|
292
|
+ })
|
|
|
293
|
+ },
|
|
|
294
|
+ // 预约按钮点击
|
|
|
295
|
+ handleReg(item) {
|
|
|
296
|
+ this.drawer = true
|
|
|
297
|
+ this.tableItem = item
|
|
|
298
|
+ this.ruleForm.yyhx = item.ghhx // 预约号序
|
|
|
299
|
+ this.ruleForm.pbxh = item.pbxh // 排班序号
|
|
|
300
|
+ this.ruleForm.identityCard = decrypt(window.localStorage.getItem('huancardShow')) // 身份证号
|
|
|
301
|
+ this.ruleForm.identityCard = '411282202009122320'
|
|
|
302
|
+ if (this.ruleForm.identityCard) {
|
|
|
303
|
+ this.ruleForm.sex = this.parseIDCard(this.ruleForm.identityCard).gender
|
|
|
304
|
+ this.ruleFormAge = this.parseIDCard(this.ruleForm.identityCard).age
|
|
|
305
|
+ this.ruleForm.birthday = this.parseIDCard(this.ruleForm.identityCard).birthDate
|
|
|
306
|
+ }
|
|
|
307
|
+
|
|
|
308
|
+ this.ruleForm.patientName = window.localStorage.getItem('huanxm') // 患者姓名
|
|
|
309
|
+ // this.ruleForm.pid 患者id
|
|
|
310
|
+ this.ruleForm.tel = this.callinNum // 患者电话
|
|
|
311
|
+ this.ruleForm.yydm = item.yydm // 院区代码
|
|
|
312
|
+
|
|
|
313
|
+ this.getPatient()
|
|
|
314
|
+ // 患者部分
|
|
|
315
|
+ // this.ruleForm.pid = decrypt(window.localStorage.getItem('huancardShow')
|
|
|
316
|
+
|
|
|
317
|
+ },
|
|
|
318
|
+ // 预约弹框关闭
|
|
|
319
|
+ handleClose(done) {
|
|
|
320
|
+ this.drawer = false
|
|
|
321
|
+ },
|
|
|
322
|
+ handlePatient(value,key){
|
|
|
323
|
+ if (key === 'patientName') {
|
|
|
324
|
+ this.ruleForm.patientName = value
|
|
|
325
|
+ }
|
|
|
326
|
+ if (key === 'identityCard') {
|
|
|
327
|
+ this.ruleForm.identityCard = value
|
|
|
328
|
+ }
|
|
|
329
|
+ getPatient()
|
|
|
330
|
+ },
|
|
|
331
|
+ // 获取院区数据
|
|
|
332
|
+ getPatient() {
|
|
|
333
|
+ if (this.ruleForm.identityCard && this.ruleForm.patientName) {
|
|
328
|
334
|
const params = {
|
|
329
|
|
- preetype:6,
|
|
330
|
|
- hospitalcode:e
|
|
|
335
|
+ PatientName:this.ruleForm.patientName,
|
|
|
336
|
+ identityCard:this.ruleForm.identityCard,
|
|
|
337
|
+ yydm:this.ruleForm.yydm,
|
|
331
|
338
|
}
|
|
332
|
|
- GetRegDept(params).then((res) => {
|
|
333
|
|
- this.deptarr = []
|
|
334
|
|
- if (res.depts.length>0) {
|
|
335
|
|
- this.deptarr = res.depts
|
|
336
|
|
- }
|
|
337
|
|
-
|
|
338
|
|
- })
|
|
339
|
|
- },
|
|
340
|
|
- getHospital() {
|
|
341
|
|
- const params = {}
|
|
342
|
|
- GetRegHospital(params).then((res) => {
|
|
|
339
|
+ getZLId(params).then((res) => {
|
|
343
|
340
|
this.hosarr = []
|
|
344
|
|
- if (res.reportlist.length>0) {
|
|
345
|
|
- this.hosarr = res.reportlist
|
|
|
341
|
+ if (res.patinfos.length > 0) {
|
|
|
342
|
+
|
|
|
343
|
+ const resultData = res.patinfos[0]
|
|
|
344
|
+ this.ruleForm.pid = resultData.patid
|
|
|
345
|
+ this.ruleForm.identityCard = resultData.zjh
|
|
|
346
|
+ this.ruleForm.patientName = resultData.hzxm
|
|
|
347
|
+ if (this.ruleForm.identityCard) {
|
|
|
348
|
+ this.ruleForm.sex = this.parseIDCard(this.ruleForm.identityCard).gender
|
|
|
349
|
+ this.ruleFormAge = this.parseIDCard(this.ruleForm.identityCard).age
|
|
|
350
|
+ this.ruleForm.birthday = this.parseIDCard(this.ruleForm.identityCard).birthDate
|
|
|
351
|
+ }
|
|
|
352
|
+ if (this.ruleFormAge <= 12) {
|
|
|
353
|
+ this.ruleForm.lxrxm = resultData.lxrxm
|
|
|
354
|
+ this.ruleForm.lxrdh = resultData.lxrdh
|
|
|
355
|
+ this.ruleForm.lxrdh = resultData.lxrdh
|
|
|
356
|
+ }
|
|
|
357
|
+
|
|
|
358
|
+
|
|
346
|
359
|
}
|
|
347
|
360
|
})
|
|
348
|
361
|
}
|
|
|
362
|
+
|
|
|
363
|
+ },
|
|
|
364
|
+ // 获取院区数据
|
|
|
365
|
+ getHospital() {
|
|
|
366
|
+ const params = {}
|
|
|
367
|
+ GetRegHospital(params).then((res) => {
|
|
|
368
|
+ this.hosarr = []
|
|
|
369
|
+ if (res.data.length > 0) {
|
|
|
370
|
+ this.hosarr = res.data
|
|
|
371
|
+ }
|
|
|
372
|
+ })
|
|
|
373
|
+ },
|
|
|
374
|
+ // 获取部门数据,院区改变时触发
|
|
|
375
|
+ handleHospital(e) {
|
|
|
376
|
+ console.log(e)
|
|
|
377
|
+ this.tableObj.hosName = this.findNameById(e, this.hosarr, 'yymc', 'yydm')
|
|
|
378
|
+ this.tableObj.yydm = e
|
|
|
379
|
+ const params = {
|
|
|
380
|
+ ksrq: this.searchData.searchTime,
|
|
|
381
|
+ jsrq: this.searchData.searchTime,
|
|
|
382
|
+ yydm: e
|
|
|
383
|
+ }
|
|
|
384
|
+ GetRegDept(params).then((res) => {
|
|
|
385
|
+ this.deptarr = []
|
|
|
386
|
+ console.log(res)
|
|
|
387
|
+ if (res.length > 0) {
|
|
|
388
|
+ this.deptarr = res
|
|
|
389
|
+ }
|
|
|
390
|
+
|
|
|
391
|
+ })
|
|
|
392
|
+ },
|
|
|
393
|
+ // 获取医生数据,部门改变时触发
|
|
|
394
|
+ handleDept(e) {
|
|
|
395
|
+ console.log(e)
|
|
|
396
|
+ this.tableObj.deptName = this.findNameById(e, this.deptarr, 'yjksmc', 'yjksdm')
|
|
|
397
|
+ const params = {
|
|
|
398
|
+ ksdm: e,
|
|
|
399
|
+ ksrq: this.searchData.searchTime,
|
|
|
400
|
+ jsrq: this.searchData.searchTime,
|
|
|
401
|
+ yydm: this.searchData.hosid
|
|
|
402
|
+ }
|
|
|
403
|
+ GetRegWid(params).then((res) => {
|
|
|
404
|
+ if (res.length > 0) {
|
|
|
405
|
+ this.doctorarr = res
|
|
|
406
|
+ }
|
|
|
407
|
+ })
|
|
|
408
|
+ },
|
|
|
409
|
+ // 获取号源数据,医生改变时触发
|
|
|
410
|
+ handleDoctor(e) {
|
|
|
411
|
+ console.log(e)
|
|
|
412
|
+ const resultItem = this.findItemById(e, this.doctorarr, 'ysdm')
|
|
|
413
|
+ this.tableObj.doctorName = resultItem.ysmc
|
|
|
414
|
+ this.tableObj.yszc = resultItem.yszc
|
|
|
415
|
+ this.tableObj.czlx = this.rankidObj[resultItem.czlx]
|
|
|
416
|
+
|
|
|
417
|
+
|
|
|
418
|
+ const params = {
|
|
|
419
|
+ ysdm: e,
|
|
|
420
|
+ ksrq: this.searchData.searchTime,
|
|
|
421
|
+ jsrq: this.searchData.searchTime,
|
|
|
422
|
+ yydm: this.searchData.hosid
|
|
|
423
|
+ }
|
|
|
424
|
+ Gethy(params).then((res) => {
|
|
|
425
|
+ if (res.length > 0) {
|
|
|
426
|
+ this.hytarr = res
|
|
|
427
|
+ }
|
|
|
428
|
+ })
|
|
|
429
|
+ },
|
|
|
430
|
+ // 获取号序数据,号源改变时触发
|
|
|
431
|
+ handleHy(e) {
|
|
|
432
|
+ console.log(e)
|
|
|
433
|
+ const resultItem = this.findItemById(e, this.hytarr, 'pbxh')
|
|
|
434
|
+ this.hyName = e
|
|
|
435
|
+ this.tableObj.ghf = resultItem.ghf
|
|
|
436
|
+ this.tableObj.zzlxmc = resultItem.zzlxmc
|
|
|
437
|
+ this.tableObj.pbxh = resultItem.pbxh
|
|
|
438
|
+ // this.tableObj.doctorName = this.findItemById(e,this.doctorarr,'ysmc','ysdm')
|
|
|
439
|
+ const params = {
|
|
|
440
|
+ pbxh: e,
|
|
|
441
|
+ yydm: this.searchData.hosid
|
|
|
442
|
+ }
|
|
|
443
|
+ gethx(params).then((res) => {
|
|
|
444
|
+ this.tableData = []
|
|
|
445
|
+ if (res.length > 0) {
|
|
|
446
|
+ res.forEach(ele => {
|
|
|
447
|
+ const obj = this.tableObj
|
|
|
448
|
+ const newObj = {}
|
|
|
449
|
+ newObj.ghhx = ele.ghhx
|
|
|
450
|
+ newObj.memo = ele.memo
|
|
|
451
|
+ newObj.hxzt = this.hxztObj[ele.hxzt]
|
|
|
452
|
+ newObj.kssj = ele.kssj
|
|
|
453
|
+ newObj.jssj = ele.jssj
|
|
|
454
|
+ const resultObj = { ...this.tableObj, ...newObj }
|
|
|
455
|
+ this.tableData.push(resultObj)
|
|
|
456
|
+ });
|
|
|
457
|
+ console.log(this.tableData)
|
|
|
458
|
+
|
|
|
459
|
+ }
|
|
|
460
|
+ })
|
|
|
461
|
+ },
|
|
|
462
|
+ // 根据id筛选某一条数据
|
|
|
463
|
+ findItemById(id, arr, keyId) {
|
|
|
464
|
+ const item = arr.find(item => item[keyId] === id);
|
|
|
465
|
+ return item;
|
|
|
466
|
+ },
|
|
|
467
|
+ // 根据id筛选某一条数据的某一个值
|
|
|
468
|
+ findNameById(id, arr, keyName, keyId) {
|
|
|
469
|
+ const item = arr.find(item => item[keyId] === id);
|
|
|
470
|
+ return item ? item[keyName] : null;
|
|
|
471
|
+ },
|
|
|
472
|
+ parseIDCard(idCard) {
|
|
|
473
|
+ let birthDate;
|
|
|
474
|
+ let gender;
|
|
|
475
|
+ let age;
|
|
|
476
|
+
|
|
|
477
|
+ // 检查身份证号码的长度,判断是 15 位还是 18 位
|
|
|
478
|
+ if (idCard.length === 18) {
|
|
|
479
|
+ // 18 位身份证号码解析
|
|
|
480
|
+ // 提取出生年月日,格式为 YYYYMMDD
|
|
|
481
|
+ birthDate = `${idCard.slice(6, 10)}-${idCard.slice(10, 12)}-${idCard.slice(12, 14)}`;
|
|
|
482
|
+ // 提取第 17 位数字判断性别,奇数为男性,偶数为女性
|
|
|
483
|
+ const genderCode = parseInt(idCard[16], 10);
|
|
|
484
|
+ console.log(idCard)
|
|
|
485
|
+ console.log(idCard[16])
|
|
|
486
|
+ console.log(genderCode)
|
|
|
487
|
+ gender = genderCode % 2 === 1 ? '男' : '女';
|
|
|
488
|
+ } else if (idCard.length === 15) {
|
|
|
489
|
+ // 15 位身份证号码解析
|
|
|
490
|
+ // 15 位身份证号码年份只有后两位,需要补全为 19XX 年
|
|
|
491
|
+ birthDate = `19${idCard.slice(6, 8)}-${idCard.slice(8, 10)}-${idCard.slice(10, 12)}`;
|
|
|
492
|
+ // 提取第 15 位数字判断性别,奇数为男性,偶数为女性
|
|
|
493
|
+ const genderCode = parseInt(idCard[14], 10);
|
|
|
494
|
+ gender = genderCode % 2 === 1 ? '男' : '女';
|
|
|
495
|
+ } else {
|
|
|
496
|
+ this.$message.error('无效的身份证号码,长度必须为 15 位或 18 位')
|
|
|
497
|
+
|
|
|
498
|
+ }
|
|
|
499
|
+
|
|
|
500
|
+ // 根据出生日期计算年龄
|
|
|
501
|
+ const birth = new Date(birthDate);
|
|
|
502
|
+ const now = new Date();
|
|
|
503
|
+ age = now.getFullYear() - birth.getFullYear();
|
|
|
504
|
+ // 检查生日是否已过,如果未过则年龄减 1
|
|
|
505
|
+ if (
|
|
|
506
|
+ now.getMonth() < birth.getMonth() ||
|
|
|
507
|
+ (now.getMonth() === birth.getMonth() && now.getDate() < birth.getDate())
|
|
|
508
|
+ ) {
|
|
|
509
|
+ age--;
|
|
|
510
|
+ }
|
|
|
511
|
+
|
|
|
512
|
+ return {
|
|
|
513
|
+ birthDate,
|
|
|
514
|
+ gender,
|
|
|
515
|
+ age
|
|
|
516
|
+ };
|
|
349
|
517
|
}
|
|
|
518
|
+
|
|
350
|
519
|
}
|
|
|
520
|
+}
|
|
351
|
521
|
</script>
|
|
352
|
522
|
|
|
353
|
523
|
<style rel="stylesheet/scss" lang="scss">
|
|
354
|
|
- .regList {
|
|
355
|
|
- height: 590px;
|
|
356
|
|
- overflow-y: auto;
|
|
|
524
|
+.regList {
|
|
|
525
|
+ height: 590px;
|
|
|
526
|
+ overflow-y: auto;
|
|
357
|
527
|
|
|
358
|
|
- .regItem {
|
|
359
|
|
- border-top: 1px solid #DCDFE6;
|
|
360
|
|
- padding: 10px;
|
|
|
528
|
+ .regItem {
|
|
|
529
|
+ border-top: 1px solid #DCDFE6;
|
|
|
530
|
+ padding: 10px;
|
|
361
|
531
|
|
|
362
|
|
- .itemLine1 {
|
|
363
|
|
- display: flex;
|
|
|
532
|
+ .itemLine1 {
|
|
|
533
|
+ display: flex;
|
|
364
|
534
|
|
|
365
|
|
- line-height: 30px;
|
|
|
535
|
+ line-height: 30px;
|
|
366
|
536
|
|
|
367
|
|
- .lineSpan1 {
|
|
368
|
|
- font-size: 18px;
|
|
369
|
|
- }
|
|
|
537
|
+ .lineSpan1 {
|
|
|
538
|
+ font-size: 18px;
|
|
|
539
|
+ }
|
|
370
|
540
|
|
|
371
|
|
- .lineSpan2 {
|
|
372
|
|
- font-size: 16px;
|
|
373
|
|
- padding-left: 10px;
|
|
374
|
|
- }
|
|
|
541
|
+ .lineSpan2 {
|
|
|
542
|
+ font-size: 16px;
|
|
|
543
|
+ padding-left: 10px;
|
|
|
544
|
+ }
|
|
375
|
545
|
|
|
376
|
|
- .lineSpan3 {
|
|
377
|
|
- font-size: 12px;
|
|
378
|
|
- padding-left: 10px;
|
|
379
|
|
- }
|
|
|
546
|
+ .lineSpan3 {
|
|
|
547
|
+ font-size: 12px;
|
|
|
548
|
+ padding-left: 10px;
|
|
380
|
549
|
}
|
|
|
550
|
+ }
|
|
381
|
551
|
|
|
382
|
|
- .itemLine2 {
|
|
383
|
|
- display: flex;
|
|
384
|
|
- line-height: 30px;
|
|
385
|
|
- font-size: 14px;
|
|
|
552
|
+ .itemLine2 {
|
|
|
553
|
+ display: flex;
|
|
|
554
|
+ line-height: 30px;
|
|
|
555
|
+ font-size: 14px;
|
|
386
|
556
|
|
|
387
|
|
- .lineSpan1 {}
|
|
|
557
|
+ .lineSpan1 {}
|
|
388
|
558
|
|
|
389
|
|
- .lineSpan2 {
|
|
390
|
|
- padding-left: 10px;
|
|
391
|
|
- }
|
|
|
559
|
+ .lineSpan2 {
|
|
|
560
|
+ padding-left: 10px;
|
|
|
561
|
+ }
|
|
392
|
562
|
|
|
393
|
|
- .lineSpan3 {
|
|
394
|
|
- padding-left: 10px;
|
|
395
|
|
- }
|
|
|
563
|
+ .lineSpan3 {
|
|
|
564
|
+ padding-left: 10px;
|
|
|
565
|
+ }
|
|
396
|
566
|
|
|
397
|
|
- .lineSpan4 {
|
|
398
|
|
- padding-left: 10px;
|
|
|
567
|
+ .lineSpan4 {
|
|
|
568
|
+ padding-left: 10px;
|
|
399
|
569
|
|
|
400
|
|
- .btn {
|
|
401
|
|
- font-size: 12px;
|
|
402
|
|
- padding: 5px 10px;
|
|
403
|
|
- }
|
|
|
570
|
+ .btn {
|
|
|
571
|
+ font-size: 12px;
|
|
|
572
|
+ padding: 5px 10px;
|
|
404
|
573
|
}
|
|
405
|
574
|
}
|
|
406
|
575
|
}
|
|
407
|
576
|
}
|
|
|
577
|
+}
|
|
408
|
578
|
</style>
|