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-SC54XQDl.js";import{i as g,c as C}from"./app-Ba7ZqSpq.js";import{_ as x}from"./app-DZcB_Zcx.js";import{C as L}from"./app-BjiVQlSS.js";import{C as m}from"./app-Bt2pXSov.js";import{_ as N}from"./app-D9UgVOV0.js";import{N as T}from"./app-CL60OiIv.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-C28obFWS.js";import"./app-CkINxBL9.js";import"./app--Lj8zATS.js";import"./app-C2mBgI5Z.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";import"./app-Dhl-Bw0H.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};
