engineering/public/admin/assets/index.56b0162c.js
2024-03-04 15:04:21 +08:00

2 lines
6.0 KiB
JavaScript

import{I as G,y as H,w as J,D as K,C as Q,L as W,M as X,N as Y}from"./element-plus.258bf9e7.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as ee,a as oe}from"./index.ec401e3b.js";import{u as te}from"./usePaging.f6660143.js";import{u as ae}from"./useDictOptions.c644f395.js";import{a as le,b as V,e as se}from"./custom_contacts.b7c66382.js";import"./lodash.1d82ee7c.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_customContactsEdit_lang.12392039.js";import ie from"./detail.09dd75a0.js";import{d as L,s as x,r as F,a0 as ue,ai as me,o as u,c as re,V as e,M as t,O as _,u as r,L as p,S as A,a as $,k as pe,T as d,n as E}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";import"./index.vue_vue_type_script_setup_true_lang.291052e3.js";import"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import"./custom.13e75d58.js";import"./index.a7758114.js";const ce=d("\u67E5\u8BE2"),de=d("\u91CD\u7F6E"),_e=d(" \u65B0\u589E "),fe=d(" \u5220\u9664 "),ve={class:"mt-4"},Ce=d(" \u7F16\u8F91 "),he=d(" \u5220\u9664 "),we=d(" \u8BE6\u60C5 "),be={class:"flex mt-4 justify-end"},De=L({name:"customContactsLists"}),_o=L({...De,setup(ke){const b=x(),C=x(),h=F(!1),D=F(!1),m=ue({custom_id:"",custom_name:"",name:"",position:"",phone:"",telephone:"",email:"",notes:"",annex:"",status:""}),k=F([]),P=s=>{k.value=s.map(({id:o})=>o)},{dictData:R}=ae(""),{pager:f,getLists:w,resetParams:N,resetPage:S}=te({fetchFun:le,params:m}),T=async()=>{var s;h.value=!0,await E(),(s=C.value)==null||s.open("add")},U=async s=>{var i,n;let o=await V({id:s.id});h.value=!0,await E(),(i=C.value)==null||i.open("edit"),(n=C.value)==null||n.setFormData(o)},B=async s=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:s}),w()},I=async s=>{var i,n;let o=await V({id:s.id});D.value=!0,await E(),(i=b.value)==null||i.open(),(n=b.value)==null||n.setFormData(o)};return w(),(s,o)=>{const i=G,n=H,c=J,M=K,y=Q,j=oe,l=W,q=X,O=Z,v=me("perms"),z=Y;return u(),re("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(M,{class:"mb-[-16px]",model:m,inline:""},{default:t(()=>[e(n,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name"},{default:t(()=>[e(i,{class:"w-[280px]",modelValue:m.custom_name,"onUpdate:modelValue":o[0]||(o[0]=a=>m.custom_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u59D3\u540D",prop:"name"},{default:t(()=>[e(i,{class:"w-[280px]",modelValue:m.name,"onUpdate:modelValue":o[1]||(o[1]=a=>m.name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u624B\u673A",prop:"phone"},{default:t(()=>[e(i,{class:"w-[280px]",modelValue:m.phone,"onUpdate:modelValue":o[2]||(o[2]=a=>m.phone=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A"},null,8,["modelValue"])]),_:1}),e(n,null,{default:t(()=>[e(c,{type:"primary",onClick:r(S)},{default:t(()=>[ce]),_:1},8,["onClick"]),e(c,{onClick:r(N)},{default:t(()=>[de]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),p(y,{class:"!border-none",shadow:"never"},{default:t(()=>[_((u(),p(c,{type:"primary",onClick:T},{icon:t(()=>[e(j,{name:"el-icon-Plus"})]),default:t(()=>[_e]),_:1})),[[v,["custom.custom_contacts/add"]]]),_((u(),p(c,{disabled:!k.value.length,onClick:o[3]||(o[3]=a=>B(k.value))},{default:t(()=>[fe]),_:1},8,["disabled"])),[[v,["custom.custom_contacts/delete"]]]),$("div",ve,[e(q,{data:r(f).lists,onSelectionChange:P},{default:t(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(l,{label:"\u7EC4\u7EC7",prop:"org_name","show-overflow-tooltip":""}),e(l,{label:"\u90E8\u95E8",prop:"dept_name","show-overflow-tooltip":""}),e(l,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name","show-overflow-tooltip":""}),e(l,{label:"\u59D3\u540D",prop:"name","show-overflow-tooltip":""}),e(l,{label:"\u804C\u4F4D",prop:"position","show-overflow-tooltip":""}),e(l,{label:"\u624B\u673A",prop:"phone","show-overflow-tooltip":""}),e(l,{label:"\u7535\u8BDD",prop:"telephone","show-overflow-tooltip":""}),e(l,{label:"\u90AE\u7BB1",prop:"email","show-overflow-tooltip":""}),e(l,{label:"\u5907\u6CE8",prop:"notes","show-overflow-tooltip":""}),e(l,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:a})=>[_((u(),p(c,{type:"primary",link:"",onClick:g=>U(a)},{default:t(()=>[Ce]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/edit"]]]),_((u(),p(c,{type:"danger",link:"",onClick:g=>B(a.id)},{default:t(()=>[he]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/delete"]]]),_((u(),p(c,{link:"",onClick:g=>I(a)},{default:t(()=>[we]),_:2},1032,["onClick"])),[[v,["custom.custom_contacts/detail"]]])]),_:1})]),_:1},8,["data"])]),$("div",be,[e(O,{modelValue:r(f),"onUpdate:modelValue":o[4]||(o[4]=a=>pe(f)?f.value=a:null),onChange:r(w)},null,8,["modelValue","onChange"])])]),_:1})),[[z,r(f).loading]]),h.value?(u(),p(ne,{key:0,ref_key:"editRef",ref:C,"dict-data":r(R),onSuccess:r(w),onClose:o[5]||(o[5]=a=>h.value=!1)},null,8,["dict-data","onSuccess"])):A("",!0),D.value?(u(),p(ie,{key:1,ref_key:"detailRef",ref:b,onClose:o[6]||(o[6]=a=>D.value=!1)},null,512)):A("",!0)])}}});export{_o as default};