| 1 |
- !function(){var t=document.createElement("style");t.innerHTML="._information_1b28o_1{overflow:hidden}._information_1b28o_1 ._addPhone_1b28o_4{color:var(--van-primary-text);font-size:.37333rem}._information_1b28o_1 ._img_1b28o_8{width:3.78667rem;height:2.13333rem;border-radius:.26667rem;overflow:hidden;margin-right:.4rem;flex-shrink:0}._information_1b28o_1 ._title_1b28o_16{font-size:.37333rem;font-weight:500;color:#333;line-height:.56rem;padding-bottom:.05333rem;max-width:4.8rem}._information_1b28o_1 ._content_1b28o_24{font-size:.32rem;color:#777;line-height:.45333rem;word-break:break-all;word-wrap:break-word}._information_1b28o_1 ._time_1b28o_31{padding-top:.13333rem;font-size:.32rem;color:#aaa;line-height:.45333rem}._information_1b28o_1 ._informationGroup_1b28o_37{margin-bottom:.85333rem}\n",document.head.appendChild(t),System.register(["./index-legacy.d2fc6539.js","./index-legacy.1bec3f11.js","./index-legacy.7e09841f.js","./index-legacy.31e7055e.js","./index-legacy.9c822af3.js","./index-legacy.cdf253e7.js","./index-legacy.dea5c884.js","./index-legacy.8cc8f829.js","./use-tab-status-legacy.7bf6a1c3.js"],(function(t){"use strict";var e,i,o,a,n,s,l,r,c,d,m,f,h,g,u,_,p,b,y,S,w;return{setters:[function(t){e=t.O},function(t){i=t.d,o=t.ah,a=t.ag,n=t.r,s=t.$,l=t.c,r=t.aj,c=t.q,d=t.ai,m=t.a5,f=t.ak,h=t.al,g=t.m,u=t.bd},function(t){_=t.O},function(t){p=t.O},function(t){b=t.L},function(t){y=t.C},function(t){S=t.I},function(t){w=t.A},function(){}],execute:function(){var v={information:"_information_1b28o_1",addPhone:"_addPhone_1b28o_4",img:"_img_1b28o_8",title:"_title_1b28o_16",content:"_content_1b28o_24",time:"_time_1b28o_31",informationGroup:"_informationGroup_1b28o_37"};t("default",i({name:"orchestra-information",setup(){const t=o(),i=a(),x=n({addStatus:!1,isLoading:!1,dialogStatus:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},params:{type:"HOT_CONSULTATION",clientType:"SCHOOL",page:1,rows:20},oPopover:!1,selectItem:{},selectType:"add"}),j=async()=>{try{if(x.isLoading)return;x.isLoading=!0;const e=await g.post("/api-school/sysNewsInformation/page",{data:{...x.params,orchestraPhotoAlbumId:t.query.photoId}});x.listState.loading=!1,x.listState.refreshing=!1;const i=e.data||{};if(x.list.length>0&&1===i.current)return;const o=i.rows||[];x.list=x.list.concat(o),x.listState.finished=i.current>=i.pages,x.params.page=i.current+1,x.listState.dataShow=x.list.length>0,x.isLoading=!1}catch{x.listState.dataShow=!1,x.listState.finished=!0,x.listState.refreshing=!1,x.isLoading=!1}},k=()=>{x.params.page=1,x.list=[],x.listState.dataShow=!0,x.listState.loading=!1,x.listState.finished=!1,j()},C=async()=>{u({message:"您确认删除该资讯吗?"}).then((async()=>{try{await g.post("/api-school/sysNewsInformation/remove",{requestType:"form",data:{id:x.selectItem.id}}),k()}catch{}}))};return s((()=>{j()})),()=>{let t;return l("div",{class:[v.information,!x.listState.dataShow&&"emptyRootContainer"]},[l(p,{position:"top",onGetHeight:t=>{x.listState.height=t}},{default:()=>[l(r,null,{right:()=>l("span",{class:v.addPhone,onClick:()=>{i.push("/add-information")}},[c("添加资讯")])})]}),x.listState.dataShow?l(_,{modelValue:x.listState.refreshing,"onUpdate:modelValue":t=>x.listState.refreshing=t,onRefresh:k,style:{minHeight:`calc(100vh - ${x.listState.height}px)`}},{default:()=>{return[l(b,{finished:x.listState.finished,finishedText:" ",onLoad:j,immediateCheck:!1,class:v.informationGroup},(e=t=x.list.map(((t,e)=>l(y,{center:!0,class:v.cell,onClick:()=>(t=>{try{console.log(t,"item"),t.linkUrl?window.location.href=t.linkUrl:i.push({path:"/information-detail",query:{id:t.id}})}catch{}})(t)},{icon:()=>l(S,{src:t.coverImage,class:v.img,fit:"cover"},null),title:()=>l("div",null,[l("div",{class:[v.title,"van-ellipsis"]},[t.title]),l("div",{class:[v.content,"van-multi-ellipsis--l2"]},[t.summary]),l("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},[l("div",{class:v.time},[t.createTime?d(t.createTime).format("YYYY年MM月DD日"):""]),l(m,{name:"ellipsis",size:23,color:"#777777",style:{fontWeight:"bold"},onClick:e=>{e.stopPropagation(),x.selectItem=t,x.oPopover=!0}},null)])])}))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?t:{default:()=>[t]}))];var e}}):l(f,{btnStatus:!1,tips:"暂无资讯"},null),l(w,{cancelText:"取消",show:x.oPopover,"onUpdate:show":t=>x.oPopover=t,closeOnClickAction:!0,actions:[{name:"修改",callback:()=>(async()=>{i.push({name:"add-information",query:{id:x.selectItem.id}})})()},{name:"删除",color:"#F44541",callback:()=>{x.dialogStatus=!0}}]},null),l(e,{show:x.dialogStatus,"onUpdate:show":t=>x.dialogStatus=t,title:"删除资讯",message:"是否删除该资讯?确认后学员端、伴学端将同步删除",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",showCancelButton:!0,onConfirm:C},null)])}}}))}}}))}();
|