Files
aiot-platform-ui/apps/web-antd/dist/js/index-Caum5sRI.js
lzh cb81829d4c
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 24s
chore: build and deploy web-antd
2026-01-14 14:15:09 +08:00

8 lines
17 KiB
JavaScript

import{aL as N,ay as k,an as x,bI as le,ak as j,a9 as A,c6 as Q,ac as se}from"./bootstrap-CvQmCMXe.js";import{u as ae,_ as oe}from"./use-echarts-DOVBIolH.js";import{m as R,ad as d,b2 as u,aR as t,u as e,cd as ie,bc as ne,b9 as S,w as re,v as ce,x as de,aT as q,j as o,aa as M,ae as l,bJ as n,ai as h,I as O,bb as V,bp as p,ac as D}from"../jse/index-index-CAIAj58w.js";const L=R({__name:"GlassCard",props:{class:{}},setup(_){const g=_;return(f,I)=>(u(),d("div",{class:t(e(ie)("glass-card glass-border glass-shadow glass-highlight","rounded-[2rem] text-card-foreground","transition-all duration-300 ease-out","hover:glass-shadow-hover hover:-translate-y-1",g.class))},[ne(f.$slots,"default")],2))}}),H=R({__name:"BackgroundChart",props:{options:{},opacity:{default:.6},paddingBottom:{default:"1.5rem"}},setup(_){const g=_,f=S(),{renderEcharts:I}=ae(f);function P(){g.options&&I(g.options)}re(()=>g.options,()=>{P()},{deep:!0});const m=()=>{var $,c;f.value&&((c=($=f.value).resize)==null||c.call($))};return ce(()=>{P(),window.addEventListener("resize",m)}),de(()=>{window.removeEventListener("resize",m)}),($,c)=>(u(),d("div",{class:"absolute inset-x-0 bottom-0 top-0 z-0 overflow-visible rounded-lg",style:q({paddingBottom:_.paddingBottom})},[o(e(oe),{ref_key:"chartRef",ref:f,style:q({opacity:_.opacity}),class:"h-full w-full"},null,8,["style"])],4))}});function K(_){const{xAxisData:g,yAxisData:f,seriesName:I,lineColor:P,areaColor:m,yAxisFormatter:$}=_;return{grid:{left:"4%",right:"2%",top:"5%",bottom:"15%",containLabel:!0},xAxis:{type:"category",data:g,show:!0,boundaryGap:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!0,color:"rgba(148, 163, 184, 0.6)",fontSize:10,fontWeight:400,margin:6,interval:0,rotate:0},splitLine:{show:!1}},yAxis:{type:"value",show:!0,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!0,color:"rgba(148, 163, 184, 0.6)",fontSize:10,fontWeight:400,margin:6,formatter:$},splitLine:{show:!0,lineStyle:{color:"rgba(148, 163, 184, 0.1)",type:"dashed",width:1}}},series:[{name:I,type:"line",data:f,smooth:!0,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:m[0]},{offset:.5,color:m[1]},{offset:1,color:m[2]}]}},lineStyle:{color:P,width:4},symbol:"none",symbolSize:0}],tooltip:{show:!0,trigger:"axis",axisPointer:{type:"line",lineStyle:{color:"rgba(148, 163, 184, 0.3)",width:1}},backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"rgba(148, 163, 184, 0.2)",borderWidth:1,textStyle:{color:"#475569",fontSize:12},padding:[8,12],formatter:c=>{const b=c[0];return`
<div style="margin-bottom: 4px; font-weight: 600;">${b.name}</div>
<div style="display: flex; align-items: center; gap: 8px;">
<span style="display: inline-block; width: 10px; height: 10px; background-color: ${b.color}; border-radius: 50%;"></span>
<span>${b.seriesName||"数值"}: <strong>${b.value}</strong></span>
</div>
`}}}}const B={title:"drop-shadow-[0_2px_16px_rgba(255,255,255,0.95),0_0_8px_rgba(255,255,255,0.8)]",largeNumber:"drop-shadow-[0_2px_20px_rgba(255,255,255,0.98),0_0_12px_rgba(255,255,255,0.9)]",tag:"drop-shadow-[0_1px_8px_rgba(255,255,255,0.9),0_0_4px_rgba(255,255,255,0.8)]",smallText:"drop-shadow-[0_1px_8px_rgba(255,255,255,0.85),0_0_4px_rgba(255,255,255,0.7)]"},C={container:"relative",title:`text-sm font-semibold uppercase tracking-wide text-slate-500 ${B.title}`,numberContainer:"mt-1 flex items-baseline gap-2",largeNumber:`text-4xl font-bold text-slate-800 ${B.largeNumber}`,description:`mt-1 text-xs text-slate-400 ${B.smallText}`},r={card:"flex min-h-0 flex-1 flex-col overflow-hidden p-0",header:"flex shrink-0 items-center justify-between border-b border-white/40 p-5",title:"flex items-center gap-2 font-bold text-slate-800",titleDot:"h-2 w-2 animate-pulse rounded-full bg-red-500",filterButton:"text-xs font-medium text-slate-400 hover:text-orange-600",filterMenu:"min-w-[120px] rounded-lg bg-white p-2 shadow-lg",filterMenuItem:"cursor-pointer rounded px-3 py-2 text-sm hover:bg-gray-50",filterMenuItemActive:"bg-orange-50 text-orange-600",listContainer:"flex-1 overflow-y-auto px-2",emptyState:"flex h-full items-center justify-center text-slate-400",emptyContent:"text-center",emptyIcon:"mb-2 text-4xl",taskItem:"group cursor-pointer rounded-lg border-b border-slate-50 p-3 transition-colors last:border-0 hover:bg-orange-50/40",taskContent:"flex items-center justify-between",taskLeft:"flex min-w-0 flex-1 items-center gap-3",taskIcon:"flex h-7 w-7 items-center justify-center rounded-lg shadow-sm transition-transform group-hover:scale-110",taskInfo:"min-w-0 flex-1",taskTitle:"truncate font-semibold text-slate-700",taskMeta:"mt-1 flex items-center gap-3 text-xs text-slate-500",taskActions:"ml-2 flex items-center gap-1",taskPriorityTag:"border px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wide"},T={circleIcon:"h-7 w-7 bg-slate-50 text-slate-400",complete:"hover:bg-green-500 hover:text-white",view:"hover:bg-orange-500 hover:text-white",delete:"hover:bg-red-500 hover:text-white",refresh:"text-slate-400 hover:text-orange-600",viewAll:"rounded-lg bg-white/50 px-2 py-1 text-xs font-medium hover:text-blue-600"},z={container:"grid shrink-0 grid-cols-2 gap-3",card:"glass-card glass-border glass-shadow glass-highlight flex cursor-pointer items-center gap-3 rounded-[2rem] p-3 transition-colors hover:bg-white/60",iconContainer:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl text-lg",content:"min-w-0",label:"truncate text-[10px] font-bold uppercase text-slate-400",value:"mt-0.5 text-lg font-bold leading-none text-slate-800"},y={container:"group relative flex min-h-[140px] flex-1 items-center overflow-hidden border-0 !bg-gradient-to-br from-orange-400 to-amber-300 p-0 shadow-lg",background:"pointer-events-none absolute inset-0 opacity-20",leftContent:"relative z-10 flex h-full w-[60%] flex-col justify-center py-4 pl-8 pr-2",iconContainer:"flex h-6 w-6 items-center justify-center rounded-lg bg-white/20 shadow-sm backdrop-blur-sm",label:"text-[10px] font-bold uppercase tracking-widest text-white/90",title:"mb-4 whitespace-nowrap text-lg font-bold leading-tight text-white drop-shadow-sm",button:"flex w-fit items-center gap-2 rounded-full bg-white px-6 py-2.5 text-sm font-bold text-amber-600 shadow-md shadow-orange-900/10 transition-all hover:scale-105 hover:shadow-lg",buttonIcon:"text-base text-amber-400 transition-transform group-hover:rotate-12",imageContainer:"pointer-events-none absolute bottom-0 right-[-10px] top-0 z-20 flex w-[45%] items-center justify-center",image:"h-full w-full object-contain"},v={field:"space-y-4",label:"mb-1 text-sm text-slate-400",value:"text-base text-slate-700",titleValue:"text-lg font-bold text-slate-800",actions:"flex gap-2 pt-4"},ue={class:"animate-fade-in flex h-full w-full gap-5 px-5 py-5"},pe={class:"flex h-full w-[60%] flex-none flex-col gap-5"},ge={class:"relative z-10 flex items-start justify-between"},xe=["onClick"],fe={key:1,class:"space-y-2"},me=["onClick"],ve={key:0},be={key:1},he={class:"flex h-full w-[40%] flex-none flex-col gap-5",style:{"padding-right":"1.25rem"}},ye={class:"relative z-10 mb-2 flex items-start justify-between"},we={class:"flex min-h-0 flex-1 flex-col gap-4"},ke={class:"mb-2 flex items-center gap-2"},Ce={key:0},_e={key:1},Te="/images/Image_robot.png",Ie=R({__name:"index",setup(_){const g=S([{id:1,title:"大堂地面湿滑",location:"1F 大堂",priority:"P0",status:"pending",createTime:"09:15",assignee:"张工"},{id:2,title:"人员超限 (>200)",location:"3F 洗手间",priority:"P0",status:"pending",createTime:"09:30",assignee:"李工"},{id:3,title:"补充纸巾",location:"2F 贵宾室",priority:"P1",status:"pending",createTime:"10:05",assignee:"王工"},{id:4,title:"传感器离线",location:"B1 停车场",priority:"P1",status:"pending",createTime:"10:20",assignee:"赵工"},{id:5,title:"垃圾桶满溢",location:"1F 出口闸机",priority:"P2",status:"pending",createTime:"10:45",assignee:"钱工"},{id:6,title:"通道受阻",location:"3F 楼梯间",priority:"P1",status:"pending",createTime:"11:00",assignee:"孙工"},{id:7,title:"灯光闪烁",location:"2F 走廊",priority:"P2",status:"pending",createTime:"11:15",assignee:"周工"}]),f=[{time:"09:00",value:120},{time:"10:00",value:180},{time:"11:00",value:250},{time:"12:00",value:190},{time:"13:00",value:150},{time:"14:00",value:210},{time:"15:00",value:310},{time:"16:00",value:280},{time:"17:00",value:350},{time:"18:00",value:200}],I=[{time:"09:00",value:5},{time:"10:00",value:12},{time:"11:00",value:8},{time:"12:00",value:15},{time:"13:00",value:24},{time:"14:00",value:18},{time:"15:00",value:28},{time:"16:00",value:22},{time:"17:00",value:14}],P=[{label:"在岗人员",value:"12/15",icon:"ant-design:user-outlined",color:"indigo"},{label:"待处理",value:"5",icon:"ant-design:file-text-outlined",color:"orange"},{label:"平均响应",value:"3.2m",icon:"ant-design:thunderbolt-outlined",color:"teal"},{label:"满意度",value:"85%",icon:"ant-design:bar-chart-outlined",color:"pink"}],m=S("all"),$=S(!1),c=S(null),b=S(!1),E=M(()=>{let i=g.value;return m.value!=="all"&&(i=i.filter(s=>s.priority===m.value)),$.value||(i=i.filter(s=>s.status!=="completed")),i}),X=M(()=>K({xAxisData:f.map(i=>i.time),yAxisData:f.map(i=>i.value),seriesName:"客流",lineColor:"#FFA00A",areaColor:["rgba(255, 160, 10, 0.25)","rgba(255, 160, 10, 0.15)","rgba(255, 160, 10, 0)"],yAxisFormatter:i=>i>=1e3?`${(i/1e3).toFixed(1)}k`:i.toString()})),Y=M(()=>K({xAxisData:I.map(i=>i.time),yAxisData:I.map(i=>i.value),seriesName:"工单",lineColor:"#3B82F6",areaColor:["rgba(59, 130, 246, 0.25)","rgba(59, 130, 246, 0.15)","rgba(59, 130, 246, 0)"]}));function U(i){const s=g.value.find(a=>a.id===i);s&&(s.status="completed",A.success(`任务"${s.title}"已完成`))}function W(i){c.value=i,b.value=!0}function G(i){Q.confirm({title:"确认删除",content:"确定要删除这个任务吗?",onOk(){const s=g.value.findIndex(a=>a.id===i);s!==-1&&(g.value.splice(s,1),A.success("任务已删除"))}})}function Z(){A.loading("刷新中...",.5),setTimeout(()=>{A.success("刷新成功")},500)}function ee(i){A.info(`查看${i.label}详情`)}function te(i){m.value=i}function F(i){const s={P0:{color:"red",bg:"bg-red-50",border:"border-red-100",text:"text-red-600"},P1:{color:"orange",bg:"bg-orange-50",border:"border-orange-100",text:"text-orange-600"},P2:{color:"slate",bg:"bg-slate-50",border:"border-slate-100",text:"text-slate-600"}};return s[i]||s.P2}function J(i,s){var w;return((w={indigo:{bg:"bg-indigo-50",text:"text-indigo-500"},orange:{bg:"bg-orange-50",text:"text-orange-500"},teal:{bg:"bg-teal-50",text:"text-teal-500"},pink:{bg:"bg-pink-50",text:"text-pink-500"}}[i])==null?void 0:w[s])||""}return(i,s)=>(u(),d("div",ue,[l("div",pe,[o(e(L),{class:"relative flex h-[35%] flex-col overflow-hidden p-6"},{default:n(()=>[l("div",ge,[l("div",{class:t(e(C).container)},[l("h3",{class:t(e(C).title)},"实时客流监测",2),l("div",{class:t(e(C).numberContainer)},[l("span",{class:t(e(C).largeNumber)},"2,450",2),o(e(N),{color:"success",class:t(`text-xs font-bold ${e(B).tag}`)},{default:n(()=>[...s[5]||(s[5]=[h("+12%",-1)])]),_:1},8,["class"])],2),l("p",{class:t(e(C).description)},"预计高峰时间: 14:00",2)],2),o(e(k),{type:"text",shape:"circle",class:t(e(T).refresh),onClick:Z},{icon:n(()=>[o(e(x),{icon:"ant-design:more-outlined",class:"text-base"})]),_:1},8,["class"])]),o(e(H),{options:X.value,opacity:.6},null,8,["options"])]),_:1}),o(e(L),{class:t(e(r).card)},{default:n(()=>[l("div",{class:t(e(r).header)},[l("h3",{class:t(e(r).title)},[l("span",{class:t(e(r).titleDot)},null,2),s[6]||(s[6]=h(" 紧急待办事项 ",-1))],2),o(e(le),null,{overlay:n(()=>[l("div",{class:t(e(r).filterMenu)},[(u(),d(O,null,V([{label:"全部",value:"all"},{label:"P0 紧急",value:"P0"},{label:"P1 重要",value:"P1"},{label:"P2 普通",value:"P2"}],a=>l("div",{key:a.value,class:t([e(r).filterMenuItem,m.value===a.value&&e(r).filterMenuItemActive]),onClick:w=>te(a.value)},p(a.label),11,xe)),64))],2)]),default:n(()=>[o(e(k),{type:"text",size:"small",class:t(e(r).filterButton)},{default:n(()=>[s[7]||(s[7]=h(" 筛选 ",-1)),o(e(x),{icon:"ant-design:filter-outlined",class:"ml-1 text-xs"})]),_:1},8,["class"])]),_:1})],2),l("div",{class:t(e(r).listContainer)},[E.value.length===0?(u(),d("div",{key:0,class:t(e(r).emptyState)},[l("div",{class:t(e(r).emptyContent)},[o(e(x),{icon:"ant-design:check-circle-outlined",class:t(e(r).emptyIcon)},null,8,["class"]),s[8]||(s[8]=l("p",null,"暂无待办任务",-1))],2)],2)):(u(),d("div",fe,[(u(!0),d(O,null,V(E.value,a=>(u(),d("div",{key:a.id,class:t(e(r).taskItem),onClick:w=>W(a)},[l("div",{class:t(e(r).taskContent)},[l("div",{class:t(e(r).taskLeft)},[l("div",{class:t([e(r).taskIcon,F(a.priority).bg])},[o(e(x),{icon:"ant-design:clock-circle-outlined",class:t(["text-xs",[F(a.priority).text]])},null,8,["class"])],2),l("div",{class:t(e(r).taskInfo)},[l("div",{class:t(e(r).taskTitle)},p(a.title),3),l("div",{class:t(e(r).taskMeta)},[l("span",null,p(a.location),1),a.createTime?(u(),d("span",ve,"• "+p(a.createTime),1)):D("",!0),a.assignee?(u(),d("span",be,"• "+p(a.assignee),1)):D("",!0)],2)],2),o(e(N),{color:F(a.priority).color,class:t([e(r).taskPriorityTag,F(a.priority).border])},{default:n(()=>[h(p(a.priority),1)]),_:2},1032,["color","class"])],2),l("div",{class:t(e(r).taskActions)},[o(e(k),{type:"text",size:"small",shape:"circle",class:t([e(T).circleIcon,e(T).complete]),onClick:j(w=>U(a.id),["stop"])},{icon:n(()=>[o(e(x),{icon:"ant-design:check-circle-outlined",class:"text-xs"})]),_:1},8,["class","onClick"]),o(e(k),{type:"text",size:"small",shape:"circle",class:t([e(T).circleIcon,e(T).view]),onClick:j(w=>W(a),["stop"])},{icon:n(()=>[o(e(x),{icon:"ant-design:eye-outlined",class:"text-xs"})]),_:1},8,["class","onClick"]),o(e(k),{type:"text",size:"small",shape:"circle",class:t([e(T).circleIcon,e(T).delete]),onClick:j(w=>G(a.id),["stop"])},{icon:n(()=>[o(e(x),{icon:"ant-design:delete-outlined",class:"text-xs"})]),_:1},8,["class","onClick"])],2)],2)],10,me))),128))]))],2)]),_:1},8,["class"])]),l("div",he,[o(e(L),{class:"relative flex h-[35%] flex-col overflow-hidden p-6"},{default:n(()=>[l("div",ye,[l("div",{class:t(e(C).container)},[l("h3",{class:t(e(C).title)},"工单趋势分析",2),l("div",{class:t(e(C).numberContainer)},[l("span",{class:t(e(C).largeNumber)},"89",2),o(e(N),{color:"processing",class:t(`text-xs font-bold ${e(B).tag}`)},{default:n(()=>[...s[9]||(s[9]=[h("+5 新增",-1)])]),_:1},8,["class"])],2)],2),o(e(k),{type:"text",size:"small",class:t(e(T).viewAll),onClick:s[0]||(s[0]=a=>e(A).info("查看全部工单"))},{default:n(()=>[...s[10]||(s[10]=[h(" 查看全部 ",-1)])]),_:1},8,["class"])]),o(e(H),{options:Y.value,opacity:.6},null,8,["options"])]),_:1}),l("div",we,[l("div",{class:t(e(z).container)},[(u(),d(O,null,V(P,(a,w)=>o(e(L),{key:w,class:t(e(z).card),onClick:$e=>ee(a)},{default:n(()=>[l("div",{class:t([e(z).iconContainer,J(a.color,"bg"),J(a.color,"text")])},[o(e(x),{icon:a.icon,class:"text-lg"},null,8,["icon"])],2),l("div",{class:t(e(z).content)},[l("p",{class:t(e(z).label)},p(a.label),3),l("p",{class:t(e(z).value)},p(a.value),3)],2)]),_:2},1032,["class","onClick"])),64))],2),o(e(L),{class:t(e(y).container)},{default:n(()=>[l("div",{class:t(e(y).background)},[...s[11]||(s[11]=[l("svg",{width:"100%",height:"100%"},[l("pattern",{id:"grid",x:"0",y:"0",width:"20",height:"20",patternUnits:"userSpaceOnUse"},[l("circle",{cx:"1",cy:"1",r:"1",fill:"white"})]),l("rect",{width:"100%",height:"100%",fill:"url(#grid)"}),l("path",{d:"M0,50 Q100,20 200,80 T400,50",fill:"none",stroke:"white","stroke-width":"1","stroke-opacity":"0.3"})],-1)])],2),l("div",{class:t(e(y).leftContent)},[l("div",ke,[l("span",{class:t(e(y).iconContainer)},[o(e(x),{icon:"ant-design:robot-outlined",class:"text-xs text-white"})],2),l("span",{class:t(e(y).label)},"AI Agent",2)]),l("h3",{class:t(e(y).title)},"需要我帮你做什么吗?",2),o(e(k),{type:"primary",class:t(e(y).button),onClick:s[1]||(s[1]=a=>e(A).info("打开AI助手"))},{default:n(()=>[s[12]||(s[12]=h(" 使用AI助手 ",-1)),o(e(x),{icon:"ant-design:robot-outlined",class:t(e(y).buttonIcon)},null,8,["class"])]),_:1},8,["class"])],2),l("div",{class:t(e(y).imageContainer)},[l("img",{src:Te,alt:"AI Robot",class:t(e(y).image)},null,2)],2)]),_:1},8,["class"])])]),o(e(Q),{open:b.value,"onUpdate:open":s[4]||(s[4]=a=>b.value=a),title:"任务详情",footer:null,width:"600px"},{default:n(()=>[c.value?(u(),d("div",{key:0,class:t(e(v).field)},[l("div",null,[l("div",{class:t(e(v).label)},"任务标题",2),l("div",{class:t(e(v).titleValue)},p(c.value.title),3)]),l("div",null,[l("div",{class:t(e(v).label)},"位置",2),l("div",{class:t(e(v).value)},p(c.value.location),3)]),l("div",null,[l("div",{class:t(e(v).label)},"优先级",2),o(e(N),{color:F(c.value.priority).color,class:"px-2 py-1 text-xs font-bold uppercase"},{default:n(()=>[h(p(c.value.priority),1)]),_:1},8,["color"])]),c.value.assignee?(u(),d("div",Ce,[l("div",{class:t(e(v).label)},"负责人",2),l("div",{class:t(e(v).value)},p(c.value.assignee),3)])):D("",!0),c.value.createTime?(u(),d("div",_e,[l("div",{class:t(e(v).label)},"创建时间",2),l("div",{class:t(e(v).value)},p(c.value.createTime),3)])):D("",!0),l("div",{class:t(e(v).actions)},[o(e(k),{type:"primary",onClick:s[2]||(s[2]=a=>{U(c.value.id),b.value=!1})},{icon:n(()=>[o(e(x),{icon:"ant-design:check-circle-outlined"})]),default:n(()=>[s[13]||(s[13]=h(" 标记完成 ",-1))]),_:1}),o(e(k),{danger:"",onClick:s[3]||(s[3]=a=>{G(c.value.id),b.value=!1})},{icon:n(()=>[o(e(x),{icon:"ant-design:delete-outlined"})]),default:n(()=>[s[14]||(s[14]=h(" 删除任务 ",-1))]),_:1})],2)],2)):D("",!0)]),_:1},8,["open"])]))}}),Se=se(Ie,[["__scopeId","data-v-2cc5b9c2"]]);export{Se as default};