text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-dba85782"],{a448:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"message-list"},[n("div",{staticClass:"content-top"},[n("el-button-group",{staticClass:"left"},[n("el-button",{attrs:{type:"default",size:"small",disabled:t.tableData&&t.tableData.hasOwnProperty("list")&&t.tableData.list.length<=0},on:{click:function(e){return t.delMsgFunc()}}},[t._v(t._s(t.$L("选中删除")))]),n("el-button",{attrs:{type:"default",size:"small",disabled:t.tableData&&t.tableData.hasOwnProperty("list")&&t.tableData.list.length<=0},on:{click:function(e){return t.setReadMsgFunc()}}},[t._v(t._s(t.$L("设为已读")))])],1),n("div",{staticClass:"right"},[n("el-select",{staticClass:"search",attrs:{size:"small"},on:{change:t.changeTypeFunc},model:{value:t.messageType,callback:function(e){t.messageType=e},expression:"messageType"}},t._l(t.messageTypelist,(function(t){return n("el-option",{key:t.type,attrs:{label:t.name,value:t.type}})})),1),n("el-input",{staticClass:"input-with-select",attrs:{placeholder:t.$L("输入标题"),size:"small",clearable:""},on:{change:t.searchFunc},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.target.blur(e)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1)],1)],1),t.tableData&&t.tableData.hasOwnProperty("list")?n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"content"},[n("el-table",{staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.list,"empty-text":t.$L("暂无数据"),"header-cell-style":{background:"#f0f1f5",color:"#666"}},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),n("el-table-column",{attrs:{label:t.$L("标题"),align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return n("div",{staticClass:"title",domProps:{innerHTML:t._s(e.row.title)}})}}],null,!1,1944640498)}),n("el-table-column",{attrs:{prop:"createTime",label:t.$L("时间"),align:"center"}}),n("el-table-column",{attrs:{prop:"status",label:t.$L("状态"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return n("div",{staticClass:"status"},[n("span",{class:t.statusFunc(e.row.status).color},[t._v(t._s(t.statusFunc(e.row.status).text))])])}}],null,!1,2370015200)}),n("el-table-column",{attrs:{label:t.$L("管理"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return n("div",{staticClass:"manage-btn"},[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:function(n){return t.getInfoFunc(e.row.status,e.row.id)}}},[t._v(t._s(t.$L("查看")))]),n("el-button",{staticClass:"btn",attrs:{type:"default"},on:{click:function(n){return t.delMsgFunc(e.row.id)}}},[t._v(t._s(t.$L("删除")))])],1)}}],null,!1,346479176)})],1),null!==t.tableData.list&&t.tableData.allNum>t.pageSize?n("div",{staticClass:"list-pages"},[n("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-size":t.pageSize,layout:"prev, pager, next, total, jumper",total:t.tableData.allNum},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()])},s=[],i={name:"messageList",data:function(){return{loading:!0,errorType:"error",errorTitle:this.$L("出错了"),errorTips:null,errorShow:!1,messageType:0,inputValue:"",msgArr:[],messageTypelist:[{type:0,name:this.$L("全部消息")},{type:2,name:this.$L("未读")},{type:1,name:this.$L("已读")}],tableData:[],pageSize:20,currentPage:1,type:0}},created:function(){this.getData()},methods:{showError:function(t,e,n){this.errorType="warning"===n?"warning":"error",this.errorTitle=t&&""!==t?t:this.$L("出错了"),this.errorTips=e&&""!==e?e:null,this.loading=!1,this.errorShow=!0},getData:function(){var t=this;t.loading=!0;var e={p:t.currentPage,num:t.pageSize,type:t.type,keyword:t.inputValue};t.$api("getMsgList",e,(function(e){1===e.flag?(t.tableData=e.data,t.loading=!1):-1===e.flag?t.$confirm(t.$L("请重新登录"),t.$L("登录超时"),{confirmButtonText:t.$L("重新登录"),cancelButtonText:t.$L("取消"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.$router.push({name:"login",query:{redirect:t.$route.fullPath}})})).catch((function(e){t.$gotoWebHome()})):t.$confirm(t.$L("数据加载失败"),t.$L("出错了"),{confirmButtonText:t.$L("点击重试"),cancelButtonText:t.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.getData()})).catch((function(e){t.$router.push({name:"home"})}))}),(function(e){t.$confirm(t.$L("网络请求失败"),t.$L("出错了"),{confirmButtonText:t.$L("点击重试"),cancelButtonText:t.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.getData()})).catch((function(e){t.$router.push({name:"home"})}))}))},handleSelectionChange:function(t){var e=[];for(var n in t)e[n]=t[n].id;this.msgArr=e},changeTypeFunc:function(t){this.type=t,this.getData()},statusFunc:function(t){var e;switch(t){case 0:e={text:this.$L("未读"),color:"font-red"};break;default:e={text:this.$L("已读"),color:"font-green"};break}return e},handleCurrentChange:function(t){this.currentPage=t,this.getData()},handleSizeChange:function(t){this.pageSize=t,this.getData()},searchFunc:function(t){this.inputValue=t,this.getData()},setReadMsgFunc:function(){var t=this;0!==this.msgArr.length?t.$confirm(t.$L("是否将选中消息设为已读?"),t.$L("提示"),{confirmButtonText:t.$L("确定"),cancelButtonText:t.$L("取消"),type:"warning"}).then((function(){var e={messageIds:t.msgArr};t.loading=!0,t.$api("setReadMessage",e,(function(e){1===e.flag?(t.$message({message:t.$L("设置成功！"),type:"success"}),t.getData(),t.loading=!1):-1===e.flag?t.$confirm(t.$L("请重新登录"),t.$L("登录超时"),{confirmButtonText:t.$L("重新登录"),cancelButtonText:t.$L("取消"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.$router.push({name:"login",query:{redirect:t.$route.fullPath}})})).catch((function(e){t.$gotoWebHome()})):t.$confirm(t.$L("数据加载失败"),t.$L("出错了"),{confirmButtonText:t.$L("点击重试"),cancelButtonText:t.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.getData()})).catch((function(){t.$router.push({name:"home"})}))}),(function(e){t.$confirm(t.$L("网络请求失败"),t.$L("出错了"),{confirmButtonText:t.$L("点击重试"),cancelButtonText:t.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){t.getData()})).catch((function(){t.$router.push({name:"home"})}))}))})).catch((function(){})):t.$confirm(t.$L("您还没有选中消息，请勾选消息再做此操作"),t.$L("出错了"),{confirmButtonText:t.$L("点击重试"),cancelButtonText:t.$L("取消"),type:"warning",distinguishCancelAndClose:!0}).then((function(){t.getData()})).catch((function(){}))},getInfoFunc:function(t,e){this.$router.push({name:"messageInfo",params:{id:e}})},delMsgFunc:function(t){var e=this;if(t||!Array.isArray(this.msgArr)||0!==this.msgArr.length){var n;n=t||this.msgArr;var a={messageIds:n};e.$confirm(e.$L("此操作将永久删除该消息, 是否继续?"),e.$L("出错了"),{confirmButtonText:e.$L("确定"),cancelButtonText:e.$L("取消"),type:"warning"}).then((function(){e.$api("deleteMessage",a,(function(t){1===t.flag?(e.loading=!1,e.$message({type:"success",message:e.$L("删除成功!")}),e.getData()):-1===t.flag?e.$confirm(e.$L("请重新登录"),e.$L("登录超时"),{confirmButtonText:e.$L("重新登录"),cancelButtonText:e.$L("取消"),type:"error",distinguishCancelAndClose:!0}).then((function(){e.$router.push({name:"login",query:{redirect:e.$route.fullPath}})})).catch((function(t){e.$gotoWebHome()})):(console.log(t),e.$confirm(e.$L("数据加载失败"),e.$L("出错了"),{confirmButtonText:e.$L("点击重试"),cancelButtonText:e.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){e.getData()})).catch((function(t){e.$router.push({name:"home"})})))}),(function(t){console.log(t),e.$confirm(e.$L(t.msg),e.$L("出错了"),{confirmButtonText:e.$L("点击重试"),cancelButtonText:e.$L("返回首页"),type:"error",distinguishCancelAndClose:!0}).then((function(){e.getData()})).catch((function(t){e.$router.push({name:"home"})}))}))})).catch((function(){}))}else e.$confirm(e.$L("您还没有选中消息，请勾选消息再做此操作"),e.$L("出错了"),{confirmButtonText:e.$L("点击重试"),cancelButtonText:e.$L("取消"),type:"warning",distinguishCancelAndClose:!0}).then((function(){e.getData()})).catch((function(){}))}}},o=i,r=(n("e5d3"),n("e90a")),c=Object(r["a"])(o,a,s,!1,null,"7d3b0c5a",null);e["default"]=c.exports},e5d3:function(t,e,n){"use strict";var a=n("ead4"),s=n.n(a);s.a},ead4:function(t,e,n){}}]);
  //# sourceMappingURL=chunk-dba85782.677e189f.js.map