You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.5 KiB
1 lines
5.5 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40dcbfe7"],{"2f15":function(t,e,a){},d2e8:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"100px",inline:""}},[a("el-form-item",{attrs:{label:"时间选择:"}},[a("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChange(t.tableFrom.date)}},model:{value:t.tableFrom.date,callback:function(e){t.$set(t.tableFrom,"date",e)},expression:"tableFrom.date"}},t._l(t.fromList.fromTxt,(function(e,l){return a("el-radio-button",{key:l,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),a("el-date-picker",{staticStyle:{width:"250px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"消息名称:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入消息名称",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getLists(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getLists(1)}},slot:"append"})],1)],1)],1)],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","row-key":t.getRowKeys,"expand-row-keys":t.expands},on:{"expand-change":t.handleRead}},[a("el-table-column",{attrs:{label:"序号","min-width":"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.$index+(t.tableFrom.page-1)*t.tableFrom.limit+1))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"消息名称","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"circle",class:0===e.row.is_read?"red":"gray"}),t._v(" "),a("span",{class:0===e.row.is_read?"unread":"read"},[t._v(t._s(e.row.notice_title))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"日期","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:0===e.row.is_read?"unread":"read"},[t._v(t._s(e.row.create_time))])]}}])}),t._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",[a("span",{staticStyle:{color:"#333"}},[t._v(t._s(e.row.notice_content?e.row.notice_content:""))])])],1)]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],s=(a("ac6a"),a("8593")),n=a("83d6"),o={name:"SystemLog",data:function(){return{props:{emitPath:!1},listLoading:!0,tableData:{data:[],total:0},dialogVisible:!1,categoryList:[],merCateList:[],merSelect:[],fullscreenLoading:!1,roterPre:n["roterPre"],timeVal:[],fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},tableFrom:{page:1,limit:20,date:"",keyword:""},expands:[],idx:0}},mounted:function(){this.getList("")},methods:{getRowKeys:function(t){return t.notice_log_id},selectChange:function(t){this.timeVal=[],this.tableFrom.date=t,this.getLists(1)},onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=t?this.timeVal.join("-"):"",this.getLists(1)},getList:function(t){var e=this,a=this;a.listLoading=!0,a.tableFrom.page=t||a.tableFrom.page,Object(s["G"])(a.tableFrom).then((function(t){a.tableData.data=t.data.list,a.tableData.total=t.data.count,a.listLoading=!1,a.$route.params.id&&(a.handleRead({notice_log_id:a.$route.params.id,is_read:0}),a.tableData.data.forEach((function(t,e){t.notice_log_id==a.$route.params.id&&(a.idx=e,console.log(a.idx),a.expands.push(a.tableData.data[a.idx].notice_log_id))})))})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},getLists:function(t){var e=this,a=this;a.listLoading=!0,a.tableFrom.page=t||a.tableFrom.page,Object(s["G"])(a.tableFrom).then((function(t){a.tableData.data=t.data.list,a.tableData.total=t.data.count,a.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getLists("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getLists(1)},handleRead:function(t){var e=this;0===t.is_read&&Object(s["H"])(t.notice_log_id).then((function(a){e.listLoading=!1,t.is_read=1,e.$route.params.id&&1===e.tableFrom.page&&(e.tableData.data[e.idx].is_read=1)})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))}}},r=o,d=(a("de80"),a("2877")),c=Object(d["a"])(r,l,i,!1,null,"2a64c8fe",null);e["default"]=c.exports},de80:function(t,e,a){"use strict";a("2f15")}}]); |