| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[13],{416:function(t,e,r){var content=r(466);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(4).default)("7dbfcce4",content,!0,{sourceMap:!1})},465:function(t,e,r){"use strict";var n=r(416);r.n(n).a},466:function(t,e,r){(t.exports=r(3)(!1)).push([t.i,".table[data-v-2b5afdbc]{height:calc(100% - 40px)}.img[data-v-2b5afdbc]{width:100%;height:auto}",""])},525:function(t,e,r){"use strict";r.r(e);r(39);var n=r(6),c=(r(168),r(5)),o=["名称","状态","排序","价格","配图","简介","证书","说明","操作"],l=["name","status_name","order","price","img","introduction","content","description","ctrl"],d="test",h={data:function(){return{totalCount:0,currentPage:1,currentPageSize:20,tableHeaders:o,tableProps:l,tableData:[]}},mounted:function(){this.getTableData()},methods:{clickCtrl:function(t,e){this.$router.push({path:"/main/cert_edit",query:{id:t.id}})},clickName:function(t){"test"===d?window.open("https://dev.test.proginn.com/cert/type/".concat(t.id)):window.open("https://www.proginn.com/cert/type/".concat(t.id))},tableRowClassName:function(t){var e=t.row,r=(t.rowIndex,"");return"1"===e.status&&(r="success-row"),r},formatTableData:function(data){return data.map(function(i){return Object(c.a)({},i,{statusShow:"1"===i.status?"到账":"失败",created_atShow:new Date(1e3*Number(i.created_at)).toLocaleString(),taken_atShow:new Date(1e3*Number(i.taken_at)).toLocaleString(),ctrl:1})})},changePageSize:function(t){this.currentPageSize=t,this.getTableData()},getTableData:function(){var t=Object(n.a)(regeneratorRuntime.mark(function t(){var body,e,data,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.length>0&&void 0!==r[0]?r[0]:1,this.tableData=[],body={page:this.currentPage,page_size:this.currentPageSize},t.next=5,this.$post("/api/admin/cert/getList",body);case 5:e=t.sent,data=e.data,d=data.current_env,this.tableData=this.formatTableData(e.data.list),this.totalCount=Number(data.total),this.totalPage=data.totalPage;case 11:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}},w=(r(465),r(2)),component=Object(w.a)(h,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"withdraw"}},[r("div",{staticClass:"table"},[t.tableData.length?r("el-table",{staticStyle:{width:"100%"},attrs:{height:"100%",border:"",data:t.tableData,"row-class-name":t.tableRowClassName}},t._l(t.tableProps,function(e,n){return r("el-table-column",{key:n,attrs:{prop:e,label:t.tableHeaders[n]},scopedSlots:t._u([{key:"default",fn:function(c){return["name"===e?r("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickName(c.row)}}},[t._v(t._s(c.row[e]))]):"ctrl"===e?r("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickCtrl(c.row,n)}}},[t._v("编辑")]):"price"===e?r("section",[r("div",[t._v("原价¥"+t._s(c.row.origin_price))]),t._v(" "),r("div",[t._v("现价¥"+t._s(c.row.real_price))]),t._v(" "),r("div",[t._v("会员价¥"+t._s(c.row.vip_price))])]):"img"===e?r("img",{staticClass:"img",attrs:{src:c.row.img,alt:"img"}}):r("span",[t._v(t._s(c.row[e]))])]}}],null,!0)})}),1):t._e()],1),t._v(" "),r("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":20,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"current-change":t.getTableData,"size-change":t.changePageSize,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)},[],!1,null,"2b5afdbc",null);e.default=component.exports}}]);
|