2 lines
5.5 KiB
JavaScript
2 lines
5.5 KiB
JavaScript
import{G as Q,B as z,w as H,N as J,C as O,P as W,Q as X,R as Y}from"./element-plus.7c44eb82.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.feaef646.js";import{f as ee,a as te}from"./index.d29d6ba7.js";import{u as oe}from"./usePaging.160b82b8.js";import{u as ae}from"./useDictOptions.46bf12ec.js";import{d as le,a as V,e as se}from"./custom_contacts.5fc619bc.js";import"./lodash.f060c5ce.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_customContactsEdit_lang.dbbe1fee.js";import{_ as ie}from"./detail.vue_vue_type_style_index_0_lang.970c5ce4.js";import{d as A,s as x,r as E,$ as ue,af as re,o as i,c as me,U as e,L as o,M as _,u as r,K as m,R as $,a as R,k as pe,S as c,n as y}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.92e7f918.js";import"./dayjs.920ed704.js";import"./axios.fd7895df.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.89a2cd6d.js";import"./color.f7f12e1b.js";import"./clone.3f99ce25.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.7ca60bdd.js";import"./ms.a9ae1d6d.js";import"./nprogress.2d805d1c.js";import"./vue-clipboard3.f9b015dd.js";import"./clipboard.84da4513.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./index.94c662da.js";import"./index.vue_vue_type_script_setup_true_lang.bd776be8.js";import"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import"./custom.d0fbb84a.js";const ce=c("\u67E5\u8BE2"),de=c("\u91CD\u7F6E"),_e=c(" \u65B0\u589E "),fe=c(" \u5220\u9664 "),ve={class:"mt-4"},Ce=c(" \u7F16\u8F91 "),he=c(" \u5220\u9664 "),we=c(" \u8BE6\u60C5 "),ke={class:"flex mt-4 justify-end"},be=A({name:"customContactsLists"}),ct=A({...be,setup(De){const k=x(),C=x(),h=E(!1),b=E(!1),d=ue({custom_id:"",name:"",position:"",phone:"",telephone:"",email:"",notes:"",annex:"",status:""}),D=E([]),P=l=>{D.value=l.map(({id:t})=>t)},{dictData:L}=ae(""),{pager:f,getLists:w,resetParams:N,resetPage:S}=oe({fetchFun:le,params:d}),T=async()=>{var l;h.value=!0,await y(),(l=C.value)==null||l.open("add")},U=async l=>{var u,s;let t=await V({id:l.id});h.value=!0,await y(),(u=C.value)==null||u.open("edit"),(s=C.value)==null||s.setFormData(t)},B=async l=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:l}),w()},I=async l=>{var u,s;let t=await V({id:l.id});b.value=!0,await y(),(u=k.value)==null||u.open(),(s=k.value)==null||s.setFormData(t)};return w(),(l,t)=>{const u=Q,s=z,p=H,j=J,F=O,q=te,n=W,G=X,K=Z,v=re("perms"),M=Y;return i(),me("div",null,[e(F,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(j,{class:"mb-[-16px]",model:d,inline:""},{default:o(()=>[e(s,{label:"\u59D3\u540D",prop:"name"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:d.name,"onUpdate:modelValue":t[0]||(t[0]=a=>d.name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u624B\u673A",prop:"phone"},{default:o(()=>[e(u,{class:"w-[280px]",modelValue:d.phone,"onUpdate:modelValue":t[1]||(t[1]=a=>d.phone=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A"},null,8,["modelValue"])]),_:1}),e(s,null,{default:o(()=>[e(p,{type:"primary",onClick:r(S)},{default:o(()=>[ce]),_:1},8,["onClick"]),e(p,{onClick:r(N)},{default:o(()=>[de]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(F,{class:"!border-none",shadow:"never"},{default:o(()=>[_((i(),m(p,{type:"primary",onClick:T},{icon:o(()=>[e(q,{name:"el-icon-Plus"})]),default:o(()=>[_e]),_:1})),[[v,["custom.custom_contacts/add"]]]),_((i(),m(p,{disabled:!D.value.length,onClick:t[2]||(t[2]=a=>B(D.value))},{default:o(()=>[fe]),_:1},8,["disabled"])),[[v,["custom.custom_contacts/delete"]]]),R("div",ve,[e(G,{data:r(f).lists,onSelectionChange:P},{default:o(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u7EC4\u7EC7",prop:"custom_id","show-overflow-tooltip":""}),e(n,{label:"\u59D3\u540D",prop:"name","show-overflow-tooltip":""}),e(n,{label:"\u804C\u4F4D",prop:"position","show-overflow-tooltip":""}),e(n,{label:"\u624B\u673A",prop:"phone","show-overflow-tooltip":""}),e(n,{label:"\u7535\u8BDD",prop:"telephone","show-overflow-tooltip":""}),e(n,{label:"\u90AE\u7BB1",prop:"email","show-overflow-tooltip":""}),e(n,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:o(({row:a})=>[_((i(),m(p,{type:"primary",link:"",onClick:g=>U(a)},{default:o(()=>[Ce]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/edit"]]]),_((i(),m(p,{type:"danger",link:"",onClick:g=>B(a.id)},{default:o(()=>[he]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/delete"]]]),_((i(),m(p,{link:"",onClick:g=>I(a)},{default:o(()=>[we]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/detail"]]])]),_:1})]),_:1},8,["data"])]),R("div",ke,[e(K,{modelValue:r(f),"onUpdate:modelValue":t[3]||(t[3]=a=>pe(f)?f.value=a:null),onChange:r(w)},null,8,["modelValue","onChange"])])]),_:1})),[[M,r(f).loading]]),h.value?(i(),m(ne,{key:0,ref_key:"editRef",ref:C,"dict-data":r(L),onSuccess:r(w),onClose:t[4]||(t[4]=a=>h.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),b.value?(i(),m(ie,{key:1,ref_key:"detailRef",ref:k,onClose:t[5]||(t[5]=a=>b.value=!1)},null,512)):$("",!0)])}}});export{ct as default};
|