2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
|
import{B as K,C as M,a1 as Q,M as $,N as G,a2 as H,t as J,D as W}from"./element-plus.10e48c93.js";import{P as X}from"./index.49a85b68.js";import{a as Y}from"./useDictOptions.0cd6f35c.js";import{b as Z,c as ee,d as te}from"./admin.58b1f98e.js";import{r as ae}from"./role.3f54fcab.js";import{e as oe}from"./post.6a56529a.js";import{d as le}from"./department.5621ca90.js";import{b as ue,c as re,d as se}from"./common.4b5ff2d1.js";import{d as ne,s as h,r as ie,e as de,$ as g,o as d,c,U as a,L as u,u as l,T as b,a7 as y,K as _,Q as pe,a as me}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"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./index.8604d989.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.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";const ce={class:"edit-popup"},_e=me("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),lt=ne({__name:"edit copy 2",emits:["success","close"],setup(fe,{expose:D,emit:v}){const E=h(),B=h(),w=ie("add"),A=de(()=>w.value=="edit"?"\u7F16\u8F91\u7BA1\u7406\u5458":"\u65B0\u589E\u7BA1\u7406\u5458"),t=g({id:"",account:"",sex:1,id_card:"",name:"",province:"",city:"",area:"",street:"",address:"",phone:"",qualification:{id_card:"",car_card:"",bank_account:""},is_contract:0,dept_id:[],jobs_id:[],role_id:[],avatar:"",password:"",password_confirm:"",disable:0,multipoint_login:1,root:0}),p=g({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],dictTypeLists:[],contract_type:[]}),C=(r,e,s)=>{t.password&&(e||s(new Error("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801")),e!==t.password&&s(new Error("\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u4E0D\u4E00\u81F4!"))),s()},V=g({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:C,trigger:"blur"}]});Y({role:{api:ae},jobs:{api:oe},dept:{api:le}});const O=async()=>{var r,e;await((r=E.value)==null?void 0:r.validate()),w.value=="edit"?await Z(t):await ee(t),(e=B.value)==null||e.close(),v("success")},U=(r="add")=>{var e;w.value=r,(e=B.value)==null||e.open()};function k(r){t.province=r,q(r)}function x(r){t.city=r,S(r)}function L(r){t.area=r,N(r)}function R(r){t.street=r}const q=async r=>{const e=await ue({city:r});p.cityOptions=e},S=async r=>{const e=await re({area:r});p.areaOptions=e},N=async r=>{const e=await se({street:r});p.streetOptions=e},j=async r=>{V.password=[],V.password_confirm=[{validator:C,trigger:"blur"}];const e=await te({id:r.id});for(const s in t)e[s]!=null&&e[s]!=null&&(t[s]=e[s])},T=()=>{v("close")};return D({open:U,setFormData:j}),(r,e)=>{const s=K,n=M,i=Q,f=$,F=G,I=H,P=J,z=W;return d(),c("div",ce,[a(X,{ref_key:"popupRef",ref:B,title:l(A),async:!0,width:"80%",onConfirm:O,onClose:T},{default:u(()=>[a(z,{ref_key:"formRef",ref:E,model:l(t),"label-width":"84px",rules:l(V)},{default:u(()=>[_e,a(i,{span:24,class:"p
|