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-BYcXwl4U.js";import{i as b,c as g}from"./app-a6cKceqE.js";import{_ as y}from"./app-BsFusN7_.js";import{L as v}from"./app-W_y7sflh.js";import{_ as c}from"./app-BqeukU67.js";import{N as x}from"./app-DCd54JMo.js";import{N as m}from"./app-CabATHnR.js";import{_ as N}from"./app-uhTxLRnQ.js";import"./app-CJCAnMrx.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-ysQ8KbGS.js";import"./app-BDgR0DSb.js";import"./app-Cc2zXvHs.js";import"./app-DPDEogA0.js";import"./app-aSafd0Me.js";import"./app-BHl80pFw.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DxjODhok.js";import"./app-BhzV4gWo.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-D3zbrzdO.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};
