2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
|
import{B as L,C as O,a3 as P,M as K,N as M,t as Q,D as $}from"./element-plus.9c2fdfa8.js";import{_ as z}from"./picker.5ad7fc14.js";import{P as G}from"./index.3fc23cf2.js";import{a as H}from"./useDictOptions.773276bb.js";import{b as J,c as W,d as X}from"./admin.bb6f7166.js";import{r as Y}from"./role.38f9c5c3.js";import{e as Z}from"./post.e99bb110.js";import{d as ee}from"./department.e3fb3938.js";import{d as oe,s as C,r as ue,e as le,$ as D,o as d,c as B,U as t,L as a,u,a as p,T as A,a7 as y,K as m,Q as k}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.a9321345.js";import"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import"./index.b370dd86.js";import"./index.b57b84f0.js";import"./lodash.5512e984.js";import"./axios.92474d72.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./index.06c1697f.js";import"./index.vue_vue_type_script_setup_true_lang.aa03e8e3.js";import"./usePaging.c22e2b6f.js";import"./vue3-video-play.65ddc377.js";import"./vuedraggable.c7bbafb5.js";import"./vue.a327c52f.js";import"./sortablejs.cb65aecb.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const te={class:"edit-popup"},ae=p("div",{class:"form-tips"},"\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A100*100px\uFF0C\u652F\u6301jpg\uFF0Cjpeg\uFF0Cpng\u683C\u5F0F",-1),re=p("div",{class:"form-tips"},"\u5141\u8BB8\u591A\u4EBA\u540C\u65F6\u5728\u7EBF\u767B\u5F55",-1),io=oe({__name:"edit copy",emits:["success","close"],setup(ie,{expose:x,emit:U}){const V=U,v=C(),n=C(),c=ue("add"),j=le(()=>c.value=="edit"?"\u7F16\u8F91\u7BA1\u7406\u5458":"\u5458"),o=D({id:"",account:"",name:"",dept_id:[],jobs_id:[],role_id:[],avatar:"",password:"",password_confirm:"",disable:0,multipoint_login:1,root:0}),E=(s,e,r)=>{o.password&&(e||r(new Error("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801")),e!==o.password&&r(new Error("\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u4E0D\u4E00\u81F4!"))),r()},_=D({account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7",trigger:["blur"]}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0",trigger:["blur"]}],role_id:[{type:"array",required:!0,message:"\u8BF7\u9009\u62E9\u89D2\u8272",trigger:["blur"]}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:["blur"]}],password_confirm:[{required:!0,message:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801",trigger:["blur"]},{validator:E,trigger:"blur"}]}),{optionsData:f}=H({role:{api:Y},jobs:{api:Z},dept:{api:ee}}),R=async()=>{var s,e;await((s=v.value)==null?void 0:s.validate()),c.value=="edit"?await J(o):await W(o),(e=n.value)==null||e.close(),V("success")},q=(s="add")=>{var e;c.value=s,(e=n.value)==null||e.open()},N=async s=>{_.password=[],_.password_confirm=[{validator:E,trigger:"blur"}];const e=await X({id:s.id});for(const r in o)e[r]!=null&&e[r]!=null&&(o[r]=e[r])},S=()=>{V("close")};return x({open:q,setFormData:N}),(s,e)=>{const r=L,i=O,T=z,h=P,F=K,w=M,g=Q,I=$;return d(),B("div",te,[t(G,{ref_key:"popupRef",ref:n,title:u(j),async:!0,width:"550px",onConfirm:R,onClose:S},{default:a(()=>[t(I,{ref_key:"formRef",ref:v,model:u(o),"label-width":"84px",rules:u(_)},{default:a(()=>[t(i,{label:"\u8D26\u53F7",prop:"account"},{default:a(()=>[t(r,{modelValue:u(o)
|