zhxy-jsd/dist/build/h5/assets/pages-view-notice-detail.5a9028d4.js
2025-05-21 02:44:13 +08:00

2 lines
5.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as e,r as a,n as t,o as s,A as i,a1 as l,b as d,e as n,w as c,g as r,y as u,q as o,z as m,v,a0 as f,Q as _,h as g,l as y,F as p,j as h,k,G as b,H as x,_ as w}from"./index-f6e54d8f.js";import{_ as I}from"./uni-icons.7467b650.js";import{_ as j}from"./Layout.7385e6f6.js";import{_ as S}from"./_plugin-vue_export-helper.1b428a4d.js";const z=S(e({__name:"detail",setup(e){const S=a(""),z=a(null),T=a(!1),D=t((()=>{var e;return(null==(e=z.value)?void 0:e.targetStudents.filter((e=>e.received)).length)??0})),F=t((()=>{var e;return(null==(e=z.value)?void 0:e.targetStudents.length)??0}));s((e=>{e&&e.id?(S.value=e.id,L()):(console.error("Notice ID is missing!"),i({title:"加载失败缺少通知ID",icon:"none"}))}));const L=async()=>{console.log(`Fetching details for notice ID: ${S.value}`),T.value=!0,await new Promise((e=>setTimeout(e,500)));const e={id:S.value,title:"重要通知接龙",content:"由于xxx原因现下发《关于加强建设xxxx工作的通知》\n希望大家自习阅读认真执行。",attachments:[{name:"附件1.docx",type:"file",url:""},{name:"相关图片.png",type:"image",url:""}],targetClass:"一年级3班",targetStudents:[{id:"s111",name:"施延兴",received:!0},{id:"s112",name:"安苒溪",received:!1},{id:"s113",name:"罗浩晨",received:!1},{id:"s114",name:"康萌",received:!0},{id:"s115",name:"范文昊",received:!1},{id:"s116",name:"丁贺祥",received:!1},{id:"s117",name:"韦运昊",received:!1},{id:"s118",name:"萧润丽",received:!0},{id:"s119",name:"谢林",received:!1},{id:"s120",name:"鲍泽远",received:!0},{id:"s121",name:"杨俊",received:!1},{id:"s122",name:"秦禹辰",received:!1},{id:"s123",name:"姜杨",received:!1},{id:"s124",name:"窦晶滢",received:!0},{id:"s125",name:"廉佳毅",received:!1},{id:"s126",name:"许冰枫",received:!1},{id:"s127",name:"曹佳惠",received:!0},{id:"s128",name:"元运昊",received:!1},{id:"s129",name:"孔欣怡",received:!1},{id:"s130",name:"许润平",received:!0},{id:"s131",name:"谢汝鑫",received:!0},{id:"s132",name:"康益帆",received:!0},{id:"s133",name:"凤帆",received:!1},{id:"s134",name:"吴雅晗",received:!1},{id:"s135",name:"曹阳",received:!1},{id:"s136",name:"萧润丽",received:!0},{id:"s137",name:"褚慧嘉",received:!1},{id:"s138",name:"薛欣怡",received:!0},{id:"s139",name:"倪雄霖",received:!1},{id:"s140",name:"顾雪",received:!0}],signatureStatus:"不启用",startTime:"2025-03-10 12:00:00",endTime:"2025-03-10 12:00:00"};z.value=e,T.value=!1,l({title:"通知详情"})};return(e,a)=>{const t=y,s=p,i=h(k("uni-icons"),I),l=b,S=x,L=h(k("BasicLayout"),j);return d(),n(L,null,{bottom:c((()=>[r(t,{class:"bottom-actions"},{default:c((()=>[r(S,{class:"action-btn publish-btn"},{default:c((()=>[u("接龙")])),_:1})])),_:1})])),default:c((()=>[r(t,{class:"notice-detail-page"},{default:c((()=>[T.value?(d(),n(t,{key:0,class:"loading-indicator"},{default:c((()=>[u("加载中...")])),_:1})):z.value?(d(),n(t,{key:1,class:"detail-container"},{default:c((()=>[o(" 1. 主要内容卡片 "),r(t,{class:"info-card main-content-card"},{default:c((()=>[o(" 封面 "),z.value.coverImage?(d(),n(t,{key:0,class:"cover-image-container"},{default:c((()=>[r(s,{src:z.value.coverImage,mode:"aspectFill",class:"cover-image"},null,8,["src"])])),_:1})):(d(),n(t,{key:1,class:"cover-placeholder"},{default:c((()=>[r(i,{type:"image",size:"30",color:"#ccc"}),r(l,null,{default:c((()=>[u("暂无封面")])),_:1})])),_:1})),o(" 标题 "),r(l,{class:"notice-title"},{default:c((()=>[u(m(z.value.title),1)])),_:1}),o(" 内容 "),r(t,{class:"notice-content"},{default:c((()=>[r(l,null,{default:c((()=>[u(m(z.value.content),1)])),_:1})])),_:1}),o(" 附件 (简单展示) "),z.value.attachments&&z.value.attachments.length>0?(d(),n(t,{key:2,class:"attachments-section"},{default:c((()=>[r(l,{class:"sub-title"},{default:c((()=>[u("附件:")])),_:1}),(d(!0),v(_,null,f(z.value.attachments,((e,a)=>(d(),n(t,{key:a,class:"attachment-item"},{default:c((()=>[r(i,{type:"link",size:"16",color:"#007aff"}),r(l,{class:"attachment-name"},{default:c((()=>[u(m(e.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):o("v-if",!0)])),_:1}),o(" 2. 按名单填写卡片 (反馈情况) "),r(t,{class:"info-card feedback-card"},{default:c((()=>[r(l,{class:"feedback-title"},{default:c((()=>[u("反馈完成情况 ("+m(g(D))+"/"+m(g(F))+")",1)])),_:1}),r(t,{class:"name-tags"},{default:c((()=>[(d(!0),v(_,null,f(z.value.targetStudents,(e=>(d(),n(t,{key:e.id,class:w(["name-tag",{received:e.received}])},{default:c((()=>[r(l,null,{default:c((()=>[u(m(e.name),1)])),_:2},1024),e.received?(d(),n(t,{key:0,class:"checkmark-icon"},{default:c((()=>[r(i,{type:"checkmarkempty",size:"12",color:"#ffffff"})])),_:1})):o("v-if",!0)])),_:2},1032,["class"])))),128)),o(" Modify button is usually not shown in detail view "),o(' <button class="modify-btn">修改</button> ')])),_:1})])),_:1}),o(" 4. 时间卡片 "),r(t,{class:"info-card list-item-card"},{default:c((()=>[r(t,{class:"list-item-row no-border"},{default:c((()=>[r(l,{class:"list-label"},{default:c((()=>[u("结束时间")])),_:1}),r(t,{class:"list-value"},{default:c((()=>[r(l,null,{default:c((()=>[u(m(z.value.endTime),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})):(d(),n(t,{key:2,class:"empty-state"},{default:c((()=>[u("通知详情未找到")])),_:1}))])),_:1})])),_:1})}}}),[["__scopeId","data-v-6365a29a"]]);export{z as default};