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.eb062188.js","./index-legacy.e0860c0a.js","./index-legacy.d64e5695.js","./index-legacy.ad813f4d.js","./index-legacy.fad72574.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.8c254533.js","./use-tab-status-legacy.91417466.js"],(function(t){"use strict";var e,i,o,a,n,s,l,r,c,d,m,h,f,g,u,_,p,b,y,S,w;return{setters:[function(t){e=t.d,i=t.ah,o=t.ag,a=t.r,n=t.$,s=t.c,l=t.aj,r=t.q,c=t.ai,d=t.a5,m=t.ak,h=t.al,f=t.m,g=t.bd},function(t){u=t.O},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",e({name:"orchestra-information",setup(){const t=i(),e=o(),x=a({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 f.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()=>{g({message:"您确认删除该资讯吗?"}).then((async()=>{try{await f.post("/api-school/sysNewsInformation/remove",{requestType:"form",data:{id:x.selectItem.id}}),k()}catch{}}))};return n((()=>{j()})),()=>{let t;return s("div",{class:[v.information,!x.listState.dataShow&&"emptyRootContainer"]},[s(p,{position:"top",onGetHeight:t=>{x.listState.height=t}},{default:()=>[s(l,null,{right:()=>s("span",{class:v.addPhone,onClick:()=>{e.push("/add-information")}},[r("添加资讯")])})]}),x.listState.dataShow?s(_,{modelValue:x.listState.refreshing,"onUpdate:modelValue":t=>x.listState.refreshing=t,onRefresh:k,style:{minHeight:`calc(100vh - ${x.listState.height}px)`}},{default:()=>{return[s(b,{finished:x.listState.finished,finishedText:" ",onLoad:j,immediateCheck:!1,class:v.informationGroup},(i=t=x.list.map(((t,i)=>s(y,{center:!0,class:v.cell,onClick:()=>(t=>{try{console.log(t,"item"),t.linkUrl?window.location.href=t.linkUrl:e.push({path:"/information-detail",query:{id:t.id}})}catch{}})(t)},{icon:()=>s(S,{src:t.coverImage,class:v.img,fit:"cover"},null),title:()=>s("div",null,[s("div",{class:[v.title,"van-ellipsis"]},[t.title]),s("div",{class:[v.content,"van-multi-ellipsis--l2"]},[t.summary]),s("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},[s("div",{class:v.time},[t.createTime?c(t.createTime).format("YYYY年MM月DD日"):""]),s(d,{name:"ellipsis",size:23,color:"#777777",style:{fontWeight:"bold"},onClick:e=>{e.stopPropagation(),x.selectItem=t,x.oPopover=!0}},null)])])}))),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!h(i)?t:{default:()=>[t]}))];var i}}):s(m,{btnStatus:!1,tips:"暂无资讯"},null),s(w,{cancelText:"取消",show:x.oPopover,"onUpdate:show":t=>x.oPopover=t,closeOnClickAction:!0,actions:[{name:"修改",callback:()=>(async()=>{e.push({name:"add-information",query:{id:x.selectItem.id}})})()},{name:"删除",color:"#F44541",callback:()=>{x.dialogStatus=!0}}]},null),s(u,{show:x.dialogStatus,"onUpdate:show":t=>x.dialogStatus=t,title:"删除资讯",message:"是否删除该资讯?确认后学员端、伴学端将同步删除",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",showCancelButton:!0,onConfirm:C},null)])}}}))}}}))}();
|