shop_mer_admin/mer/js/chunk-bc7c4142.5855476b.js

1 line
6.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bc7c4142"],{"0b65":function(e,t,a){"use strict";t["a"]={shortcuts:[{text:"今天",onClick:function(e){var t=new Date,a=new Date;a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),e.$emit("pick",[a,t])}},{text:"昨天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.$emit("pick",[a,t])}},{text:"最近7天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-6048e5),e.$emit("pick",[a,t])}},{text:"最近30天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-2592e6),e.$emit("pick",[a,t])}},{text:"本月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),e.$emit("pick",[a,t])}},{text:"本年",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),0,1))),e.$emit("pick",[a,t])}}]}},d2e8:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:e.tableFrom,size:"small","label-width":"85px",inline:""}},[a("el-form-item",{attrs:{label:"时间选择:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":e.pickerOptions},on:{change:e.onchangeTime},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"消息名称:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入消息名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getLists(1)}},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),a("el-card",{staticClass:"mt14"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small","row-key":e.getRowKeys,"expand-row-keys":e.expands},on:{"expand-change":e.handleRead}},[a("el-table-column",{attrs:{label:"序号","min-width":"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.tableFrom.page-1)*e.tableFrom.limit+1))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"消息名称","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"circle",class:0===t.row.is_read?"red":"gray"}),e._v(" "),a("span",{class:0===t.row.is_read?"unread":"read"},[e._v(e._s(t.row.notice_title))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"日期","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:0===t.row.is_read?"unread":"read"},[e._v(e._s(t.row.create_time))])]}}])}),e._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",[a("span",{staticStyle:{color:"#333"}},[e._v(e._s(t.row.notice_content?t.row.notice_content:""))])])],1)]}}])})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)],1)},n=[],l=(a("ac6a"),a("8593")),o=a("83d6"),s=a("0b65"),r={name:"SystemLog",data:function(){return{pickerOptions:s["a"],props:{emitPath:!1},listLoading:!0,tableData:{data:[],total:0},dialogVisible:!1,categoryList:[],merCateList:[],merSelect:[],fullscreenLoading:!1,roterPre:o["roterPre"],timeVal:[],tableFrom:{page:1,limit:20,date:"",keyword:""},expands:[],idx:0}},mounted:function(){this.getList("")},methods:{searchReset:function(){this.timeVal=[],this.tableFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},getRowKeys:function(e){return e.notice_log_id},onchangeTime:function(e){this.timeVal=e,this.tableFrom.date=e?this.timeVal.join("-"):"",this.getLists(1)},getList:function(e){var t=this,a=this;a.listLoading=!0,a.tableFrom.page=e||a.tableFrom.page,Object(l["H"])(a.tableFrom).then((function(e){a.tableData.data=e.data.list,a.tableData.total=e.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(e,t){e.notice_log_id==a.$route.params.id&&(a.idx=t,console.log(a.idx),a.expands.push(a.tableData.data[a.idx].notice_log_id))})))})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},getLists:function(e){var t=this,a=this;a.listLoading=!0,a.tableFrom.page=e||a.tableFrom.page,Object(l["H"])(a.tableFrom).then((function(e){a.tableData.data=e.data.list,a.tableData.total=e.data.count,a.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(e){this.tableFrom.page=e,this.getLists("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getLists(1)},handleRead:function(e){var t=this;0===e.is_read&&Object(l["I"])(e.notice_log_id).then((function(a){t.listLoading=!1,e.is_read=1,t.$route.params.id&&1===t.tableFrom.page&&(t.tableData.data[t.idx].is_read=1)})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))}}},c=r,d=(a("ff17"),a("2877")),m=Object(d["a"])(c,i,n,!1,null,"174264b2",null);t["default"]=m.exports},dd32:function(e,t,a){},ff17:function(e,t,a){"use strict";a("dd32")}}]);