| 1 |
- var l=(h,b,n)=>new Promise((u,d)=>{var a=o=>{try{i(n.next(o))}catch(r){d(r)}},f=o=>{try{i(n.throw(o))}catch(r){d(r)}},i=o=>o.done?u(o.value):Promise.resolve(o.value).then(a,f);i((n=n.apply(h,b)).next())});import{a as R,B as V}from"./index-670a4efc.js";import{d as z,e as L,Z as N,r as g,aa as S,aZ as A,o as _,q as w,y,af as O,g as E,f as s,ao as F,dh as K,v as Z,m as j,w as q,bf as P,t as C,z as $,ab as D,bz as G,j as H}from"./index-d3600154.js";import{a as J}from"./data-0d932164.js";import{u as Q,B as U}from"./useTable-edbb899b.js";import{T as W}from"./TableAction-00b6be52.js";import"./TableImg.vue_vue_type_style_index_0_lang-652ccd09.js";import{l as X}from"./index-89c06ea2.js";import{e as Y,f as tt}from"./customerApi-56cea804.js";import"./validate-122b42a7.js";import"./useForm-d916f71d.js";import"./index-87d6eb60.js";import"./useWindowSizeFn-89902ab2.js";import"./index-ad3d032c.js";import"./index-2e69b74a.js";import"./index-b06c40a8.js";import"./uuid-98bbe2a6.js";import"./download-c8c6e0d3.js";import"./XTUpload.vue_vue_type_style_index_0_scoped_61a00cd1_lang-e5e6c9c7.js";import"./uniqBy-2d445bc4.js";import"./index-fa5e3d7c.js";import"./useContentViewHeight-ee38db3f.js";import"./componentMap-e709b4e7.js";import"./clickOutside-53868c41.js";import"./sortable.esm-4ae27e0b.js";import"./SettingOutlined-22b7deed.js";import"./RedoOutlined-8977b36a.js";import"./index-06ce4386.js";const et={class:"!pl-8"},at={key:0},ot=z({__name:"formDrawer",emits:["success","register"],setup(h){const b=L(()=>"投诉记录"),n=N({}),u=[{key:"complaint",dictCode:"client_complaint"}],d="67%",a=g([]),f=g(""),{createMessage:i}=G(),[o,{setTableData:r,getDataSource:v}]=Q({rowKey:"id",dataSource:a.value,titleLined:!0,autoCreateKey:!0,columns:J,showIndexColumn:!0,bordered:!0,striped:!1,pagination:!0,actionColumn:{width:60,title:"操作",dataIndex:"action"}}),[k,{closeDrawer:x}]=R(t=>l(this,null,function*(){t.record.id,f.value=t.record.id,yield B(t.record.id)}));S(()=>l(this,null,function*(){const t=yield X(u.map(e=>e.dictCode));for(const e in t){const m=u.filter(c=>c.dictCode==e)[0];n[m.key]=t[e]}}));function B(t){return l(this,null,function*(){const e=yield Y(t);a.value=e||[],yield r(a.value),yield D()})}function T(){return l(this,null,function*(){var e;a.value.unshift({content:null,type:null,complaintBy:null,complaintMobile:null,complaintTime:null,handleTime:null,handleResult:null}),r(a.value),yield D();const t=v()[0];(e=t.onEdit)==null||e.call(t,!0)})}function I(t){return l(this,null,function*(){const m=v().findIndex(p=>p.key===t.key);(yield[t==null?void 0:t.key])?(a.value.splice(m,1),r(a.value),i.success("删除成功!")):i.error("删除失败!")})}function M(){return l(this,null,function*(){if(a.value&&a.value.length>0){const t={clientId:f.value,source:a.value};(yield tt(t))?(i.success("登记成功!"),x()):i.error("登记失败!")}})}return(t,e)=>{const m=A("auth");return _(),w(s(V),$(t.$attrs,{destroyOnClose:"",onRegister:s(k),title:s(b),width:d,onOk:M,showFooter:!0}),{default:y(()=>[O("div",et,[E(s(U),{onRegister:s(o)},{toolbar:y(()=>[F((_(),w(s(K),{onClick:T,preIcon:"icon-plus|iconfont",class:"mr-2 btn-text"},{default:y(()=>[Z("投诉登记")]),_:1})),[[m,["lab:clientComplaint:add"]]])]),bodyCell:y(({column:c,record:p})=>[c.key==="type"&&p.type?(_(),j("span",at,q(s(P)(n.complaint,p.type)),1)):C("",!0),c.key==="action"?(_(),w(s(W),{key:1,actions:[{auth:"lab:clientComplaint:add",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",popConfirm:{title:"是否取消删除",placement:"left",confirm:I.bind(null,p,c)}}]},null,8,["actions"])):C("",!0)]),_:1},8,["onRegister"])])]),_:1},16,["onRegister","title"])}}});const zt=H(ot,[["__scopeId","data-v-17b90288"]]);export{zt as default};
|