1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
-
- <template v-if="this.template_id == 1">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >打印</el-button
- >
- </template>
- <template v-if="this.template_id == 2 || this.template_id == 0 || this.template_id == 33">
- <div>
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintAction"
- type="primary"
- >打印全部</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionOne"
- type="primary"
- style=""
- >打印记录单</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionTwo"
- type="primary"
- >打印医嘱单</el-button
- >
- </div>
- </template>
- <template v-if="this.template_id == 3">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >打印</el-button
- >
- </template>
- <template v-if="this.template_id == 4">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >打印</el-button
- >
- </template>
- <template v-if="this.template_id == 5">
- <div>
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintAction"
- type="primary"
- >打印全部</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionOne"
- type="primary"
- style=""
- >打印记录单</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionTwo"
- type="primary"
- >打印医嘱单</el-button
- >
- </div>
- </template>
- <template v-if="this.template_id == 6 || this.template_id == 48 || this.template_id == 0">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >打印</el-button>
- </template>
- <template v-if="this.template_id == 7">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 8">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 9">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 12">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 13">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 15">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 17">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 20">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 22">
- <div>
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintAction"
- type="primary"
- >打印全部</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionOne"
- type="primary"
- style=""
- >打印记录单</el-button
- >
- <el-button
- :loading="loading"
- size="small"
- icon="el-icon-printer"
- @click="batchPrintActionTwo"
- type="primary"
- >打印医嘱单</el-button
- >
- </div>
- </template>
- <template v-if="this.template_id == 25">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <!-- <template v-if="this.template_id == 27">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template> -->
- <template v-if="this.template_id == 28">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 30">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 32">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 37">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 38">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 39">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 40">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 41">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 43">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 47">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button
- >
- </template>
- <template v-if="this.template_id == 59">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >打印</el-button>
- </template>
- <template v-if="this.template_id == 60">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button>
- </template>
- <template v-if="this.template_id == 61">
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >批量打印</el-button>
- </template>
-
-
- </div>
- <div class="app-container">
- <!-- <div class="filter-container">
- <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
- <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
- </div>-->
- <div class="cell clearfix">
- <label class="title">
- <span class="name">{{
- search_mode == 1 ? "日期查询" : "病人查询"
- }}</span>
- :
- </label>
- <el-date-picker
- v-show="search_mode == 1"
- v-model="time"
- prefix-icon="el-icon-date"
- @change="changeTime"
- :editable="false"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- :picker-options="pickerOptions1"
- format="yyyy-MM-dd"
- value-format="timestamp"
- ></el-date-picker>
- <el-input
- v-show="search_mode == 2"
- v-model="patient_search_keyword"
- style="width: 250px;"
- placeholder="病人名字、透析号"
- @keyup.enter.native='searchPatientAction'
- >
- <el-button
- slot="append"
- style="background-color: #409EFF; color: white; border-radius: 0;"
- icon="el-icon-search"
- @click="searchPatientAction"
- ></el-button>
- </el-input>
- <el-button type="primary" @click="changeSearchMode">{{
- search_mode == 1 ? "改为病人查询" : "改为日期查询"
- }}</el-button>
- </div>
- <div class="cell clearfix" v-show="search_mode == 2">
- <label class="title">
- <span class="name">日期查询</span>:
- </label>
- <el-date-picker
- v-model="listQuery.start_time"
- prefix-icon="el-icon-date"
- @change="changeStartTime"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- :picker-options="pickerOptions1"
- format="yyyy-MM-dd"
- value-format="timestamp"
- ></el-date-picker>
- -
- <el-date-picker
- v-model="listQuery.end_time"
- prefix-icon="el-icon-date"
- @change="changeEndTime"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- :picker-options="pickerOptions1"
- format="yyyy-MM-dd"
- value-format="timestamp"
- ></el-date-picker>
- </div>
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.value == schedulType ? 'active' : ''"
- @click="selectSchedulType(item.value)"
- v-for="item in schedulArr"
- :key="item.value"
- >
- {{ item.label }}
- </li>
- </ul>
- </div>
- </div>
- <div class="cell clearfix">
- <label class="title"> <span class="name">分区</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == partitionType ? 'active' : ''"
- @click="selectPartitionType(item.id)"
- v-for="item in partitionArr"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
-
- <el-table
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :data="SchedualPatientsTableData"
- style="width: 100%"
- v-loading="loading"
- @current-change="clickCurrent"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="45"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="number"
- label="机号"
- align="center"
- ></el-table-column>
- <el-table-column
- label="排班日期"
- prop="sch_time"
- align="center"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="start_time"
- label="上机时间"
- align="center"
- width="80"
- ></el-table-column>
- <el-table-column
- prop="dialysis_no"
- label="透析号"
- align="center"
- ></el-table-column>
- <el-table-column prop="name" label="姓名" align="center">
- <template slot-scope="scope">
- <span style="color: #579ef8;width:100%;display:block;">{{ scope.row.name }}</span>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="mode_name"
- label="透析模式"
- align="center"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="target_ultrafiltration"
- label="目标超滤量"
- align="center"
- width="100"
- ></el-table-column>
-
- <el-table-column
- prop="dialysis_before_weight"
- label="透前称重(kg)"
- align="center"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="dialysis_after_weight"
- label="透后称重(kg)"
- align="center"
- width="120"
- ></el-table-column>
- <el-table-column label="透中血压(mmHg)" align="center">
- <el-table-column
- v-for="(item, index) in labelArr"
- :key="index"
- :label="item"
- align="center"
- >
- <!-- 数据的遍历 scope.row就代表数据的每一个对象-->
- <template slot-scope="scope">
- <span v-if="getValue(scope.row.bp[index])>=90 && getValue(scope.row.bp[index])<=140">{{getValue(scope.row.bp[index])}}</span>
- <span v-if="getValue(scope.row.bp[index])<90 || getValue(scope.row.bp[index]) >140" style="color:red">{{getValue(scope.row.bp[index])}}</span>
- <span v-if="getValueOne(scope.row.bp[index])>0">/</span>
- <span v-if="getValueOne(scope.row.bp[index])>=60 && getValueOne(scope.row.bp[index])<=90">{{getValueOne(scope.row.bp[index])}}</span>
- <span v-if="getValueOne(scope.row.bp[index]) <60 || getValueOne(scope.row.bp[index])>90" style="color:red">{{getValueOne(scope.row.bp[index])}}</span>
- </template>
- </el-table-column>
- </el-table-column>
- </el-table>
-
- <el-pagination
- align="right"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[20, 40, 60, 80,100]"
- :page-size="10"
- background
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
- </div>
- </template>
-
- <script>
- import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
- import { parseTime } from "@/utils";
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import { getPrintTemplate } from "@/api/data";
- const moment = require('moment')
- export default {
- name: "Patient",
- data() {
- return {
- crumbs: [
- { path: false, name: "透析管理" },
- { path: false, name: "透析监测" }
- ],
- loading: false,
- time: "",
-
- search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
- patient_search_keyword: "",
-
- SchedualPatientsTableData: [],
- active: true,
- schedulType: 0,
- schedulArr: [
- { value: 0, label: "全部" },
- { value: 1, label: "上午" },
- { value: 2, label: "下午" },
- { value: 3, label: "晚上" }
- ],
- template_id: 0,
-
- partitionType: 0,
-
- labelArr: ["第1次", "第2次", "第3次", "第4次", "第5次", "第6次", "第7次"],
-
- pickerOptions1: {
- shortcuts: [
- {
- text: "今天",
- onClick(picker) {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date1 = new Date(nowDate + " 00:00:00");
- picker.$emit("pick", date1.getTime());
- }
- },
- {
- text: "昨天",
- onClick(picker) {
- var d = new Date();
- d.setTime(d.getTime() - 3600 * 1000 * 24);
- var date = d;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date1 = new Date(nowDate + " 00:00:00");
- picker.$emit("pick", date1.getTime());
- }
- },
- {
- text: "一周前",
- onClick(picker) {
- var d = new Date();
- d.setTime(d.getTime() - 3600 * 1000 * 24 * 7);
- var date = d;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date1 = new Date(nowDate + " 00:00:00");
- picker.$emit("pick", date1.getTime());
- }
- },
- {
- text: "清空",
- onClick(picker) {
- picker.$emit("pick");
- }
- }
- ]
- },
-
- total: 0,
- listQuery: {
- page: 1,
- limit: 20,
- schedul_type: 0,
- partition_type: 0,
- schedul_time: "",
- keywords: "",
- start_time:"",
- end_time:"",
- },
- selecting_schs: [],
- partitionArr: [],
-
- };
- },
- created() {
- var search_mode = this.$store.getters.search_mode
- var search_value = this.$store.getters.search_value
- console.log('search_mode',search_mode)
- if(search_mode == 2){
- this.search_mode = search_mode
- if(search_value != ''){
- this.patient_search_keyword = search_value
- this.listQuery.keywords = search_value
-
- this.getSchedualPatientList();
- var date = new Date();
- this.time = date;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date = new Date(nowDate + " 00:00:00");
-
- this.listQuery.schedul_time = date.getTime();
- this.getAllZone();
- this.getTemplateInfo();
- }else {
- var start_month = moment().startOf('month').format('YYYY-MM-DD')
- var start_time = this.getTimestamp(start_month)
- this.listQuery.start_time = start_time
- var end_month = moment(new Date()).add('year',0).format("YYYY-MM-DD")
- var end_time = this.getTimestamp(end_month)
- this.listQuery.end_time = end_time
- this.getSchedualPatientList()
-
- this.getAllZone();
- this.getTemplateInfo();
-
- }
- }else {
- var date = new Date();
- this.time = date;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date = new Date(nowDate + " 00:00:00");
- this.listQuery.schedul_time = date.getTime();
- var start_month = moment().startOf('month').format('YYYY-MM-DD')
- var start_time = this.getTimestamp(start_month)
- this.listQuery.start_time = start_time
- var end_month = moment(new Date()).add('year',0).format("YYYY-MM-DD")
- var end_time = this.getTimestamp(end_month)
- this.listQuery.end_time = end_time
- this.getAllZone();
- this.getSchedualPatientList();
- this.getTemplateInfo();
- }
-
- // this.template_id = this.$store.getters.xt_user.template_info.template_id;
- },
- methods: {
- getTemplateInfo() {
- getPrintTemplate().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- var template = response.data.data.template;
- this.template_id = template.template_id;
- console.log("templage-i233232323232322323233232323223",this.template_id)
- }
- });
- },
- clickCurrent(val) {
- console.log(val);
- this.$router.push({
- path: "/dialysis/details",
- query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
- });
- },
- handleSelectionChange(val) {
- this.selecting_schs = val;
- },
-
- selectSchedulType(scheduleType) {
- // alert(scheduleType);/
- this.schedulType = scheduleType;
- this.listQuery.schedul_type = scheduleType;
- this.getSchedualPatientList();
- },
- selectPartitionType(partitionType) {
- this.partitionType = partitionType;
- this.listQuery.partition_type = partitionType;
- this.getSchedualPatientList();
- },
-
- changeTime() {
- this.listQuery.schedul_time = this.time;
- this.getSchedualPatientList();
- },
- changeStartTime(){
-
- this.getSchedualPatientList()
- },
- changeEndTime(){
-
- this.getSchedualPatientList()
- },
- getAllZone: function() {
- GetAllZone().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.partitionArr = response.data.data.zone;
- this.partitionArr.unshift({ id: 0, name: "全部" });
- }
- });
- },
- getTimestamp(time) { //把时间日期转成时间戳
-
- return (new Date(time)).getTime()
- },
- getSchedualPatientList: function() {
- this.loading = true;
- if (this.search_mode == 1) {
- this.listQuery.keywords = "";
-
-
- } else {
- this.listQuery.schedul_time = "";
-
- }
- console.log("params332322332323232",this.listQuery)
- this.SchedualPatientsTableData = [];
- getSchedualPatient(this.listQuery).then(response => {
-
- if (response.data.state == 0) {
- this.loading = false;
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.loading = false;
- this.total = response.data.data.total;
- // console.log(response.data.data)
- for (let i = 0; i < response.data.data.schedule.length; i++) {
- if (response.data.data.schedule[i].patient&&response.data.data.schedule[i].patient.id > 0) {
- const SchedualPatientsTable = {
- bp: []
- };
- if(response.data.data.schedule[i].dialysis_order!=null){
- SchedualPatientsTable["start_time"] = response.data.data.schedule[i].dialysis_order.start_time ? parseTime(response.data.data.schedule[i].dialysis_order.start_time,"{h}:{i}") : '';
- }
-
- SchedualPatientsTable["sch_id"] = response.data.data.schedule[i].id;
- SchedualPatientsTable["sch_time_int"] = response.data.data.schedule[i].schedule_date;
- SchedualPatientsTable["sch_time"] = parseTime(response.data.data.schedule[i].schedule_date,"{y}-{m}-{d}");
- SchedualPatientsTable["mode_id"] = response.data.data.schedule[i].mode_id
- if(response.data.data.schedule[i].patient!=null){
- SchedualPatientsTable["dialysis_no"] = response.data.data.schedule[i].patient.dialysis_no;
- SchedualPatientsTable["name"] = response.data.data.schedule[i].patient.name;
- SchedualPatientsTable["gender"] = response.data.data.schedule[i].patient.gender;
- SchedualPatientsTable["source"] = response.data.data.schedule[i].patient.source;
- SchedualPatientsTable["patient_id"] = response.data.data.schedule[i].patient_id;
- }
-
- SchedualPatientsTable["number"] = response.data.data.schedule[i].device_number.number;
-
- if(response.data.data.schedule[i].treatment_mode!=null){
- SchedualPatientsTable["mode_name"] = response.data.data.schedule[i].treatment_mode.name;
- }
- if(response.data.data.schedule[i].prescription!=null){
- SchedualPatientsTable["target_ultrafiltration"] = response.data.data.schedule[i].prescription.target_ultrafiltration;
- }
-
- if (response.data.data.schedule[i].assessment_before_dislysis != null) {
- SchedualPatientsTable["dialysis_before_weight"] =response.data.data.schedule[i].assessment_before_dislysis.weight_before;
- }
- if (response.data.data.schedule[i].assessment_after_dislysis !=null) {
- SchedualPatientsTable["dialysis_after_weight"] =response.data.data.schedule[i].assessment_after_dislysis.weight_after;
- }
-
- SchedualPatientsTable.bp = [];
- if(response.data.data.schedule[i].monitoring_record && response.data.data.schedule[i].monitoring_record.length > 0){
- for (let a = 0;a < response.data.data.schedule[i].monitoring_record.length;a++) {
- const bp = {};
- bp["value"] =response.data.data.schedule[i].monitoring_record[a].systolic_blood_pressure.toString()+"/" +response.data.data.schedule[i].monitoring_record[a].diastolic_blood_pressure.toString();
- SchedualPatientsTable.bp.push(bp);
- }
- }
-
-
- this.SchedualPatientsTableData.push(SchedualPatientsTable);
-
- }
- }
- }
- });
- },
- getValue: function(val) {
-
- if (val != undefined) {
- var str = val.value.split("/")
- return str[0];
- } else {
- return "";
- }
- },
- getValueOne: function(val) {
- if (val != undefined) {
- var str = val.value.split("/")
- return str[1];
- } else {
- return "";
- }
- },
- handleCurrentChange(val) {
- this.listQuery.page = val;
- this.getSchedualPatientList();
- },
- changeSearchMode: function() {
- if (this.search_mode == 1) {
- this.search_mode = 2;
-
- } else {
- this.search_mode = 1;
- var date = new Date();
- this.time = date;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date = new Date(nowDate + " 00:00:00");
- this.listQuery.schedul_time = date.getTime();
-
- this.getAllZone();
- this.getSchedualPatientList();
- this.getTemplateInfo();
- }
- this.$store.dispatch('SetSearchMode', this.search_mode)
- },
- searchPatientAction: function() {
- this.listQuery.keywords = this.patient_search_keyword;
- this.$store.dispatch('SetSearchValue', this.patient_search_keyword)
- console.log(this.patient_search_keyword);
- if (this.patient_search_keyword.length == 0) {
- return;
- }
- this.getSchedualPatientList();
- },
- handleSizeChange(val) {
- this.listQuery.limit = val;
- this.getSchedualPatientList();
- },
- batchPrintAction: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- // 模板ID为6
- var sch_ids = [];
-
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].sch_id);
- }
- console.log("sch_ids",sch_ids)
- this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
- if (this.template_id == 2 || this.template_id == 0) {
- this.$router.push({ path: "/dialysis/print/batch/other" });
- } else if (this.template_id == 1) {
- this.$router.push({ path: "/dialysis/print/batch" });
- } else if (this.template_id == 3) {
- this.$router.push({ path: "/dialysis/print/batch/three" });
- } else if (this.template_id == 4) {
- this.$router.push({ path: "/dialysis/print/batch/four" });
- } else if (this.template_id == 5) {
- this.$router.push({ path: "/dialysis/print/batch/five" });
- } else if (this.template_id == 6) {
- this.$router.push({ path: "/dialysis/print/batch/six" });
- } else if (this.template_id == 7) {
- this.$router.push({ path: "/dialysis/print/batch/seven" });
- } else if (this.template_id == 8) {
- this.$router.push({ path: "/dialysis/print/batch/eight" });
- } else if (this.template_id == 9) {
- this.$router.push({ path: "/dialysis/print/batch/nine" });
- } else if (this.template_id == 12) {
- this.$router.push({ path: "/dialysis/print/batch/twelve" });
- } else if (this.template_id == 13) {
- this.$router.push({ path: "/dialysis/print/batch/thirteen" });
- } else if (this.template_id == 15) {
- this.$router.push({ path: "/dialysis/print/batch/fifteen" });
- } else if (this.template_id == 17) {
- this.$router.push({ path: "/dialysis/print/batch/seventeen" });
- } else if (this.template_id == 20) {
- this.$router.push({ path: "/dialysis/print/batch/twenty" });
- } else if (this.template_id == 22) {
- this.$router.push({ path: "/dialysis/print/batch/twentyTwo" });
- } else if (this.template_id == 25) {
- this.$router.push({ path: "/dialysis/print/batch/twentyFive" });
- }else if (this.template_id == 27) {
- this.$router.push({ path: "/dialysis/print/batch/twentySeven" });
- } else if(this.template_id == 28){
- this.$router.push({path:"/dialysis/print/batch/twentyEight"})
- } else if (this.template_id == 30) {
- this.$router.push({ path: "/dialysis/print/batch/thirty" });
- } else if (this.template_id == 32) {
- this.$router.push({ path: "/dialysis/print/batch/thirtyTwo" });
- } else if (this.template_id == 33) {
- this.$router.push({ path: "/dialysis/print/batch/thirtyThree" });
- } else if (this.template_id == 37) {
- this.$router.push({ path: "/dialysis/print/batch/thirtySeven" });
- } else if (this.template_id == 38) {
- this.$router.push({ path: "/dialysis/print/batch/thirtyEight" });
- } else if (this.template_id == 39) {
- this.$router.push({ path: "/dialysis/print/batch/thirtyNine" });
- } else if (this.template_id == 40) {
- this.$router.push({ path: "/dialysis/print/batch/forty" });
- } else if (this.template_id == 41) {
- this.$router.push({ path: "/dialysis/print/batch/fortyOne" });
- } else if (this.template_id == 43) {
- this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
- } else if (this.template_id == 47) {
- this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
- } else if (this.template_id == 48) {
- this.$router.push({ path: "/dialysis/print/batch/six" });
- }else if (this.template_id == 59) {
- this.$router.push({ path: "/dialysis/print/batch/fiftynine" });
- }else if (this.template_id == 60) {
- this.$router.push({ path: "/dialysis/print/batch/sixty" });
- }else if (this.template_id == 61) {
- this.$router.push({ path: "/dialysis/print/batch/sixtyOne" });
- }
- },
- batchPrintActionOne: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- var sch_ids = [];
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].sch_id);
- }
- this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
- if (this.template_id == 2 || this.template_id == 0) {
- this.$router.push({ path: "/dialysis/print/batch/otherone" });
- } else if (this.template_id == 1) {
- this.$router.push({ path: "/dialysis/print/batch" });
- } else if (this.template_id == 5) {
- this.$router.push({ path: "/dialysis/print/batch/fiveone" });
- } else if (this.template_id == 22) {
- this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
- } else if(this.template_id == 33){
- this.$router.push({ path: "/dialysis/print/batch/thirtyThree_one" });
- }
- },
- batchPrintActionTwo: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- var sch_ids = [];
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].sch_id);
- }
- this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
- if (this.template_id == 2 || this.template_id == 0) {
- this.$router.push({ path: "/dialysis/print/batch/othertwo" });
- } else if (this.template_id == 1) {
- this.$router.push({ path: "/dialysis/print/batch" });
- } else if (this.template_id == 5) {
- this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
- } else if (this.template_id == 22) {
- this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
- } else if (this.template_id == 33) {
- this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
- }
- }
- },
- components: {
- BreadCrumb
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .app-container {
- // margin: 20px;
- font-size: 15px;
- .filter-container {
- padding-bottom: 5px;
- }
- .cqd-dataTitle {
- color: #303133;
- font-size: 14px;
- border-bottom: 2px #e4e7ed solid;
- height: 36px;
- line-height: 36px;
- margin: 0 0 25px 0;
- position: relative;
- }
- .cqd-dataTitle::before {
- position: absolute;
- left: 0;
- bottom: -2px;
- content: "";
- width: 42px;
- height: 2px;
- background: #409eff;
- }
- .search-component {
- width: 500px;
- .searchBox {
- width: 300px;
- height: 36px;
- line-height: 36px;
- padding-left: 15px;
- border: 1px #dcdfe6 solid;
- border-right: none;
- outline: none;
- float: left;
- border-radius: 6px 0 0 6px;
- font-size: 14px;
- color: #333;
- background: #fff;
- box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
- }
- .searchBtn {
- background-color: #409eff;
- color: #fff;
- font-size: 15px;
- text-align: center;
- height: 36px;
- line-height: 36px;
- float: left;
- outline: none;
- width: 70px;
- border: none;
- border-radius: 0 6px 6px 0;
- font-family: "Microsoft Yahei";
- cursor: pointer;
- }
- }
- .amount {
- font-weight: normal;
- padding: 10px 0 0 0;
- color: #606266;
- font-size: 14px;
- span {
- color: #ef2525;
- font-family: "Arial";
- padding: 0 2px;
- }
- }
- }
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- .el-checkbox__inner::after {
- height: 10px;
- left: 7px;
- }
- .el-checkbox__inner {
- width: 20px;
- height: 20px;
- }
- </style>
|