@qynpm/ui 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-pagination/index.cjs +1 -1
- package/dist/qy-pagination/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-BPnHycGa.cjs → index-5dxbpQb_.cjs} +1 -1
- package/dist/shared/{index-BhvOSOfi.mjs → index-Bh9hxVFh.mjs} +2 -2
- package/dist/shared/{index-DAztNKSp.cjs → index-BweLwi2_.cjs} +1 -1
- package/dist/shared/index-C4F8hXzQ.mjs +338 -0
- package/dist/shared/index-CmgTSaFS.cjs +1 -0
- package/dist/shared/{index-DXZ6Y6wd.mjs → index-DNnWRAFl.mjs} +1 -1
- package/dist/shared/index-afOuq3YX.cjs +1 -0
- package/dist/shared/{index-QewoB6N4.mjs → index-rjciSHaR.mjs} +4 -4
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXAUYDO7.mjs → index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs} +62 -60
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +1 -0
- package/package.json +2 -3
- package/dist/shared/index-DuP-b_eY.cjs +0 -1
- package/dist/shared/index-d76Z3yrB.cjs +0 -1
- package/dist/shared/index-zo5J-y0C.mjs +0 -157
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Da67JRFL.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-5dxbpQb_.cjs");exports.default=e.QyRecordQuoteSearch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-5dxbpQb_.cjs");exports.default=e.QyRemarkImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-5dxbpQb_.cjs");exports.default=e.QyRemoteSelect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-5dxbpQb_.cjs");exports.default=e.QySearchInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../shared/index-5dxbpQb_.cjs");exports.default=e.QySelectionDialog;
|
package/dist/qy-upload/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../shared/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../shared/index-afOuq3YX.cjs"),t=require("../shared/install-c8il9DQv.cjs"),e=t.withInstall(l.Upload,"QyUpload");exports.QyUpload=e;exports.default=e;
|
package/dist/qy-upload/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const re=require("./index.vue_vue_type_style_index_0_lang-Da67JRFL.cjs"),de=require("./index-d76Z3yrB.cjs"),Dt=require("./index-DRugp8x0.cjs"),zt=require("./index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs"),e=require("vue"),Q=require("element-plus"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ot=require("./index-Bq9quq2D.cjs"),Kt=require("./index-rSrDnOpu.cjs"),Mt=require("./index-HNFq7v-A.cjs"),Lt=require("./index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs"),Ut=require("./index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs"),jt=require("./index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs"),Wt=require("./index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs"),Gt=require("./index-DKw-seoh.cjs"),Ht=require("./index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs"),Jt=require("./index-CVYNG8Fc.cjs"),Zt=require("./index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs"),Xt=require("./index-gMrQlV5n.cjs"),Yt=require("./index-MyDDX-zj.cjs"),en=require("./index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs"),ye=require("./index-DTbGlDqr.cjs"),qt=require("./index-CnVhquq5.cjs"),tn=require("element-plus"),ie=require("./index-DiEag4sK.cjs"),nn=require("./index-DAztNKSp.cjs"),on=require("./index-D27mwR57.cjs"),an=require("./index.vue_vue_type_script_lang-DMrpLmWN.cjs"),ln=require("./index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs"),rn=require("./index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs"),cn=require("./index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs"),sn=require("./index.vue_vue_type_style_index_0_lang-B2thgQml.cjs"),un=require("./index.vue_vue_type_script_setup_true_lang-BWi3g3mb.cjs"),dn=require("./index.vue_vue_type_script_setup_true_lang-4KZSABSM.cjs"),yn=require("./index.vue_vue_type_style_index_0_lang-D9DraThL.cjs"),fn=require("./index.vue_vue_type_script_lang-DLmUPDR5.cjs"),mn=require("./index.vue_vue_type_script_lang-D42aRlO2.cjs"),pn=require("./index.vue_vue_type_script_lang-BO9Ju_i0.cjs"),gn=require("./index-Mj7JZt7y.cjs"),$t=require("./index-CUlhX6fW.cjs"),hn=require("./index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs"),vn=require("./index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs"),wn=require("./index.vue_vue_type_script_lang-CCL57H5c.cjs"),Qn=require("./index.vue_vue_type_script_lang-CKZUcaZ5.cjs"),_n=require("./index.vue_vue_type_script_lang-BgapsQjI.cjs"),bn=require("./index.vue_vue_type_script_lang-8AT3-xU-.cjs"),kn=require("./index.vue_vue_type_script_lang-By3jd4gw.cjs"),Sn=require("./index.vue_vue_type_script_lang-CIOi2ahp.cjs"),Cn=require("./index.vue_vue_type_script_lang-DpSaB5eg.cjs"),xn=require("./index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs"),Bn=require("./index.vue_vue_type_script_setup_true_lang-DUEhuwGQ.cjs"),Vn=require("./index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs"),In=require("./index-EIFVul2W.cjs"),qn=require("./index.vue_vue_type_script_setup_true_lang-C96ZaggL.cjs"),$n=require("./index.vue_vue_type_script_lang-Bc3tktk9.cjs"),En=require("./index.vue_vue_type_script_lang-Cv4Pf58E.cjs"),Pn=require("./index.vue_vue_type_script_lang-CwrbII5c.cjs"),Tn=require("./index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs"),An=require("./index.vue_vue_type_script_setup_true_lang-Cr9PdvyR.cjs"),Nn=require("./index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs"),Fn=require("./index.vue_vue_type_script_lang-BkoqbceR.cjs"),Rn=require("./index.vue_vue_type_script_lang-CfjfZCT3.cjs"),Dn=require("./index.vue_vue_type_script_lang-WJ63_A7F.cjs"),zn=require("./index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs"),On=require("./index-DuP-b_eY.cjs"),d=require("./install-c8il9DQv.cjs"),ce=require("./index-Dvf1zJ7h.cjs"),Kn=require("./index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs"),Mn=require("./utils-BjEXwY3L.cjs"),Ln=require("@qynpm/hooks"),Un=Object.assign({name:"QyImageUpload",inheritAttrs:!1},{__name:"index",props:{modelValue:{type:[String,Array],default:""},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"files"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},mode:{type:String,default:"default"},voucher:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},isShowTip:{type:Boolean,default:!1},limit:{type:Number,default:void 0},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"128px"},disableDrag:{type:Boolean,default:!1},showPasteInput:{type:Boolean,default:!0},pastePlaceholder:{type:String,default:"粘贴图片上传"},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},uploadRequest:{type:Function,default:null}},emits:["update:modelValue","change","success","error","remove","updateImg"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=["jpg","jpeg","png","gif","bmp","webp"],y=e.computed(()=>n.voucher||n.mode==="voucher"),I=e.computed(()=>Array.isArray(n.modelValue)?n.modelValue.filter(Boolean):n.modelValue?String(n.modelValue).split(",").filter(Boolean):[]),w=e.computed(()=>n.supportVideo?1:y.value?n.limit??30:n.limit??(n.multiple?9:1)),T=e.computed(()=>{var o;return(o=n.fileType)!=null&&o.length?n.fileType:y.value&&!n.supportVideo?m:[]});function q(o){return Array.isArray(o)?o.filter(Boolean):[]}function C(o){const u=q(o);return n.multiple?u:u[0]||""}function A(o){c("update:modelValue",C(o))}function N(o){c("change",C(o==null?void 0:o.files))}function k(o){var K,r;if(typeof o=="string")return o;const u=o||{},E=u.url??u.urls??((K=u.data)==null?void 0:K.url)??((r=u.data)==null?void 0:r.urls)??"";return Array.isArray(E)?E[0]||"":E||""}function $(o){const u=k(o);u&&c("updateImg",u),c("success",v(),o)}function M(o){c("error",o)}function G(o,u){c("remove",o,u)}function D(){var o,u;(u=(o=b.value)==null?void 0:o.openFileDialog)==null||u.call(o)}function z(){var o,u;(u=(o=b.value)==null?void 0:o.clearFiles)==null||u.call(o)}function F(){var o,u;return((u=(o=b.value)==null?void 0:o.getPathList)==null?void 0:u.call(o))||[]}const L=e.computed(()=>F()),O=e.computed(()=>F());function g(){return F()}function v(){const o=F();return n.multiple?o:o[0]||""}return V({openFileDialog:D,clearFiles:z,getPathList:F,getFullPathList:g,fullPathList:L,pathList:O,getValue:v}),(o,u)=>(e.openBlock(),e.createBlock(de.Upload,e.mergeProps({ref_key:"uploadRef",ref:b},e.unref(j),{"model-value":I.value,"value-format":"array",api:t.api,name:t.name,multiple:t.multiple,disabled:t.disabled,"file-type":T.value,"file-size":t.fileSize,limit:w.value,"is-show-tip":t.isShowTip,"token-key":t.tokenKey,"support-video":t.supportVideo,size:t.size,"disable-drag":t.disableDrag,"call-back":t.callBack,"extra-data":t.extraData,"upload-request":t.uploadRequest,"show-text":!1,"show-paste-input":t.showPasteInput,"paste-placeholder":t.pastePlaceholder,"onUpdate:modelValue":A,onChange:N,onSuccess:$,onError:M,onRemove:G}),null,16,["model-value","api","name","multiple","disabled","file-type","file-size","limit","is-show-tip","token-key","support-video","size","disable-drag","call-back","extra-data","upload-request","show-paste-input","paste-placeholder"]))}});function se(t){const V=t==null?void 0:t.match(/(\[url\:(.*?)\])(.*)/);return V?{imageUrl:V[2],text:V[3]}:{imageUrl:"",text:t||""}}function Et(t){const V=String(t||"").match(/(\[url\:.*?\])([\s\S]*)/);return V?V[2]:t}function ue(t,V){return V?`[url:${V}]${t}`:t}const jn={class:"qy-remark-image__field"},Wn={key:1,class:"qy-remark-image__divider"},Gn={class:"qy-remark-image__upload-anchor"},Hn={key:0,class:"icon-[line-md--loading-twotone-loop]",role:"img","aria-hidden":"true"},Jn={key:1,class:"icon-[ion--cloud-upload-outline]",role:"img","aria-hidden":"true"},Zn={key:2,class:"icon-[ph--images-thin]",role:"img","aria-hidden":"true"},Xn={class:"qy-remark-image__popover"},Yn=["src"],eo={class:"qy-remark-image__popover-footer"},to=e.defineComponent({__name:"index",props:{defaultValue:{default:""},defaultImage:{default:""},rows:{default:6},width:{default:""},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"粘贴图片上传"},type:{default:"textarea"},layout:{default:"default"},selectValue:{type:[String,Number,Boolean],default:""},selectOptions:{default:()=>[]},selectDisabled:{type:Boolean,default:!1},api:{default:"/permission-api/common/uploads"},tokenKey:{default:"Admin-Token"},uploadName:{default:"files"},uploadRequest:{}},emits:["change","update:selectValue","select-change"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(""),y=e.ref(""),I=e.ref(!1),w=e.computed(()=>n.layout==="select-prefix"),T=e.computed(()=>({"qy-remark-image--select-prefix":w.value})),q=e.computed(()=>w.value||n.type==="text"?"text":"textarea"),C=e.computed(()=>{if(n.width)return{width:typeof n.width=="number"?`${n.width}px`:n.width}});e.watch(()=>n.defaultValue,g=>{const v=se(g||"");m.value=v.text,y.value=v.imageUrl||n.defaultImage||""},{immediate:!0}),e.watch(()=>n.defaultImage,g=>{g!==void 0&&!se(n.defaultValue||"").imageUrl&&(y.value=g||"")},{immediate:!0}),e.onMounted(()=>{e.nextTick(N)}),e.onUnmounted(()=>{const g=A();g&&g.removeEventListener("paste",D)});function A(){var g,v;return((g=b.value)==null?void 0:g.textarea)||((v=b.value)==null?void 0:v.input)||null}function N(){const g=A();g&&(g.removeEventListener("paste",D),g.addEventListener("paste",D))}function k(g){m.value=Et(g||"")}function $(g){c("update:selectValue",g),c("select-change",g)}function M(){y.value="",O()}function G(){m.value="",y.value="",O()}async function D(g){var u;const o=Array.from(((u=g.clipboardData)==null?void 0:u.files)||[]).find(E=>E.type.startsWith("image/"));o&&(g.preventDefault(),await z({file:o,onError:()=>{},onProgress:()=>{},onSuccess:()=>{}}))}async function z(g){var v,o;if(g.file.size>51200*1e3)return Q.ElMessage.error("图片过大"),!1;I.value=!0;try{const u=await F(g);return y.value=L(u),O(),Q.ElMessage.success("上传图片成功"),(v=g.onSuccess)==null||v.call(g,u),!0}catch(u){return(o=g.onError)==null||o.call(g,u),Q.ElMessage.error("上传失败"),!1}finally{I.value=!1}}async function F(g){const v=new FormData;if(v.append(n.uploadName,g.file),n.uploadRequest)return n.uploadRequest({file:g.file,formData:v,options:g,api:n.api,tokenKey:n.tokenKey});const o=de.api.get(n.tokenKey);return(await fetch(n.api,{method:"POST",body:v,credentials:"include",headers:o?{Authorization:`Bearer ${o}`}:void 0})).json()}function L(g){var u,E;if(typeof g=="string")return g;const v=g,o=(v==null?void 0:v.urls)??((u=v==null?void 0:v.data)==null?void 0:u.urls)??((E=v==null?void 0:v.data)==null?void 0:E.url)??(v==null?void 0:v.url)??"";return Array.isArray(o)?o[0]||"":o||""}function O(){c("change",ue(m.value||"",y.value||""),y.value||"")}return V({deleteImage:M,clearContent:G,getValue:()=>({text:m.value||"",imageUrl:y.value||"",value:ue(m.value||"",y.value||"")})}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-remark-image",T.value]),style:e.normalizeStyle(C.value)},[e.createElementVNode("div",jn,[w.value?(e.openBlock(),e.createBlock(e.unref(Q.ElSelect),{key:0,class:"qy-remark-image__prefix-select","model-value":t.selectValue,options:t.selectOptions,disabled:t.disabled||t.selectDisabled,size:"small","onUpdate:modelValue":$},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selectOptions,o=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:String(o.value),label:o.label,value:o.value,disabled:o.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","options","disabled"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("span",Wn)):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElInput),e.mergeProps({ref_key:"inputRef",ref:b,"model-value":m.value,type:q.value,rows:t.rows,autosize:t.autosize,disabled:t.disabled,placeholder:t.placeholder},e.unref(j),{"onUpdate:modelValue":k,onBlur:O}),null,16,["model-value","type","rows","autosize","disabled","placeholder"]),e.createVNode(e.unref(Q.ElPopover),{placement:"top-start",width:400,trigger:"hover",disabled:!y.value},{reference:e.withCtx(()=>[e.createElementVNode("div",Gn,[e.createVNode(e.unref(Q.ElUpload),{disabled:I.value||t.disabled,class:"qy-remark-image__upload","show-file-list":!1,"http-request":z},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createElementBlock("span",Hn)):y.value?(e.openBlock(),e.createElementBlock("span",Zn)):(e.openBlock(),e.createElementBlock("span",Jn))]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.createElementVNode("img",{src:y.value,class:"qy-remark-image__preview-img"},null,8,Yn),e.createElementVNode("div",eo,[v[1]||(v[1]=e.createElementVNode("span",{class:"qy-remark-image__popover-tip"},"再次点击按钮可更换图片",-1)),e.createVNode(e.unref(Q.ElButton),{link:"",size:"small",type:"danger",disabled:t.disabled,onClick:M},{default:e.withCtx(()=>[...v[0]||(v[0]=[e.createTextVNode(" 删除图片 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["disabled"])])],6))}}),no=te._export_sfc(to,[["__scopeId","data-v-db8a7397"]]),oo=e.defineComponent({name:"QyRemoteSelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Array,null],default:void 0},fetchMethod:{},defaultOptions:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},autoSelectSingle:{type:Boolean,default:!1},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},fitInputWidth:{type:Boolean,default:!0},popperClass:{default:""},debounce:{default:300},minLength:{default:1},remoteOnFocus:{type:Boolean,default:!1},remoteShowSuffix:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},reserveSelectedOption:{type:Boolean,default:!0},allowCreate:{type:Boolean,default:!1},commitOnBlur:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","visible-change","focus","blur","options-change","loading-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref([]),y=e.ref(new Map),I=e.ref(!1),w=e.ref(""),T=e.ref("");let q=0,C=null;const A=e.computed(()=>n.loading||I.value),N=e.ref(!1),k=e.computed(()=>w.value!==""),$=e.computed(()=>{if(k.value)return m.value;const s=new Map,P=a=>{s.set(M(a),a)};return n.defaultOptions.forEach(P),n.reserveSelectedOption&&y.value.forEach(a=>P(a)),m.value.forEach(P),Array.from(s.values())});e.watch(()=>n.defaultOptions,s=>{s.forEach(D)},{immediate:!0}),e.watch(()=>n.modelValue,()=>{$.value.forEach(D)},{immediate:!0});function M(s){return(s==null?void 0:s[n.valueKey])??(s==null?void 0:s.value)??(s==null?void 0:s.label)}function G(s){return Array.isArray(n.modelValue)?n.modelValue.includes(s):n.modelValue===s}function D(s){if(!n.reserveSelectedOption)return;const P=M(s);G(P)&&y.value.set(P,s)}function z(s){return n.disabled?!1:s?s.length>=n.minLength:n.remoteOnFocus}function F(s){I.value!==s&&(I.value=s,c("loading-change",s))}async function L(s){const P=W(s),a=++q;if(Z(P),!z(P)){m.value=[],F(!1),c("options-change",$.value);return}F(!0);try{const p=await n.fetchMethod(P);if(a!==q)return;m.value=Array.isArray(p)?p:[],m.value.forEach(D),c("options-change",$.value)}catch(p){if(a!==q)return;m.value=[],c("error",p),c("options-change",$.value)}finally{a===q&&F(!1)}}function O(){N.value||(N.value=!0,L(""))}function g(s){const P=W(s);T.value=P,q+=1,Z(P),C&&(clearTimeout(C),C=null),C=setTimeout(()=>{L(P)},n.debounce)}function v(){N.value=!0,L("")}function o(){L(w.value)}function u(s){T.value="",c("update:modelValue",s)}function E(s){T.value="",$.value.forEach(D),c("change",s)}function K(){T.value="",c("clear")}function r(s){s&&n.remoteOnFocus&&!w.value&&O(),c("visible-change",s)}function f(s){n.remoteOnFocus&&!w.value&&O(),c("focus",s)}function _(s){x(),c("blur",s)}function x(){if(!n.allowCreate||!n.commitOnBlur||n.disabled)return;const s=T.value;s.trim()&&(T.value="",c("update:modelValue",s),c("change",s))}function W(s){return String(s??"")}function Z(s){w.value=s,m.value=[],c("options-change",$.value)}function X(){var s,P;(P=(s=b.value)==null?void 0:s.focus)==null||P.call(s)}function ee(){var s,P;(P=(s=b.value)==null?void 0:s.blur)==null||P.call(s)}function oe(){c("update:modelValue",n.multiple?[]:""),c("clear")}return e.onBeforeUnmount(()=>{C&&clearTimeout(C)}),V({focus:X,blur:ee,clear:oe,retryFetch:o,fetchDefaultOptions:v}),(s,P)=>(e.openBlock(),e.createBlock(ye.Select,e.mergeProps({ref_key:"selectRef",ref:b},e.unref(j),{"model-value":t.modelValue,options:$.value,"label-key":t.labelKey,"value-key":t.valueKey,"disabled-key":t.disabledKey,placeholder:t.placeholder,disabled:t.disabled,clearable:t.clearable,filterable:!0,multiple:t.multiple,"collapse-tags":t.collapseTags,"collapse-tags-tooltip":t.collapseTagsTooltip,"auto-select-single":t.autoSelectSingle,size:t.size,teleported:t.teleported,"append-to":t.appendTo,"fit-input-width":t.fitInputWidth,"popper-class":t.popperClass,remote:"",debounce:0,"remote-show-suffix":t.remoteShowSuffix,"remote-method":g,loading:A.value,"onUpdate:modelValue":u,onChange:E,onClear:K,onVisibleChange:r,onFocus:f,onBlur:_}),e.createSlots({default:e.withCtx(()=>[s.$slots.default?e.renderSlot(s.$slots,"default",{},void 0,void 0,0):e.createCommentVNode("",!0)]),_:2},[s.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"prefix")]),key:"0"}:void 0,s.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),key:"1"}:void 0,s.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"loading")]),key:"2"}:void 0,s.$slots.tag?{name:"tag",fn:e.withCtx(a=>[e.renderSlot(s.$slots,"tag",e.normalizeProps(e.guardReactiveProps(a)))]),key:"3"}:void 0]),1040,["model-value","options","label-key","value-key","disabled-key","placeholder","disabled","clearable","multiple","collapse-tags","collapse-tags-tooltip","auto-select-single","size","teleported","append-to","fit-input-width","popper-class","remote-show-suffix","loading"]))}}),ao={class:"qy-search-input__item"},lo=["innerHTML"],ro={key:0,class:"qy-search-input__item-description"},io=e.defineComponent({name:"QySearchInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入搜索内容"},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"},clearable:{type:Boolean,default:!0},showButton:{type:Boolean,default:!0},buttonText:{default:"搜索"},buttonProps:{default:()=>({})},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},triggerOnFocus:{type:Boolean,default:!1},searchOnEnter:{type:Boolean,default:!0},searchOnSelect:{type:Boolean,default:!1},highlightKeyword:{type:Boolean,default:!0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},fitInputWidth:{type:Boolean,default:!0}},emits:["update:modelValue","search","clear","input","change","focus","blur","enter","select","visible-change","suggestions-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(q(n.modelValue)),y=e.computed(()=>q(n.modelValue)),I=e.computed(()=>["qy-search-input__popper",n.popperClass].filter(Boolean).join(" ")),w=e.computed(()=>q(n.modelValue)),T=e.ref("");e.watch(()=>n.modelValue,a=>{m.value=q(a)});function q(a){return a==null?"":String(a)}function C(a){return n.removeSpace?a.replace(/\s+/g,""):a}function A(a,p){return n.trimMode!==p?a:a.trim()}function N(a){return C(q(a))}function k(a){m.value=a,c("update:modelValue",a)}function $(a,p=""){return{...a,label:a.label||a.value,value:a.value||a.label,description:a.description||p}}function M(a=[]){return a.flatMap(p=>{if(Array.isArray(p.items)){const B=p;return B.items.map(H=>$(H,B.groupLabel))}return $(p)})}function G(a){const p=a.toLowerCase();return B=>[B.label,B.value,B.description].filter(Boolean).some(H=>String(H).toLowerCase().includes(p))}function D(a){return a?a.length>=n.minLength:n.triggerOnFocus}function z(a){c("suggestions-change",a),c("visible-change",a.length>0)}async function F(a){if(!D(a))return z([]),[];if(n.fetchSuggestionsMethod){const H=await new Promise(Y=>{var U;(U=n.fetchSuggestionsMethod)==null||U.call(n,a,le=>{Y(M(le))})});return z(H),H}if(n.fetchSuggestions){const H=await n.fetchSuggestions(a),Y=M(Array.isArray(H)?H:[]);return z(Y),Y}const p=M(n.suggestions),B=a?p.filter(G(a)):p;return z(B),B}async function L(a,p){T.value=a;try{const B=await F(a);p(B)}catch(B){c("error",B),z([]),p([])}}function O(){var a,p;T.value&&((p=(a=b.value)==null?void 0:a.getData)==null||p.call(a,T.value))}function g(a){const p=N(a);k(p)}function v(a){const p=N(a);m.value=p,c("input",p)}function o(a){const p=A(N(a),"change");p!==q(n.modelValue)&&k(p),c("change",p)}function u(a){c("focus",a)}function E(a){const p=A(m.value,"blur");p!==q(n.modelValue)&&k(p),c("blur",a),c("visible-change",!1)}function K(){m.value="",c("update:modelValue",""),c("clear"),z([])}function r(a){c("enter",a),n.searchOnEnter&&f()}function f(){c("search",q(n.modelValue))}function _(a){c("select",a),n.searchOnSelect&&c("search",a.value)}function x(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function W(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(a){const p=x(a||"");if(!n.highlightKeyword||!y.value)return p;const B=W(x(y.value));return B?p.replace(new RegExp(`(${B})`,"ig"),'<mark class="qy-search-input__mark">$1</mark>'):p}function X(){var a,p;(p=(a=b.value)==null?void 0:a.focus)==null||p.call(a)}function ee(){var a,p;(p=(a=b.value)==null?void 0:a.blur)==null||p.call(a)}function oe(){var a,p,B;(B=(p=(a=b.value)==null?void 0:a.inputRef)==null?void 0:p.select)==null||B.call(p)}function s(){var a,p;(p=(a=b.value)==null?void 0:a.clear)==null||p.call(a)}function P(){var a,p;(p=(a=b.value)==null?void 0:a.close)==null||p.call(a)}return V({focus:X,blur:ee,select:oe,clear:s,closePanel:P,retryFetch:O}),(a,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-search-input",{"is-disabled":t.disabled}])},[e.createVNode(e.unref(Q.ElAutocomplete),e.mergeProps({ref_key:"autocompleteRef",ref:b},e.unref(j),{"model-value":w.value,disabled:t.disabled,placeholder:t.placeholder,clearable:t.clearable,debounce:t.debounce,"fetch-suggestions":L,"trigger-on-focus":t.triggerOnFocus,teleported:t.teleported,"fit-input-width":t.fitInputWidth,"popper-class":I.value,"append-to":t.appendTo,"value-key":"value","onUpdate:modelValue":g,onInput:v,onChange:o,onFocus:u,onBlur:E,onClear:K,onSelect:_,onKeydown:e.withKeys(r,["enter"])}),e.createSlots({default:e.withCtx(({item:B})=>[e.renderSlot(a.$slots,"item",{item:B,keyword:y.value},()=>[e.createElementVNode("div",ao,[e.createElementVNode("div",{class:"qy-search-input__item-label",innerHTML:Z(B.label||B.value||"")},null,8,lo),B.description?(e.openBlock(),e.createElementBlock("div",ro,e.toDisplayString(B.description),1)):e.createCommentVNode("",!0)])],!0)]),_:2},[a.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,a.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,a.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prepend",{},void 0,!0)]),key:"2"}:void 0,a.$slots.append||t.showButton?{name:"append",fn:e.withCtx(()=>[a.$slots.append?e.renderSlot(a.$slots,"append",{},void 0,!0,0):(e.openBlock(),e.createBlock(e.unref(Q.ElButton),e.mergeProps({key:1},t.buttonProps,{loading:t.loading,disabled:t.disabled,onClick:f}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},16,["loading","disabled"]))]),key:"3"}:void 0]),1040,["model-value","disabled","placeholder","clearable","debounce","trigger-on-focus","teleported","fit-input-width","popper-class","append-to"])],2))}}),Pt=te._export_sfc(io,[["__scopeId","data-v-022788e1"]]),co={class:"qy-record-quote-search"},so={key:0,class:"qy-record-quote-search__header"},uo={key:0,class:"qy-record-quote-search__label"},yo={key:1,class:"qy-record-quote-search__description"},fo=e.defineComponent({name:"QyRecordQuoteSearch",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入报价单号"},buttonText:{default:"查询报价单"},autoNormalize:{type:Boolean,default:!0},showStatus:{type:Boolean,default:!0},status:{default:"default"},statusText:{default:""},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},searchOnSelect:{type:Boolean,default:!0},searchMethod:{type:[Function,null],default:null},extractMethod:{type:[Function,null],default:null},normalizeMethod:{type:[Function,null],default:null},label:{default:"报价单号"},description:{default:""},trimMode:{default:"blur"}},emits:["update:modelValue","search","clear","normalize","enter","select","error","success"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(!1),y=e.computed(()=>n.statusText||""),I=e.computed(()=>n.loading||m.value);function w(o){return o==null?"":String(o)}function T(o){const u=w(o).trim(),E=q(u),K=E.match(/BJ\d{8}[A-Z0-9]{4}/i);return K?K[0]:E}function q(o){return w(o).replace(/\s+/g,"").trim().toUpperCase()}function C(o){return n.extractMethod?n.extractMethod(o):T(o)}function A(o){return n.normalizeMethod?n.normalizeMethod(o):q(o)}function N(o,u){const E=w(o),K=C(E),r=n.autoNormalize?A(K):K;return c("normalize",{rawValue:E,code:r}),{rawValue:E,code:r,item:u}}function k(o){c("update:modelValue",o)}async function $(o){if(c("search",o),!!n.searchMethod){m.value=!0;try{const u=await n.searchMethod(o);c("success",u)}catch(u){c("error",u)}finally{m.value=!1}}}function M(o){const u=N(o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function G(){c("clear")}function D(o){c("enter",o)}function z(o){if(c("select",o),!n.searchOnSelect)return;const u=N(o.value,o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function F(o){c("error",o)}function L(){var o,u;(u=(o=b.value)==null?void 0:o.focus)==null||u.call(o)}function O(){var o,u;(u=(o=b.value)==null?void 0:o.blur)==null||u.call(o)}function g(){var o,u;(u=(o=b.value)==null?void 0:o.select)==null||u.call(o)}function v(){var o,u;(u=(o=b.value)==null?void 0:o.clear)==null||u.call(o)}return V({focus:L,blur:O,select:g,clear:v,extractQuoteOrderCode:C,normalizeQuoteOrderCode:A}),(o,u)=>(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(o.$slots,"label",{},()=>[t.label||t.description?(e.openBlock(),e.createElementBlock("div",so,[t.label?(e.openBlock(),e.createElementBlock("div",uo,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",yo,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0),e.createVNode(Pt,e.mergeProps({ref_key:"searchRef",ref:b},e.unref(j),{"model-value":t.modelValue,loading:I.value,disabled:t.disabled,placeholder:t.placeholder,"remove-space":!0,"trim-mode":t.trimMode,"button-text":t.buttonText,suggestions:t.suggestions,"fetch-suggestions":t.fetchSuggestions,"fetch-suggestions-method":t.fetchSuggestionsMethod,debounce:t.debounce,"min-length":t.minLength,"search-on-select":!1,"onUpdate:modelValue":k,onSearch:M,onClear:G,onEnter:D,onSelect:z,onError:F}),e.createSlots({_:2},[o.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,o.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,o.$slots.item?{name:"item",fn:e.withCtx(E=>[e.renderSlot(o.$slots,"item",e.normalizeProps(e.guardReactiveProps(E)),void 0,!0)]),key:"2"}:void 0,o.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"empty",{},void 0,!0)]),key:"3"}:void 0,o.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"loading",{},void 0,!0)]),key:"4"}:void 0]),1040,["model-value","loading","disabled","placeholder","trim-mode","button-text","suggestions","fetch-suggestions","fetch-suggestions-method","debounce","min-length"]),t.showStatus&&y.value?e.renderSlot(o.$slots,"status",{status:t.status,statusText:y.value},()=>[e.createElementVNode("div",{class:e.normalizeClass(["qy-record-quote-search__status",`is-${t.status}`])},e.toDisplayString(y.value),3)],!0,0):e.createCommentVNode("",!0)]))}}),mo=te._export_sfc(fo,[["__scopeId","data-v-b48667ff"]]),po={class:"qy-selection-dialog"},go={class:"qy-selection-dialog__main"},ho={key:0,class:"qy-selection-dialog__selected"},vo={class:"qy-selection-dialog__selected-tags"},wo={key:0,class:"qy-selection-dialog__selected-actions"},Qo={key:1,class:"qy-selection-dialog__search-row"},_o={key:0,class:"qy-selection-dialog__toolbar"},bo={key:2,class:"qy-selection-dialog__pagination"},ko={class:"qy-selection-dialog__paste-actions"},So=e.defineComponent({name:"QySelectionDialog",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},fetchMethod:{type:Function,default:void 0},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selectionMode:{default:void 0},selection:{default:"single"},selected:{default:()=>[]},rowKey:{default:"id"},mainKey:{default:void 0},labelKey:{default:"name"},tagName:{default:void 0},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},categoryOptions:{default:()=>[]},categoryFetchMethod:{type:[Function,null],default:null},type:{type:[Array,Boolean],default:!1},typeOptions:{default:()=>[]},typeSelectionProps:{default:()=>({})},typeSelectProps:{default:()=>({})},tableProps:{default:()=>({})},showSelected:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},showCopyPaste:{type:Boolean,default:!1},append:{type:Boolean,default:!1},showAppend:{type:Boolean,default:!1},pageSizes:{default:()=>[10,20,50,100]}},emits:["update:modelValue","selection-change","confirm","submit","cancel","close","append","loaded"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.useSlots(),m=e.getCurrentInstance(),y=e.ref(null),I=e.ref([]),w=e.ref([]),T=e.ref([]),q=e.ref(!1),C=e.ref(0),A=e.ref(!1),N=e.ref(""),k=e.reactive({category:[],type:"",page:1,pageSize:10,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),$=e.computed(()=>n.selectionMode?n.selectionMode:n.selection==="multi"?"multiple":n.selection),M=e.computed(()=>n.mainKey||n.rowKey),G=e.computed(()=>n.tagName||n.labelKey),D=e.computed(()=>n.typeOptions.length?n.typeOptions:n.type||[]),z=e.computed(()=>({...n.typeSelectionProps,...n.typeSelectProps})),F=e.computed(()=>n.tableProps||{}),L=e.computed(()=>n.showSearch||!!j["search-visible"]),O=e.computed(()=>n.showAppend||n.append),g=e.computed(()=>O.value||!!b.toolbar||!!b.bar),v=e.computed(()=>n.fetchMethod||n.query),o=e.computed(()=>u()?n.modelValue:n.selected);function u(){const l=(m==null?void 0:m.vnode.props)||{};return Object.prototype.hasOwnProperty.call(l,"modelValue")||Object.prototype.hasOwnProperty.call(l,"model-value")||Object.prototype.hasOwnProperty.call(l,"onUpdate:modelValue")}e.watch([()=>n.modelValue,()=>n.selected,()=>n.open],()=>{n.open&&(w.value=ne(o.value),B())},{immediate:!0,deep:!0}),e.watch([()=>n.categoryOptions,()=>n.category],l=>{if(Array.isArray(n.category)&&n.category.length){T.value=n.category;return}T.value=n.categoryOptions||[]},{immediate:!0}),e.watch(A,l=>{l||(N.value="")});async function E(){w.value=ne(o.value),await K(),await r(),B()}async function K(){const l=n.categoryFetchMethod||(typeof n.category=="function"?n.category:null);if(!l)return;const i=await l();T.value=X(i)}async function r(){if(v.value){q.value=!0;try{const l=await v.value(oe()),i=n.responseFormatter?await n.responseFormatter(l):l,{rows:S,total:h}=Z(i);return I.value=S,C.value=h,c("loaded",S),B(),i}finally{q.value=!1}}}function f(){return k.page=1,r()}function _(){return k.page=1,r()}function x(){return Object.assign(k,{category:[],type:"",page:1,pageSize:k.pageSize,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),r()}function W(){c("append")}function Z(l){if(Array.isArray(l))return{rows:l,total:l.length};const i=l==null?void 0:l.data;if(Array.isArray(i))return{rows:i,total:(l==null?void 0:l.total)??i.length};const S=(l==null?void 0:l.records)||(l==null?void 0:l.rows)||(i==null?void 0:i.records)||[],h=(l==null?void 0:l.total)??(i==null?void 0:i.total)??S.length;return{rows:S,total:h}}function X(l){const i=(l==null?void 0:l.data)??l;if(!Array.isArray(i))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(i);if(Array.isArray(n.categoryFormatter)){const[S,h]=n.categoryFormatter;return i.map(J=>({...J,label:J[S],value:J[h],children:Array.isArray(J.children)?ee(J.children,S,h):J.children}))}return i}function ee(l,i,S){return l.map(h=>({...h,label:h[i],value:h[S],children:Array.isArray(h.children)?ee(h.children,i,S):h.children}))}function oe(){const l={...n.queryParams,...k};return n.searchKey&&(l[n.searchKey]=String(l[n.searchKey]||"").trim()),l.category=s(),l}function s(){if(Object.prototype.hasOwnProperty.call(n.queryParams,"category"))return n.queryParams.category;const l=k.category;return Array.isArray(l)?l:l?[l]:[]}function P(l){var i,S;if($.value!=="none"){if($.value==="single"){w.value=[l],(i=y.value)==null||i.setCurrentRow(l),ae();return}H(l)&&((S=y.value)==null||S.toggleRowSelection(l,!Y(l)))}}function a(l){if($.value!=="multiple")return;const i=new Set(I.value.map(U)),S=new Set(l.map(U));w.value=w.value.filter(h=>!i.has(U(h))||S.has(U(h))),l.forEach(h=>{Y(h)||w.value.push(h)}),ae()}function p(l){var S,h;w.value=w.value.filter(J=>U(J)!==U(l));const i=I.value.find(J=>U(J)===U(l));i&&($.value==="multiple"?(S=y.value)==null||S.toggleRowSelection(i,!1):(h=y.value)==null||h.setCurrentRow()),ae()}function B(){e.nextTick(()=>{var l;if(y.value){if($.value==="single"){const[i]=w.value,S=I.value.find(h=>i&&U(h)===U(i));(l=y.value)==null||l.setCurrentRow(S);return}$.value==="multiple"&&I.value.forEach(i=>{var S;(S=y.value)==null||S.toggleRowSelection(i,Y(i))})}})}function H(l){var S;const i=(S=F.value)==null?void 0:S.selectable;return typeof i=="function"?i(l)!==!1:!0}function Y(l){return w.value.some(i=>U(i)===U(l))}function U(l){return It(l,M.value)}function le(l){return It(l,G.value)??U(l)}function It(l,i){if(!(!l||!i))return i.split(".").reduce((S,h)=>S==null?void 0:S[h],l)}function ae(){const l=ne(w.value);c("selection-change",l)}function At(){const l=ne(w.value);c("update:modelValue",l),c("confirm",l),c("submit",{selection:l,rows:l,query:{...k}})}function Nt(){w.value=ne(o.value),c("cancel"),c("close")}async function Ft(){var i;const l=JSON.stringify(w.value);await((i=navigator.clipboard)==null?void 0:i.writeText(l)),Q.ElMessage.success("复制成功")}function Rt(){try{const l=JSON.parse(N.value);if(!Array.isArray(l)){Q.ElMessage.error("粘贴内容需要是数组");return}l.forEach(i=>{Y(i)||w.value.push(i)}),A.value=!1,ae(),B()}catch(l){Q.ElMessage.error(`粘贴错误: ${(l==null?void 0:l.message)||"内容格式错误"}`)}}function ne(l=[]){return l.map(i=>({...i}))}return V({search:f,handleSearch:r,handleQuerySearch:f,resetSearch:x,getTableRef:()=>y.value,getTableData:()=>I.value,getSelection:()=>ne(w.value)}),(l,i)=>{const S=tn.ElLoadingDirective;return e.openBlock(),e.createBlock(re._sfc_main,{open:t.open,title:t.title,width:t.width,onOpened:E,onConfirm:At,onCancel:Nt},{default:e.withCtx(()=>[e.createElementVNode("div",po,[e.renderSlot(l.$slots,"side",{},void 0,!0),e.createElementVNode("div",go,[t.showSelected?(e.openBlock(),e.createElementBlock("div",ho,[i[12]||(i[12]=e.createElementVNode("span",{class:"qy-selection-dialog__selected-label"},"已选项",-1)),e.createElementVNode("div",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,h=>(e.openBlock(),e.createBlock(ie.Tag,{key:U(h),closable:"",class:"qy-selection-dialog__selected-tag",onClose:J=>p(h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(le(h)),1)]),_:2},1032,["onClose"]))),128)),w.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.Tag,{key:0,tone:"info"},{default:e.withCtx(()=>[...i[9]||(i[9]=[e.createTextVNode("无",-1)])]),_:1}))]),t.showCopyPaste?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:Ft},{default:e.withCtx(()=>[...i[10]||(i[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:i[0]||(i[0]=h=>A.value=!0)},{default:e.withCtx(()=>[...i[11]||(i[11]=[e.createTextVNode("粘贴",-1)])]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",Qo,[e.createVNode(e.unref(Q.ElForm),{class:"qy-selection-dialog__search",inline:"",model:k},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"search",{query:k,search:f,reset:x},()=>[T.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(qt.TreeSelect,{modelValue:k.category,"onUpdate:modelValue":i[1]||(i[1]=h=>k.category=h),class:"qy-selection-dialog__category",options:T.value,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:f},null,8,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),D.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(ye.Select,e.mergeProps({modelValue:k.type,"onUpdate:modelValue":i[2]||(i[2]=h=>k.type=h),class:"qy-selection-dialog__type",options:D.value,placeholder:"请选择类型",clearable:""},z.value,{onChange:f}),null,16,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:k[t.searchKey],"onUpdate:modelValue":i[3]||(i[3]=h=>k[t.searchKey]=h),clearable:"",placeholder:"请输入",class:"qy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(f,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:f},{default:e.withCtx(()=>[...i[13]||(i[13]=[e.createTextVNode("查询",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{onClick:x},{default:e.withCtx(()=>[...i[14]||(i[14]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})],!0)]),_:3},8,["model"]),g.value?(e.openBlock(),e.createElementBlock("div",_o,[O.value?(e.openBlock(),e.createBlock(e.unref(Q.ElButton),{key:0,type:"primary",onClick:W},{default:e.withCtx(()=>[...i[15]||(i[15]=[e.createTextVNode(" 新增 ",-1)])]),_:1})):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"toolbar",{query:k,search:f},void 0,!0),e.renderSlot(l.$slots,"bar",{query:k,search:f},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(Q.ElTable),e.mergeProps({ref_key:"tableRef",ref:y,data:I.value,"row-key":M.value,border:"","highlight-current-row":"","max-height":"550px"},F.value,{onSelectionChange:a,onRowClick:P}),{default:e.withCtx(()=>{var h;return[$.value==="multiple"?(e.openBlock(),e.createBlock(e.unref(Q.ElTableColumn),{key:0,type:"selection","reserve-selection":"",width:"42",selectable:(h=F.value)==null?void 0:h.selectable},null,8,["selectable"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"columns",{},void 0,!0),e.renderSlot(l.$slots,"cols",{},void 0,!0)]}),_:3},16,["data","row-key"])),[[S,q.value]]),t.showPagination&&C.value>0?(e.openBlock(),e.createElementBlock("div",bo,[e.createVNode(e.unref(Q.ElPagination),{"current-page":k.page,"onUpdate:currentPage":i[4]||(i[4]=h=>k.page=h),"page-size":k.pageSize,"onUpdate:pageSize":i[5]||(i[5]=h=>k.pageSize=h),total:C.value,"page-sizes":t.pageSizes,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:_,onCurrentChange:r},null,8,["current-page","page-size","total","page-sizes"])])):e.createCommentVNode("",!0)])]),e.createVNode(re._sfc_main,{open:A.value,title:"粘贴数据","show-footer":!1,width:"560px","onUpdate:open":i[8]||(i[8]=h=>A.value=h)},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:N.value,"onUpdate:modelValue":i[6]||(i[6]=h=>N.value=h),type:"textarea",rows:8},null,8,["modelValue"]),e.createElementVNode("div",ko,[e.createVNode(e.unref(Q.ElButton),{onClick:i[7]||(i[7]=h=>A.value=!1)},{default:e.withCtx(()=>[...i[16]||(i[16]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:Rt},{default:e.withCtx(()=>[...i[17]||(i[17]=[e.createTextVNode("确认",-1)])]),_:1})])]),_:1},8,["open"])]),_:3},8,["open","title","width"])}}}),Tt=te._export_sfc(So,[["__scopeId","data-v-aa46a777"]]),Co=e.defineComponent({name:"QyLegacySelectionDialog",inheritAttrs:!1,__name:"index",props:{open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selection:{default:"single"},selected:{default:()=>[]},mainKey:{default:""},tagName:{default:""},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},type:{type:[Array,Boolean],default:!1},typeSelectionProps:{default:()=>({})},tableProps:{default:()=>({})},append:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},select:{default:null}},emits:["close","submit","openDialog","changeIndexShow"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.reactive({category:[],code:"",...n.searchKey?{[n.searchKey]:""}:{},page:1,pageSize:10,type:"",...n.queryParams}),y=e.reactive({total:0,tableData:[],open:!1,selection:[],categories:[],types:[],tableRef:null,drag:!1,dialogOpen:!1,pasteData:"",pasteDataDialog:!1}),I=e.computed(()=>n.type||[]),w=e.computed(()=>y.categories),T=async r=>{if(!n.query)return{data:{records:[],total:0}};const f=await n.query(z(r)),_=n.responseFormatter?await n.responseFormatter(f):f;return y.total=E(_),_};e.watch(()=>n.open,r=>{y.open=r},{immediate:!0}),e.watch(I,r=>{y.types=[...r]},{immediate:!0,deep:!0}),e.watch([()=>n.selected,()=>n.open],()=>{n.open&&(y.selection=K(n.selected))},{immediate:!0,deep:!0}),e.watch(()=>n.queryParams,()=>{Object.assign(m,n.queryParams)},{deep:!0}),e.watch(()=>y.pasteDataDialog,r=>{r||(y.pasteData="")}),e.watch(()=>n.select,async()=>{n.select&&await D(n.select)},{deep:!0}),e.watch(()=>n.open,async r=>{r&&(y.dialogOpen=!1,await q())},{immediate:!0});async function q(){if(!n.category){y.categories=[];return}const r=typeof n.category=="function"?await n.category():n.category;y.categories=g(r)}async function C(){var r;return await e.nextTick(),(r=b.value)==null?void 0:r.handleQuerySearch()}function A(r){y.selection=K(r)}function N(r){var f;y.tableData=r,y.tableRef=(f=b.value)==null?void 0:f.getTableRef()}function k(r){y.selection=K(r),c("submit",y)}function $(){c("close")}function M(){y.dialogOpen=!0,c("openDialog")}function G(r){c("changeIndexShow",r)}async function D(r){if(!n.query||!n.searchKey||!n.mainKey)return;const f=await n.query({...m,[n.searchKey]:r[n.mainKey],category:[]}),_=n.responseFormatter?await n.responseFormatter(f):f,[x]=u(_);x&&(n.selection==="multi"?(y.selection=y.selection.filter(W=>W[n.mainKey]!==x[n.mainKey]),y.selection.push(x)):y.selection=[x])}function z(r={}){m.page=r.page??m.page,m.pageSize=r.pageSize??m.pageSize;const f={...m,category:F()};return n.searchKey&&(f[n.searchKey]=String(f[n.searchKey]||"").trim()),f}function F(){if(n.queryParams.category)return n.queryParams.category;const r=m.category;if(Array.isArray(r))return r;if(!r)return[];const f=L(y.categories,r);return f?O(f):[r]}function L(r,f){for(const _ of r||[]){if(_.value===f)return _;const x=L(_.children||[],f);if(x)return x}}function O(r){return[r.value,...(r.children||[]).flatMap(O)]}function g(r){const f=(r==null?void 0:r.data)??r;if(!Array.isArray(f))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(f);if(Array.isArray(n.categoryFormatter)){const[_,x]=n.categoryFormatter;return o(v(f,x),_,x)}return f}function v(r,f){const _=r.map(W=>({...W})),x=[];return _.forEach(W=>{const Z=W.parentCateCode;if(!Z){x.push(W);return}const X=_.find(ee=>ee[f]===Z);X?(X.children||(X.children=[])).push(W):x.push(W)}),x}function o(r,f,_){return r.map(x=>({...x,label:x[f],value:x[_],children:Array.isArray(x.children)?o(x.children,f,_):x.children}))}function u(r){if(Array.isArray(r))return r;const f=r==null?void 0:r.data;return Array.isArray(f)?f:(r==null?void 0:r.records)||(r==null?void 0:r.rows)||(f==null?void 0:f.records)||[]}function E(r){if(Array.isArray(r))return r.length;const f=u(r),_=r==null?void 0:r.data;return(r==null?void 0:r.total)??(Array.isArray(_)?_.length:_==null?void 0:_.total)??f.length}function K(r=[]){return r.map(f=>({...f}))}return V({search:C,handleSearch:C,handleConditionChange:C,getTableRef:()=>y.tableRef,getTableData:()=>y.tableData,getSelection:()=>K(y.selection)}),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Tt,e.mergeProps({ref_key:"selectionDialogRef",ref:b},e.unref(j),{modelValue:y.selection,"onUpdate:modelValue":f[3]||(f[3]=_=>y.selection=_),open:t.open,title:t.title,width:t.width,query:T,"response-formatter":t.responseFormatter,selection:t.selection,"row-key":t.mainKey,"label-key":t.tagName,"search-key":t.searchKey,"query-params":{},"category-options":w.value,"type-options":I.value,"type-select-props":t.typeSelectionProps,"table-props":t.tableProps,"show-copy-paste":!0,"show-append":t.append,onSelectionChange:A,onConfirm:k,onCancel:$,onAppend:M,onLoaded:N}),{side:e.withCtx(()=>[e.renderSlot(r.$slots,"side",{state:y,cate:y.categories,form:m,query:m,getData:C,search:C,changeIndexShow:G},void 0,!0)]),search:e.withCtx(()=>[e.createVNode(e.unref(Q.ElForm),{inline:"",model:m},{default:e.withCtx(()=>[y.categories.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElTreeSelect),{modelValue:m.category,"onUpdate:modelValue":f[0]||(f[0]=_=>m.category=_),class:"qy-legacy-selection-dialog__category",data:y.categories,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:C},null,8,["modelValue","data"])]),_:1})):e.createCommentVNode("",!0),I.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElSelect),e.mergeProps({modelValue:m.type,"onUpdate:modelValue":f[1]||(f[1]=_=>m.type=_),clearable:""},t.typeSelectionProps,{onChange:C}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,_=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:m[t.searchKey],"onUpdate:modelValue":f[2]||(f[2]=_=>m[t.searchKey]=_),clearable:"",class:"qy-legacy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(C,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:C},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createTextVNode("查询",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),toolbar:e.withCtx(()=>[e.renderSlot(r.$slots,"bar",{query:m,search:C},void 0,!0)]),columns:e.withCtx(()=>[e.renderSlot(r.$slots,"cols",{},void 0,!0),e.renderSlot(r.$slots,"columns",{},void 0,!0)]),_:3},16,["modelValue","open","title","width","response-formatter","selection","row-key","label-key","search-key","category-options","type-options","type-select-props","table-props","show-append"]),e.renderSlot(r.$slots,"dialog",{state:y,form:m,getData:C},void 0,!0)],64))}}),xo=te._export_sfc(Co,[["__scopeId","data-v-5c8cd0de"]]),Bo={class:"qy-form-section__heading"},Vo={key:0,class:"qy-form-section__title"},Io={key:0,class:"qy-form-section__description"},qo={class:"qy-form-section__actions"},$o=e.defineComponent({name:"QyFormSection",__name:"index",props:{title:{default:""},description:{default:""},tip:{default:""},tipType:{default:"info"},collapsible:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!0},bordered:{type:Boolean,default:!0},background:{default:"white"},bodyClass:{default:""},headerClass:{default:""}},emits:["toggle"],setup(t,{emit:V}){const R=t,n=V,c=e.ref(R.defaultExpanded);e.watch(()=>R.defaultExpanded,m=>{c.value=m});function j(){R.collapsible&&(c.value=!c.value,n("toggle",c.value))}function b(){R.collapsible&&j()}return(m,y)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["qy-form-section",[`is-bg-${t.background}`,{"is-bordered":t.bordered,"is-collapsible":t.collapsible}]])},[e.createElementVNode("header",{class:e.normalizeClass(["qy-form-section__header",t.headerClass]),onClick:b},[e.createElementVNode("div",Bo,[e.renderSlot(m.$slots,"title",{},()=>[t.title?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("div",Io,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",qo,[e.renderSlot(m.$slots,"actions",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-form-section__toggle",onClick:e.withModifiers(j,["stop"])},e.toDisplayString(c.value?"收起":"展开"),1)):e.createCommentVNode("",!0)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qy-form-section__body",t.bodyClass])},[e.renderSlot(m.$slots,"tip",{},()=>[t.tip?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qy-form-section__tip",`is-${t.tipType}`])},e.toDisplayString(t.tip),3)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"default",{},void 0,!0)],2),[[e.vShow,c.value]])],2))}}),Eo=te._export_sfc($o,[["__scopeId","data-v-3b271926"]]),Po={key:0,class:"qy-action-bar__left"},To={key:1,class:"qy-action-bar__center"},Ao={key:2,class:"qy-action-bar__right"},No=e.defineComponent({name:"QyActionBar",__name:"index",props:{sticky:{type:Boolean,default:!0},offsetBottom:{default:0},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},wrap:{type:Boolean,default:!0},justify:{default:"between"},background:{default:"#fff"}},setup(t){const V=t,R=e.computed(()=>({bottom:`${V.offsetBottom}px`,background:V.background}));return(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-action-bar",[`is-justify-${t.justify}`,{"is-sticky":t.sticky,"is-bordered":t.bordered,"is-shadow":t.shadow,"is-wrap":t.wrap}]]),style:e.normalizeStyle(R.value)},[n.$slots.left?(e.openBlock(),e.createElementBlock("div",Po,[e.renderSlot(n.$slots,"left",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",To,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.right?(e.openBlock(),e.createElementBlock("div",Ao,[e.renderSlot(n.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Fo=te._export_sfc(No,[["__scopeId","data-v-d1ffc43c"]]),fe=d.withInstall(de.Upload,"QyUpload"),me=d.withInstall(Dt.Image,"QyImage"),pe=d.withInstall(zt._sfc_main,"QyImagePreview"),ge=d.withInstall(Un,"QyImageUpload"),he=d.withInstall(re._sfc_main,"QyDialog"),ve=d.withInstall(no,"QyRemarkImage"),we=d.withInstall(Ot.Button,"QyButton"),Qe=d.withInstall(Kt.Dropdown,"QyDropdown"),_e=d.withInstall(Mt._sfc_main,"QyInput"),be=d.withInstall(Lt._sfc_main,"QyInputTag"),ke=d.withInstall(Ut._sfc_main,"QyInputNumber"),Se=d.withInstall(jt._sfc_main,"QyMoneyInput"),Ce=d.withInstall(Wt._sfc_main,"QyDatePicker"),xe=d.withInstall(Gt.Checkbox,"QyCheckbox"),Be=d.withInstall(Ht._sfc_main,"QyCheckboxGroup"),Ve=d.withInstall(Jt.Radio,"QyRadio"),Ie=d.withInstall(Zt._sfc_main,"QyAutocomplete"),qe=d.withInstall(Xt.MenuActions,"QyMenuActions"),$e=d.withInstall(Yt.TableColumnSettings,"QyTableColumnSettings"),Ee=d.withInstall(en._sfc_main,"QyRadioGroup"),Pe=d.withInstall(oo,"QyRemoteSelect"),Te=d.withInstall(Pt,"QySearchInput"),Ae=d.withInstall(mo,"QyRecordQuoteSearch"),Ne=d.withInstall(ye.Select,"QySelect"),Fe=d.withInstall(qt.TreeSelect,"QyTreeSelect"),Re=d.withInstall(Tt,"QySelectionDialog"),De=d.withInstall(xo,"QyLegacySelectionDialog"),ze=d.withInstall(Eo,"QyFormSection"),Oe=d.withInstall(Fo,"QyActionBar"),Ke=d.withInstall(nn.FilePicker,"QyFilePicker"),Me=d.withInstall(on.Switch,"QySwitch"),Le=d.withInstall(ie.Tag,"QyTag"),Ue=d.withInstall(an._sfc_main,"QyBadge"),je=d.withInstall(ln._sfc_main,"QyCascader"),We=d.withInstall(rn._sfc_main,"QyTooltip"),Ge=d.withInstall(cn._sfc_main,"QyPopover"),He=d.withInstall(sn._sfc_main,"QyPopconfirm"),Je=d.withInstall(un._sfc_main,"QySkeleton"),Ze=d.withInstall(dn._sfc_main,"QySkeletonItem"),Xe=d.withInstall(yn._sfc_main,"QyTabs"),Ye=d.withInstall(fn._sfc_main,"QyTabPane"),et=d.withInstall(mn._sfc_main,"QySteps"),tt=d.withInstall(pn._sfc_main,"QyStep"),nt=d.withInstall(gn.Fullscreen,"QyFullscreen"),ot=d.withInstall(wn._sfc_main,"QyRow"),at=d.withInstall(Qn._sfc_main,"QyCol"),lt=d.withInstall(_n._sfc_main,"QyContainer"),rt=d.withInstall(bn._sfc_main,"QyAside"),it=d.withInstall(kn._sfc_main,"QyMain"),ct=d.withInstall(Sn._sfc_main,"QyDescriptions"),st=d.withInstall(Cn._sfc_main,"QyDescriptionsItem"),ut=d.withInstall(xn._sfc_main,"QyCollapse"),dt=d.withInstall(Bn._sfc_main,"QyCollapseItem"),yt=d.withInstall(Vn._sfc_main,"QyLink"),ft=d.withInstall(In.Iframe,"QyIframe"),mt=d.withInstall(qn._sfc_main,"QyDivider"),pt=d.withInstall($n._sfc_main,"QyEmpty"),gt=d.withInstall(En._sfc_main,"QyAlert"),ht=d.withInstall(Pn._sfc_main,"QyCard"),vt=d.withInstall(Tn._sfc_main,"QyResult"),wt=d.withInstall(An._sfc_main,"QyWatermark"),Qt=d.withInstall(Nn._sfc_main,"QyScrollbar"),_t=d.withInstall(Fn._sfc_main,"QyProgress"),bt=d.withInstall(Rn._sfc_main,"QyStatistic"),kt=d.withInstall(Dn._sfc_main,"QyAvatar"),St=d.withInstall(zn._sfc_main,"QyTree"),Ct=d.withInstall(On.Pagination,"QyPagination"),xt=d.withInstall(hn._sfc_main,"QyIconPicker"),Bt=d.withInstall(vn._sfc_main,"QyColorPicker"),Vt=d.withInstall(Kn._sfc_main,"QyDrawer"),Ro=t=>{ce.QyLoading.install(t),t.component("QyDialog",he),t.component("QyDrawer",Vt),t.component("QyUpload",fe),t.component("QyImage",me),t.component("QyImagePreview",pe),t.component("QyImageUpload",ge),t.component("QyRemarkImage",ve),t.component("QyButton",we),t.component("QyDropdown",Qe),t.component("QyInput",_e),t.component("QyInputTag",be),t.component("QyInputNumber",ke),t.component("QyMoneyInput",Se),t.component("QyDatePicker",Ce),t.component("QyCheckbox",xe),t.component("QyCheckboxGroup",Be),t.component("QyRadio",Ve),t.component("QyAutocomplete",Ie),t.component("QyMenuActions",qe),t.component("QyTableColumnSettings",$e),t.component("QyRadioGroup",Ee),t.component("QyRemoteSelect",Pe),t.component("QySearchInput",Te),t.component("QyRecordQuoteSearch",Ae),t.component("QySelect",Ne),t.component("QyTreeSelect",Fe),t.component("QySelectionDialog",Re),t.component("QyLegacySelectionDialog",De),t.component("QyFormSection",ze),t.component("QyActionBar",Oe),t.component("QyFilePicker",Ke),t.component("QySwitch",Me),t.component("QyTag",Le),t.component("QyBadge",Ue),t.component("QyCascader",je),t.component("QyTooltip",We),t.component("QyPopover",Ge),t.component("QyPopconfirm",He),t.component("QySkeleton",Je),t.component("QySkeletonItem",Ze),t.component("QyTabs",Xe),t.component("QyTabPane",Ye),t.component("QySteps",et),t.component("QyStep",tt),t.component("QyFullscreen",nt),t.component("QyIcon",$t.QyIcon),t.component("QyIconPicker",xt),t.component("QyColorPicker",Bt),t.component("QyRow",ot),t.component("QyCol",at),t.component("QyContainer",lt),t.component("QyAside",rt),t.component("QyMain",it),t.component("QyDescriptions",ct),t.component("QyDescriptionsItem",st),t.component("QyCollapse",ut),t.component("QyCollapseItem",dt),t.component("QyLink",yt),t.component("QyIframe",ft),t.component("QyDivider",mt),t.component("QyEmpty",pt),t.component("QyAlert",gt),t.component("QyCard",ht),t.component("QyResult",vt),t.component("QyWatermark",wt),t.component("QyScrollbar",Qt),t.component("QyProgress",_t),t.component("QyStatistic",bt),t.component("QyAvatar",kt),t.component("QyTree",St),t.component("QyPagination",Ct)},Do={install:Ro,QyUpload:fe,QyImage:me,QyImagePreview:pe,openQyImagePreview:Mn.openQyImagePreview,QyImageUpload:ge,QyDialog:he,QyButton:we,QyDropdown:Qe,QyInput:_e,QyInputTag:be,QyInputNumber:ke,QyMoneyInput:Se,QyDatePicker:Ce,QyCheckbox:xe,QyCheckboxGroup:Be,QyRadio:Ve,QyAutocomplete:Ie,QyMenuActions:qe,QyTableColumnSettings:$e,QyRadioGroup:Ee,QyRemoteSelect:Pe,QySearchInput:Te,QyRecordQuoteSearch:Ae,QySelect:Ne,QyTreeSelect:Fe,QySelectionDialog:Re,QyLegacySelectionDialog:De,QyFormSection:ze,QyActionBar:Oe,QyFilePicker:Ke,QySwitch:Me,QyTag:Le,QyBadge:Ue,QyCascader:je,QyTooltip:We,QyPopover:Ge,QyPopconfirm:He,QySkeleton:Je,QySkeletonItem:Ze,QyTabs:Xe,QyTabPane:Ye,QySteps:et,QyStep:tt,QyFullscreen:nt,QyDrawer:Vt,QyIcon:$t.QyIcon,QyIconPicker:xt,QyColorPicker:Bt,QyRow:ot,QyCol:at,QyContainer:lt,QyAside:rt,QyMain:it,QyDescriptions:ct,QyDescriptionsItem:st,QyCollapse:ut,QyCollapseItem:dt,QyLink:yt,QyIframe:ft,QyDivider:mt,QyEmpty:pt,QyAlert:gt,QyCard:ht,QyResult:vt,QyWatermark:wt,QyScrollbar:Qt,QyProgress:_t,QyStatistic:bt,QyAvatar:kt,QyTree:St,QyPagination:Ct,QyRemarkImage:ve,QyLoading:ce.QyLoading,vQyLoading:ce.vQyLoading,openQyLoading:Ln.openQyLoading};exports.QyActionBar=Oe;exports.QyAlert=gt;exports.QyAside=rt;exports.QyAutocomplete=Ie;exports.QyAvatar=kt;exports.QyBadge=Ue;exports.QyButton=we;exports.QyCard=ht;exports.QyCascader=je;exports.QyCheckbox=xe;exports.QyCheckboxGroup=Be;exports.QyCol=at;exports.QyCollapse=ut;exports.QyCollapseItem=dt;exports.QyColorPicker=Bt;exports.QyContainer=lt;exports.QyDatePicker=Ce;exports.QyDescriptions=ct;exports.QyDescriptionsItem=st;exports.QyDialog=he;exports.QyDivider=mt;exports.QyDrawer=Vt;exports.QyDropdown=Qe;exports.QyEmpty=pt;exports.QyFilePicker=Ke;exports.QyFormSection=ze;exports.QyFullscreen=nt;exports.QyIconPicker=xt;exports.QyIframe=ft;exports.QyImage=me;exports.QyImagePreview=pe;exports.QyImageUpload=ge;exports.QyInput=_e;exports.QyInputNumber=ke;exports.QyInputTag=be;exports.QyLegacySelectionDialog=De;exports.QyLink=yt;exports.QyMain=it;exports.QyMenuActions=qe;exports.QyMoneyInput=Se;exports.QyPagination=Ct;exports.QyPopconfirm=He;exports.QyPopover=Ge;exports.QyProgress=_t;exports.QyRadio=Ve;exports.QyRadioGroup=Ee;exports.QyRecordQuoteSearch=Ae;exports.QyRemarkImage=ve;exports.QyRemoteSelect=Pe;exports.QyResult=vt;exports.QyRow=ot;exports.QyScrollbar=Qt;exports.QySearchInput=Te;exports.QySelect=Ne;exports.QySelectionDialog=Re;exports.QySkeleton=Je;exports.QySkeletonItem=Ze;exports.QyStatistic=bt;exports.QyStep=tt;exports.QySteps=et;exports.QySwitch=Me;exports.QyTabPane=Ye;exports.QyTableColumnSettings=$e;exports.QyTabs=Xe;exports.QyTag=Le;exports.QyTooltip=We;exports.QyTree=St;exports.QyTreeSelect=Fe;exports.QyUpload=fe;exports.QyWatermark=wt;exports.formatRemarkText=Et;exports.index=Do;exports.parseRemarkText=se;exports.parseRemarkWithImage=ue;
|
|
1
|
+
"use strict";const re=require("./index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs"),de=require("./index-afOuq3YX.cjs"),Dt=require("./index-DRugp8x0.cjs"),zt=require("./index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs"),e=require("vue"),Q=require("element-plus"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ot=require("./index-Bq9quq2D.cjs"),Kt=require("./index-rSrDnOpu.cjs"),Mt=require("./index-HNFq7v-A.cjs"),Lt=require("./index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs"),Ut=require("./index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs"),jt=require("./index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs"),Wt=require("./index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs"),Gt=require("./index-DKw-seoh.cjs"),Ht=require("./index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs"),Jt=require("./index-CVYNG8Fc.cjs"),Zt=require("./index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs"),Xt=require("./index-gMrQlV5n.cjs"),Yt=require("./index-MyDDX-zj.cjs"),en=require("./index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs"),ye=require("./index-DTbGlDqr.cjs"),qt=require("./index-CnVhquq5.cjs"),tn=require("element-plus"),ie=require("./index-DiEag4sK.cjs"),nn=require("./index-BweLwi2_.cjs"),on=require("./index-D27mwR57.cjs"),an=require("./index.vue_vue_type_script_lang-DMrpLmWN.cjs"),ln=require("./index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs"),rn=require("./index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs"),cn=require("./index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs"),sn=require("./index.vue_vue_type_style_index_0_lang-B2thgQml.cjs"),un=require("./index.vue_vue_type_script_setup_true_lang-BWi3g3mb.cjs"),dn=require("./index.vue_vue_type_script_setup_true_lang-4KZSABSM.cjs"),yn=require("./index.vue_vue_type_style_index_0_lang-D9DraThL.cjs"),fn=require("./index.vue_vue_type_script_lang-DLmUPDR5.cjs"),mn=require("./index.vue_vue_type_script_lang-D42aRlO2.cjs"),pn=require("./index.vue_vue_type_script_lang-BO9Ju_i0.cjs"),gn=require("./index-Mj7JZt7y.cjs"),$t=require("./index-CUlhX6fW.cjs"),hn=require("./index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs"),vn=require("./index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs"),wn=require("./index.vue_vue_type_script_lang-CCL57H5c.cjs"),Qn=require("./index.vue_vue_type_script_lang-CKZUcaZ5.cjs"),_n=require("./index.vue_vue_type_script_lang-BgapsQjI.cjs"),bn=require("./index.vue_vue_type_script_lang-8AT3-xU-.cjs"),kn=require("./index.vue_vue_type_script_lang-By3jd4gw.cjs"),Sn=require("./index.vue_vue_type_script_lang-CIOi2ahp.cjs"),Cn=require("./index.vue_vue_type_script_lang-DpSaB5eg.cjs"),xn=require("./index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs"),Bn=require("./index.vue_vue_type_script_setup_true_lang-DUEhuwGQ.cjs"),Vn=require("./index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs"),In=require("./index-EIFVul2W.cjs"),qn=require("./index.vue_vue_type_script_setup_true_lang-C96ZaggL.cjs"),$n=require("./index.vue_vue_type_script_lang-Bc3tktk9.cjs"),En=require("./index.vue_vue_type_script_lang-Cv4Pf58E.cjs"),Pn=require("./index.vue_vue_type_script_lang-CwrbII5c.cjs"),Tn=require("./index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs"),An=require("./index.vue_vue_type_script_setup_true_lang-Cr9PdvyR.cjs"),Nn=require("./index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs"),Fn=require("./index.vue_vue_type_script_lang-BkoqbceR.cjs"),Rn=require("./index.vue_vue_type_script_lang-CfjfZCT3.cjs"),Dn=require("./index.vue_vue_type_script_lang-WJ63_A7F.cjs"),zn=require("./index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs"),On=require("./index-CmgTSaFS.cjs"),d=require("./install-c8il9DQv.cjs"),ce=require("./index-Dvf1zJ7h.cjs"),Kn=require("./index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs"),Mn=require("./utils-BjEXwY3L.cjs"),Ln=require("@qynpm/hooks"),Un=Object.assign({name:"QyImageUpload",inheritAttrs:!1},{__name:"index",props:{modelValue:{type:[String,Array],default:""},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"files"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},mode:{type:String,default:"default"},voucher:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},isShowTip:{type:Boolean,default:!1},limit:{type:Number,default:void 0},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"128px"},disableDrag:{type:Boolean,default:!1},showPasteInput:{type:Boolean,default:!0},pastePlaceholder:{type:String,default:"粘贴图片上传"},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},uploadRequest:{type:Function,default:null}},emits:["update:modelValue","change","success","error","remove","updateImg"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=["jpg","jpeg","png","gif","bmp","webp"],y=e.computed(()=>n.voucher||n.mode==="voucher"),I=e.computed(()=>Array.isArray(n.modelValue)?n.modelValue.filter(Boolean):n.modelValue?String(n.modelValue).split(",").filter(Boolean):[]),w=e.computed(()=>n.supportVideo?1:y.value?n.limit??30:n.limit??(n.multiple?9:1)),T=e.computed(()=>{var o;return(o=n.fileType)!=null&&o.length?n.fileType:y.value&&!n.supportVideo?m:[]});function q(o){return Array.isArray(o)?o.filter(Boolean):[]}function C(o){const u=q(o);return n.multiple?u:u[0]||""}function A(o){c("update:modelValue",C(o))}function N(o){c("change",C(o==null?void 0:o.files))}function k(o){var K,r;if(typeof o=="string")return o;const u=o||{},E=u.url??u.urls??((K=u.data)==null?void 0:K.url)??((r=u.data)==null?void 0:r.urls)??"";return Array.isArray(E)?E[0]||"":E||""}function $(o){const u=k(o);u&&c("updateImg",u),c("success",v(),o)}function M(o){c("error",o)}function G(o,u){c("remove",o,u)}function D(){var o,u;(u=(o=b.value)==null?void 0:o.openFileDialog)==null||u.call(o)}function z(){var o,u;(u=(o=b.value)==null?void 0:o.clearFiles)==null||u.call(o)}function F(){var o,u;return((u=(o=b.value)==null?void 0:o.getPathList)==null?void 0:u.call(o))||[]}const L=e.computed(()=>F()),O=e.computed(()=>F());function g(){return F()}function v(){const o=F();return n.multiple?o:o[0]||""}return V({openFileDialog:D,clearFiles:z,getPathList:F,getFullPathList:g,fullPathList:L,pathList:O,getValue:v}),(o,u)=>(e.openBlock(),e.createBlock(de.Upload,e.mergeProps({ref_key:"uploadRef",ref:b},e.unref(j),{"model-value":I.value,"value-format":"array",api:t.api,name:t.name,multiple:t.multiple,disabled:t.disabled,"file-type":T.value,"file-size":t.fileSize,limit:w.value,"is-show-tip":t.isShowTip,"token-key":t.tokenKey,"support-video":t.supportVideo,size:t.size,"disable-drag":t.disableDrag,"call-back":t.callBack,"extra-data":t.extraData,"upload-request":t.uploadRequest,"show-text":!1,"show-paste-input":t.showPasteInput,"paste-placeholder":t.pastePlaceholder,"onUpdate:modelValue":A,onChange:N,onSuccess:$,onError:M,onRemove:G}),null,16,["model-value","api","name","multiple","disabled","file-type","file-size","limit","is-show-tip","token-key","support-video","size","disable-drag","call-back","extra-data","upload-request","show-paste-input","paste-placeholder"]))}});function se(t){const V=t==null?void 0:t.match(/(\[url\:(.*?)\])(.*)/);return V?{imageUrl:V[2],text:V[3]}:{imageUrl:"",text:t||""}}function Et(t){const V=String(t||"").match(/(\[url\:.*?\])([\s\S]*)/);return V?V[2]:t}function ue(t,V){return V?`[url:${V}]${t}`:t}const jn={class:"qy-remark-image__field"},Wn={key:1,class:"qy-remark-image__divider"},Gn={class:"qy-remark-image__upload-anchor"},Hn={key:0,class:"icon-[line-md--loading-twotone-loop]",role:"img","aria-hidden":"true"},Jn={key:1,class:"icon-[ion--cloud-upload-outline]",role:"img","aria-hidden":"true"},Zn={key:2,class:"icon-[ph--images-thin]",role:"img","aria-hidden":"true"},Xn={class:"qy-remark-image__popover"},Yn=["src"],eo={class:"qy-remark-image__popover-footer"},to=e.defineComponent({__name:"index",props:{defaultValue:{default:""},defaultImage:{default:""},rows:{default:6},width:{default:""},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"粘贴图片上传"},type:{default:"textarea"},layout:{default:"default"},selectValue:{type:[String,Number,Boolean],default:""},selectOptions:{default:()=>[]},selectDisabled:{type:Boolean,default:!1},api:{default:"/permission-api/common/uploads"},tokenKey:{default:"Admin-Token"},uploadName:{default:"files"},uploadRequest:{}},emits:["change","update:selectValue","select-change"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(""),y=e.ref(""),I=e.ref(!1),w=e.computed(()=>n.layout==="select-prefix"),T=e.computed(()=>({"qy-remark-image--select-prefix":w.value})),q=e.computed(()=>w.value||n.type==="text"?"text":"textarea"),C=e.computed(()=>{if(n.width)return{width:typeof n.width=="number"?`${n.width}px`:n.width}});e.watch(()=>n.defaultValue,g=>{const v=se(g||"");m.value=v.text,y.value=v.imageUrl||n.defaultImage||""},{immediate:!0}),e.watch(()=>n.defaultImage,g=>{g!==void 0&&!se(n.defaultValue||"").imageUrl&&(y.value=g||"")},{immediate:!0}),e.onMounted(()=>{e.nextTick(N)}),e.onUnmounted(()=>{const g=A();g&&g.removeEventListener("paste",D)});function A(){var g,v;return((g=b.value)==null?void 0:g.textarea)||((v=b.value)==null?void 0:v.input)||null}function N(){const g=A();g&&(g.removeEventListener("paste",D),g.addEventListener("paste",D))}function k(g){m.value=Et(g||"")}function $(g){c("update:selectValue",g),c("select-change",g)}function M(){y.value="",O()}function G(){m.value="",y.value="",O()}async function D(g){var u;const o=Array.from(((u=g.clipboardData)==null?void 0:u.files)||[]).find(E=>E.type.startsWith("image/"));o&&(g.preventDefault(),await z({file:o,onError:()=>{},onProgress:()=>{},onSuccess:()=>{}}))}async function z(g){var v,o;if(g.file.size>51200*1e3)return Q.ElMessage.error("图片过大"),!1;I.value=!0;try{const u=await F(g);return y.value=L(u),O(),Q.ElMessage.success("上传图片成功"),(v=g.onSuccess)==null||v.call(g,u),!0}catch(u){return(o=g.onError)==null||o.call(g,u),Q.ElMessage.error("上传失败"),!1}finally{I.value=!1}}async function F(g){const v=new FormData;if(v.append(n.uploadName,g.file),n.uploadRequest)return n.uploadRequest({file:g.file,formData:v,options:g,api:n.api,tokenKey:n.tokenKey});const o=de.api.get(n.tokenKey);return(await fetch(n.api,{method:"POST",body:v,credentials:"include",headers:o?{Authorization:`Bearer ${o}`}:void 0})).json()}function L(g){var u,E;if(typeof g=="string")return g;const v=g,o=(v==null?void 0:v.urls)??((u=v==null?void 0:v.data)==null?void 0:u.urls)??((E=v==null?void 0:v.data)==null?void 0:E.url)??(v==null?void 0:v.url)??"";return Array.isArray(o)?o[0]||"":o||""}function O(){c("change",ue(m.value||"",y.value||""),y.value||"")}return V({deleteImage:M,clearContent:G,getValue:()=>({text:m.value||"",imageUrl:y.value||"",value:ue(m.value||"",y.value||"")})}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-remark-image",T.value]),style:e.normalizeStyle(C.value)},[e.createElementVNode("div",jn,[w.value?(e.openBlock(),e.createBlock(e.unref(Q.ElSelect),{key:0,class:"qy-remark-image__prefix-select","model-value":t.selectValue,options:t.selectOptions,disabled:t.disabled||t.selectDisabled,size:"small","onUpdate:modelValue":$},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selectOptions,o=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:String(o.value),label:o.label,value:o.value,disabled:o.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","options","disabled"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("span",Wn)):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElInput),e.mergeProps({ref_key:"inputRef",ref:b,"model-value":m.value,type:q.value,rows:t.rows,autosize:t.autosize,disabled:t.disabled,placeholder:t.placeholder},e.unref(j),{"onUpdate:modelValue":k,onBlur:O}),null,16,["model-value","type","rows","autosize","disabled","placeholder"]),e.createVNode(e.unref(Q.ElPopover),{placement:"top-start",width:400,trigger:"hover",disabled:!y.value},{reference:e.withCtx(()=>[e.createElementVNode("div",Gn,[e.createVNode(e.unref(Q.ElUpload),{disabled:I.value||t.disabled,class:"qy-remark-image__upload","show-file-list":!1,"http-request":z},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createElementBlock("span",Hn)):y.value?(e.openBlock(),e.createElementBlock("span",Zn)):(e.openBlock(),e.createElementBlock("span",Jn))]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.createElementVNode("img",{src:y.value,class:"qy-remark-image__preview-img"},null,8,Yn),e.createElementVNode("div",eo,[v[1]||(v[1]=e.createElementVNode("span",{class:"qy-remark-image__popover-tip"},"再次点击按钮可更换图片",-1)),e.createVNode(e.unref(Q.ElButton),{link:"",size:"small",type:"danger",disabled:t.disabled,onClick:M},{default:e.withCtx(()=>[...v[0]||(v[0]=[e.createTextVNode(" 删除图片 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["disabled"])])],6))}}),no=te._export_sfc(to,[["__scopeId","data-v-db8a7397"]]),oo=e.defineComponent({name:"QyRemoteSelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Array,null],default:void 0},fetchMethod:{},defaultOptions:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},autoSelectSingle:{type:Boolean,default:!1},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},fitInputWidth:{type:Boolean,default:!0},popperClass:{default:""},debounce:{default:300},minLength:{default:1},remoteOnFocus:{type:Boolean,default:!1},remoteShowSuffix:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},reserveSelectedOption:{type:Boolean,default:!0},allowCreate:{type:Boolean,default:!1},commitOnBlur:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","visible-change","focus","blur","options-change","loading-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref([]),y=e.ref(new Map),I=e.ref(!1),w=e.ref(""),T=e.ref("");let q=0,C=null;const A=e.computed(()=>n.loading||I.value),N=e.ref(!1),k=e.computed(()=>w.value!==""),$=e.computed(()=>{if(k.value)return m.value;const s=new Map,P=a=>{s.set(M(a),a)};return n.defaultOptions.forEach(P),n.reserveSelectedOption&&y.value.forEach(a=>P(a)),m.value.forEach(P),Array.from(s.values())});e.watch(()=>n.defaultOptions,s=>{s.forEach(D)},{immediate:!0}),e.watch(()=>n.modelValue,()=>{$.value.forEach(D)},{immediate:!0});function M(s){return(s==null?void 0:s[n.valueKey])??(s==null?void 0:s.value)??(s==null?void 0:s.label)}function G(s){return Array.isArray(n.modelValue)?n.modelValue.includes(s):n.modelValue===s}function D(s){if(!n.reserveSelectedOption)return;const P=M(s);G(P)&&y.value.set(P,s)}function z(s){return n.disabled?!1:s?s.length>=n.minLength:n.remoteOnFocus}function F(s){I.value!==s&&(I.value=s,c("loading-change",s))}async function L(s){const P=W(s),a=++q;if(Z(P),!z(P)){m.value=[],F(!1),c("options-change",$.value);return}F(!0);try{const p=await n.fetchMethod(P);if(a!==q)return;m.value=Array.isArray(p)?p:[],m.value.forEach(D),c("options-change",$.value)}catch(p){if(a!==q)return;m.value=[],c("error",p),c("options-change",$.value)}finally{a===q&&F(!1)}}function O(){N.value||(N.value=!0,L(""))}function g(s){const P=W(s);T.value=P,q+=1,Z(P),C&&(clearTimeout(C),C=null),C=setTimeout(()=>{L(P)},n.debounce)}function v(){N.value=!0,L("")}function o(){L(w.value)}function u(s){T.value="",c("update:modelValue",s)}function E(s){T.value="",$.value.forEach(D),c("change",s)}function K(){T.value="",c("clear")}function r(s){s&&n.remoteOnFocus&&!w.value&&O(),c("visible-change",s)}function f(s){n.remoteOnFocus&&!w.value&&O(),c("focus",s)}function _(s){x(),c("blur",s)}function x(){if(!n.allowCreate||!n.commitOnBlur||n.disabled)return;const s=T.value;s.trim()&&(T.value="",c("update:modelValue",s),c("change",s))}function W(s){return String(s??"")}function Z(s){w.value=s,m.value=[],c("options-change",$.value)}function X(){var s,P;(P=(s=b.value)==null?void 0:s.focus)==null||P.call(s)}function ee(){var s,P;(P=(s=b.value)==null?void 0:s.blur)==null||P.call(s)}function oe(){c("update:modelValue",n.multiple?[]:""),c("clear")}return e.onBeforeUnmount(()=>{C&&clearTimeout(C)}),V({focus:X,blur:ee,clear:oe,retryFetch:o,fetchDefaultOptions:v}),(s,P)=>(e.openBlock(),e.createBlock(ye.Select,e.mergeProps({ref_key:"selectRef",ref:b},e.unref(j),{"model-value":t.modelValue,options:$.value,"label-key":t.labelKey,"value-key":t.valueKey,"disabled-key":t.disabledKey,placeholder:t.placeholder,disabled:t.disabled,clearable:t.clearable,filterable:!0,multiple:t.multiple,"collapse-tags":t.collapseTags,"collapse-tags-tooltip":t.collapseTagsTooltip,"auto-select-single":t.autoSelectSingle,size:t.size,teleported:t.teleported,"append-to":t.appendTo,"fit-input-width":t.fitInputWidth,"popper-class":t.popperClass,remote:"",debounce:0,"remote-show-suffix":t.remoteShowSuffix,"remote-method":g,loading:A.value,"onUpdate:modelValue":u,onChange:E,onClear:K,onVisibleChange:r,onFocus:f,onBlur:_}),e.createSlots({default:e.withCtx(()=>[s.$slots.default?e.renderSlot(s.$slots,"default",{},void 0,void 0,0):e.createCommentVNode("",!0)]),_:2},[s.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"prefix")]),key:"0"}:void 0,s.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),key:"1"}:void 0,s.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"loading")]),key:"2"}:void 0,s.$slots.tag?{name:"tag",fn:e.withCtx(a=>[e.renderSlot(s.$slots,"tag",e.normalizeProps(e.guardReactiveProps(a)))]),key:"3"}:void 0]),1040,["model-value","options","label-key","value-key","disabled-key","placeholder","disabled","clearable","multiple","collapse-tags","collapse-tags-tooltip","auto-select-single","size","teleported","append-to","fit-input-width","popper-class","remote-show-suffix","loading"]))}}),ao={class:"qy-search-input__item"},lo=["innerHTML"],ro={key:0,class:"qy-search-input__item-description"},io=e.defineComponent({name:"QySearchInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入搜索内容"},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"},clearable:{type:Boolean,default:!0},showButton:{type:Boolean,default:!0},buttonText:{default:"搜索"},buttonProps:{default:()=>({})},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},triggerOnFocus:{type:Boolean,default:!1},searchOnEnter:{type:Boolean,default:!0},searchOnSelect:{type:Boolean,default:!1},highlightKeyword:{type:Boolean,default:!0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},fitInputWidth:{type:Boolean,default:!0}},emits:["update:modelValue","search","clear","input","change","focus","blur","enter","select","visible-change","suggestions-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(q(n.modelValue)),y=e.computed(()=>q(n.modelValue)),I=e.computed(()=>["qy-search-input__popper",n.popperClass].filter(Boolean).join(" ")),w=e.computed(()=>q(n.modelValue)),T=e.ref("");e.watch(()=>n.modelValue,a=>{m.value=q(a)});function q(a){return a==null?"":String(a)}function C(a){return n.removeSpace?a.replace(/\s+/g,""):a}function A(a,p){return n.trimMode!==p?a:a.trim()}function N(a){return C(q(a))}function k(a){m.value=a,c("update:modelValue",a)}function $(a,p=""){return{...a,label:a.label||a.value,value:a.value||a.label,description:a.description||p}}function M(a=[]){return a.flatMap(p=>{if(Array.isArray(p.items)){const B=p;return B.items.map(H=>$(H,B.groupLabel))}return $(p)})}function G(a){const p=a.toLowerCase();return B=>[B.label,B.value,B.description].filter(Boolean).some(H=>String(H).toLowerCase().includes(p))}function D(a){return a?a.length>=n.minLength:n.triggerOnFocus}function z(a){c("suggestions-change",a),c("visible-change",a.length>0)}async function F(a){if(!D(a))return z([]),[];if(n.fetchSuggestionsMethod){const H=await new Promise(Y=>{var U;(U=n.fetchSuggestionsMethod)==null||U.call(n,a,le=>{Y(M(le))})});return z(H),H}if(n.fetchSuggestions){const H=await n.fetchSuggestions(a),Y=M(Array.isArray(H)?H:[]);return z(Y),Y}const p=M(n.suggestions),B=a?p.filter(G(a)):p;return z(B),B}async function L(a,p){T.value=a;try{const B=await F(a);p(B)}catch(B){c("error",B),z([]),p([])}}function O(){var a,p;T.value&&((p=(a=b.value)==null?void 0:a.getData)==null||p.call(a,T.value))}function g(a){const p=N(a);k(p)}function v(a){const p=N(a);m.value=p,c("input",p)}function o(a){const p=A(N(a),"change");p!==q(n.modelValue)&&k(p),c("change",p)}function u(a){c("focus",a)}function E(a){const p=A(m.value,"blur");p!==q(n.modelValue)&&k(p),c("blur",a),c("visible-change",!1)}function K(){m.value="",c("update:modelValue",""),c("clear"),z([])}function r(a){c("enter",a),n.searchOnEnter&&f()}function f(){c("search",q(n.modelValue))}function _(a){c("select",a),n.searchOnSelect&&c("search",a.value)}function x(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function W(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(a){const p=x(a||"");if(!n.highlightKeyword||!y.value)return p;const B=W(x(y.value));return B?p.replace(new RegExp(`(${B})`,"ig"),'<mark class="qy-search-input__mark">$1</mark>'):p}function X(){var a,p;(p=(a=b.value)==null?void 0:a.focus)==null||p.call(a)}function ee(){var a,p;(p=(a=b.value)==null?void 0:a.blur)==null||p.call(a)}function oe(){var a,p,B;(B=(p=(a=b.value)==null?void 0:a.inputRef)==null?void 0:p.select)==null||B.call(p)}function s(){var a,p;(p=(a=b.value)==null?void 0:a.clear)==null||p.call(a)}function P(){var a,p;(p=(a=b.value)==null?void 0:a.close)==null||p.call(a)}return V({focus:X,blur:ee,select:oe,clear:s,closePanel:P,retryFetch:O}),(a,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-search-input",{"is-disabled":t.disabled}])},[e.createVNode(e.unref(Q.ElAutocomplete),e.mergeProps({ref_key:"autocompleteRef",ref:b},e.unref(j),{"model-value":w.value,disabled:t.disabled,placeholder:t.placeholder,clearable:t.clearable,debounce:t.debounce,"fetch-suggestions":L,"trigger-on-focus":t.triggerOnFocus,teleported:t.teleported,"fit-input-width":t.fitInputWidth,"popper-class":I.value,"append-to":t.appendTo,"value-key":"value","onUpdate:modelValue":g,onInput:v,onChange:o,onFocus:u,onBlur:E,onClear:K,onSelect:_,onKeydown:e.withKeys(r,["enter"])}),e.createSlots({default:e.withCtx(({item:B})=>[e.renderSlot(a.$slots,"item",{item:B,keyword:y.value},()=>[e.createElementVNode("div",ao,[e.createElementVNode("div",{class:"qy-search-input__item-label",innerHTML:Z(B.label||B.value||"")},null,8,lo),B.description?(e.openBlock(),e.createElementBlock("div",ro,e.toDisplayString(B.description),1)):e.createCommentVNode("",!0)])],!0)]),_:2},[a.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,a.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,a.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prepend",{},void 0,!0)]),key:"2"}:void 0,a.$slots.append||t.showButton?{name:"append",fn:e.withCtx(()=>[a.$slots.append?e.renderSlot(a.$slots,"append",{},void 0,!0,0):(e.openBlock(),e.createBlock(e.unref(Q.ElButton),e.mergeProps({key:1},t.buttonProps,{loading:t.loading,disabled:t.disabled,onClick:f}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},16,["loading","disabled"]))]),key:"3"}:void 0]),1040,["model-value","disabled","placeholder","clearable","debounce","trigger-on-focus","teleported","fit-input-width","popper-class","append-to"])],2))}}),Pt=te._export_sfc(io,[["__scopeId","data-v-022788e1"]]),co={class:"qy-record-quote-search"},so={key:0,class:"qy-record-quote-search__header"},uo={key:0,class:"qy-record-quote-search__label"},yo={key:1,class:"qy-record-quote-search__description"},fo=e.defineComponent({name:"QyRecordQuoteSearch",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入报价单号"},buttonText:{default:"查询报价单"},autoNormalize:{type:Boolean,default:!0},showStatus:{type:Boolean,default:!0},status:{default:"default"},statusText:{default:""},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},searchOnSelect:{type:Boolean,default:!0},searchMethod:{type:[Function,null],default:null},extractMethod:{type:[Function,null],default:null},normalizeMethod:{type:[Function,null],default:null},label:{default:"报价单号"},description:{default:""},trimMode:{default:"blur"}},emits:["update:modelValue","search","clear","normalize","enter","select","error","success"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(!1),y=e.computed(()=>n.statusText||""),I=e.computed(()=>n.loading||m.value);function w(o){return o==null?"":String(o)}function T(o){const u=w(o).trim(),E=q(u),K=E.match(/BJ\d{8}[A-Z0-9]{4}/i);return K?K[0]:E}function q(o){return w(o).replace(/\s+/g,"").trim().toUpperCase()}function C(o){return n.extractMethod?n.extractMethod(o):T(o)}function A(o){return n.normalizeMethod?n.normalizeMethod(o):q(o)}function N(o,u){const E=w(o),K=C(E),r=n.autoNormalize?A(K):K;return c("normalize",{rawValue:E,code:r}),{rawValue:E,code:r,item:u}}function k(o){c("update:modelValue",o)}async function $(o){if(c("search",o),!!n.searchMethod){m.value=!0;try{const u=await n.searchMethod(o);c("success",u)}catch(u){c("error",u)}finally{m.value=!1}}}function M(o){const u=N(o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function G(){c("clear")}function D(o){c("enter",o)}function z(o){if(c("select",o),!n.searchOnSelect)return;const u=N(o.value,o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function F(o){c("error",o)}function L(){var o,u;(u=(o=b.value)==null?void 0:o.focus)==null||u.call(o)}function O(){var o,u;(u=(o=b.value)==null?void 0:o.blur)==null||u.call(o)}function g(){var o,u;(u=(o=b.value)==null?void 0:o.select)==null||u.call(o)}function v(){var o,u;(u=(o=b.value)==null?void 0:o.clear)==null||u.call(o)}return V({focus:L,blur:O,select:g,clear:v,extractQuoteOrderCode:C,normalizeQuoteOrderCode:A}),(o,u)=>(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(o.$slots,"label",{},()=>[t.label||t.description?(e.openBlock(),e.createElementBlock("div",so,[t.label?(e.openBlock(),e.createElementBlock("div",uo,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",yo,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0),e.createVNode(Pt,e.mergeProps({ref_key:"searchRef",ref:b},e.unref(j),{"model-value":t.modelValue,loading:I.value,disabled:t.disabled,placeholder:t.placeholder,"remove-space":!0,"trim-mode":t.trimMode,"button-text":t.buttonText,suggestions:t.suggestions,"fetch-suggestions":t.fetchSuggestions,"fetch-suggestions-method":t.fetchSuggestionsMethod,debounce:t.debounce,"min-length":t.minLength,"search-on-select":!1,"onUpdate:modelValue":k,onSearch:M,onClear:G,onEnter:D,onSelect:z,onError:F}),e.createSlots({_:2},[o.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,o.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,o.$slots.item?{name:"item",fn:e.withCtx(E=>[e.renderSlot(o.$slots,"item",e.normalizeProps(e.guardReactiveProps(E)),void 0,!0)]),key:"2"}:void 0,o.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"empty",{},void 0,!0)]),key:"3"}:void 0,o.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"loading",{},void 0,!0)]),key:"4"}:void 0]),1040,["model-value","loading","disabled","placeholder","trim-mode","button-text","suggestions","fetch-suggestions","fetch-suggestions-method","debounce","min-length"]),t.showStatus&&y.value?e.renderSlot(o.$slots,"status",{status:t.status,statusText:y.value},()=>[e.createElementVNode("div",{class:e.normalizeClass(["qy-record-quote-search__status",`is-${t.status}`])},e.toDisplayString(y.value),3)],!0,0):e.createCommentVNode("",!0)]))}}),mo=te._export_sfc(fo,[["__scopeId","data-v-b48667ff"]]),po={class:"qy-selection-dialog"},go={class:"qy-selection-dialog__main"},ho={key:0,class:"qy-selection-dialog__selected"},vo={class:"qy-selection-dialog__selected-tags"},wo={key:0,class:"qy-selection-dialog__selected-actions"},Qo={key:1,class:"qy-selection-dialog__search-row"},_o={key:0,class:"qy-selection-dialog__toolbar"},bo={key:2,class:"qy-selection-dialog__pagination"},ko={class:"qy-selection-dialog__paste-actions"},So=e.defineComponent({name:"QySelectionDialog",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},fetchMethod:{type:Function,default:void 0},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selectionMode:{default:void 0},selection:{default:"single"},selected:{default:()=>[]},rowKey:{default:"id"},mainKey:{default:void 0},labelKey:{default:"name"},tagName:{default:void 0},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},categoryOptions:{default:()=>[]},categoryFetchMethod:{type:[Function,null],default:null},type:{type:[Array,Boolean],default:!1},typeOptions:{default:()=>[]},typeSelectionProps:{default:()=>({})},typeSelectProps:{default:()=>({})},tableProps:{default:()=>({})},showSelected:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},showCopyPaste:{type:Boolean,default:!1},append:{type:Boolean,default:!1},showAppend:{type:Boolean,default:!1},pageSizes:{default:()=>[10,20,50,100]}},emits:["update:modelValue","selection-change","confirm","submit","cancel","close","append","loaded"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.useSlots(),m=e.getCurrentInstance(),y=e.ref(null),I=e.ref([]),w=e.ref([]),T=e.ref([]),q=e.ref(!1),C=e.ref(0),A=e.ref(!1),N=e.ref(""),k=e.reactive({category:[],type:"",page:1,pageSize:10,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),$=e.computed(()=>n.selectionMode?n.selectionMode:n.selection==="multi"?"multiple":n.selection),M=e.computed(()=>n.mainKey||n.rowKey),G=e.computed(()=>n.tagName||n.labelKey),D=e.computed(()=>n.typeOptions.length?n.typeOptions:n.type||[]),z=e.computed(()=>({...n.typeSelectionProps,...n.typeSelectProps})),F=e.computed(()=>n.tableProps||{}),L=e.computed(()=>n.showSearch||!!j["search-visible"]),O=e.computed(()=>n.showAppend||n.append),g=e.computed(()=>O.value||!!b.toolbar||!!b.bar),v=e.computed(()=>n.fetchMethod||n.query),o=e.computed(()=>u()?n.modelValue:n.selected);function u(){const l=(m==null?void 0:m.vnode.props)||{};return Object.prototype.hasOwnProperty.call(l,"modelValue")||Object.prototype.hasOwnProperty.call(l,"model-value")||Object.prototype.hasOwnProperty.call(l,"onUpdate:modelValue")}e.watch([()=>n.modelValue,()=>n.selected,()=>n.open],()=>{n.open&&(w.value=ne(o.value),B())},{immediate:!0,deep:!0}),e.watch([()=>n.categoryOptions,()=>n.category],l=>{if(Array.isArray(n.category)&&n.category.length){T.value=n.category;return}T.value=n.categoryOptions||[]},{immediate:!0}),e.watch(A,l=>{l||(N.value="")});async function E(){w.value=ne(o.value),await K(),await r(),B()}async function K(){const l=n.categoryFetchMethod||(typeof n.category=="function"?n.category:null);if(!l)return;const i=await l();T.value=X(i)}async function r(){if(v.value){q.value=!0;try{const l=await v.value(oe()),i=n.responseFormatter?await n.responseFormatter(l):l,{rows:S,total:h}=Z(i);return I.value=S,C.value=h,c("loaded",S),B(),i}finally{q.value=!1}}}function f(){return k.page=1,r()}function _(){return k.page=1,r()}function x(){return Object.assign(k,{category:[],type:"",page:1,pageSize:k.pageSize,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),r()}function W(){c("append")}function Z(l){if(Array.isArray(l))return{rows:l,total:l.length};const i=l==null?void 0:l.data;if(Array.isArray(i))return{rows:i,total:(l==null?void 0:l.total)??i.length};const S=(l==null?void 0:l.records)||(l==null?void 0:l.rows)||(i==null?void 0:i.records)||[],h=(l==null?void 0:l.total)??(i==null?void 0:i.total)??S.length;return{rows:S,total:h}}function X(l){const i=(l==null?void 0:l.data)??l;if(!Array.isArray(i))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(i);if(Array.isArray(n.categoryFormatter)){const[S,h]=n.categoryFormatter;return i.map(J=>({...J,label:J[S],value:J[h],children:Array.isArray(J.children)?ee(J.children,S,h):J.children}))}return i}function ee(l,i,S){return l.map(h=>({...h,label:h[i],value:h[S],children:Array.isArray(h.children)?ee(h.children,i,S):h.children}))}function oe(){const l={...n.queryParams,...k};return n.searchKey&&(l[n.searchKey]=String(l[n.searchKey]||"").trim()),l.category=s(),l}function s(){if(Object.prototype.hasOwnProperty.call(n.queryParams,"category"))return n.queryParams.category;const l=k.category;return Array.isArray(l)?l:l?[l]:[]}function P(l){var i,S;if($.value!=="none"){if($.value==="single"){w.value=[l],(i=y.value)==null||i.setCurrentRow(l),ae();return}H(l)&&((S=y.value)==null||S.toggleRowSelection(l,!Y(l)))}}function a(l){if($.value!=="multiple")return;const i=new Set(I.value.map(U)),S=new Set(l.map(U));w.value=w.value.filter(h=>!i.has(U(h))||S.has(U(h))),l.forEach(h=>{Y(h)||w.value.push(h)}),ae()}function p(l){var S,h;w.value=w.value.filter(J=>U(J)!==U(l));const i=I.value.find(J=>U(J)===U(l));i&&($.value==="multiple"?(S=y.value)==null||S.toggleRowSelection(i,!1):(h=y.value)==null||h.setCurrentRow()),ae()}function B(){e.nextTick(()=>{var l;if(y.value){if($.value==="single"){const[i]=w.value,S=I.value.find(h=>i&&U(h)===U(i));(l=y.value)==null||l.setCurrentRow(S);return}$.value==="multiple"&&I.value.forEach(i=>{var S;(S=y.value)==null||S.toggleRowSelection(i,Y(i))})}})}function H(l){var S;const i=(S=F.value)==null?void 0:S.selectable;return typeof i=="function"?i(l)!==!1:!0}function Y(l){return w.value.some(i=>U(i)===U(l))}function U(l){return It(l,M.value)}function le(l){return It(l,G.value)??U(l)}function It(l,i){if(!(!l||!i))return i.split(".").reduce((S,h)=>S==null?void 0:S[h],l)}function ae(){const l=ne(w.value);c("selection-change",l)}function At(){const l=ne(w.value);c("update:modelValue",l),c("confirm",l),c("submit",{selection:l,rows:l,query:{...k}})}function Nt(){w.value=ne(o.value),c("cancel"),c("close")}async function Ft(){var i;const l=JSON.stringify(w.value);await((i=navigator.clipboard)==null?void 0:i.writeText(l)),Q.ElMessage.success("复制成功")}function Rt(){try{const l=JSON.parse(N.value);if(!Array.isArray(l)){Q.ElMessage.error("粘贴内容需要是数组");return}l.forEach(i=>{Y(i)||w.value.push(i)}),A.value=!1,ae(),B()}catch(l){Q.ElMessage.error(`粘贴错误: ${(l==null?void 0:l.message)||"内容格式错误"}`)}}function ne(l=[]){return l.map(i=>({...i}))}return V({search:f,handleSearch:r,handleQuerySearch:f,resetSearch:x,getTableRef:()=>y.value,getTableData:()=>I.value,getSelection:()=>ne(w.value)}),(l,i)=>{const S=tn.ElLoadingDirective;return e.openBlock(),e.createBlock(re._sfc_main,{open:t.open,title:t.title,width:t.width,onOpened:E,onConfirm:At,onCancel:Nt},{default:e.withCtx(()=>[e.createElementVNode("div",po,[e.renderSlot(l.$slots,"side",{},void 0,!0),e.createElementVNode("div",go,[t.showSelected?(e.openBlock(),e.createElementBlock("div",ho,[i[12]||(i[12]=e.createElementVNode("span",{class:"qy-selection-dialog__selected-label"},"已选项",-1)),e.createElementVNode("div",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,h=>(e.openBlock(),e.createBlock(ie.Tag,{key:U(h),closable:"",class:"qy-selection-dialog__selected-tag",onClose:J=>p(h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(le(h)),1)]),_:2},1032,["onClose"]))),128)),w.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.Tag,{key:0,tone:"info"},{default:e.withCtx(()=>[...i[9]||(i[9]=[e.createTextVNode("无",-1)])]),_:1}))]),t.showCopyPaste?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:Ft},{default:e.withCtx(()=>[...i[10]||(i[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:i[0]||(i[0]=h=>A.value=!0)},{default:e.withCtx(()=>[...i[11]||(i[11]=[e.createTextVNode("粘贴",-1)])]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",Qo,[e.createVNode(e.unref(Q.ElForm),{class:"qy-selection-dialog__search",inline:"",model:k},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"search",{query:k,search:f,reset:x},()=>[T.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(qt.TreeSelect,{modelValue:k.category,"onUpdate:modelValue":i[1]||(i[1]=h=>k.category=h),class:"qy-selection-dialog__category",options:T.value,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:f},null,8,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),D.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(ye.Select,e.mergeProps({modelValue:k.type,"onUpdate:modelValue":i[2]||(i[2]=h=>k.type=h),class:"qy-selection-dialog__type",options:D.value,placeholder:"请选择类型",clearable:""},z.value,{onChange:f}),null,16,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:k[t.searchKey],"onUpdate:modelValue":i[3]||(i[3]=h=>k[t.searchKey]=h),clearable:"",placeholder:"请输入",class:"qy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(f,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:f},{default:e.withCtx(()=>[...i[13]||(i[13]=[e.createTextVNode("查询",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{onClick:x},{default:e.withCtx(()=>[...i[14]||(i[14]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})],!0)]),_:3},8,["model"]),g.value?(e.openBlock(),e.createElementBlock("div",_o,[O.value?(e.openBlock(),e.createBlock(e.unref(Q.ElButton),{key:0,type:"primary",onClick:W},{default:e.withCtx(()=>[...i[15]||(i[15]=[e.createTextVNode(" 新增 ",-1)])]),_:1})):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"toolbar",{query:k,search:f},void 0,!0),e.renderSlot(l.$slots,"bar",{query:k,search:f},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(Q.ElTable),e.mergeProps({ref_key:"tableRef",ref:y,data:I.value,"row-key":M.value,border:"","highlight-current-row":"","max-height":"550px"},F.value,{onSelectionChange:a,onRowClick:P}),{default:e.withCtx(()=>{var h;return[$.value==="multiple"?(e.openBlock(),e.createBlock(e.unref(Q.ElTableColumn),{key:0,type:"selection","reserve-selection":"",width:"42",selectable:(h=F.value)==null?void 0:h.selectable},null,8,["selectable"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"columns",{},void 0,!0),e.renderSlot(l.$slots,"cols",{},void 0,!0)]}),_:3},16,["data","row-key"])),[[S,q.value]]),t.showPagination&&C.value>0?(e.openBlock(),e.createElementBlock("div",bo,[e.createVNode(e.unref(Q.ElPagination),{"current-page":k.page,"onUpdate:currentPage":i[4]||(i[4]=h=>k.page=h),"page-size":k.pageSize,"onUpdate:pageSize":i[5]||(i[5]=h=>k.pageSize=h),total:C.value,"page-sizes":t.pageSizes,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:_,onCurrentChange:r},null,8,["current-page","page-size","total","page-sizes"])])):e.createCommentVNode("",!0)])]),e.createVNode(re._sfc_main,{open:A.value,title:"粘贴数据","show-footer":!1,width:"560px","onUpdate:open":i[8]||(i[8]=h=>A.value=h)},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:N.value,"onUpdate:modelValue":i[6]||(i[6]=h=>N.value=h),type:"textarea",rows:8},null,8,["modelValue"]),e.createElementVNode("div",ko,[e.createVNode(e.unref(Q.ElButton),{onClick:i[7]||(i[7]=h=>A.value=!1)},{default:e.withCtx(()=>[...i[16]||(i[16]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:Rt},{default:e.withCtx(()=>[...i[17]||(i[17]=[e.createTextVNode("确认",-1)])]),_:1})])]),_:1},8,["open"])]),_:3},8,["open","title","width"])}}}),Tt=te._export_sfc(So,[["__scopeId","data-v-aa46a777"]]),Co=e.defineComponent({name:"QyLegacySelectionDialog",inheritAttrs:!1,__name:"index",props:{open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selection:{default:"single"},selected:{default:()=>[]},mainKey:{default:""},tagName:{default:""},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},type:{type:[Array,Boolean],default:!1},typeSelectionProps:{default:()=>({})},tableProps:{default:()=>({})},append:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},select:{default:null}},emits:["close","submit","openDialog","changeIndexShow"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.reactive({category:[],code:"",...n.searchKey?{[n.searchKey]:""}:{},page:1,pageSize:10,type:"",...n.queryParams}),y=e.reactive({total:0,tableData:[],open:!1,selection:[],categories:[],types:[],tableRef:null,drag:!1,dialogOpen:!1,pasteData:"",pasteDataDialog:!1}),I=e.computed(()=>n.type||[]),w=e.computed(()=>y.categories),T=async r=>{if(!n.query)return{data:{records:[],total:0}};const f=await n.query(z(r)),_=n.responseFormatter?await n.responseFormatter(f):f;return y.total=E(_),_};e.watch(()=>n.open,r=>{y.open=r},{immediate:!0}),e.watch(I,r=>{y.types=[...r]},{immediate:!0,deep:!0}),e.watch([()=>n.selected,()=>n.open],()=>{n.open&&(y.selection=K(n.selected))},{immediate:!0,deep:!0}),e.watch(()=>n.queryParams,()=>{Object.assign(m,n.queryParams)},{deep:!0}),e.watch(()=>y.pasteDataDialog,r=>{r||(y.pasteData="")}),e.watch(()=>n.select,async()=>{n.select&&await D(n.select)},{deep:!0}),e.watch(()=>n.open,async r=>{r&&(y.dialogOpen=!1,await q())},{immediate:!0});async function q(){if(!n.category){y.categories=[];return}const r=typeof n.category=="function"?await n.category():n.category;y.categories=g(r)}async function C(){var r;return await e.nextTick(),(r=b.value)==null?void 0:r.handleQuerySearch()}function A(r){y.selection=K(r)}function N(r){var f;y.tableData=r,y.tableRef=(f=b.value)==null?void 0:f.getTableRef()}function k(r){y.selection=K(r),c("submit",y)}function $(){c("close")}function M(){y.dialogOpen=!0,c("openDialog")}function G(r){c("changeIndexShow",r)}async function D(r){if(!n.query||!n.searchKey||!n.mainKey)return;const f=await n.query({...m,[n.searchKey]:r[n.mainKey],category:[]}),_=n.responseFormatter?await n.responseFormatter(f):f,[x]=u(_);x&&(n.selection==="multi"?(y.selection=y.selection.filter(W=>W[n.mainKey]!==x[n.mainKey]),y.selection.push(x)):y.selection=[x])}function z(r={}){m.page=r.page??m.page,m.pageSize=r.pageSize??m.pageSize;const f={...m,category:F()};return n.searchKey&&(f[n.searchKey]=String(f[n.searchKey]||"").trim()),f}function F(){if(n.queryParams.category)return n.queryParams.category;const r=m.category;if(Array.isArray(r))return r;if(!r)return[];const f=L(y.categories,r);return f?O(f):[r]}function L(r,f){for(const _ of r||[]){if(_.value===f)return _;const x=L(_.children||[],f);if(x)return x}}function O(r){return[r.value,...(r.children||[]).flatMap(O)]}function g(r){const f=(r==null?void 0:r.data)??r;if(!Array.isArray(f))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(f);if(Array.isArray(n.categoryFormatter)){const[_,x]=n.categoryFormatter;return o(v(f,x),_,x)}return f}function v(r,f){const _=r.map(W=>({...W})),x=[];return _.forEach(W=>{const Z=W.parentCateCode;if(!Z){x.push(W);return}const X=_.find(ee=>ee[f]===Z);X?(X.children||(X.children=[])).push(W):x.push(W)}),x}function o(r,f,_){return r.map(x=>({...x,label:x[f],value:x[_],children:Array.isArray(x.children)?o(x.children,f,_):x.children}))}function u(r){if(Array.isArray(r))return r;const f=r==null?void 0:r.data;return Array.isArray(f)?f:(r==null?void 0:r.records)||(r==null?void 0:r.rows)||(f==null?void 0:f.records)||[]}function E(r){if(Array.isArray(r))return r.length;const f=u(r),_=r==null?void 0:r.data;return(r==null?void 0:r.total)??(Array.isArray(_)?_.length:_==null?void 0:_.total)??f.length}function K(r=[]){return r.map(f=>({...f}))}return V({search:C,handleSearch:C,handleConditionChange:C,getTableRef:()=>y.tableRef,getTableData:()=>y.tableData,getSelection:()=>K(y.selection)}),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Tt,e.mergeProps({ref_key:"selectionDialogRef",ref:b},e.unref(j),{modelValue:y.selection,"onUpdate:modelValue":f[3]||(f[3]=_=>y.selection=_),open:t.open,title:t.title,width:t.width,query:T,"response-formatter":t.responseFormatter,selection:t.selection,"row-key":t.mainKey,"label-key":t.tagName,"search-key":t.searchKey,"query-params":{},"category-options":w.value,"type-options":I.value,"type-select-props":t.typeSelectionProps,"table-props":t.tableProps,"show-copy-paste":!0,"show-append":t.append,onSelectionChange:A,onConfirm:k,onCancel:$,onAppend:M,onLoaded:N}),{side:e.withCtx(()=>[e.renderSlot(r.$slots,"side",{state:y,cate:y.categories,form:m,query:m,getData:C,search:C,changeIndexShow:G},void 0,!0)]),search:e.withCtx(()=>[e.createVNode(e.unref(Q.ElForm),{inline:"",model:m},{default:e.withCtx(()=>[y.categories.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElTreeSelect),{modelValue:m.category,"onUpdate:modelValue":f[0]||(f[0]=_=>m.category=_),class:"qy-legacy-selection-dialog__category",data:y.categories,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:C},null,8,["modelValue","data"])]),_:1})):e.createCommentVNode("",!0),I.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElSelect),e.mergeProps({modelValue:m.type,"onUpdate:modelValue":f[1]||(f[1]=_=>m.type=_),clearable:""},t.typeSelectionProps,{onChange:C}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,_=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:m[t.searchKey],"onUpdate:modelValue":f[2]||(f[2]=_=>m[t.searchKey]=_),clearable:"",class:"qy-legacy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(C,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:C},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createTextVNode("查询",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),toolbar:e.withCtx(()=>[e.renderSlot(r.$slots,"bar",{query:m,search:C},void 0,!0)]),columns:e.withCtx(()=>[e.renderSlot(r.$slots,"cols",{},void 0,!0),e.renderSlot(r.$slots,"columns",{},void 0,!0)]),_:3},16,["modelValue","open","title","width","response-formatter","selection","row-key","label-key","search-key","category-options","type-options","type-select-props","table-props","show-append"]),e.renderSlot(r.$slots,"dialog",{state:y,form:m,getData:C},void 0,!0)],64))}}),xo=te._export_sfc(Co,[["__scopeId","data-v-5c8cd0de"]]),Bo={class:"qy-form-section__heading"},Vo={key:0,class:"qy-form-section__title"},Io={key:0,class:"qy-form-section__description"},qo={class:"qy-form-section__actions"},$o=e.defineComponent({name:"QyFormSection",__name:"index",props:{title:{default:""},description:{default:""},tip:{default:""},tipType:{default:"info"},collapsible:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!0},bordered:{type:Boolean,default:!0},background:{default:"white"},bodyClass:{default:""},headerClass:{default:""}},emits:["toggle"],setup(t,{emit:V}){const R=t,n=V,c=e.ref(R.defaultExpanded);e.watch(()=>R.defaultExpanded,m=>{c.value=m});function j(){R.collapsible&&(c.value=!c.value,n("toggle",c.value))}function b(){R.collapsible&&j()}return(m,y)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["qy-form-section",[`is-bg-${t.background}`,{"is-bordered":t.bordered,"is-collapsible":t.collapsible}]])},[e.createElementVNode("header",{class:e.normalizeClass(["qy-form-section__header",t.headerClass]),onClick:b},[e.createElementVNode("div",Bo,[e.renderSlot(m.$slots,"title",{},()=>[t.title?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("div",Io,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",qo,[e.renderSlot(m.$slots,"actions",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-form-section__toggle",onClick:e.withModifiers(j,["stop"])},e.toDisplayString(c.value?"收起":"展开"),1)):e.createCommentVNode("",!0)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qy-form-section__body",t.bodyClass])},[e.renderSlot(m.$slots,"tip",{},()=>[t.tip?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qy-form-section__tip",`is-${t.tipType}`])},e.toDisplayString(t.tip),3)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"default",{},void 0,!0)],2),[[e.vShow,c.value]])],2))}}),Eo=te._export_sfc($o,[["__scopeId","data-v-3b271926"]]),Po={key:0,class:"qy-action-bar__left"},To={key:1,class:"qy-action-bar__center"},Ao={key:2,class:"qy-action-bar__right"},No=e.defineComponent({name:"QyActionBar",__name:"index",props:{sticky:{type:Boolean,default:!0},offsetBottom:{default:0},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},wrap:{type:Boolean,default:!0},justify:{default:"between"},background:{default:"#fff"}},setup(t){const V=t,R=e.computed(()=>({bottom:`${V.offsetBottom}px`,background:V.background}));return(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-action-bar",[`is-justify-${t.justify}`,{"is-sticky":t.sticky,"is-bordered":t.bordered,"is-shadow":t.shadow,"is-wrap":t.wrap}]]),style:e.normalizeStyle(R.value)},[n.$slots.left?(e.openBlock(),e.createElementBlock("div",Po,[e.renderSlot(n.$slots,"left",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",To,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.right?(e.openBlock(),e.createElementBlock("div",Ao,[e.renderSlot(n.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Fo=te._export_sfc(No,[["__scopeId","data-v-d1ffc43c"]]),fe=d.withInstall(de.Upload,"QyUpload"),me=d.withInstall(Dt.Image,"QyImage"),pe=d.withInstall(zt._sfc_main,"QyImagePreview"),ge=d.withInstall(Un,"QyImageUpload"),he=d.withInstall(re._sfc_main,"QyDialog"),ve=d.withInstall(no,"QyRemarkImage"),we=d.withInstall(Ot.Button,"QyButton"),Qe=d.withInstall(Kt.Dropdown,"QyDropdown"),_e=d.withInstall(Mt._sfc_main,"QyInput"),be=d.withInstall(Lt._sfc_main,"QyInputTag"),ke=d.withInstall(Ut._sfc_main,"QyInputNumber"),Se=d.withInstall(jt._sfc_main,"QyMoneyInput"),Ce=d.withInstall(Wt._sfc_main,"QyDatePicker"),xe=d.withInstall(Gt.Checkbox,"QyCheckbox"),Be=d.withInstall(Ht._sfc_main,"QyCheckboxGroup"),Ve=d.withInstall(Jt.Radio,"QyRadio"),Ie=d.withInstall(Zt._sfc_main,"QyAutocomplete"),qe=d.withInstall(Xt.MenuActions,"QyMenuActions"),$e=d.withInstall(Yt.TableColumnSettings,"QyTableColumnSettings"),Ee=d.withInstall(en._sfc_main,"QyRadioGroup"),Pe=d.withInstall(oo,"QyRemoteSelect"),Te=d.withInstall(Pt,"QySearchInput"),Ae=d.withInstall(mo,"QyRecordQuoteSearch"),Ne=d.withInstall(ye.Select,"QySelect"),Fe=d.withInstall(qt.TreeSelect,"QyTreeSelect"),Re=d.withInstall(Tt,"QySelectionDialog"),De=d.withInstall(xo,"QyLegacySelectionDialog"),ze=d.withInstall(Eo,"QyFormSection"),Oe=d.withInstall(Fo,"QyActionBar"),Ke=d.withInstall(nn.FilePicker,"QyFilePicker"),Me=d.withInstall(on.Switch,"QySwitch"),Le=d.withInstall(ie.Tag,"QyTag"),Ue=d.withInstall(an._sfc_main,"QyBadge"),je=d.withInstall(ln._sfc_main,"QyCascader"),We=d.withInstall(rn._sfc_main,"QyTooltip"),Ge=d.withInstall(cn._sfc_main,"QyPopover"),He=d.withInstall(sn._sfc_main,"QyPopconfirm"),Je=d.withInstall(un._sfc_main,"QySkeleton"),Ze=d.withInstall(dn._sfc_main,"QySkeletonItem"),Xe=d.withInstall(yn._sfc_main,"QyTabs"),Ye=d.withInstall(fn._sfc_main,"QyTabPane"),et=d.withInstall(mn._sfc_main,"QySteps"),tt=d.withInstall(pn._sfc_main,"QyStep"),nt=d.withInstall(gn.Fullscreen,"QyFullscreen"),ot=d.withInstall(wn._sfc_main,"QyRow"),at=d.withInstall(Qn._sfc_main,"QyCol"),lt=d.withInstall(_n._sfc_main,"QyContainer"),rt=d.withInstall(bn._sfc_main,"QyAside"),it=d.withInstall(kn._sfc_main,"QyMain"),ct=d.withInstall(Sn._sfc_main,"QyDescriptions"),st=d.withInstall(Cn._sfc_main,"QyDescriptionsItem"),ut=d.withInstall(xn._sfc_main,"QyCollapse"),dt=d.withInstall(Bn._sfc_main,"QyCollapseItem"),yt=d.withInstall(Vn._sfc_main,"QyLink"),ft=d.withInstall(In.Iframe,"QyIframe"),mt=d.withInstall(qn._sfc_main,"QyDivider"),pt=d.withInstall($n._sfc_main,"QyEmpty"),gt=d.withInstall(En._sfc_main,"QyAlert"),ht=d.withInstall(Pn._sfc_main,"QyCard"),vt=d.withInstall(Tn._sfc_main,"QyResult"),wt=d.withInstall(An._sfc_main,"QyWatermark"),Qt=d.withInstall(Nn._sfc_main,"QyScrollbar"),_t=d.withInstall(Fn._sfc_main,"QyProgress"),bt=d.withInstall(Rn._sfc_main,"QyStatistic"),kt=d.withInstall(Dn._sfc_main,"QyAvatar"),St=d.withInstall(zn._sfc_main,"QyTree"),Ct=d.withInstall(On.Pagination,"QyPagination"),xt=d.withInstall(hn._sfc_main,"QyIconPicker"),Bt=d.withInstall(vn._sfc_main,"QyColorPicker"),Vt=d.withInstall(Kn._sfc_main,"QyDrawer"),Ro=t=>{ce.QyLoading.install(t),t.component("QyDialog",he),t.component("QyDrawer",Vt),t.component("QyUpload",fe),t.component("QyImage",me),t.component("QyImagePreview",pe),t.component("QyImageUpload",ge),t.component("QyRemarkImage",ve),t.component("QyButton",we),t.component("QyDropdown",Qe),t.component("QyInput",_e),t.component("QyInputTag",be),t.component("QyInputNumber",ke),t.component("QyMoneyInput",Se),t.component("QyDatePicker",Ce),t.component("QyCheckbox",xe),t.component("QyCheckboxGroup",Be),t.component("QyRadio",Ve),t.component("QyAutocomplete",Ie),t.component("QyMenuActions",qe),t.component("QyTableColumnSettings",$e),t.component("QyRadioGroup",Ee),t.component("QyRemoteSelect",Pe),t.component("QySearchInput",Te),t.component("QyRecordQuoteSearch",Ae),t.component("QySelect",Ne),t.component("QyTreeSelect",Fe),t.component("QySelectionDialog",Re),t.component("QyLegacySelectionDialog",De),t.component("QyFormSection",ze),t.component("QyActionBar",Oe),t.component("QyFilePicker",Ke),t.component("QySwitch",Me),t.component("QyTag",Le),t.component("QyBadge",Ue),t.component("QyCascader",je),t.component("QyTooltip",We),t.component("QyPopover",Ge),t.component("QyPopconfirm",He),t.component("QySkeleton",Je),t.component("QySkeletonItem",Ze),t.component("QyTabs",Xe),t.component("QyTabPane",Ye),t.component("QySteps",et),t.component("QyStep",tt),t.component("QyFullscreen",nt),t.component("QyIcon",$t.QyIcon),t.component("QyIconPicker",xt),t.component("QyColorPicker",Bt),t.component("QyRow",ot),t.component("QyCol",at),t.component("QyContainer",lt),t.component("QyAside",rt),t.component("QyMain",it),t.component("QyDescriptions",ct),t.component("QyDescriptionsItem",st),t.component("QyCollapse",ut),t.component("QyCollapseItem",dt),t.component("QyLink",yt),t.component("QyIframe",ft),t.component("QyDivider",mt),t.component("QyEmpty",pt),t.component("QyAlert",gt),t.component("QyCard",ht),t.component("QyResult",vt),t.component("QyWatermark",wt),t.component("QyScrollbar",Qt),t.component("QyProgress",_t),t.component("QyStatistic",bt),t.component("QyAvatar",kt),t.component("QyTree",St),t.component("QyPagination",Ct)},Do={install:Ro,QyUpload:fe,QyImage:me,QyImagePreview:pe,openQyImagePreview:Mn.openQyImagePreview,QyImageUpload:ge,QyDialog:he,QyButton:we,QyDropdown:Qe,QyInput:_e,QyInputTag:be,QyInputNumber:ke,QyMoneyInput:Se,QyDatePicker:Ce,QyCheckbox:xe,QyCheckboxGroup:Be,QyRadio:Ve,QyAutocomplete:Ie,QyMenuActions:qe,QyTableColumnSettings:$e,QyRadioGroup:Ee,QyRemoteSelect:Pe,QySearchInput:Te,QyRecordQuoteSearch:Ae,QySelect:Ne,QyTreeSelect:Fe,QySelectionDialog:Re,QyLegacySelectionDialog:De,QyFormSection:ze,QyActionBar:Oe,QyFilePicker:Ke,QySwitch:Me,QyTag:Le,QyBadge:Ue,QyCascader:je,QyTooltip:We,QyPopover:Ge,QyPopconfirm:He,QySkeleton:Je,QySkeletonItem:Ze,QyTabs:Xe,QyTabPane:Ye,QySteps:et,QyStep:tt,QyFullscreen:nt,QyDrawer:Vt,QyIcon:$t.QyIcon,QyIconPicker:xt,QyColorPicker:Bt,QyRow:ot,QyCol:at,QyContainer:lt,QyAside:rt,QyMain:it,QyDescriptions:ct,QyDescriptionsItem:st,QyCollapse:ut,QyCollapseItem:dt,QyLink:yt,QyIframe:ft,QyDivider:mt,QyEmpty:pt,QyAlert:gt,QyCard:ht,QyResult:vt,QyWatermark:wt,QyScrollbar:Qt,QyProgress:_t,QyStatistic:bt,QyAvatar:kt,QyTree:St,QyPagination:Ct,QyRemarkImage:ve,QyLoading:ce.QyLoading,vQyLoading:ce.vQyLoading,openQyLoading:Ln.openQyLoading};exports.QyActionBar=Oe;exports.QyAlert=gt;exports.QyAside=rt;exports.QyAutocomplete=Ie;exports.QyAvatar=kt;exports.QyBadge=Ue;exports.QyButton=we;exports.QyCard=ht;exports.QyCascader=je;exports.QyCheckbox=xe;exports.QyCheckboxGroup=Be;exports.QyCol=at;exports.QyCollapse=ut;exports.QyCollapseItem=dt;exports.QyColorPicker=Bt;exports.QyContainer=lt;exports.QyDatePicker=Ce;exports.QyDescriptions=ct;exports.QyDescriptionsItem=st;exports.QyDialog=he;exports.QyDivider=mt;exports.QyDrawer=Vt;exports.QyDropdown=Qe;exports.QyEmpty=pt;exports.QyFilePicker=Ke;exports.QyFormSection=ze;exports.QyFullscreen=nt;exports.QyIconPicker=xt;exports.QyIframe=ft;exports.QyImage=me;exports.QyImagePreview=pe;exports.QyImageUpload=ge;exports.QyInput=_e;exports.QyInputNumber=ke;exports.QyInputTag=be;exports.QyLegacySelectionDialog=De;exports.QyLink=yt;exports.QyMain=it;exports.QyMenuActions=qe;exports.QyMoneyInput=Se;exports.QyPagination=Ct;exports.QyPopconfirm=He;exports.QyPopover=Ge;exports.QyProgress=_t;exports.QyRadio=Ve;exports.QyRadioGroup=Ee;exports.QyRecordQuoteSearch=Ae;exports.QyRemarkImage=ve;exports.QyRemoteSelect=Pe;exports.QyResult=vt;exports.QyRow=ot;exports.QyScrollbar=Qt;exports.QySearchInput=Te;exports.QySelect=Ne;exports.QySelectionDialog=Re;exports.QySkeleton=Je;exports.QySkeletonItem=Ze;exports.QyStatistic=bt;exports.QyStep=tt;exports.QySteps=et;exports.QySwitch=Me;exports.QyTabPane=Ye;exports.QyTableColumnSettings=$e;exports.QyTabs=Xe;exports.QyTag=Le;exports.QyTooltip=We;exports.QyTree=St;exports.QyTreeSelect=Fe;exports.QyUpload=fe;exports.QyWatermark=wt;exports.formatRemarkText=Et;exports.index=Do;exports.parseRemarkText=se;exports.parseRemarkWithImage=ue;
|
|
@@ -257,7 +257,7 @@ const yt = ["accept", "multiple", "disabled"], xt = ["disabled"], ht = { class:
|
|
|
257
257
|
}
|
|
258
258
|
function ze(e) {
|
|
259
259
|
const t = new Set(e.map((a) => a.url)), l = s.value.filter(
|
|
260
|
-
(a) => a.status === "uploading" && !t.has(a.url)
|
|
260
|
+
(a) => (a.status === "ready" || a.status === "uploading") && !t.has(a.url)
|
|
261
261
|
);
|
|
262
262
|
return [...e, ...l];
|
|
263
263
|
}
|
|
@@ -759,7 +759,7 @@ const yt = ["accept", "multiple", "disabled"], xt = ["disabled"], ht = { class:
|
|
|
759
759
|
], 6);
|
|
760
760
|
};
|
|
761
761
|
}
|
|
762
|
-
}), Dt = /* @__PURE__ */ pt(Rt, [["__scopeId", "data-v-
|
|
762
|
+
}), Dt = /* @__PURE__ */ pt(Rt, [["__scopeId", "data-v-3c99c409"]]);
|
|
763
763
|
export {
|
|
764
764
|
Dt as U,
|
|
765
765
|
mt as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),x=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),x=require("./index-afOuq3YX.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=["tabindex","aria-disabled","onClick","onKeydown"],C={class:"qy-file-picker__label"},D={key:0,class:"qy-file-picker__hint"},F=["disabled"],q=e.defineComponent({name:"QyFilePicker",__name:"index",props:{modelValue:{default:null},extensions:{default:()=>[]},maxSizeMb:{default:20},disabled:{type:Boolean,default:!1},drag:{type:Boolean,default:!0},placeholder:{default:"请选择文件"}},emits:["update:modelValue","change","clear","invalid"],setup(l,{expose:b,emit:h}){const a=l,t=h,n=e.ref(null),d=e.ref(!1),v=e.computed(()=>a.modelValue?[a.modelValue]:[]);let o=!1;function p(){var i;a.disabled||(i=n.value)==null||i.openFileDialog()}function c(){var i;o=!0,(i=n.value)==null||i.clearFiles(),o=!1,t("update:modelValue",null),t("change",null),t("clear")}function g(){a.disabled||c()}function u(){!a.disabled&&a.drag&&(d.value=!0)}function f(){d.value=!1}function k(i){if(o)return;const s=i[0]??null;t("update:modelValue",s),t("change",s)}function y(i){t("invalid",i)}return b({openFileDialog:p,clear:c}),(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-file-picker",{"is-disabled":l.disabled,"is-dragover":d.value}])},[e.createVNode(x.Upload,{ref_key:"uploadRef",ref:n,variant:"file-list","auto-upload":!1,"selected-files":v.value,"file-type":l.extensions,"file-size":l.maxSizeMb,disabled:l.disabled,"disable-drag":!l.drag,multiple:!1,limit:1,"show-text":!1,"show-paste-input":!1,"onUpdate:selectedFiles":k,onInvalid:y},{trigger:e.withCtx(({open:r})=>{var m;return[e.createElementVNode("div",{class:e.normalizeClass(["qy-file-picker__dropzone",{"is-click-only":!l.drag}]),role:"button",tabindex:l.disabled?-1:0,"aria-disabled":l.disabled?"true":void 0,onClick:r,onKeydown:[e.withKeys(e.withModifiers(r,["prevent"]),["enter"]),e.withKeys(e.withModifiers(r,["prevent"]),["space"])],onDragenter:e.withModifiers(u,["prevent"]),onDragover:e.withModifiers(u,["prevent"]),onDragleave:e.withModifiers(f,["prevent"]),onDrop:f},[e.createElementVNode("span",C,e.toDisplayString(((m=l.modelValue)==null?void 0:m.name)||l.placeholder),1),l.drag?(e.openBlock(),e.createElementBlock("span",D," 点击选择或拖拽单个文件到此处 ")):e.createCommentVNode("",!0)],42,w)]}),_:1},8,["selected-files","file-type","file-size","disabled","disable-drag"]),l.modelValue?(e.openBlock(),e.createElementBlock("button",{key:0,class:"qy-file-picker__clear",type:"button",disabled:l.disabled,onClick:e.withModifiers(g,["stop"])}," 清空 ",8,F)):e.createCommentVNode("",!0)],2))}}),B=V._export_sfc(q,[["__scopeId","data-v-5dba995b"]]);exports.FilePicker=B;
|