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-SC54XQDl.js";import{i as b,c as g}from"./app-Ba7ZqSpq.js";import{_ as y}from"./app-DZcB_Zcx.js";import{L as v}from"./app-Crd12MWL.js";import{_ as c}from"./app-CWnUJ4gg.js";import{N as x}from"./app-CL60OiIv.js";import{N as m}from"./app-B2C_dtYI.js";import{_ as N}from"./app-D9UgVOV0.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-C8HFiBxn.js";import"./app-BjSCO7rC.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-Dhl-Bw0H.js";import"./app-COidJXl1.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app--Lj8zATS.js";import"./app-C2mBgI5Z.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};
