Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

PatientForm.vue 66KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972
  1. <template>
  2. <div class="main-contain">
  3. <el-dialog
  4. title="新增传染病检查"
  5. :visible.sync="dialogFormVisible"
  6. width="1000px"
  7. id="user-inspection-form"
  8. v-loading="formLoading"
  9. >
  10. <el-form :model="form" ref="form" label-position="top">
  11. <el-row>
  12. <el-col :span="1">&nbsp;</el-col>
  13. <template v-for="(item, index) in form.formItem">
  14. <el-col :span="7" :key="index">
  15. <el-form-item
  16. :label="item.item_name"
  17. v-if="item.range_type == 1"
  18. :key="item.item_id"
  19. :prop="'formItem.' + index + '.value'"
  20. >
  21. <el-input
  22. placeholder="请填入"
  23. v-model="item.value"
  24. style="width:95%"
  25. type="number"
  26. >
  27. <template slot="append">{{ item.unit }}</template>
  28. </el-input>
  29. </el-form-item>
  30. <el-form-item
  31. :label="item.item_name"
  32. v-else
  33. :key="item.item_id"
  34. :prop="'formItem.' + index + '.value'"
  35. >
  36. <el-select
  37. v-model="item.value"
  38. placeholder="请选择"
  39. style="width:95%"
  40. >
  41. <el-option
  42. v-for="(optionItem, oidex) in item.select_options"
  43. :key="oidex"
  44. :label="optionItem"
  45. :value="optionItem"
  46. ></el-option>
  47. </el-select>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="1" :key="'form-col' + index">&nbsp;</el-col>
  51. </template>
  52. </el-row>
  53. </el-form>
  54. <div slot="footer" class="dialog-footer">
  55. <el-button @click="dialogFormVisible = false">取 消</el-button>
  56. <el-button type="primary" @click="submitNew('form')">保 存</el-button>
  57. </div>
  58. </el-dialog>
  59. <div v-if="!isEdit" class="position">
  60. <bread-crumb :crumbs="crumbs"></bread-crumb>
  61. <div class style="float:right;color: white">
  62. <el-button
  63. :disabled="
  64. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  65. ? true
  66. : false
  67. "
  68. type="primary"
  69. v-if="this.isEdit == false"
  70. @click="resetForm('form')"
  71. icon="el-icon-circle-plus-outline"
  72. size="small"
  73. >新增</el-button
  74. >
  75. </div>
  76. </div>
  77. <div
  78. v-if="isEdit"
  79. class
  80. style="float:right;margin-right: 35px;margin-top: 10px"
  81. >
  82. <!-- <el-button @click="$router.back(-1)" icon="el-icon-refresh" size="small">取消</el-button>
  83. <el-button :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" type="primary" v-if="this.isEdit==false" @click="resetForm('form')" icon="el-icon-circle-plus-outline" size="small">新增</el-button>
  84. <el-button :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" @click="onSubmit('form')" size="small" type="success" icon="el-icon-setting" >保存</el-button>
  85. <el-button v-if="isEdit==false" @click="onReSubmit('form')" :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" icon="el-icon-document-add" size="small" type="warning" >保存并继续新增</el-button>-->
  86. </div>
  87. <div class="app-container" v-loading="pageLoad">
  88. <el-form
  89. ref="form"
  90. :rules="rules"
  91. :model="form"
  92. label-width="124px"
  93. class="clearfix"
  94. popper-append-to-body="false"
  95. >
  96. <div class="dataTitle">一般资料</div>
  97. <el-row>
  98. <el-col :span="20" class="form-table">
  99. <el-row :span="20">
  100. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  101. <el-form-item label="姓名 : " class="is-required" prop="name">
  102. <el-input v-model="form.name"></el-input>
  103. </el-form-item>
  104. </el-col>
  105. <el-col
  106. :span="8"
  107. :style="isEdit ? 'width:360px' : ''"
  108. style="height:59px;"
  109. >
  110. <el-form-item label="性别 : " class="is-required" prop="gender">
  111. <el-radio-group v-model="form.gender" @change="changeGender">
  112. <el-radio
  113. v-for="item in sexOptions"
  114. :key="item.value"
  115. :label="item.value"
  116. :value="item.value"
  117. >{{ item.label }}</el-radio
  118. >
  119. </el-radio-group>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  123. <el-form-item
  124. label="身份证号 : "
  125. class="is-required"
  126. prop="idCardNo"
  127. >
  128. <el-input
  129. v-model="form.idCardNo"
  130. @blur="checkIdCardNo"
  131. ></el-input>
  132. </el-form-item>
  133. </el-col>
  134. <el-col
  135. :span="8"
  136. :style="isEdit ? 'width:360px' : ''"
  137. style="height:59px;"
  138. >
  139. <el-form-item label="年龄 : " class="is-required" prop="age">
  140. <el-input
  141. v-model="form.age"
  142. placeholder="请填写年龄"
  143. ></el-input>
  144. </el-form-item>
  145. </el-col>
  146. <template v-if="isEdit">
  147. <!-- <el-col :span="8" :style="isEdit?'width:360px':''">
  148. <el-form-item label="患者类型 : " class="is-required" >
  149. <el-select v-model="form.patientType" placeholder="请选择患者类型" disabled >
  150. <el-option v-for="item in styleOptions" :key="item.id" :label="item.name" :value="item.id"/>
  151. </el-select>
  152. </el-form-item>
  153. </el-col>-->
  154. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  155. <el-form-item label="透析号 : " class="is-required">
  156. <el-input
  157. v-model="form.dialysisNo"
  158. placeholder="填写或自动生成"
  159. style="width:62%;float:left;margin-right: 2%;"
  160. ></el-input>
  161. <!-- <el-button style="width:36%;padding:10px 0;" disabled type="primary">自动生成</el-button> -->
  162. </el-form-item>
  163. </el-col>
  164. </template>
  165. <template v-else>
  166. <!-- <el-col :span="8" >
  167. <el-form-item label="患者类型 : " class="is-required" prop="patientType">
  168. <el-select v-model="form.patientType" placeholder="请选择患者类型" >
  169. <el-option v-for="item in styleOptions" :key="item.id" :label="item.name" :value="item.id"/>
  170. </el-select>
  171. </el-form-item>
  172. </el-col>-->
  173. <el-col :span="8">
  174. <el-form-item
  175. label="透析号 : "
  176. class="is-required"
  177. prop="dialysisNo"
  178. >
  179. <el-input
  180. v-model="form.dialysisNo"
  181. placeholder="填写或自动生成"
  182. style="width:62%;float:left;margin-right: 2%;"
  183. ></el-input>
  184. <el-button
  185. style="width:35%;padding:10px 0;"
  186. :disabled="
  187. $store.getters.xt_user.subscibe.state == 3 ||
  188. !subscibeFlag
  189. ? true
  190. : false
  191. "
  192. type="primary"
  193. @click="generatedialysisno"
  194. >自动生成</el-button
  195. >
  196. </el-form-item>
  197. </el-col>
  198. </template>
  199. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  200. <el-form-item
  201. label="出生日期 : "
  202. class="is-required"
  203. prop="birth"
  204. >
  205. <el-date-picker
  206. v-model="form.birth"
  207. type="date"
  208. placeholder="选择日期"
  209. :suffix-icon="'el-icon-menu'"
  210. @change="hadSelectBirth"
  211. format="yyyy-MM-dd"
  212. value-format="yyyy-MM-dd"
  213. ></el-date-picker>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="6" :style="isEdit ? 'width:380px' : ''">
  217. <el-form-item
  218. label="首次肾脏治疗时间:"
  219. prop="firstDialysisDate"
  220. label-width="150px"
  221. >
  222. <el-date-picker
  223. v-model="form.firstDialysisDate"
  224. type="date"
  225. format="yyyy-MM-dd"
  226. value-format="yyyy-MM-dd"
  227. ></el-date-picker>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  231. <el-form-item
  232. label="本人电话 : "
  233. class="is-required"
  234. prop="phone"
  235. >
  236. <el-input v-model="form.phone" maxlength="20"></el-input>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  240. <el-form-item label="家属姓名 : ">
  241. <el-input
  242. v-model="form.contact_name"
  243. maxlength="20"
  244. ></el-input>
  245. </el-form-item>
  246. </el-col>
  247. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  248. <el-form-item label="家属电话 : " prop="homeTelephone" class="is-required">
  249. <el-input
  250. v-model="form.homeTelephone"
  251. maxlength="20"
  252. ></el-input>
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  256. <el-form-item
  257. label="患者来源 : "
  258. class="is-required"
  259. prop="source"
  260. >
  261. <el-radio-group v-model="form.source">
  262. <el-radio
  263. v-for="item in sourceOptions"
  264. :key="item.value"
  265. :label="item.value"
  266. :value="item.value"
  267. >{{ item.label }}</el-radio
  268. >
  269. </el-radio-group>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="8" style="margin-bottom: 20px;">
  273. <el-form-item
  274. label="备注 : "
  275. prop="sch_remark">
  276. <el-input
  277. type="textarea"
  278. :rows="3"
  279. v-model="form.sch_remark"
  280. resize="none"
  281. placeholder
  282. ></el-input>
  283. </el-form-item>
  284. </el-col>
  285. <el-col :span="24" :style="isEdit ? 'width:360px' : ''" v-show="showLapseto">
  286. <el-form-item
  287. label="治疗状态(转归) : "
  288. class="is-required"
  289. prop="lapseto"
  290. >
  291. <el-radio-group v-model="form.lapseto">
  292. <el-radio
  293. v-for="item in lapsetoOptions"
  294. :key="item.value"
  295. :label="item.value"
  296. :value="item.value"
  297. >{{ item.label }}</el-radio
  298. >
  299. </el-radio-group>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="24">
  303. <el-form-item label="传染病 : " prop="contagions">
  304. <el-radio-group v-model="form.is_infectious" @change="changeInfectious">
  305. <el-radio :label="1">阴性</el-radio>
  306. <el-radio :label="2">阳性</el-radio>
  307. </el-radio-group>
  308. <el-checkbox-group
  309. v-model="form.contagions"
  310. v-if="form.is_infectious == '2'"
  311. >
  312. <el-checkbox
  313. v-for="item in contagionList"
  314. v-if="item.type == 2"
  315. :label="item.id"
  316. :key="item.id"
  317. name="contagions"
  318. :value="item.id"
  319. >{{ item.name }}</el-checkbox
  320. >
  321. </el-checkbox-group>
  322. </el-form-item>
  323. </el-col>
  324. <el-col :span="8">
  325. <el-form-item label="疑难内瘘 : " prop="contagions">
  326. <el-radio-group v-model="form.troble_shoot">
  327. <el-radio :label="1">是</el-radio>
  328. <el-radio :label="2">否</el-radio>
  329. </el-radio-group>
  330. </el-form-item>
  331. </el-col>
  332. <el-col :span="8">
  333. <el-form-item label="人员编码: ">
  334. <el-input
  335. v-model="form.zb_patient_id"
  336. ></el-input>
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="16" v-if="!isEdit">
  340. <el-form-item label="检查结果日期 : ">
  341. <!--<el-date-picker v-model="form.record_date" type="date" placeholder="选择日期" :suffix-icon="'el-icon-menu'"-->
  342. <!--format="yyyy-MM-dd"-->
  343. <!--style="width: 200px;"-->
  344. <!--disabled-->
  345. <!--value-format="yyyy-MM-dd" v-if="isEdit"></el-date-picker>-->
  346. <el-date-picker
  347. v-model="form.record_date"
  348. type="date"
  349. placeholder="选择日期"
  350. :suffix-icon="'el-icon-menu'"
  351. format="yyyy-MM-dd"
  352. style="width: 200px;"
  353. value-format="yyyy-MM-dd"
  354. v-if="!isEdit"
  355. ></el-date-picker>
  356. <el-button
  357. type="primary"
  358. @click="recordCheck()"
  359. v-if="!isEdit"
  360. >录入检验检查</el-button
  361. >
  362. <!--<el-button type="primary" v-if="isEdit">查看检验检查</el-button>-->
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="24">
  366. <el-form-item label="传染病周期提醒:">
  367. <el-radio-group
  368. v-model="form.remind_cycle"
  369. @change="changeCycle()"
  370. >
  371. <el-radio :label="1">一月一次</el-radio>
  372. <el-radio :label="2">两月一次</el-radio>
  373. <el-radio :label="3">三月一次</el-radio>
  374. <el-radio :label="4">半年一次</el-radio>
  375. <el-radio :label="5">一年一次</el-radio>
  376. </el-radio-group>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="24">
  380. <el-form-item label="诊断 : " prop="diagnose">
  381. <el-input
  382. type="textarea"
  383. :rows="3"
  384. v-model="form.diagnose"
  385. resize="none"
  386. placeholder
  387. ></el-input>
  388. </el-form-item>
  389. </el-col>
  390. <el-col :span="24">
  391. <el-form-item label="诊疗计划 : " prop="diagnose">
  392. <el-input
  393. type="textarea"
  394. :rows="3"
  395. v-model="form.treatment_plan"
  396. resize="none"
  397. placeholder
  398. ></el-input>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  402. <el-form-item label="民族 : " prop="nation">
  403. <el-input v-model="form.nation" maxlength="30"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  407. <el-form-item label="籍贯 : " prop="native_place">
  408. <el-input
  409. v-model="form.native_place"
  410. maxlength="30"
  411. ></el-input>
  412. </el-form-item>
  413. </el-col>
  414. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  415. <el-form-item label="家庭住址 : " prop="homeAddress" class="is-required">
  416. <el-input v-model="form.homeAddress"></el-input>
  417. </el-form-item>
  418. </el-col>
  419. <div v-show="!generic_info_fold">
  420. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  421. <el-form-item label="别名 : " prop="alias">
  422. <el-input v-model="form.alias"></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  426. <el-form-item label="身高(cm) : " prop="height">
  427. <el-input
  428. maxlength="5"
  429. v-model="form.height"
  430. @change="checkHeight"
  431. ></el-input>
  432. </el-form-item>
  433. </el-col>
  434. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  435. <el-form-item label="婚姻状况 : " prop="maritalStatus">
  436. <el-select
  437. v-model="form.maritalStatus"
  438. placeholder="请选择婚姻状况"
  439. >
  440. <el-option
  441. v-for="item in maritalOptions"
  442. :key="item.id"
  443. :label="item.name"
  444. :value="item.id"
  445. />
  446. </el-select>
  447. </el-form-item>
  448. </el-col>
  449. <el-col
  450. :span="8"
  451. style="clearfix"
  452. :style="isEdit ? 'width:360px' : ''"
  453. >
  454. <el-form-item label="子女情况(个) : " prop="children">
  455. <el-input maxlength="5" v-model="form.children"></el-input>
  456. </el-form-item>
  457. <!-- <el-form-item label=" " style="float:left;" label-width="30px">
  458. </el-form-item>-->
  459. </el-col>
  460. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  461. <el-form-item label="住院(门诊)号 : ">
  462. <el-input v-model="form.admissionNumber"></el-input>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  466. <el-form-item label="医保类型 : " prop="reimbursementWayID">
  467. <el-select v-model="form.reimbursementWayID">
  468. <el-option
  469. v-for="item in wayOptions"
  470. :key="item.id"
  471. :label="item.name"
  472. :value="item.id"
  473. />
  474. </el-select>
  475. </el-form-item>
  476. </el-col>
  477. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  478. <el-form-item label="医保号 : " prop="healthCareNo">
  479. <el-input v-model="form.healthCareNo"></el-input>
  480. </el-form-item>
  481. </el-col>
  482. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  483. <el-form-item label="教育程度 : " prop="educationOptions">
  484. <el-select v-model="form.education">
  485. <el-option
  486. v-for="item in educationOptions"
  487. :key="item.id"
  488. :label="item.name"
  489. :value="item.id"
  490. />
  491. </el-select>
  492. </el-form-item>
  493. </el-col>
  494. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  495. <el-form-item label="固定电话 : ">
  496. <el-input
  497. v-model="form.tell_phone"
  498. maxlength="20"
  499. ></el-input>
  500. </el-form-item>
  501. </el-col>
  502. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  503. <el-form-item label="费别 : ">
  504. <el-select v-model="form.expense_kind">
  505. <el-option
  506. v-for="item in expenseOptions"
  507. :key="item.id"
  508. :label="item.name"
  509. :value="item.id"
  510. />
  511. </el-select>
  512. </el-form-item>
  513. </el-col>
  514. <el-col
  515. :span="8"
  516. :style="isEdit ? 'width:360px' : ''"
  517. style="height:59px;"
  518. >
  519. <el-form-item label="透析龄(月): ">
  520. <el-input v-model="form.dialysis_age"></el-input>
  521. </el-form-item>
  522. </el-col>
  523. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  524. <el-form-item label="亲友电话 : " prop="relative_phone">
  525. <el-input
  526. v-model="form.relative_phone"
  527. maxlength="20"
  528. ></el-input>
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  532. <el-form-item label="亲友关系 : " prop="relative_relations">
  533. <el-input
  534. v-model="form.relative_relations"
  535. maxlength="20"
  536. ></el-input>
  537. </el-form-item>
  538. </el-col>
  539. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  540. <el-form-item label="职业 : " prop="profession">
  541. <el-select v-model="form.profession">
  542. <el-option
  543. v-for="item in professionOptions"
  544. :key="item.id"
  545. :label="item.name"
  546. :value="item.id"
  547. />
  548. </el-select>
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  552. <el-form-item label="工作单位 : " prop="work">
  553. <el-input v-model="form.work"></el-input>
  554. </el-form-item>
  555. </el-col>
  556. <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
  557. <el-form-item label="单位地址 : " prop="unit_address">
  558. <el-input v-model="form.unit_address"></el-input>
  559. </el-form-item>
  560. </el-col>
  561. </div>
  562. <el-col :span="24">
  563. <el-form-item>
  564. <el-button
  565. type="text"
  566. @click="generic_info_fold = !generic_info_fold"
  567. >
  568. {{ generic_info_fold ? "更多资料" : "收起" }}
  569. <i class="el-icon--right" :class="generic_fold_icon"></i>
  570. </el-button>
  571. </el-form-item>
  572. </el-col>
  573. </el-row>
  574. </el-col>
  575. <el-col :span="4" align="center">
  576. <el-upload
  577. style="width:100%;"
  578. :disabled="
  579. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  580. ? true
  581. : false
  582. "
  583. :data="uploadData"
  584. class="uploadHead"
  585. :multiple="false"
  586. action="https://upload.qiniup.com"
  587. :show-file-list="false"
  588. :on-error="handleAvatarError"
  589. :on-success="handleAvatarSuccess"
  590. list-type="picture-card"
  591. :before-upload="beforeAvatarUpload"
  592. >
  593. <img
  594. width="100%"
  595. height="100%"
  596. v-if="form.avatar"
  597. :src="form.avatar"
  598. class="avatar"
  599. />
  600. <i class="el-icon-plus" v-else></i>
  601. </el-upload>
  602. <el-dialog :visible.sync="dialogVisible">
  603. <img width="100%" :src="dialogImageUrl" alt />
  604. </el-dialog>
  605. <el-upload
  606. :disabled="
  607. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  608. ? true
  609. : false
  610. "
  611. :data="uploadData"
  612. :multiple="false"
  613. action="https://upload.qiniup.com"
  614. :show-file-list="false"
  615. :on-error="handleAvatarError"
  616. :on-success="handleAvatarSuccess"
  617. :before-upload="beforeAvatarUpload"
  618. >
  619. <el-button
  620. :disabled="
  621. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  622. ? true
  623. : false
  624. "
  625. class="uploadHeadBtn"
  626. type="primary"
  627. >上传头像</el-button
  628. >
  629. </el-upload>
  630. <el-form-item>
  631. <el-input
  632. v-model="form.avatar"
  633. type="hidden"
  634. placeholder
  635. ></el-input>
  636. </el-form-item>
  637. </el-col>
  638. </el-row>
  639. <div class="dataTitle">治疗信息</div>
  640. <div style="display: flex">
  641. <div style="flex: 1 1 9%;">
  642. <el-row :gutter="24">
  643. <el-col :span="24">
  644. <el-form-item label="主诉 : " prop="patient_complains">
  645. <el-input
  646. type="textarea"
  647. :rows="3"
  648. v-model="form.patient_complains"
  649. resize="none"
  650. placeholder=""
  651. ></el-input>
  652. </el-form-item>
  653. </el-col>
  654. </el-row>
  655. <el-row :gutter="24">
  656. <el-col :span="24">
  657. <el-form-item label="既往史 : " prop="past_history">
  658. <el-input
  659. type="textarea"
  660. :rows="3"
  661. v-model="form.past_history"
  662. resize="none"
  663. placeholder=""
  664. ></el-input>
  665. </el-form-item>
  666. </el-col>
  667. </el-row>
  668. <el-row :gutter="24">
  669. <el-col :span="24">
  670. <el-form-item label="体格检查">
  671. <el-input
  672. v-model="form.temperature"
  673. style="width: 200px"
  674. >
  675. <template slot="prepend">体温:</template>
  676. <template slot="append">℃</template>
  677. </el-input>
  678. <el-input v-model="form.pulse" style="width: 220px" >
  679. <template slot="prepend">脉搏: </template>
  680. <template slot="append">次/分</template>
  681. </el-input>
  682. <el-input
  683. v-model="form.respiratory"
  684. style="width: 220px"
  685. >
  686. <template slot="prepend">呼吸: </template>
  687. <template slot="append">次/分</template>
  688. </el-input>
  689. </el-form-item>
  690. </el-col>
  691. </el-row>
  692. <el-row :gutter="24">
  693. <el-col>
  694. <el-form-item>
  695. <el-input v-model="form.sbp" style="width: 240px" >
  696. <template slot="prepend">收缩压:</template>
  697. <template slot="append">mmHg</template>
  698. </el-input>
  699. <el-input v-model="form.dbp" style="width: 240px" >
  700. <template slot="prepend">舒张压:</template>
  701. <template slot="append">mmHg</template>
  702. </el-input>
  703. </el-form-item>
  704. </el-col>
  705. </el-row>
  706. </div>
  707. <div style="flex: 1;" class="now_his">
  708. <el-row :gutter="24" style="height:100%;">
  709. <el-col :span="24" style="height:100%;">
  710. <el-form-item label="现病史 : " prop="present_history" style="height:100%;">
  711. <el-input
  712. style="height:100%;"
  713. type="textarea"
  714. :rows="3"
  715. v-model="form.present_history"
  716. resize="none"
  717. placeholder=""
  718. ></el-input>
  719. </el-form-item>
  720. </el-col>
  721. </el-row>
  722. </div>
  723. </div>
  724. <el-row :span="24">
  725. <el-col>
  726. </el-col>
  727. <el-col></el-col>
  728. <el-col :span="24">
  729. <el-form-item label prop="remark">
  730. <el-input
  731. type="textarea"
  732. :rows="3"
  733. v-model="form.remark"
  734. resize="none"
  735. placeholder
  736. ></el-input>
  737. </el-form-item>
  738. </el-col>
  739. <!--<el-col :span="24">-->
  740. <!--<el-form-item label="传染病 : " prop="checkContagions">-->
  741. <!--<el-checkbox-group v-model="form.contagions">-->
  742. <!--<el-checkbox v-for="item in contagionList" v-if="item.type==2" :label="item.id" :key="item.id"-->
  743. <!--:value="item.id">{{item.name}}-->
  744. <!--</el-checkbox>-->
  745. <!--</el-checkbox-group>-->
  746. <!--</el-form-item>-->
  747. <!--</el-col>-->
  748. <el-col :span="24">
  749. <el-form-item label="慢性病 : " prop="diseases">
  750. <el-checkbox-group v-model="form.diseases">
  751. <el-checkbox
  752. v-for="item in checkDisease"
  753. :label="item.id"
  754. :key="item.id"
  755. :value="item.id"
  756. >{{ item.name }}</el-checkbox
  757. >
  758. </el-checkbox-group>
  759. </el-form-item>
  760. </el-col>
  761. <div v-show="!treat_info_fold">
  762. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  763. <el-form-item
  764. label="本院首次透析 : "
  765. prop="is_hospital_first_dialysis"
  766. >
  767. <el-radio-group v-model="form.is_hospital_first_dialysis">
  768. <el-radio
  769. v-for="item in isHospitalFirstDialysisOptions"
  770. :key="item.value"
  771. :label="item.value"
  772. :value="item.value"
  773. >{{ item.label }}</el-radio
  774. >
  775. </el-radio-group>
  776. </el-form-item>
  777. </el-col>
  778. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  779. <el-form-item
  780. label="系统前透析次数 : "
  781. prop="user_sys_before_count"
  782. >
  783. <el-input v-model="form.user_sys_before_count"></el-input>
  784. </el-form-item>
  785. </el-col>
  786. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  787. <el-form-item label="首次透析时间 : ">
  788. <el-date-picker
  789. v-model="form.first_treatment_date"
  790. type="date"
  791. format="yyyy-MM-dd"
  792. value-format="yyyy-MM-dd"
  793. ></el-date-picker>
  794. </el-form-item>
  795. </el-col>
  796. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  797. <el-form-item
  798. label="首次透析医院 : "
  799. prop="first_dialysis_hospital"
  800. >
  801. <el-input v-model="form.first_dialysis_hospital"></el-input>
  802. </el-form-item>
  803. </el-col>
  804. <el-col :span="24">
  805. <el-form-item
  806. label="透析之前情况 : "
  807. prop="predialysis_condition"
  808. >
  809. <el-checkbox-group v-model="form.predialysis_condition">
  810. <el-checkbox
  811. v-for="item in predialysisConditionOptions"
  812. :label="item.label"
  813. :key="item.value"
  814. :value="item.label"
  815. >{{ item.label }}</el-checkbox
  816. >
  817. </el-checkbox-group>
  818. </el-form-item>
  819. </el-col>
  820. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  821. <el-form-item
  822. label="本院前透析频率 : "
  823. prop="pre_hospital_dialysis_frequency"
  824. >
  825. <el-input
  826. v-model="form.pre_hospital_dialysis_frequency"
  827. ></el-input>
  828. </el-form-item>
  829. </el-col>
  830. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  831. <el-form-item
  832. label="本院前透析次数 : "
  833. prop="pre_hospital_dialysis_times"
  834. >
  835. <el-input v-model="form.pre_hospital_dialysis_times"></el-input>
  836. </el-form-item>
  837. </el-col>
  838. <el-col :span="6" :style="isEdit ? 'width:360px' : ''">
  839. <el-form-item
  840. label="本院首次透析 : "
  841. prop="hospital_first_dialysis_date"
  842. >
  843. <el-date-picker
  844. v-model="form.hospital_first_dialysis_date"
  845. type="date"
  846. format="yyyy-MM-dd"
  847. value-format="yyyy-MM-dd"
  848. ></el-date-picker>
  849. </el-form-item>
  850. </el-col>
  851. </div>
  852. <el-col :span="24">
  853. <el-form-item>
  854. <el-button
  855. type="text"
  856. @click="treat_info_fold = !treat_info_fold"
  857. >
  858. {{ treat_info_fold ? "更多治疗信息" : "收起" }}
  859. <i class="el-icon--right" :class="treat_fold_icon"></i>
  860. </el-button>
  861. </el-form-item>
  862. </el-col>
  863. <el-col :span="24">
  864. <el-form-item label="登记人员 : ">
  865. <span>{{ adminusername }}</span>
  866. </el-form-item>
  867. </el-col>
  868. <el-col :span="6">
  869. <el-form-item label="医生 : ">
  870. <el-select v-model="form.doctor">
  871. <el-option
  872. v-for="(item,index) in adminUserOptions"
  873. :key="index"
  874. :label="item.name"
  875. :value="item.id"
  876. />
  877. </el-select>
  878. </el-form-item>
  879. </el-col>
  880. <el-col :span="24" align="right" class="newCol">
  881. <el-form-item>
  882. <el-button
  883. @click="$router.back(-1)"
  884. icon="el-icon-refresh"
  885. size="small"
  886. >取消</el-button
  887. >
  888. <el-button
  889. :disabled="
  890. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  891. ? true
  892. : false
  893. "
  894. @click="onSubmit('form')"
  895. size="small"
  896. type="primary"
  897. icon="el-icon-setting"
  898. >保存</el-button
  899. >
  900. <el-button
  901. v-if="isEdit == false"
  902. @click="onReSubmit('form')"
  903. :disabled="
  904. $store.getters.xt_user.subscibe.state == 3 || !subscibeFlag
  905. ? true
  906. : false
  907. "
  908. icon="el-icon-document-add"
  909. size="small"
  910. type="success"
  911. >保存并继续新增</el-button
  912. >
  913. </el-form-item>
  914. </el-col>
  915. </el-row>
  916. </el-form>
  917. </div>
  918. </div>
  919. </template>
  920. <script>
  921. import { getToken } from "@/api/qiniu";
  922. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  923. import {
  924. dialysisAge,
  925. getFileExtension,
  926. isCardNo,
  927. isPositiveInteger,
  928. jsGetAge,
  929. uParseTime
  930. } from "@/utils/tools";
  931. import {
  932. createPatient,
  933. editPatient,
  934. fetchPatient,
  935. generateDialysisNo,
  936. GetPatientTotal
  937. } from "@/api/patient";
  938. import { fetchAllAdminUsers } from "@/api/doctor";
  939. // import { fetchAllDoctorAndNurse } from "@/api/doctor";
  940. import { getDataConfig } from "@/utils/data";
  941. const defaultForm = {
  942. avatar: "https://images.shengws.com/201809182128111.png",
  943. name: "",
  944. alias: "",
  945. idCardNo: "",
  946. dialysisNo: "",
  947. gender: "",
  948. birth: "",
  949. nation: "",
  950. native_place: "",
  951. height: "",
  952. maritalStatus: "",
  953. children: "",
  954. admissionNumber: "",
  955. reimbursementWayID: "",
  956. healthCareNo: "",
  957. phone: "",
  958. homeTelephone: "",
  959. relative_phone: "",
  960. relative_relations: "",
  961. lapseto: "",
  962. homeAddress: "",
  963. work: "",
  964. unit_address: "",
  965. profession: "",
  966. education: "",
  967. source: "",
  968. is_hospital_first_dialysis: "",
  969. firstDialysisDate: "",
  970. first_dialysis_hospital: "",
  971. predialysis_condition: [],
  972. pre_hospital_dialysis_frequency: "",
  973. pre_hospital_dialysis_times: "",
  974. hospital_first_dialysis_date: "",
  975. contagions: [],
  976. diseases: [],
  977. remark: "",
  978. sch_remark:"",
  979. diagnose: "",
  980. is_infectious: 1,
  981. age: "",
  982. response_result: "",
  983. remind_cycle: 0,
  984. record_date: "",
  985. tell_phone: "",
  986. first_treatment_date: "",
  987. dialysis_age: "",
  988. expense_kind: "",
  989. contact_name: "",
  990. user_sys_before_count: "",
  991. troble_shoot:2,
  992. zb_patient_id:"",
  993. doctor:"",
  994. formItem: [
  995. {
  996. id: 0,
  997. item: "",
  998. item_id: 60,
  999. item_name: "丙型肝炎病毒核心抗体(AntiHCV)",
  1000. project_id: 14,
  1001. project_name: "传染病检查",
  1002. range_type: 2,
  1003. select_options: ["阴性", "阳性", "弱阳性"],
  1004. unit: "",
  1005. value: ""
  1006. },
  1007. {
  1008. id: 0,
  1009. item: "",
  1010. item_id: 62,
  1011. item_name: "乙型肝炎病毒表面抗原(HBsAg)",
  1012. project_id: 14,
  1013. project_name: "传染病检查",
  1014. range_type: 2,
  1015. select_options: ["阴性", "阳性", "弱阳性"],
  1016. unit: "",
  1017. value: ""
  1018. },
  1019. {
  1020. id: 0,
  1021. item: "",
  1022. item_id: 63,
  1023. item_name: "乙型肝炎病毒表面抗体(AntiHBs)",
  1024. project_id: 14,
  1025. project_name: "传染病检查",
  1026. range_type: 2,
  1027. select_options: ["阴性", "阳性", "弱阳性"],
  1028. unit: "",
  1029. value: ""
  1030. },
  1031. {
  1032. id: 0,
  1033. item: "",
  1034. item_id: 64,
  1035. item_name: "乙型肝炎病毒E抗原(HBeAg)",
  1036. project_id: 14,
  1037. project_name: "传染病检查",
  1038. range_type: 2,
  1039. select_options: ["阴性", "阳性", "弱阳性"],
  1040. unit: "",
  1041. value: ""
  1042. },
  1043. {
  1044. id: 0,
  1045. item: "",
  1046. item_id: 65,
  1047. item_name: "乙型肝炎病毒E抗体(AntiHBe)",
  1048. project_id: 14,
  1049. project_name: "传染病检查",
  1050. range_type: 2,
  1051. select_options: ["阴性", "阳性", "弱阳性"],
  1052. unit: "",
  1053. value: ""
  1054. },
  1055. {
  1056. id: 0,
  1057. item: "",
  1058. item_id: 66,
  1059. item_name: "乙型肝炎病毒核心抗体(AntiHBc)",
  1060. project_id: 14,
  1061. project_name: "传染病检查",
  1062. range_type: 2,
  1063. select_options: ["阴性", "阳性", "弱阳性"],
  1064. unit: "",
  1065. value: ""
  1066. },
  1067. {
  1068. id: 0,
  1069. item: "",
  1070. item_id: 111,
  1071. item_name: "HIV抗体",
  1072. project_id: 14,
  1073. project_name: "传染病检查",
  1074. range_type: 2,
  1075. select_options: ["阴性", "阳性", "弱阳性"],
  1076. unit: "",
  1077. value: ""
  1078. },
  1079. {
  1080. id: 0,
  1081. item: "",
  1082. item_id: 112,
  1083. item_name: "梅毒",
  1084. project_id: 14,
  1085. project_name: "传染病检查",
  1086. range_type: 2,
  1087. select_options: ["阴性", "阳性", "弱阳性"],
  1088. unit: "",
  1089. value: ""
  1090. },
  1091. {
  1092. id: 0,
  1093. item: "",
  1094. item_id: 178,
  1095. item_name: "乙型病毒DNA测定(HBVDNH)",
  1096. project_id: 14,
  1097. project_name: "传染病检查",
  1098. range_type: 1,
  1099. select_options: 0,
  1100. unit: "",
  1101. value: ""
  1102. },
  1103. {
  1104. id: 0,
  1105. item: "",
  1106. item_id: 179,
  1107. item_name: "丙型病毒DNA测定(HCVDNH",
  1108. project_id: 14,
  1109. project_name: "传染病检查",
  1110. range_type: 1,
  1111. select_options: 0,
  1112. unit: "",
  1113. value: ""
  1114. }
  1115. ],
  1116. // patientType: "",
  1117. // partition: "",
  1118. // bed: "",
  1119. // age: "",
  1120. // healthCareDueDate: "",
  1121. // blood: "",
  1122. // rh: "",
  1123. // healthCareDueAlertDate: "",
  1124. // receivingDate: "",
  1125. // dialysisAge: "",
  1126. // induction: "",
  1127. // initial: "",
  1128. // dialysisTotal: "",
  1129. // doctor: "",
  1130. // nurse: "",
  1131. // assessment: "",
  1132. patient_complains: "",
  1133. present_history: "",
  1134. past_history: "",
  1135. temperature: "",
  1136. pulse: "",
  1137. respiratory: "",
  1138. sbp: "",
  1139. dbp: "",
  1140. showOne:true,
  1141. treatment_plan:"",
  1142. };
  1143. export default {
  1144. name: "patientForm",
  1145. props: {
  1146. isEdit: {
  1147. type: Boolean,
  1148. default: false
  1149. }
  1150. },
  1151. data() {
  1152. var checkContagions = (rule, value, callback) => {
  1153. if (this.form.is_infectious == 0) {
  1154. return callback(new Error("至少选择一项传染病"));
  1155. }
  1156. if (this.form.is_infectious == "2" && value.length == 0) {
  1157. return callback(new Error("至少选择一项传染病"));
  1158. }
  1159. callback();
  1160. };
  1161. var checkPhone = (rule, value, callback) => {
  1162. if (value.length == 0) {
  1163. return callback(new Error("本人电话不能为空"));
  1164. }
  1165. if (
  1166. !value.match(
  1167. /^1\d{10}$/
  1168. )
  1169. ) {
  1170. return callback(new Error("请填写正确的电话(手机号码)"));
  1171. }
  1172. callback();
  1173. };
  1174. var checkFamilyPhone = (rule, value, callback) => {
  1175. if (value.length == 0) {
  1176. return callback(new Error("家属电话不能为空"));
  1177. }
  1178. if (
  1179. !value.match(
  1180. /^1\d{10}$/
  1181. )
  1182. ) {
  1183. return callback(new Error("请填写正确的电话(手机号码)"));
  1184. }
  1185. callback();
  1186. };
  1187. return {
  1188. crumbs: [
  1189. { path: false, name: "病人管理" },
  1190. { path: false, name: "新增病人" }
  1191. ],
  1192. generic_info_fold: true,
  1193. treat_info_fold: true,
  1194. patientTotal: 0,
  1195. pageLoad: true,
  1196. avatarFlag: false,
  1197. subscibeFlag: false,
  1198. orgname: "",
  1199. adminusername: "",
  1200. form: Object.assign({}, defaultForm),
  1201. formSubmit: true,
  1202. submitMethod: "",
  1203. uploadData: { token: "", key: "" },
  1204. dialogImageUrl: "",
  1205. qiniuDomain: "https://images.shengws.com/",
  1206. dialogVisible: false,
  1207. // typeOptions: null,
  1208. // styleOptions: null,
  1209. sourceOptions: [{ value: 1, label: "门诊" }, { value: 2, label: "住院" }],
  1210. lapsetoOptions: [
  1211. { value: 1, label: "留治" },
  1212. { value: 2, label: "转出" }
  1213. ],
  1214. // partitionOptions: null,
  1215. sexOptions: [{ value: 1, label: "男" }, { value: 2, label: "女" }],
  1216. isHospitalFirstDialysisOptions: [
  1217. { value: 1, label: "是" },
  1218. { value: 2, label: "否" }
  1219. ],
  1220. predialysisConditionOptions: [
  1221. { value: 1, label: "腹膜透析" },
  1222. { value: 2, label: "肾移植" }
  1223. ],
  1224. maritalOptions: null,
  1225. wayOptions: null,
  1226. educationOptions: null,
  1227. professionOptions: null,
  1228. // inductionOptions: null,
  1229. // doctorOptions: null,
  1230. // nurseOptions: null,
  1231. // rhOptions: null,
  1232. checkDisease: null,
  1233. contagionList: null,
  1234. dialogFormVisible: false,
  1235. loading: null,
  1236. submitMsg: "",
  1237. patientID: 0,
  1238. formLoading: false,
  1239. expenseOptions: [
  1240. { id: 1, name: "基本医保" },
  1241. { id: 2, name: "新农合" },
  1242. { id: 3, name: "自费医疗" },
  1243. { id: 4, name: "公费医疗" },
  1244. { id: 5, name: "商业保险" },
  1245. { id: 6, name: "军队医疗" },
  1246. { id: 7, name: "其他" }
  1247. ],
  1248. subscibe: {},
  1249. showLapseto:true,
  1250. rules: {
  1251. contagions: [
  1252. {
  1253. type: "array",
  1254. required: true,
  1255. trigger: "change",
  1256. validator: checkContagions
  1257. }
  1258. ],
  1259. patientType: [
  1260. { required: true, message: "请选择患者类型", trigger: "blur" }
  1261. ],
  1262. dialysisNo: [
  1263. { required: true, message: "请填写透析号", trigger: "blur" }
  1264. ],
  1265. phone: [{ validator: checkPhone, trigger: "blur" }],
  1266. source: [
  1267. { required: true, message: "请选择患者来源", trigger: "blur" }
  1268. ],
  1269. lapseto: [
  1270. { required: true, message: "请选择治疗状态", trigger: "blur" }
  1271. ],
  1272. name: [{ required: true, message: "请填写姓名", trigger: "blur" }],
  1273. gender: [{ required: true, message: "请选择性别", trigger: "blur" }],
  1274. idCardNo: [
  1275. { required: true, message: "请填写身份证号", trigger: "blur" }
  1276. ],
  1277. birth: [{ required: true, message: "请填写生日", trigger: "blur" }],
  1278. age: [{ required: true, message: "请填写年龄", trigger: "blur" }],
  1279. firstDialysisDate: [
  1280. { required: true, message: "请选择日期", trigger: "blur" }
  1281. ],
  1282. homeTelephone: [{ validator: checkFamilyPhone, trigger: "blur" }],
  1283. homeAddress: [{ required: true, message: "请填写住址", trigger: "blur" }],
  1284. },
  1285. adminUserOptions:[],
  1286. };
  1287. },
  1288. components: {
  1289. BreadCrumb
  1290. },
  1291. computed: {
  1292. generic_fold_icon: function() {
  1293. return this.generic_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1294. },
  1295. treat_fold_icon: function() {
  1296. return this.treat_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up";
  1297. }
  1298. },
  1299. created() {
  1300. this.fetchAllAdminUsers();
  1301. if(this.isEdit == true){
  1302. this.showLapseto = false
  1303. }
  1304. // this.styleOptions = this.$store.getters.patient_types;
  1305. // this.partitionOptions = this.$store.getters.partitions;
  1306. this.maritalOptions = getDataConfig("patient", "marital_options");
  1307. this.wayOptions = getDataConfig("patient", "reimbursement_ways");
  1308. // this.typeOptions = this.$store.getters.blood_types;
  1309. // this.rhOptions = this.$store.getters.rh;
  1310. this.educationOptions = getDataConfig("patient", "education_types");
  1311. this.professionOptions = getDataConfig("patient", "profession_options");
  1312. // this.inductionOptions = this.$store.getters.induction_options;
  1313. this.contagionList = this.$store.getters.contagions;
  1314. this.checkDisease = this.$store.getters.disease;
  1315. this.subscibe = this.$store.getters.xt_user.subscibe;
  1316. this.GetPatientTotal();
  1317. // this.fetchAllDoctorAndNurse();
  1318. this.pageLoad = false;
  1319. var xtuser = this.$store.getters.xt_user;
  1320. this.orgname = xtuser.org.org_name;
  1321. this.adminusername = xtuser.user.user_name;
  1322. if (this.isEdit) {
  1323. this.submitMsg = "修改患者信息成功";
  1324. const id = this.$route.params && this.$route.params.id;
  1325. this.patientID = parseInt(id);
  1326. if (isNaN(this.patientID) || this.patientID <= 0) {
  1327. this.$notify.error({
  1328. title: "错误",
  1329. message: "无效的id"
  1330. });
  1331. this.$router.back(-1);
  1332. }
  1333. this.fetchPatient(id);
  1334. this.avatarFlag = true;
  1335. } else {
  1336. this.submitMsg = "新增患者成功";
  1337. this.form = Object.assign({}, defaultForm);
  1338. this.form.lapseto = 1
  1339. }
  1340. },
  1341. watch: {
  1342. "form.record_date": function(val) {
  1343. console.log(val);
  1344. if (val == null || val == "") {
  1345. console.log("111111");
  1346. this.form.remind_cycle = "";
  1347. }
  1348. }
  1349. },
  1350. methods: {
  1351. fetchAllAdminUsers() {
  1352. fetchAllAdminUsers().then((response) => {
  1353. if (response.data.state === 1) {
  1354. this.form.doctor = this.$store.getters.xt_user.user.id
  1355. this.adminUserOptions = response.data.data.users;
  1356. }
  1357. });
  1358. },
  1359. recordCheck() {
  1360. if (this.form.record_date == "") {
  1361. this.$message.error("请先选择检验检查日期");
  1362. return;
  1363. } else {
  1364. this.dialogFormVisible = true;
  1365. }
  1366. },
  1367. GetPatientTotal() {
  1368. GetPatientTotal()
  1369. .then(response => {
  1370. if (response.data.state == 1) {
  1371. this.patientTotal = response.data.data.total;
  1372. this.subscibeFlag = true;
  1373. // if ((this.subscibe.state == 2 && this.patientTotal >= 100) || (this.subscibe.state == 1 && this.patientTotal >= 200)) {
  1374. // this.$alert('患者数已达到当前服务版本病人数,需要升级到更高的版本', '提示', {
  1375. // confirmButtonText: '确定',
  1376. // showClose: false,
  1377. // callback: action => {
  1378. // this.$router.push('/service/buy')
  1379. // }
  1380. // })
  1381. // } else {
  1382. // this.subscibeFlag = true
  1383. // }
  1384. } else {
  1385. this.$message.error(response.data.msg);
  1386. }
  1387. })
  1388. .catch(e => {});
  1389. },
  1390. changeGender(value) {
  1391. if (this.avatarFlag) {
  1392. return false;
  1393. }
  1394. if (value == 1) {
  1395. this.form.avatar = "https://images.shengws.com/201809182128111.png";
  1396. } else if (value == 2) {
  1397. this.form.avatar = "https://images.shengws.com/201809182128222.png";
  1398. } else {
  1399. }
  1400. },
  1401. resetForm(formName) {
  1402. this.$refs[formName].resetFields();
  1403. },
  1404. onReSubmit(formName) {
  1405. this.submitForm(formName, "renew");
  1406. },
  1407. onSubmit(formName) {
  1408. console.log("2222",this.form)
  1409. this.submitForm(formName, "redict");
  1410. },
  1411. submitForm(formName, action) {
  1412. if (!this.formSubmit) {
  1413. return false;
  1414. }
  1415. this.form.user_sys_before_count = this.form.user_sys_before_count.toString()
  1416. this.$refs[formName].validate(valid => {
  1417. if (valid) {
  1418. this.formSubmit = false;
  1419. if (this.isEdit) {
  1420. this.form.age = parseInt(this.form.age);
  1421. this.form.user_sys_before_count = this.form.user_sys_before_count.toString();
  1422. this.form.troble_shoot = parseInt(this.form.troble_shoot)
  1423. this.form.doctor = parseInt(this.form.doctor)
  1424. if(this.form.avatar.indexOf('?imageView2/2/w/500/h/500/q/90')!=-1){
  1425. this.form.avatar = this.form.avatar
  1426. }else{
  1427. this.form.avatar = this.form.avatar + "?imageView2/2/w/500/h/500/q/90"
  1428. }
  1429. console.log("form---",this.form)
  1430. editPatient(this.patientID, this.form)
  1431. .then(response => {
  1432. if (response.data.state == 0) {
  1433. this.$message.error(response.data.msg);
  1434. this.formSubmit = true;
  1435. return false;
  1436. } else {
  1437. this.formSubmit = false;
  1438. this.$notify({
  1439. title: "成功",
  1440. message: this.submitMsg,
  1441. type: "success",
  1442. duration: 2000
  1443. });
  1444. this.$refs[formName].resetFields();
  1445. if (action !== "renew") {
  1446. this.$router.back(-1);
  1447. }
  1448. this.formSubmit = true;
  1449. return false;
  1450. }
  1451. })
  1452. .catch(err => {
  1453. this.$message.error("网络异常");
  1454. this.formSubmit = true;
  1455. return false;
  1456. });
  1457. } else {
  1458. this.form.age = parseInt(this.form.age);
  1459. this.form.troble_shoot = parseInt(this.form.troble_shoot)
  1460. this.form.doctor = parseInt(this.form.doctor)
  1461. console.log("form233322332w",this.form)
  1462. createPatient(this.form)
  1463. .then(response => {
  1464. if (response.data.state == 0) {
  1465. this.$message.error(response.data.msg);
  1466. this.formSubmit = true;
  1467. return false;
  1468. } else {
  1469. this.formSubmit = true;
  1470. this.$notify({
  1471. title: "成功",
  1472. message: this.submitMsg,
  1473. type: "success",
  1474. duration: 2000
  1475. });
  1476. this.$refs[formName].resetFields();
  1477. this.$store.dispatch("SetSubscibePatients");
  1478. var sub = this.$store.getters.xt_user.subscibe;
  1479. if (action !== "renew") {
  1480. this.$router.back(-1);
  1481. }
  1482. return false;
  1483. }
  1484. })
  1485. .catch(err => {
  1486. this.$message.error("网络异常");
  1487. this.formSubmit = true;
  1488. return false;
  1489. });
  1490. }
  1491. } else {
  1492. this.formSubmit = true;
  1493. return false;
  1494. }
  1495. });
  1496. },
  1497. handlePictureCardPreview(file) {
  1498. this.dialogImageUrl = file.url;
  1499. this.dialogVisible = true;
  1500. },
  1501. handleAvatarError(err, file, fileList) {
  1502. this.$message.error(err);
  1503. this.loading.close();
  1504. return false;
  1505. },
  1506. handleAvatarSuccess(res, file) {
  1507. // this.imageUrl = URL.createObjectURL(file.raw);
  1508. this.form.avatar = this.qiniuDomain + res.url +"?imageView2/2/w/500/h/500/q/90";
  1509. console.log("上传成功地址",this.form.avatar)
  1510. this.avatarFlag = true;
  1511. this.loading.close();
  1512. },
  1513. beforeAvatarUpload(file) {
  1514. // const isJPG = file.type === "image/jpeg";
  1515. var fileType = file.type;
  1516. const isJPG = fileType.indexOf("image") > -1;
  1517. const isLt2M = file.size / 1024 / 1024 < 6;
  1518. if (!isJPG) {
  1519. this.$message.error("只能上传图片");
  1520. return false;
  1521. }
  1522. if (!isLt2M) {
  1523. this.$message.error("上传头像图片大小不能超过 6MB!");
  1524. return false;
  1525. }
  1526. var date = new Date();
  1527. var ext = getFileExtension(file.name);
  1528. var key =
  1529. date.getFullYear() +
  1530. "/" +
  1531. (date.getMonth() + 1) +
  1532. "/" +
  1533. date.getDate() +
  1534. "/" +
  1535. date.getHours() +
  1536. "/" +
  1537. date.getMinutes() +
  1538. "/" +
  1539. date.getSeconds() +
  1540. "/" +
  1541. "_s_" +
  1542. file.uid +
  1543. "." +
  1544. ext;
  1545. this.loading = this.$loading({
  1546. lock: true,
  1547. text: "上传中...",
  1548. spinner: "el-icon-loading",
  1549. background: "rgba(0, 0, 0, 0.7)"
  1550. });
  1551. const _self = this;
  1552. return new Promise((resolve, reject) => {
  1553. getToken()
  1554. .then(response => {
  1555. const token = response.data.data.uptoken;
  1556. _self._data.uploadData.token = token;
  1557. _self._data.uploadData.key = key;
  1558. resolve(true);
  1559. })
  1560. .catch(err => {
  1561. console.log(err);
  1562. reject(false);
  1563. this.loading.close();
  1564. });
  1565. });
  1566. },
  1567. generatedialysisno() {
  1568. generateDialysisNo().then(response => {
  1569. this.form.dialysisNo = response.data.data.no + "";
  1570. });
  1571. },
  1572. checkIdCardNo() {
  1573. console.log(this.form.idCardNo);
  1574. if (!isCardNo(this.form.idCardNo)) {
  1575. this.$message.error("身份证号码信息有误!");
  1576. this.form.birth = "";
  1577. return false;
  1578. }
  1579. var thisLen = this.form.idCardNo.length;
  1580. var birth = "";
  1581. if (thisLen == 15) {
  1582. birth = "19" + this.form.idCardNo.substr(6, 6);
  1583. } else {
  1584. birth = this.form.idCardNo.substr(6, 8);
  1585. }
  1586. this.form.birth =
  1587. birth.substr(0, 4) +
  1588. "-" +
  1589. birth.substr(4, 2) +
  1590. "-" +
  1591. birth.substr(6, 2);
  1592. this.form.age = jsGetAge(this.form.birth, "-");
  1593. },
  1594. hadSelectBirth() {
  1595. this.form.age = jsGetAge(this.form.birth, "-");
  1596. },
  1597. checkHeight() {
  1598. if (!isPositiveInteger(this.form.height)) {
  1599. this.$message.error("身高请填写正整数!");
  1600. return false;
  1601. }
  1602. },
  1603. selectFirstDialysisDate() {
  1604. this.form.dialysisAge = dialysisAge(this.form.firstDialysisDate);
  1605. },
  1606. fetchPatient(id) {
  1607. fetchPatient(id)
  1608. .then(response => {
  1609. if (response.data.state == 1) {
  1610. this.$emit("tran-patient-info", response.data.data.patient);
  1611. var patietInfo = response.data.data.patient;
  1612. console.log("9999999",response.data.data.patient)
  1613. this.form.avatar = patietInfo.avatar;
  1614. this.form.name = patietInfo.name;
  1615. this.form.alias = patietInfo.alias;
  1616. this.form.idCardNo = patietInfo.id_card_no;
  1617. this.form.dialysisNo = patietInfo.dialysis_no;
  1618. this.form.gender = patietInfo.gender;
  1619. if (patietInfo.gender == 1 || patietInfo.gender == 2) {
  1620. this.form.gender = patietInfo.gender;
  1621. }
  1622. this.form.birth = uParseTime(patietInfo.birthday, "{y}-{m}-{d}");
  1623. this.form.nation = patietInfo.nation;
  1624. this.form.native_place = patietInfo.native_place;
  1625. this.form.height = patietInfo.height + "";
  1626. console.log(this.form.birth);
  1627. if (patietInfo.marital_status > 0) {
  1628. this.form.maritalStatus = patietInfo.marital_status;
  1629. }
  1630. this.form.children = patietInfo.children;
  1631. this.form.admissionNumber = patietInfo.admission_number;
  1632. if (patietInfo.reimbursement_way_id > 0) {
  1633. this.form.reimbursementWayID = patietInfo.reimbursement_way_id;
  1634. }
  1635. this.form.healthCareNo = patietInfo.health_care_no;
  1636. this.form.phone = patietInfo.phone;
  1637. this.form.homeTelephone = patietInfo.home_telephone;
  1638. this.form.relative_phone = patietInfo.relative_phone;
  1639. this.form.relative_relations = patietInfo.relative_relations;
  1640. this.form.homeAddress = patietInfo.home_address;
  1641. this.form.work = patietInfo.work_unit;
  1642. this.form.unit_address = patietInfo.unit_address;
  1643. this.form.user_sys_before_count = patietInfo.user_sys_before_count;
  1644. this.form.treatment_plan = patietInfo.treatment_plan
  1645. if (patietInfo.profession > 0) {
  1646. this.form.profession = patietInfo.profession;
  1647. }
  1648. if (patietInfo.education_level > 0) {
  1649. this.form.education = patietInfo.education_level;
  1650. }
  1651. if (patietInfo.source == 1 || patietInfo.source == 2) {
  1652. this.form.source = patietInfo.source;
  1653. }
  1654. if (patietInfo.lapseto == 1 || patietInfo.lapseto == 2 || patietInfo.lapseto == 3) {
  1655. this.form.lapseto = patietInfo.lapseto;
  1656. }
  1657. if (
  1658. patietInfo.is_hospital_first_dialysis == 1 ||
  1659. patietInfo.is_hospital_first_dialysis == 2
  1660. ) {
  1661. this.form.is_hospital_first_dialysis =
  1662. patietInfo.is_hospital_first_dialysis;
  1663. }
  1664. if (patietInfo.first_dialysis_date != 0) {
  1665. this.form.firstDialysisDate = uParseTime(
  1666. patietInfo.first_dialysis_date,
  1667. "{y}-{m}-{d}"
  1668. );
  1669. }
  1670. this.form.first_dialysis_hospital =
  1671. patietInfo.first_dialysis_hospital;
  1672. if (patietInfo.predialysis_condition.length > 0) {
  1673. this.form.predialysis_condition = patietInfo.predialysis_condition.split(
  1674. ","
  1675. );
  1676. }
  1677. this.form.pre_hospital_dialysis_frequency =
  1678. patietInfo.pre_hospital_dialysis_frequency;
  1679. this.form.pre_hospital_dialysis_times =
  1680. patietInfo.pre_hospital_dialysis_times;
  1681. if (patietInfo.hospital_first_dialysis_date != 0) {
  1682. this.form.hospital_first_dialysis_date = uParseTime(
  1683. patietInfo.hospital_first_dialysis_date,
  1684. "{y}-{m}-{d}"
  1685. );
  1686. }
  1687. this.form.contagions = response.data.data.contagions;
  1688. this.form.diseases = response.data.data.diseases;
  1689. this.form.remark = patietInfo.remark;
  1690. this.form.sch_remark = patietInfo.sch_remark;
  1691. this.form.diagnose = patietInfo.diagnose;
  1692. this.form.patient_complains = patietInfo.patient_complains;
  1693. this.form.present_history = patietInfo.present_history;
  1694. this.form.past_history = patietInfo.past_history;
  1695. this.form.temperature = patietInfo.temperature;
  1696. this.form.pulse = patietInfo.pulse;
  1697. this.form.respiratory = patietInfo.respiratory;
  1698. this.form.sbp = patietInfo.sbp;
  1699. this.form.dbp = patietInfo.dbp;
  1700. this.form.response_result = patietInfo.response_result;
  1701. this.form.remind_cycle = patietInfo.remind_cycle;
  1702. this.form.is_infectious = patietInfo.is_infectious;
  1703. if(this.form.is_infectious == 1){
  1704. this.form.remind_cycle = 0
  1705. }
  1706. this.form.tell_phone = patietInfo.tell_phone;
  1707. this.form.dialysis_age = patietInfo.dialysis_age;
  1708. this.form.contact_name = patietInfo.contact_name;
  1709. if (patietInfo.expense_kind == 0) {
  1710. this.form.expense_kind = "";
  1711. } else {
  1712. this.form.expense_kind = patietInfo.expense_kind;
  1713. }
  1714. this.form.troble_shoot = patietInfo.troble_shoot
  1715. this.form.zb_patient_id = patietInfo.zb_patient_id
  1716. this.form.first_treatment_date = uParseTime(
  1717. patietInfo.first_treatment_date,
  1718. "{y}-{m}-{d}"
  1719. );
  1720. if (patietInfo.age == 0) {
  1721. this.form.age = jsGetAge(this.form.birth, "-");
  1722. } else {
  1723. this.form.age = patietInfo.age;
  1724. }
  1725. // this.form.initial = patietInfo.initial_dialysis + "";
  1726. // this.form.dialysisTotal = patietInfo.total_dialysis + "";
  1727. // this.form.assessment = patietInfo.evaluate;
  1728. // if (patietInfo.patient_type > 0) {
  1729. // this.form.patientType = patietInfo.patient_type;
  1730. // }
  1731. // if (patietInfo.partition_id > 0) {
  1732. // this.form.partition = patietInfo.partition_id;
  1733. // }
  1734. // if (patietInfo.bed_id > 0) {
  1735. // this.form.bed = patietInfo.bed_id;
  1736. // }
  1737. // this.form.healthCareDueDate = uParseTime(
  1738. // patietInfo.health_care_due_date,
  1739. // "{y}-{m}-{d}"
  1740. // );
  1741. // if (patietInfo.blood_type > 0) {
  1742. // this.form.blood = patietInfo.blood_type;
  1743. // }
  1744. // if (patietInfo.rh > 0) {
  1745. // this.form.rh = patietInfo.rh;
  1746. // }
  1747. // this.form.healthCareDueAlertDate = uParseTime(
  1748. // patietInfo.health_care_due_alert_date,
  1749. // "{y}-{m}-{d}"
  1750. // );
  1751. // this.form.receivingDate = uParseTime(
  1752. // patietInfo.receiving_date,
  1753. // "{y}-{m}-{d}"
  1754. // );
  1755. // this.form.dialysisAge = dialysisAge(
  1756. // this.form.firstDialysisDate,
  1757. // "-"
  1758. // );
  1759. // if (patietInfo.induction_period > 0) {
  1760. // this.form.induction = patietInfo.induction_period;
  1761. // }
  1762. // if (patietInfo.attending_doctor_id > 0) {
  1763. // this.form.doctor = patietInfo.attending_doctor_id;
  1764. // }
  1765. // if (patietInfo.head_nurse_id > 0) {
  1766. // this.form.nurse = patietInfo.head_nurse_id;
  1767. // }
  1768. // if (patietInfo.registrars_id > 0) {
  1769. // this.form.registrars = patietInfo.registrars_id;
  1770. // }
  1771. this.form.doctor = patietInfo.doctor
  1772. if(this.form.doctor == 0){
  1773. this.form.doctor = ""
  1774. }
  1775. this.checkIdCardNo();
  1776. } else {
  1777. this.$notify.error({
  1778. title: "错误",
  1779. message: "网络异常"
  1780. });
  1781. this.$router.back(-1);
  1782. }
  1783. // this.postForm = response.data
  1784. // // Just for test
  1785. // this.postForm.title += ` Article Id:${this.postForm.id}`
  1786. // this.postForm.content_short += ` Article Id:${this.postForm.id}`
  1787. })
  1788. .catch(err => {
  1789. this.$notify.error({
  1790. title: "错误",
  1791. message: "网络异常"
  1792. });
  1793. this.$router.back(-1);
  1794. });
  1795. },
  1796. submitNew(formName) {
  1797. this.dialogFormVisible = false;
  1798. },
  1799. changeCycle(val) {
  1800. if (!this.isEdit) {
  1801. if (this.form.record_date == "" || this.form.record_date == null) {
  1802. this.$message.error("请先选择检查结果日期");
  1803. this.form.remind_cycle = "";
  1804. return;
  1805. }
  1806. }
  1807. },
  1808. changeInfectious(val){
  1809. if(val == 1){
  1810. this.showOne = false
  1811. }
  1812. if(val == 2){
  1813. this.showOne = true
  1814. }
  1815. }
  1816. // fetchAllDoctorAndNurse() {
  1817. // fetchAllDoctorAndNurse().then(response => {
  1818. // if (response.data.state == 1) {
  1819. // this.doctorOptions = response.data.data.doctors;
  1820. // this.nurseOptions = response.data.data.nursers;
  1821. // }
  1822. // });
  1823. // }
  1824. }
  1825. };
  1826. </script>
  1827. <style rel="stylesheet/scss" lang="scss" scoped>
  1828. .uploadHeadBtn {
  1829. width: 148px;
  1830. margin-top: 10px;
  1831. }
  1832. .el-form {
  1833. .el-col-6,
  1834. .el-col-8 {
  1835. width: 430px;
  1836. height: 59px !important;
  1837. }
  1838. .el-form-item {
  1839. .el-select {
  1840. width: 100%;
  1841. }
  1842. .el-date-editor.el-input {
  1843. width: 100%;
  1844. }
  1845. .textarea {
  1846. width: 100%;
  1847. height: 70px;
  1848. border-color: #dcdfe6;
  1849. padding: 5px;
  1850. }
  1851. }
  1852. }
  1853. .el-select-dropdown {
  1854. z-index: 998 !important;
  1855. }
  1856. .newCol {
  1857. position: fixed;
  1858. bottom: 0;
  1859. right: 50px;
  1860. }
  1861. /deep/ .now_his{
  1862. .el-row{
  1863. .el-col-24{
  1864. .el-form-item{
  1865. .el-form-item__content{
  1866. height: 100%;
  1867. .el-textarea{
  1868. .el-textarea__inner{
  1869. height: 93%;
  1870. }
  1871. }
  1872. }
  1873. }
  1874. }
  1875. }
  1876. }
  1877. </style>