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

patient.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <el-input style="width: 400px;" v-model="searchKey" class="filter-item" />
  5. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
  6. <!-- <el-button class="filter-item" type="primary" style="float:right;" icon="el-icon-download" >批量导入</el-button> -->
  7. <!-- <el-button type="primary" plain style="float:right;" icon="el-icon-download" >批量导入</el-button> -->
  8. <el-button @click="$router.push({path:'/patients/create'})" class="filter-item" style="float:right;" type="primary" icon="el-icon-edit" >新增病人</el-button>
  9. </div>
  10. <!-- <div class="search-component clearfix">
  11. <input type="text" class="searchBox" placeholder="姓名/首拼/透析号" v-model="searchVal">
  12. <button class="searchBtn">搜 索</button>
  13. </div> -->
  14. <div class="cell clearfix">
  15. <label class="title"><span class="name">日期查询</span> : </label>
  16. <el-date-picker size="small" v-model="listQuery.start_time" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
  17. <span class="cellLine"> - </span>
  18. <el-date-picker size="small" v-model="listQuery.end_time" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
  19. </div>
  20. <div class="cell clearfix">
  21. <label class="title"><span class="name">排班班次</span> : </label>
  22. <div class="time ">
  23. <ul class="">
  24. <li :class="item.value==schedulType?'active':''" @click='selectSchedulType(item.value)' v-for="item in schedulArr" :key="item.value" >{{item.label}}</li>
  25. </ul>
  26. </div>
  27. </div>
  28. <div class="cell clearfix">
  29. <label class="title"><span class="name">状态</span> : </label>
  30. <div class="time ">
  31. <ul class="">
  32. <li :class="item.value==systemType?'active':''" @click="selectSystemType(item.value)" v-for="item in systemArr" :key="item.value" >{{item.label}}</li>
  33. </ul>
  34. </div>
  35. </div>
  36. <div class="cell clearfix">
  37. <label class="title"><span class="name">病人来源</span> : </label>
  38. <div class="time ">
  39. <ul class="">
  40. <li :class="item.value==sourceType?'active':''" :style="item.source>0&&lapsetoType!=1?'display:none;':''" @click="selectLapseTo(item.value, item.source, item.lapseto)" v-for="item in sourceArr" :key="item.value" >{{item.label}}</li>
  41. </ul>
  42. </div>
  43. </div>
  44. <div class="cell clearfix">
  45. <label class="title"><span class="name">其它查询</span> : </label>
  46. <el-select v-model="listQuery.contagion" clearable placeholder="传染病" @change="changeOtherSearch">
  47. <el-option
  48. v-for="item in contagionList"
  49. :key="item.id"
  50. :label="item.name"
  51. :value="item.id">
  52. </el-option>
  53. </el-select>
  54. <el-select v-model="listQuery.reimbursement_way" clearable placeholder="付费方式" @change="changeOtherSearch">
  55. <el-option
  56. v-for="item in reimbursement_ways"
  57. :key="item.id"
  58. :label="item.name"
  59. :value="item.id">
  60. </el-option>
  61. </el-select>
  62. <el-select
  63. v-model="listQuery.isscheduling"
  64. collapse-tags
  65. style="margin-left: 10px;"
  66. clearable
  67. placeholder="排班情况" @change="changeOtherSearch">
  68. <el-option
  69. v-for="item in scheduling"
  70. :key="item.value"
  71. :label="item.label"
  72. :value="item.value">
  73. </el-option>
  74. </el-select>
  75. <el-select
  76. v-model="listQuery.isprescription"
  77. collapse-tags
  78. style="margin-left:10px;"
  79. clearable
  80. placeholder="透析处方" @change="changeOtherSearch">
  81. <el-option
  82. v-for="item in prescription"
  83. :key="item.value"
  84. :label="item.label"
  85. :value="item.value">
  86. </el-option>
  87. </el-select>
  88. </div>
  89. <div class="amount" >总<span>{{pageTotal}}</span>条 已选择{{pageSelect}}位患者</div>
  90. <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
  91. ref="multipleTable" :data="tableData" border fit highlight-current-row style="width: 100%;margin-top: 10px;" @selection-change="handleSelectionChange">
  92. <!-- <el-table-column type="selection" label="全选" width="60px" align="center">
  93. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  94. </el-table-column> -->
  95. <el-table-column align="center" label="全选" width="60px" type="selection" ></el-table-column>
  96. <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
  97. <el-table-column label="透析号" min-width="80" property="dialysis_no" align="center"></el-table-column>
  98. <el-table-column label="住院号" min-width="80" property="admission_number" align="center"> </el-table-column>
  99. <el-table-column property="name" label="姓名" min-width="80" align="center">
  100. <template slot-scope="scope" >
  101. <router-link :to="'/patients/edit/'+scope.row.id" style="color:#409eff;width:100%;display:block;" >{{scope.row.name}}</router-link>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="性别" min-width="80" align="center">
  105. <template slot-scope="scope" >
  106. <span v-if="scope.row.gender==1">男</span>
  107. <span v-else-if="scope.row.gender==2">女</span>
  108. <span v-else>未知</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="来源" min-width="80" align="center">
  112. <template slot-scope="scope" >
  113. <span v-if="scope.row.source==1">门诊</span>
  114. <span v-else-if="scope.row.source==2">住院</span>
  115. <span v-else>未知</span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column property="total_dialysis" label="透析次数" min-width="94" align="center">
  119. <template slot-scope="scope" >
  120. <span>{{getCount(scope.row)}}</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column min-width="150" label="二维码" align="center">
  124. <template slot-scope="scope" type="text">
  125. <a style="color:#409eff" v-if="scope.row.binding_state==1" @click="openWechatBindDialog">已绑定</a>
  126. <a style="color:#409eff" v-else @click="openWechatBindDialog">生成</a>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="日期" min-width="144" align="center">
  130. <template slot-scope="scope">
  131. <span>{{scope.row.created_time | parseTime('{y}-{m}-{d}')}}</span>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. <!-- <pagi-nation title="分页"></pagi-nation> -->
  136. <el-pagination
  137. @size-change="handleSizeChange"
  138. @current-change="handleCurrentChange"
  139. :current-page="listQuery.pate"
  140. :page-sizes="[10, 20, 50, 100]"
  141. :page-size="10"
  142. background
  143. style="margin-top:20px;"
  144. layout="total, sizes, prev, pager, next, jumper"
  145. :total="total">
  146. </el-pagination>
  147. <el-dialog
  148. title="微信绑定"
  149. :visible.sync="bindWechatDialog"
  150. width="30%"
  151. center>
  152. <img :src="wechatbindimg" width="100%" alt="" v-if="wechatbindimg" >
  153. <i class="el-icon-loading" v-else></i>
  154. <span slot="footer" class="dialog-footer">
  155. <el-button type="primary" @click="bindWechatDialog = false">关闭</el-button>
  156. </span>
  157. </el-dialog>
  158. </div>
  159. </template>
  160. <script>
  161. import { fetchList } from "@/api/patient";
  162. import pagiNation from '@/components/pagimg/pagiNation'
  163. export default {
  164. name: "Patient",
  165. data() {
  166. return {
  167. checkAll: false,
  168. isIndeterminate: true,
  169. wechatbindimg:"",
  170. active: true,
  171. schedulType: 0,
  172. schedulArr: [
  173. { value: 0, label: "全部" },
  174. { value: 1, label: "上午" },
  175. { value: 2, label: "下午" },
  176. { value: 3, label: "晚上" }
  177. ],
  178. systemType: 0,
  179. systemArr: [
  180. { value: 0, label: "全部" },
  181. { value: 1, label: "已绑定" },
  182. { value: 2, label: "未绑定" }
  183. ],
  184. sourceType: 0,
  185. sourceID: 0,
  186. lapsetoType: 0,
  187. sourceArr: [
  188. { value: 0, label: "全部", source: 0, lapseto: 0 },
  189. { value: 1, label: "转出", source: 0, lapseto: 2 },
  190. { value: 2, label: "留治", source: 0, lapseto: 1 },
  191. { value: 3, label: "门诊", source: 1, lapseto: 1 },
  192. { value: 4, label: "住院", source: 2, lapseto: 1 }
  193. ],
  194. scheduling: [
  195. {
  196. value: 1,
  197. label: "已排班"
  198. },
  199. {
  200. value: 2,
  201. label: "未排班"
  202. }
  203. ],
  204. prescription: [
  205. {
  206. value: 1,
  207. label: "有处方"
  208. },
  209. {
  210. value: 2,
  211. label: "无处方"
  212. }
  213. ],
  214. tableData: null,
  215. pickerOptions1: {
  216. shortcuts: [
  217. {
  218. text: "今天",
  219. onClick(picker) {
  220. picker.$emit("pick", new Date());
  221. }
  222. },
  223. {
  224. text: "昨天",
  225. onClick(picker) {
  226. const date = new Date();
  227. date.setTime(date.getTime() - 3600 * 1000 * 24);
  228. picker.$emit("pick", date);
  229. }
  230. },
  231. {
  232. text: "一周前",
  233. onClick(picker) {
  234. const date = new Date();
  235. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  236. picker.$emit("pick", date);
  237. }
  238. },
  239. {
  240. text:"清空",
  241. onClick(picker) {
  242. picker.$emit("pick");
  243. }
  244. }
  245. ]
  246. },
  247. searchKey: "",
  248. // value2: '',
  249. total: 0,
  250. pageTotal: 0,
  251. pageSelect: 0,
  252. listQuery: {
  253. page: 1,
  254. limit: 10,
  255. schedul_type: 0,
  256. binding_state: 0,
  257. lapseto: 0,
  258. source: 0,
  259. start_time: "",
  260. end_time: "",
  261. keywords: "",
  262. contagion: "",
  263. reimbursement_way:'',
  264. isscheduling:"",
  265. isprescription:"",
  266. },
  267. multipleSelection: [],
  268. bindWechatDialog: false,
  269. contagionList:[],
  270. reimbursement_ways:[],
  271. };
  272. },
  273. created() {
  274. this.getList();
  275. this.contagionList = this.$store.getters.contagions;
  276. this.reimbursement_ways = this.$store.getters.reimbursement_ways;
  277. },
  278. methods: {
  279. getCount(row){
  280. console.log(row)
  281. return row.total_dialysis + row.user_sys_before_count
  282. },
  283. openWechatBindDialog(){
  284. this.bindWechatDialog = true;
  285. },
  286. handleCheckAllChange(val) {
  287. console.log(val);
  288. console.log(this.checkAll);
  289. console.log(this.isIndeterminate);
  290. },
  291. handleSelectionChange(val) {
  292. this.multipleSelection = val;
  293. this.pageSelect = this.multipleSelection.length;
  294. },
  295. handleCheckedCitiesChange(value) {
  296. let checkedCount = value.length;
  297. this.checkAll = checkedCount === this.cities.length;
  298. this.isIndeterminate =
  299. checkedCount > 0 && checkedCount < this.cities.length;
  300. },
  301. changeCategoryId(categoryId) {
  302. this.categoryId = categoryId;
  303. },
  304. selectSchedulType(scheduleType) {
  305. // alert(scheduleType);/
  306. this.schedulType = scheduleType;
  307. this.listQuery.schedul_type = scheduleType;
  308. this.getList();
  309. },
  310. selectSystemType(systemType) {
  311. this.systemType = systemType;
  312. this.listQuery.binding_state = systemType;
  313. this.getList();
  314. },
  315. selectLapseTo(sourceType, sourceID, lapseto) {
  316. this.sourceType = sourceType;
  317. this.sourceID = sourceID;
  318. this.lapsetoType = lapseto;
  319. this.listQuery.source = sourceID;
  320. this.listQuery.lapseto = lapseto;
  321. this.getList();
  322. },
  323. changeTime(){
  324. this.getList();
  325. },
  326. search(){
  327. this.listQuery.keywords = this.searchKey;
  328. this.getList();
  329. },
  330. changeOtherSearch(){
  331. this.getList();
  332. },
  333. getList() {
  334. fetchList(this.listQuery).then(response => {
  335. if (response.data.state == 0) {
  336. this.$message.error(response.data.msg);
  337. return false;
  338. } else {
  339. this.tableData = response.data.data.patients;
  340. this.pageTotal = this.tableData.length;
  341. this.total = response.data.data.total;
  342. }
  343. });
  344. },
  345. // components:{
  346. // pagiNation
  347. // }
  348. }
  349. }
  350. </script>
  351. <style rel="stylesheet/scss" lang="scss" scoped>
  352. .app-container {
  353. // margin: 20px;
  354. font-size: 15px;
  355. .filter-container {
  356. padding-bottom: 5px;
  357. }
  358. .search-component {
  359. width: 500px;
  360. .searchBox {
  361. width: 300px;
  362. height: 36px;
  363. line-height: 36px;
  364. padding-left: 15px;
  365. border: 1px #dcdfe6 solid;
  366. border-right: none;
  367. outline: none;
  368. float: left;
  369. border-radius: 6px 0 0 6px;
  370. font-size: 14px;
  371. color: #333;
  372. background: #fff;
  373. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  374. }
  375. .searchBtn {
  376. background-color: #409eff;
  377. color: #fff;
  378. font-size: 15px;
  379. text-align: center;
  380. height: 36px;
  381. line-height: 36px;
  382. float: left;
  383. outline: none;
  384. width: 70px;
  385. border: none;
  386. border-radius: 0 6px 6px 0;
  387. font-family: "Microsoft Yahei";
  388. cursor: pointer;
  389. }
  390. }
  391. .amount {
  392. font-weight: normal;
  393. padding: 10px 0 0 0;
  394. color: #606266;
  395. font-size: 14px;
  396. span {
  397. color: #ef2525;
  398. font-family: "Arial";
  399. padding: 0 2px;
  400. }
  401. }
  402. }
  403. </style>