血透系统PC前端

patients.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb></bread-crumb>
  5. <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" @click="$router.push({path:'/patients/create'})" class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" size="small">新增</el-button>
  6. </div>
  7. <div class="app-container">
  8. <div class="cell">
  9. <label class="title"><span class="name">病人搜索</span> : </label>
  10. <el-input style="width: 400px;" v-model="searchKey" class="filter-item" placeholder="病人姓名/透析号" size="small"/>
  11. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search" size="small" >搜索</el-button>
  12. </div>
  13. <div class="cell">
  14. <label class="title"><span class="name">日期查询</span> : </label>
  15. <el-date-picker v-model="listQuery.start_time" size="small" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" :picker-options="pickerOptions1" format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
  16. <span class="">-</span>
  17. <el-date-picker v-model="listQuery.end_time" size="small" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" :picker-options="pickerOptions1" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
  18. </div>
  19. <div class="cell clearfix">
  20. <label class="title"><span class="name">排班班次</span> : </label>
  21. <div class="time ">
  22. <ul class="">
  23. <li :class="item.value==schedulType?'active':''" @click='selectSchedulType(item.value)' v-for="item in schedulArr" :key="item.value" >{{item.label}}</li>
  24. </ul>
  25. </div>
  26. </div>
  27. <div class="cell clearfix">
  28. <label class="title"><span class="name">状态</span> : </label>
  29. <div class="time ">
  30. <ul class="">
  31. <li :class="item.value==systemType?'active':''" @click="selectSystemType(item.value)" v-for="item in systemArr" :key="item.value" >{{item.label}}</li>
  32. </ul>
  33. </div>
  34. </div>
  35. <div class="cell clearfix">
  36. <label class="title"><span class="name">转归情况</span> : </label>
  37. <div class="time ">
  38. <ul class="">
  39. <li :class="item.lapseto==lapsetoType?'active':''" @click="selectLapseTo( item.lapseto)" v-for="item in lapsetoArr" :key="item.value" >{{item.label}}</li>
  40. </ul>
  41. </div>
  42. </div>
  43. <div class="cell clearfix">
  44. <label class="title"><span class="name">病人来源</span> : </label>
  45. <div class="time ">
  46. <ul class="">
  47. <li :class="item.source==sourceType?'active':''" @click="selectSource(item.source)" v-for="item in sourceArr" :key="item.value" >{{item.label}}</li>
  48. </ul>
  49. </div>
  50. </div>
  51. <div class="cell clearfix">
  52. <label class="title"><span class="name">其它查询</span> : </label>
  53. <el-select v-model="listQuery.contagion" size="small" clearable placeholder="传染病" @change="changeOtherSearch">
  54. <el-option
  55. v-for="item in contagionList"
  56. :key="item.id"
  57. :label="item.name"
  58. :value="item.id">
  59. </el-option>
  60. </el-select>
  61. <el-select style="margin-left: 10px;" v-model="listQuery.reimbursement_way" size="small" clearable placeholder="付费方式" @change="changeOtherSearch">
  62. <el-option
  63. v-for="item in reimbursement_ways"
  64. :key="item.id"
  65. :label="item.name"
  66. :value="item.id">
  67. </el-option>
  68. </el-select>
  69. <el-select
  70. v-model="listQuery.isscheduling"
  71. collapse-tags
  72. style="margin-left: 10px;"
  73. clearable
  74. placeholder="排班情况" size="small" @change="changeOtherSearch">
  75. <el-option
  76. v-for="item in scheduling"
  77. :key="item.value"
  78. :label="item.label"
  79. :value="item.value">
  80. </el-option>
  81. </el-select>
  82. <el-select
  83. v-model="listQuery.isprescription"
  84. collapse-tags
  85. style="margin-left:10px;"
  86. clearable
  87. placeholder="透析处方" size="small" @change="changeOtherSearch">
  88. <el-option
  89. v-for="item in prescription"
  90. :key="item.value"
  91. :label="item.label"
  92. :value="item.value">
  93. </el-option>
  94. </el-select>
  95. </div>
  96. <el-table
  97. ref="multipleTable" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="tableData" border fit highlight-current-row style="width: 100%;margin-top: 10px;" @selection-change="handleSelectionChange">
  98. <el-table-column align="center" label="全选" width="60px" type="selection" ></el-table-column>
  99. <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
  100. <el-table-column label="透析号" min-width="80" property="dialysis_no" align="center"></el-table-column>
  101. <el-table-column label="住院号" min-width="80" property="admission_number" align="center"> </el-table-column>
  102. <el-table-column property="name" label="姓名" min-width="80" align="center">
  103. <template slot-scope="scope" >
  104. <router-link :to="'/patients/patient/'+scope.row.id" style="color:#409eff" >{{scope.row.name}}</router-link>
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="性别" min-width="80" align="center">
  108. <template slot-scope="scope" >
  109. <span v-if="scope.row.gender==1">男</span>
  110. <span v-else-if="scope.row.gender==2">女</span>
  111. <span v-else>未知</span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="来源" min-width="80" align="center">
  115. <template slot-scope="scope" >
  116. <span v-if="scope.row.source==1">门诊</span>
  117. <span v-else-if="scope.row.source==2">住院</span>
  118. <span v-else>未知</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column property="total_dialysis" label="透析次数" min-width="94" align="center"> </el-table-column>
  122. <!-- <el-table-column min-width="150" label="二维码" align="center">
  123. <template slot-scope="scope" type="text">
  124. <a style="color:#409eff" v-if="scope.row.binding_state==1" @click="openWechatBindDialog">已绑定</a>
  125. <a style="color:#409eff" v-else @click="openWechatBindDialog">生成</a>
  126. </template>
  127. </el-table-column> -->
  128. <el-table-column label="日期" min-width="144" align="center">
  129. <template slot-scope="scope">
  130. <span>{{scope.row.created_time | parseTime('{y}-{m}-{d}')}}</span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="转归" align="center">
  134. <template slot-scope="scope">
  135. <span>{{LapsetoInfo(scope.row)}}</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="操作" align="center" min-width="140">
  139. <template slot-scope="scope">
  140. <el-tooltip class="item" effect="dark" content="转归" placement="top">
  141. <el-button type="primary" icon="el-icon-edit" size="small" @click="OpenSetLapseto(scope.row, scope.$index)"></el-button>
  142. </el-tooltip>
  143. <el-tooltip class="item" effect="dark" content="预览" placement="top">
  144. <el-button type="danger" icon="el-icon-tickets" size="small" @click="OpenView(scope.row.name,scope.row.dialysis_no,scope.row.id)"></el-button>
  145. </el-tooltip>
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <!-- <pagi-nation title="分页"></pagi-nation> -->
  150. <el-pagination
  151. @size-change="handleSizeChange"
  152. @current-change="handleCurrentChange"
  153. :current-page="listQuery.pate"
  154. :page-sizes="[10, 20, 50, 100]"
  155. :page-size="10"
  156. background
  157. style="margin-top:20px;"
  158. align="right"
  159. layout="total, sizes, prev, pager, next, jumper"
  160. :total="total">
  161. </el-pagination>
  162. <el-dialog
  163. title="微信绑定"
  164. :visible.sync="bindWechatDialog"
  165. width="30%"
  166. center>
  167. <img :src="wechatbindimg" width="100%" alt="" v-if="wechatbindimg" >
  168. <i class="el-icon-loading" v-else></i>
  169. <span slot="footer" class="dialog-footer">
  170. <el-button type="primary" @click="bindWechatDialog = false">关闭</el-button>
  171. </span>
  172. </el-dialog>
  173. <el-dialog title="转归" :visible.sync="LapsetoDialogVisible">
  174. <el-form :model="lapsetoForm" :rules="lapsetoRules" ref="lapsetoForm" >
  175. <el-form-item label="治疗状态(转归)" prop="lapseto_type" required>
  176. <el-radio-group v-model="lapsetoForm.lapseto_type">
  177. <el-radio v-for="item in lapsetoOptions" :key="item.value" :label="item.value" :value="item.value" >{{item.label}}</el-radio>
  178. </el-radio-group>
  179. </el-form-item>
  180. <el-form-item label="转归时间" prop="lapseto_time" required>
  181. <el-date-picker
  182. v-model="lapsetoForm.lapseto_time"
  183. type="datetime"
  184. format="yyyy-MM-dd HH:mm:ss"
  185. value-format="yyyy-MM-dd HH:mm:ss"
  186. placeholder="选择日期时间"
  187. default-time="12:00:00">
  188. </el-date-picker>
  189. </el-form-item>
  190. </el-form>
  191. <div slot="footer" class="dialog-footer">
  192. <el-button @click="LapsetoDialogVisible = false">取 消</el-button>
  193. <el-button type="primary" @click="EditLapseto()">确 定</el-button>
  194. </div>
  195. </el-dialog>
  196. <el-dialog
  197. title="签到卡"
  198. :visible.sync="centerDialogVisible"
  199. :close-on-click-modal="false"
  200. @opened="ShowQRCode()"
  201. width="30%"
  202. center>
  203. <div align="center" style="margin-bottom:6px;font-size:20px">
  204. <!-- 姓名:<el-input v-model="name" size="small" style="width:200px"></el-input><br> -->
  205. 姓名:<span>{{this.name}}</span>
  206. </div>
  207. <div align="center" style="margin-bottom:10px;font-size:20px">
  208. <!-- 透析号:<el-input v-model="dialysis_no" size="small" style="width:200px"></el-input><br> -->
  209. 透析号:<span>{{this.dialysis_no}}</span>
  210. </div>
  211. <div id="qrcode" align="center">
  212. </div>
  213. <span slot="footer" class="dialog-footer">
  214. <!-- <el-button type="primary" @click="download()">下载</el-button> -->
  215. <el-button type="primary" @click="print()">打印</el-button>
  216. </span>
  217. </el-dialog>
  218. <div hidden="hidden">
  219. <div id="print-card-info">
  220. <div class="order_title" align="center" style="margin-bottom:20px;font-size:35px">
  221. 签到卡
  222. </div>
  223. <div align="center" style="margin-bottom:4px;font-size:25px">
  224. 姓名:<span>&nbsp;&nbsp;{{this.name}}</span><br>
  225. </div>
  226. <div align="center" style="margin-bottom:20px;font-size:25px">
  227. 透析号:<span>&nbsp;&nbsp;{{this.dialysis_no}}</span>
  228. </div>
  229. <div>
  230. <div id="code" align="center"></div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. </template>
  237. <script>
  238. import { fetchList, EditLapseto, OpenView, code } from '@/api/patient'
  239. import QRCode from 'qrcodejs2'
  240. import Vue from 'vue'
  241. import print from 'print-js'
  242. import { Base64 } from 'js-base64'
  243. import { uParseTime} from '@/utils/tools'
  244. import { log } from 'util'
  245. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  246. export default {
  247. name: 'Patient',
  248. components:{
  249. BreadCrumb
  250. },
  251. data() {
  252. return {
  253. lapsetoRules: {
  254. lapseto_type: [
  255. { required: true, message: '请选择治疗状态' }
  256. ],
  257. lapseto_time: [
  258. { required: true, message: '请选择转归时间' }
  259. ]
  260. },
  261. currentIndex: -1,
  262. LapsetoDialogVisible: false,
  263. centerDialogVisible: false,
  264. checkAll: false,
  265. isIndeterminate: true,
  266. wechatbindimg: '',
  267. active: true,
  268. schedulType: 0,
  269. lapsetoForm: {
  270. lapseto_type: 0,
  271. lapseto_time: '',
  272. patient_id: 0
  273. },
  274. schedulArr: [
  275. { value: 0, label: '全部' },
  276. { value: 1, label: '上午' },
  277. { value: 2, label: '下午' },
  278. { value: 3, label: '晚上' }
  279. ],
  280. lapsetoOptions: [{ value: 1, label: '留治' }, { value: 2, label: '转出' }],
  281. systemType: 0,
  282. systemArr: [
  283. { value: 0, label: '全部' },
  284. { value: 1, label: '已绑定' },
  285. { value: 2, label: '未绑定' }
  286. ],
  287. sourceType: 0,
  288. sourceID: 0,
  289. lapsetoType: 0,
  290. sourceArr: [
  291. { value: 0, label: '全部', source: 0, lapseto: 0 },
  292. // { value: 1, label: "转出", source: 0, lapseto: 2 },
  293. // { value: 2, label: "留治", source: 0, lapseto: 1 },
  294. { value: 3, label: '门诊', source: 1, lapseto: 1 },
  295. { value: 4, label: '住院', source: 2, lapseto: 1 }
  296. ],
  297. lapsetoArr: [
  298. { value: 0, label: '全部', source: 0, lapseto: 0 },
  299. { value: 1, label: '转出', source: 0, lapseto: 2 },
  300. { value: 2, label: '留治', source: 0, lapseto: 1 }
  301. // { value: 3, label: "门诊", source: 1, lapseto: 1 },
  302. // { value: 4, label: "住院", source: 2, lapseto: 1 }
  303. ],
  304. scheduling: [
  305. {
  306. value: 1,
  307. label: '已排班'
  308. },
  309. {
  310. value: 2,
  311. label: '未排班'
  312. }
  313. ],
  314. prescription: [
  315. {
  316. value: 1,
  317. label: '有处方'
  318. },
  319. {
  320. value: 2,
  321. label: '无处方'
  322. }
  323. ],
  324. tableData: null,
  325. pickerOptions1: {
  326. shortcuts: [
  327. {
  328. text: '今天',
  329. onClick(picker) {
  330. picker.$emit('pick', new Date())
  331. }
  332. },
  333. {
  334. text: '昨天',
  335. onClick(picker) {
  336. const date = new Date()
  337. date.setTime(date.getTime() - 3600 * 1000 * 24)
  338. picker.$emit('pick', date)
  339. }
  340. },
  341. {
  342. text: '一周前',
  343. onClick(picker) {
  344. const date = new Date()
  345. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  346. picker.$emit('pick', date)
  347. }
  348. },
  349. {
  350. text: '清空',
  351. onClick(picker) {
  352. picker.$emit('pick')
  353. }
  354. }
  355. ]
  356. },
  357. searchKey: '',
  358. // value2: '',
  359. total: 0,
  360. pageTotal: 0,
  361. pageSelect: 0,
  362. listQuery: {
  363. page: 1,
  364. limit: 10,
  365. schedul_type: 0,
  366. binding_state: 0,
  367. lapseto: 0,
  368. source: 0,
  369. start_time: '',
  370. end_time: '',
  371. keywords: '',
  372. contagion: '',
  373. reimbursement_way: '',
  374. isscheduling: '',
  375. isprescription: ''
  376. },
  377. multipleSelection: [],
  378. bindWechatDialog: false,
  379. contagionList: [],
  380. reimbursement_ways: [],
  381. patient: null,
  382. id: '',
  383. name: '',
  384. dialysis_no: '',
  385. patientPrint: {},
  386. patient_id: '',
  387. gender: '',
  388. idcardno: '',
  389. phone: '',
  390. healthcareno: ''
  391. }
  392. },
  393. created() {
  394. this.getList()
  395. this.contagionList = this.$store.getters.contagions
  396. this.reimbursement_ways = this.$store.getters.reimbursement_ways
  397. const keyword = this.$route.query && this.$route.query.keyword
  398. if (typeof (keyword) === 'string' && keyword.length > 0) {
  399. this.listQuery.keywords = keyword
  400. this.searchKey = keyword
  401. }
  402. },
  403. methods: {
  404. EditLapseto() {
  405. EditLapseto(this.lapsetoForm.patient_id, this.lapsetoForm).then(response => {
  406. if (response.data.state === 1) {
  407. this.$notify({
  408. title: '成功',
  409. message: '转归设置完成',
  410. type: 'success',
  411. duration: 2000
  412. })
  413. this.tableData[this.currentIndex].lapseto = this.lapsetoForm.lapseto_type
  414. this.currentIndex = -1
  415. this.LapsetoDialogVisible = false
  416. } else {
  417. this.$message.error(response.data.msg)
  418. }
  419. })
  420. },
  421. OpenSetLapseto(row, index) {
  422. this.patient = row
  423. this.currentIndex = index
  424. this.lapsetoForm.lapseto_time = ''
  425. this.lapsetoForm.lapseto_type = row.lapseto
  426. this.lapsetoForm.patient_id = row.id
  427. this.LapsetoDialogVisible = true
  428. },
  429. LapsetoInfo(row) {
  430. if (typeof (row.lapseto) === 'undefined' || (row.lapseto !== 1 && row.lapseto !== 2)) {
  431. return '未设置'
  432. } else if (row.lapseto === 1) {
  433. return '留治'
  434. } else {
  435. return '转出'
  436. }
  437. },
  438. openWechatBindDialog() {
  439. this.bindWechatDialog = true
  440. },
  441. handleCheckAllChange(val) {
  442. console.log(val)
  443. console.log(this.checkAll)
  444. console.log(this.isIndeterminate)
  445. },
  446. handleSelectionChange(val) {
  447. this.multipleSelection = val
  448. this.pageSelect = this.multipleSelection.length
  449. },
  450. handleCheckedCitiesChange(value) {
  451. const checkedCount = value.length
  452. this.checkAll = checkedCount === this.cities.length
  453. this.isIndeterminate =
  454. checkedCount > 0 && checkedCount < this.cities.length
  455. },
  456. handleSizeChange(val) {
  457. this.listQuery.limit = val
  458. this.getList()
  459. },
  460. handleCurrentChange(val) {
  461. this.listQuery.page = val
  462. this.getList()
  463. },
  464. changeCategoryId(categoryId) {
  465. this.categoryId = categoryId
  466. },
  467. selectSchedulType(scheduleType) {
  468. // alert(scheduleType);/
  469. this.schedulType = scheduleType
  470. this.listQuery.schedul_type = scheduleType
  471. this.getList()
  472. },
  473. selectSystemType(systemType) {
  474. this.systemType = systemType
  475. this.listQuery.binding_state = systemType
  476. this.getList()
  477. },
  478. selectLapseTo(lapseto) {
  479. this.lapsetoType = lapseto
  480. this.listQuery.lapseto = lapseto
  481. this.getList()
  482. },
  483. selectSource(source) {
  484. this.sourceType = source
  485. this.listQuery.source = source
  486. this.getList()
  487. },
  488. changeTime() {
  489. this.getList()
  490. },
  491. search() {
  492. this.listQuery.keywords = this.searchKey
  493. this.getList()
  494. },
  495. changeOtherSearch() {
  496. this.getList()
  497. },
  498. getList() {
  499. fetchList(this.listQuery).then(response => {
  500. if (response.data.state === 0) {
  501. this.$message.error(response.data.msg)
  502. return false
  503. } else {
  504. this.tableData = response.data.data.patients
  505. this.pageTotal = this.tableData.length
  506. this.total = response.data.data.total
  507. }
  508. })
  509. },
  510. OpenView(name, number, id) {
  511. this.name = name
  512. this.dialysis_no = number
  513. this.centerDialogVisible = true
  514. OpenView(id).then(response => {
  515. if (response.data.state === 0) {
  516. this.$message.error(response.data.msg)
  517. return false
  518. } else {
  519. var patient = response.data.data.patient
  520. this.id = patient.id
  521. this.name = patient.name
  522. this.gender = patient.gender
  523. this.idcardno = patient.id_card_no
  524. this.phone = patient.phone
  525. this.healthcareno = patient.health_care_no
  526. }
  527. })
  528. },
  529. ShowQRCode() {
  530. document.getElementById('qrcode').innerHTML = ''
  531. this.qrcode = this.$QRCode()
  532. },
  533. download() {
  534. alert('aaaa')
  535. },
  536. print() {
  537. var ptime = Math.round(new Date().getTime() / 1000)
  538. this.print_time = uParseTime(ptime, '{y}年{m}月{d}日')
  539. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .print_main_content .order_title { text-align: center; font-size: 23px; line-height: 50px; font-weight: 500; } .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px; } .td_proj_title { font-size: 18px; line-height: 25px; font-weight: 500; } .td_proj_content { font-size: 18px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 17px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj .proj_title { font-weight: 500;} }'
  540. setTimeout(() => {
  541. printJS({
  542. printable: 'print-card-info',
  543. type: 'html',
  544. style: style,
  545. scanStyles: false
  546. })
  547. }, 1)
  548. var id = this.id
  549. var name = this.name
  550. var gender = this.gender
  551. if (gender === 1) {
  552. gender = '男'
  553. }
  554. if (gender === 2) {
  555. gender = '女'
  556. }
  557. var idcardno = this.idcardno
  558. var phone = this.phone
  559. var healthcareno = this.healthcareno
  560. var dialysisno = this.dialysis_no
  561. // Base64位加密
  562. var aid = this.Base64.encode(id)
  563. var aname = this.Base64.encode(name)
  564. var agender = this.Base64.encode(gender)
  565. var aidcardno = this.Base64.encode(idcardno)
  566. var aphone = this.Base64.encode(phone)
  567. var ahealthcareno = this.Base64.encode(healthcareno)
  568. var adialysisno = this.Base64.encode(dialysisno)
  569. // 调用生成二维码的方法
  570. this.$options.methods.qrcode(aid, aname, agender, aidcardno, aphone, ahealthcareno, adialysisno)
  571. },
  572. qrcode(id, name, gender, idcardno, phone, healthcareno, dialysisno) {
  573. document.getElementById('code').innerHTML = ''
  574. const qrcode = new QRCode('code', {
  575. width: 200,
  576. height: 200,
  577. text: 'user_id:' + id + ',' + 'name:' + name + ',' + 'dialysis_no:' + dialysisno + ',' + 'gender:' + gender + ',' + 'idcard_no:' + idcardno + ',' + 'phone:' + phone + ',' + 'healthcare_no:' + healthcareno
  578. })
  579. }
  580. // components:{
  581. // pagiNation
  582. // }
  583. }
  584. }
  585. Vue.prototype.$QRCode = function() {
  586. var name = this.name
  587. var dialysis_no = this.dialysis_no
  588. var id = this.id
  589. var gender = this.gender
  590. if (gender === 1) {
  591. gender = '男'
  592. }
  593. if (gender === 2) {
  594. gender = '女'
  595. }
  596. var idcardno = this.idcardno
  597. var phone = this.phone
  598. var healthcareno = this.healthcareno
  599. // BASE64加密
  600. var eid = this.Base64.encode(id)
  601. var ename = this.Base64.encode(name)
  602. var egender = this.Base64.encode(gender)
  603. var eidcardno = this.Base64.encode(idcardno)
  604. var ephone = this.Base64.encode(phone)
  605. var ehealthcareno = this.Base64.encode(healthcareno)
  606. var edialysisno = this.Base64.encode(dialysis_no)
  607. console.log('user_id' + eid, 'name:' + ename, 'gender:' + egender, 'idcard_no:' + eidcardno, 'phone:' + ephone, 'healthcare_no:' + ehealthcareno, 'edialysis_no:' + edialysisno)
  608. const salting = 'admin-authority'
  609. new QRCode('qrcode', {
  610. width: 150, // 设置宽度
  611. height: 150, // 设置高度
  612. text: 'user_id:' + eid + ',' + 'name:' + ename + ',' + 'dialysis_no:' + edialysisno + ',' + 'gender:' + egender + ',' + 'idcard_no:' + eidcardno + ',' + 'phone:' + ephone + ',' + 'healthcare_no:' + ehealthcareno
  613. })
  614. }
  615. </script>
  616. <style rel="stylesheet/scss" lang="scss" scoped>
  617. .app-container {
  618. // margin: 20px;
  619. font-size: 15px;
  620. .filter-container {
  621. padding-bottom: 5px;
  622. }
  623. .search-component {
  624. width: 500px;
  625. .searchBox {
  626. width: 300px;
  627. height: 36px;
  628. line-height: 36px;
  629. padding-left: 15px;
  630. border: 1px #dcdfe6 solid;
  631. border-right: none;
  632. outline: none;
  633. float: left;
  634. border-radius: 6px 0 0 6px;
  635. font-size: 14px;
  636. color: #333;
  637. background: #fff;
  638. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  639. }
  640. .searchBtn {
  641. background-color: #409eff;
  642. color: #fff;
  643. font-size: 15px;
  644. text-align: center;
  645. height: 36px;
  646. line-height: 36px;
  647. float: left;
  648. outline: none;
  649. width: 70px;
  650. border: none;
  651. border-radius: 0 6px 6px 0;
  652. font-family: "Microsoft Yahei";
  653. cursor: pointer;
  654. }
  655. }
  656. .amount {
  657. font-weight: normal;
  658. padding: 10px 0 0 0;
  659. color: #606266;
  660. font-size: 14px;
  661. span {
  662. color: #ef2525;
  663. font-family: "Arial";
  664. padding: 0 2px;
  665. }
  666. }
  667. .print_main_content {
  668. background-color: white;
  669. width:960px;
  670. margin:0 auto;
  671. padding: 0 0 20px 0;
  672. }
  673. .print_main_content .order_title {
  674. text-align: center;
  675. font-size: 23px;
  676. line-height: 50px;
  677. font-weight: 500px;
  678. }
  679. .print_main_content table {
  680. width: 100%;
  681. border: 1px solid;
  682. border-collapse: collapse;
  683. padding: 2px;
  684. }
  685. .print_main_content table tbody tr td {
  686. border: 1px solid;
  687. text-align: center;
  688. /* font-size: 17px; */
  689. padding: 10px 8px;
  690. }
  691. .td_proj_title {
  692. font-size: 18px;
  693. line-height: 25px;
  694. font-weight: 500;
  695. }
  696. .td_proj_content {
  697. font-size: 18px;
  698. line-height: 25px;
  699. }
  700. .td_align_left {
  701. text-align: left;
  702. }
  703. .print_footnote_panel {
  704. font-size: 17px;
  705. line-height: 40px;
  706. }
  707. .print_footnote_panel .proj {
  708. display: inline-block;
  709. width: 49%;
  710. }
  711. .print_footnote_panel .proj .proj_title {
  712. font-weight: 500;
  713. }
  714. }
  715. </style>