!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r0&&1===a.current)){n.next=12;break}return n.abrupt("return");case 12:i=a.rows||[],s.list=s.list.concat(i),s.listState.finished=a.current>=a.pages,s.params.page=a.current+1,s.listState.dataShow=s.list.length>0,s.isLoading=!1,n.next=26;break;case 20:n.prev=20,n.t0=n.catch(0),s.listState.dataShow=!1,s.listState.finished=!0,s.listState.refreshing=!1,s.isLoading=!1;case 26:case"end":return n.stop()}}),n,null,[[0,20]])})));return function(){return n.apply(this,arguments)}}(),w=function(){s.params.page=1,s.list=[],s.listState.dataShow=!0,s.listState.loading=!1,s.listState.finished=!1,u()},S=function(){var e=a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.selectType="update",s.addStatus=!0;case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y({message:"您确认删除该资讯吗?"}).then(a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.post("/api-school/sysNewsInformation/remove",{requestType:"form",data:{id:s.selectItem.id}});case 3:w(),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])}))));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o((function(){u()})),function(){var e;return c("div",{class:[P.information,!s.listState.dataShow&&"emptyRootContainer"]},[c(k,{position:"top",onGetHeight:function(e){s.listState.height=e}},{default:function(){return[c(b,null,{right:function(){return c("span",{class:P.addPhone,onClick:function(){s.selectType="add",s.addStatus=!0}},[l("添加资讯")])}})]}}),s.listState.dataShow?c(_,{modelValue:s.listState.refreshing,"onUpdate:modelValue":function(e){return s.listState.refreshing=e},onRefresh:w,style:{minHeight:"calc(100vh - ".concat(s.listState.height,"px)")}},{default:function(){return[c(x,{finished:s.listState.finished,finishedText:" ",onLoad:u,immediateCheck:!1,class:P.informationGroup},(t=e=s.list.map((function(e,t){return c(I,{center:!0,class:P.cell,onClick:function(){return function(e){try{console.log(e,"item"),e.linkUrl?window.location.href=e.linkUrl:r.push({path:"/information-detail",query:{id:e.id}})}catch(t){}}(e)}},{icon:function(){return c(O,{src:e.coverImage,class:P.img,fit:"cover"},null)},title:function(){return c("div",null,[c("div",{class:[P.title,"van-ellipsis"]},[e.title]),c("div",{class:[P.content,"van-multi-ellipsis--l2"]},[e.summary]),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},[c("div",{class:P.time},[e.createTime?m(e.createTime).format("YYYY年MM月DD日"):""]),c(g,{name:"ellipsis",size:23,color:"#777777",style:{fontWeight:"bold"},onClick:function(t){t.stopPropagation(),s.selectItem=e,s.oPopover=!0}},null)])])}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!h(t)?e:{default:function(){return[e]}}))];var t}}):c(A,{btnStatus:!1,tips:"暂无资讯"},null),c(v,{modelValue:s.addStatus,"onUpdate:modelValue":function(e){return s.addStatus=e},style:{background:"#f8f8f8"},destroy:!0},{default:function(){return[c(Q,{selectType:s.selectType,selectItem:s.selectItem,onClose:function(){return s.addStatus=!1},onGetList:w},null)]}}),c(z,{cancelText:"取消",show:s.oPopover,"onUpdate:show":function(e){return s.oPopover=e},closeOnClickAction:!0,actions:[{name:"修改",callback:function(){return S()}},{name:"删除",color:"#F44541",callback:function(){s.dialogStatus=!0}}]},null),c(n,{show:s.dialogStatus,"onUpdate:show":function(e){return s.dialogStatus=e},title:"删除资讯",message:"是否删除该资讯?确认后学生端、伴学端将同步删除",messageAlign:"left",showCancelButton:!0,onConfirm:U},null)])}}}))}}}))}();