151.93b5c3770fb2c04674c5.js 7.6 KB

1
  1. webpackJsonp([151],{Ro7Y:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("vLgD"),s=a("PJh5"),n=a.n(s),o={name:"message_detail",data:function(){return{list:null,cate:"",db:null,list_map:"",testTime:"",title:"",page:1}},filters:{msgTime:function(e){return n()(1e3*parseInt(e)).format("YYYY-MM-DD HH:mm")},testMsgTime:function(e){return n()(1e3*parseInt(e)).calendar(null,{sameDay:"[今天] HH:mm",lastDay:"[昨天] HH:mm",lastWeek:"MM-DD HH:mm",sameElse:function(){return n()(n()().format("YYYY-MM-DD HH:mm")).diff(n()(1e3*parseInt(e)).format("YYYY-MM-DD HH:mm"),"years")?"YYYY-MM-DD HH:mm":"MM-DD HH:mm"}})}},created:function(){this.cate=this.$route.query.cate,this.title=this.$route.query.title},methods:{get_title:function(e){var t=e.find(function(e){return"title"==e.type});return t?t.value:""},get_source:function(e){var t=e.find(function(e){return"source"==e.type});return t?t.value:""},get_content:function(e){var t=e.find(function(e){return"content"==e.type});return t?t.value:""},get_point:function(e){for(var t in e)if("point"==e[t].type)return e[t].value;return 0},get_feedback:function(e){for(var t in e)if("feedback"==e[t].type)return e[t].value;return""},create_params:function(e){var t=[];for(var a in e)t.push(a+"="+e[a]);return"?"+t.join("&")},detail:function(e){if(""!=e.mini_program.index){if(e.mini_program.index.indexOf("#")>=0){var t=e.mini_program.index.substring(e.mini_program.index.indexOf("#")+1);this.$router.push({path:t,query:e.mini_program.params})}else this.$router.push({path:e.mini_program.index,query:e.mini_program.params});localStorage.setItem("read_msg",e.id)}},open_app:function(e){if(window.plus){var t=plus.webview.create(e,e),a=plus.navigator.getStatusBarStyle();plus.nativeUI.showWaiting("加载中...."),t.show("pop-in",300,function(){},{acceleration:"capture"}),t.onloaded=function(){plus.nativeUI.closeWaiting()},t.onclose=function(){plus.navigator.setStatusBarStyle(a)}}},download_app:function(e,t){if(window.plus){var a=this;plus.nativeUI.showWaiting("加载中...."),plus.downloader.createDownload(e,{filename:"_doc/update/"},function(i,s){200==s?plus.zip.decompress(i.filename,"_doc/dir/",function(){plus.nativeUI.closeWaiting(),plus.storage.setItem(t.split("#")[0],e),a.open_app(t)},function(e){console.log(e)}):plus.nativeUI.alert("下载失败!"),plus.nativeUI.closeWaiting()}).start()}},get_app_and_open:function(e,t){var a=this,i="_doc/dir/"+t;window.plus&&plus.io.getFileInfo({success:function(e){if(plus.storage.getItem(i.split("#")[0]))a.open_app(i);else{var t="";a.$store.dispatch("getMenu").then(function(e){e&&((window.plus?JSON.parse(plus.storage.getItem("menu")):JSON.parse(localStorage.getItem("menu"))).forEach(function(e){e.download_url&&(t=e.download_url)}),a.download_app(t,i))})}},filePath:i.split("#")[0],fail:function(e){var t="";a.$store.dispatch("getMenu").then(function(e){e&&((window.plus?JSON.parse(plus.storage.getItem("menu")):JSON.parse(localStorage.getItem("menu"))).forEach(function(e){e.download_url&&(t=e.download_url)}),a.download_app(t,i))})}})},routerBak:function(){this.$keep_alive_update("update_message_list",{}),this.$route_back()},get_list:function(e){var t=this;Object(i.a)("get","/api/notice/list",{cate:this.cate,page:this.page,page_size:20,type:1}).then(function(e){if(1===e.data.code){var a=e.data.data.list;1===t.page?t.list=a:t.list=t.list.concat(a),t.$refs.scroller.finishInfinite(20!=e.data.data.list.length)}else t.$refs.scroller.finishInfinite(!0)}).finally(function(){e()})},onRefresh:function(e){this.page=1,this.get_list(e)},onInfinite:function(e){this.page++,this.get_list(e)},read:function(e){Object(i.a)("post","/api/notice/read",{id:e})},refresh:function(e){var t=this,a=this;setTimeout(function(){t.filter.page=1,t.get_list(function(){a.list=[],e()})},100)}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{height:"100%"}},[a("van-nav-bar",{attrs:{title:e.title,"left-text":"返回","left-arrow":""},on:{"click-left":function(t){return e.routerBak()}}}),e._v(" "),a("div",{staticClass:"body_com"},[a("scroller",{ref:"scroller",attrs:{"on-refresh":e.onRefresh,"on-infinite":e.onInfinite}},[a("div",{staticClass:"message-box"},e._l(e.list,function(t,i){return a("div",{key:i,staticClass:"message-item",on:{click:function(a){return e.detail(t)}}},[a("van-cell",{staticClass:"message-item-source"},[a("icon",{directives:[{name:"show",rawName:"v-show",value:"integral_apply"==t.source_type,expression:"item.source_type == 'integral_apply'"}],staticClass:"cell-item__icon",attrs:{name:"messageApplication"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"information"==t.source_type,expression:"item.source_type == 'information'"}],staticClass:"cell-item__icon",attrs:{name:"messageNotice"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"integral_input"==t.source_type,expression:"item.source_type == 'integral_input'"}],staticClass:"cell-item__icon",attrs:{name:"messageBF"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"attendance"==t.source_type,expression:"item.source_type == 'attendance'"}],staticClass:"cell-item__icon",attrs:{name:"messageAttendance"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"task"==t.source_type,expression:"item.source_type == 'task'"}],staticClass:"cell-item__icon",attrs:{name:"messageTask"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"report_statistics"==t.source_type,expression:"item.source_type == 'report_statistics'"}],staticClass:"cell-item__icon",attrs:{name:"messageData"}}),e._v(" "),a("icon",{directives:[{name:"show",rawName:"v-show",value:"performance"==t.source_type,expression:"item.source_type == 'performance'"}],staticClass:"cell-item__icon",attrs:{name:"messageJX1"}}),e._v(" "),a("span",[e._v(e._s(e.get_source(t.tpl)))]),e._v(" "),a("template",{slot:"right-icon"},[a("span",{staticClass:"datetime"},[e._v(e._s(e._f("testMsgTime")(t.create_time||t.update_time)))])])],2),e._v(" "),a("van-cell",{staticClass:"message-item-title",attrs:{border:!1}},[e._v("\n "+e._s(e.get_title(t.tpl))+"\n "),a("template",{slot:"right-icon"},[a("span",{directives:[{name:"show",rawName:"v-show",value:e.get_point(t.tpl)>0,expression:"get_point(item.tpl) > 0"}],staticClass:"colorFF2D55"},[e._v("+"+e._s(e.get_point(t.tpl))+" "),"BF"==t.cate||"AF"==t.cate?a("span",[e._v(e._s("BF"==t.cate?"B分":"A分"))]):e._e()]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:e.get_point(t.tpl)<0,expression:"get_point(item.tpl) < 0"}],staticClass:"color4BD964"},[e._v(e._s(e.get_point(t.tpl))+" "),"BF"==t.cate||"AF"==t.cate?a("span",[e._v(e._s("BF"==t.cate?"B分":"A分"))]):e._e()])])],2),e._v(" "),a("van-cell",{staticClass:"message-item-content"},[e._v(e._s(e.get_content(t.tpl)))]),e._v(" "),a("van-cell",{directives:[{name:"show",rawName:"v-show",value:""!=e.get_feedback(t.tpl),expression:"get_feedback(item.tpl) != ''"}],attrs:{"is-link":""}},[1!=t.cancel?a("span",[e._v("查看详情")]):e._e(),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:1==t.cancel,expression:"item.cancel == 1"}],staticClass:"labelf56c6c"},[e._v(e._s(t.cancel_text))])])],1)}),0),e._v(" "),"information"==e.cate?a("noData",{staticStyle:{"margin-top":"2rem"},attrs:{src:"static/images/Notice.png",list:e.list,detail_text:"没有公告"}}):e._e(),e._v(" "),"information"!=e.cate?a("noData",{staticStyle:{"margin-top":"2rem"},attrs:{src:"static/images/noconfirm.png",list:e.list,detail_text:"没有通知"}}):e._e()],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(o,r,!1,function(e){a("umC0")},"data-v-47539522",null);t.default=c.exports},umC0:function(e,t){}});