import{o as r,g as i,b as e,w as s,u as o,c as _,h as u,F as f,f as l,t as n,i as h,a as d,n as k}from"./app-DnroACXc.js";import{i as b,c as g}from"./app-DckefXYL.js";import{_ as y}from"./app-CjXr3cCY.js";import{L as v}from"./app-DM6WPmnv.js";import{_ as c}from"./app-KcnMuQGX.js";import{N as x}from"./app-C9iVkiu5.js";import{N as m}from"./app-CUPmXIij.js";import{_ as N}from"./app-DezwSKU9.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";import"./app-BtWF1kMA.js";import"./app-B0NrURRk.js";import"./app-CGj1gg44.js";import"./app-B4bUdtyo.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-Co2SIBzr.js";import"./app-Cu6FD8m8.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-Cmxxk_WX.js";import"./app-B09rlSqG.js";function L(){const{utils:p}=b(this);this.createTicket=function(){p.popup("/tickets/createPopup",{callback:function(){p.successRefresh("保存成功")}})}}const C={key:1},T=["href"],R={key:0},w=d("i",{class:"icon secret user"},null,-1),z={key:1,class:"grey"},B={key:0},U={key:1,class:"disabled"},V=["href"],ut={__name:"index",setup(p){const a=g(new L);return($,F)=>(r(),i(f,null,[e(x,{"active-tab":o(a).status},{tabs:s(()=>[e(m,{href:"/tickets?status=none",value:"none"},{name:s(()=>[l(" 进行中("+n(o(a).countNewTickets)+") ",1)]),_:1}),e(m,{href:"/tickets?status=solved",value:"solved",name:"已解决"}),e(m,{href:"/tickets?status=closed",value:"closed",name:"已关闭"}),e(m,{separator:""}),e(m,{static:"",onClick:h(o(a).createTicket,["prevent"]),"action-create":"",name:"提交工单"},null,8,["onClick"])]),_:1},8,["active-tab"]),o(a).tickets.length==0?(r(),_(N,{key:0,"disable-spacing":""},{default:s(()=>[l("暂时还没有工单。")]),_:1})):u("",!0),o(a).tickets.length>0?(r(),i("div",C,[e(v,{items:o(a).tickets},{default:s(()=>[e(c,{header:"工单标题",class:"title-column",frozen:""},{body:s(({data:t})=>[d("a",{href:"/tickets/ticket?ticketId="+t.id+"&fromURL="+o(a).currentURL},n(t.subject),9,T)]),_:1}),e(c,{header:"最后操作时间",class:"datetime-column"},{body:s(({data:t})=>[l(n(t.lastLogTime),1)]),_:1}),e(c,{header:"最后操作人",class:"user-column"},{body:s(({data:t})=>[t.latestLog!=null&&t.latestLog.admin!=null?(r(),i("span",R,[w,l(" 管理员 ")])):(r(),i("span",z,"自己"))]),_:1}),e(c,{header:"分类",class:"name-column"},{body:s(({data:t})=>[t.category!=null?(r(),i("span",B,n(t.category.name),1)):(r(),i("span",U,"-"))]),_:1}),e(c,{header:"状态",class:"fixed-status-column"},{body:s(({data:t})=>[d("span",{class:k({olive:t.status=="none",green:t.status=="solved",red:t.status=="closed"})},n(t.statusName),3)]),_:1}),e(c,{header:"操作",class:"one op",frozen:"","align-frozen":"right"},{body:s(({data:t})=>[d("a",{href:"/tickets/ticket?ticketId="+t.id+"&fromURL="+o(a).currentURL},"详情",8,V)]),_:1})]),_:1},8,["items"]),e(y,{data:o(a).page},null,8,["data"])])):u("",!0)],64))}};export{ut as default};
