(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e4eb836"],{"29aa":function(t,e,s){"use strict";s("7280")},"66ef":function(t,e,s){},7280:function(t,e,s){},"78d3":function(t,e,s){"use strict";s("66ef")},"8ce5":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-container message-page"},[t.lists.list.length>0?e("div",{staticClass:"lists"},t._l(t.lists.list,(function(s,i){return e("div",{staticClass:"li",on:{click:function(e){t.ListMethods().clickViewBtn(s,i)}}},[e("div",{staticClass:"title ellipsis"},[e("el-tag",{staticStyle:{"margin-right":"10px"},attrs:{type:s.hasRead?"info":"warning",size:"small"}},[t._v(" "+t._s(s.hasRead?"已读":"未读")+" ")]),t._v(" "+t._s(s.title)+" ")],1),e("div",{staticClass:"info flex flex-start"},[e("span",{staticClass:"type"},[t._v(t._s(s.type))]),e("span",{staticClass:"divider"},[t._v("|")]),e("span",{staticClass:"date"},[t._v(t._s(t._f("dateFormat")(s.createTime)))])])])})),0):t._e(),0===t.lists.list.length?e("div",{staticClass:"no-list",staticStyle:{"text-align":"center",padding:"50px 0px",color:"#666"}},[e("i",{staticClass:"el-icon-warning",staticStyle:{"margin-right":"10px"}}),e("span",[t._v("暂无消息")])]):t._e(),t.lists.list.length>0?e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{background:"","current-page":t.lists.pages.number,"page-size":t.lists.pages.size,layout:"total,prev, pager, next,sizes",total:t.lists.pages.totalElements,"page-count":t.lists.pages.totalPages},on:{"current-change":e=>t.ListMethods().pageChange(e),"update:currentPage":function(e){return t.$set(t.lists.pages,"number",e)},"update:current-page":function(e){return t.$set(t.lists.pages,"number",e)},"update:pageSize":function(e){return t.$set(t.lists.pages,"size",e)},"update:page-size":function(e){return t.$set(t.lists.pages,"size",e)},"size-change":e=>t.ListMethods().pageLimitChange(e)}})],1):t._e(),e("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{title:"消息详情",visible:t.entityInfo.dialog,width:"900px",center:""},on:{"update:visible":function(e){return t.$set(t.entityInfo,"dialog",e)}}},[e("div",{staticClass:"dialog-container message-dialog"},[e("div",{staticClass:"title"},[t._v(t._s(t.entityInfo.info.title))]),e("div",{staticClass:"type"},[t._v(t._s(t.entityInfo.info.type))]),e("div",{staticClass:"html-view content limit-height",domProps:{innerHTML:t._s(t.entityInfo.info.content)}}),e("div",{staticClass:"date"},[t._v(t._s(t._f("dateFormat")(t.entityInfo.info.createTime)))])])])],1)},n=[],a=(s("a87d"),s("a9bd")),o=s("2f62"),r=s("9204"),l=s("a888"),d=s("7b67"),c={name:"message",filters:{dateFormat:r["a"]},directives:{elDragDialog:l["a"]},computed:{...Object(o["b"])({userInfo:t=>t.user})},data(){return{activeName:"message",knowContent:"",userUnionId:"0",notReadNum:0,lists:{list:[],loading:!1,query:{},queryBase:{},pages:{size:10},searchFilter:{search:[],filter:[]}},entityInfo:{dialog:!1,info:{}}}},mounted(){let t=this.userInfo;this.lists.queryBase=[t.schoolid,t.departmentid,t.experimentids,"teacher"===t.rolename?"1":"2"],this.ListMethods().getList(1,this.lists.pages.size,this.lists.query)},methods:{ListMethods(){let t=this;return{async getList(e,s){t.lists.loading=!0;let i=t.lists.queryBase,n=await a["a"].getPageList(d["j"],e,s,t.userInfo.unionuserid,i);[t.lists.list,t.lists.pages]=n[0],t.notReadNum=n[1],t.lists.loading=!1},async pageChange(e){this.getList(e,t.lists.pages.size,t.lists.query)},async pageLimitChange(e){this.getList(t.lists.pages.number,e,t.lists.query)},clickViewBtn(e,s){t.entityInfo.dialog=!0,t.entityInfo.info=e,e.hasRead||(a["a"].setMessageRead(e.messageId,t.userInfo.unionuserid),t.notReadNum-=1,t.$set(t.lists.list[s],"hasRead",!0))}}}}},u=c,g=(s("29aa"),s("78d3"),s("2877")),f=Object(g["a"])(u,i,n,!1,null,"f489d6be",null);e["default"]=f.exports},9204:function(t,e,s){"use strict";s.d(e,"a",(function(){return n})),s.d(e,"b",(function(){return a})),s.d(e,"d",(function(){return o})),s.d(e,"c",(function(){return l}));var i=s("cf45");const n=(t,e)=>{if(t){let s="yyyy/MM/dd HH:mm";return e&&(s=e),Object(i["f"])(t,s)}return""},a=(t,e)=>{if(t){let s="yyyy-MM-dd HH:mm:ss";return e&&(s=e),Object(i["f"])(t,s)}return""},o=(t,e)=>{if(t||0===t){let s=0;return e&&(s=e),t.toFixed(s)}return""};function r(t){return t<10&&(t="0"+t),t}const l=function(t){t=Math.round(t/1e3);let e=0,s=0;return t<60?e=Number(t).toFixed(0):(s=Math.floor(t/60),e=Math.floor(t-60*s)),`${r(s)}分${r(e)}秒`}},a87d:function(t,e,s){"use strict";s.d(e,"a",(function(){return l}));s("4360");var i=s("8ce4"),n=s("7b67");async function a(){return Object(i["a"])(n["b"]+"/admin/expawareness/info","get",{})}async function o(){return Object(i["a"])(n["b"]+"/admin/expawareness/JudgeRead","get",{})}async function r(t){return Object(i["a"])(n["b"]+"/admin/expawareness/update","post_body",t)}s("8bb9");class l{static async getInfo(){let[t]=await a();return t.data}static async judgeRead(){let[t]=await o();return 2e4===t.code&&t.data}static async setRead(t){let[e]=await r();return!0}}},a888:function(t,e,s){"use strict";const i=20;function n(t,e,s){return Math.min(Math.max(t,e),s)}function a(t){return{dialogHeaderEl:t.querySelector(".el-dialog__header"),dragDom:t.querySelector(".el-dialog")}}function o(t){return t.componentInstance||t.child}function r(t){return Boolean(o(t)&&o(t).visible)}function l(t){return t&&"object"===typeof t.value&&null!==t.value?t.value:{center:Boolean(t&&t.value)}}function d(t,e){const s=document.documentElement.clientWidth,n=document.documentElement.clientHeight,a=i,o=Math.max(s-t.offsetWidth-i,a),r=i,l=Math.max(n-e.offsetHeight-i,r);return{screenWidth:s,screenHeight:n,minLeft:a,maxLeft:o,minTop:r,maxTop:l}}function c(t){const{dialogHeaderEl:e,dragDom:s}=a(t);if(!e||!s||!s.offsetWidth)return;const i=t.__dragDialogOptions||{},o=d(s,e),r=window.getComputedStyle(s),l=parseFloat(r.marginTop)||o.minTop,c=(o.screenWidth-s.offsetWidth)/2,u=(o.screenHeight-s.offsetHeight)/2,g=i.center?u:l;s.style.position="fixed",s.style.margin="0",s.style.left=n(c,o.minLeft,o.maxLeft)+"px",s.style.top=n(g,o.minTop,o.maxTop)+"px",s.style.right="auto",s.style.bottom="auto"}function u(t,e,s){t.__dragDialogOptions=l(e),t.__dragDialogVm=o(s);const i=r(s),n=t.__dragDialogVisible;t.__dragDialogVisible=i,i&&!n&&requestAnimationFrame(()=>{c(t)})}var g={inserted(t,e,s){const{dialogHeaderEl:i,dragDom:o}=a(t);i&&o&&(i.style.cursor="move",i.onmousedown=e=>{const s=d(o,i),a=parseFloat(o.style.left)||o.getBoundingClientRect().left,r=parseFloat(o.style.top)||o.getBoundingClientRect().top,l=e.clientX,c=e.clientY,u=e=>{const i=n(a+e.clientX-l,s.minLeft,s.maxLeft),d=n(r+e.clientY-c,s.minTop,s.maxTop);o.style.left=i+"px",o.style.top=d+"px",t.__dragDialogVm&&t.__dragDialogVm.$emit&&t.__dragDialogVm.$emit("dragDialog")},g=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",g),e.preventDefault()},u(t,e,s))},componentUpdated(t,e,s){u(t,e,s)},unbind(t){const{dialogHeaderEl:e}=a(t);e&&(e.onmousedown=null),delete t.__dragDialogOptions,delete t.__dragDialogVisible,delete t.__dragDialogVm}};const f=function(t){t.directive("el-drag-dialog",g)};window.Vue&&(window["el-drag-dialog"]=g,Vue.use(f)),g.install=f;e["a"]=g},a9bd:function(t,e,s){"use strict";s.d(e,"a",(function(){return l}));var i=s("2ca2"),n=s("8ce4"),a=s("7b67");async function o(t,e,s,i,o){return Object(n["a"])(a["a"]+`v1/message/systemMessage/exp/list?platformId=${t}&page=${e}&size=${s}&userUnionId=${i}`,"post_body",o)}async function r(t,e){return Object(n["a"])(a["a"]+`v1/message/systemMessage/read?userUnionId=${e}&messageId=${t}`,"post_json",{})}class l{static async getPageList(t,e,s,n,a){let[r]=await o(t,e,s,n,a);return[i["a"].generateListMongo(r.data),r.data.notReadNum]}static async setMessageRead(t,e){let[s]=await r(t,e);return 2e4===s.code}}}}]);