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

dialysisParameters.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <template>
  2. <div class="page_consumables">
  3. <div class="cell clearfix">
  4. <label class="title"> <span class="name">排班班次</span> : </label>
  5. <div class="time">
  6. <ul class>
  7. <li
  8. :class="item.value == scheduleType ? 'active' : ''"
  9. @click="selectSchedulType(item.value)"
  10. v-for="item in schedulArr"
  11. :key="item.value"
  12. >
  13. {{ item.label }}
  14. </li>
  15. </ul>
  16. </div>
  17. <label class="title"><span class="name">日期查询</span> : </label>
  18. <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  19. <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  20. <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
  21. </div>
  22. <div class="cell clearfix" style="justify-content: space-between;">
  23. <div style="display:flex;">
  24. <label class="title"> <span class="name">分区</span> : </label>
  25. <div class="time">
  26. <ul class>
  27. <li
  28. :class="item.id == partitionType ? 'active' : ''"
  29. @click="selectPartitionType(item.id)"
  30. v-for="item in partitionArr"
  31. :key="item.id"
  32. >
  33. {{ item.name }}
  34. </li>
  35. </ul>
  36. </div>
  37. </div>
  38. <div>
  39. <el-button size="small" icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
  40. <el-button size="small" type="primary" @click="statistics">统计表</el-button>
  41. </div>
  42. </div>
  43. <div>
  44. <el-table
  45. :data="tableData"
  46. border
  47. style="width: 100%"
  48. :row-style="{ color: '#303133' }"
  49. :header-cell-style="{
  50. backgroundColor: 'rgb(245, 247, 250)',
  51. color: '#606266'
  52. }"
  53. @selection-change="handleSelectionChange">
  54. <el-table-column align="center" type="selection" width="55">
  55. </el-table-column>
  56. <el-table-column align="center" fixed label="姓名" width="80">
  57. <template slot-scope="scope">
  58. {{scope.row.patient.name?scope.row.patient.name:""}}
  59. </template>
  60. </el-table-column>
  61. <el-table-column align="center" label="透析模式" width="100">
  62. <template slot-scope="scope">
  63. {{scope.row.treatment_mode.name?scope.row.treatment_mode.name:""}}
  64. </template>
  65. </el-table-column>
  66. <el-table-column align="center" label="上次透后体重(kg)" width="280">
  67. <template slot-scope="scope">
  68. {{getLastWeight(scope.row.patient.id)?getLastWeight(scope.row.patient.id):""}}
  69. </template>
  70. </el-table-column>
  71. <el-table-column align="center" label="透前体重(kg)" width="120">
  72. <template slot-scope="scope">
  73. {{getWeightBefor(scope.row.patient_id)?getWeightBefor(scope.row.patient_id):""}}
  74. </template>
  75. </el-table-column>
  76. <el-table-column align="center" label="干体重(kg)" width="140">
  77. <template slot-scope="scope">
  78. {{getDryWeight(scope.row.patient_id)?getDryWeight(scope.row.patient_id):""}}
  79. </template>
  80. </el-table-column>
  81. <el-table-column align="center" label="透前血压(mmhg)" width="180">
  82. <template slot-scope="scope">
  83. {{getSysBloodPressure(scope.row.patient_id)?getSysBloodPressure(scope.row.patient_id):""}}
  84. </template>
  85. </el-table-column>
  86. <el-table-column align="center" label="目标超滤量" width="120">
  87. <template slot-scope="scope">
  88. {{getTargetUltrafiltration(scope.row.patient_id)?getTargetUltrafiltration(scope.row.patient_id):""}}
  89. </template>
  90. </el-table-column>
  91. <el-table-column align="center" label="血流量(ml/min)" width="180">
  92. <template slot-scope="scope">
  93. {{getBloodFlowVolume(scope.row.patient_id)?getBloodFlowVolume(scope.row.patient_id):""}}
  94. </template>
  95. </el-table-column>
  96. <el-table-column align="center" label="抗凝剂(首剂)(维持)(总量)" width="220">
  97. <template slot-scope="scope">
  98. <span v-if="getAnticoagulant(scope.row.patient_id) == 0"></span>
  99. <span v-if="getAnticoagulant(scope.row.patient_id) == 1">无肝素</span>
  100. <span v-if="getAnticoagulant(scope.row.patient_id) == 2">普通肝素</span>
  101. <span v-if="getAnticoagulant(scope.row.patient_id) == 3">低分子肝素</span>
  102. <span v-if="getAnticoagulant(scope.row.patient_id) == 4">阿加曲班</span>
  103. <span v-if="getAnticoagulant(scope.row.patient_id) == 5">枸橼酸钠</span>
  104. <span v-if="getAnticoagulant(scope.row.patient_id)== 6">低分子肝素钙</span>
  105. <span v-if="getAnticoagulant(scope.row.patient_id) == 7">低分子肝素钠</span>
  106. <span v-if="getAnticoagulant(scope.row.patient_id) == 8">依诺肝素</span>
  107. <span v-if="getAnticoagulant(scope.row.patient_id) == 9">达肝素</span>
  108. <span v-if="getAnticoagulant(scope.row.patient_id) == 10">体外抗凝</span>
  109. <span>
  110. {{getAnticoagulantShouji(scope.row.patient_id)?getAnticoagulantShouji(scope.row.patient_id):''}}
  111. <span v-if="getAnticoagulant(scope.row.patient_id) ==1 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
  112. <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu/h</span>
  113. <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
  114. <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
  115. <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
  116. <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
  117. <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
  118. <span v-if="getAnticoagulant(scope.row.patient_id)== 8 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
  119. <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
  120. <span v-if="getAnticoagulant(scope.row.patient_id)== 10 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
  121. </span>
  122. <span>
  123. {{getAnticoagulantWeichi(scope.row.patient_id)?getAnticoagulantWeichi(scope.row.patient_id):''}}
  124. <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
  125. <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  126. <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  127. <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
  128. <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantWeichi(scope.row.patient_id)!=''">ml/h</span>
  129. <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  130. <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  131. <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  132. <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
  133. <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg</span>
  134. </span>
  135. <span>
  136. {{getAnticoagulantZongliang(scope.row.patient_id)?getAnticoagulantZongliang(scope.row.patient_id):''}}
  137. <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
  138. <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
  139. <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
  140. <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
  141. <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
  142. <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
  143. <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
  144. <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
  145. <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
  146. <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
  147. </span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column align="center" label="透析器/灌流器" width="200">
  151. <template slot-scope="scope">
  152. {{getDialyzerPerfusionApparatus(scope.row.patient_id)?getDialyzerPerfusionApparatus(scope.row.patient_id):""}}
  153. </template>
  154. </el-table-column>
  155. </el-table>
  156. <el-pagination
  157. align="right"
  158. @size-change="handleSizeChange"
  159. @current-change="handleCurrentChange"
  160. :page-sizes="[10, 20, 30, 50]"
  161. :page-size="10"
  162. background
  163. style="margin-top:20px;"
  164. layout="total, sizes, prev, pager, next, jumper"
  165. :total="total"
  166. ></el-pagination>
  167. </div>
  168. <consumables-dialog ref="consumables"></consumables-dialog>
  169. </div>
  170. </template>
  171. <script>
  172. import { GetAllZone } from "@/api/dialysis";
  173. import consumablesDialog from './consumablesDialog'
  174. import { parseTime } from "@/utils";
  175. import { getDialysisParameters } from "@/api/consumable"
  176. const moment = require('moment')
  177. export default {
  178. components:{
  179. consumablesDialog
  180. },
  181. data(){
  182. return{
  183. scheduleType: 0,
  184. schedulArr: [
  185. { value: 0, label: "全部" },
  186. { value: 1, label: "上午" },
  187. { value: 2, label: "下午" },
  188. { value: 3, label: "晚上" }
  189. ],
  190. // selected_date:new Date(),
  191. selected_date:"",
  192. partitionArr:[],
  193. partitionType: 0,
  194. tableData: [],
  195. search_input:"",
  196. limit:10,
  197. page:1,
  198. total:0,
  199. start_time:0,
  200. selecting_schs: [],
  201. start_time:0,
  202. prescriptionList:[],
  203. dialysisBefor:[]
  204. }
  205. },
  206. created(){
  207. //获取所有分区
  208. this.getAllZone()
  209. //获取透析参数
  210. this.getlist()
  211. },
  212. methods:{
  213. selectSchedulType(scheduleType) {
  214. this.scheduleType = scheduleType;
  215. this.getlist()
  216. },
  217. selectPartitionType(partitionType) {
  218. this.partitionType = partitionType;
  219. this.getlist()
  220. },
  221. getAllZone: function() {
  222. GetAllZone().then(response => {
  223. if (response.data.state == 0) {
  224. this.$message.error(response.data.msg);
  225. return false;
  226. } else {
  227. this.partitionArr = response.data.data.zone;
  228. this.partitionArr.unshift({ id: 0, name: "全部" });
  229. }
  230. });
  231. },
  232. statistics(){
  233. this.$refs.consumables.show();
  234. },
  235. search(){
  236. if(this.selected_date==""){
  237. this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
  238. }
  239. if(this.selected_date!=''){
  240. this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
  241. }
  242. const params ={
  243. start_time:this.start_time,
  244. keyword:this.search_input,
  245. scheduleType: this.scheduleType,
  246. partitionType:this.partitionType,
  247. limit:this.limit,
  248. page:this.page
  249. }
  250. getDialysisParameters(params).then(response=>{
  251. if(response.data.state == 1){
  252. var schedule = response.data.data.schedule
  253. console.log("schedule",schedule)
  254. this.tableData = schedule
  255. var total = response.data.data.total
  256. this.total = total
  257. }
  258. })
  259. },
  260. handleScheduleDateChange(){
  261. var startime = parseTime(this.selected_date,'{y}-{m}-{d}')
  262. this.start_time = startime
  263. this.getlist()
  264. },
  265. getTimestamp(time) {
  266. // 把时间日期转成时间戳
  267. return new Date(time).getTime() / 1000;
  268. },
  269. getlist(){
  270. if(this.selected_date==""){
  271. this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
  272. }
  273. if(this.selected_date!=''){
  274. this.start_time = parseTime(this.selected_date, '{y}-{m}-{d}')
  275. }
  276. const params ={
  277. start_time:this.start_time,
  278. keyword:this.search_input,
  279. scheduleType: this.scheduleType,
  280. partitionType:this.partitionType,
  281. limit:this.limit,
  282. page:this.page
  283. }
  284. getDialysisParameters(params).then(response=>{
  285. if(response.data.state == 1){
  286. var schedule = response.data.data.schedule
  287. console.log("schedule",schedule)
  288. this.tableData = schedule
  289. var total = response.data.data.total
  290. this.total = total
  291. var prescription = response.data.data.prescription
  292. this.prescriptionList = prescription
  293. var dialysbefor = response.data.data.dialysbefor
  294. this.dialysisBefor = dialysbefor
  295. console.log("dialysbefor",dialysbefor)
  296. }
  297. })
  298. },
  299. handleSelectionChange(val){
  300. this.selecting_schs = val;
  301. },
  302. toPrint(){
  303. if(this.selecting_schs.length === 0) {
  304. this.$message.error("请至少选择一条需要打印的内容");
  305. return false;
  306. }
  307. var sch_ids = [];
  308. for (let index = 0; index < this.selecting_schs.length; index++) {
  309. sch_ids.push(this.selecting_schs[index].id);
  310. }
  311. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  312. this.$router.push("/dialysis/dialysisParameters_print?startime="+this.start_time)
  313. },
  314. handleSizeChange(val) {
  315. this.limit = val;
  316. this.getlist();
  317. },
  318. handleCurrentChange(val) {
  319. this.page = val;
  320. this.getlist()
  321. },
  322. getLastWeight(id){
  323. var lastweight = ""
  324. for(let i=0;i<this.dialysisBefor.length;i++){
  325. if(this.dialysisBefor[i].patient_id == id){
  326. lastweight = this.dialysisBefor[i].weight_after_last_transparency
  327. }
  328. }
  329. return lastweight
  330. },
  331. getWeightBefor(id){
  332. var assessmentBeforWeight = ""
  333. for(let i=0;i<this.dialysisBefor.length;i++){
  334. if(this.dialysisBefor[i].patient_id == id){
  335. assessmentBeforWeight = this.dialysisBefor[i].weight_before
  336. }
  337. }
  338. return assessmentBeforWeight
  339. },
  340. getDryWeight(id){
  341. var dryWeight = ""
  342. for(let i=0;i<this.dialysisBefor.length;i++){
  343. if(this.dialysisBefor[i].patient_id == id){
  344. dryWeight = this.dialysisBefor[i].dry_weight
  345. }
  346. }
  347. return dryWeight
  348. },
  349. getSysBloodPressure(id){
  350. var sysBloodPressure = ""
  351. for(let i=0;i<this.dialysisBefor.length;i++){
  352. if(this.dialysisBefor[i].patient_id == id){
  353. sysBloodPressure = this.dialysisBefor[i].systolic_blood_pressure
  354. }
  355. }
  356. return sysBloodPressure
  357. },
  358. getTargetUltrafiltration(id){
  359. var targetUltrafiltration = ""
  360. for(let i=0;i<this.prescriptionList.length;i++){
  361. if(this.prescriptionList[i].patient_id == id){
  362. targetUltrafiltration = this.prescriptionList[i].target_ultrafiltration
  363. }
  364. }
  365. return targetUltrafiltration
  366. },
  367. getBloodFlowVolume(id){
  368. var bloodFlowVolume = ""
  369. for(let i=0;i<this.prescriptionList.length;i++){
  370. if(this.prescriptionList[i].patient_id == id){
  371. bloodFlowVolume = this.prescriptionList[i].blood_flow_volume
  372. }
  373. }
  374. return bloodFlowVolume
  375. },
  376. getDialyzerPerfusionApparatus(id){
  377. var dialyzerPerfusionApparatus = ""
  378. for(let i=0;i<this.prescriptionList.length;i++){
  379. if(this.prescriptionList[i].patient_id == id){
  380. dialyzerPerfusionApparatus = this.prescriptionList[i].dialyzer_perfusion_apparatus
  381. }
  382. }
  383. return dialyzerPerfusionApparatus
  384. },
  385. getAnticoagulant(id){
  386. var anticoagulant = ""
  387. for(let i=0;i<this.prescriptionList.length;i++){
  388. if(this.prescriptionList[i].patient_id == id){
  389. anticoagulant = this.prescriptionList[i].anticoagulant
  390. }
  391. }
  392. return anticoagulant
  393. },
  394. getAnticoagulantShouji(id){
  395. var shouji = ""
  396. for(let i=0;i<this.prescriptionList.length;i++){
  397. if(this.prescriptionList[i].patient_id == id){
  398. shouji = this.prescriptionList[i].anticoagulant_shouji
  399. }
  400. }
  401. return shouji
  402. },
  403. getAnticoagulantWeichi(id){
  404. var weichi = ""
  405. for(let i=0;i<this.prescriptionList.length;i++){
  406. if(this.prescriptionList[i].patient_id == id){
  407. weichi = this.prescriptionList[i].anticoagulant_weichi
  408. }
  409. return weichi
  410. }
  411. },
  412. getAnticoagulantZongliang(id){
  413. var zongliang = ""
  414. for(let i=0;i<this.prescriptionList.length;i++){
  415. if(this.prescriptionList[i].patient_id == id){
  416. zongliang = this.prescriptionList[i].anticoagulant_zongliang
  417. }
  418. }
  419. return zongliang
  420. }
  421. }
  422. }
  423. </script>
  424. <style lang="scss" scoped>
  425. .page_consumables{
  426. .clearfix:after{
  427. content:none;
  428. }
  429. }
  430. </style>