< Card class = " clearfix" > < p slot = " title" > < Icon type = " ios-list" > </ Icon> 收入信息</ p> < div class = " daochu1" > < div class = " search" > < Buttontype = " warning" icon = " ios-download-outline" @click = " exportExcel1" class = " searchButton" > 导出</ Button> </ div> < Tableref = " table" border :row-class-name = " rowClassName" :columns = " queryColumns1" :data = " queryinfoList1" style =" width : 100%; top : 10px" @on-sort-change = " sortTime" > </ Table> </ div> < div style =" margin-top : 20px; overflow : hidden" > < div style =" float : right" > < Page:total = " count" show-elevator @on-change = " onchangePage" > </ Page> </ div> </ div> </ Card>
queryColumns11: [ { title: "项目名称" , key: "projectName" , align: "center" , width: 200 , } , { title: "收入类型" , key: "revenueType" , align: "center" , width: 150 , } , { title: "年度" , key: "year" , align: "center" , width: 150 , } , { title: "1月" , key: "monthAmount1" , align: "center" , width: 150 , } , { title: "2月" , key: "monthAmount2" , align: "center" , width: 150 , } , { title: "3月" , key: "monthAmount3" , align: "center" , width: 150 , } , { title: "4月" , key: "monthAmount4" , align: "center" , width: 150 , } , { title: "5月" , key: "monthAmount5" , align: "center" , width: 150 , } , { title: "6月" , key: "monthAmount6" , align: "center" , width: 150 , } , { title: "7月" , key: "monthAmount7" , align: "center" , width: 150 , } , { title: "8月" , key: "monthAmount8" , align: "center" , width: 150 , } , { title: "9月" , key: "monthAmount9" , align: "center" , width: 150 , } , { title: "10月" , key: "monthAmount10" , align: "center" , width: 150 , } , { title: "11月" , key: "monthAmount11" , align: "center" , width: 150 , } , { title: "12月" , key: "monthAmount12" , align: "center" , width: 150 , } , { title: "年度累计" , key: "monthAmount13" , align: "center" , width: 200 , } , { title: "更新时间" , key: "updateTime" , align: "center" , width: 200 , } , ] ,
exportExcel1 ( ) { this . $Spin. show ( { render: ( h) => { return h ( "div" , [ h ( "Icon" , { class : "demo-spin-icon-load" , props: { type: "load-c" , size: 50 , } , } ) , h ( "div" , "努力记载中...." ) , ] ) ; } , } ) ; this . excell = [ ] ; new Promise ( ( resolve, reject) => { ApiDrug. exportincomeExport ( { } ) . then ( ( response) => { let res = response. result; res. forEach ( ( item, index) => { item. monthAmount1 = item. monthAmount[ "1" ] ; item. monthAmount2 = item. monthAmount[ "2" ] ; item. monthAmount3 = item. monthAmount[ "3" ] ; item. monthAmount4 = item. monthAmount[ "4" ] ; item. monthAmount5 = item. monthAmount[ "5" ] ; item. monthAmount6 = item. monthAmount[ "6" ] ; item. monthAmount7 = item. monthAmount[ "7" ] ; item. monthAmount8 = item. monthAmount[ "8" ] ; item. monthAmount9 = item. monthAmount[ "9" ] ; item. monthAmount10 = item. monthAmount[ "10" ] ; item. monthAmount11 = item. monthAmount[ "11" ] ; item. monthAmount12 = item. monthAmount[ "12" ] ; item. monthAmount13 = 0 ; if ( item. revenueType == "2" ) { item. revenueType = "药品服务费收入" ; } if ( item. revenueType == "3" ) { item. revenueType = "特药服务费收入" ; } if ( item. revenueType == "4" ) { item. revenueType = "直保经纪费" ; } if ( item. revenueType == "5" ) { item. revenueType = "再保经纪费" ; } if ( item. revenueType == "6" ) { item. revenueType = "广告费" ; } for ( const key in item. monthAmount) { item. monthAmount13 += item. monthAmount[ key] ; } } ) ; this . excel = response. result; this . excell = this . excel; this . $refs. table. exportCsv ( { filename: "收入信息" , columns: this . queryColumns11. filter ( ( col, index) => index < 100000 ) , data: this . excel. filter ( ( data, index) => index < 100000 ) , } ) ; this . $Spin. hide ( ) ; resolve ( ) ; } ) . catch ( ( error) => { this . $Spin. hide ( ) ; reject ( error) ; } ) ; } ) ; } ,