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

patients.vue 54KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730
  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. <el-select
  234. v-model="listQuery.contagion"
  235. size="small"
  236. clearable
  237. placeholder="传染病"
  238. @change="changeOtherSearch"
  239. >
  240. <el-option
  241. v-for="item in contagionList"
  242. :key="item.id"
  243. :label="item.name"
  244. :value="item.id"
  245. >
  246. </el-option>
  247. </el-select>
  248. <el-select
  249. style="margin-left: 10px;"
  250. v-model="listQuery.reimbursement_way"
  251. size="small"
  252. clearable
  253. placeholder="付费方式"
  254. @change="changeOtherSearch"
  255. >
  256. <el-option
  257. v-for="item in reimbursement_ways"
  258. :key="item.id"
  259. :label="item.name"
  260. :value="item.id"
  261. >
  262. </el-option>
  263. </el-select>
  264. <el-select
  265. v-model="listQuery.isscheduling"
  266. collapse-tags
  267. style="margin-left: 10px;"
  268. clearable
  269. placeholder="排班情况"
  270. size="small"
  271. @change="changeOtherSearch"
  272. >
  273. <el-option
  274. v-for="item in scheduling"
  275. :key="item.value"
  276. :label="item.label"
  277. :value="item.value"
  278. >
  279. </el-option>
  280. </el-select>
  281. <el-select
  282. v-model="listQuery.isprescription"
  283. collapse-tags
  284. style="margin-left:10px;"
  285. clearable
  286. placeholder="透析处方"
  287. size="small"
  288. @change="changeOtherSearch"
  289. >
  290. <el-option
  291. v-for="item in prescription"
  292. :key="item.value"
  293. :label="item.label"
  294. :value="item.value"
  295. >
  296. </el-option>
  297. </el-select>
  298. </div>
  299. <el-table
  300. ref="multipleTable"
  301. :row-style="{ color: '#303133' }"
  302. :header-cell-style="{
  303. backgroundColor: 'rgb(245, 247, 250)',
  304. color: '#606266'
  305. }"
  306. :data="tableData"
  307. border
  308. fit
  309. highlight-current-row
  310. style="width: 100%;margin-top: 10px;"
  311. @selection-change="handleSelectionChange"
  312. >
  313. <el-table-column
  314. align="center"
  315. label="全选"
  316. width="60px"
  317. type="selection"
  318. ></el-table-column>
  319. <el-table-column
  320. type="index"
  321. label="序号"
  322. width="40px"
  323. align="center"
  324. ></el-table-column>
  325. <el-table-column
  326. label="透析号"
  327. min-width="70"
  328. property="dialysis_no"
  329. align="center"
  330. style="color:red"
  331. ></el-table-column>
  332. <el-table-column
  333. label="住院号"
  334. min-width="70"
  335. property="admission_number"
  336. align="center"
  337. >
  338. </el-table-column>
  339. <el-table-column
  340. property="name"
  341. label="姓名"
  342. min-width="70"
  343. align="center"
  344. >
  345. <template slot-scope="scope">
  346. <router-link
  347. :to="'/patients/patient/' + scope.row.id"
  348. style="color:#409eff;width:100%;display:block;"
  349. >{{ scope.row.name }}
  350. </router-link
  351. >
  352. </template>
  353. </el-table-column>
  354. <el-table-column label="性别" min-width="60" align="center">
  355. <template slot-scope="scope">
  356. <span v-if="scope.row.gender == 1">男</span>
  357. <span v-else-if="scope.row.gender == 2">女</span>
  358. <span v-else>未知</span>
  359. </template>
  360. </el-table-column>
  361. <el-table-column label="来源" min-width="60" align="center">
  362. <template slot-scope="scope">
  363. <span v-if="scope.row.source == 1">门诊</span>
  364. <span v-else-if="scope.row.source == 2">住院</span>
  365. <span v-else>未知</span>
  366. </template>
  367. </el-table-column>
  368. <el-table-column label="透析次数" min-width="84" align="center">
  369. <template slot-scope="scope">
  370. <span>{{ getCount(scope.row) }}</span>
  371. </template>
  372. </el-table-column>
  373. <!-- <el-table-column min-width="150" label="二维码" align="center">
  374. <template slot-scope="scope" type="text">
  375. <a style="color:#409eff" v-if="scope.row.binding_state==1" @click="openWechatBindDialog">已绑定</a>
  376. <a style="color:#409eff" v-else @click="openWechatBindDialog">生成</a>
  377. </template>
  378. </el-table-column> -->
  379. <el-table-column label="登记日期" min-width="120" align="center">
  380. <template slot-scope="scope">
  381. <span>{{ scope.row.created_time | parseTime('{y}-{m}-{d}') }}</span>
  382. </template>
  383. </el-table-column>
  384. <el-table-column label="转归" align="center">
  385. <template slot-scope="scope">
  386. <span>{{ LapsetoInfo(scope.row) }}</span>
  387. </template>
  388. </el-table-column>
  389. <el-table-column label="转出(死亡)时间" min-width="134" align="center">
  390. <template slot-scope="scope">
  391. <span>{{getTime(scope.row.death_time)}}</span>
  392. </template>
  393. </el-table-column>
  394. <el-table-column label="转出(死亡)原因" align="center" min-width="150">
  395. <template slot-scope="scope">
  396. <span>{{scope.row.out_reason}}</span>
  397. </template>
  398. </el-table-column>
  399. <el-table-column label="操作" align="center" min-width="140">
  400. <template slot-scope="scope">
  401. <el-tooltip
  402. class="item"
  403. effect="dark"
  404. content="转归"
  405. placement="top"
  406. >
  407. <el-button
  408. type="primary"
  409. icon="el-icon-edit"
  410. size="small"
  411. @click="OpenSetLapseto(scope.row, scope.$index)"
  412. ></el-button>
  413. </el-tooltip>
  414. <el-tooltip
  415. class="item"
  416. effect="dark"
  417. content="预览"
  418. placement="top"
  419. >
  420. <el-button
  421. type="danger"
  422. icon="el-icon-tickets"
  423. size="small"
  424. @click="
  425. OpenView(scope.row.name, scope.row.dialysis_no, scope.row.id)
  426. "
  427. ></el-button>
  428. </el-tooltip>
  429. </template>
  430. </el-table-column>
  431. </el-table>
  432. <!-- <pagi-nation title="分页"></pagi-nation> -->
  433. <el-pagination
  434. @size-change="handleSizeChange"
  435. @current-change="handleCurrentChange"
  436. :current-page="listQuery.page"
  437. :page-sizes="[10, 20, 50, 100]"
  438. :page-size="listQuery.limit"
  439. background
  440. style="margin-top:20px;"
  441. align="right"
  442. layout="total, sizes, prev, pager, next, jumper"
  443. :total="total"
  444. >
  445. </el-pagination>
  446. <el-dialog
  447. title="微信绑定"
  448. :visible.sync="bindWechatDialog"
  449. width="30%"
  450. center
  451. >
  452. <img :src="wechatbindimg" width="100%" alt="" v-if="wechatbindimg"/>
  453. <i class="el-icon-loading" v-else></i>
  454. <span slot="footer" class="dialog-footer">
  455. <el-button type="primary" @click="bindWechatDialog = false"
  456. >关闭</el-button
  457. >
  458. </span>
  459. </el-dialog>
  460. <el-dialog title="转归" :visible.sync="LapsetoDialogVisible">
  461. <el-form
  462. :model="lapsetoForm"
  463. :rules="lapsetoRules"
  464. ref="lapsetoForm"
  465. label-width="140px"
  466. >
  467. <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
  468. <el-radio-group v-model="lapsetoForm.lapseto_type">
  469. <el-radio
  470. v-for="item in lapsetoOptions"
  471. :key="item.value"
  472. :label="item.value"
  473. :value="item.value"
  474. >{{ item.label }}
  475. </el-radio
  476. >
  477. </el-radio-group>
  478. </el-form-item>
  479. <!-- <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
  480. <el-radio v-model="lapsetoForm.lapseto_type" :label="lapsetoForm.lapseto_type">转出</el-radio>
  481. <el-radio v-model="lapsetoForm.lapseto_type" :label="lapsetoForm.lapseto_type">死亡</el-radio>
  482. </el-form-item> -->
  483. <el-form-item label="转归(死亡)时间 :" prop="lapseto_time" required>
  484. <el-date-picker
  485. v-model="lapsetoForm.lapseto_time"
  486. type="datetime"
  487. format="yyyy-MM-dd HH:mm:ss"
  488. value-format="yyyy-MM-dd HH:mm:ss"
  489. placeholder="选择日期时间"
  490. default-time="12:00:00"
  491. >
  492. </el-date-picker>
  493. </el-form-item>
  494. <el-form-item label="转出(死亡)原因:" v-if="lapsetoForm.lapseto_type == 2 || lapsetoForm.lapseto_type == 3">
  495. <el-input v-model="lapsetoForm.out_reason"></el-input>
  496. </el-form-item>
  497. </el-form>
  498. <div slot="footer" class="dialog-footer">
  499. <el-button @click="LapsetoDialogVisible = false">取 消</el-button>
  500. <el-button type="primary" @click="EditLapseto()">保 存</el-button>
  501. </div>
  502. </el-dialog>
  503. <el-dialog
  504. title="签到卡"
  505. :visible.sync="centerDialogVisible"
  506. :close-on-click-modal="false"
  507. @opened="ShowQRCode()"
  508. width="30%"
  509. center
  510. >
  511. <div align="center" style="margin-bottom:6px;font-size:20px">
  512. <!-- 姓名:<el-input v-model="name" size="small" style="width:200px"></el-input><br> -->
  513. 姓名:<span>{{ this.name }}</span>
  514. </div>
  515. <div align="center" style="margin-bottom:10px;font-size:20px">
  516. <!-- 透析号:<el-input v-model="dialysis_no" size="small" style="width:200px"></el-input><br> -->
  517. 透析号:<span>{{ this.dialysis_no }}</span>
  518. </div>
  519. <div id="qrcode" align="center"></div>
  520. <span slot="footer" class="dialog-footer">
  521. <!-- <el-button type="primary" @click="download()">下载</el-button> -->
  522. <el-button type="primary" @click="print()">打印</el-button>
  523. </span>
  524. </el-dialog>
  525. <div hidden="hidden">
  526. <div id="print-card-info">
  527. <div
  528. class="order_title"
  529. align="center"
  530. style="margin-bottom:20px;font-size:35px"
  531. >
  532. 签到卡
  533. </div>
  534. <div align="center" style="margin-bottom:4px;font-size:25px">
  535. 姓名:<span>&nbsp;&nbsp;{{ this.name }}</span
  536. ><br/>
  537. </div>
  538. <div align="center" style="margin-bottom:20px;font-size:25px">
  539. 透析号:<span>&nbsp;&nbsp;{{ this.dialysis_no }}</span>
  540. </div>
  541. <div>
  542. <div id="code" align="center"></div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. <el-dialog title="传染病检查提醒通知" :visible.sync="dialogTableVisible">
  548. <el-table :data="gridData">
  549. <el-table-column property="date" align="center" label="姓名" width="150">
  550. <template slot-scope="scope">{{scope.row.name}}</template>
  551. </el-table-column>
  552. <el-table-column property="name" align="center" label="检查日期" width="200">
  553. <template slot-scope="scope">
  554. <span
  555. v-if="dateCompare(scope.row.infectious_next_record_time) == 1"
  556. >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
  557. <span
  558. v-if="dateCompare(scope.row.infectious_next_record_time) == 2"
  559. style="color: red"
  560. >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
  561. </template>
  562. </el-table-column>
  563. <el-table-column property="address" align="center" label="操作">
  564. <template slot-scope="scope">
  565. <el-button size="mini" type="primary" @click="jump(scope.row.id)">查看</el-button>
  566. </template>
  567. </el-table-column>
  568. </el-table>
  569. <el-pagination
  570. @size-change="handleSizeChangeOne"
  571. @current-change="handleCurrentChangeOne"
  572. :page-size="5"
  573. background
  574. style="margin-top:20px;float: right"
  575. :total="value"
  576. ></el-pagination>
  577. </el-dialog>
  578. </div>
  579. </template>
  580. <script>
  581. import { code, EditLapseto, fetchList, getMaxDialysisNo, OpenView, postExportPatients,GetRemind } from '@/api/patient'
  582. import { generateLog } from '@/api/config'
  583. import QRCode from 'qrcodejs2'
  584. import Vue from 'vue'
  585. import { Base64 } from 'js-base64'
  586. import { uParseTime } from '@/utils/tools'
  587. import { log } from 'util'
  588. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  589. import UploadExcel from '@/xt_pages/components/UploadExcel'
  590. export default {
  591. name: 'Patient',
  592. components: {
  593. UploadExcel,
  594. BreadCrumb
  595. },
  596. data() {
  597. return {
  598. logs: [],
  599. downloadUrl: 'https://kuyi.shengws.com/patient_template.xltx',
  600. crumbs: [
  601. { path: false, name: '病人管理' },
  602. { path: '/patients/patients', name: '病人管理' }
  603. ],
  604. lapsetoRules: {
  605. lapseto_type: [{ required: true, message: '请选择治疗状态' }],
  606. lapseto_time: [{ required: true, message: '请选择时间' }]
  607. },
  608. currentIndex: -1,
  609. LapsetoDialogVisible: false,
  610. centerDialogVisible: false,
  611. checkAll: false,
  612. isIndeterminate: true,
  613. dialogVisible: false,
  614. exportLogVisible: false,
  615. exportVisible:false,
  616. phoneVisible:false,
  617. idCardNoVisible:false,
  618. wechatbindimg: '',
  619. isShow:true,
  620. active: true,
  621. schedulType: 0,
  622. lapsetoForm: {
  623. lapseto_type: 0,
  624. lapseto_time: '',
  625. patient_id: 0,
  626. out_reason:''
  627. },
  628. schedulArr: [
  629. { value: 0, label: '全部' },
  630. { value: 1, label: '上午' },
  631. { value: 2, label: '下午' },
  632. { value: 3, label: '晚上' }
  633. ],
  634. lapsetoOptions: [
  635. { value: 1, label: '留治' },
  636. { value: 2, label: '转出' },
  637. { value: 3, label: "死亡" },
  638. ],
  639. systemType: 0,
  640. systemArr: [
  641. { value: 0, label: '全部' },
  642. { value: 1, label: '已绑定' },
  643. { value: 2, label: '未绑定' }
  644. ],
  645. sourceType: 0,
  646. sourceID: 0,
  647. lapsetoType: 1,
  648. sourceArr: [
  649. { value: 0, label: '全部', source: 0, lapseto: 0 },
  650. // { value: 1, label: "转出", source: 0, lapseto: 2 },
  651. // { value: 2, label: "留治", source: 0, lapseto: 1 },
  652. { value: 3, label: '门诊', source: 1, lapseto: 1 },
  653. { value: 4, label: '住院', source: 2, lapseto: 1 }
  654. ],
  655. lapsetoArr: [
  656. { value: 0, label: '全部', source: 0, lapseto: 0 },
  657. { value: 1, label: '转出', source: 0, lapseto: 2 },
  658. { value: 2, label: '留治', source: 0, lapseto: 1 },
  659. { value: 3, label: '死亡', source:0, lapseto: 3 },
  660. // { value: 3, label: "门诊", source: 1, lapseto: 1 },
  661. // { value: 4, label: "住院", source: 2, lapseto: 1 }
  662. ],
  663. scheduling: [
  664. {
  665. value: 1,
  666. label: '已排班'
  667. },
  668. {
  669. value: 2,
  670. label: '未排班'
  671. }
  672. ],
  673. prescription: [
  674. {
  675. value: 1,
  676. label: '有处方'
  677. },
  678. {
  679. value: 2,
  680. label: '无处方'
  681. }
  682. ],
  683. tableData: null,
  684. searchKey: '',
  685. // value2: '',
  686. total: 0,
  687. pageTotal: 0,
  688. dialysisVisible:false,
  689. pageSelect: 0,
  690. max_dialysis_no: '',
  691. listQuery: {
  692. page: 1,
  693. limit: 10,
  694. schedul_type: 0,
  695. binding_state: 0,
  696. lapseto: 1,
  697. source: 0,
  698. start_time: '',
  699. end_time: '',
  700. keywords: '',
  701. contagion: '',
  702. reimbursement_way: '',
  703. isscheduling: '',
  704. isprescription: ''
  705. },
  706. multipleSelection: [],
  707. bindWechatDialog: false,
  708. contagionList: [],
  709. reimbursement_ways: [],
  710. patient: null,
  711. id: '',
  712. name: '',
  713. dialysis_no: '',
  714. patientPrint: {},
  715. patient_id: '',
  716. gender: '',
  717. idcardno: '',
  718. phone: '',
  719. healthcareno: '',
  720. startTime: '',
  721. export_date: [],
  722. lapeseto:"",
  723. value:13,
  724. dialogTableVisible:false,
  725. gridData:[],
  726. totalOne: 0,
  727. page: 1,
  728. limit: 5
  729. }
  730. },
  731. created() {
  732. if(sessionStorage.getItem('patientPageSize')){
  733. this.listQuery.limit = parseInt(sessionStorage.getItem('patientPageSize'))
  734. }
  735. this.getList()
  736. this.contagionList = this.$store.getters.contagions
  737. this.reimbursement_ways = this.$store.getters.reimbursement_ways
  738. const keyword = this.$route.query && this.$route.query.keyword
  739. if (typeof keyword === 'string' && keyword.length > 0) {
  740. this.listQuery.keywords = keyword
  741. this.searchKey = keyword
  742. }
  743. //获取
  744. this.GetRemindPatientList()
  745. },
  746. methods: {
  747. putOnRecord:function(type,row){
  748. if(type == 1){
  749. }else{
  750. }
  751. },
  752. generateTxt: function(log) {
  753. var content = ''
  754. var errlog = log.err_logs
  755. content = this.getContent(log)
  756. for (let i = 0; i < errlog.length; i++) {
  757. if (content.length == 0) {
  758. content = errlog[i].err_msg
  759. } else {
  760. content = content + '\n' + errlog[i].err_msg
  761. }
  762. }
  763. var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
  764. if (typeof url === 'object' && url instanceof Blob) {
  765. url = URL.createObjectURL(url) // 创建blob地址
  766. }
  767. const aLink = document.createElement('a')
  768. aLink.href = url
  769. aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
  770. aLink.click()
  771. },
  772. getContent(log) {
  773. return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
  774. },
  775. timestampToTime(timestamp) {
  776. var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  777. var Y = date.getFullYear() + '年'
  778. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
  779. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
  780. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
  781. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
  782. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
  783. return Y + M + D + h + m + s
  784. },
  785. generateLog() {
  786. let params = {
  787. 'log_type': 1
  788. }
  789. generateLog(params).then(
  790. response => {
  791. if (response.data.state === 1) {
  792. this.logs = response.data.data.logs
  793. this.exportLogVisible = true
  794. } else {
  795. this.$message.error(response.data.msg)
  796. }
  797. }
  798. )
  799. },
  800. handleSuccess({ results, header }) {
  801. if (header != undefined && header.length > 0) {
  802. var isHasName = header.includes('*姓名')
  803. var isHasGender = header.includes('*性别')
  804. var isHasPhone = header.includes('*手机号')
  805. var isHasIdCard = header.includes('*身份证号')
  806. var isHasDate = header.includes('*首次肾脏治疗时间')
  807. var isHasSource = header.includes('*患者来源')
  808. var isHasLapseto = header.includes('*治疗状态')
  809. var isHasInfectious = header.includes('*传染病')
  810. var isHasDiagnose = header.includes('诊断')
  811. var isHasDialysisNo = header.includes('透析号')
  812. var isHasDryWeight = header.includes('干体重(kg)')
  813. var isHasHeight = header.includes('身高(cm)')
  814. var isHasHomeAddress = header.includes('家庭住址')
  815. if (!(isHasName && isHasGender && isHasPhone && isHasIdCard && isHasDate && isHasSource && isHasLapseto && isHasInfectious && isHasDiagnose && isHasDialysisNo && isHasDryWeight && isHasHeight && isHasHomeAddress)) {
  816. this.dialogVisible = true
  817. return
  818. }
  819. } else {
  820. this.dialogVisible = true
  821. return
  822. }
  823. getMaxDialysisNo().then(response => {
  824. if (response.data.state === 1) {
  825. this.max_dialysis_no = response.data.data.dialysis_no
  826. if (this.max_dialysis_no == 0) {
  827. this.max_dialysis_no = 1
  828. } else {
  829. this.max_dialysis_no++
  830. }
  831. this.export_date = []
  832. for (let i = 1; i < results.length; i++) {
  833. let obj = {}
  834. for (var key in results[i]) {
  835. if (results[i]['*姓名'] === undefined) {
  836. obj['name'] = ''
  837. } else {
  838. if (key == '*姓名') {
  839. obj['name'] = results[i][key].replace(/\s/g,"")
  840. }
  841. }
  842. if (results[i]['*性别'] === undefined) {
  843. obj['gender'] = '0'
  844. } else {
  845. if (key == '*性别') {
  846. if (results[i][key] == '男') {
  847. obj['gender'] = '1'
  848. } else if (results[i][key] == '女') {
  849. obj['gender'] = '2'
  850. } else {
  851. obj['gender'] = '0'
  852. }
  853. }
  854. }
  855. if (results[i]['*手机号'] === undefined) {
  856. obj['phone'] = ''
  857. } else {
  858. if (key == '*手机号') {
  859. obj['phone'] = results[i][key].replace(/\s/g,"")
  860. }
  861. }
  862. if (results[i]['*身份证号'] === undefined) {
  863. obj['id_card_no'] = ''
  864. } else {
  865. if (key == '*身份证号') {
  866. obj['id_card_no'] = results[i][key].replace(/\s/g,"")
  867. }
  868. }
  869. if (results[i]['*首次肾脏治疗时间'] === undefined) {
  870. obj['first_treatment_date'] = ''
  871. } else {
  872. if (key == '*首次肾脏治疗时间') {
  873. var month = parseInt(results[i][key].replace(/\s/g,"").split('/')[0])
  874. var day = parseInt(results[i][key].replace(/\s/g,"").split('/')[1])
  875. var year = parseInt(results[i][key].replace(/\s/g,"").split('/')[2])
  876. if (year < 10) {
  877. year = '0' + year
  878. }
  879. if (day < 10) {
  880. day = '0' + day
  881. }
  882. if (month < 10) {
  883. month = '0' + month
  884. }
  885. obj['first_treatment_date'] = '20' + year.toString() + '/' + month.toString() + '/' + day.toString()
  886. }
  887. }
  888. if (results[i]['*患者来源'] === undefined) {
  889. obj['source'] = '3'
  890. } else {
  891. if (key == '*患者来源') {
  892. if (results[i][key] == '门诊') {
  893. obj['source'] = '1'
  894. } else if (results[i][key] == '住院') {
  895. obj['source'] = '2'
  896. } else {
  897. obj['source'] = '0'
  898. }
  899. }
  900. }
  901. if (results[i]['*治疗状态'] === undefined) {
  902. obj['lapseto'] = '3'
  903. } else {
  904. if (key == '*治疗状态') {
  905. if (results[i][key] == '留治') {
  906. obj['lapseto'] = '1'
  907. } else if (results[i][key] == '转归') {
  908. obj['lapseto'] = '2'
  909. } else {
  910. obj['lapseto'] = '0'
  911. }
  912. }
  913. }
  914. if (results[i]['*传染病'] === undefined) {
  915. let contagions = []
  916. obj['is_infectious'] = '3'
  917. obj['contagions'] = contagions
  918. } else {
  919. if (key == '*传染病') {
  920. if (results[i][key] == '无') {
  921. let contagions = []
  922. obj['is_infectious'] = '1'
  923. obj['contagions'] = contagions
  924. } else if (results[i][key] == '乙肝') {
  925. let contagions = []
  926. contagions.push(2)
  927. obj['is_infectious'] = '2'
  928. obj['contagions'] = contagions
  929. } else if (results[i][key] == '丙肝') {
  930. let contagions = []
  931. contagions.push(3)
  932. obj['is_infectious'] = '2'
  933. obj['contagions'] = contagions
  934. } else if (results[i][key] == '艾滋病') {
  935. let contagions = []
  936. contagions.push(4)
  937. obj['is_infectious'] = '2'
  938. obj['contagions'] = contagions
  939. } else if (results[i][key] == '肺结核') {
  940. let contagions = []
  941. contagions.push(5)
  942. obj['is_infectious'] = '2'
  943. obj['contagions'] = contagions
  944. } else if (results[i][key] == '梅毒') {
  945. let contagions = []
  946. contagions.push(6)
  947. obj['is_infectious'] = '2'
  948. obj['contagions'] = contagions
  949. } else {
  950. let contagions = []
  951. obj['is_infectious'] = '0'
  952. obj['contagions'] = contagions
  953. }
  954. }
  955. }
  956. if (results[i]['诊断'] === undefined) {
  957. obj['diagnose'] = ''
  958. } else {
  959. if (key == '诊断') {
  960. obj['diagnose'] = results[i][key]
  961. }
  962. }
  963. // console.log(obj)
  964. if (results[i]['透析号'] === undefined) {
  965. obj['dialysis_no'] = ''
  966. } else {
  967. if (key == '透析号') {
  968. obj['dialysis_no'] = results[i][key].replace(/\s/g,"")
  969. }
  970. }
  971. // console.log(obj)
  972. if (results[i]['干体重(kg)'] === undefined) {
  973. obj['dry_weight'] = ''
  974. } else {
  975. if (key == '干体重(kg)') {
  976. obj['dry_weight'] = results[i][key].replace(/\s/g,"")
  977. }
  978. }
  979. // console.log(obj)
  980. if (results[i]['身高(cm)'] === undefined) {
  981. obj['height'] = ''
  982. } else {
  983. if (key == '身高(cm)') {
  984. obj['height'] = results[i][key].replace(/\s/g,"")
  985. }
  986. }
  987. console.log("2222222",obj)
  988. if (results[i]['家庭住址'] === undefined) {
  989. obj['home_address'] = ''
  990. } else {
  991. if (key == '家庭住址') {
  992. obj['home_address'] = results[i][key]
  993. }
  994. }
  995. }
  996. this.export_date.push(obj)
  997. }
  998. let index = 0
  999. for (let i = 0; i < this.export_date.length; i++) {
  1000. if (this.export_date[i].dialysis_no == '') {
  1001. let new_dialysis_no = this.max_dialysis_no + index
  1002. // console.log(new_dialysis_no)
  1003. index++
  1004. let no = new_dialysis_no.toString()
  1005. // console.log(no)
  1006. let rep = 3 - no.length
  1007. // console.log(rep)
  1008. let tempNo = ""
  1009. if (rep == 1){
  1010. tempNo = "0"
  1011. }
  1012. if (rep == 2){
  1013. tempNo = "00"
  1014. }
  1015. // console.log(tempNo)
  1016. if (rep > 0) {
  1017. no = tempNo + no
  1018. }
  1019. this.export_date[i].dialysis_no = no
  1020. }
  1021. }
  1022. // console.log(this.export_date)
  1023. var tempExportDate = this.export_date
  1024. var tempExportDateOne = this.export_date
  1025. var tempExportDateTwo = this.export_date
  1026. const obj2 = {}
  1027. tempExportDate = tempExportDate.reduce((cur, next) => {
  1028. obj2[next.dialysis_no] ? '' : obj2[next.dialysis_no] = true && cur.push(next)
  1029. return cur
  1030. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1031. if (tempExportDate.length < this.export_date.length){
  1032. this.dialysisVisible = true
  1033. return
  1034. }
  1035. const obj3 = {}
  1036. tempExportDateOne = tempExportDateOne.reduce((cur, next) => {
  1037. obj3[next.phone] ? '' : obj3[next.phone] = true && cur.push(next)
  1038. return cur
  1039. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1040. if (tempExportDateOne.length < this.export_date.length){
  1041. this.phoneVisible = true
  1042. return
  1043. }
  1044. const obj4 = {}
  1045. tempExportDateTwo = tempExportDateTwo.reduce((cur, next) => {
  1046. obj4[next.id_card_no] ? '' : obj4[next.id_card_no] = true && cur.push(next)
  1047. return cur
  1048. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1049. if (tempExportDateTwo.length < this.export_date.length){
  1050. this.idCardNoVisible = true
  1051. return
  1052. }
  1053. // this.exportVisible = true
  1054. this.$alert('您提交的患者名单已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
  1055. confirmButtonText: '确定',
  1056. callback: action => {
  1057. }
  1058. });
  1059. this.isShow = false
  1060. let params = {
  1061. 'patients': this.export_date
  1062. }
  1063. console.log("export2222",this.export_date)
  1064. postExportPatients(params).then(
  1065. response => {
  1066. if (response.data.state === 1) {
  1067. this.getList()
  1068. this.isShow = true
  1069. } else {
  1070. this.isShow = true
  1071. this.$message.error(response.data.msg)
  1072. }
  1073. }
  1074. )
  1075. }
  1076. }
  1077. )
  1078. },
  1079. getCount(row) {
  1080. return row.total_dialysis + row.user_sys_before_count
  1081. },
  1082. EditLapseto() {
  1083. if (this.lapsetoForm.lapseto_time == '') {
  1084. this.$message.error('请选择时间')
  1085. return
  1086. }
  1087. // if(this.lapeseto == "留治"){
  1088. // this.lapsetoForm.lapseto_type = 1
  1089. // }
  1090. // if(this.lapeseto == "转出"){
  1091. // this.lapsetoForm.lapseto_type = 2
  1092. // }
  1093. // if(this.lapeseto == "死亡"){
  1094. // this.lapsetoForm.lapseto_type = 3
  1095. // }
  1096. console.log("22222",this.lapsetoForm)
  1097. EditLapseto(this.lapsetoForm.patient_id, this.lapsetoForm).then(
  1098. response => {
  1099. if (response.data.state === 1) {
  1100. this.$notify({
  1101. title: '成功',
  1102. message: '转归设置完成',
  1103. type: 'success',
  1104. duration: 2000
  1105. })
  1106. this.tableData[this.currentIndex].lapseto = this.lapsetoForm.lapseto_type
  1107. this.tableData[this.currentIndex].out_reason = this.lapsetoForm.out_reason
  1108. this.currentIndex = -1
  1109. this.LapsetoDialogVisible = false
  1110. } else {
  1111. this.$message.error(response.data.msg)
  1112. }
  1113. }
  1114. )
  1115. },
  1116. OpenSetLapseto(row, index) {
  1117. // if(row.lapseto == 1){
  1118. // this.lapeseto = "转出"
  1119. // }
  1120. // if(row.lapseto == 2){
  1121. // this.lapeseto = "留治"
  1122. // }
  1123. // if(row.lapeseto == 3){
  1124. // this.lapeseto = "死亡"
  1125. // }
  1126. this.patient = row
  1127. this.currentIndex = index
  1128. this.lapsetoForm.lapseto_time = ''
  1129. this.lapsetoForm.lapseto_type = row.lapseto
  1130. this.lapsetoForm.patient_id = row.id
  1131. this.lapsetoForm.out_reason = row.out_reason
  1132. this.LapsetoDialogVisible = true
  1133. },
  1134. LapsetoInfo(row) {
  1135. console.log("row",row)
  1136. if (typeof row.lapseto === 'undefined' ||(row.lapseto !== 1 && row.lapseto !== 2 && row.lapseto !==3)) {
  1137. return '未设置'
  1138. } else if (row.lapseto === 1) {
  1139. return '留治'
  1140. } else if(row.lapseto === 2) {
  1141. return '转出'
  1142. }else if(row.lapseto === 3){
  1143. return '死亡'
  1144. }
  1145. },
  1146. openWechatBindDialog() {
  1147. this.bindWechatDialog = true
  1148. },
  1149. handleCheckAllChange(val) {
  1150. // console.log(val)
  1151. // console.log(this.checkAll)
  1152. // console.log(this.isIndeterminate)
  1153. },
  1154. handleSelectionChange(val) {
  1155. this.multipleSelection = val
  1156. this.pageSelect = this.multipleSelection.length
  1157. },
  1158. handleCheckedCitiesChange(value) {
  1159. const checkedCount = value.length
  1160. this.checkAll = checkedCount === this.cities.length
  1161. this.isIndeterminate =
  1162. checkedCount > 0 && checkedCount < this.cities.length
  1163. },
  1164. handleSizeChange(val) {
  1165. sessionStorage.setItem('patientPageSize',val)
  1166. this.listQuery.limit = val
  1167. this.getList()
  1168. },
  1169. handleCurrentChange(val) {
  1170. this.listQuery.page = val
  1171. this.getList()
  1172. },
  1173. changeCategoryId(categoryId) {
  1174. this.categoryId = categoryId
  1175. },
  1176. selectSchedulType(scheduleType) {
  1177. // alert(scheduleType);/
  1178. this.schedulType = scheduleType
  1179. this.listQuery.schedul_type = scheduleType
  1180. this.getList()
  1181. },
  1182. selectSystemType(systemType) {
  1183. this.systemType = systemType
  1184. this.listQuery.binding_state = systemType
  1185. this.getList()
  1186. },
  1187. selectLapseTo(lapseto) {
  1188. this.lapsetoType = lapseto
  1189. this.listQuery.lapseto = lapseto
  1190. this.getList()
  1191. },
  1192. selectSource(source) {
  1193. this.sourceType = source
  1194. this.listQuery.source = source
  1195. this.getList()
  1196. },
  1197. changeTimeOne(val) {
  1198. var time = this.getTimestamp(val) - this.end_time
  1199. if (time > 0) {
  1200. this.$message.error('结束时间不能小于开始时间')
  1201. this.listQuery.start_time = ''
  1202. } else {
  1203. this.getList()
  1204. this.startTime = this.getTimestamp(val)
  1205. }
  1206. },
  1207. changeTime(val) {
  1208. var time = this.getTimestamp(val) - this.startTime
  1209. if (time < 0) {
  1210. this.$message.error('结束时间不能小于开始时间')
  1211. this.listQuery.end_time = ''
  1212. } else {
  1213. this.getList()
  1214. this.end_time = this.getTimestamp(val)
  1215. }
  1216. },
  1217. getTimestamp(time) {
  1218. // 把时间日期转成时间戳
  1219. return new Date(time).getTime() / 1000
  1220. },
  1221. search() {
  1222. this.listQuery.keywords = this.searchKey
  1223. this.getList()
  1224. },
  1225. changeOtherSearch() {
  1226. this.getList()
  1227. },
  1228. getList() {
  1229. console.log("parasm2222",this.listQuery)
  1230. fetchList(this.listQuery).then(response => {
  1231. if (response.data.state === 0) {
  1232. this.$message.error(response.data.msg)
  1233. return false
  1234. } else {
  1235. this.tableData = response.data.data.patients
  1236. console.log('病人是', this.tableData)
  1237. this.pageTotal = this.tableData.length
  1238. this.total = response.data.data.total
  1239. }
  1240. })
  1241. },
  1242. OpenView(name, number, id) {
  1243. this.name = name
  1244. this.dialysis_no = number
  1245. this.centerDialogVisible = true
  1246. OpenView(id).then(response => {
  1247. if (response.data.state === 0) {
  1248. this.$message.error(response.data.msg)
  1249. return false
  1250. } else {
  1251. var patient = response.data.data.patient
  1252. console.log('二维码病人信息', patient)
  1253. this.id = patient.id
  1254. this.name = patient.name
  1255. this.gender = patient.gender
  1256. this.idcardno = patient.id_card_no
  1257. this.phone = patient.phone
  1258. this.healthcareno = patient.health_care_no
  1259. }
  1260. })
  1261. },
  1262. ShowQRCode() {
  1263. document.getElementById('qrcode').innerHTML = ''
  1264. this.qrcode = this.$QRCode()
  1265. },
  1266. download() {
  1267. alert('aaaa')
  1268. },
  1269. print() {
  1270. var ptime = Math.round(new Date().getTime() / 1000)
  1271. this.print_time = uParseTime(ptime, '{y}年{m}月{d}日')
  1272. const style =
  1273. '@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;} }'
  1274. setTimeout(() => {
  1275. printJS({
  1276. printable: 'print-card-info',
  1277. type: 'html',
  1278. style: style,
  1279. scanStyles: false
  1280. })
  1281. }, 1)
  1282. var id = this.id
  1283. var name = this.name
  1284. var gender = this.gender
  1285. if (gender === 1) {
  1286. gender = '男'
  1287. }
  1288. if (gender === 2) {
  1289. gender = '女'
  1290. }
  1291. var idcardno = this.idcardno
  1292. var phone = this.phone
  1293. var healthcareno = this.healthcareno
  1294. var dialysisno = this.dialysis_no
  1295. // Base64位加密
  1296. // var aid = this.Base64.encode(id);
  1297. // var aname = this.Base64.encode(name);
  1298. // var agender = this.Base64.encode(gender);
  1299. // var aidcardno = this.Base64.encode(idcardno);
  1300. // var aphone = this.Base64.encode(phone);
  1301. // var ahealthcareno = this.Base64.encode(healthcareno);
  1302. // var adialysisno = this.Base64.encode(dialysisno);
  1303. // 调用生成二维码的方法
  1304. this.$options.methods.qrcode(
  1305. id,
  1306. name,
  1307. gender,
  1308. idcardno,
  1309. phone,
  1310. healthcareno,
  1311. dialysisno
  1312. )
  1313. },
  1314. qrcode(id, name, gender, idcardno, phone, healthcareno, dialysisno) {
  1315. document.getElementById('code').innerHTML = ''
  1316. const qrcode = new QRCode('code', {
  1317. width: 200,
  1318. height: 200,
  1319. text:
  1320. 'user_id:' +
  1321. id +
  1322. ',' +
  1323. 'name:' +
  1324. name +
  1325. ',' +
  1326. 'dialysis_no:' +
  1327. dialysisno +
  1328. ',' +
  1329. 'gender:' +
  1330. gender +
  1331. ',' +
  1332. 'idcard_no:' +
  1333. idcardno +
  1334. ',' +
  1335. 'phone:' +
  1336. phone +
  1337. ',' +
  1338. 'healthcare_no:' +
  1339. healthcareno
  1340. })
  1341. },
  1342. toRemind(){
  1343. this.dialogTableVisible = true
  1344. },
  1345. GetRemindPatientList(){
  1346. const params = {
  1347. page: this.page,
  1348. limit: this.limit
  1349. }
  1350. GetRemind(params).then(response=>{
  1351. if(response.data.state == 1){
  1352. this.gridData = response.data.data.patients;
  1353. this.totalOne = response.data.data.total;
  1354. var value = response.data.data.total
  1355. if(value == 0){
  1356. this.value = ""
  1357. }
  1358. if(value != 0){
  1359. this.value = value
  1360. }
  1361. }
  1362. })
  1363. },
  1364. jump(id) {
  1365. // this.$router.replace({ path: "/patients/inspection?id=" + id });
  1366. this.$router.replace({path:"/patients/patients/"+id +"/inspectionInfectious"})
  1367. },
  1368. dateCompare(date) {
  1369. var date1 = Date.parse(new Date()) / 1000;
  1370. if (date > date1) {
  1371. return 1;
  1372. } else {
  1373. return 2;
  1374. }
  1375. },
  1376. handleSizeChangeOne(val) {
  1377. this.limit = val
  1378. this.GetRemindPatientList();
  1379. },
  1380. handleCurrentChangeOne(val) {
  1381. this.page = val;
  1382. this.GetRemindPatientList();
  1383. },
  1384. getTime(val) {
  1385. if(val < 0){
  1386. return ""
  1387. }
  1388. if(val == ""){
  1389. return ""
  1390. }else {
  1391. return uParseTime(val, '{y}-{m}-{d}')
  1392. }
  1393. },
  1394. }
  1395. }
  1396. Vue.prototype.$QRCode = function() {
  1397. var name = this.name
  1398. var dialysis_no = this.dialysis_no
  1399. var id = this.id
  1400. var gender = this.gender
  1401. if (gender === 1) {
  1402. gender = '男'
  1403. }
  1404. if (gender === 2) {
  1405. gender = '女'
  1406. }
  1407. var idcardno = this.idcardno
  1408. var phone = this.phone
  1409. var healthcareno = this.healthcareno
  1410. // BASE64加密
  1411. // var eid = this.Base64.encode(id)
  1412. // var ename = this.Base64.encode(name)
  1413. // var egender = this.Base64.encode(gender)
  1414. // var eidcardno = this.Base64.encode(idcardno)
  1415. // var ephone = this.Base64.encode(phone)
  1416. // var ehealthcareno = this.Base64.encode(healthcareno)
  1417. // var edialysisno = this.Base64.encode(dialysis_no)
  1418. var eid = id
  1419. var ename = name
  1420. var egender = gender
  1421. var eidcardno = idcardno
  1422. var ephone = phone
  1423. var ehealthcareno = healthcareno
  1424. var edialysisno = dialysis_no
  1425. console.log(
  1426. 'user_id' + eid,
  1427. 'name:' + ename,
  1428. 'gender:' + egender,
  1429. 'idcard_no:' + eidcardno,
  1430. 'phone:' + ephone,
  1431. 'healthcare_no:' + ehealthcareno,
  1432. 'edialysis_no:' + edialysisno
  1433. )
  1434. const salting = 'admin-authority'
  1435. new QRCode('qrcode', {
  1436. width: 150, // 设置宽度
  1437. height: 150, // 设置高度
  1438. text:
  1439. 'user_id:' +
  1440. eid +
  1441. ',' +
  1442. 'name:' +
  1443. ename +
  1444. ',' +
  1445. 'dialysis_no:' +
  1446. edialysisno +
  1447. ',' +
  1448. 'gender:' +
  1449. egender +
  1450. ',' +
  1451. 'idcard_no:' +
  1452. eidcardno +
  1453. ',' +
  1454. 'phone:' +
  1455. ephone +
  1456. ',' +
  1457. 'healthcare_no:' +
  1458. ehealthcareno
  1459. })
  1460. }
  1461. </script>
  1462. <style rel="stylesheet/scss" lang="scss">
  1463. .app-container {
  1464. /*margin: 20 px;*/
  1465. font-size: 15px;
  1466. .filter-container {
  1467. padding-bottom: 5px;
  1468. }
  1469. .search-component {
  1470. width: 500px;
  1471. .searchBox {
  1472. width: 300px;
  1473. height: 36px;
  1474. line-height: 36px;
  1475. padding-left: 15px;
  1476. border: 1px #dcdfe6 solid;
  1477. border-right: none;
  1478. outline: none;
  1479. float: left;
  1480. border-radius: 6px 0 0 6px;
  1481. font-size: 14px;
  1482. color: #333;
  1483. background: #fff;
  1484. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  1485. }
  1486. .searchBtn {
  1487. background-color: #409eff;
  1488. color: #fff;
  1489. font-size: 15px;
  1490. text-align: center;
  1491. height: 36px;
  1492. line-height: 36px;
  1493. float: left;
  1494. outline: none;
  1495. width: 70px;
  1496. border: none;
  1497. border-radius: 0 6px 6px 0;
  1498. font-family: "Microsoft Yahei";
  1499. cursor: pointer;
  1500. }
  1501. }
  1502. .amount {
  1503. font-weight: normal;
  1504. padding: 10px 0 0 0;
  1505. color: #606266;
  1506. font-size: 14px;
  1507. span {
  1508. color: #ef2525;
  1509. font-family: "Arial";
  1510. padding: 0 2px;
  1511. }
  1512. }
  1513. .print_main_content {
  1514. background-color: white;
  1515. width: 960px;
  1516. margin: 0 auto;
  1517. padding: 0 0 20px 0;
  1518. }
  1519. .print_main_content .order_title {
  1520. text-align: center;
  1521. font-size: 23px;
  1522. line-height: 50px;
  1523. font-weight: 500px;
  1524. }
  1525. .print_main_content table {
  1526. width: 100%;
  1527. border: 1px solid;
  1528. border-collapse: collapse;
  1529. padding: 2px;
  1530. }
  1531. .print_main_content table tbody tr td {
  1532. border: 1px solid;
  1533. text-align: center;
  1534. /* font-size: 17px; */
  1535. padding: 10px 8px;
  1536. }
  1537. .td_proj_title {
  1538. font-size: 18px;
  1539. line-height: 25px;
  1540. font-weight: 500;
  1541. }
  1542. .td_proj_content {
  1543. font-size: 18px;
  1544. line-height: 25px;
  1545. }
  1546. .td_align_left {
  1547. text-align: left;
  1548. }
  1549. .print_footnote_panel {
  1550. font-size: 17px;
  1551. line-height: 40px;
  1552. }
  1553. .print_footnote_panel .proj {
  1554. display: inline-block;
  1555. width: 49%;
  1556. }
  1557. .print_footnote_panel .proj .proj_title {
  1558. font-weight: 500;
  1559. }
  1560. }
  1561. .el-table td,
  1562. .el-table th.is-leaf,
  1563. .el-table--border,
  1564. .el-table--group {
  1565. border-color: #d0d3da;
  1566. }
  1567. .el-table--border::after,
  1568. .el-table--group::after,
  1569. .el-table::before {
  1570. background-color: #d0d3da;
  1571. }
  1572. .el-select--small {
  1573. width: 196px;
  1574. }
  1575. .el-checkbox__inner::after {
  1576. height: 10px;
  1577. left: 7px;
  1578. }
  1579. .el-checkbox__inner {
  1580. width: 20px;
  1581. height: 20px;
  1582. }
  1583. </style>