1 |
- webpackJsonp([11],{QVAM:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n("2sCs"),n("0xDb"),n("6iV/");var a=n("l/JR"),o={data:function(){return{zhongshu:"",items:[],page:1,pageSize:10,totalCount:0,showDetail:!1,detailTitle:"",detailContent:""}},methods:{onSizeChange:function(t){this.pageSize=t},onCurrentChange:function(t){this.page=t},onShowDetail:function(t){this.detailTitle=t.title,this.detailContent=t.content,this.showDetail=!0,Object(a.F)({},{id:t.id}).then(function(t){t.is_read=1})},tableRowClassName:function(t){var e=t.row;t.rowIndex;return 0===e.is_read?"success-row":""},getDatas:function(){var t=this;Object(a.z)({page:this.page,number:this.pageSize},{}).then(function(e){"0000"===e.code?(console.log(e),t.items=e.info,t.zhongshu=e.num):t.$message({message:e.msg,type:"warning"})})}},mounted:function(){this.getDatas()}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.items,"row-class-name":t.tableRowClassName}},[n("el-table-column",{attrs:{prop:"title",label:"标题"}}),t._v(" "),n("el-table-column",{attrs:{prop:"content",label:"内容"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){t.onShowDetail(e.row)}}},[t._v("查看")])]}}])})],1),t._v(" "),n("el-pagination",{staticClass:"pageTop",attrs:{"current-page":t.page,"page-sizes":[10,30,50,100],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.zhongshu},on:{"size-change":t.onSizeChange,"current-change":t.onCurrentChange}}),t._v(" "),n("el-dialog",{attrs:{title:t.detailTitle,visible:t.showDetail,width:"30%"},on:{"update:visible":function(e){t.showDetail=e}}},[n("span",[t._v(t._s(t.detailContent))]),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"})])],1)},staticRenderFns:[]};var i=n("vSla")(o,s,!1,function(t){n("cqCr")},null,null);e.default=i.exports},cqCr:function(t,e,n){var a=n("fqck");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("8bSs")("8be75d98",a,!0)},fqck:function(t,e,n){(t.exports=n("BkJT")(!1)).push([t.i,"\n.pageTop {\n margin-top: 20px;\n}\n.el-table .warning-row {\n}\n.el-table .success-row {\n background: #f0f9eb;\n}\n",""])}});
|