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

patients.vue 49KB

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