| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 | Vue.component('comA', {    template: '<div class="tab1">\    <template>\    <el-date-picker v-model="value4" type="month" placeholder="选择时间">\    </el-date-picker>\    <div class="search" @click="searchClick">搜  索</div>\        <span class="span">一周就医次数>=3次的患者记录</span>\           <el-table :data="tableData" border style="width: 100%" >\                        <el-table-column prop="patient_name" label="姓名">\                        </el-table-column>\                        <el-table-column prop="result" label="就医次数">\                        </el-table-column>\                        <el-table-column prop="demographic_id" label="身份证号" >\                        </el-table-column>\                            <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="address" label="家庭地址" >\                        </el-table-column>\                        <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>\           <div class="flex f_y_c f_x_e">\           <el-pagination @size-change="handleSizeChange" background @current-change="handleCurrentChange" :current-page="currentPage"\           :page-sizes=" pageSizeArr" :page-size="pageSize" layout="total,sizes,prev, pager, next, jumper"\           :total="total">\           </el-pagination>\       </div>\    </template>\</div> ',    data: function () {        return {            currentPage: 1, //初始页            pageSize: 10,    //    每页的数据             tableData: [],            pageSizeArr: [10, 20, 30, 50],            total: 0,            value4: new Date(),        }    },    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 = {                time: this.value4.format('yyyy-MM-dd'),                size: this.pageSize,                page: this.currentPage            }            GlobalEventBus.$emit('setLoading', {                loading: true            }); //等待效果            bigDataOutApi.getOftenIllList(params).then(function (res) {                console.log(res)                GlobalEventBus.$emit('setLoading');                vm.tableData = res.detailModelList;                vm.total = res.totalCount;                debugger            }).catch(function (err) {                console.log(err)                GlobalEventBus.$emit('setLoading');            })        },        handleClick: function (row) {            demographic_id = row.demographic_id,                blurry_type = '',                searchParam = ''            var url = httpRequest.server + '/profile/app/medication/html/jiuzhen-item.html?' +                'healthProblemName=' + '&demographic_id=' + demographic_id + '&blurry_type=' + blurry_type + '&searchParam=' + searchParam            console.log(url)            //    window.open(url)            var width = 1000 + 'px';            var height = 600+ 'px';            top.layer.open({                id: 'Lay_xiangqingA',                type: 2,                title: false,                closeBtn: 0,                shade: 0.5,                shadeClose: true,                area: [width, height],                content: url            })        }    }})
 |