123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <el-dialog
- title="透析参数统计"
- width="800px"
- :visible.sync="visible"
- :before-close="_close"
- >
- <div>
- <el-date-picker
- style="width:150px;margin-right:10px"
- v-model="startTime"
- type="date"
- placeholder="选择日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- @change="selectStartime">
- </el-date-picker>
- <el-date-picker
- style="width:150px;margin-right:10px"
- v-model="endTime"
- type="date"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- @change="selectEndtime">
- </el-date-picker>
- <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
-
- </div>
- <div style="margin-top:10px;">
- <el-table :data="tableData" border style="width: 100%" height="300">
- <el-table-column align="center" prop="address" label="商品类型">
- <template slot-scope="scope">
- 抗凝剂
- </template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="规格名称">
- <template slot-scope="scope">
- <span v-if="scope.row.anticoagulant==1">无肝素</span>
- <span v-if="scope.row.anticoagulant==2">普通肝素</span>
- <span v-if="scope.row.anticoagulant==3">低分子肝素</span>
- <span v-if="scope.row.anticoagulant==4">阿加曲班</span>
- <span v-if="scope.row.anticoagulant==5">枸橼酸钠</span>
- <span v-if="scope.row.anticoagulant==6">低分子肝素钙</span>
- <span v-if="scope.row.anticoagulant==7">低分子肝素钠</span>
- <span v-if="scope.row.anticoagulant==8">依诺肝素</span>
- <span v-if="scope.row.anticoagulant==9">达肝素</span>
- <span v-if="scope.row.anticoagulant==10">体外抗凝</span>
- <span v-if="scope.row.anticoagulant==11">那屈肝素</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="name"label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- <div slot="footer" class="dialog-footer">
- <el-button @click="hide">取 消</el-button>
- <el-button type="primary" @click="submitAction()">保 存</el-button>
- </div> -->
- </el-dialog>
- </template>
-
-
-
- <script>
- const moment = require('moment')
- import { parseTime } from '@/utils'
- import { GetAllZone } from "@/api/dialysis";
- import { GetAnticoagulantCount} from "@/api/consumable"
- export default {
- data(){
- return{
- visible: false,
- startTime:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- endTime:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- schedulArr: [
- {value: 0, label: '全部班'},
- {value: 1, label: '上午'},
- {value: 2, label: '中午'},
- {value: 3, label: '下午'},
- ],
- schedulType: 0,
- partitionArr:[],
- partitionType: 0,
- tableData: [],
- query:{
- start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- end_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD')
- },
- }
- },
- created(){
- this.getAllZone()
- this.getlist()
- },
- methods:{
- _close: function(done) {
- done();
- },
- show() {
- this.visible = true;
- },
- 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: "全部分区" });
- }
- });
- },
- toPrint(){
- this.$router.push({
- // path: '/dialysis/dialysisParameters_print',
- // query: { date: date }
- path:"/dialysis/dialysisdrugs_print?startime="+this.query.start_time+"&endtime="+this.query.end_time + "&type=2"
- })
- },
- selectStartime() {
- // this.start_time = parseTime(this.startTime, '{y}-{m}-{d}')
- // this.query.start_time = parseTime(this.startTime, '{y}-{m}-{d}')
- this.start_time = this.startTime
- this.query.start_time = this.startTime
- this.getlist()
-
- },
- selectEndtime() {
- // this.end_time = parseTime(this.endTime, '{y}-{m}-{d}')
- // this.query.end_time = parseTime(this.endTime, '{y}-{m}-{d}')
- this.end_time = this.endTime
- this.query.end_time = this.endTime
- this.getlist()
-
- },
- getlist(){
- GetAnticoagulantCount(this.query).then(response=>{
- if(response.data.state == 1){
- var count = response.data.data.count
- console.log("count22222",count)
- this.tableData = count
- }
- })
- }
- }
- }
- </script>
|