orchestra-information-legacy.f7178237.js 10 KB

1
  1. !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;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,i,a,o){try{var c=e[a](o),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function c(e){r(o,i,a,c,s,"next",e)}function s(e){r(o,i,a,c,s,"throw",e)}c(void 0)}))}}var a=document.createElement("style");a.innerHTML="._information_51xzw_1{overflow:hidden;--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._information_51xzw_1 .van-tab__panel{padding-top:.32rem}._information_51xzw_1 ._addPhone_51xzw_10{color:var(--van-primary-text);font-size:.37333rem}._information_51xzw_1 ._addPhoneBtn_51xzw_14{margin:0 .34667rem;width:calc(100% - .69333rem);font-size:.42667rem;font-weight:500;background:#FFF7F3;border:.02667rem solid #F67146;border-radius:.16rem;color:#f67146}._information_51xzw_1 ._img_51xzw_24{width:3.78667rem;height:2.13333rem;border-radius:.26667rem;overflow:hidden;margin-right:.4rem;flex-shrink:0}._information_51xzw_1 ._title_51xzw_32{font-size:.37333rem;font-weight:500;color:#333;line-height:.56rem;padding-bottom:.05333rem;max-width:4.8rem}._information_51xzw_1 ._content_51xzw_40{font-size:.32rem;color:#777;line-height:.45333rem;word-break:break-all;word-wrap:break-word}._information_51xzw_1 ._time_51xzw_47{padding-top:.13333rem;font-size:.32rem;color:#aaa;line-height:.45333rem}._information_51xzw_1 ._informationGroup_51xzw_53{margin-bottom:.85333rem}._information_51xzw_1 ._cellItemContent_51xzw_56{height:100%;display:flex;justify-content:space-between;flex-direction:column}._information_51xzw_1 ._cellGroup_51xzw_62{background:#fff;overflow:hidden;margin-bottom:.32rem}._information_51xzw_1 ._cellReason_51xzw_67{margin:0 .34667rem .42667rem;background:#FFF0F0;border-radius:.16rem;padding:.32rem;color:#e91515;font-size:.37333rem;word-wrap:break-word;word-break:break-all;line-height:.53333rem}._information_51xzw_1 ._cellReason_51xzw_67 span{font-weight:600}\n",document.head.appendChild(a),System.register(["./index-legacy.5f9666b4.js","./index-legacy.dc9d3f42.js","./index-legacy.da787cdf.js","./index-legacy.1c6d385d.js","./index-legacy.185ff5a4.js","./index-legacy.1f24a6b5.js","./index-legacy.892caf3d.js","./index-legacy.a898059a.js","./index-legacy.7fb4d035.js","./index-legacy.812ec873.js","./index-legacy.85e16f70.js","./use-tab-status-legacy.feb57916.js","./index-legacy.8f20f3d1.js","./index-legacy.42a30b51.js"],(function(e){"use strict";var n,r,a,o,c,s,l,u,f,d,m,h,p,g,_,w,v,b,x,y,z,S,k,j;return{setters:[function(e){n=e.d,r=e.ah,a=e.ag,o=e.r,c=e.$,s=e.c,l=e.B,u=e.q,f=e.ai,d=e.a5,m=e.ak,h=e.al,p=e.m,g=e.bh,_=e.aj},function(e){w=e.O},function(e){v=e.O},function(e){b=e.O},function(e){x=e.L},function(e){y=e.C},function(e){z=e.I},function(e){S=e.A},function(e){k=e.T,j=e.a},function(){},function(){},function(){},function(){},function(){}],execute:function(){var O={information:"_information_51xzw_1",addPhone:"_addPhone_51xzw_10",addPhoneBtn:"_addPhoneBtn_51xzw_14",img:"_img_51xzw_24",title:"_title_51xzw_32",content:"_content_51xzw_40",time:"_time_51xzw_47",informationGroup:"_informationGroup_51xzw_53",cellItemContent:"_cellItemContent_51xzw_56",cellGroup:"_cellGroup_51xzw_62",cellReason:"_cellReason_51xzw_67"};var C=n({props:{type:{type:String,default:""},headHeight:{type:Number,default:0}},emits:["changeList"],name:"orchestra-information-list",setup:function(e,n){var _=n.emit,w=r(),k=a(),j=o({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"}),C=function(){var n=i(regeneratorRuntime.mark((function n(){var r,i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!j.isLoading){n.next=3;break}return n.abrupt("return");case 3:return j.isLoading=!0,n.next=6,p.post("/api-school/sysNewsInformation/page",{data:t(t({},j.params),{},{status:"1"===e.type,orchestraPhotoAlbumId:w.query.photoId})});case 6:if(r=n.sent,j.listState.loading=!1,j.listState.refreshing=!1,i=r.data||{},!(j.list.length>0&&1===i.current)){n.next=12;break}return n.abrupt("return");case 12:a=i.rows||[],j.list=j.list.concat(a),j.listState.finished=i.current>=i.pages,j.params.page=i.current+1,j.listState.dataShow=j.list.length>0,j.isLoading=!1,n.next=26;break;case 20:n.prev=20,n.t0=n.catch(0),j.listState.dataShow=!1,j.listState.finished=!0,j.listState.refreshing=!1,j.isLoading=!1;case 26:_("changeList");case 27:case"end":return n.stop()}}),n,null,[[0,20]])})));return function(){return n.apply(this,arguments)}}(),P=function(){j.params.page=1,j.list=[],j.listState.dataShow=!0,j.listState.loading=!1,j.listState.finished=!1,C()},I=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k.push({name:"add-information",query:{id:j.selectItem.id}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g({message:"您确认删除该资讯吗?"}).then(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.post("/api-school/sysNewsInformation/remove",{requestType:"form",data:{id:j.selectItem.id}});case 3:P(),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 c((function(){C()})),function(){var t;return s("div",{class:[O.information]},["1"===e.type&&s(l,{style:{marginTop:"12px",marginBottom:"12px"},icon:"plus",block:!0,class:O.addPhoneBtn,onClick:function(){k.push("/add-information")}},{default:function(){return[u("添加资讯")]}}),j.listState.dataShow?s(b,{modelValue:j.listState.refreshing,"onUpdate:modelValue":function(e){return j.listState.refreshing=e},onRefresh:P,style:{minHeight:"1"===e.type?"calc(100vh - var(--header-height) - var(--van-button-default-height) - 24px)":"calc(100vh - var(--header-height))"}},{default:function(){return[s(x,{finished:j.listState.finished,finishedText:" ",onLoad:C,immediateCheck:!1,class:O.informationGroup},(e=t=j.list.map((function(e){return s("div",{class:O.cellGroup},[s(y,{class:O.cell,onClick:function(){return function(e){try{e.linkUrl?window.location.href=e.linkUrl:k.push({path:"/information-detail",query:{id:e.id}})}catch(t){}}(e)},border:!1},{icon:function(){return s(z,{src:e.coverImage,class:O.img,fit:"cover"},null)},title:function(){return s("div",{class:O.cellItemContent},[s("div",{class:[O.title,"van-multi-ellipsis--l2"]},[e.title]),s("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},[s("div",{class:O.time},[e.createTime?f(e.createTime).format("YYYY年MM月DD日"):""]),s(d,{name:"ellipsis",size:23,color:"#777777",style:{fontWeight:"bold"},onClick:function(t){t.stopPropagation(),j.selectItem=e,j.oPopover=!0}},null)])])}}),!e.status&&s("div",{class:O.cellReason},[s("span",null,[u("下架原因:")]),e.reason])])})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?t:{default:function(){return[t]}}))];var e}}):s("div",{style:{minHeight:"1"===e.type?"calc(100vh - var(--header-height) - var(--van-button-default-height) - 24px)":"calc(100vh - var(--header-height))"},class:!j.listState.dataShow&&"emptyRootContainer"},[s(m,{btnStatus:!1,tips:"暂无资讯"},null)]),s(S,{teleport:"body",cancelText:"取消",show:j.oPopover,"onUpdate:show":function(e){return j.oPopover=e},closeOnClickAction:!0,actions:[{name:"修改",callback:function(){return I()}},{name:"删除",color:"#F44541",callback:function(){j.dialogStatus=!0}}]},null),s(v,{teleport:"body",show:j.dialogStatus,"onUpdate:show":function(e){return j.dialogStatus=e},title:"删除资讯",message:"1"===e.type?"是否删除该资讯?确认后学员端、伴学端将同步删除":"是否删除该资讯?",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",showCancelButton:!0,onConfirm:R},null)])}}});e("default",n({name:"orchestra-information",setup:function(){var e=sessionStorage.getItem("orchestra-information-tab");a();var t=o({activeName:e||"publish",listState:{height:0},offlineCount:0,publishedCount:0}),n=function(){var e=i(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p.get("/api-school/sysNewsInformation/stat");case 3:n=e.sent,r=n.data,t.publishedCount=(null==r?void 0:r.publishedCount)||0,t.offlineCount=(null==r?void 0:r.offlineCount)||0,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return c(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))),function(){return s("div",{class:[O.information]},[s(w,{position:"top",onGetHeight:function(e){t.listState.height=e,document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[s(_,{border:!1},null),s(k,{sticky:!0,lineWidth:20,lineHeight:4,active:t.activeName,"onUpdate:active":function(e){return t.activeName=e},onChange:function(e){sessionStorage.setItem("orchestra-information-tab",e)}},{default:function(){return[s(j,{title:"已发布(".concat(t.publishedCount,")"),name:"publish"},null),s(j,{title:"已下架(".concat(t.offlineCount,")"),name:"offline"},null)]}})]}}),"publish"===t.activeName&&s(C,{key:"publish",headHeight:t.listState.height,type:"1",onChangeList:n},null),"offline"===t.activeName&&s(C,{key:"offline",headHeight:t.listState.height,type:"0",onChangeList:n},null)])}}}))}}}))}();