|
@ -4,98 +4,97 @@ Vue.component('comC',{
|
|
|
<span>检查/检验:</span> <el-select v-model="value" placeholder="请选择">\
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">\
|
|
|
</el-option>\
|
|
|
</el-select> <a href="#" @click="open5">查看字典</a>\
|
|
|
<div class="search">搜索</div>\
|
|
|
</el-select> <a href="#">查看字典</a>\
|
|
|
<el-date-picker v-model="value4" type="month" placeholder="选择时间">\
|
|
|
</el-date-picker>\
|
|
|
<div class="search" @click="searchClick">搜索</div>\
|
|
|
</template>\
|
|
|
<span class="span">一周内同种检查/检验项目的次数>=3</span>\
|
|
|
<el-table :data="tableData" border style="width: 100%" :data.native="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)">\
|
|
|
<el-table-column prop="name" label="姓名" width="140">\
|
|
|
<el-table :data="tableData" border style="width: 100%" :data.native="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)">\
|
|
|
<el-table-column prop="patient_name" label="姓名">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="province" label="就医次数" width="140">\
|
|
|
<el-table-column prop="result" label="就医次数">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="address" label="身份证号" width="380">\
|
|
|
<el-table-column prop="demographic_id" label="身份证号">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="province" label="性别" width="140">\
|
|
|
<el-table-column label="性别" >\
|
|
|
<template slot-scope="scope">\
|
|
|
<span v-if="scope.row.patient_sex == 1">男</span>\
|
|
|
<span v-else>女</span>\
|
|
|
</template>\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="patient_age" label="年龄">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="province" label="年龄" width="140">\
|
|
|
<el-table-column prop="address" label="地址">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column prop="address" label="地址" width="380">\
|
|
|
</el-table-column>\
|
|
|
<el-table-column fixed="right" label="操作" width="140">\
|
|
|
<el-table-column fixed="right" label="操作">\
|
|
|
<template slot-scope="scope">\
|
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>\
|
|
|
</template>\
|
|
|
</el-table-column>\
|
|
|
</el-table>\
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"\
|
|
|
:page-sizes="[2,10, 20, 40]" :page-size="pagesize" layout="total,sizes,prev, pager, next, jumper"\
|
|
|
:page-sizes="[2,10, 20, 40]" :page-size="pageSize" layout="total,sizes,prev, pager, next, jumper"\
|
|
|
:total="tableData.length">\
|
|
|
</el-pagination>\
|
|
|
</template>\
|
|
|
</div>',
|
|
|
data:function(){
|
|
|
return{
|
|
|
currentPage: 1, //初始页
|
|
|
pagesize:2, // 每页的数据
|
|
|
tableData: [{
|
|
|
date: '2016-05-03',
|
|
|
name: '王小虎',
|
|
|
province: '上海',
|
|
|
city: '普陀区',
|
|
|
address: '上海市普陀区金沙江路 1518 弄',
|
|
|
zip: 200333
|
|
|
}, {
|
|
|
date: '2016-05-02',
|
|
|
name: '王小虎',
|
|
|
province: '上海',
|
|
|
city: '普陀区',
|
|
|
address: '上海市普陀区金沙江路 1518 弄',
|
|
|
zip: 200333
|
|
|
}, {
|
|
|
date: '2016-05-04',
|
|
|
name: '王小虎',
|
|
|
province: '上海',
|
|
|
city: '普陀区',
|
|
|
address: '上海市普陀区金沙江路 1518 弄',
|
|
|
zip: 200333
|
|
|
}, {
|
|
|
date: '2016-05-01',
|
|
|
name: '王小虎',
|
|
|
province: '上海',
|
|
|
city: '普陀区',
|
|
|
address: '上海市普陀区金沙江路 1518 弄',
|
|
|
zip: 200333
|
|
|
}],
|
|
|
options: [{
|
|
|
value: '选项1',
|
|
|
label: '外科'
|
|
|
}, {
|
|
|
value: '选项2',
|
|
|
label: '住院'
|
|
|
}],
|
|
|
option: [{
|
|
|
value: '选项1',
|
|
|
label: '全部'
|
|
|
}, {
|
|
|
value: '选项2',
|
|
|
label: '选线一'
|
|
|
}],
|
|
|
value: '全部'
|
|
|
data: function () {
|
|
|
return {
|
|
|
currentPage: 1, //初始页
|
|
|
pageSize: 10, // 每页的数据
|
|
|
tableData: [],
|
|
|
options:[],
|
|
|
pageSizeArr: [10, 20, 30, 50],
|
|
|
total: 0,
|
|
|
value4:new Date(getLastMonthStartDate()),
|
|
|
value:'',
|
|
|
}
|
|
|
|
|
|
},
|
|
|
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 () {
|
|
|
this.initData()
|
|
|
|
|
|
},
|
|
|
getData: function () {
|
|
|
var vm = this;
|
|
|
var params = {
|
|
|
month:this.value4.format('yyyy-MM'),
|
|
|
size: 15,
|
|
|
page: 1,
|
|
|
inspect:8,
|
|
|
}
|
|
|
// GlobalEventBus.$emit('setLoading', {
|
|
|
// loading: true
|
|
|
// }); //等待效果
|
|
|
bigDataOutApi.getRepeateInspectList(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');
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
handleSizeChange: function (size) {
|
|
|
this.pagesize = size;
|
|
|
console.log(this.pagesize) //每页下拉显示数据
|
|
|
},
|
|
|
handleCurrentChange: function (currentPage) {
|
|
|
this.currentPage = currentPage;
|
|
|
console.log(this.currentPage) //点击第几页
|
|
|
},
|
|
|
handleClick(row) {
|
|
|
console.log(row);
|
|
|
},
|
|
|
|
|
|
}
|
|
|
handleClick:function() {
|
|
|
console.log(row);
|
|
|
}
|
|
|
}
|
|
|
})
|