import{o as a,g as n,b as r,L as f,u as e,w as s,c as v,h as d,F as h,D as y,a as l,f as o,t as u,n as k,i as b}from"./app-BYcXwl4U.js";import{i as g,c as C}from"./app-a6cKceqE.js";import{_ as x}from"./app-BsFusN7_.js";import{C as L}from"./app-Biqm6MNM.js";import{C as m}from"./app-C14NbwKQ.js";import{_ as N}from"./app-uhTxLRnQ.js";import{N as T}from"./app-DCd54JMo.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-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-D3zbrzdO.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";function w(){const{utils:p,Tea:t}=g(this);this.reply=function(c){p.popup("/tickets/ticket/createLogPopup?ticketId="+c,{callback:function(){p.successRefresh("保存成功")}})}}const $={class:"col-span-full"},M={__name:"CardDivider",setup(p){return(t,c)=>(a(),n("div",$,[r(f)]))}},R={key:0},V={key:1,class:"disabled"},B=["innerHTML"],H=l("h5",{class:"group-header"},"工单回复",-1),D={key:1},I={class:"ui table selectable"},j={class:"log-header"},F={key:0},U=l("i",{class:"icon secret user"},null,-1),z={key:1,class:"grey"},E=["innerHTML"],P={key:1,class:"disabled"},_t={__name:"index",setup(p){const t=C(new w);let c=t.fromURL;return(c==null||c.length==0)&&(c="/tickets?status="+t.ticket.status),(S,_)=>(a(),n(h,null,[r(T,{"disable-spacing":"","content-name":e(t).ticket.subject,"parent-items":[["工单列表",e(c)]]},null,8,["content-name","parent-items"]),r(L,null,{default:s(()=>[r(m,null,{name:s(()=>[o("工单标题")]),value:s(()=>[o(u(e(t).ticket.subject),1)]),_:1}),r(m,null,{name:s(()=>[o("最后操作时间")]),value:s(()=>[o(u(e(t).ticket.lastLogTime),1)]),_:1}),r(m,null,{name:s(()=>[o("分类")]),value:s(()=>[e(t).ticket.category!=null?(a(),n("span",R,u(e(t).ticket.category.name),1)):(a(),n("span",V,"-"))]),_:1}),r(m,null,{name:s(()=>[o("状态")]),value:s(()=>[l("span",{class:k({olive:e(t).ticket.status=="none",green:e(t).ticket.status=="solved",red:e(t).ticket.status=="closed"})},u(e(t).ticket.statusName),3)]),_:1}),r(m,null,{name:s(()=>[o("操作")]),value:s(()=>[l("a",{href:"",onClick:_[0]||(_[0]=b(i=>e(t).reply(e(t).ticket.id),["prevent"]))},"[回复]")]),_:1}),r(M),r(m,{full:""},{name:s(()=>[o("工单内容")]),value:s(()=>[l("div",{innerHTML:e(t).ticket.body},null,8,B)]),_:1})]),_:1}),H,e(t).logs.length==0?(a(),v(N,{key:0},{default:s(()=>[o("暂时还没有回复。")]),_:1})):d("",!0),e(t).logs.length>0?(a(),n("div",D,[(a(!0),n(h,null,y(e(t).logs,i=>(a(),n("table",I,[l("thead",null,[l("tr",null,[l("th",j,[i.adminId>0?(a(),n("span",F,[U,o(" 管理员 ")])):d("",!0),i.userId>0?(a(),n("span",z," 自己 ")):d("",!0),o(" @ "+u(i.createdTime)+"   |   ",1),i.statusName.length>0?(a(),n("span",{key:2,class:k({olive:i.status=="none",green:i.status=="solved",red:i.status=="closed"})},u(i.statusName),3)):d("",!0)])])]),l("tbody",null,[l("tr",null,[l("td",null,[i.comment.length>0?(a(),n("div",{key:0,innerHTML:i.comment},null,8,E)):(a(),n("span",P,"没有内容"))])])])]))),256)),r(x,{data:e(t).page},null,8,["data"])])):d("",!0)],64))}};export{_t as default};
