血透系统PC前端

PatientDetail.vue 51KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236
  1. <template>
  2. <div class="app-container ">
  3. <el-form ref="form" :rules="rules" :model="form" label-width="134px" class="clearfix" id="patient-info" >
  4. <div style="float:right;z-index:8;position: absolute;right: 30px;">
  5. <el-button size="small" type="primary" @click="printCard()" style="margin:0 6px 6px 0;z-index:1;">打印签到卡</el-button>
  6. <el-button size="small" :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" @click="$router.push('/patients/patient/'+patientID+'/edit')" style="margin:0 0 6px 0;z-index:1;">修改</el-button>
  7. <el-button size="small" type="primary" @click="printThisInfo()" style="margin:0 6px 6px 0;z-index:1;">打印</el-button>
  8. </div>
  9. <div class="dataTitle">一般资料</div>
  10. <el-row >
  11. <el-col :span="4" align="center">
  12. <img width="100%" height="100%" v-if="form.avatar" :src="form.avatar" class="avatar">
  13. <el-form-item prop="avatar">
  14. <el-input v-model="form.avatar" type="hidden" placeholder=""></el-input>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="20" >
  18. <el-row :gutter="10">
  19. <el-col :span="8">
  20. <el-form-item label="姓名 : " class="is-required" prop="name" >
  21. <el-input v-model="form.name" disabled></el-input>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="8" style="height:59px;">
  25. <el-form-item label="性别 : " class="is-required" prop="gender" >
  26. <el-radio-group v-model="form.gender">
  27. <el-radio v-for="item in sexOptions" :key="item.value" :label="item.value" :value="item.value" disabled>{{item.label}}</el-radio>
  28. </el-radio-group>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="8">
  32. <el-form-item label="身份证号 : " class="is-required" prop="idCardNo" >
  33. <el-input v-model="form.idCardNo" disabled></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="8">
  37. <el-form-item label="透析号 : " class="is-required">
  38. <el-input disabled v-model="form.dialysisNo" placeholder="填写或自动生成" style="width:110px;float:left;margin-right: 1%;" ></el-input>
  39. <el-button disabled type="primary">自动生成</el-button>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="8">
  43. <el-form-item label="出生日期 : " class="is-required" prop="birth" >
  44. <el-date-picker v-model="form.birth" type="date" disabled placeholder="选择日期" :suffix-icon="'el-icon-menu'" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="8">
  48. <el-form-item label="本人电话: " class="is-required" prop="phone">
  49. <el-input v-model="form.phone" maxlength="20" disabled></el-input>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="8">
  53. <el-form-item label="家属电话: " prop="homeTelephone">
  54. <el-input v-model="form.homeTelephone" maxlength="20" disabled></el-input>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="8" style="height:59px;">
  58. <el-form-item label="患者来源 : " class="is-required" prop="source" >
  59. <el-radio-group v-model="form.source">
  60. <el-radio v-for="item in sourceOptions" :key="item.value" :label="item.value" :value="item.value" disabled>{{item.label}}</el-radio>
  61. </el-radio-group>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8" style="height:59px;">
  65. <el-form-item label="治疗状态(转归) : " class="is-required" prop="lapseto" >
  66. <el-radio-group v-model="form.lapseto">
  67. <el-radio v-for="item in lapsetoOptions" :key="item.value" :label="item.value" :value="item.value" disabled>{{item.label}}</el-radio>
  68. </el-radio-group>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="8">
  72. <el-form-item label="民族 : " prop="nation">
  73. <el-input v-model="form.nation" maxlength="30" disabled></el-input>
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="8">
  77. <el-form-item label="籍贯 : " prop="native_place">
  78. <el-input v-model="form.native_place" maxlength="30" disabled></el-input>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="8">
  82. <el-form-item label="家庭住址 : " prop="homeAddress">
  83. <el-input v-model="form.homeAddress" disabled></el-input>
  84. </el-form-item>
  85. </el-col>
  86. <div v-show="!generic_info_fold">
  87. <el-col :span="8" >
  88. <el-form-item label="别名 : " prop="alias" >
  89. <el-input v-model="form.alias" disabled></el-input>
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="8">
  93. <el-form-item label="身高(cm) : " prop="height">
  94. <el-input maxlength="5" v-model="form.height" disabled ></el-input>
  95. </el-form-item>
  96. </el-col>
  97. <el-col :span="8">
  98. <el-form-item label="婚姻状况 : " prop="maritalStatus">
  99. <el-select v-model="form.maritalStatus" placeholder="请选择婚姻状况" disabled>
  100. <el-option v-for="item in maritalOptions" :key="item.id" :label="item.name" :value="item.id"/>
  101. </el-select>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="8">
  105. <el-form-item label="子女情况(个) : " prop="children">
  106. <el-input maxlength="5" v-model="form.children" disabled></el-input>
  107. </el-form-item>
  108. <!-- <el-form-item label=" " style="float:left;" label-width="30px" >
  109. </el-form-item> -->
  110. </el-col>
  111. <el-col :span="8">
  112. <el-form-item label="住院(门诊)号 : " prop="admissionNumber" >
  113. <el-input v-model="form.admissionNumber" disabled></el-input>
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="8">
  117. <el-form-item label="医保类型 : " prop="reimbursementWayID">
  118. <el-select v-model="form.reimbursementWayID" disabled >
  119. <el-option v-for="item in wayOptions" :key="item.id" :label="item.name" :value="item.id"/>
  120. </el-select>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="8">
  124. <el-form-item label="医保号 : " prop="healthCareNo">
  125. <el-input v-model="form.healthCareNo" disabled></el-input>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="8">
  129. <el-form-item label="教育程度 : " prop="educationOptions">
  130. <el-select v-model="form.education" disabled >
  131. <el-option v-for="item in educationOptions" :key="item.id" :label="item.name" :value="item.id"/>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="8" >
  136. <el-form-item label="亲友电话: " prop="relative_phone">
  137. <el-input v-model="form.relative_phone" maxlength="20" disabled></el-input>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="8" >
  141. <el-form-item label="亲友关系: " prop="relative_relations">
  142. <el-input v-model="form.relative_relations" maxlength="20" disabled></el-input>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="8">
  146. <el-form-item label="职业 : " prop="profession">
  147. <el-select v-model="form.profession" disabled >
  148. <el-option v-for="item in professionOptions" :key="item.id" :label="item.name" :value="item.id"/>
  149. </el-select>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="8">
  153. <el-form-item label="工作单位 : " prop="work">
  154. <el-input v-model="form.work" disabled></el-input>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="8" >
  158. <el-form-item label="单位地址 : " prop="unit_address">
  159. <el-input v-model="form.unit_address" disabled></el-input>
  160. </el-form-item>
  161. </el-col>
  162. </div>
  163. <el-col :span="8">
  164. <el-form-item>
  165. <el-button type="text" @click="generic_info_fold = !generic_info_fold">{{ generic_info_fold ? "更多资料" : "收起" }}<i class="el-icon--right" :class="generic_fold_icon"></i></el-button>
  166. </el-form-item>
  167. </el-col>
  168. </el-row>
  169. </el-col>
  170. </el-row>
  171. <div class="dataTitle">治疗信息</div>
  172. <el-row :gutter="10">
  173. <el-col :span="24">
  174. <el-form-item label="主诉 : " prop="patient_complains">
  175. <el-input type="textarea" :rows="3" v-model="form.patient_complains" resize="none" placeholder="" readonly></el-input>
  176. </el-form-item>
  177. </el-col>
  178. <el-col :span="24">
  179. <el-form-item label="现病史 : " prop="present_history">
  180. <el-input type="textarea" :rows="3" v-model="form.present_history" resize="none" placeholder="" readonly></el-input>
  181. </el-form-item>
  182. </el-col>
  183. <el-col :span="24">
  184. <el-form-item label="既往史 : " prop="past_history">
  185. <el-input type="textarea" :rows="3" v-model="form.past_history" resize="none" placeholder="" readonly></el-input>
  186. </el-form-item>
  187. </el-col>
  188. <el-col>
  189. <el-form-item label="体格检查">
  190. <el-input v-model="form.temperature" style="width: 200px;" disabled>
  191. <template slot="prepend">体温:</template>
  192. <template slot="append">℃</template>
  193. </el-input>
  194. <el-input v-model="form.pulse" style="width: 220px;" disabled>
  195. <template slot="prepend">脉搏: </template>
  196. <template slot="append">次/分</template>
  197. </el-input>
  198. <el-input v-model="form.respiratory" style="width: 220px;" disabled>
  199. <template slot="prepend">呼吸: </template>
  200. <template slot="append">次/分</template>
  201. </el-input>
  202. </el-form-item>
  203. </el-col>
  204. <el-col>
  205. <el-form-item>
  206. <el-input v-model="form.sbp" style="width: 240px;" disabled>
  207. <template slot="prepend">收缩压:</template>
  208. <template slot="append">mmHg</template>
  209. </el-input>
  210. <el-input v-model="form.dbp" style="width: 240px;" disabled>
  211. <template slot="prepend">舒张压:</template>
  212. <template slot="append">mmHg</template>
  213. </el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="24">
  217. <el-form-item label="" prop="remark">
  218. <!-- <textarea v-model="form.remark" class="textarea" disabled></textarea> -->
  219. <el-input type="textarea" :rows="3" v-model="form.remark" resize="none" placeholder="" readonly></el-input>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="24">
  223. <el-form-item label="传染病 : " prop="contagions">
  224. <el-checkbox-group v-model="form.contagions">
  225. <el-checkbox v-for="item in contagionList" v-if="item.type==2" :label="item.id" :key="item.id" :value="item.id" disabled>{{item.name}}</el-checkbox>
  226. </el-checkbox-group>
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="24">
  230. <el-form-item label="慢性病 : " prop="diseases">
  231. <el-checkbox-group v-model="form.diseases">
  232. <el-checkbox v-for="item in checkDisease" :label="item.id" :key="item.id" :value="item.id" disabled>{{item.name}}</el-checkbox>
  233. </el-checkbox-group>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="24">
  237. <el-form-item label="诊断 : " prop="diagnose">
  238. <!-- <textarea v-model="form.diagnose" class="textarea" disabled></textarea> -->
  239. <el-input type="textarea" :rows="3" v-model="form.diagnose" resize="none" placeholder="" readonly></el-input>
  240. </el-form-item>
  241. </el-col>
  242. </el-row>
  243. <div v-show="!treat_info_fold">
  244. <el-col :span="6" >
  245. <el-form-item label="本院首次透析 : " prop="is_hospital_first_dialysis" >
  246. <el-radio-group v-model="form.is_hospital_first_dialysis" >
  247. <el-radio v-for="item in isHospitalFirstDialysisOptions" :key="item.value" :label="item.value" :value="item.value" disabled>{{item.label}}</el-radio>
  248. </el-radio-group>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item label="首次透析日期 : " prop="firstDialysisDate">
  253. <el-date-picker v-model="form.firstDialysisDate" type="date" disabled format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
  254. </el-form-item>
  255. </el-col>
  256. <el-col :span="6" >
  257. <el-form-item label="首次透析医院 : " prop="first_dialysis_hospital">
  258. <el-input v-model="form.first_dialysis_hospital" disabled></el-input>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="24" >
  262. <el-form-item label="透析之前情况 : " prop="predialysis_condition">
  263. <el-checkbox-group v-model="form.predialysis_condition">
  264. <el-checkbox v-for="item in predialysisConditionOptions" :label="item.label" :key="item.value" :value="item.label" disabled>{{item.label}}</el-checkbox>
  265. </el-checkbox-group>
  266. </el-form-item>
  267. </el-col><el-col :span="6" >
  268. <el-form-item label="本院前透析频率 : " prop="pre_hospital_dialysis_frequency">
  269. <el-input v-model="form.pre_hospital_dialysis_frequency" disabled></el-input>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="6" >
  273. <el-form-item label="本院前透析次数 : " prop="pre_hospital_dialysis_times">
  274. <el-input v-model="form.pre_hospital_dialysis_times" disabled></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="6" >
  278. <el-form-item label="本院首次透析 : " prop="hospital_first_dialysis_date">
  279. <el-date-picker v-model="form.hospital_first_dialysis_date" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" disabled></el-date-picker>
  280. </el-form-item>
  281. </el-col>
  282. </div>
  283. <el-col :span="24">
  284. <el-form-item>
  285. <el-button type="text" @click="treat_info_fold = !treat_info_fold">{{ treat_info_fold ? "更多治疗信息" : "收起" }}<i class="el-icon--right" :class="treat_fold_icon"></i></el-button>
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="24">
  289. <el-form-item label="登记人员 : ">
  290. <span>{{form.registrars}} </span>
  291. </el-form-item>
  292. </el-col>
  293. </el-form>
  294. <div style="display:none;">
  295. <div id="print-info-box" >
  296. <div class="print_main_content">
  297. <div class="order_title">
  298. {{orgname}} 血液透析门诊病历
  299. </div>
  300. <div>
  301. <table>
  302. <thead>
  303. <!-- 用 thead 规定好宽度 -->
  304. <tr v-show="false">
  305. <td width="5%"></td>
  306. <td width="10%"></td>
  307. <td width="5%"></td>
  308. <td width="10%"></td>
  309. <td width="5%"></td>
  310. <td width="10%"></td>
  311. <td width="5%"></td>
  312. <td width="30%"></td>
  313. </tr>
  314. </thead>
  315. <tbody>
  316. <tr>
  317. <td valign="top"><div class="td_proj_title">姓名</div></td>
  318. <td valign="top"><div class="td_proj_content">{{ patientPrint.name }}</div></td>
  319. <td valign="top"><div class="td_proj_title">性别</div></td>
  320. <td valign="top"><div class="td_proj_content">{{ patientPrint.gender }}</div></td>
  321. <td valign="top"><div class="td_proj_title">年龄</div></td>
  322. <td valign="top"><div class="td_proj_content">{{ patientPrint.age }}岁</div></td>
  323. <td valign="top"><div class="td_proj_title">籍贯</div></td>
  324. <td valign="top"><div class="td_proj_content td_align_left">{{ patientPrint.native_place }}</div></td>
  325. </tr>
  326. <tr>
  327. <td valign="top"><div class="td_proj_title">职业</div></td>
  328. <td valign="top"><div class="td_proj_content">{{ patientPrint.profession }}</div></td>
  329. <td valign="top"><div class="td_proj_title">婚姻</div></td>
  330. <td valign="top"><div class="td_proj_content">{{ patientPrint.marital_status }}</div></td>
  331. <td valign="top"><div class="td_proj_title">透析号</div></td>
  332. <td valign="top"><div class="td_proj_content">{{ patientPrint.dialysis_no }}</div></td>
  333. <td valign="top"><div class="td_proj_title">身份证号</div></td>
  334. <td valign="top"><div class="td_proj_content td_align_left">{{ patientPrint.id_card_no }}</div></td>
  335. </tr>
  336. <tr>
  337. <td valign="top"><div class="td_proj_title">民族</div></td>
  338. <td valign="top"><div class="td_proj_content">{{ patientPrint.nation }}</div></td>
  339. <td valign="top"><div class="td_proj_title">电话</div></td>
  340. <td valign="top" colspan="3"><div class="td_proj_content td_align_left">{{ patientPrint.phone }}</div></td>
  341. <td valign="top"><div class="td_proj_title">备用电话</div></td>
  342. <td valign="top"><div class="td_proj_content td_align_left">{{ patientPrint.home_telephone }}</div></td>
  343. </tr>
  344. <tr>
  345. <td><div class="td_proj_title">地址</div></td>
  346. <td colspan="7"><div class="td_proj_content td_align_left">{{ patientPrint.home_address }}</div></td>
  347. </tr>
  348. <tr>
  349. <td><div class="td_proj_title">主诉</div></td>
  350. <td colspan="7"><div class="td_proj_content td_align_left" v-html="patientPrint.patient_complains"></div></td>
  351. </tr>
  352. <tr>
  353. <td><div class="td_proj_title">现<br/>病<br/>史</div></td>
  354. <td colspan="7"><div class="td_proj_content td_align_left" v-html="patientPrint.past_history"></div></td>
  355. </tr>
  356. <tr>
  357. <td><div class="td_proj_title">既<br/>往<br/>史</div></td>
  358. <td colspan="7"><div class="td_proj_content td_align_left" v-html="patientPrint.present_history"></div></td>
  359. </tr>
  360. <tr>
  361. <td colspan="8"><div class="td_proj_title">体格检查</div></td>
  362. </tr>
  363. <tr>
  364. <td colspan="8">
  365. <div class="td_proj_title">
  366. T {{ patientPrint.temperature }}℃&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  367. P {{ patientPrint.pulse }}次/分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  368. R {{ patientPrint.respiratory }}次/分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  369. BP {{ patientPrint.sbp }}/{{ patientPrint.dbp }} mmHg
  370. </div>
  371. </td>
  372. </tr>
  373. <tr>
  374. <td colspan="8">
  375. <div class="td_proj_content td_align_left" v-html="patientPrint.remark"></div>
  376. </td>
  377. </tr>
  378. <tr>
  379. <td><div class="td_proj_title">传<br/>染<br/>病</div></td>
  380. <td colspan="7"><div class="td_proj_content td_align_left">{{ patientPrint.contagions }}</div></td>
  381. </tr>
  382. <tr>
  383. <td><div class="td_proj_title">诊<br/>断</div></td>
  384. <td colspan="7"><div class="td_proj_content td_align_left" v-html="patientPrint.diagnose"></div></td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. <div class="print_footnote_panel">
  389. <div class="proj"><span class="proj_title">日期:</span>{{ print_time }}</div>
  390. <div class="proj"><span class="proj_title">医生签名:</span></div>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. </div>
  396. <div hidden="hidden">
  397. <div id="print-card-info">
  398. <div class="order_title" align="center" style="margin-bottom:20px;font-size:35px">
  399. 签到卡
  400. </div>
  401. <div align="center" style="margin-bottom:4px;font-size:25px">
  402. 姓名:<span>&nbsp;&nbsp;{{ patientPrint.name }}</span><br>
  403. </div>
  404. <div align="center" style="margin-bottom:20px;font-size:25px">
  405. 透析号:<span>&nbsp;&nbsp;{{ patientPrint.dialysis_no }}</span>
  406. </div>
  407. <div>
  408. <div id="qrcode" align="center"></div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </template>
  414. <script>
  415. import { getDataConfig } from '@/utils/data'
  416. import { getToken } from '@/api/qiniu'
  417. import {
  418. getFileExtension,
  419. isCardNo,
  420. jsGetAge,
  421. isPositiveInteger,
  422. dialysisAge,
  423. uParseTime
  424. } from '@/utils/tools'
  425. import {
  426. generateDialysisNo,
  427. createPatient,
  428. editPatient,
  429. fetchPatient
  430. } from '@/api/patient'
  431. import { fetchAllDoctorAndNurse, fetchAllAdminUsers } from '@/api/doctor'
  432. import { getZones } from '@/api/device/device'
  433. import print from 'print-js'
  434. import QRCode from 'qrcodejs2'
  435. import { Base64 } from 'js-base64'
  436. import { parse } from 'path'
  437. const defaultForm = {
  438. avatar: '',
  439. patientType: '',
  440. dialysisNo: '',
  441. admissionNumber: '',
  442. source: '',
  443. lapseto: '',
  444. partition: '',
  445. bed: '',
  446. name: '',
  447. gender: '',
  448. nation: '',
  449. native_place: '',
  450. maritalStatus: '',
  451. idCardNo: '',
  452. birth: '',
  453. age: '',
  454. reimbursementWayID: '',
  455. healthCareNo: '',
  456. healthCareDueDate: '',
  457. height: '',
  458. blood: '',
  459. rh: '',
  460. healthCareDueAlertDate: '',
  461. education: '',
  462. profession: '',
  463. phone: '',
  464. homeTelephone: '',
  465. homeAddress: '',
  466. work: '',
  467. receivingDate: '',
  468. firstDialysisDate: '',
  469. dialysisAge: '',
  470. induction: '',
  471. initial: '',
  472. dialysisTotal: '',
  473. contagions: [],
  474. doctor: '',
  475. nurse: '',
  476. assessment: '',
  477. diseases: [],
  478. diagnose: '',
  479. registrars: '',
  480. patient_complains: '',
  481. present_history: '',
  482. past_history: '',
  483. temperature: '',
  484. pulse: '',
  485. respiratory: '',
  486. sbp: '',
  487. dbp: ''
  488. }
  489. export default {
  490. name: 'patientDetail',
  491. components: { },
  492. data() {
  493. return {
  494. generic_info_fold: true,
  495. treat_info_fold: true,
  496. orgname: '',
  497. adminusername: '',
  498. form: Object.assign({}, defaultForm),
  499. formSubmit: true,
  500. submitMethod: '',
  501. uploadData: { token: '', key: '' },
  502. dialogImageUrl: '',
  503. qiniuDomain: 'https://images.shengws.com/',
  504. dialogVisible: false,
  505. typeOptions: null,
  506. styleOptions: null,
  507. sourceOptions: [{ value: 1, label: '门诊' }, { value: 2, label: '住院' }],
  508. lapsetoOptions: [{ value: 1, label: '留治' }, { value: 2, label: '转出' }],
  509. partitionOptions: [],
  510. sexOptions: [{ value: 1, label: '男' }, { value: 2, label: '女' }],
  511. isHospitalFirstDialysisOptions: [{ value: 1, label: '是' }, { value: 2, label: '否' }],
  512. predialysisConditionOptions: [{ value: 1, label: '腹膜透析' }, { value: 2, label: '肾移植' }],
  513. maritalOptions: null,
  514. wayOptions: null,
  515. educationOptions: null,
  516. professionOptions: null,
  517. inductionOptions: null,
  518. doctorOptions: null,
  519. nurseOptions: null,
  520. adminUserOptions: [],
  521. rhOptions: null,
  522. checkDisease: null,
  523. contagionList: null,
  524. loading: null,
  525. patientID: 0,
  526. patientPrint: {},
  527. print_time: '',
  528. rules: {
  529. avatar: [{ required: true, message: '请上传头像', trigger: 'blur' }],
  530. patientType: [
  531. { required: true, message: '请选择患者类型', trigger: 'blur' }
  532. ],
  533. dialysisNo: [
  534. { required: true, message: '请填写透析号', trigger: 'blur' }
  535. ],
  536. admissionNumber: [
  537. { required: true, message: '请填写住院(门诊)号', trigger: 'blur' }
  538. ],
  539. source: [
  540. { required: true, message: '请选择患者来源', trigger: 'blur' }
  541. ],
  542. lapseto: [
  543. { required: true, message: '请选择治疗状态', trigger: 'blur' }
  544. ],
  545. name: [{ required: true, message: '请填写姓名', trigger: 'blur' }],
  546. gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
  547. idCardNo: [
  548. { required: true, message: '请填写身份证号', trigger: 'blur' }
  549. ],
  550. birth: [{ required: true, message: '请填写生日', trigger: 'blur' }]
  551. }
  552. }
  553. },
  554. computed: {
  555. generic_fold_icon: function() {
  556. return this.generic_info_fold ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
  557. },
  558. treat_fold_icon: function() {
  559. return this.treat_info_fold ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
  560. }
  561. },
  562. created() {
  563. this.styleOptions = this.$store.getters.patient_types
  564. // this.partitionOptions = this.$store.getters.partitions;
  565. this.maritalOptions = getDataConfig('patient', 'marital_options')
  566. this.wayOptions = getDataConfig('patient', 'reimbursement_ways')
  567. this.typeOptions = this.$store.getters.blood_types
  568. this.rhOptions = this.$store.getters.rh
  569. this.educationOptions = getDataConfig('patient', 'education_types')
  570. this.professionOptions = getDataConfig('patient', 'profession_options')
  571. this.inductionOptions = this.$store.getters.induction_options
  572. this.contagionList = this.$store.getters.contagions
  573. this.checkDisease = this.$store.getters.disease
  574. var xtuser = this.$store.getters.xt_user
  575. this.orgname = xtuser.org.org_name
  576. this.adminusername = xtuser.user.user_name
  577. this.fetchAllAdminUsers()
  578. const id = this.$route.params && this.$route.params.id
  579. this.patientID = parseInt(id)
  580. if (isNaN(this.patientID) || this.patientID <= 0) {
  581. console.log('patient detail not had id')
  582. this.$notify.error({
  583. title: '错误',
  584. message: '无效的id'
  585. })
  586. this.$router.push('/patients/patients')
  587. }
  588. this.fetchPatient(id)
  589. this.getZones()
  590. var ptime = Math.round(new Date().getTime() / 1000)
  591. // this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
  592. },
  593. methods: {
  594. printThisInfo() {
  595. var ptime = Math.round(new Date().getTime() / 1000)
  596. this.print_time = uParseTime(ptime, '{y}年{m}月{d}日')
  597. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .print_main_content .order_title { text-align: center; font-size: 23px; line-height: 50px; font-weight: 500; } .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px; } .td_proj_title { font-size: 18px; line-height: 25px; font-weight: 500; } .td_proj_content { font-size: 18px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 17px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj .proj_title { font-weight: 500;} }'
  598. setTimeout(() => {
  599. printJS({
  600. printable: 'print-info-box',
  601. type: 'html',
  602. style: style,
  603. scanStyles: false
  604. })
  605. }, 1)
  606. },
  607. getZones() {
  608. getZones().then(response => {
  609. if (response.data.state === 1) {
  610. this.partitionOptions = response.data.data.zones
  611. }
  612. })
  613. },
  614. fetchPatient(id) {
  615. fetchPatient(id)
  616. .then(response => {
  617. console.log(response.data.data)
  618. if (response.data.state === 1) {
  619. this.$emit('tran-patient-info', response.data.data.patient)
  620. var patietInfo = response.data.data.patient
  621. this.form.avatar = patietInfo.avatar
  622. this.form.name = patietInfo.name
  623. this.form.alias = patietInfo.alias
  624. this.form.lapseto = patietInfo.lapseto
  625. this.form.idCardNo = patietInfo.id_card_no
  626. this.form.dialysisNo = patietInfo.dialysis_no
  627. this.form.gender = patietInfo.gender
  628. if (patietInfo.gender === 1 || patietInfo.gender === 2) {
  629. this.form.gender = patietInfo.gender
  630. }
  631. this.form.nation = patietInfo.nation
  632. this.form.native_place = patietInfo.native_place
  633. this.form.birth = uParseTime(patietInfo.birthday, '{y}-{m}-{d}')
  634. this.form.height = patietInfo.height + ''
  635. // this.form.age = jsGetAge(this.form.birth, "-");
  636. if (patietInfo.marital_status > 0) {
  637. this.form.maritalStatus = patietInfo.marital_status
  638. }
  639. this.form.children = patietInfo.children
  640. this.form.admissionNumber = patietInfo.admission_number
  641. if (patietInfo.reimbursement_way_id > 0) {
  642. this.form.reimbursementWayID = patietInfo.reimbursement_way_id
  643. }
  644. this.form.healthCareNo = patietInfo.health_care_no
  645. this.form.phone = patietInfo.phone
  646. this.form.homeTelephone = patietInfo.home_telephone
  647. this.form.relative_phone = patietInfo.relative_phone
  648. this.form.relative_relations = patietInfo.relative_relations
  649. this.form.homeAddress = patietInfo.home_address
  650. this.form.work = patietInfo.work_unit
  651. this.form.unit_address = patietInfo.unit_address
  652. if (patietInfo.profession > 0) {
  653. this.form.profession = patietInfo.profession
  654. }
  655. if (patietInfo.education_level > 0) {
  656. this.form.education = patietInfo.education_level
  657. }
  658. if (patietInfo.source === 1 || patietInfo.source === 2) {
  659. this.form.source = patietInfo.source
  660. }
  661. if (patietInfo.lapseto === 1 || patietInfo.lapseto === 2) {
  662. this.form.lapseto = patietInfo.lapseto
  663. }
  664. if (patietInfo.is_hospital_first_dialysis === 1 || patietInfo.is_hospital_first_dialysis === 2) {
  665. this.form.is_hospital_first_dialysis = patietInfo.is_hospital_first_dialysis
  666. }
  667. if (patietInfo.first_dialysis_date !== 0) {
  668. this.form.firstDialysisDate = uParseTime(
  669. patietInfo.first_dialysis_date,
  670. '{y}-{m}-{d}'
  671. )
  672. }
  673. this.form.first_dialysis_hospital = patietInfo.first_dialysis_hospital
  674. if (patietInfo.predialysis_condition.length > 0) {
  675. this.form.predialysis_condition = patietInfo.predialysis_condition.split(',')
  676. }
  677. this.form.pre_hospital_dialysis_frequency = patietInfo.pre_hospital_dialysis_frequency
  678. this.form.pre_hospital_dialysis_times = patietInfo.pre_hospital_dialysis_times
  679. if (patietInfo.hospital_first_dialysis_date !== 0) {
  680. this.form.hospital_first_dialysis_date = uParseTime(
  681. patietInfo.hospital_first_dialysis_date,
  682. '{y}-{m}-{d}'
  683. )
  684. }
  685. this.form.contagions = response.data.data.contagions
  686. this.form.diseases = response.data.data.diseases
  687. this.form.remark = patietInfo.remark
  688. this.form.diagnose = patietInfo.diagnose
  689. this.form.patient_complains = patietInfo.patient_complains
  690. this.form.present_history = patietInfo.present_history
  691. this.form.past_history = patietInfo.past_history
  692. this.form.temperature = patietInfo.temperature
  693. this.form.pulse = patietInfo.pulse
  694. this.form.respiratory = patietInfo.respiratory
  695. this.form.sbp = patietInfo.sbp
  696. this.form.dbp = patietInfo.dbp
  697. // this.form.initial = patietInfo.initial_dialysis + "";
  698. // this.form.dialysisTotal = patietInfo.total_dialysis + "";
  699. // this.form.assessment = patietInfo.evaluate;
  700. // if (patietInfo.patient_type > 0) {
  701. // this.form.patientType = patietInfo.patient_type;
  702. // }
  703. // if (patietInfo.partition_id > 0) {
  704. // this.form.partition = patietInfo.partition_id;
  705. // }
  706. // if (patietInfo.bed_id > 0) {
  707. // this.form.bed = patietInfo.bed_id;
  708. // }
  709. // this.form.healthCareDueDate = uParseTime(
  710. // patietInfo.health_care_due_date,
  711. // "{y}-{m}-{d}"
  712. // );
  713. // if (patietInfo.blood_type > 0) {
  714. // this.form.blood = patietInfo.blood_type;
  715. // }
  716. // if (patietInfo.rh > 0) {
  717. // this.form.rh = patietInfo.rh;
  718. // }
  719. // this.form.healthCareDueAlertDate = uParseTime(
  720. // patietInfo.health_care_due_alert_date,
  721. // "{y}-{m}-{d}"
  722. // );
  723. // this.form.receivingDate = uParseTime(
  724. // patietInfo.receiving_date,
  725. // "{y}-{m}-{d}"
  726. // );
  727. // this.form.dialysisAge = dialysisAge(
  728. // this.form.firstDialysisDate,
  729. // "-"
  730. // );
  731. // if (patietInfo.induction_period > 0) {
  732. // this.form.induction = patietInfo.induction_period;
  733. // }
  734. // if (patietInfo.attending_doctor_id > 0) {
  735. // this.form.doctor = patietInfo.attending_doctor_id;
  736. // }
  737. // if (patietInfo.head_nurse_id > 0) {
  738. // this.form.nurse = patietInfo.head_nurse_id;
  739. // }
  740. // if (patietInfo.registrars_id > 0) {
  741. // this.form.registrars = patietInfo.registrars_id;
  742. // }
  743. var contagionsArr = response.data.data.contagions
  744. var diseasesArr = response.data.data.diseases
  745. this.patientPrint = patietInfo
  746. var sourceLen = this.sourceOptions.length
  747. for (let index = 0; index < sourceLen; index++) {
  748. if (this.sourceOptions[index].value === patietInfo.source) {
  749. this.patientPrint.source = this.sourceOptions[index].label
  750. break
  751. }
  752. }
  753. var styleLen = this.styleOptions.length
  754. for (let index = 0; index < styleLen; index++) {
  755. if (this.styleOptions[index].id === patietInfo.patient_type) {
  756. this.patientPrint.patient_type = this.styleOptions[index].name
  757. break
  758. }
  759. }
  760. var partitionLen = this.partitionOptions.length
  761. for (let index = 0; index < partitionLen; index++) {
  762. if (this.partitionOptions[index].id === patietInfo.partition_id) {
  763. this.patientPrint.partition_id = this.partitionOptions[index].name
  764. break
  765. }
  766. }
  767. this.patientPrint.bed_id = patietInfo.bed_id > 0 ? patietInfo.bed_id : ''
  768. if (patietInfo.gender === 1) {
  769. this.patientPrint.gender = '男'
  770. } else if (patietInfo.gender === 2) {
  771. this.patientPrint.gender = '女'
  772. } else {
  773. this.patientPrint.gender = ''
  774. }
  775. var maritalLen = this.maritalOptions.length
  776. this.patientPrint.marital_status = ''
  777. for (let index = 0; index < maritalLen; index++) {
  778. if (this.maritalOptions[index].id === patietInfo.marital_status) {
  779. this.patientPrint.marital_status = this.maritalOptions[index].name
  780. break
  781. }
  782. }
  783. this.patientPrint.birthday = uParseTime(patietInfo.birthday, '{y}-{m}-{d}')
  784. this.patientPrint.age = jsGetAge(this.patientPrint.birthday, '-')
  785. this.patientPrint.patient_complains = patietInfo.patient_complains.replace(/\n/g, '<br/>')
  786. this.patientPrint.present_history = patietInfo.present_history.replace(/\n/g, '<br/>')
  787. this.patientPrint.past_history = patietInfo.past_history.replace(/\n/g, '<br/>')
  788. this.patientPrint.remark = patietInfo.remark.replace(/\n/g, '<br/>')
  789. this.patientPrint.diagnose = patietInfo.diagnose.replace(/\n/g, '<br/>')
  790. if (typeof patietInfo.temperature === 'number') {
  791. this.patientPrint.temperature = patietInfo.temperature.toFixed(1)
  792. }
  793. if (patietInfo.reimbursement_way_id > 0) {
  794. var wayLen = this.wayOptions.length
  795. for (let index = 0; index < wayLen; index++) {
  796. if (this.wayOptions[index].id === patietInfo.reimbursement_way_id) {
  797. this.patientPrint.reimbursement_way_id = this.wayOptions[index].name
  798. break
  799. }
  800. }
  801. } else {
  802. this.patientPrint.reimbursement_way_id = ''
  803. }
  804. if (patietInfo.health_care_due_date !== 0) {
  805. this.patientPrint.health_care_due_date = uParseTime(patietInfo.health_care_due_date, '{y}-{m}-{d}')
  806. } else {
  807. this.patientPrint.health_care_due_date = ''
  808. }
  809. if (patietInfo.blood_type > 0) {
  810. var typeLen = this.typeOptions.length
  811. for (let index = 0; index < typeLen; index++) {
  812. if (this.typeOptions[index].id === patietInfo.blood_type) {
  813. this.patientPrint.blood_type = this.typeOptions[index].name
  814. break
  815. }
  816. }
  817. } else {
  818. this.patientPrint.blood_type = ''
  819. }
  820. if (patietInfo.rh > 0) {
  821. var rhLen = this.rhOptions.length
  822. for (let index = 0; index < rhLen; index++) {
  823. if (this.rhOptions[index].id === patietInfo.rh) {
  824. this.patientPrint.rh = this.rhOptions[index].name
  825. break
  826. }
  827. }
  828. } else {
  829. this.patientPrint.rh = ''
  830. }
  831. if (patietInfo.health_care_due_alert_date !== 0) {
  832. this.patientPrint.health_care_due_alert_date = uParseTime(patietInfo.health_care_due_alert_date, '{y}-{m}-{d}')
  833. } else {
  834. this.patientPrint.health_care_due_alert_date = ''
  835. }
  836. if (patietInfo.education_level > 0) {
  837. var eLen = this.educationOptions.length
  838. for (let index = 0; index < eLen; index++) {
  839. if (this.educationOptions[index].id === patietInfo.education_level) {
  840. this.patientPrint.education_level = this.educationOptions[index].name
  841. break
  842. }
  843. }
  844. } else {
  845. this.patientPrint.education_level = ''
  846. }
  847. if (patietInfo.profession > 0) {
  848. var eLen = this.professionOptions.length
  849. for (let index = 0; index < eLen; index++) {
  850. if (this.professionOptions[index].id === patietInfo.profession) {
  851. this.patientPrint.profession = this.professionOptions[index].name
  852. break
  853. }
  854. }
  855. } else {
  856. this.patientPrint.profession = ''
  857. }
  858. if (patietInfo.receiving_date !== 0) {
  859. this.patientPrint.receiving_date = uParseTime(patietInfo.receiving_date, '{y}-{m}-{d}')
  860. } else {
  861. this.patientPrint.receiving_date = ''
  862. }
  863. if (patietInfo.first_dialysis_date !== 0) {
  864. this.patientPrint.first_dialysis_date = uParseTime(patietInfo.first_dialysis_date, '{y}-{m}-{d}')
  865. this.patientPrint.dialysis_age = dialysisAge(this.patientPrint.first_dialysis_date)
  866. } else {
  867. this.patientPrint.first_dialysis_date = ''
  868. this.patientPrint.dialysis_age = ''
  869. }
  870. if (patietInfo.induction_period > 0) {
  871. var eLen = this.inductionOptions.length
  872. for (let index = 0; index < eLen; index++) {
  873. if (this.inductionOptions[index].id === patietInfo.induction_period) {
  874. this.patientPrint.induction_period = this.inductionOptions[index].name
  875. break
  876. }
  877. }
  878. } else {
  879. this.patientPrint.induction_period = ''
  880. }
  881. if (patietInfo.attending_doctor_id > 0) {
  882. var eLen = this.adminUserOptions.length
  883. for (let index = 0; index < eLen; index++) {
  884. if (this.adminUserOptions[index].id === patietInfo.attending_doctor_id) {
  885. this.patientPrint.attending_doctor_id = this.adminUserOptions[index].name
  886. break
  887. }
  888. }
  889. } else {
  890. this.patientPrint.attending_doctor_id = ''
  891. }
  892. if (patietInfo.head_nurse_id > 0) {
  893. var eLen = this.adminUserOptions.length
  894. for (let index = 0; index < eLen; index++) {
  895. if (this.adminUserOptions[index].id === patietInfo.head_nurse_id) {
  896. this.patientPrint.head_nurse_id = this.adminUserOptions[index].name
  897. break
  898. }
  899. }
  900. } else {
  901. this.patientPrint.head_nurse_id = ''
  902. }
  903. if (contagionsArr.length > 0) {
  904. var contagionsIdArr = {}
  905. var alen = contagionsArr.length
  906. for (let index = 0; index < alen; index++) {
  907. contagionsIdArr[contagionsArr[index]] = 1
  908. }
  909. var printContagions = []
  910. var clen = this.contagionList.length
  911. for (let index = 0; index < clen; index++) {
  912. if (this.contagionList[index].id in contagionsIdArr) {
  913. printContagions.push(this.contagionList[index].name)
  914. }
  915. }
  916. this.patientPrint.contagions = printContagions.join('、')
  917. } else {
  918. this.patientPrint.contagions = ''
  919. }
  920. if (diseasesArr.length > 0) {
  921. var diseasesIdArr = {}
  922. var alen = diseasesArr.length
  923. for (let index = 0; index < alen; index++) {
  924. diseasesIdArr[diseasesArr[index]] = 1
  925. }
  926. var printDisease = []
  927. var clen = this.checkDisease.length
  928. for (let index = 0; index < clen; index++) {
  929. if (this.checkDisease[index].id in diseasesIdArr) {
  930. printDisease.push(this.checkDisease[index].name)
  931. }
  932. }
  933. this.patientPrint.diseases = printDisease.join('、')
  934. } else {
  935. this.patientPrint.diseases = ''
  936. }
  937. if (patietInfo.registrars_id > 0) {
  938. var eLen = this.adminUserOptions.length
  939. for (let index = 0; index < eLen; index++) {
  940. if (this.adminUserOptions[index].id === patietInfo.registrars_id) {
  941. this.patientPrint.registrars = this.adminUserOptions[index].name
  942. this.form.registrars = this.adminUserOptions[index].name
  943. break
  944. }
  945. }
  946. } else {
  947. this.patientPrint.registrars = ''
  948. }
  949. if (patietInfo.hospital_first_dialysis_date !== 0) {
  950. this.patientPrint.hospital_first_dialysis_date = uParseTime(patietInfo.hospital_first_dialysis_date, '{y}-{m}-{d}')
  951. } else {
  952. this.patientPrint.hospital_first_dialysis_date = ''
  953. }
  954. } else {
  955. console.log('patient get err state')
  956. this.$notify.error({
  957. title: '错误',
  958. message: '网络异常'
  959. })
  960. this.$router.push('/patients/patients')
  961. }
  962. // this.postForm = response.data
  963. // // Just for test
  964. // this.postForm.title += ` Article Id:${this.postForm.id}`
  965. // this.postForm.content_short += ` Article Id:${this.postForm.id}`
  966. }).catch(err => {
  967. console.log('patient get err', err)
  968. this.$notify.error({
  969. title: '错误',
  970. message: '网络异常'
  971. })
  972. this.$router.push('/patients/patients')
  973. })
  974. },
  975. fetchAllDoctorAndNurse() {
  976. fetchAllDoctorAndNurse().then(response => {
  977. if (response.data.state === 1) {
  978. this.doctorOptions = response.data.data.doctors
  979. this.nurseOptions = response.data.data.nursers
  980. }
  981. })
  982. },
  983. fetchAllAdminUsers() {
  984. fetchAllAdminUsers().then(response => {
  985. if (response.data.state === 1) {
  986. this.adminUserOptions = response.data.data.users
  987. }
  988. })
  989. },
  990. printCard() {
  991. var ptime = Math.round(new Date().getTime() / 1000)
  992. this.print_time = uParseTime(ptime, '{y}年{m}月{d}日')
  993. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .print_main_content .order_title { text-align: center; font-size: 23px; line-height: 50px; font-weight: 500; } .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px; } .td_proj_title { font-size: 18px; line-height: 25px; font-weight: 500; } .td_proj_content { font-size: 18px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 17px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj .proj_title { font-weight: 500;} }'
  994. setTimeout(() => {
  995. printJS({
  996. printable: 'print-card-info',
  997. type: 'html',
  998. style: style,
  999. scanStyles: false
  1000. })
  1001. }, 1)
  1002. var patientID = this.patientPrint.id
  1003. var name = this.patientPrint.name
  1004. var gender = this.patientPrint.gender
  1005. if (gender === 1) {
  1006. gender = '男'
  1007. }
  1008. if (gender === 2) {
  1009. gender = '女'
  1010. }
  1011. var idCardNo = this.patientPrint.id_card_no
  1012. var dialysisNo = this.patientPrint.dialysis_no
  1013. var phone = this.patientPrint.phone
  1014. var healthCareNo = this.patientPrint.health_care_no
  1015. // Base64加密
  1016. var epatientID = this.Base64.encode(patientID)
  1017. var ename = this.Base64.encode(name)
  1018. var egender = this.Base64.encode(gender)
  1019. var eidCardNo = this.Base64.encode(idCardNo)
  1020. var edialysisNo = this.Base64.encode(dialysisNo)
  1021. var ephone = this.Base64.encode(phone)
  1022. var eheathCareNo = this.Base64.encode(healthCareNo)
  1023. console.log('id号:' + epatientID, '姓名:' + ename, '性别:' + egender, '身份证:' + eidCardNo, '透析号:' + edialysisNo, '电话:' + ephone, '社保号:' + eheathCareNo)
  1024. // var params =new Object();
  1025. // params.id = this.patientPrint.id
  1026. // params.name = this.patientPrint.name;
  1027. this.$options.methods.qrcode(epatientID, ename, egender, eidCardNo, edialysisNo, ephone, eheathCareNo)// 调用生成二维码的方法
  1028. // this.$options.methods.qrcode(params)
  1029. },
  1030. qrcode(patientID, name, gender, idCardNo, dialysisNo, phone, healthCareNo) {
  1031. document.getElementById("qrcode").innerHTML = "";
  1032. new QRCode('qrcode', {
  1033. width: 200,
  1034. height: 200,
  1035. text: 'user_id:' + patientID + ',' + 'name:' + name + ',' + 'dialysis_no:' + dialysisNo + ',' + 'gender:' + gender + ',' + 'idcard_no:' + idCardNo + ',' + 'phone:' + phone + ',' + 'healthcare_no:' + healthCareNo
  1036. })
  1037. }
  1038. // qrcode(params){
  1039. // new QRCode('qrcode',{
  1040. // width:200,
  1041. // height:200,
  1042. // text:params,
  1043. // })
  1044. // }
  1045. }
  1046. }
  1047. </script>
  1048. <style rel="stylesheet/scss" lang="scss" scoped>
  1049. // .dataTitle {
  1050. // color: #409eff;
  1051. // font-size: 16px;
  1052. // border-bottom: 1px #409eff solid;
  1053. // height: 36px;
  1054. // line-height: 30px;
  1055. // margin: 0 0 15px 0;
  1056. // // position: relative;
  1057. // padding: 0 0 6px 15px;
  1058. // &::before {
  1059. // position: absolute;
  1060. // left: 0;
  1061. // bottom: 10px;
  1062. // content: "";
  1063. // width: 2px;
  1064. // height: 20px;
  1065. // background: #409eff;
  1066. // }
  1067. // }
  1068. .uploadHead {
  1069. margin-top: 25%;
  1070. }
  1071. .uploadHeadBtn {
  1072. width: 148px;
  1073. margin-top: 10px;
  1074. }
  1075. .el-form {
  1076. .el-col-6,
  1077. .el-col-8 {
  1078. width: 360px;
  1079. }
  1080. .el-form-item {
  1081. // margin-bottom: 17px !important;
  1082. .el-select {
  1083. width: 100%;
  1084. }
  1085. .el-date-editor.el-input {
  1086. width: 100%;
  1087. }
  1088. .textarea {
  1089. width: 100%;
  1090. height: 70px;
  1091. border-color: #dcdfe6;
  1092. padding: 5px;
  1093. }
  1094. }
  1095. }
  1096. // #print-info-box .info_print {
  1097. // width: 920px;
  1098. // margin: 0 auto !important;
  1099. // position: relative;
  1100. // top: 0;
  1101. // left: 0;
  1102. // padding: 20px 30px;
  1103. // }
  1104. // #print-info-box .box-title {
  1105. // text-align: center;
  1106. // font-weight: 600;
  1107. // font-size: 30px;
  1108. // line-height: 80px;
  1109. // margin-bottom: 20px;
  1110. // }
  1111. // #print-info-box .unit-title {
  1112. // text-align: center;
  1113. // line-height: 40px;
  1114. // font-size: 20px;
  1115. // font-weight: 400;
  1116. // padding-top: 10px;
  1117. // /* border: 1px solid #333; */
  1118. // }
  1119. // #print-info-box .unit-box {
  1120. // padding: 15px;
  1121. // }
  1122. // #print-info-box .unit-box-item {
  1123. // display: flex;
  1124. // align-items: center;
  1125. // justify-content: space-between;
  1126. // padding: 4px 1em;
  1127. // }
  1128. // #print-info-box .unit-box-item-col3 {
  1129. // width: 30%;
  1130. // display: flex;
  1131. // padding: 4px 0;
  1132. // }
  1133. // #print-info-box .unit-box-item-col4 {
  1134. // width: 23%;
  1135. // display: flex;
  1136. // padding: 4px 0;
  1137. // }
  1138. // #print-info-box .item-value {
  1139. // flex: 1;
  1140. // border-bottom: 1px solid #333;
  1141. // }
  1142. </style>
  1143. <style scoped>
  1144. /* 打印表格的样式 */
  1145. .print_main_content {
  1146. background-color: white;
  1147. width:960px;
  1148. margin:0 auto;
  1149. padding: 0 0 20px 0;
  1150. }
  1151. .print_main_content .order_title {
  1152. text-align: center;
  1153. font-size: 23px;
  1154. line-height: 50px;
  1155. font-weight: 500;
  1156. }
  1157. .print_main_content table {
  1158. width: 100%;
  1159. border: 1px solid;
  1160. border-collapse: collapse;
  1161. padding: 2px;
  1162. }
  1163. .print_main_content table tbody tr td {
  1164. border: 1px solid;
  1165. text-align: center;
  1166. /* font-size: 17px; */
  1167. padding: 10px 8px;
  1168. }
  1169. .td_proj_title {
  1170. font-size: 18px;
  1171. line-height: 25px;
  1172. font-weight: 500;
  1173. }
  1174. .td_proj_content {
  1175. font-size: 18px;
  1176. line-height: 25px;
  1177. }
  1178. .td_align_left {
  1179. text-align: left;
  1180. }
  1181. .print_footnote_panel {
  1182. font-size: 17px;
  1183. line-height: 40px;
  1184. }
  1185. .print_footnote_panel .proj {
  1186. display: inline-block;
  1187. width: 49%;
  1188. }
  1189. .print_footnote_panel .proj .proj_title {
  1190. font-weight: 500;
  1191. }
  1192. </style>