WokerTask/public/admin/assets/edit copy.aa986f7c.js

2 lines
6.9 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{a3 as I,B as L,C as O,M as P,N as K,t as M,D as Q}from"./element-plus.b0ecf6ae.js";import{_ as $}from"./picker.1e645783.js";import{P as z}from"./index.3a572f9b.js";import{a as G}from"./useDictOptions.adeec031.js";import{b as H,c as J,d as W}from"./admin.daaa57de.js";import{r as X}from"./role.988dab1c.js";import{e as Y}from"./post.eb455df0.js";import{d as Z}from"./department.da4e2f9b.js";import{d as ee,s as C,r as oe,e as ue,$ as D,o as d,c as B,U as a,L as t,u,a as p,T as A,a7 as y,K as m,Q as k}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.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.489298c9.js";import"./index.vue_vue_type_script_setup_true_lang.ebbecf1a.js";import"./index.ba4432e6.js";import"./index.9e5a9063.js";import"./lodash.ffb5376d.js";import"./axios.f9df025a.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.073d2b63.js";import"./index.vue_vue_type_script_setup_true_lang.00eabce0.js";import"./usePaging.2ad8e1e6.js";import"./vue3-video-play.b911321b.js";import"./vuedraggable.884a7061.js";import"./vue.47d317a9.js";import"./sortablejs.263ac6c9.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";const le={class:"edit-popup"},ae=p("div",{class:"form-tips"},"\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A100*100px\uFF0C\u652F\u6301jpg\uFF0Cjpeg\uFF0Cpng\u683C\u5F0F",-1),te=p("div",{class:"form-tips"},"\u5141\u8BB8\u591A\u4EBA\u540C\u65F6\u5728\u7EBF\u767B\u5F55",-1),lo=ee({__name:"edit copy",emits:["success","close"],setup(re,{expose:x,emit:V}){const v=C(),n=C(),c=oe("add"),U=ue(()=>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}=G({role:{api:X},jobs:{api:Y},dept:{api:Z}}),j=async()=>{var s,e;await((s=v.value)==null?void 0:s.validate()),c.value=="edit"?await H(o):await J(o),(e=n.value)==null||e.close(),V("success")},R=(s="add")=>{var e;c.value=s,(e=n.value)==null||e.open()},q=async s=>{_.password=[],_.password_confirm=[{validator:E,trigger:"blur"}];const e=await W({id:s.id});for(const r in o)e[r]!=null&&e[r]!=null&&(o[r]=e[r])},N=()=>{V("close")};return x({open:R,setFormData:q}),(s,e)=>{const r=L,i=O,S=$,T=I,F=P,w=K,g=M,h=Q;return d(),B("div",le,[a(z,{ref_key:"popupRef",ref:n,title:u(U),async:!0,width:"550px",onConfirm:j,onClose:N},{default:t(()=>[a(h,{ref_key:"formRef",ref:v,model:u(o),"label-width":"84px",rules:u(_)},{default:t(()=>[a(i,{label:"\u8D26\u53F7",prop:"account"},{default:t(()=>[a(r,{modelValue:u(o).account,"onUpdate:modelValue":e[0]||(e[0]=l=>u(o).account=l),disabled:u(o).root==1,placeholder: