mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
var b=Object.defineProperty,j=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var w=(s,t,e)=>t in s?b(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,f=(s,t)=>{for(var e in t||(t={}))h.call(t,e)&&w(s,e,t[e]);if(u)for(var e of u(t))y.call(t,e)&&w(s,e,t[e]);return s},D=(s,t)=>j(s,L(t));var v=(s,t)=>{var e={};for(var r in s)h.call(s,r)&&t.indexOf(r)<0&&(e[r]=s[r]);if(s!=null&&u)for(var r of u(s))t.indexOf(r)<0&&y.call(s,r)&&(e[r]=s[r]);return e};var g=(s,t,e)=>new Promise((r,n)=>{var p=a=>{try{c(e.next(a))}catch(m){n(m)}},l=a=>{try{c(e.throw(a))}catch(m){n(m)}},c=a=>a.done?r(a.value):Promise.resolve(a.value).then(p,l);c((e=e.apply(s,t)).next())});import{u as C,B as H}from"./useForm-322569b9.js";import{f as I}from"./schema-86a5e5c4.js";import{a as M,B as O}from"./index-922f0b14.js";import{a as P,u as S}from"./regionApi-ad45a6bd.js";import{j as T}from"./antd-fb8ca017.js";import{d as U,f as B,c as V,u as i,Z as A,a4 as E,a5 as G,k as N,a9 as W}from"./vue-08ef39cb.js";import{_ as Z}from"./index.js";import"./index-9a268806.js";import"./useWindowSizeFn-40274562.js";import"./copyTextToClipboard-bf4926ca.js";const $=U({__name:"drawer",emits:["success","register"],setup(s,{emit:t}){const e=t,r=B(!0),n=B(),[p,{resetFields:l,setFieldsValue:c,validate:a}]=C({labelWidth:60,schemas:I,showActionButtonGroup:!1}),[m,{setDrawerProps:_,closeDrawer:F}]=M(o=>g(this,null,function*(){yield l(),_({confirmLoading:!1}),r.value=!!(o!=null&&o.isUpdate),n.value=o==null?void 0:o.record,i(r)&&(yield c(f({},o.record)))})),x=V(()=>i(r)?"编辑":"新增");function R(){return g(this,null,function*(){try{const o=yield a();_({confirmLoading:!0});const d=v(o,[]),k=i(r)?S:P,Y=i(r)?Object.assign({},D(f(f({},i(n)),d),{updateTime:T().format("YYYY-MM-DD HH:mm:ss")})):f({},d);yield k(Y),F(),e("success")}finally{_({confirmLoading:!1})}})}return(o,d)=>(A(),E(i(O),W(o.$attrs,{onRegister:i(m),showFooter:"",title:x.value,width:"600px",onOk:R}),{default:G(()=>[N(i(H),{onRegister:i(p),name:"EditForm"},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const ae=Z($,[["__scopeId","data-v-876102f7"]]);export{ae as default};
|