123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703 |
- <template>
- <div class="page_consumables">
- <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>
-
- <label class="title"><span class="name">日期查询</span> : </label>
- <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"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择日期时间" align="right"></el-date-picker>
- <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
- class="filter-item" v-model="query.keywords"/>
- <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
- </div>
- <div class="cell clearfix" style="justify-content: space-between;">
- <div style="display:flex;">
- <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>
- <div>
- <el-button size="small" icon="el-icon-printer" @click="toDialog" type="primary">设置</el-button>
- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
- <el-button size="small" type="primary" @click="statistics">统计表</el-button>
- </div>
- </div>
-
- <div>
- <el-table
- :data="list"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in good_types"
- :key="index"
- :label="item"
- >
- <template slot-scope="scope">
- <span>{{scope.row.good_type[index].name}}</span>
- </template>
-
- </el-table-column>
-
- </el-table>
-
- <el-dialog
- title="统计类型设置"
- :visible.sync="dialogVisible"
- width="30%">
- <span>
- <el-checkbox v-model="device_number" label="透析机号"></el-checkbox>
- <el-checkbox v-model="device_type" label="设备型号"></el-checkbox>
- <el-checkbox v-model="name" label="姓名"></el-checkbox>
- <el-checkbox v-model="admission_number" label="住院(门诊)号"></el-checkbox>
- <el-checkbox v-model="dialysis_no" label="透析号"></el-checkbox>
- <el-checkbox v-model="weight_befor" label="透前体重"></el-checkbox>
- <el-checkbox v-model="dry_weight" label="干体重"></el-checkbox>
- <el-checkbox v-model="blood_pressure" label="透前血压"></el-checkbox>
- <el-checkbox v-model="ultrafiltration_volume" label="目标脱水量"></el-checkbox>
- <el-checkbox v-model="internal_fistula" label="血管通路"></el-checkbox>
- <el-checkbox v-model="blood_flow_volume" label="血流量"></el-checkbox>
- <el-checkbox v-model="anticoagulant" label="抗凝剂(首剂)(维持)(总量)"></el-checkbox>
- <el-checkbox v-model="sealing_fluid_dispose" label="封管液"></el-checkbox>
- <el-checkbox v-model="mode_id" label="透析模式"></el-checkbox>
- <el-checkbox v-model="dialysis_time" label="透析时长"></el-checkbox>
- <el-checkbox v-model="dialysis_dialyszers" label="透析器"></el-checkbox>
- <el-checkbox v-model="dialysis_irrigation" label="灌流器"></el-checkbox>
- <el-checkbox v-model="gaijiliang" label="钙"></el-checkbox>
- <el-checkbox v-model="kalium" label="钾"></el-checkbox>
- <el-checkbox v-model="displace_liqui_value" label="置换总量"></el-checkbox>
- <el-checkbox v-model="bicarbonate" label="碳酸氢根"></el-checkbox>
- <el-checkbox v-model="glucose" label="葡萄糖"></el-checkbox>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="saveDialysisSetting">确 定</el-button>
- </span>
- </el-dialog>
-
- </div>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
- </template>
-
-
- <script>
- import { GetAllZone,saveDialysisSetting,getDialysisSetting } from '@/api/dialysis'
- import { uParseTime } from "@/utils/tools";
- import store from "@/store";
- export default {
- components: {
-
- },
- data() {
- return {
- query:{
- total:"",
- schedule_date:"",
- schedule_type:0,
- partition_id:0,
- page:1,
- limit:10,
- keywords:"",
- good_type:0,
- },
- schedulType: 0,
- schedulArr: [
- { value: 0, label: '全部' },
- { value: 1, label: '上午' },
- { value: 2, label: '下午' },
- { value: 3, label: '晚上' }
- ],
- selected_date: "",
- partitionArr: [],
- goodList:[
- { id: 0, name: '全部' },
- { id: 1, name: '已出库' },
- { id: 2, name: '未出库' },
- ],
- partitionType: 0,
- goodType:0,
- tableData: [{
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }
- ],
- search_input: '',
- searchAction: '',
- allGoodInfo:[],
- list:[],
- new_list:[],
-
- good_types: [],
- arrKey:[],
- arrList:[],
- total:0,
- dialogVisible:false,
- predialysisConditionOptions:[],
- predialysis_condition:false,
-
- device_number:false,
- device_type:false,
- name:false,
- admission_number:false,
- dialysis_no:false,
- weight_befor:false,
- dry_weight:false,
- blood_pressure:false,
- ultrafiltration_volume:false,
- internal_fistula:false,
- blood_flow_volume:false,
- anticoagulant:false,
- sealing_fluid_dispose:false,
- mode_id:false,
- dialysis_time:false,
- dialysis_dialyszers:false,
- dialysis_irrigation:false,
- gaijiliang:false,
- kalium:false,
- displace_liqui_value:false,
- bicarbonate:false,
- glucose:false
- }
- },
- created() {
- var filedList = store.getters.xt_user.fileds
- console.log("哈哈哈哈",filedList)
- var newArr = [
- {value:999999,filed_name_cn:"姓名"},
- {value:888888,filed_name_cn:"透析号"},
- {value:777777,filed_name_cn:"透析机号"}
- ]
- for (let i = 0; i < filedList.length; i++) {
- if (filedList[i].module == 1 && filedList[i].is_show == 1) {
- newArr.push(filedList[i])
- }
- if (filedList[i].module == 3 && filedList[i].is_show == 1 &&(filedList[i].filed_name_cn == "干体重" || filedList[i].filed_name_cn == "透前称重" || filedList[i].filed_name_cn == "收缩压" || filedList[i].filed_name_cn == "舒张压" )) {
- newArr.push(filedList[i])
- }
- this.predialysisConditionOptions = newArr
- }
- console.log("newArr23232323232wo",newArr)
- this.getAllZone()
- let date = uParseTime(new Date(), "{y}-{m}-{d}")
- var newDate = new Date();
- var y = newDate.getFullYear();
- var m = newDate.getMonth() + 1;
- var d = newDate.getDate();
- var schedule_date =
- y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
-
- this.selected_date = date
- this.query.schedule_date = schedule_date
- this.query.schedule_type = 0
- this.query.partition_id = 0
- this.query.page = 1
- this.getlist()
-
- },
- methods: {
- open(){
-
- },
- getlist(){
-
- },
- handleSizeChange(val) {
- this.query.limit = val;
- this.getlist();
- },
- handleCurrentChange(val) {
- this.query.page = val;
- this.getlist();
- },
-
- calCount(query_warehouseout_info) {
- let total = 0
- var array = []
- array = query_warehouseout_info
- for (let i = 0; i < array.length; i++) {
- total = total + array[i].count
- }
- return total
-
- },
- getGoodUserInfo(good_type_id,good_user,last_good_user) {
- var arrlist =[]
- if (good_user != null && good_user.length > 0) {
- let desc = ""
- for (let b = 0; b < good_user.length; b++){
- if(good_type_id == good_user[b].good_type_id)
- desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
- }
- arrlist.push(desc)
- return desc
- }
- return ""
-
- // else if (good_user != null && good_user.length <= 0) {
- // if (last_good_user != null && last_good_user.length > 0) {
- // let desc = ""
- // for (let b = 0; b < last_good_user.length; b++){
- // if(good_type_id == last_good_user[b].good_type_id)
- // desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
- // }
- // console.log(desc)
- //
- // return desc
- //
- // }
- // return ""
- // }
- },
-
- selectSchedulType(scheduleType) {
- this.schedulType = scheduleType
- this.query.schedule_type = scheduleType
- this.query.page = 1
- this.getlist()
-
- },
- selectPartitionType(partitionType) {
- this.partitionType = partitionType
- this.query.partition_id = partitionType
- this.query.page = 1
-
- this.getlist()
-
- },
- selectGoodType(goodType){
- this.goodType = goodType
- this.query.good_type = goodType
- this.getlist()
- },
- 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: '全部' })
- }
- })
- },
- statistics() {
- this.$refs.consumables.show()
- },
- handleScheduleDateChange(val) {
- this.query.schedule_date = val
- this.query.page = 1
- this.getlist()
- },
- search() {
- this.query.page = 1
- this.getlist()
- },
-
- exportList(){
- import('@/vendor/Export2Excel').then(excel => {
-
-
-
- var arrTwo = []
- for(let i=0;i<this.arrKey.length;i++){
- arrTwo.push('name'+i)
- }
- console.log("arrKey88888",arrTwo)
-
- // console.log("9999999",this.list)
- const tHeader = this.good_types
- const filterVal = arrTwo
- console.log("thedad",tHeader)
- console.log("filterval",filterVal)
- console.log("33333",this.arrList)
- const data = this.formatJson(filterVal,this.arrList)
- console.log("data",data)
-
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '透析耗材查询'
- })
- this.downloadLoading = false
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]));
- },
- toDialog(){
- console.log("触发222222222222222我v")
- getDialysisSetting().then(response=>{
- if(response.data.state == 1){
- this.dialogVisible = true
- var dialysisSett = response.data.data.dialysisSett
- if(dialysisSett!=undefined){
- if(dialysisSett.device_number == 1){
- this.device_number = true
- }else{
- this.device_number = false
- }
- if(dialysisSett.device_type == 1){
- this.device_type = true
- }else{
- this.device_type = false
- }
- if(dialysisSett.name == 1){
- this.name = true
- }else{
- this.name = false
- }
- if(dialysisSett.admission_number == 1){
- this.admission_number = true
- }else{
- this.admission_number = false
- }
- if(dialysisSett.dialysis_no == 1){
- this.dialysis_no = true
- }else{
- this.dialysis_no = false
- }
- if(dialysisSett.weight_befor == 1){
- this.weight_befor = true
- }else{
- this.weight_befor = false
- }
- if(dialysisSett.dry_weight == 1){
- this.dry_weight = true
- }else{
- this.dry_weight = false
- }
- if(dialysisSett.blood_pressure == 1){
- this.blood_pressure = true
- }else{
- this.blood_pressure = false
- }
- if(dialysisSett.ultrafiltration_volume == 1){
- this.ultrafiltration_volume = true
- }else{
- this.ultrafiltration_volume = false
- }
- if(dialysisSett.internal_fistula == 1){
- this.internal_fistula = true
- }else{
- this.internal_fistula = false
- }
- if(dialysisSett.blood_flow_volume == 1){
- this.blood_flow_volume = true
- }else{
- this.blood_flow_volume = false
- }
- if(dialysisSett.anticoagulant == 1){
- this.anticoagulant = true
- }else{
- this.anticoagulant = false
- }
- if(dialysisSett.sealing_fluid_dispose == 1){
- this.sealing_fluid_dispose = true
- }else{
- this.sealing_fluid_dispose = false
- }
- if(dialysisSett.mode_id == 1){
- this.mode_id = true
- }else{
- this.mode_id = false
- }
- if(dialysisSett.dialysis_time == 1){
- this.dialysis_time = true
- }else{
- this.dialysis_time = false
- }
- if(dialysisSett.dialysis_dialyszers == 1){
- this.dialysis_dialyszers = true
- }else{
- this.dialysis_dialyszers = false
- }
-
- if(dialysisSett.dialysis_irrigation == 1){
- this.dialysis_irrigation = true
- }else{
- this.dialysis_irrigation = false
- }
-
- if(dialysisSett.gaijiliang ==1){
- this.gaijiliang =true
- }else{
- this.gaijiliang = false
- }
- if(dialysisSett.kalium == 1){
- this.kalium =true
- }else{
- this.kalium = false
- }
- if(dialysisSett.displace_liqui_value == 1){
- this.displace_liqui_value = true
- }else{
- this.displace_liqui_value = false
- }
- if(dialysisSett.bicarbonate == 1){
- this.bicarbonate =true
- }else{
- this.bicarbonate = false
- }
- if(dialysisSett.glucose == 1){
- this.glucose =true
- }else{
- this.glucose = false
- }
- }
-
- }
- })
-
- },
- saveDialysisSetting(){
- var device_number_set = 0
- var device_type_set = 0
- var name_set = 0
- var admission_number_set = 0
- var dialysis_no_set = 0
- var weight_befor_set = 0
- var dry_weight_set = 0
- var blood_pressure_set = 0
- var ultrafiltration_volume_set= 0
- var internal_fistula_set = 0
- var blood_flow_volume_set = 0
- var anticoagulant_set = 0
- var sealing_fluid_dispose_set = 0
- var mode_id_set =0
- var dialysis_time_set =0
- var dialysis_dialyszers_set =0
- var dialysis_irrigation_set =0
- var gaijiliang_set = 0
- var kalium_set = 0
- var displace_liqui_value_set =0
- var bicarbonate_set =0
- var glucose_set = 0
- if(this.device_number == false){
- device_number_set = 2
- }
- if(this.device_number == true){
- device_number_set = 1
- }
- if(this.device_type == false){
- device_type_set = 2
- }
- if(this.device_type == true){
- device_type_set = 1
- }
- if(this.name == false){
- name_set = 2
- }
- if(this.name == true){
- name_set = 1
- }
- if(this.admission_number == false){
- admission_number_set = 2
- }
- if(this.admission_number== true){
- admission_number_set = 1
- }
- if(this.dialysis_no == false){
- dialysis_no_set = 2
- }
- if(this.dialysis_no == true){
- dialysis_no_set = 1
- }
- if(this.weight_befor == false){
- weight_befor_set = 2
- }
- if(this.weight_befor == true){
- weight_befor_set = 1
- }
- if(this.dry_weight == false){
- dry_weight_set = 2
- }
- if(this.dry_weight == true){
- dry_weight_set = 1
- }
- if(this.blood_pressure == false){
- blood_pressure_set = 2
- }
- if(this.blood_pressure == true){
- blood_pressure_set = 1
- }
- if(this.ultrafiltration_volume == false){
- ultrafiltration_volume_set = 2
- }
- if(this.ultrafiltration_volume == true){
- ultrafiltration_volume_set = 1
- }
- if(this.internal_fistula == false){
- internal_fistula_set = 2
- }
- if(this.internal_fistula == true){
- internal_fistula_set= 1
- }
- if(this.blood_flow_volume == false){
- blood_flow_volume_set = 2
- }
- if(this.blood_flow_volume == true){
- blood_flow_volume_set = 1
- }
- if(this.anticoagulant == false){
- anticoagulant_set = 2
- }
- if(this.anticoagulant == true){
- anticoagulant_set = 1
- }
- if(this.sealing_fluid_dispose == false){
- sealing_fluid_dispose_set = 2
- }
- if(this.sealing_fluid_dispose == true){
- sealing_fluid_dispose_set = 1
- }
- if(this.mode_id == false){
- mode_id_set = 2
- }
- if(this.mode_id == true){
- mode_id_set = 1
- }
- if(this.dialysis_time == false){
- dialysis_time_set = 2
- }
- if(this.dialysis_time == true){
- dialysis_time_set = 1
- }
- if(this.dialysis_dialyszers == false){
- dialysis_dialyszers_set = 2
- }
- if(this.dialysis_dialyszers == true){
- dialysis_dialyszers_set = 1
- }
- if(this.dialysis_irrigation == false){
- dialysis_irrigation_set = 2
- }
- if(this.dialysis_irrigation == true){
- dialysis_irrigation_set = 1
- }
- if(this.gaijiliang == false){
- this.gaijiliang = 2
- }
- if(this.gaijiliang == true){
- this.gaijiliang = 1
- }
- if(this.kalium == false){
- kalium = 2
- }
- if(this.kalium == true){
- kalium = 1
- }
- if(this.displace_liqui_value == false){
- displace_liqui_value_set = 2
- }
- if(this.displace_liqui_value == true){
- displace_liqui_value_set = 1
- }
- if(this.bicarbonate == false){
- bicarbonate_set = 2
- }
- if(this.bicarbonate == true){
- bicarbonate_set = 1
- }
- if(this.glucose == false){
- glucose_set = 2
- }
- if(this.glucose == true){
- glucose_set = 1
- }
- var params = {
- device_number_set:device_number_set,
- device_type_set:device_type_set,
- name_set:name_set,
- admission_number_set:admission_number_set,
- dialysis_no_set:dialysis_no_set,
- weight_befor_set:weight_befor_set,
- dry_weight_set:dry_weight_set,
- blood_pressure_set:blood_pressure_set,
- ultrafiltration_volume_set:ultrafiltration_volume_set,
- internal_fistula_set:internal_fistula_set,
- blood_flow_volume_set:blood_flow_volume_set,
- anticoagulant_set:anticoagulant_set,
- sealing_fluid_dispose_set:sealing_fluid_dispose_set,
- mode_id_set:mode_id_set,
- dialysis_time_set:dialysis_time_set,
- dialysis_dialyszers_set:dialysis_dialyszers_set,
- dialysis_irrigation_set:dialysis_irrigation_set,
- gaijiliang_set:gaijiliang_set,
- kalium_set:kalium_set,
- displace_liqui_value_set:displace_liqui_value_set,
- bicarbonate_set:bicarbonate_set,
- glucose_set:glucose_set,
- }
- saveDialysisSetting(params).then(response=>{
- if(response.data.state == 1){
- var dialysisSetting = response.data.data.dialysisSetting
- this.dialogVisible = false
- }
- })
- }
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- .page_consumables {
-
- .clearfix:after {
- content: none;
- }
-
- }
- </style>
|