import{S as e,G as a,C as l,L as t,M as o,D as i,y as s,Q as d,R as n,v as r}from"./element-plus-DSMJnpwa.js";import{d as p}from"./index-mv7arXuk.js";import{_ as m}from"./index-CY3mI-ZB.js";/* empty css                    *//* empty css                        */import{_ as u}from"./index-ppR_FSA-.js";/* empty css               *//* empty css                *//* empty css                     *//* empty css                  */import{_ as c}from"./index-9_f6rNAP.js";import{B as v,g as f,a4 as h,aE as g,m as b,ah as _,H as y,L as x,M as j,O as N,V as w,P as I,u as C,F as k,ab as V,I as P,ao as S,Y as U,_ as q,$ as D,d as R,l as z}from"./vue-vendor-DZekML78.js";import{l as F}from"./index-BoOYLMmI.js";import{l as M}from"./index-owI_ozJS.js";import"./utils-cPVb2Haz.js";const A={class:"h-full p-2 flex flex-col"},B={class:"mb-[10px]"},L=v({name:"Complaint"}),Q=p(v({...L,setup(p){const{proxy:v}=f(),{com_complaint_status:L}=h(v?.useDict("com_complaint_status")),Q=R([]),E=R(!0),G=R(!0),H=R([]),J=R(!0),K=R(!0),O=R(0),T=R(),W=z({form:{id:void 0,typeId:void 0,problemDes:void 0,complaintName:void 0,phone:void 0,problemIamgeUrl:void 0,status:void 0,handleId:void 0,handleName:void 0,handleContent:void 0},queryParams:{pageNum:1,pageSize:10,typeId:void 0,problemDes:void 0,complaintName:void 0,phone:void 0,problemIamgeUrl:void 0,status:void 0,handleId:void 0,handleName:void 0,handleContent:void 0,params:{}},rules:{id:[{required:!0,message:"投诉管理表id不能为空",trigger:"blur"}]}}),{queryParams:Y,form:$,rules:X}=h(W),Z=R([]),ee=async()=>{E.value=!0;const e=await M();Z.value=e.rows;const a=await F(Y.value);Q.value=a.rows,O.value=a.total,E.value=!1},ae=()=>{Y.value.pageNum=1,ee()},le=()=>{T.value?.resetFields(),ae()},te=e=>{H.value=e.map(e=>e.id),J.value=1!=e.length,K.value=!e.length},oe=g();return b(()=>{ee()}),(p,f)=>{const h=c,g=o,b=t,R=l,z=i,F=s,M=a,H=e,J=n,K=u,W=d,$=m,X=_("hasPermi"),ie=r;return y(),x("div",A,[j(h,{title:"投诉管理"}),j(D,{"enter-active-class":C(v)?.animate.searchAnimate.enter,"leave-active-class":C(v)?.animate.searchAnimate.leave},{default:N(()=>[w(I("div",B,[j(H,{shadow:"hover"},{default:N(()=>[j(M,{ref_key:"queryFormRef",ref:T,"label-width":"120px",model:C(Y),inline:!0},{default:N(()=>[j(R,{label:"投诉类型",prop:"typeId"},{default:N(()=>[j(b,{modelValue:C(Y).typeId,"onUpdate:modelValue":f[0]||(f[0]=e=>C(Y).typeId=e),placeholder:"请选择投诉类型",style:{width:"240px"}},{default:N(()=>[(y(!0),x(k,null,V(C(Z),e=>(y(),P(g,{disabled:"1"===e.status,key:e.id,label:e.name,value:e.id},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),j(R,{label:"投诉人姓名",prop:"complaintName"},{default:N(()=>[j(z,{modelValue:C(Y).complaintName,"onUpdate:modelValue":f[1]||(f[1]=e=>C(Y).complaintName=e),placeholder:"请输入投诉人姓名",clearable:"",onKeyup:S(ae,["enter"])},null,8,["modelValue"])]),_:1}),j(R,null,{default:N(()=>[j(F,{type:"primary",icon:"Search",onClick:ae},{default:N(()=>[...f[4]||(f[4]=[U("搜索",-1)])]),_:1}),j(F,{icon:"Refresh",onClick:le},{default:N(()=>[...f[5]||(f[5]=[U("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})],512),[[q,C(G)]])]),_:1},8,["enter-active-class","leave-active-class"]),j(H,{class:"flex-1",shadow:"never"},{default:N(()=>[w((y(),P(W,{border:"",data:C(Q),onSelectionChange:te},{default:N(()=>[j(J,{type:"selection",width:"55",align:"center"}),j(J,{label:"投诉类型",align:"center",prop:"typeName"}),j(J,{label:"问题描述",align:"center",prop:"problemDes"}),j(J,{label:"投诉人姓名",align:"center",prop:"complaintName"}),j(J,{label:"手机号",align:"center",prop:"phone"}),j(J,{label:"投诉时间",align:"center",prop:"createTime"}),j(J,{label:"投诉状态",align:"center",prop:"status"},{default:N(e=>[j(K,{options:C(L),value:e.row.status},null,8,["options","value"])]),_:1}),j(J,{label:"操作",align:"center",fixed:"right","class-name":"small-padding fixed-width"},{default:N(e=>[w((y(),P(F,{link:"",type:"primary",onClick:a=>(async e=>{oe.push({path:"/repair/complainMain",query:{id:e.id}})})(e.row)},{default:N(()=>[...f[6]||(f[6]=[U("查看详情",-1)])]),_:1},8,["onClick"])),[[X,["complaint:complaint:edit"]]])]),_:1})]),_:1},8,["data"])),[[ie,C(E)]]),w(j($,{total:C(O),page:C(Y).pageNum,"onUpdate:page":f[2]||(f[2]=e=>C(Y).pageNum=e),limit:C(Y).pageSize,"onUpdate:limit":f[3]||(f[3]=e=>C(Y).pageSize=e),onPagination:ee},null,8,["total","page","limit"]),[[q,C(O)>0]])]),_:1})])}}}),[["__scopeId","data-v-ca0e0cb4"]]);export{Q as default};
