Vue.component('comD',{
template:'
\
\
就诊时间: \
\
\
药品名称: \
\
\
\
\
查看药品字典 \
就诊类型: \
\
\
\
\
搜索
\
\
\
\
\
\
\
\
\
门急诊\
住院\
\
\
\
\
\
\
\
\
\
\
查看详情\
\
\
\
\
\
\
\
',
data: function () {
return {
currentPage: 1, //初始页
pageSize: 10, // 每页的数据
tableData: [],
pageSizeArr: [10, 20, 30, 50],
total: 0,
pickerOptions1: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
event_type: [{
"code": '0',
"name": '门急诊'
}, {
"code": '1',
"name": '住院'
}],
value6: '',
drugName:'',
eventType: '0',
}
},
mounted: function () {
this.getData()
},
methods: {
handleCurrentChange: function (val) {
this.currentPage = val;
this.getData()
},
handleSizeChange: function (val) {
this.pageSize = val;
this.initData()
},
initData: function () { //初始化
this.currentPage = 1;
this.getData()
},
searchClick: function () {
console.log(this.eventType)
console.log(this.drugName)
this.initData()
},
getData: function () {
var vm = this;
debugger
var params = {
start:'2018-08-01',
end:'2018-08-31',
drugName:this.drugName,
eventType:this.eventType,
size:15,
page:1,
}
// GlobalEventBus.$emit('setLoading', {
// loading: true
// }); //缓存效果
bigDataOutApi.drugAnalysis(params).then(function (res) {
console.log(res)
GlobalEventBus.$emit('setLoading');
vm.tableData = res.detailModelList;
vm.total = res.totalCount;
}).catch(function (err) {
console.log(err)
GlobalEventBus.$emit('setLoading');
})
},
handleClick:function() {
console.log(row);
}
}
})