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

patients.vue 64KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032
  1. <template>
  2. <div class="main-contain">
  3. <el-dialog
  4. title="提示"
  5. :visible.sync="exportVisible"
  6. width="40%"
  7. >
  8. <div>
  9. 您提交的患者名单已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果
  10. </div>
  11. <span slot="footer" class="dialog-footer">
  12. <el-button @click="exportVisible = false">取 消</el-button>
  13. <el-button type="primary" @click="exportVisible = false">确 定</el-button>
  14. </span>
  15. </el-dialog>
  16. <el-dialog
  17. title="提示"
  18. :visible.sync="dialogVisible"
  19. width="40%"
  20. >
  21. <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 <a href="https://kuyi.shengws.com/patient_template.xlsx" style="color: blue" download="template">下载导入模板</a></span>
  22. <span slot="footer" class="dialog-footer">
  23. <el-button @click="dialogVisible = false">取 消</el-button>
  24. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  25. </span>
  26. </el-dialog>
  27. <el-dialog
  28. title="提示"
  29. :visible.sync="dialysisVisible"
  30. width="40%"
  31. >
  32. <span>您提交的文档中存在不同病人存在相同的透析号,请检查修改后在提交 </span>
  33. <span slot="footer" class="dialog-footer">
  34. <el-button @click="dialysisVisible = false">取 消</el-button>
  35. <el-button type="primary" @click="dialysisVisible = false">确 定</el-button>
  36. </span>
  37. </el-dialog>
  38. <el-dialog
  39. title="提示"
  40. :visible.sync="phoneVisible"
  41. width="40%"
  42. >
  43. <span>您提交的文档中存在不同病人存在相同的手机号,请检查修改后在提交 </span>
  44. <span slot="footer" class="dialog-footer">
  45. <el-button @click="phoneVisible = false">取 消</el-button>
  46. <el-button type="primary" @click="phoneVisible = false">确 定</el-button>
  47. </span>
  48. </el-dialog>
  49. <el-dialog
  50. title="提示"
  51. :visible.sync="idCardNoVisible"
  52. width="40%"
  53. >
  54. <span>您提交的文档中存在不同病人存在相同的身份证,请检查修改后在提交 </span>
  55. <span slot="footer" class="dialog-footer">
  56. <el-button @click="idCardNoVisible = false">取 消</el-button>
  57. <el-button type="primary" @click="idCardNoVisible = false">确 定</el-button>
  58. </span>
  59. </el-dialog>
  60. <el-dialog
  61. title="提示"
  62. :visible.sync="exportLogVisible"
  63. width="40%"
  64. >
  65. <div v-for="(item,index) in logs" :key="index">
  66. <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
  67. <br/>
  68. <br/>
  69. <span>{{getContent(item)}}</span>
  70. <span >点击</span>
  71. <span style="color:blue" @click="generateTxt(item)">查看详情</span>
  72. <br/>
  73. <br/>
  74. </div>
  75. <span slot="footer" class="dialog-footer">
  76. <el-button @click="exportLogVisible = false">取 消</el-button>
  77. <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
  78. </span>
  79. </el-dialog>
  80. <div class="position">
  81. <bread-crumb :crumbs="crumbs"></bread-crumb>
  82. <div style="display:flex;align-items:center">
  83. <el-badge :value=value class="item">
  84. <el-button size="small" type="primary" @click="toRemind">传染病检查提醒</el-button>
  85. </el-badge>
  86. <upload-excel :on-success='handleSuccess' :before-upload="beforeUpload" v-if="isShow"></upload-excel>
  87. <el-link target="_blank" href="https://kuyi.shengws.com/patient_template.xlsx" :underline="false"
  88. style="margin-left:15px">
  89. <el-button
  90. class="filter-item"
  91. type="primary"
  92. size="small"
  93. >下载模版
  94. </el-button>
  95. </el-link>
  96. <el-button
  97. style="margin-left:10px;"
  98. @click="generateLog()"
  99. class="filter-item"
  100. type="primary"
  101. size="small"
  102. >下载日志
  103. </el-button>
  104. <el-button
  105. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  106. @click="$router.push({ path: '/patients/create' })"
  107. class="filter-item"
  108. type="primary"
  109. icon="el-icon-circle-plus-outline"
  110. size="small"
  111. >新增
  112. </el-button>
  113. </div>
  114. <!-- <el-button type="primary" plain style="float:right;" icon="el-icon-download" @click="putOnRecord(2,{})" >备案</el-button> -->
  115. </div>
  116. <div class="app-container">
  117. <div class="cell clearfix">
  118. <!-- <label class="title"><span class="name">病人搜索</span> : </label> -->
  119. <el-input
  120. style="width: 400px;"
  121. v-model.trim="searchKey"
  122. class="filter-item"
  123. placeholder="病人姓名/透析号"
  124. size="small"
  125. @keyup.enter.native='search'
  126. />
  127. <el-button
  128. class="filter-item"
  129. type="primary"
  130. icon="el-icon-search"
  131. @click="search"
  132. size="small"
  133. >搜索
  134. </el-button
  135. >
  136. </div>
  137. <div class="cell clearfix">
  138. <label class="title"><span class="name">日期查询</span> : </label>
  139. <el-date-picker
  140. size="small"
  141. clearable
  142. v-model="listQuery.start_time"
  143. prefix-icon="el-icon-date"
  144. @change="changeTimeOne"
  145. :editable="false"
  146. style="width: 196px;"
  147. type="date"
  148. placeholder="选择日期时间"
  149. align="right"
  150. format="yyyy-MM-dd"
  151. value-format="yyyy-MM-dd"
  152. >
  153. </el-date-picker>
  154. <span class="cellLine"> - </span>
  155. <el-date-picker
  156. size="small"
  157. clearable
  158. v-model="listQuery.end_time"
  159. prefix-icon="el-icon-date"
  160. @change="changeTime"
  161. :editable="false"
  162. style="width: 196px;"
  163. type="date"
  164. placeholder="选择日期时间"
  165. align="right"
  166. format="yyyy-MM-dd"
  167. value-format="yyyy-MM-dd"
  168. >
  169. </el-date-picker>
  170. </div>
  171. <div class="cell clearfix">
  172. <label class="title"><span class="name">排班班次</span> : </label>
  173. <div class="time ">
  174. <ul class="">
  175. <li
  176. :class="item.value == schedulType ? 'active' : ''"
  177. @click="selectSchedulType(item.value)"
  178. v-for="item in schedulArr"
  179. :key="item.value"
  180. >
  181. {{ item.label }}
  182. </li>
  183. </ul>
  184. </div>
  185. </div>
  186. <div class="cell clearfix">
  187. <label class="title"><span class="name">状态</span> : </label>
  188. <div class="time ">
  189. <ul class="">
  190. <li
  191. :class="item.value == systemType ? 'active' : ''"
  192. @click="selectSystemType(item.value)"
  193. v-for="item in systemArr"
  194. :key="item.value"
  195. >
  196. {{ item.label }}
  197. </li>
  198. </ul>
  199. </div>
  200. </div>
  201. <div class="cell clearfix">
  202. <label class="title"><span class="name">转归情况</span> : </label>
  203. <div class="time ">
  204. <ul class="">
  205. <li
  206. :class="item.lapseto == lapsetoType ? 'active' : ''"
  207. @click="selectLapseTo(item.lapseto)"
  208. v-for="item in lapsetoArr"
  209. :key="item.value"
  210. >
  211. {{ item.label }}
  212. </li>
  213. </ul>
  214. </div>
  215. </div>
  216. <div class="cell clearfix">
  217. <label class="title"><span class="name">病人来源</span> : </label>
  218. <div class="time ">
  219. <ul class="">
  220. <li
  221. :class="item.source == sourceType ? 'active' : ''"
  222. @click="selectSource(item.source)"
  223. v-for="item in sourceArr"
  224. :key="item.value"
  225. >
  226. {{ item.label }}
  227. </li>
  228. </ul>
  229. </div>
  230. </div>
  231. <!-- <div class="cell clearfix">
  232. <label class="title"><span class="name">患者去向</span> : </label>
  233. <div class="time ">
  234. <ul class="">
  235. <li
  236. :class="item.source == patientSoureType ? 'active' : ''"
  237. @click="selectPatientSource(item.source)"
  238. v-for="item in patientSourceList"
  239. :key="item.value"
  240. >
  241. {{ item.label }}
  242. </li>
  243. </ul>
  244. </div>
  245. </div> -->
  246. <div class="cell clearfix">
  247. <label class="title"><span class="name">主管护士</span> : </label>
  248. <el-select v-model="form.nurse" style="width:200px" @change="changeNuseSearch">
  249. <el-option
  250. placeholder="主管护士"
  251. v-for="(item,index) in adminUserOptions"
  252. :key="index"
  253. :label="item.name"
  254. :value="item.id"
  255. />
  256. </el-select>
  257. </div>
  258. <div class="cell clearfix">
  259. <label class="title"><span class="name">其它查询</span> : </label>
  260. <el-select
  261. v-model="listQuery.contagion"
  262. size="small"
  263. clearable
  264. placeholder="传染病"
  265. @change="changeOtherSearch"
  266. >
  267. <el-option
  268. v-for="item in contagionList"
  269. :key="item.id"
  270. :label="item.name"
  271. :value="item.id"
  272. >
  273. </el-option>
  274. </el-select>
  275. <el-select
  276. style="margin-left: 10px;"
  277. v-model="listQuery.reimbursement_way"
  278. size="small"
  279. clearable
  280. placeholder="付费方式"
  281. @change="changeOtherSearch"
  282. >
  283. <el-option
  284. v-for="item in reimbursement_ways"
  285. :key="item.id"
  286. :label="item.name"
  287. :value="item.id"
  288. >
  289. </el-option>
  290. </el-select>
  291. <el-select
  292. v-model="listQuery.isscheduling"
  293. collapse-tags
  294. style="margin-left: 10px;"
  295. clearable
  296. placeholder="排班情况"
  297. size="small"
  298. @change="changeOtherSearch"
  299. >
  300. <el-option
  301. v-for="item in scheduling"
  302. :key="item.value"
  303. :label="item.label"
  304. :value="item.value"
  305. >
  306. </el-option>
  307. </el-select>
  308. <el-select
  309. v-model="listQuery.isprescription"
  310. collapse-tags
  311. style="margin-left:10px;"
  312. clearable
  313. placeholder="透析处方"
  314. size="small"
  315. @change="changeOtherSearch"
  316. >
  317. <el-option
  318. v-for="item in prescription"
  319. :key="item.value"
  320. :label="item.label"
  321. :value="item.value"
  322. >
  323. </el-option>
  324. </el-select>
  325. <el-button type="primary" size="small" style="float:right" @click="toExport">导出</el-button>
  326. </div>
  327. <div class="cell clearfix">
  328. </div>
  329. <el-table
  330. ref="multipleTable"
  331. :row-style="{ color: '#303133' }"
  332. :header-cell-style="{
  333. backgroundColor: 'rgb(245, 247, 250)',
  334. color: '#606266'
  335. }"
  336. :data="tableData"
  337. border
  338. fit
  339. highlight-current-row
  340. style="width: 100%;margin-top: 10px;"
  341. @selection-change="handleSelectionChange"
  342. >
  343. <el-table-column
  344. align="center"
  345. label="全选"
  346. width="60px"
  347. type="selection"
  348. ></el-table-column>
  349. <el-table-column
  350. type="index"
  351. label="序号"
  352. width="40px"
  353. align="center"
  354. ></el-table-column>
  355. <el-table-column
  356. label="透析号"
  357. min-width="70"
  358. property="dialysis_no"
  359. align="center"
  360. style="color:red"
  361. ></el-table-column>
  362. <el-table-column
  363. label="住院号"
  364. min-width="70"
  365. property="admission_number"
  366. align="center"
  367. >
  368. </el-table-column>
  369. <el-table-column
  370. property="name"
  371. label="姓名"
  372. min-width="70"
  373. align="center"
  374. >
  375. <template slot-scope="scope">
  376. <router-link
  377. :to="'/patients/patient/' + scope.row.id"
  378. style="color:#409eff;width:100%;display:block;"
  379. >{{ scope.row.name }}
  380. </router-link
  381. >
  382. </template>
  383. </el-table-column>
  384. <el-table-column label="性别" min-width="60" align="center">
  385. <template slot-scope="scope">
  386. <span v-if="scope.row.gender == 1">男</span>
  387. <span v-else-if="scope.row.gender == 2">女</span>
  388. <span v-else>未知</span>
  389. </template>
  390. </el-table-column>
  391. <el-table-column label="来源" min-width="60" align="center">
  392. <template slot-scope="scope">
  393. <span v-if="scope.row.source == 1">门诊</span>
  394. <span v-else-if="scope.row.source == 2">住院</span>
  395. <span v-else-if="scope.row.source == 3">门特</span>
  396. <span v-else>未知</span>
  397. </template>
  398. </el-table-column>
  399. <el-table-column label="透析次数" min-width="84" align="center">
  400. <template slot-scope="scope">
  401. <span>{{ getCount(scope.row) }}</span>
  402. </template>
  403. </el-table-column>
  404. <!-- <el-table-column min-width="150" label="二维码" align="center">
  405. <template slot-scope="scope" type="text">
  406. <a style="color:#409eff" v-if="scope.row.binding_state==1" @click="openWechatBindDialog">已绑定</a>
  407. <a style="color:#409eff" v-else @click="openWechatBindDialog">生成</a>
  408. </template>
  409. </el-table-column> -->
  410. <el-table-column label="登记日期" min-width="120" align="center">
  411. <template slot-scope="scope">
  412. <span>{{ scope.row.created_time | parseTime('{y}-{m}-{d}') }}</span>
  413. </template>
  414. </el-table-column>
  415. <el-table-column label="转归" align="center">
  416. <template slot-scope="scope">
  417. <span>{{ LapsetoInfo(scope.row) }}</span>
  418. </template>
  419. </el-table-column>
  420. <el-table-column label="转出(死亡)时间" min-width="134" align="center">
  421. <template slot-scope="scope">
  422. <!-- <span>{{getTime(scope.row.death_time)}}</span>-->
  423. <span v-if="scope.row.lapseto == 1"> </span>
  424. <span v-else >{{getTime(scope.row.death_time)}}</span>
  425. </template>
  426. </el-table-column>
  427. <el-table-column label="转出(死亡)原因" align="center" min-width="150">
  428. <template slot-scope="scope">
  429. <!-- <span>{{scope.row.out_reason}}</span>-->
  430. <span v-if="scope.row.lapseto == 1"> </span>
  431. <span v-else >{{scope.row.out_reason}}</span>
  432. </template>
  433. </el-table-column>
  434. <el-table-column label="操作" align="center" min-width="140">
  435. <template slot-scope="scope">
  436. <el-tooltip
  437. class="item"
  438. effect="dark"
  439. content="转归"
  440. placement="top"
  441. >
  442. <el-button
  443. type="primary"
  444. icon="el-icon-edit"
  445. size="small"
  446. @click="OpenSetLapseto(scope.row, scope.$index)"
  447. ></el-button>
  448. </el-tooltip>
  449. <el-tooltip
  450. class="item"
  451. effect="dark"
  452. content="流转记录"
  453. placement="top"
  454. >
  455. <el-button
  456. type="danger"
  457. icon="el-icon-tickets"
  458. size="small"
  459. @click="toOpen(scope.row.id)"
  460. ></el-button>
  461. </el-tooltip>
  462. </template>
  463. </el-table-column>
  464. </el-table>
  465. <!-- <pagi-nation title="分页"></pagi-nation> -->
  466. <el-pagination
  467. @size-change="handleSizeChange"
  468. @current-change="handleCurrentChange"
  469. :current-page="listQuery.page"
  470. :page-sizes="[10, 20, 50, 100,200,500,1000,2000]"
  471. :page-size="listQuery.limit"
  472. background
  473. style="margin-top:20px;"
  474. align="right"
  475. layout="total, sizes, prev, pager, next, jumper"
  476. :total="total"
  477. >
  478. </el-pagination>
  479. <el-dialog
  480. title="微信绑定"
  481. :visible.sync="bindWechatDialog"
  482. width="30%"
  483. center
  484. >
  485. <img :src="wechatbindimg" width="100%" alt="" v-if="wechatbindimg"/>
  486. <i class="el-icon-loading" v-else></i>
  487. <span slot="footer" class="dialog-footer">
  488. <el-button type="primary" @click="bindWechatDialog = false"
  489. >关闭</el-button
  490. >
  491. </span>
  492. </el-dialog>
  493. <el-dialog title="转归" :visible.sync="LapsetoDialogVisible">
  494. <el-form
  495. :model="lapsetoForm"
  496. :rules="lapsetoRules"
  497. ref="lapsetoForm"
  498. label-width="140px"
  499. >
  500. <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
  501. <el-radio-group v-model="lapsetoForm.lapseto_type">
  502. <el-radio
  503. v-for="item in lapsetoOptions"
  504. :key="item.value"
  505. :label="item.value"
  506. :value="item.value"
  507. >{{ item.label }}
  508. </el-radio
  509. >
  510. </el-radio-group>
  511. </el-form-item>
  512. <el-form-item label="转归(死亡)时间 :" prop="lapseto_time" required v-if="lapsetoForm.lapseto_type == 2 || lapsetoForm.lapseto_type == 3">
  513. <el-date-picker
  514. v-model="lapsetoForm.lapseto_time"
  515. type="date"
  516. format="yyyy-MM-dd"
  517. value-format="yyyy-MM-dd"
  518. placeholder="选择日期时间"
  519. default-time="12:00:00"
  520. >
  521. </el-date-picker>
  522. </el-form-item>
  523. <el-form-item label="转出(死亡)原因:" v-if="lapsetoForm.lapseto_type == 2 || lapsetoForm.lapseto_type == 3">
  524. <el-input v-model="lapsetoForm.out_reason"></el-input>
  525. </el-form-item>
  526. <el-form-item label="开始时间:" v-if="lapsetoForm.lapseto_type != 2 && lapsetoForm.lapsetoType !=3">
  527. <el-date-picker
  528. size="small"
  529. v-model="form.patient_start_time"
  530. prefix-icon="el-icon-date"
  531. :editable="false"
  532. style="width: 150px;"
  533. type="date"
  534. placeholder="选择日期时间"
  535. align="right"
  536. format="yyyy-MM-dd"
  537. value-format="yyyy-MM-dd"
  538. ></el-date-picker>
  539. </el-form-item>
  540. <el-form-item label="结束时间:" v-if="lapsetoForm.lapseto_type != 2 && lapsetoForm.lapsetoType !=3">
  541. <el-date-picker
  542. size="small"
  543. v-model="form.patient_end_time"
  544. prefix-icon="el-icon-date"
  545. :editable="false"
  546. style="width: 150px;"
  547. type="date"
  548. placeholder="选择日期时间"
  549. align="right"
  550. format="yyyy-MM-dd"
  551. value-format="yyyy-MM-dd"
  552. ></el-date-picker>
  553. </el-form-item>
  554. <el-form-item label="转院地区:" v-if="lapsetoForm.lapseto_type == 4">
  555. <el-select v-model="form.patient_address" placeholder="请选择">
  556. <el-option
  557. v-for="item in liuAddresslist"
  558. :key="item.id"
  559. :label="item.name"
  560. :value="item.name">
  561. </el-option>
  562. </el-select>
  563. </el-form-item>
  564. </el-form>
  565. <div slot="footer" class="dialog-footer">
  566. <el-button @click="LapsetoDialogVisible = false">取 消</el-button>
  567. <el-button type="primary" @click="EditLapseto()">保 存</el-button>
  568. </div>
  569. </el-dialog>
  570. <el-dialog
  571. title="签到卡"
  572. :visible.sync="centerDialogVisible"
  573. :close-on-click-modal="false"
  574. @opened="ShowQRCode()"
  575. width="30%"
  576. center
  577. >
  578. <div align="center" style="margin-bottom:6px;font-size:20px">
  579. <!-- 姓名:<el-input v-model="name" size="small" style="width:200px"></el-input><br> -->
  580. 姓名:<span>{{ this.name }}</span>
  581. </div>
  582. <div align="center" style="margin-bottom:10px;font-size:20px">
  583. <!-- 透析号:<el-input v-model="dialysis_no" size="small" style="width:200px"></el-input><br> -->
  584. 透析号:<span>{{ this.dialysis_no }}</span>
  585. </div>
  586. <div id="qrcode" align="center"></div>
  587. <span slot="footer" class="dialog-footer">
  588. <!-- <el-button type="primary" @click="download()">下载</el-button> -->
  589. <el-button type="primary" @click="print()">打印</el-button>
  590. </span>
  591. </el-dialog>
  592. <div hidden="hidden">
  593. <div id="print-card-info">
  594. <div
  595. class="order_title"
  596. align="center"
  597. style="margin-bottom:20px;font-size:35px"
  598. >
  599. 签到卡
  600. </div>
  601. <div align="center" style="margin-bottom:4px;font-size:25px">
  602. 姓名:<span>&nbsp;&nbsp;{{ this.name }}</span
  603. ><br/>
  604. </div>
  605. <div align="center" style="margin-bottom:20px;font-size:25px">
  606. 透析号:<span>&nbsp;&nbsp;{{ this.dialysis_no }}</span>
  607. </div>
  608. <div>
  609. <div id="code" align="center"></div>
  610. </div>
  611. </div>
  612. </div>
  613. </div>
  614. <el-dialog title="传染病检查提醒通知" :visible.sync="dialogTableVisible">
  615. <el-table :data="gridData">
  616. <el-table-column property="date" align="center" label="姓名" width="150">
  617. <template slot-scope="scope">{{scope.row.name}}</template>
  618. </el-table-column>
  619. <el-table-column property="name" align="center" label="检查日期" width="200">
  620. <template slot-scope="scope">
  621. <span
  622. v-if="dateCompare(scope.row.infectious_next_record_time) == 1"
  623. >
  624. <span v-if="parseInt(scope.row.infectious_next_record_time)>100000000">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
  625. </span>
  626. <span
  627. v-if="dateCompare(scope.row.infectious_next_record_time) == 2"
  628. style="color: red"
  629. >
  630. <span v-if="parseInt(scope.row.infectious_next_record_time)>100000000">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
  631. </span>
  632. </template>
  633. </el-table-column>
  634. <el-table-column property="address" align="center" label="操作">
  635. <template slot-scope="scope">
  636. <el-button size="mini" type="primary" @click="jump(scope.row.id)">查看</el-button>
  637. </template>
  638. </el-table-column>
  639. </el-table>
  640. <el-pagination
  641. @size-change="handleSizeChangeOne"
  642. @current-change="handleCurrentChangeOne"
  643. :page-size="5"
  644. :page-sizes="[10, 20, 50, 100,500,1000,2000]"
  645. background
  646. style="margin-top:20px;float: right"
  647. :total="value"
  648. ></el-pagination>
  649. </el-dialog>
  650. <el-dialog
  651. title="流转记录"
  652. :visible.sync="patieintDialogVisible"
  653. width="50%">
  654. <span>
  655. <el-table
  656. :data="patientAllgicList"
  657. border
  658. style="width: 100%">
  659. <el-table-column prop="date" label="序号" width="100" align="center">
  660. <template slot-scope="scope">
  661. {{ scope.$index + 1 }}
  662. </template>
  663. </el-table-column>
  664. <el-table-column prop="date" label="转归方式" width="100" align="center">
  665. <template slot-scope="scope">
  666. {{getPatientSource(scope.row.patient_source) }}
  667. </template>
  668. </el-table-column>
  669. <el-table-column prop="name" label="开始时间" width="180" align="center">
  670. <template slot-scope="scope" >
  671. {{ getTime(scope.row.start_time) }}
  672. </template>
  673. </el-table-column>
  674. <el-table-column prop="name" label="结束时间" width="180" align="center">
  675. <template slot-scope="scope" >
  676. {{ getTime(scope.row.end_time) }}
  677. </template>
  678. </el-table-column>
  679. <el-table-column prop="date" label="转院地区" width="180" align="center">
  680. <template slot-scope="scope">
  681. {{ scope.row.patient_address }}
  682. </template>
  683. </el-table-column>
  684. </el-table>
  685. </span>
  686. <span slot="footer" class="dialog-footer">
  687. <el-button @click="patieintDialogVisible = false">取 消</el-button>
  688. </span>
  689. </el-dialog>
  690. </div>
  691. </template>
  692. <script>
  693. import { fetchAllAdminUsers } from "@/api/doctor";
  694. import { code, EditLapseto, fetchList, getMaxDialysisNo, OpenView, postExportPatients,GetRemind,getPatientAllagic } from '@/api/patient'
  695. import { generateLog } from '@/api/config'
  696. import QRCode from 'qrcodejs2'
  697. import Vue from 'vue'
  698. import { Base64 } from 'js-base64'
  699. import { jsGetAge,uParseTime } from '@/utils/tools'
  700. import { log } from 'util'
  701. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  702. import UploadExcel from '@/xt_pages/components/UploadExcel'
  703. import { getDataConfig } from "@/utils/data";
  704. export default {
  705. name: 'Patient',
  706. components: {
  707. UploadExcel,
  708. BreadCrumb
  709. },
  710. data() {
  711. return {
  712. logs: [],
  713. downloadUrl: 'https://kuyi.shengws.com/patient_template.xltx',
  714. crumbs: [
  715. { path: false, name: '病人管理' },
  716. { path: '/patients/patients', name: '病人管理' }
  717. ],
  718. lapsetoRules: {
  719. lapseto_type: [{ required: true, message: '请选择治疗状态' }],
  720. lapseto_time: [{ required: true, message: '请选择时间' }]
  721. },
  722. currentIndex: -1,
  723. LapsetoDialogVisible: false,
  724. centerDialogVisible: false,
  725. checkAll: false,
  726. isIndeterminate: true,
  727. dialogVisible: false,
  728. exportLogVisible: false,
  729. exportVisible:false,
  730. phoneVisible:false,
  731. idCardNoVisible:false,
  732. patieintDialogVisible:false,
  733. wechatbindimg: '',
  734. isShow:true,
  735. active: true,
  736. schedulType: 0,
  737. lapsetoForm: {
  738. lapseto_type: 0,
  739. lapseto_time: '',
  740. patient_id: 0,
  741. out_reason:''
  742. },
  743. schedulArr: [
  744. { value: 0, label: '全部' },
  745. { value: 1, label: '上午' },
  746. { value: 2, label: '下午' },
  747. { value: 3, label: '晚上' }
  748. ],
  749. lapsetoOptions: [
  750. { value: 1, label: '留治' },
  751. { value: 2, label: '转出' },
  752. { value: 3, label: "死亡" },
  753. { value: 4, label: "转院" },
  754. { value: 5, label:"肾移植"},
  755. { value: 6, label:"转腹透"},
  756. { value:7, label:"出院"},
  757. { value:8, label:"好转"},
  758. { value:9, label:"放弃治疗"},
  759. { value:10, label:"其他状态"},
  760. { value:11, label:"请假"},
  761. ],
  762. systemType: 0,
  763. systemArr: [
  764. { value: 0, label: '全部' },
  765. { value: 1, label: '已绑定' },
  766. { value: 2, label: '未绑定' }
  767. ],
  768. sourceType: 0,
  769. patientSoureType:0,
  770. sourceID: 0,
  771. lapsetoType: 1,
  772. sourceArr: [
  773. { value: 0, label: '全部', source: 0, lapseto: 0 },
  774. // { value: 1, label: "转出", source: 0, lapseto: 2 },
  775. // { value: 2, label: "留治", source: 0, lapseto: 1 },
  776. { value: 1, label: '门诊', source: 1, lapseto: 1 },
  777. { value: 2, label: '住院', source: 2, lapseto: 1 },
  778. { value: 3, label: '门特', source: 3, lapseto: 1 }
  779. ],
  780. patientSourceList:[
  781. {value:0,label:"全部",source:0,lapeseto:0},
  782. {value:1,label:"门诊",source:1,lapeseto:1},
  783. {value:2,label:"住院",source:2,lapeseto:2},
  784. {value:3,label:"门特",source:3,lapeseto:3},
  785. ],
  786. lapsetoArr: [
  787. { value: 0, label: '全部', source: 0, lapseto: 0 },
  788. { value: 1, label: '转出', source: 0, lapseto: 2 },
  789. { value: 2, label: '留治', source: 0, lapseto: 1 },
  790. { value: 3, label: '死亡', source:0, lapseto: 3 },
  791. { value: 4, label: "转院", source: 0, lapseto: 4 },
  792. { value: 5, label: "肾移植", source: 0, lapseto: 5 },
  793. { value: 6, label: "转腹透", source: 0, lapseto: 6 },
  794. { value: 7, label: "出院", source: 0, lapseto: 7 },
  795. { value: 8, label: "好转", source: 0, lapseto: 8 },
  796. { value: 9, label: "放弃治疗", source: 0, lapseto: 9 },
  797. { value: 10, label: "其他状态", source: 0, lapseto: 10 },
  798. { value: 11, label: "请假", source: 0, lapseto: 11 },
  799. ],
  800. scheduling: [
  801. {
  802. value: 1,
  803. label: '已排班'
  804. },
  805. {
  806. value: 2,
  807. label: '未排班'
  808. }
  809. ],
  810. prescription: [
  811. {
  812. value: 1,
  813. label: '有处方'
  814. },
  815. {
  816. value: 2,
  817. label: '无处方'
  818. }
  819. ],
  820. tableData: null,
  821. searchKey: '',
  822. // value2: '',
  823. total: 0,
  824. pageTotal: 0,
  825. dialysisVisible:false,
  826. pageSelect: 0,
  827. max_dialysis_no: '',
  828. listQuery: {
  829. page: 1,
  830. limit: 10,
  831. schedul_type: 0,
  832. binding_state: 0,
  833. lapseto: 1,
  834. source: 0,
  835. start_time: '',
  836. end_time: '',
  837. keywords: '',
  838. contagion: '',
  839. reimbursement_way: '',
  840. isscheduling: '',
  841. isprescription: '',
  842. patientSoureType:'',
  843. nurse:0,
  844. },
  845. multipleSelection: [],
  846. bindWechatDialog: false,
  847. contagionList: [],
  848. reimbursement_ways: [],
  849. patient: null,
  850. id: '',
  851. name: '',
  852. dialysis_no: '',
  853. patientPrint: {},
  854. patient_id: '',
  855. gender: '',
  856. idcardno: '',
  857. phone: '',
  858. healthcareno: '',
  859. startTime: '',
  860. export_date: [],
  861. lapeseto:"",
  862. value:13,
  863. dialogTableVisible:false,
  864. gridData:[],
  865. totalOne: 0,
  866. page: 1,
  867. limit: 5,
  868. patientAllgicList:[],
  869. liuAddresslist:[],
  870. form:{
  871. patient_address:"",
  872. patient_start_time:"",
  873. patient_end_time:"",
  874. nurse:"0"
  875. },
  876. adminUserOptions:[]
  877. }
  878. },
  879. created() {
  880. this.liuAddresslist = getDataConfig('hemodialysis', 'liu_address')
  881. if(sessionStorage.getItem('patientPageSize')){
  882. this.listQuery.limit = parseInt(sessionStorage.getItem('patientPageSize'))
  883. }
  884. this.getList()
  885. this.contagionList = this.$store.getters.contagions
  886. this.reimbursement_ways = this.$store.getters.reimbursement_ways
  887. const keyword = this.$route.query && this.$route.query.keyword
  888. if (typeof keyword === 'string' && keyword.length > 0) {
  889. this.listQuery.keywords = keyword
  890. this.searchKey = keyword
  891. }
  892. //获取
  893. this.GetRemindPatientList()
  894. this.fetchAllAdminUsers();
  895. },
  896. methods: {
  897. fetchAllAdminUsers() {
  898. fetchAllAdminUsers().then((response) => {
  899. if (response.data.state === 1) {
  900. var obj ={id:0,name:"全部"}
  901. this.adminUserOptions.push(obj)
  902. for(let i=0;i<response.data.data.users.length;i++){
  903. this.adminUserOptions.push(response.data.data.users[i])
  904. }
  905. }
  906. });
  907. },
  908. putOnRecord:function(type,row){
  909. if(type == 1){
  910. }else{
  911. }
  912. },
  913. generateTxt: function(log) {
  914. var content = ''
  915. var errlog = log.err_logs
  916. content = this.getContent(log)
  917. for (let i = 0; i < errlog.length; i++) {
  918. if (content.length == 0) {
  919. content = errlog[i].err_msg
  920. } else {
  921. content = content + '\n' + errlog[i].err_msg
  922. }
  923. }
  924. var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
  925. if (typeof url === 'object' && url instanceof Blob) {
  926. url = URL.createObjectURL(url) // 创建blob地址
  927. }
  928. const aLink = document.createElement('a')
  929. aLink.href = url
  930. aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
  931. aLink.click()
  932. },
  933. getContent(log) {
  934. return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
  935. },
  936. timestampToTime(timestamp) {
  937. var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  938. var Y = date.getFullYear() + '年'
  939. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
  940. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
  941. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
  942. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
  943. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
  944. return Y + M + D + h + m + s
  945. },
  946. generateLog() {
  947. let params = {
  948. 'log_type': 1
  949. }
  950. generateLog(params).then(
  951. response => {
  952. if (response.data.state === 1) {
  953. this.logs = response.data.data.logs
  954. this.exportLogVisible = true
  955. } else {
  956. this.$message.error(response.data.msg)
  957. }
  958. }
  959. )
  960. },
  961. handleSuccess({ results, header }) {
  962. if (header != undefined && header.length > 0) {
  963. var isHasName = header.includes('*姓名')
  964. var isHasGender = header.includes('*性别')
  965. var isHasPhone = header.includes('*手机号')
  966. var isHasIdCard = header.includes('*身份证号')
  967. var isHasDate = header.includes('*首次肾脏治疗时间')
  968. var isHasSource = header.includes('*患者来源')
  969. var isHasLapseto = header.includes('*治疗状态')
  970. var isHasInfectious = header.includes('*传染病')
  971. var isHasDiagnose = header.includes('诊断')
  972. var isHasDialysisNo = header.includes('透析号')
  973. var isHasDryWeight = header.includes('干体重(kg)')
  974. var isHasHeight = header.includes('身高(cm)')
  975. var isHasHomeAddress = header.includes('家庭住址')
  976. if (!(isHasName && isHasGender && isHasPhone && isHasIdCard && isHasDate && isHasSource && isHasLapseto && isHasInfectious && isHasDiagnose && isHasDialysisNo && isHasDryWeight && isHasHeight && isHasHomeAddress)) {
  977. this.dialogVisible = true
  978. return
  979. }
  980. } else {
  981. this.dialogVisible = true
  982. return
  983. }
  984. getMaxDialysisNo().then(response => {
  985. if (response.data.state === 1) {
  986. this.max_dialysis_no = response.data.data.dialysis_no
  987. if (this.max_dialysis_no == 0) {
  988. this.max_dialysis_no = 1
  989. } else {
  990. this.max_dialysis_no++
  991. }
  992. this.export_date = []
  993. for (let i = 1; i < results.length; i++) {
  994. let obj = {}
  995. for (var key in results[i]) {
  996. if (results[i]['*姓名'] === undefined) {
  997. obj['name'] = ''
  998. } else {
  999. if (key == '*姓名') {
  1000. obj['name'] = results[i][key].replace(/\s/g,"")
  1001. }
  1002. }
  1003. if (results[i]['*性别'] === undefined) {
  1004. obj['gender'] = '0'
  1005. } else {
  1006. if (key == '*性别') {
  1007. if (results[i][key] == '男') {
  1008. obj['gender'] = '1'
  1009. } else if (results[i][key] == '女') {
  1010. obj['gender'] = '2'
  1011. } else {
  1012. obj['gender'] = '0'
  1013. }
  1014. }
  1015. }
  1016. if (results[i]['*手机号'] === undefined) {
  1017. obj['phone'] = ''
  1018. } else {
  1019. if (key == '*手机号') {
  1020. obj['phone'] = results[i][key].replace(/\s/g,"")
  1021. }
  1022. }
  1023. if (results[i]['*身份证号'] === undefined) {
  1024. obj['id_card_no'] = ''
  1025. } else {
  1026. if (key == '*身份证号') {
  1027. obj['id_card_no'] = results[i][key].replace(/\s/g,"")
  1028. }
  1029. }
  1030. if (results[i]['*首次肾脏治疗时间'] === undefined) {
  1031. obj['first_treatment_date'] = ''
  1032. } else {
  1033. if (key == '*首次肾脏治疗时间') {
  1034. var month = parseInt(results[i][key].replace(/\s/g,"").split('/')[0])
  1035. var day = parseInt(results[i][key].replace(/\s/g,"").split('/')[1])
  1036. var year = parseInt(results[i][key].replace(/\s/g,"").split('/')[2])
  1037. if (year < 10) {
  1038. year = '0' + year
  1039. }
  1040. if (day < 10) {
  1041. day = '0' + day
  1042. }
  1043. if (month < 10) {
  1044. month = '0' + month
  1045. }
  1046. obj['first_treatment_date'] = '20' + year.toString() + '/' + month.toString() + '/' + day.toString()
  1047. }
  1048. }
  1049. if (results[i]['*患者来源'] === undefined) {
  1050. obj['source'] = '3'
  1051. } else {
  1052. if (key == '*患者来源') {
  1053. if (results[i][key] == '门诊') {
  1054. obj['source'] = '1'
  1055. } else if (results[i][key] == '住院') {
  1056. obj['source'] = '2'
  1057. } else if (results[i][key] == '门特') {
  1058. obj['source'] = '3'
  1059. } else {
  1060. obj['source'] = '0'
  1061. }
  1062. }
  1063. }
  1064. if (results[i]['*治疗状态'] === undefined) {
  1065. obj['lapseto'] = '3'
  1066. } else {
  1067. if (key == '*治疗状态') {
  1068. if (results[i][key] == '留治') {
  1069. obj['lapseto'] = '1'
  1070. } else if (results[i][key] == '转归') {
  1071. obj['lapseto'] = '2'
  1072. } else {
  1073. obj['lapseto'] = '0'
  1074. }
  1075. }
  1076. }
  1077. if (results[i]['*传染病'] === undefined) {
  1078. let contagions = []
  1079. obj['is_infectious'] = '3'
  1080. obj['contagions'] = contagions
  1081. } else {
  1082. if (key == '*传染病') {
  1083. if (results[i][key] == '无') {
  1084. let contagions = []
  1085. obj['is_infectious'] = '1'
  1086. obj['contagions'] = contagions
  1087. } else if (results[i][key] == '乙肝') {
  1088. let contagions = []
  1089. contagions.push(2)
  1090. obj['is_infectious'] = '2'
  1091. obj['contagions'] = contagions
  1092. } else if (results[i][key] == '丙肝') {
  1093. let contagions = []
  1094. contagions.push(3)
  1095. obj['is_infectious'] = '2'
  1096. obj['contagions'] = contagions
  1097. } else if (results[i][key] == '艾滋病') {
  1098. let contagions = []
  1099. contagions.push(4)
  1100. obj['is_infectious'] = '2'
  1101. obj['contagions'] = contagions
  1102. } else if (results[i][key] == '肺结核') {
  1103. let contagions = []
  1104. contagions.push(5)
  1105. obj['is_infectious'] = '2'
  1106. obj['contagions'] = contagions
  1107. } else if (results[i][key] == '梅毒') {
  1108. let contagions = []
  1109. contagions.push(6)
  1110. obj['is_infectious'] = '2'
  1111. obj['contagions'] = contagions
  1112. } else {
  1113. let contagions = []
  1114. obj['is_infectious'] = '0'
  1115. obj['contagions'] = contagions
  1116. }
  1117. }
  1118. }
  1119. if (results[i]['诊断'] === undefined) {
  1120. obj['diagnose'] = ''
  1121. } else {
  1122. if (key == '诊断') {
  1123. obj['diagnose'] = results[i][key]
  1124. }
  1125. }
  1126. // console.log(obj)
  1127. if (results[i]['透析号'] === undefined) {
  1128. obj['dialysis_no'] = ''
  1129. } else {
  1130. if (key == '透析号') {
  1131. obj['dialysis_no'] = results[i][key].replace(/\s/g,"")
  1132. }
  1133. }
  1134. // console.log(obj)
  1135. if (results[i]['干体重(kg)'] === undefined) {
  1136. obj['dry_weight'] = ''
  1137. } else {
  1138. if (key == '干体重(kg)') {
  1139. obj['dry_weight'] = results[i][key].replace(/\s/g,"")
  1140. }
  1141. }
  1142. // console.log(obj)
  1143. if (results[i]['身高(cm)'] === undefined) {
  1144. obj['height'] = ''
  1145. } else {
  1146. if (key == '身高(cm)') {
  1147. obj['height'] = results[i][key].replace(/\s/g,"")
  1148. }
  1149. }
  1150. console.log("2222222",obj)
  1151. if (results[i]['家庭住址'] === undefined) {
  1152. obj['home_address'] = ''
  1153. } else {
  1154. if (key == '家庭住址') {
  1155. obj['home_address'] = results[i][key]
  1156. }
  1157. }
  1158. }
  1159. this.export_date.push(obj)
  1160. }
  1161. let index = 0
  1162. for (let i = 0; i < this.export_date.length; i++) {
  1163. if (this.export_date[i].dialysis_no == '') {
  1164. let new_dialysis_no = this.max_dialysis_no + index
  1165. // console.log(new_dialysis_no)
  1166. index++
  1167. let no = new_dialysis_no.toString()
  1168. // console.log(no)
  1169. let rep = 3 - no.length
  1170. // console.log(rep)
  1171. let tempNo = ""
  1172. if (rep == 1){
  1173. tempNo = "0"
  1174. }
  1175. if (rep == 2){
  1176. tempNo = "00"
  1177. }
  1178. // console.log(tempNo)
  1179. if (rep > 0) {
  1180. no = tempNo + no
  1181. }
  1182. this.export_date[i].dialysis_no = no
  1183. }
  1184. }
  1185. // console.log(this.export_date)
  1186. var tempExportDate = this.export_date
  1187. var tempExportDateOne = this.export_date
  1188. var tempExportDateTwo = this.export_date
  1189. const obj2 = {}
  1190. tempExportDate = tempExportDate.reduce((cur, next) => {
  1191. obj2[next.dialysis_no] ? '' : obj2[next.dialysis_no] = true && cur.push(next)
  1192. return cur
  1193. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1194. if (tempExportDate.length < this.export_date.length){
  1195. this.dialysisVisible = true
  1196. return
  1197. }
  1198. const obj3 = {}
  1199. tempExportDateOne = tempExportDateOne.reduce((cur, next) => {
  1200. obj3[next.phone] ? '' : obj3[next.phone] = true && cur.push(next)
  1201. return cur
  1202. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1203. if (tempExportDateOne.length < this.export_date.length){
  1204. this.phoneVisible = true
  1205. return
  1206. }
  1207. const obj4 = {}
  1208. tempExportDateTwo = tempExportDateTwo.reduce((cur, next) => {
  1209. obj4[next.id_card_no] ? '' : obj4[next.id_card_no] = true && cur.push(next)
  1210. return cur
  1211. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1212. if (tempExportDateTwo.length < this.export_date.length){
  1213. this.idCardNoVisible = true
  1214. return
  1215. }
  1216. // this.exportVisible = true
  1217. this.$alert('您提交的患者名单已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
  1218. confirmButtonText: '确定',
  1219. callback: action => {
  1220. }
  1221. });
  1222. this.isShow = false
  1223. let params = {
  1224. 'patients': this.export_date
  1225. }
  1226. console.log("export2222",this.export_date)
  1227. postExportPatients(params).then(
  1228. response => {
  1229. if (response.data.state === 1) {
  1230. this.getList()
  1231. this.isShow = true
  1232. } else {
  1233. this.isShow = true
  1234. this.$message.error(response.data.msg)
  1235. }
  1236. }
  1237. )
  1238. }
  1239. }
  1240. )
  1241. },
  1242. getCount(row) {
  1243. return row.total_dialysis + row.user_sys_before_count
  1244. },
  1245. EditLapseto() {
  1246. if(this.lapsetoForm.lapeseto ==2 || this.lapsetoForm.lapeseto == 3 ){
  1247. if (this.lapsetoForm.lapseto_time == '') {
  1248. this.$message.error('请选择时间')
  1249. return
  1250. }
  1251. }
  1252. // if(this.lapeseto == "留治"){
  1253. // this.lapsetoForm.lapseto_type = 1
  1254. // }
  1255. // if(this.lapeseto == "转出"){
  1256. // this.lapsetoForm.lapseto_type = 2
  1257. // }
  1258. // if(this.lapeseto == "死亡"){
  1259. // this.lapsetoForm.lapseto_type = 3
  1260. // }
  1261. console.log("22222",this.lapsetoForm)
  1262. EditLapseto(this.lapsetoForm.patient_id, this.lapsetoForm,this.form.patient_start_time,this.form.patient_end_time,this.form.patient_address).then(
  1263. response => {
  1264. if (response.data.state === 1) {
  1265. this.$notify({
  1266. title: '成功',
  1267. message: '转归设置完成',
  1268. type: 'success',
  1269. duration: 2000
  1270. })
  1271. this.tableData[this.currentIndex].lapseto = this.lapsetoForm.lapseto_type
  1272. this.tableData[this.currentIndex].out_reason = this.lapsetoForm.out_reason
  1273. this.currentIndex = -1
  1274. this.LapsetoDialogVisible = false
  1275. } else {
  1276. this.$message.error(response.data.msg)
  1277. }
  1278. }
  1279. )
  1280. },
  1281. OpenSetLapseto(row, index) {
  1282. // if(row.lapseto == 1){
  1283. // this.lapeseto = "转出"
  1284. // }
  1285. // if(row.lapseto == 2){
  1286. // this.lapeseto = "留治"
  1287. // }
  1288. // if(row.lapeseto == 3){
  1289. // this.lapeseto = "死亡"
  1290. // }
  1291. this.patient = row
  1292. this.currentIndex = index
  1293. this.lapsetoForm.lapseto_time = ''
  1294. this.lapsetoForm.lapseto_type = row.lapseto
  1295. this.lapsetoForm.patient_id = row.id
  1296. this.lapsetoForm.out_reason = row.out_reason
  1297. this.LapsetoDialogVisible = true
  1298. },
  1299. LapsetoInfo(row) {
  1300. console.log("row",row)
  1301. if (row.lapseto === 1) {
  1302. return '留治'
  1303. } else if(row.lapseto === 2) {
  1304. return '转出'
  1305. }else if(row.lapseto === 3){
  1306. return '死亡'
  1307. }else if(row.lapseto == 4){
  1308. return "转院"
  1309. }else if(row.lapseto == 5){
  1310. return "肾移植"
  1311. }else if(row.lapseto == 6){
  1312. return "转腹透"
  1313. }else if(row.lapseto == 7){
  1314. return "出院"
  1315. }else if(row.lapseto == 8){
  1316. return "好转"
  1317. }else if (row.lapseto == 9){
  1318. return "放弃治疗"
  1319. }else if (row.lapseto == 10){
  1320. return "其他状态"
  1321. }else if(row.lapseto == 11){
  1322. return "请假"
  1323. }
  1324. },
  1325. getPatientSource(val){
  1326. if(val === 1) {
  1327. return '留治'
  1328. }else if(val === 2) {
  1329. return '转出'
  1330. }else if(val === 3){
  1331. return '死亡'
  1332. }else if(val == 4){
  1333. return "转院"
  1334. }else if(val == 5){
  1335. return "肾移植"
  1336. }else if(val == 6){
  1337. return "转腹透"
  1338. }else if(val == 7){
  1339. return "出院"
  1340. }else if(val== 8){
  1341. return "好转"
  1342. }else if (val == 9){
  1343. return "放弃治疗"
  1344. }else if (val == 10){
  1345. return "其他状态"
  1346. }else if (val == 11){
  1347. return "请假"
  1348. }
  1349. },
  1350. openWechatBindDialog() {
  1351. this.bindWechatDialog = true
  1352. },
  1353. handleCheckAllChange(val) {
  1354. // console.log(val)
  1355. // console.log(this.checkAll)
  1356. // console.log(this.isIndeterminate)
  1357. },
  1358. handleSelectionChange(val) {
  1359. this.multipleSelection = val
  1360. this.pageSelect = this.multipleSelection.length
  1361. },
  1362. handleCheckedCitiesChange(value) {
  1363. const checkedCount = value.length
  1364. this.checkAll = checkedCount === this.cities.length
  1365. this.isIndeterminate =
  1366. checkedCount > 0 && checkedCount < this.cities.length
  1367. },
  1368. handleSizeChange(val) {
  1369. sessionStorage.setItem('patientPageSize',val)
  1370. this.listQuery.limit = val
  1371. this.getList()
  1372. },
  1373. handleCurrentChange(val) {
  1374. this.listQuery.page = val
  1375. this.getList()
  1376. },
  1377. changeCategoryId(categoryId) {
  1378. this.categoryId = categoryId
  1379. },
  1380. selectSchedulType(scheduleType) {
  1381. // alert(scheduleType);/
  1382. this.schedulType = scheduleType
  1383. this.listQuery.schedul_type = scheduleType
  1384. this.getList()
  1385. },
  1386. selectSystemType(systemType) {
  1387. this.systemType = systemType
  1388. this.listQuery.binding_state = systemType
  1389. this.getList()
  1390. },
  1391. selectLapseTo(lapseto) {
  1392. this.lapsetoType = lapseto
  1393. this.listQuery.lapseto = lapseto
  1394. this.getList()
  1395. },
  1396. selectSource(source) {
  1397. this.sourceType = source
  1398. this.listQuery.source = source
  1399. this.getList()
  1400. },
  1401. selectPatientSource(source){
  1402. this.patientSoureType = source
  1403. this.listQuery.patientSoureType = source
  1404. this.getList()
  1405. },
  1406. changeTimeOne(val) {
  1407. var time = this.getTimestamp(val) - this.end_time
  1408. if (time > 0) {
  1409. this.$message.error('结束时间不能小于开始时间')
  1410. this.listQuery.start_time = ''
  1411. } else {
  1412. this.getList()
  1413. this.startTime = this.getTimestamp(val)
  1414. }
  1415. },
  1416. changeTime(val) {
  1417. var time = this.getTimestamp(val) - this.startTime
  1418. if (time < 0) {
  1419. this.$message.error('结束时间不能小于开始时间')
  1420. this.listQuery.end_time = ''
  1421. } else {
  1422. this.getList()
  1423. this.end_time = this.getTimestamp(val)
  1424. }
  1425. },
  1426. getTimestamp(time) {
  1427. // 把时间日期转成时间戳
  1428. return new Date(time).getTime() / 1000
  1429. },
  1430. search() {
  1431. this.listQuery.keywords = this.searchKey
  1432. this.getList()
  1433. },
  1434. changeOtherSearch() {
  1435. this.getList()
  1436. },
  1437. changeNuseSearch(){
  1438. this.getList()
  1439. },
  1440. getList() {
  1441. console.log("query23323223wo",this.listQuery)
  1442. fetchList(this.listQuery).then(response => {
  1443. if (response.data.state === 0) {
  1444. this.$message.error(response.data.msg)
  1445. return false
  1446. } else {
  1447. this.tableData = response.data.data.patients
  1448. console.log("wowowowo",this.tableData)
  1449. this.pageTotal = this.tableData.length
  1450. this.total = response.data.data.total
  1451. }
  1452. })
  1453. },
  1454. OpenView(name, number, id) {
  1455. this.name = name
  1456. this.dialysis_no = number
  1457. this.centerDialogVisible = true
  1458. OpenView(id).then(response => {
  1459. if (response.data.state === 0) {
  1460. this.$message.error(response.data.msg)
  1461. return false
  1462. } else {
  1463. var patient = response.data.data.patient
  1464. console.log('二维码病人信息', patient)
  1465. this.id = patient.id
  1466. this.name = patient.name
  1467. this.gender = patient.gender
  1468. this.idcardno = patient.id_card_no
  1469. this.phone = patient.phone
  1470. this.healthcareno = patient.health_care_no
  1471. }
  1472. })
  1473. },
  1474. ShowQRCode() {
  1475. document.getElementById('qrcode').innerHTML = ''
  1476. this.qrcode = this.$QRCode()
  1477. },
  1478. download() {
  1479. alert('aaaa')
  1480. },
  1481. print() {
  1482. var ptime = Math.round(new Date().getTime() / 1000)
  1483. this.print_time = uParseTime(ptime, '{y}年{m}月{d}日')
  1484. const style =
  1485. '@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;} }'
  1486. setTimeout(() => {
  1487. printJS({
  1488. printable: 'print-card-info',
  1489. type: 'html',
  1490. style: style,
  1491. scanStyles: false
  1492. })
  1493. }, 1)
  1494. var id = this.id
  1495. var name = this.name
  1496. var gender = this.gender
  1497. if (gender === 1) {
  1498. gender = '男'
  1499. }
  1500. if (gender === 2) {
  1501. gender = '女'
  1502. }
  1503. var idcardno = this.idcardno
  1504. var phone = this.phone
  1505. var healthcareno = this.healthcareno
  1506. var dialysisno = this.dialysis_no
  1507. // Base64位加密
  1508. // var aid = this.Base64.encode(id);
  1509. // var aname = this.Base64.encode(name);
  1510. // var agender = this.Base64.encode(gender);
  1511. // var aidcardno = this.Base64.encode(idcardno);
  1512. // var aphone = this.Base64.encode(phone);
  1513. // var ahealthcareno = this.Base64.encode(healthcareno);
  1514. // var adialysisno = this.Base64.encode(dialysisno);
  1515. // 调用生成二维码的方法
  1516. this.$options.methods.qrcode(
  1517. id,
  1518. name,
  1519. gender,
  1520. idcardno,
  1521. phone,
  1522. healthcareno,
  1523. dialysisno
  1524. )
  1525. },
  1526. qrcode(id, name, gender, idcardno, phone, healthcareno, dialysisno) {
  1527. document.getElementById('code').innerHTML = ''
  1528. const qrcode = new QRCode('code', {
  1529. width: 200,
  1530. height: 200,
  1531. text:
  1532. 'user_id:' +
  1533. id +
  1534. ',' +
  1535. 'name:' +
  1536. name +
  1537. ',' +
  1538. 'dialysis_no:' +
  1539. dialysisno +
  1540. ',' +
  1541. 'gender:' +
  1542. gender +
  1543. ',' +
  1544. 'idcard_no:' +
  1545. idcardno +
  1546. ',' +
  1547. 'phone:' +
  1548. phone +
  1549. ',' +
  1550. 'healthcare_no:' +
  1551. healthcareno
  1552. })
  1553. },
  1554. toRemind(){
  1555. this.dialogTableVisible = true
  1556. },
  1557. GetRemindPatientList(){
  1558. const params = {
  1559. page: this.page,
  1560. limit: this.limit
  1561. }
  1562. GetRemind(params).then(response=>{
  1563. if(response.data.state == 1){
  1564. this.gridData = response.data.data.patients;
  1565. this.totalOne = response.data.data.total;
  1566. var value = response.data.data.total
  1567. if(value == 0){
  1568. this.value = ""
  1569. }
  1570. if(value != 0){
  1571. this.value = value
  1572. }
  1573. }
  1574. })
  1575. },
  1576. jump(id) {
  1577. // this.$router.replace({ path: "/patients/inspection?id=" + id });
  1578. this.$router.replace({path:"/patients/patients/"+id +"/inspectionInfectious"})
  1579. },
  1580. dateCompare(date) {
  1581. var date1 = Date.parse(new Date()) / 1000;
  1582. if (date > date1) {
  1583. return 1;
  1584. } else {
  1585. return 2;
  1586. }
  1587. },
  1588. handleSizeChangeOne(val) {
  1589. this.limit = val
  1590. this.GetRemindPatientList();
  1591. },
  1592. handleCurrentChangeOne(val) {
  1593. this.page = val;
  1594. this.GetRemindPatientList();
  1595. },
  1596. getTime(val) {
  1597. if(val < 0){
  1598. return ""
  1599. }
  1600. if(val == ""){
  1601. return ""
  1602. }else {
  1603. return uParseTime(val, '{y}-{m}-{d}')
  1604. }
  1605. },
  1606. toExport(){
  1607. import('@/vendor/Export2Excel').then(excel => {
  1608. console.log("hhhh323223",this.tableData)
  1609. for(let i=0;i<this.tableData.length;i++){
  1610. if(this.tableData[i].gender == 1){
  1611. this.tableData[i].genders = "男"
  1612. }
  1613. if(this.tableData[i].gender == 2){
  1614. this.tableData[i].genders = "女"
  1615. }
  1616. this.tableData[i].age_year = this.tranAge(this.tableData[i])
  1617. this.tableData[i].first_dialysis_date = this.getTime(this.tableData[i].first_dialysis_date)
  1618. if(this.tableData[i].lapseto == 0){
  1619. this.tableData[i].lapesetos = ""
  1620. }
  1621. if(this.tableData[i].lapseto == 1){
  1622. this.tableData[i].lapesetos = "留治"
  1623. }
  1624. if(this.tableData[i].lapseto == 2){
  1625. this.tableData[i].lapesetos = "转归"
  1626. }
  1627. if(this.tableData[i].source == 0){
  1628. this.tableData[i].sources = ""
  1629. }
  1630. if(this.tableData[i].source == 1){
  1631. this.tableData[i].sources = "门诊"
  1632. }
  1633. if(this.tableData[i].source == 2){
  1634. this.tableData[i].sources = "住院"
  1635. }
  1636. if(this.tableData[i].is_infectious == 0){
  1637. this.tableData[i].is_infectiouss = ""
  1638. }
  1639. if(this.tableData[i].is_infectious == 1){
  1640. this.tableData[i].is_infectiouss = "阴性"
  1641. }
  1642. if(this.tableData[i].is_infectious == 2){
  1643. this.tableData[i].is_infectiouss = "阳性"
  1644. }
  1645. }
  1646. const tHeader = ['姓名', '性别', '身份证号码','年龄','透析号','首次治疗时间','本人电话','患者来源','治疗状态','传染病']
  1647. const filterVal = ['name', 'genders', 'id_card_no','age_year','dialysis_no','first_dialysis_date','phone','sources','lapesetos','is_infectiouss']
  1648. console.log("table",this.tableData)
  1649. const data = this.formatJson(filterVal, this.tableData)
  1650. excel.export_json_to_excel({
  1651. header: tHeader,
  1652. data,
  1653. filename: '患者名单'
  1654. })
  1655. this.downloadLoading = false
  1656. })
  1657. },
  1658. formatJson(filterVal, jsonData) {
  1659. return jsonData.map(v => filterVal.map(j => v[j]));
  1660. },
  1661. tranAge(val) {
  1662. if(val.birthday){
  1663. var birth = uParseTime(val.birthday, '{y}-{m}-{d}');
  1664. return jsGetAge(birth, '-');
  1665. }
  1666. },
  1667. toOpen(id){
  1668. getPatientAllagic(id).then(response=>{
  1669. if(response.data.state == 1){
  1670. var list = response.data.data.list
  1671. this.patieintDialogVisible= true
  1672. this.patientAllgicList = list
  1673. }
  1674. })
  1675. }
  1676. }
  1677. }
  1678. Vue.prototype.$QRCode = function() {
  1679. var name = this.name
  1680. var dialysis_no = this.dialysis_no
  1681. var id = this.id
  1682. var gender = this.gender
  1683. if (gender === 1) {
  1684. gender = '男'
  1685. }
  1686. if (gender === 2) {
  1687. gender = '女'
  1688. }
  1689. var idcardno = this.idcardno
  1690. var phone = this.phone
  1691. var healthcareno = this.healthcareno
  1692. // BASE64加密
  1693. // var eid = this.Base64.encode(id)
  1694. // var ename = this.Base64.encode(name)
  1695. // var egender = this.Base64.encode(gender)
  1696. // var eidcardno = this.Base64.encode(idcardno)
  1697. // var ephone = this.Base64.encode(phone)
  1698. // var ehealthcareno = this.Base64.encode(healthcareno)
  1699. // var edialysisno = this.Base64.encode(dialysis_no)
  1700. var eid = id
  1701. var ename = name
  1702. var egender = gender
  1703. var eidcardno = idcardno
  1704. var ephone = phone
  1705. var ehealthcareno = healthcareno
  1706. var edialysisno = dialysis_no
  1707. console.log(
  1708. 'user_id' + eid,
  1709. 'name:' + ename,
  1710. 'gender:' + egender,
  1711. 'idcard_no:' + eidcardno,
  1712. 'phone:' + ephone,
  1713. 'healthcare_no:' + ehealthcareno,
  1714. 'edialysis_no:' + edialysisno
  1715. )
  1716. const salting = 'admin-authority'
  1717. new QRCode('qrcode', {
  1718. width: 150, // 设置宽度
  1719. height: 150, // 设置高度
  1720. text:
  1721. 'user_id:' +
  1722. eid +
  1723. ',' +
  1724. 'name:' +
  1725. ename +
  1726. ',' +
  1727. 'dialysis_no:' +
  1728. edialysisno +
  1729. ',' +
  1730. 'gender:' +
  1731. egender +
  1732. ',' +
  1733. 'idcard_no:' +
  1734. eidcardno +
  1735. ',' +
  1736. 'phone:' +
  1737. ephone +
  1738. ',' +
  1739. 'healthcare_no:' +
  1740. ehealthcareno
  1741. })
  1742. }
  1743. </script>
  1744. <style rel="stylesheet/scss" lang="scss">
  1745. .app-container {
  1746. /*margin: 20 px;*/
  1747. font-size: 15px;
  1748. .filter-container {
  1749. padding-bottom: 5px;
  1750. }
  1751. .search-component {
  1752. width: 500px;
  1753. .searchBox {
  1754. width: 300px;
  1755. height: 36px;
  1756. line-height: 36px;
  1757. padding-left: 15px;
  1758. border: 1px #dcdfe6 solid;
  1759. border-right: none;
  1760. outline: none;
  1761. float: left;
  1762. border-radius: 6px 0 0 6px;
  1763. font-size: 14px;
  1764. color: #333;
  1765. background: #fff;
  1766. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  1767. }
  1768. .searchBtn {
  1769. background-color: #409eff;
  1770. color: #fff;
  1771. font-size: 15px;
  1772. text-align: center;
  1773. height: 36px;
  1774. line-height: 36px;
  1775. float: left;
  1776. outline: none;
  1777. width: 70px;
  1778. border: none;
  1779. border-radius: 0 6px 6px 0;
  1780. font-family: "Microsoft Yahei";
  1781. cursor: pointer;
  1782. }
  1783. }
  1784. .amount {
  1785. font-weight: normal;
  1786. padding: 10px 0 0 0;
  1787. color: #606266;
  1788. font-size: 14px;
  1789. span {
  1790. color: #ef2525;
  1791. font-family: "Arial";
  1792. padding: 0 2px;
  1793. }
  1794. }
  1795. .print_main_content {
  1796. background-color: white;
  1797. width: 960px;
  1798. margin: 0 auto;
  1799. padding: 0 0 20px 0;
  1800. }
  1801. .print_main_content .order_title {
  1802. text-align: center;
  1803. font-size: 23px;
  1804. line-height: 50px;
  1805. font-weight: 500px;
  1806. }
  1807. .print_main_content table {
  1808. width: 100%;
  1809. border: 1px solid;
  1810. border-collapse: collapse;
  1811. padding: 2px;
  1812. }
  1813. .print_main_content table tbody tr td {
  1814. border: 1px solid;
  1815. text-align: center;
  1816. /* font-size: 17px; */
  1817. padding: 10px 8px;
  1818. }
  1819. .td_proj_title {
  1820. font-size: 18px;
  1821. line-height: 25px;
  1822. font-weight: 500;
  1823. }
  1824. .td_proj_content {
  1825. font-size: 18px;
  1826. line-height: 25px;
  1827. }
  1828. .td_align_left {
  1829. text-align: left;
  1830. }
  1831. .print_footnote_panel {
  1832. font-size: 17px;
  1833. line-height: 40px;
  1834. }
  1835. .print_footnote_panel .proj {
  1836. display: inline-block;
  1837. width: 49%;
  1838. }
  1839. .print_footnote_panel .proj .proj_title {
  1840. font-weight: 500;
  1841. }
  1842. }
  1843. .el-table td,
  1844. .el-table th.is-leaf,
  1845. .el-table--border,
  1846. .el-table--group {
  1847. border-color: #d0d3da;
  1848. }
  1849. .el-table--border::after,
  1850. .el-table--group::after,
  1851. .el-table::before {
  1852. background-color: #d0d3da;
  1853. }
  1854. .el-select--small {
  1855. width: 196px;
  1856. }
  1857. .el-checkbox__inner::after {
  1858. height: 10px;
  1859. left: 7px;
  1860. }
  1861. .el-checkbox__inner {
  1862. width: 20px;
  1863. height: 20px;
  1864. }
  1865. </style>