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
11 KiB
1 lines
11 KiB
(window["webpackJsonp_TIS_PLATFORM"]=window["webpackJsonp_TIS_PLATFORM"]||[]).push([["HistoricalNews"],{"0a0f":function(t,e,a){"use strict";a("ba4e")},"59d3":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABNElEQVQokX2RTSvEURjFf/NvMMRKilAT5WVhbNnMXkmWXlYWFtgqRcrCd7CisLEgarKRJNFEJjU7NSZFxHK+wM/CnZrGmKdOt3ue89x77j2o1MCo+qjm1fFamoi/tQNcAWfAAZABDqFKW3HKlPqsPqlDFXxSfVCL6kyZR21QT9VPdfEf66hz6pt6obaiFtSTOgPV2FXfI6Af6AQGary3unqAXqA7As6BLHADbNcZWgNyQAHIoN4FC33hc7JqR4W1NvVSfVVTgbuOgDjQDhSBQeAD+AZmgWmgBDQBSSAPtACNEWAAQCpgHVgBtoANoAtIlxMs55gL1w/7W5sVNmNhXQq9sbC/Rz1S06ExXyeGiaCZVPdRvwKxGgQJtbkKidBbCNpSHNgDloER4BaI/ROHwEv4uOMfGNKKWr344C4AAAAASUVORK5CYII="},b934:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAA70lEQVQokX3QvyvEcRgH8Nd9fbruIt3KYBEyKIPlSv4X20XJpMt/gTIZDZTFYLyIZLCYFEnUlfzIdZxFOINnuOQ8y9O753n/eJ5cud2sYhZnGPB/3WMcO7lyu9lACTM4Ql8XUgtTOMVHwjYusIdhPHYhlrCPZYwljKCCVzxgEHd/kBpYxAqOUwz6sYFR1DCJ95hlOMRakArIMrRRjKWlOL7V4faMCSwELuIrIe/nW3AeygWchOsunnAZog3kE24wFHEOOpTnkLAauBd1TOM6+XnxLdYxHzdlgaEnegVvuEI9YQvViFfrWPxdn5HuBZvfIm06f64vP70AAAAASUVORK5CYII="},ba4e:function(t,e,a){},f7e0:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"historical-news"},[n("div",{staticClass:"title"},[t._v("历史消息")]),n("span",{staticClass:"close",on:{click:t.onClose}}),n("div",{staticClass:"form-wrap"},[n("tis-form",{staticClass:"form",attrs:{inline:!0}},[n("tis-form-item",{style:{width:"13.5%"}},[n("tis-select",{attrs:{placeholder:"收件箱"},on:{change:function(e){return t.handleChangeMail(e)}},model:{value:t.params.mail,callback:function(e){t.$set(t.params,"mail",e)},expression:"params.mail"}},[n("tis-option",{attrs:{label:"收件箱",value:"1"}}),n("tis-option",{attrs:{label:"发件箱",value:"2"}})],1)],1),n("tis-form-item",{style:{width:"13.5%"}},[n("tis-select",{attrs:{placeholder:"全部来源"},on:{change:function(e){return t.handleChangeSource(e)}},model:{value:t.selectName,callback:function(e){t.selectName=e},expression:"selectName"}},t._l(t.appList,(function(t,e){return n("tis-option",{key:e,attrs:{label:t,value:t}})})),1)],1),n("tis-form-item",{style:{width:"13.5%"}},[n("tis-select",{attrs:{placeholder:"全部类型"},on:{change:function(e){return t.handleChangeType(e)}},model:{value:t.msgLevel,callback:function(e){t.msgLevel=e},expression:"msgLevel"}},[n("tis-option",{attrs:{label:"全部",value:"-1"}}),n("tis-option",{attrs:{label:"态势类",value:"0"}}),n("tis-option",{attrs:{label:"生化",value:"1"}}),n("tis-option",{attrs:{label:"告警",value:"2"}}),n("tis-option",{attrs:{label:"警报",value:"4"}})],1)],1),n("tis-form-item",{style:{width:"32%"},attrs:{label:"时间"}},[n("tis-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:function(e){return t.handleChangeTime(e)}},model:{value:t.seTime,callback:function(e){t.seTime=e},expression:"seTime"}})],1),n("tis-form-item",{style:{width:"23%"}},[n("tis-input",{attrs:{placeholder:"请输入发送方关键字","prefix-icon":"el-icon-search"},on:{change:function(e){return t.handleSearch(e)}},model:{value:t.search_str,callback:function(e){t.search_str=e},expression:"search_str"}})],1)],1)],1),n("div",{staticClass:"table-wrap"},[n("tis-table",{ref:"multipleTable",attrs:{data:t.tableData,"highlight-current-row":!0},on:{"selection-change":t.handleSelectionChange,"cell-mouse-leave":function(e){t.showClickIcon=!1},"cell-mouse-enter":t.ncrFormat}},[n("tis-table-column",{attrs:{type:"selection",width:"60"}}),n("tis-table-column",{attrs:{label:"状态",width:"60"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{staticClass:"flex-center"},[n("div",{staticStyle:{padding:"0 8px"}},[0==t.row.isRead?n("img",{attrs:{src:a("b934")}}):n("img",{attrs:{src:a("59d3")}})])])]}}])}),n("tis-table-column",{attrs:{prop:"type",label:"消息来源",width:"110",align:"left"}}),n("tis-table-column",{attrs:{label:"消息类型",width:"100",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.level?n("span",{staticClass:"bg-red"},[t._v("生化")]):2==e.row.level?n("span",{staticClass:"bg-yellow"},[t._v("告警")]):3==e.row.level?n("span",{staticClass:"bg-gray"},[t._v("警报")]):n("span",{staticClass:"bg-gray"},[t._v("其他")])]}}])}),n("tis-table-column",{attrs:{prop:"text",label:"内容",align:"left"}}),n("tis-table-column",{attrs:{label:"接收时间",width:"180",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==t.showClickIcon&&e.row.id==t.rowid?[n("span",{staticClass:"group-button",on:{click:function(a){return t.handleLook(e.$index,e.row)}}},[t._v("查看")]),1==e.row.reply?n("span",{staticClass:"group-button",on:{click:function(a){return t.handleReply(e.$index,e.row)}}},[t._v("回复")]):t._e(),n("span",{staticClass:"group-button",on:{click:function(a){return t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]:n("span",[t._v(t._s(t._f("_timeFormat")(e.row.time)))])]}}])})],1)],1),n("div",{staticClass:"footer"},[n("tis-pagination",{attrs:{"page-size":10,layout:"total, prev, pager, next",total:t.totalNum},on:{"size-change":t.handleSizeChange,"current-change":t.currentChange,"prev-click":t.prePage,"next-click":t.nextPage}}),n("tis-button",{on:{click:t.handleBatchDelect}},[t._v("批量删除")]),n("tis-button",{on:{click:t.handleWholeDelect}},[t._v("全部删除")]),n("tis-button",{on:{click:t.handleTagRad}},[t._v("标记已读")])],1)])},i=[],s=(a("4de4"),a("4160"),a("d81d"),a("d3b7"),a("6062"),a("3ca3"),a("159b"),a("ddb0"),a("ade3")),l=a("4ec3"),o=a("e0cf"),c={data:function(){var t;return{showClickIcon:!1,rowid:1,rowData:[],seTime:"",search_str:"",msgLevel:"-1",selectName:"",appList:new Set(["全部"]),params:(t={userid:this.$tis.getUserInfo().userid,type:"",prefixname:"",starttime:"",endtime:"",currentPage:"1",pageShowNum:10,mail:"",source:""},Object(s["a"])(t,"type",""),Object(s["a"])(t,"time",""),Object(s["a"])(t,"search_str",""),t),totalNum:0,isVisible:!0,page:1,sourceData:[{id:0,source:"",time:"2016-05-02",type:"警报",text:"上海市普陀区金沙江路",level:2},{id:1,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:2},{id:2,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:2},{id:3,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:3},{id:4,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:1}],tableData:[{id:0,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:2},{id:1,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:2},{id:2,source:"系统通知",time:"2016-05-02",type:"系统通知",text:"上海市普陀区金沙江路",level:2},{id:3,source:"系统通知",time:"2016-05-02",type:"应用",text:"上海市普陀区金沙江路",level:3},{id:4,time:"2016-05-02",source:"系统通知",type:"系统通知",text:"上海市普陀区金沙江路",level:1}],multipleSelection:[]}},computed:{},watch:{params:{handler:function(t){console.log(t),this.initMsg()},deep:!0}},filters:{_timeFormat:function(t){return new Date(t).format("yyyy-MM-dd")}},created:function(){console.log("historynew created"),this.initMsg()},methods:{initMsg:function(){1!=this.params.mail&&this.params.mail?this.initSendMsg():this.initRecvMsg()},updataMsg:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={Content:t.map((function(t){return Object(o["d"])(t)}))};1!=this.params.mail&&this.params.mail?Object(l["y"])(e).then().catch((function(t){return console.log(t)})):Object(l["x"])(e).then().catch((function(t){return console.log(t)}))},deleteMsg:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a={Content:e.map((function(t){return Object(o["d"])(t)}))};1!=this.params.mail&&this.params.mail?Object(l["l"])(a).then((function(e){var a=e.Code,n=void 0===a?-1:a;200==n&&t.initSendMsg()})).catch((function(){t.$message({message:"服务异常,删除失败",type:"error"})})):Object(l["k"])(a).then((function(e){t.$message({message:"删除成功",type:"success"});var a=e.Code,n=void 0===a?-1:a;200==n&&t.initRecvMsg()})).catch((function(){t.$message({message:"服务异常,删除失败",type:"error"})}))},initRecvMsg:function(){var t=this;Object(l["p"])(this.params).then((function(e){var a=e.Content,n=void 0===a?[]:a,i=e.TotalNum,s=void 0===i?0:i;if(s>0){var l=n.map((function(t){return Object(o["c"])(t)}));l.forEach((function(e){t.appList.add(e.type)})),t.sourceData=l,t.tableData=t.sourceData,t.totalNum=s}}))},initSendMsg:function(){var t=this;Object(l["r"])(this.params).then((function(e){var a=e.Content,n=void 0===a?[]:a,i=e.TotalNum,s=void 0===i?0:i;if(s>0){var l=n.map((function(t){return Object(o["c"])(t)}));t.sourceData=l,t.tableData=t.sourceData,t.totalNum=s}else t.tableData=[]}))},currentChange:function(t){this.params.currentPage=t},prePage:function(t){this.params.currentPage=t},nextPage:function(t){this.params.currentPage=t},ncrFormat:function(t){this.showClickIcon=!0,this.rowid=t.id,this.rowData=t},getListData:function(){},handleSelectionChange:function(t){this.multipleSelection=t,console.log(this.multipleSelection,"this.multipleSelection")},handleSizeChange:function(t){console.log("每页 ".concat(t," 条"))},handleCurrentChange:function(t){console.log("当前页: ".concat(t))},handleLook:function(t,e){console.log(t,e,"==="),this.tableData.forEach((function(t){return t.id==e.id?t.isRead="1":""})),this.updataMsg([e]),this.$tis.openLookAtMsgBox(e.text)},handleReply:function(t,e){console.log(t,e,"==="),this.tableData.forEach((function(t){return t.id==e.id?t.isRead="1":""})),this.updataMsg([e]),this.$tis.openDialogBox()},handleDelete:function(t,e){console.log(t,e,"==="),this.deleteMsg([e])},handleBatchDelect:function(){this.deleteMsg(this.multipleSelection),console.log("批量删除")},handleWholeDelect:function(){console.log("全部删除"),this.deleteMsg(this.sourceData)},handleTagRad:function(){console.log("标记已读"),this.multipleSelection.forEach((function(t){return t.isRead="1"})),this.$refs.multipleTable.clearSelection(),this.updataMsg(this.multipleSelection)},handleChangeType:function(t){this.page=1,console.log(t,this.sourceData.filter((function(e){return e.level==t}))),this.tableData=-1==t?this.sourceData:this.sourceData.filter((function(e){return e.level==t}))},handleChangeMail:function(t){this.page=1,console.log(t,this.params)},handleChangeSource:function(t){this.page=1,console.log(t,this.params),this.tableData="全部"==t?this.sourceData:this.sourceData.filter((function(e){return e.type==t}))},handleChangeTime:function(t){this.page=1,this.params.starttime=t[0],this.params.endtime=t[1],console.log(t,this.params),this.tableData=[{id:0,source:"系统通知44",time:"2016-05-02",type:"警报",content:"上海市普陀区金沙江路",status:1},{id:1,source:"系统通知55",time:"2016-05-02",type:"警告",content:"上海市普陀区金沙江路",status:2}]},handleSearch:function(t){this.page=1,this.params.source=t,console.log(t,this.params)},onClose:function(){this.$tis.closeHistoricalNews()}}},r=c,u=(a("0a0f"),a("2877")),h=Object(u["a"])(r,n,i,!1,null,"3001907d",null);e["default"]=h.exports}}]);
|