2 lines
7.6 KiB
JavaScript
2 lines
7.6 KiB
JavaScript
|
import{C as Q,D as W,a2 as $,N as G,O as H,a3 as J,t as K,F as M}from"./element-plus.ff90c99c.js";import{P as X}from"./index.37ed0e1b.js";import{a as Y}from"./useDictOptions.e92d912f.js";import{b as Z,c as ee,d as te}from"./admin.636b89e5.js";import{r as ae}from"./role.acae8faf.js";import{e as oe}from"./post.eae302f2.js";import{d as le}from"./department.8af7e53e.js";import{b as ue,c as re,d as se}from"./common.7646b996.js";import{d as ne,s as h,r as ie,b as de,$ as g,o as d,c,W as a,Q as u,u as l,F as b,a9 as y,P as _,T as pe,a as me}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./index.000b0758.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.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.79024f1a.js";const ce={class:"edit-popup"},_e=me("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),st=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")},k=(r="add")=>{var e;w.value=r,(e=B.value)==null||e.open()};function x(r){t.province=r,q(r)}function U(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])},P=()=>{v("close")};return D({open:k,setFormData:j}),(r,e)=>{const s=Q,n=W,i=$,f=G,F=H,T=J,I=K,z=M;return d(),c("div",ce,[a(X,{ref_key:"popupRef",ref:B,title:l(A),async:!0,width:"80%",onConfirm:O,onClose:P},{default:u(()=>[a(z,{ref_key
|