@fmdevui/fm-dev 1.0.106 → 1.0.108

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.
@@ -740,6 +740,10 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
740
740
  type: StringConstructor;
741
741
  default: string;
742
742
  };
743
+ dropHeight: {
744
+ type: StringConstructor;
745
+ default: string;
746
+ };
743
747
  apiService: {
744
748
  type: StringConstructor;
745
749
  default: string;
@@ -800,6 +804,10 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
800
804
  type: StringConstructor;
801
805
  default: string;
802
806
  };
807
+ dropHeight: {
808
+ type: StringConstructor;
809
+ default: string;
810
+ };
803
811
  apiService: {
804
812
  type: StringConstructor;
805
813
  default: string;
@@ -831,6 +839,7 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
831
839
  apiAction: string;
832
840
  inputWidth: string;
833
841
  dropWidth: string;
842
+ dropHeight: string;
834
843
  basecode: string;
835
844
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
836
845
  declare const Fminputtable: {
@@ -43,6 +43,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
43
43
  type: StringConstructor;
44
44
  default: string;
45
45
  };
46
+ dropHeight: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
46
50
  /**
47
51
  * api service name
48
52
  */
@@ -118,6 +122,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
118
122
  type: StringConstructor;
119
123
  default: string;
120
124
  };
125
+ dropHeight: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
121
129
  /**
122
130
  * api service name
123
131
  */
@@ -158,6 +166,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
158
166
  apiAction: string;
159
167
  inputWidth: string;
160
168
  dropWidth: string;
169
+ dropHeight: string;
161
170
  basecode: string;
162
171
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
163
172
  export default _default;
@@ -39,6 +39,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
39
39
  type: String,
40
40
  default: "90px"
41
41
  },
42
+ dropHeight: {
43
+ type: String,
44
+ default: "180px"
45
+ },
42
46
  /**
43
47
  * api service name
44
48
  */
@@ -114,7 +118,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
114
118
  }, {
115
119
  dropdown: withCtx(() => [
116
120
  createVNode(_component_el_dropdown_menu, {
117
- style: normalizeStyle({ width: __props.dropWidth })
121
+ style: normalizeStyle({ width: __props.dropWidth, height: __props.dropHeight })
118
122
  }, {
119
123
  default: withCtx(() => [
120
124
  (openBlock(true), createElementBlock(
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.106 */
1
+ /*! fm-dev v1.0.108 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -35414,6 +35414,10 @@
35414
35414
  type: String,
35415
35415
  default: "90px"
35416
35416
  },
35417
+ dropHeight: {
35418
+ type: String,
35419
+ default: "180px"
35420
+ },
35417
35421
  /**
35418
35422
  * api service name
35419
35423
  */
@@ -35489,7 +35493,7 @@
35489
35493
  }, {
35490
35494
  dropdown: vue.withCtx(() => [
35491
35495
  vue.createVNode(_component_el_dropdown_menu, {
35492
- style: vue.normalizeStyle({ width: __props.dropWidth })
35496
+ style: vue.normalizeStyle({ width: __props.dropWidth, height: __props.dropHeight })
35493
35497
  }, {
35494
35498
  default: vue.withCtx(() => [
35495
35499
  (vue.openBlock(true), vue.createElementBlock(
package/index.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.106 */(function(j,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("crypto"),require("url"),require("http"),require("https"),require("util"),require("stream"),require("assert"),require("zlib"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","crypto","url","http","https","util","stream","assert","zlib","element-plus"],r):(j=typeof globalThis<"u"?globalThis:j||self,r(j.FmPlus={},j.Vue,j.crypto,j.require$$0,j.require$$1,j.require$$2,j.util,j.stream,j.require$$4,j.zlib,j.ElementPlus))})(this,function(j,r,a2,a6,Z7,ur,er,ce,o2,ve,_u){"use strict";const E2={class:"fm-transfer-panel"},l2={class:"fm-transfer-panel__header"},i2={class:"fm-transfer-panel__body"},s2={class:"fm-transfer-buttons__item"},C2={class:"fm-transfer-buttons__item"},F2={class:"fm-transfer-buttons__item"},c2={class:"fm-transfer-buttons__item"},B2={class:"fm-transfer-panel"},D2={class:"fm-transfer-panel__header"},d2={class:"fm-transfer-panel__body"};var p2=r.defineComponent({name:"FmTransfer",__name:"index",props:{leftTitle:String,rightTitle:String,options:{type:Object,default:()=>({value:"id",label:"name",disabled:"disabled"})},leftData:{type:Array,default:()=>[]},rightData:{type:Array,default:()=>[]}},emits:["left","right","allLeft","allRight","update:leftData","update:rightData"],setup(u,{emit:e}){const t=u,n=e,a=r.reactive({leftAllChecked:!1,leftKeyword:"",leftChecked:[],rightAllChecked:!1,rightKeyword:"",rightChecked:[]}),o=r.computed(()=>{let c=t.leftData.filter(p=>p[t.options.label].toLowerCase().includes(a.leftKeyword.toLowerCase()));if(a.leftChecked.length>0)for(let p=a.leftChecked.length-1;p>=0;p--)c.findIndex(A=>A[t.options.value]==a.leftChecked[p])==-1&&a.leftChecked.splice(p,1);return c}),E=c=>{a.leftChecked=c?o.value.filter(p=>p[t.options.disabled]==!1).map(p=>p[t.options.value]):[]},l=r.computed(()=>{const c=a.leftChecked.length;return c>0&&c<o.value.filter(h=>h[t.options.disabled]==!1).length});r.watch(()=>a.leftChecked,c=>{a.leftAllChecked=c.length>0&&c.length==o.value.filter(p=>p[t.options.disabled]==!1).length});const i=r.computed(()=>{let c=t.rightData.filter(p=>p[t.options.label].toLowerCase().includes(a.rightKeyword.toLowerCase()));if(a.rightChecked.length>0)for(let p=a.rightChecked.length-1;p>=0;p--)c.findIndex(A=>A[t.options.value]==a.rightChecked[p])==-1&&a.rightChecked.splice(p,1);return c}),s=c=>{a.rightChecked=c?i.value.filter(p=>p[t.options.disabled]==!1).map(p=>p[t.options.value]):[]},C=r.computed(()=>{const c=a.rightChecked.length;return c>0&&c<i.value.filter(h=>h[t.options.disabled]==!1).length});r.watch(()=>a.rightChecked,c=>{a.rightAllChecked=c.length>0&&c.length==i.value.filter(p=>p[t.options.disabled]==!1).length});const D=c=>{if(c[t.options.value]&&c[t.options.disabled]===!1){let p=t.leftData.filter(A=>c[t.options.value]==A[t.options.value]),h=t.leftData.filter(A=>c[t.options.value]!=A[t.options.value]);n("update:leftData",h),n("update:rightData",t.rightData.concat(p)),n("right"),a.leftChecked=a.leftChecked.filter(A=>c[t.options.value]!=A)}},B=()=>{if(a.leftChecked?.length>0){let c=t.leftData.filter(h=>a.leftChecked.some(A=>A==h[t.options.value])),p=t.leftData.filter(h=>a.leftChecked.every(A=>A!=h[t.options.value]));n("update:leftData",p),n("update:rightData",t.rightData.concat(c)),n("right"),a.leftChecked=[]}},m=()=>{if(o.value?.length>0){let c=o.value.filter(A=>A[t.options.disabled]==!1),p=t.leftData.filter(A=>c.some(x=>x[t.options.value]==A[t.options.value])),h=t.leftData.filter(A=>c.every(x=>x[t.options.value]!=A[t.options.value]));n("update:leftData",h),n("update:rightData",t.rightData.concat(p)),n("allRight"),a.leftChecked=[]}},F=c=>{if(c[t.options.value]&&c[t.options.disabled]===!1){let p=t.rightData.filter(A=>c[t.options.value]==A[t.options.value]),h=t.rightData.filter(A=>c[t.options.value]!=A[t.options.value]);n("update:leftData",t.leftData.concat(p)),n("update:rightData",h),n("left"),a.rightChecked=a.rightChecked.filter(A=>c[t.options.value]!=A)}},f=()=>{if(a.rightChecked?.length>0){let c=t.rightData.filter(h=>a.rightChecked.some(A=>A==h[t.options.value])),p=t.rightData.filter(h=>a.rightChecked.every(A=>A!=h[t.options.value]));n("update:leftData",t.leftData.concat(c)),n("update:rightData",p),n("left"),a.rightChecked=[]}},d=()=>{if(i.value?.length>0){let c=i.value.filter(A=>A[t.options.disabled]==!1),p=t.rightData.filter(A=>c.some(x=>x[t.options.value]==A[t.options.value])),h=t.rightData.filter(A=>c.every(x=>x[t.options.value]!=A[t.options.value]));n("update:leftData",t.leftData.concat(p)),n("update:rightData",h),n("allLeft"),a.rightChecked=[]}};return(c,p)=>{const h=r.resolveComponent("el-checkbox"),A=r.resolveComponent("el-input"),x=r.resolveComponent("el-checkbox-group"),_=r.resolveComponent("el-col"),g=r.resolveComponent("el-button"),b=r.resolveComponent("el-row");return r.openBlock(),r.createBlock(b,{gutter:10},{default:r.withCtx(()=>[r.createVNode(_,{span:10},{default:r.withCtx(()=>[r.createElementVNode("div",E2,[r.createElementVNode("p",l2,[r.createVNode(h,{modelValue:a.leftAllChecked,"onUpdate:modelValue":p[0]||(p[0]=w=>a.leftAllChecked=w),indeterminate:l.value,"validate-event":!1,onChange:E},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.leftTitle),1)]),_:1},8,["modelValue","indeterminate"]),r.createElementVNode("span",null,r.toDisplayString(a.leftChecked.length)+"/"+r.toDisplayString(t.leftData.length),1)]),r.createElementVNode("div",i2,[r.createVNode(A,{class:"transfer-panel__filter",modelValue:a.leftKeyword,"onUpdate:modelValue":p[1]||(p[1]=w=>a.leftKeyword=w),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),r.withDirectives(r.createVNode(x,{modelValue:a.leftChecked,"onUpdate:modelValue":p[2]||(p[2]=w=>a.leftChecked=w),"validate-event":!1,class:"fm-transfer-panel__list"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(w,y)=>(r.openBlock(),r.createBlock(h,{key:y,value:w[t.options.value],label:w[t.options.label],disabled:w[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:v=>D(w)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[r.vShow,!0]])])])]),_:1}),r.createVNode(_,{span:4,class:"fm-transfer-buttons"},{default:r.withCtx(()=>[r.createElementVNode("div",s2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-ArrowRight",onClick:B})]),r.createElementVNode("div",C2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-ArrowLeft",onClick:f})]),r.createElementVNode("div",F2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-DArrowRight",onClick:m})]),r.createElementVNode("div",c2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-DArrowLeft",onClick:d})])]),_:1}),r.createVNode(_,{span:10},{default:r.withCtx(()=>[r.createElementVNode("div",B2,[r.createElementVNode("p",D2,[r.createVNode(h,{modelValue:a.rightAllChecked,"onUpdate:modelValue":p[3]||(p[3]=w=>a.rightAllChecked=w),indeterminate:C.value,"validate-event":!1,onChange:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.rightTitle),1)]),_:1},8,["modelValue","indeterminate"]),r.createElementVNode("span",null,r.toDisplayString(a.rightChecked.length)+"/"+r.toDisplayString(t.rightData.length),1)]),r.createElementVNode("div",d2,[r.createVNode(A,{class:"transfer-panel__filter",modelValue:a.rightKeyword,"onUpdate:modelValue":p[4]||(p[4]=w=>a.rightKeyword=w),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),r.withDirectives(r.createVNode(x,{modelValue:a.rightChecked,"onUpdate:modelValue":p[5]||(p[5]=w=>a.rightChecked=w),"validate-event":!1,class:"fm-transfer-panel__list"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(w,y)=>(r.openBlock(),r.createBlock(h,{key:y,value:w[t.options.value],label:w[t.options.label],disabled:w[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:v=>F(w)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[r.vShow,!0]])])])]),_:1})]),_:1})}}});const A2={class:"notice-bar-warp-text-box"},m2=["innerHTML"];var f2=r.defineComponent({name:"FmNoticeBar",__name:"index",props:{mode:{type:String,default:""},text:{type:String,default:""},color:{type:String,default:"var(--el-color-warning)"},background:{type:String,default:"var(--el-color-warning-light-9)"},size:{type:[Number,String],default:14},height:{type:Number,default:40},delay:{type:Number,default:1},speed:{type:Number,default:100},scrollable:{type:Boolean,default:!1},leftIcon:{type:String,default:"iconfont icon-tongzhi2"},rightIcon:{type:String,default:""}},emits:["close","link"],setup(u,{emit:e}){const t=u,n=r.ref(null),a=r.ref(null),o=r.reactive({isMode:!1,warpOWidth:0,textOWidth:0,animationDuration:0});r.onMounted(async()=>{t.scrollable||E()});const E=()=>{r.nextTick(()=>{if(n.value&&a.value){o.warpOWidth=n.value.offsetWidth,o.textOWidth=a.value.scrollWidth,o.animationDuration=(o.textOWidth+o.warpOWidth)/t.speed,a.value.style.animation="none",a.value.offsetHeight,a.value.style.animation=`marquee ${o.animationDuration}s linear infinite`;const l=`
1
+ /*! fm-dev v1.0.108 */(function(j,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("crypto"),require("url"),require("http"),require("https"),require("util"),require("stream"),require("assert"),require("zlib"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","crypto","url","http","https","util","stream","assert","zlib","element-plus"],r):(j=typeof globalThis<"u"?globalThis:j||self,r(j.FmPlus={},j.Vue,j.crypto,j.require$$0,j.require$$1,j.require$$2,j.util,j.stream,j.require$$4,j.zlib,j.ElementPlus))})(this,function(j,r,a2,a6,Z7,ur,er,ce,o2,ve,_u){"use strict";const E2={class:"fm-transfer-panel"},l2={class:"fm-transfer-panel__header"},i2={class:"fm-transfer-panel__body"},s2={class:"fm-transfer-buttons__item"},C2={class:"fm-transfer-buttons__item"},F2={class:"fm-transfer-buttons__item"},c2={class:"fm-transfer-buttons__item"},B2={class:"fm-transfer-panel"},D2={class:"fm-transfer-panel__header"},d2={class:"fm-transfer-panel__body"};var p2=r.defineComponent({name:"FmTransfer",__name:"index",props:{leftTitle:String,rightTitle:String,options:{type:Object,default:()=>({value:"id",label:"name",disabled:"disabled"})},leftData:{type:Array,default:()=>[]},rightData:{type:Array,default:()=>[]}},emits:["left","right","allLeft","allRight","update:leftData","update:rightData"],setup(u,{emit:e}){const t=u,n=e,a=r.reactive({leftAllChecked:!1,leftKeyword:"",leftChecked:[],rightAllChecked:!1,rightKeyword:"",rightChecked:[]}),o=r.computed(()=>{let c=t.leftData.filter(p=>p[t.options.label].toLowerCase().includes(a.leftKeyword.toLowerCase()));if(a.leftChecked.length>0)for(let p=a.leftChecked.length-1;p>=0;p--)c.findIndex(A=>A[t.options.value]==a.leftChecked[p])==-1&&a.leftChecked.splice(p,1);return c}),E=c=>{a.leftChecked=c?o.value.filter(p=>p[t.options.disabled]==!1).map(p=>p[t.options.value]):[]},l=r.computed(()=>{const c=a.leftChecked.length;return c>0&&c<o.value.filter(h=>h[t.options.disabled]==!1).length});r.watch(()=>a.leftChecked,c=>{a.leftAllChecked=c.length>0&&c.length==o.value.filter(p=>p[t.options.disabled]==!1).length});const i=r.computed(()=>{let c=t.rightData.filter(p=>p[t.options.label].toLowerCase().includes(a.rightKeyword.toLowerCase()));if(a.rightChecked.length>0)for(let p=a.rightChecked.length-1;p>=0;p--)c.findIndex(A=>A[t.options.value]==a.rightChecked[p])==-1&&a.rightChecked.splice(p,1);return c}),s=c=>{a.rightChecked=c?i.value.filter(p=>p[t.options.disabled]==!1).map(p=>p[t.options.value]):[]},C=r.computed(()=>{const c=a.rightChecked.length;return c>0&&c<i.value.filter(h=>h[t.options.disabled]==!1).length});r.watch(()=>a.rightChecked,c=>{a.rightAllChecked=c.length>0&&c.length==i.value.filter(p=>p[t.options.disabled]==!1).length});const D=c=>{if(c[t.options.value]&&c[t.options.disabled]===!1){let p=t.leftData.filter(A=>c[t.options.value]==A[t.options.value]),h=t.leftData.filter(A=>c[t.options.value]!=A[t.options.value]);n("update:leftData",h),n("update:rightData",t.rightData.concat(p)),n("right"),a.leftChecked=a.leftChecked.filter(A=>c[t.options.value]!=A)}},B=()=>{if(a.leftChecked?.length>0){let c=t.leftData.filter(h=>a.leftChecked.some(A=>A==h[t.options.value])),p=t.leftData.filter(h=>a.leftChecked.every(A=>A!=h[t.options.value]));n("update:leftData",p),n("update:rightData",t.rightData.concat(c)),n("right"),a.leftChecked=[]}},m=()=>{if(o.value?.length>0){let c=o.value.filter(A=>A[t.options.disabled]==!1),p=t.leftData.filter(A=>c.some(x=>x[t.options.value]==A[t.options.value])),h=t.leftData.filter(A=>c.every(x=>x[t.options.value]!=A[t.options.value]));n("update:leftData",h),n("update:rightData",t.rightData.concat(p)),n("allRight"),a.leftChecked=[]}},F=c=>{if(c[t.options.value]&&c[t.options.disabled]===!1){let p=t.rightData.filter(A=>c[t.options.value]==A[t.options.value]),h=t.rightData.filter(A=>c[t.options.value]!=A[t.options.value]);n("update:leftData",t.leftData.concat(p)),n("update:rightData",h),n("left"),a.rightChecked=a.rightChecked.filter(A=>c[t.options.value]!=A)}},f=()=>{if(a.rightChecked?.length>0){let c=t.rightData.filter(h=>a.rightChecked.some(A=>A==h[t.options.value])),p=t.rightData.filter(h=>a.rightChecked.every(A=>A!=h[t.options.value]));n("update:leftData",t.leftData.concat(c)),n("update:rightData",p),n("left"),a.rightChecked=[]}},d=()=>{if(i.value?.length>0){let c=i.value.filter(A=>A[t.options.disabled]==!1),p=t.rightData.filter(A=>c.some(x=>x[t.options.value]==A[t.options.value])),h=t.rightData.filter(A=>c.every(x=>x[t.options.value]!=A[t.options.value]));n("update:leftData",t.leftData.concat(p)),n("update:rightData",h),n("allLeft"),a.rightChecked=[]}};return(c,p)=>{const h=r.resolveComponent("el-checkbox"),A=r.resolveComponent("el-input"),x=r.resolveComponent("el-checkbox-group"),_=r.resolveComponent("el-col"),g=r.resolveComponent("el-button"),b=r.resolveComponent("el-row");return r.openBlock(),r.createBlock(b,{gutter:10},{default:r.withCtx(()=>[r.createVNode(_,{span:10},{default:r.withCtx(()=>[r.createElementVNode("div",E2,[r.createElementVNode("p",l2,[r.createVNode(h,{modelValue:a.leftAllChecked,"onUpdate:modelValue":p[0]||(p[0]=w=>a.leftAllChecked=w),indeterminate:l.value,"validate-event":!1,onChange:E},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.leftTitle),1)]),_:1},8,["modelValue","indeterminate"]),r.createElementVNode("span",null,r.toDisplayString(a.leftChecked.length)+"/"+r.toDisplayString(t.leftData.length),1)]),r.createElementVNode("div",i2,[r.createVNode(A,{class:"transfer-panel__filter",modelValue:a.leftKeyword,"onUpdate:modelValue":p[1]||(p[1]=w=>a.leftKeyword=w),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),r.withDirectives(r.createVNode(x,{modelValue:a.leftChecked,"onUpdate:modelValue":p[2]||(p[2]=w=>a.leftChecked=w),"validate-event":!1,class:"fm-transfer-panel__list"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(w,y)=>(r.openBlock(),r.createBlock(h,{key:y,value:w[t.options.value],label:w[t.options.label],disabled:w[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:v=>D(w)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[r.vShow,!0]])])])]),_:1}),r.createVNode(_,{span:4,class:"fm-transfer-buttons"},{default:r.withCtx(()=>[r.createElementVNode("div",s2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-ArrowRight",onClick:B})]),r.createElementVNode("div",C2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-ArrowLeft",onClick:f})]),r.createElementVNode("div",F2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-DArrowRight",onClick:m})]),r.createElementVNode("div",c2,[r.createVNode(g,{type:"primary",style:{},icon:"ele-DArrowLeft",onClick:d})])]),_:1}),r.createVNode(_,{span:10},{default:r.withCtx(()=>[r.createElementVNode("div",B2,[r.createElementVNode("p",D2,[r.createVNode(h,{modelValue:a.rightAllChecked,"onUpdate:modelValue":p[3]||(p[3]=w=>a.rightAllChecked=w),indeterminate:C.value,"validate-event":!1,onChange:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.rightTitle),1)]),_:1},8,["modelValue","indeterminate"]),r.createElementVNode("span",null,r.toDisplayString(a.rightChecked.length)+"/"+r.toDisplayString(t.rightData.length),1)]),r.createElementVNode("div",d2,[r.createVNode(A,{class:"transfer-panel__filter",modelValue:a.rightKeyword,"onUpdate:modelValue":p[4]||(p[4]=w=>a.rightKeyword=w),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),r.withDirectives(r.createVNode(x,{modelValue:a.rightChecked,"onUpdate:modelValue":p[5]||(p[5]=w=>a.rightChecked=w),"validate-event":!1,class:"fm-transfer-panel__list"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(w,y)=>(r.openBlock(),r.createBlock(h,{key:y,value:w[t.options.value],label:w[t.options.label],disabled:w[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:v=>F(w)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[r.vShow,!0]])])])]),_:1})]),_:1})}}});const A2={class:"notice-bar-warp-text-box"},m2=["innerHTML"];var f2=r.defineComponent({name:"FmNoticeBar",__name:"index",props:{mode:{type:String,default:""},text:{type:String,default:""},color:{type:String,default:"var(--el-color-warning)"},background:{type:String,default:"var(--el-color-warning-light-9)"},size:{type:[Number,String],default:14},height:{type:Number,default:40},delay:{type:Number,default:1},speed:{type:Number,default:100},scrollable:{type:Boolean,default:!1},leftIcon:{type:String,default:"iconfont icon-tongzhi2"},rightIcon:{type:String,default:""}},emits:["close","link"],setup(u,{emit:e}){const t=u,n=r.ref(null),a=r.ref(null),o=r.reactive({isMode:!1,warpOWidth:0,textOWidth:0,animationDuration:0});r.onMounted(async()=>{t.scrollable||E()});const E=()=>{r.nextTick(()=>{if(n.value&&a.value){o.warpOWidth=n.value.offsetWidth,o.textOWidth=a.value.scrollWidth,o.animationDuration=(o.textOWidth+o.warpOWidth)/t.speed,a.value.style.animation="none",a.value.offsetHeight,a.value.style.animation=`marquee ${o.animationDuration}s linear infinite`;const l=`
2
2
  @keyframes marquee {
3
3
  0% { transform: translateX(${o.warpOWidth}px); }
4
4
  100% { transform: translateX(-${o.textOWidth}px); }
@@ -58,7 +58,7 @@ Only state can be modified.`);E[0]="$state",y5=!1,n.set(o,E,n.state.value),y5=!0
58
58
  state: () => new MyClass()
59
59
  Found in store "${g.$id}".`),F&&o&&t.hydrate&&t.hydrate(g.$state,F),s=!0,C=!0,g}/*! #__NO_SIDE_EFFECTS__ */function e5(u,e,t){let n;const a=typeof e=="function";n=a?t:e;function o(E,l){const i=r.hasInjectionContext();if(E=(process.env.NODE_ENV==="test"&&Qe&&Qe._testing?null:E)||(i?r.inject($t,null):null),E&&t0(E),process.env.NODE_ENV!=="production"&&!Qe)throw new Error(`[\u{1F34D}]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
60
60
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
61
- This will fail in production.`);E=Qe,E._s.has(u)||(a?I7(u,e,n,E):yo(u,n,E),process.env.NODE_ENV!=="production"&&(o._pinia=E));const s=E._s.get(u);if(process.env.NODE_ENV!=="production"&&l){const C="__hot:"+u,D=a?I7(C,e,n,E,!0):yo(C,re({},n),E,!0);l._hotUpdate(D),delete E.state.value[C],E._s.delete(C)}if(process.env.NODE_ENV!=="production"&&_e){const C=r.getCurrentInstance();if(C&&C.proxy&&!l){const D=C.proxy,B="_pStores"in D?D._pStores:D._pStores={};B[u]=s}}return s}return o.$id=u,o}const T_=e5("fminputdropdownstore",()=>{const u=r.reactive({optionsData:{}});return{state:u,getOptionsData:async(t,n,a,o=!1)=>{if(!o&&u.optionsData[a]&&u.optionsData[a].length>0)return u.optionsData[a];const E=await Pe(t).get(null,n+"/?codetype="+a);return u.optionsData[a]=E.data.result??[]}}});var S_=r.defineComponent({name:"Fminputdropdown",__name:"index",props:r.mergeModels({optionData:{type:Array,default:[]},bvalue:{type:String,default:"id"},blabel:{type:String,default:"name"},placeholder:{type:String,default:"\u8BF7\u9009\u62E9"},inputWidth:{type:String,default:"40%"},dropWidth:{type:String,default:"90px"},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"baseDataList"},basecode:{type:String,default:""}},{id:{type:Number,default:0},idModifiers:{},name:{type:String,default:""},nameModifiers:{}}),emits:r.mergeModels(["change"],["update:id","update:name"]),setup(u,{emit:e}){const t=r.useModel(u,"id"),n=r.useModel(u,"name"),a=u,o=T_(),E=r.reactive({optionData:a.optionData}),l=e,i=C=>{const D=E.optionData.find(B=>B[a.bvalue]===C);t.value=D!=null?[a.bvalue]:0,n.value=D!=null?D[a.blabel]:"",l("change",D)};r.onMounted(async()=>{E.optionData=a.optionData,a.basecode&&a.basecode!=""&&(E.optionData=await o.getOptionsData(a.apiService,a.apiAction,a.basecode))});const s=async()=>{a.basecode&&a.basecode!=""&&(E.optionData=await o.getOptionsData(a.apiService,a.apiAction,a.basecode,!0))};return(C,D)=>{const B=r.resolveComponent("el-icon"),m=r.resolveComponent("el-input"),F=r.resolveComponent("el-dropdown-item"),f=r.resolveComponent("el-dropdown-menu"),d=r.resolveComponent("el-dropdown");return r.openBlock(),r.createBlock(d,{class:"fminputdropdown",placement:"bottom",trigger:"click",style:{width:"100%"},onCommand:i},{dropdown:r.withCtx(()=>[r.createVNode(f,{style:r.normalizeStyle({width:u.dropWidth})},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.optionData,(c,p)=>(r.openBlock(),r.createBlock(F,{key:p,command:c[u.bvalue],divided:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c[u.blabel]),1)]),_:2},1032,["command"]))),128))]),_:1},8,["style"])]),default:r.withCtx(()=>[r.createVNode(m,{modelValue:n.value,"onUpdate:modelValue":D[0]||(D[0]=c=>n.value=c),placeholder:a.placeholder,style:r.normalizeStyle({width:u.inputWidth})},{append:r.withCtx(()=>[r.createVNode(B,{color:"#13c2c2",onClick:s},{default:r.withCtx(()=>[r.createVNode(r.unref(x1))]),_:1})]),_:1},8,["modelValue","placeholder","style"])]),_:1})}}});const L_={class:"w100 selector-loading-container"};var N_=r.defineComponent({name:"Fminputtable",__name:"index",props:{modelValue:[String,Number,Array,null],fetchOptions:{type:Function},islocalData:{type:Boolean,default:!1},localdataList:{type:Array,default:[]},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"BaseData"},method:{type:String,default:"post"},valueProp:{type:String,default:"id"},labelProp:{type:String,default:"name"},labelFormat:{type:Function,default:u=>{}},keywordProp:{type:String,default:"keyword"},dropdownWidth:{type:String,default:"100%"},dropdownHeight:{type:String,default:"550px"},placeholder:{type:String,default:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"},defaultOptions:{type:Array,default:[]},queryHeightOffset:{type:Number,default:35},queryLabelWidth:{type:String},queryParams:{type:Object,default:()=>({})},pagination:{type:Boolean,default:!0},disabled:Boolean,multiple:Boolean,clearable:Boolean},emits:["update:modelValue","change"],setup(u,{expose:e,emit:t}){const n={MAX_PAGE_SIZE:99999,DROPDOWN_DELAY:1e3,TABLE_HEIGHT_OFFSET:175},a=u,o=r.ref(),E=r.ref(),l=t,i=r.reactive({selectedValues:"",tableQuery:{[a.keywordProp]:"",page:a.queryParams.page,pageSize:a.queryParams?.pageSize},tableData:{items:[],total:0},defaultOptions:a.defaultOptions,loading:!1,selectedRows:[],isQuerying:!1,justOpened:!1}),s=r.ref(-1),C=r.computed(()=>{const L=`${a.dropdownHeight} - ${n.TABLE_HEIGHT_OFFSET}px`,$=a.queryHeightOffset>0?` - ${a.queryHeightOffset}px`:"";return`calc(${L}${$})`}),D=L=>{const $=i.tableData.items.filter(k=>L.includes(k[a.valueProp])),S=i.selectedRows.filter(k=>L.includes(k[a.valueProp])),P=[...$];return S.forEach(k=>{P.find(I=>I[a.valueProp]===k[a.valueProp])||P.push(k)}),P},B=L=>!L||L[a.valueProp]===void 0||L[a.valueProp]===null?!1:a.multiple?Array.isArray(i.selectedValues)?i.selectedValues.some($=>$===L[a.valueProp]):!1:i.selectedValues!==null&&i.selectedValues!==void 0&&i.selectedValues===L[a.valueProp],m=()=>{if(a.multiple){const L=Array.isArray(i.selectedValues)?i.selectedValues:[];i.selectedRows=D(L)}else{const L=i.tableData.items.find($=>$[a.valueProp]===i.selectedValues);i.selectedRows=L?[L]:[]}},F=L=>{const $=i.tableData?.items||[];if($.length){if(L.key==="ArrowDown"||L.key==="ArrowUp"){L.preventDefault();const S=L.key==="ArrowDown"?1:-1,P=Math.max(0,Math.min(s.value+S,$.length-1));if(P!==s.value){s.value=P;const k=$[P];o.value?.setCurrentRow(k)}}else if(L.key==="Enter"){const S=$[s.value];_(S)}}},f=L=>{i.loading=!0,i.tableQuery.pageSize=L,i.tableQuery.page=1,c()},d=L=>{i.loading=!0,i.tableQuery.page=L,c()};r.onMounted(()=>{E.value?.inputRef?.addEventListener("keydown",F)}),r.onUnmounted(()=>{E.value?.inputRef?.removeEventListener("keydown",F)});const c=()=>{if(i.isQuerying)return;i.isQuerying=!0,i.loading=!0;const L=Object.assign({},a.queryParams,i.tableQuery);typeof a.fetchOptions=="function"?a.fetchOptions(L).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):a.islocalData?(i.tableData.items=a.localdataList,i.tableData.total=1,i.loading=!1,i.isQuerying=!1,m()):a.method=="post"?Pe(a.apiAction).post(L,a.apiAction).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):Pe(a.apiAction).get(L,a.apiAction).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1})},p=()=>{i.loading=!0;const L=i.tableQuery.pageSize;i.tableQuery=Object.assign({},a.queryParams,{pageSize:L}),i.tableQuery.page=1,c()},h=L=>{if(i.justOpened){i.justOpened=!1;return}i.isQuerying||(i.loading=!0,typeof L=="string"&&(i.tableQuery[a.keywordProp]=L.trim(),i.tableQuery.page=1),c())},A=(L=!1)=>{if(i.loading=!0,L){i.tableQuery[a.keywordProp]=void 0;const $=E.value.$el.querySelector("input");$&&($.value="")}i.tableQuery.page=1,h(i.tableQuery)},x=()=>{i.loading=!0,i.tableQuery.page=1,c()},_=L=>{if(!(!L||!L[a.valueProp])){if(typeof L[a.valueProp]=="string"&&(L[a.valueProp]=L[a.valueProp]?.trim()),b([L]),a.multiple){Array.isArray(i.selectedValues)||(i.selectedValues=[]);const $=Array.isArray(i.selectedValues)?[...i.selectedValues]:[],S=$.indexOf(L[a.valueProp]);S>-1?($.splice(S,1),i.selectedRows=i.selectedRows.filter(P=>P[a.valueProp]!==L[a.valueProp])):($.push(L[a.valueProp]),i.selectedRows.find(k=>k[a.valueProp]===L[a.valueProp])||i.selectedRows.push(L)),i.selectedValues=$}else i.selectedValues=L[a.valueProp],i.selectedRows=[L];l("update:modelValue",i.selectedValues),l("change",i.selectedValues,a.multiple?i.selectedRows:L),a.multiple||(o.value?.setCurrentRow(L),E.value?.blur())}},g=L=>{if(L){i.loading=!0,i.justOpened=!0;const $={page:i.tableQuery.page,pageSize:i.tableQuery.pageSize,[a.keywordProp]:void 0};i.tableQuery=Object.assign({},a.queryParams,$),c(),setTimeout(()=>{i.justOpened=!1},n.DROPDOWN_DELAY)}else i.loading=!1,i.justOpened=!1},b=L=>{const $=new Map;for(const S of[...L??[],...i.defaultOptions]){const P=S?.[a.valueProp],k=a.labelFormat?.(S)||S?.[a.labelProp];P&&k&&$.set(P,{[a.valueProp]:P,[a.labelProp]:k})}i.defaultOptions=Array.from($.values())},w=(L,$=!0)=>{a.pagination||(L=Object.assign(L,{pageSize:n.MAX_PAGE_SIZE})),L=Object.assign({},a.queryParams,L??{}),i.tableQuery=$?Object.assign(i.tableQuery,L):L},y=(L,$)=>{L=Array.isArray(L)?L:[L],i.tableData.total=L.length,i.tableData.items=L,a.multiple?(i.selectedValues=L.map(S=>S[a.valueProp]),i.selectedRows=L,l("update:modelValue",i.selectedValues),l("change",i.selectedValues,L)):(i.selectedValues=L[0]?.[a.valueProp],i.selectedRows=L[0]?[L[0]]:[],l("update:modelValue",i.selectedValues),l("change",i.selectedValues,L[0]))},v=L=>{if(i.selectedValues=L,l("update:modelValue",L),a.multiple){const $=Array.isArray(L)?L:[],S=D($);i.selectedRows=S,l("change",L,S)}else{const $=i.tableData?.items?.find(S=>S[a.valueProp]===L);$?(i.selectedRows=[$],o.value?.setCurrentRow($)):(i.selectedRows=[],o.value?.setCurrentRow(null)),l("change",L,$)}},R=({row:L})=>B(L)?{backgroundColor:"var(--el-color-primary-light-9)",borderLeft:"3px solid var(--el-color-primary)"}:{},q=({row:L})=>B(L)?"selected-row":"";return r.watch(()=>a.modelValue,L=>{a.multiple?i.selectedValues=Array.isArray(L)?L:L?[L]:[]:i.selectedValues=L,m()},{immediate:!0}),r.watch(()=>a.defaultOptions,L=>b(L),{immediate:!0}),e({setValue:y,handleQuery:A,setQueryParams:w,setDefaultOptions:b}),(L,$)=>{const S=r.resolveComponent("el-option"),P=r.resolveComponent("el-button"),k=r.resolveComponent("el-button-group"),I=r.resolveComponent("el-row"),J=r.resolveComponent("el-form"),M=r.resolveComponent("el-empty"),V=r.resolveComponent("el-table"),z=r.resolveComponent("el-pagination"),T=r.resolveComponent("el-select"),Y=r.resolveDirective("reclick"),G=r.resolveDirective("loading");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createCommentVNode(" Element Plus\u4E0B\u62C9\u9009\u62E9\u5668\u7EC4\u4EF6 "),r.createVNode(T,r.mergeProps(L.$attrs,{modelValue:i.selectedValues,"onUpdate:modelValue":$[1]||($[1]=eu=>i.selectedValues=eu),clearable:u.clearable,multiple:u.multiple,disabled:u.disabled,placeholder:u.placeholder,"remote-method":h,onVisibleChange:g,onChange:v,style:{width:u.dropdownWidth},"popper-class":"popper-class",ref_key:"selectRef",ref:E,"remote-show-suffix":"",filterable:"",remote:""}),{default:r.withCtx(()=>[r.createCommentVNode(" \u9690\u85CF\u7684\u9009\u9879\uFF0C\u7528\u4E8E\u5360\u4F4D\uFF0C\u9632\u6B62Element Plus\u8B66\u544A "),r.createVNode(S,{style:{width:"0",height:"0"},value:""}),r.createCommentVNode(" \u9ED8\u8BA4\u9009\u9879\uFF0C\u7528\u4E8E\u56DE\u663E\u6570\u636E "),r.createCommentVNode(" \u5F53\u9009\u4E2D\u7684\u6570\u636E\u4E0D\u5728\u5F53\u524D\u9875\u65F6\uFF0C\u901A\u8FC7\u8FD9\u4E9B\u9690\u85CF\u9009\u9879\u8FDB\u884C\u56DE\u663E "),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.defaultOptions??[],eu=>(r.openBlock(),r.createBlock(S,{key:eu[u.valueProp],label:u.labelFormat(eu)||eu[u.labelProp],value:eu[u.valueProp],style:{width:"0",height:"0"}},null,8,["label","value"]))),128)),r.createCommentVNode(" \u4E0B\u62C9\u6846\u5185\u5BB9\u533A\u57DF "),r.createCommentVNode(` \r
61
+ This will fail in production.`);E=Qe,E._s.has(u)||(a?I7(u,e,n,E):yo(u,n,E),process.env.NODE_ENV!=="production"&&(o._pinia=E));const s=E._s.get(u);if(process.env.NODE_ENV!=="production"&&l){const C="__hot:"+u,D=a?I7(C,e,n,E,!0):yo(C,re({},n),E,!0);l._hotUpdate(D),delete E.state.value[C],E._s.delete(C)}if(process.env.NODE_ENV!=="production"&&_e){const C=r.getCurrentInstance();if(C&&C.proxy&&!l){const D=C.proxy,B="_pStores"in D?D._pStores:D._pStores={};B[u]=s}}return s}return o.$id=u,o}const T_=e5("fminputdropdownstore",()=>{const u=r.reactive({optionsData:{}});return{state:u,getOptionsData:async(t,n,a,o=!1)=>{if(!o&&u.optionsData[a]&&u.optionsData[a].length>0)return u.optionsData[a];const E=await Pe(t).get(null,n+"/?codetype="+a);return u.optionsData[a]=E.data.result??[]}}});var S_=r.defineComponent({name:"Fminputdropdown",__name:"index",props:r.mergeModels({optionData:{type:Array,default:[]},bvalue:{type:String,default:"id"},blabel:{type:String,default:"name"},placeholder:{type:String,default:"\u8BF7\u9009\u62E9"},inputWidth:{type:String,default:"40%"},dropWidth:{type:String,default:"90px"},dropHeight:{type:String,default:"180px"},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"baseDataList"},basecode:{type:String,default:""}},{id:{type:Number,default:0},idModifiers:{},name:{type:String,default:""},nameModifiers:{}}),emits:r.mergeModels(["change"],["update:id","update:name"]),setup(u,{emit:e}){const t=r.useModel(u,"id"),n=r.useModel(u,"name"),a=u,o=T_(),E=r.reactive({optionData:a.optionData}),l=e,i=C=>{const D=E.optionData.find(B=>B[a.bvalue]===C);t.value=D!=null?[a.bvalue]:0,n.value=D!=null?D[a.blabel]:"",l("change",D)};r.onMounted(async()=>{E.optionData=a.optionData,a.basecode&&a.basecode!=""&&(E.optionData=await o.getOptionsData(a.apiService,a.apiAction,a.basecode))});const s=async()=>{a.basecode&&a.basecode!=""&&(E.optionData=await o.getOptionsData(a.apiService,a.apiAction,a.basecode,!0))};return(C,D)=>{const B=r.resolveComponent("el-icon"),m=r.resolveComponent("el-input"),F=r.resolveComponent("el-dropdown-item"),f=r.resolveComponent("el-dropdown-menu"),d=r.resolveComponent("el-dropdown");return r.openBlock(),r.createBlock(d,{class:"fminputdropdown",placement:"bottom",trigger:"click",style:{width:"100%"},onCommand:i},{dropdown:r.withCtx(()=>[r.createVNode(f,{style:r.normalizeStyle({width:u.dropWidth,height:u.dropHeight})},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.optionData,(c,p)=>(r.openBlock(),r.createBlock(F,{key:p,command:c[u.bvalue],divided:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c[u.blabel]),1)]),_:2},1032,["command"]))),128))]),_:1},8,["style"])]),default:r.withCtx(()=>[r.createVNode(m,{modelValue:n.value,"onUpdate:modelValue":D[0]||(D[0]=c=>n.value=c),placeholder:a.placeholder,style:r.normalizeStyle({width:u.inputWidth})},{append:r.withCtx(()=>[r.createVNode(B,{color:"#13c2c2",onClick:s},{default:r.withCtx(()=>[r.createVNode(r.unref(x1))]),_:1})]),_:1},8,["modelValue","placeholder","style"])]),_:1})}}});const L_={class:"w100 selector-loading-container"};var N_=r.defineComponent({name:"Fminputtable",__name:"index",props:{modelValue:[String,Number,Array,null],fetchOptions:{type:Function},islocalData:{type:Boolean,default:!1},localdataList:{type:Array,default:[]},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"BaseData"},method:{type:String,default:"post"},valueProp:{type:String,default:"id"},labelProp:{type:String,default:"name"},labelFormat:{type:Function,default:u=>{}},keywordProp:{type:String,default:"keyword"},dropdownWidth:{type:String,default:"100%"},dropdownHeight:{type:String,default:"550px"},placeholder:{type:String,default:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"},defaultOptions:{type:Array,default:[]},queryHeightOffset:{type:Number,default:35},queryLabelWidth:{type:String},queryParams:{type:Object,default:()=>({})},pagination:{type:Boolean,default:!0},disabled:Boolean,multiple:Boolean,clearable:Boolean},emits:["update:modelValue","change"],setup(u,{expose:e,emit:t}){const n={MAX_PAGE_SIZE:99999,DROPDOWN_DELAY:1e3,TABLE_HEIGHT_OFFSET:175},a=u,o=r.ref(),E=r.ref(),l=t,i=r.reactive({selectedValues:"",tableQuery:{[a.keywordProp]:"",page:a.queryParams.page,pageSize:a.queryParams?.pageSize},tableData:{items:[],total:0},defaultOptions:a.defaultOptions,loading:!1,selectedRows:[],isQuerying:!1,justOpened:!1}),s=r.ref(-1),C=r.computed(()=>{const L=`${a.dropdownHeight} - ${n.TABLE_HEIGHT_OFFSET}px`,$=a.queryHeightOffset>0?` - ${a.queryHeightOffset}px`:"";return`calc(${L}${$})`}),D=L=>{const $=i.tableData.items.filter(k=>L.includes(k[a.valueProp])),S=i.selectedRows.filter(k=>L.includes(k[a.valueProp])),P=[...$];return S.forEach(k=>{P.find(I=>I[a.valueProp]===k[a.valueProp])||P.push(k)}),P},B=L=>!L||L[a.valueProp]===void 0||L[a.valueProp]===null?!1:a.multiple?Array.isArray(i.selectedValues)?i.selectedValues.some($=>$===L[a.valueProp]):!1:i.selectedValues!==null&&i.selectedValues!==void 0&&i.selectedValues===L[a.valueProp],m=()=>{if(a.multiple){const L=Array.isArray(i.selectedValues)?i.selectedValues:[];i.selectedRows=D(L)}else{const L=i.tableData.items.find($=>$[a.valueProp]===i.selectedValues);i.selectedRows=L?[L]:[]}},F=L=>{const $=i.tableData?.items||[];if($.length){if(L.key==="ArrowDown"||L.key==="ArrowUp"){L.preventDefault();const S=L.key==="ArrowDown"?1:-1,P=Math.max(0,Math.min(s.value+S,$.length-1));if(P!==s.value){s.value=P;const k=$[P];o.value?.setCurrentRow(k)}}else if(L.key==="Enter"){const S=$[s.value];_(S)}}},f=L=>{i.loading=!0,i.tableQuery.pageSize=L,i.tableQuery.page=1,c()},d=L=>{i.loading=!0,i.tableQuery.page=L,c()};r.onMounted(()=>{E.value?.inputRef?.addEventListener("keydown",F)}),r.onUnmounted(()=>{E.value?.inputRef?.removeEventListener("keydown",F)});const c=()=>{if(i.isQuerying)return;i.isQuerying=!0,i.loading=!0;const L=Object.assign({},a.queryParams,i.tableQuery);typeof a.fetchOptions=="function"?a.fetchOptions(L).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):a.islocalData?(i.tableData.items=a.localdataList,i.tableData.total=1,i.loading=!1,i.isQuerying=!1,m()):a.method=="post"?Pe(a.apiAction).post(L,a.apiAction).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):Pe(a.apiAction).get(L,a.apiAction).then($=>{const S=$.data?.result;i.tableData.items=S?.items??[],i.tableData.total=S?.total??0,i.loading=!1,i.isQuerying=!1,m()}).catch($=>{_u.ElMessage.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1})},p=()=>{i.loading=!0;const L=i.tableQuery.pageSize;i.tableQuery=Object.assign({},a.queryParams,{pageSize:L}),i.tableQuery.page=1,c()},h=L=>{if(i.justOpened){i.justOpened=!1;return}i.isQuerying||(i.loading=!0,typeof L=="string"&&(i.tableQuery[a.keywordProp]=L.trim(),i.tableQuery.page=1),c())},A=(L=!1)=>{if(i.loading=!0,L){i.tableQuery[a.keywordProp]=void 0;const $=E.value.$el.querySelector("input");$&&($.value="")}i.tableQuery.page=1,h(i.tableQuery)},x=()=>{i.loading=!0,i.tableQuery.page=1,c()},_=L=>{if(!(!L||!L[a.valueProp])){if(typeof L[a.valueProp]=="string"&&(L[a.valueProp]=L[a.valueProp]?.trim()),b([L]),a.multiple){Array.isArray(i.selectedValues)||(i.selectedValues=[]);const $=Array.isArray(i.selectedValues)?[...i.selectedValues]:[],S=$.indexOf(L[a.valueProp]);S>-1?($.splice(S,1),i.selectedRows=i.selectedRows.filter(P=>P[a.valueProp]!==L[a.valueProp])):($.push(L[a.valueProp]),i.selectedRows.find(k=>k[a.valueProp]===L[a.valueProp])||i.selectedRows.push(L)),i.selectedValues=$}else i.selectedValues=L[a.valueProp],i.selectedRows=[L];l("update:modelValue",i.selectedValues),l("change",i.selectedValues,a.multiple?i.selectedRows:L),a.multiple||(o.value?.setCurrentRow(L),E.value?.blur())}},g=L=>{if(L){i.loading=!0,i.justOpened=!0;const $={page:i.tableQuery.page,pageSize:i.tableQuery.pageSize,[a.keywordProp]:void 0};i.tableQuery=Object.assign({},a.queryParams,$),c(),setTimeout(()=>{i.justOpened=!1},n.DROPDOWN_DELAY)}else i.loading=!1,i.justOpened=!1},b=L=>{const $=new Map;for(const S of[...L??[],...i.defaultOptions]){const P=S?.[a.valueProp],k=a.labelFormat?.(S)||S?.[a.labelProp];P&&k&&$.set(P,{[a.valueProp]:P,[a.labelProp]:k})}i.defaultOptions=Array.from($.values())},w=(L,$=!0)=>{a.pagination||(L=Object.assign(L,{pageSize:n.MAX_PAGE_SIZE})),L=Object.assign({},a.queryParams,L??{}),i.tableQuery=$?Object.assign(i.tableQuery,L):L},y=(L,$)=>{L=Array.isArray(L)?L:[L],i.tableData.total=L.length,i.tableData.items=L,a.multiple?(i.selectedValues=L.map(S=>S[a.valueProp]),i.selectedRows=L,l("update:modelValue",i.selectedValues),l("change",i.selectedValues,L)):(i.selectedValues=L[0]?.[a.valueProp],i.selectedRows=L[0]?[L[0]]:[],l("update:modelValue",i.selectedValues),l("change",i.selectedValues,L[0]))},v=L=>{if(i.selectedValues=L,l("update:modelValue",L),a.multiple){const $=Array.isArray(L)?L:[],S=D($);i.selectedRows=S,l("change",L,S)}else{const $=i.tableData?.items?.find(S=>S[a.valueProp]===L);$?(i.selectedRows=[$],o.value?.setCurrentRow($)):(i.selectedRows=[],o.value?.setCurrentRow(null)),l("change",L,$)}},R=({row:L})=>B(L)?{backgroundColor:"var(--el-color-primary-light-9)",borderLeft:"3px solid var(--el-color-primary)"}:{},q=({row:L})=>B(L)?"selected-row":"";return r.watch(()=>a.modelValue,L=>{a.multiple?i.selectedValues=Array.isArray(L)?L:L?[L]:[]:i.selectedValues=L,m()},{immediate:!0}),r.watch(()=>a.defaultOptions,L=>b(L),{immediate:!0}),e({setValue:y,handleQuery:A,setQueryParams:w,setDefaultOptions:b}),(L,$)=>{const S=r.resolveComponent("el-option"),P=r.resolveComponent("el-button"),k=r.resolveComponent("el-button-group"),I=r.resolveComponent("el-row"),J=r.resolveComponent("el-form"),M=r.resolveComponent("el-empty"),V=r.resolveComponent("el-table"),z=r.resolveComponent("el-pagination"),T=r.resolveComponent("el-select"),Y=r.resolveDirective("reclick"),G=r.resolveDirective("loading");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createCommentVNode(" Element Plus\u4E0B\u62C9\u9009\u62E9\u5668\u7EC4\u4EF6 "),r.createVNode(T,r.mergeProps(L.$attrs,{modelValue:i.selectedValues,"onUpdate:modelValue":$[1]||($[1]=eu=>i.selectedValues=eu),clearable:u.clearable,multiple:u.multiple,disabled:u.disabled,placeholder:u.placeholder,"remote-method":h,onVisibleChange:g,onChange:v,style:{width:u.dropdownWidth},"popper-class":"popper-class",ref_key:"selectRef",ref:E,"remote-show-suffix":"",filterable:"",remote:""}),{default:r.withCtx(()=>[r.createCommentVNode(" \u9690\u85CF\u7684\u9009\u9879\uFF0C\u7528\u4E8E\u5360\u4F4D\uFF0C\u9632\u6B62Element Plus\u8B66\u544A "),r.createVNode(S,{style:{width:"0",height:"0"},value:""}),r.createCommentVNode(" \u9ED8\u8BA4\u9009\u9879\uFF0C\u7528\u4E8E\u56DE\u663E\u6570\u636E "),r.createCommentVNode(" \u5F53\u9009\u4E2D\u7684\u6570\u636E\u4E0D\u5728\u5F53\u524D\u9875\u65F6\uFF0C\u901A\u8FC7\u8FD9\u4E9B\u9690\u85CF\u9009\u9879\u8FDB\u884C\u56DE\u663E "),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.defaultOptions??[],eu=>(r.openBlock(),r.createBlock(S,{key:eu[u.valueProp],label:u.labelFormat(eu)||eu[u.labelProp],value:eu[u.valueProp],style:{width:"0",height:"0"}},null,8,["label","value"]))),128)),r.createCommentVNode(" \u4E0B\u62C9\u6846\u5185\u5BB9\u533A\u57DF "),r.createCommentVNode(` \r
62
62
  v-loading\u6307\u4EE4\uFF1A\u663E\u793A\u52A0\u8F7D\u52A8\u753B\r
63
63
  \u6CE8\u610F\uFF1Aloading\u72B6\u6001\u653E\u5728div\u4E0A\u800C\u4E0D\u662Ftable\u4E0A\uFF0C\u662F\u4E3A\u4E86\u8986\u76D6\u6574\u4E2A\u4E0B\u62C9\u533A\u57DF\uFF08\u5305\u62EC\u67E5\u8BE2\u8868\u5355\u548C\u5206\u9875\uFF09\r
64
64
  \u8FD9\u6837\u53EF\u4EE5\u907F\u514D\u67E5\u8BE2\u65F6\u95EA\u73B0"\u6682\u65E0\u6570\u636E"\u7684\u63D0\u793A\r
package/index.min.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.106 */import{defineComponent as w,reactive as M5,computed as xu,watch as Yu,resolveComponent as lu,createBlock as cu,openBlock as v,withCtx as ou,createVNode as su,createElementVNode as g,createTextVNode as Uu,toDisplayString as ku,withDirectives as p5,createElementBlock as b,Fragment as i5,renderList as y5,vShow as I6,ref as Au,onMounted as X5,nextTick as q5,normalizeStyle as u5,createCommentVNode as Bu,normalizeClass as Ce,withModifiers as Oe,mergeModels as b5,useModel as U5,effectScope as V6,getCurrentInstance as Re,shallowRef as ii,isRef as Q5,inject as nt,onUnmounted as $r,h as Wr,Text as li,createSlots as Et,renderSlot as E5,markRaw as Fe,hasInjectionContext as H6,toRaw as i0,isReactive as q6,toRef as U6,unref as Du,getCurrentScope as si,onScopeDispose as Ci,toRefs as Gr,resolveDirective as ce,mergeProps as Ju,resolveDynamicComponent as ze,useSlots as Kr,toHandlers as Yr,onBeforeUnmount as Fi,onUpdated as ci,useAttrs as Bi,normalizeProps as Jr,guardReactiveProps as Xr}from"vue";import Di from"crypto";import j6 from"url";import Qr from"http";import Zr from"https";import u3 from"util";import j5,{Readable as di}from"stream";import Ai from"assert";import Z5 from"zlib";import{ElMessage as Vu,ElLoading as pi,dayjs as mi}from"element-plus";const fi={class:"fm-transfer-panel"},hi={class:"fm-transfer-panel__header"},gi={class:"fm-transfer-panel__body"},xi={class:"fm-transfer-buttons__item"},vi={class:"fm-transfer-buttons__item"},_i={class:"fm-transfer-buttons__item"},yi={class:"fm-transfer-buttons__item"},bi={class:"fm-transfer-panel"},wi={class:"fm-transfer-panel__header"},Ti={class:"fm-transfer-panel__body"};var Si=w({name:"FmTransfer",__name:"index",props:{leftTitle:String,rightTitle:String,options:{type:Object,default:()=>({value:"id",label:"name",disabled:"disabled"})},leftData:{type:Array,default:()=>[]},rightData:{type:Array,default:()=>[]}},emits:["left","right","allLeft","allRight","update:leftData","update:rightData"],setup(u,{emit:e}){const t=u,r=e,n=M5({leftAllChecked:!1,leftKeyword:"",leftChecked:[],rightAllChecked:!1,rightKeyword:"",rightChecked:[]}),E=xu(()=>{let F=t.leftData.filter(d=>d[t.options.label].toLowerCase().includes(n.leftKeyword.toLowerCase()));if(n.leftChecked.length>0)for(let d=n.leftChecked.length-1;d>=0;d--)F.findIndex(A=>A[t.options.value]==n.leftChecked[d])==-1&&n.leftChecked.splice(d,1);return F}),a=F=>{n.leftChecked=F?E.value.filter(d=>d[t.options.disabled]==!1).map(d=>d[t.options.value]):[]},o=xu(()=>{const F=n.leftChecked.length;return F>0&&F<E.value.filter(f=>f[t.options.disabled]==!1).length});Yu(()=>n.leftChecked,F=>{n.leftAllChecked=F.length>0&&F.length==E.value.filter(d=>d[t.options.disabled]==!1).length});const i=xu(()=>{let F=t.rightData.filter(d=>d[t.options.label].toLowerCase().includes(n.rightKeyword.toLowerCase()));if(n.rightChecked.length>0)for(let d=n.rightChecked.length-1;d>=0;d--)F.findIndex(A=>A[t.options.value]==n.rightChecked[d])==-1&&n.rightChecked.splice(d,1);return F}),l=F=>{n.rightChecked=F?i.value.filter(d=>d[t.options.disabled]==!1).map(d=>d[t.options.value]):[]},s=xu(()=>{const F=n.rightChecked.length;return F>0&&F<i.value.filter(f=>f[t.options.disabled]==!1).length});Yu(()=>n.rightChecked,F=>{n.rightAllChecked=F.length>0&&F.length==i.value.filter(d=>d[t.options.disabled]==!1).length});const B=F=>{if(F[t.options.value]&&F[t.options.disabled]===!1){let d=t.leftData.filter(A=>F[t.options.value]==A[t.options.value]),f=t.leftData.filter(A=>F[t.options.value]!=A[t.options.value]);r("update:leftData",f),r("update:rightData",t.rightData.concat(d)),r("right"),n.leftChecked=n.leftChecked.filter(A=>F[t.options.value]!=A)}},c=()=>{if(n.leftChecked?.length>0){let F=t.leftData.filter(f=>n.leftChecked.some(A=>A==f[t.options.value])),d=t.leftData.filter(f=>n.leftChecked.every(A=>A!=f[t.options.value]));r("update:leftData",d),r("update:rightData",t.rightData.concat(F)),r("right"),n.leftChecked=[]}},p=()=>{if(E.value?.length>0){let F=E.value.filter(A=>A[t.options.disabled]==!1),d=t.leftData.filter(A=>F.some(x=>x[t.options.value]==A[t.options.value])),f=t.leftData.filter(A=>F.every(x=>x[t.options.value]!=A[t.options.value]));r("update:leftData",f),r("update:rightData",t.rightData.concat(d)),r("allRight"),n.leftChecked=[]}},C=F=>{if(F[t.options.value]&&F[t.options.disabled]===!1){let d=t.rightData.filter(A=>F[t.options.value]==A[t.options.value]),f=t.rightData.filter(A=>F[t.options.value]!=A[t.options.value]);r("update:leftData",t.leftData.concat(d)),r("update:rightData",f),r("left"),n.rightChecked=n.rightChecked.filter(A=>F[t.options.value]!=A)}},m=()=>{if(n.rightChecked?.length>0){let F=t.rightData.filter(f=>n.rightChecked.some(A=>A==f[t.options.value])),d=t.rightData.filter(f=>n.rightChecked.every(A=>A!=f[t.options.value]));r("update:leftData",t.leftData.concat(F)),r("update:rightData",d),r("left"),n.rightChecked=[]}},D=()=>{if(i.value?.length>0){let F=i.value.filter(A=>A[t.options.disabled]==!1),d=t.rightData.filter(A=>F.some(x=>x[t.options.value]==A[t.options.value])),f=t.rightData.filter(A=>F.every(x=>x[t.options.value]!=A[t.options.value]));r("update:leftData",t.leftData.concat(d)),r("update:rightData",f),r("allLeft"),n.rightChecked=[]}};return(F,d)=>{const f=lu("el-checkbox"),A=lu("el-input"),x=lu("el-checkbox-group"),_=lu("el-col"),h=lu("el-button"),T=lu("el-row");return v(),cu(T,{gutter:10},{default:ou(()=>[su(_,{span:10},{default:ou(()=>[g("div",fi,[g("p",hi,[su(f,{modelValue:n.leftAllChecked,"onUpdate:modelValue":d[0]||(d[0]=k=>n.leftAllChecked=k),indeterminate:o.value,"validate-event":!1,onChange:a},{default:ou(()=>[Uu(ku(t.leftTitle),1)]),_:1},8,["modelValue","indeterminate"]),g("span",null,ku(n.leftChecked.length)+"/"+ku(t.leftData.length),1)]),g("div",gi,[su(A,{class:"transfer-panel__filter",modelValue:n.leftKeyword,"onUpdate:modelValue":d[1]||(d[1]=k=>n.leftKeyword=k),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),p5(su(x,{modelValue:n.leftChecked,"onUpdate:modelValue":d[2]||(d[2]=k=>n.leftChecked=k),"validate-event":!1,class:"fm-transfer-panel__list"},{default:ou(()=>[(v(!0),b(i5,null,y5(E.value,(k,y)=>(v(),cu(f,{key:y,value:k[t.options.value],label:k[t.options.label],disabled:k[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:S=>B(k)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[I6,!0]])])])]),_:1}),su(_,{span:4,class:"fm-transfer-buttons"},{default:ou(()=>[g("div",xi,[su(h,{type:"primary",style:{},icon:"ele-ArrowRight",onClick:c})]),g("div",vi,[su(h,{type:"primary",style:{},icon:"ele-ArrowLeft",onClick:m})]),g("div",_i,[su(h,{type:"primary",style:{},icon:"ele-DArrowRight",onClick:p})]),g("div",yi,[su(h,{type:"primary",style:{},icon:"ele-DArrowLeft",onClick:D})])]),_:1}),su(_,{span:10},{default:ou(()=>[g("div",bi,[g("p",wi,[su(f,{modelValue:n.rightAllChecked,"onUpdate:modelValue":d[3]||(d[3]=k=>n.rightAllChecked=k),indeterminate:s.value,"validate-event":!1,onChange:l},{default:ou(()=>[Uu(ku(t.rightTitle),1)]),_:1},8,["modelValue","indeterminate"]),g("span",null,ku(n.rightChecked.length)+"/"+ku(t.rightData.length),1)]),g("div",Ti,[su(A,{class:"transfer-panel__filter",modelValue:n.rightKeyword,"onUpdate:modelValue":d[4]||(d[4]=k=>n.rightKeyword=k),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),p5(su(x,{modelValue:n.rightChecked,"onUpdate:modelValue":d[5]||(d[5]=k=>n.rightChecked=k),"validate-event":!1,class:"fm-transfer-panel__list"},{default:ou(()=>[(v(!0),b(i5,null,y5(i.value,(k,y)=>(v(),cu(f,{key:y,value:k[t.options.value],label:k[t.options.label],disabled:k[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:S=>C(k)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[I6,!0]])])])]),_:1})]),_:1})}}});const ki={class:"notice-bar-warp-text-box"},Li=["innerHTML"];var Pi=w({name:"FmNoticeBar",__name:"index",props:{mode:{type:String,default:""},text:{type:String,default:""},color:{type:String,default:"var(--el-color-warning)"},background:{type:String,default:"var(--el-color-warning-light-9)"},size:{type:[Number,String],default:14},height:{type:Number,default:40},delay:{type:Number,default:1},speed:{type:Number,default:100},scrollable:{type:Boolean,default:!1},leftIcon:{type:String,default:"iconfont icon-tongzhi2"},rightIcon:{type:String,default:""}},emits:["close","link"],setup(u,{emit:e}){const t=u,r=Au(null),n=Au(null),E=M5({isMode:!1,warpOWidth:0,textOWidth:0,animationDuration:0});X5(async()=>{t.scrollable||a()});const a=()=>{q5(()=>{if(r.value&&n.value){E.warpOWidth=r.value.offsetWidth,E.textOWidth=n.value.scrollWidth,E.animationDuration=(E.textOWidth+E.warpOWidth)/t.speed,n.value.style.animation="none",n.value.offsetHeight,n.value.style.animation=`marquee ${E.animationDuration}s linear infinite`;const o=`
1
+ /*! fm-dev v1.0.108 */import{defineComponent as w,reactive as M5,computed as xu,watch as Yu,resolveComponent as lu,createBlock as cu,openBlock as v,withCtx as ou,createVNode as su,createElementVNode as g,createTextVNode as Uu,toDisplayString as ku,withDirectives as p5,createElementBlock as b,Fragment as i5,renderList as y5,vShow as I6,ref as Au,onMounted as X5,nextTick as q5,normalizeStyle as u5,createCommentVNode as Bu,normalizeClass as Ce,withModifiers as Oe,mergeModels as b5,useModel as U5,effectScope as V6,getCurrentInstance as Re,shallowRef as ii,isRef as Q5,inject as nt,onUnmounted as $r,h as Wr,Text as li,createSlots as Et,renderSlot as E5,markRaw as Fe,hasInjectionContext as H6,toRaw as i0,isReactive as q6,toRef as U6,unref as Du,getCurrentScope as si,onScopeDispose as Ci,toRefs as Gr,resolveDirective as ce,mergeProps as Ju,resolveDynamicComponent as ze,useSlots as Kr,toHandlers as Yr,onBeforeUnmount as Fi,onUpdated as ci,useAttrs as Bi,normalizeProps as Jr,guardReactiveProps as Xr}from"vue";import Di from"crypto";import j6 from"url";import Qr from"http";import Zr from"https";import u3 from"util";import j5,{Readable as di}from"stream";import Ai from"assert";import Z5 from"zlib";import{ElMessage as Vu,ElLoading as pi,dayjs as mi}from"element-plus";const fi={class:"fm-transfer-panel"},hi={class:"fm-transfer-panel__header"},gi={class:"fm-transfer-panel__body"},xi={class:"fm-transfer-buttons__item"},vi={class:"fm-transfer-buttons__item"},_i={class:"fm-transfer-buttons__item"},yi={class:"fm-transfer-buttons__item"},bi={class:"fm-transfer-panel"},wi={class:"fm-transfer-panel__header"},Ti={class:"fm-transfer-panel__body"};var Si=w({name:"FmTransfer",__name:"index",props:{leftTitle:String,rightTitle:String,options:{type:Object,default:()=>({value:"id",label:"name",disabled:"disabled"})},leftData:{type:Array,default:()=>[]},rightData:{type:Array,default:()=>[]}},emits:["left","right","allLeft","allRight","update:leftData","update:rightData"],setup(u,{emit:e}){const t=u,r=e,n=M5({leftAllChecked:!1,leftKeyword:"",leftChecked:[],rightAllChecked:!1,rightKeyword:"",rightChecked:[]}),E=xu(()=>{let F=t.leftData.filter(d=>d[t.options.label].toLowerCase().includes(n.leftKeyword.toLowerCase()));if(n.leftChecked.length>0)for(let d=n.leftChecked.length-1;d>=0;d--)F.findIndex(A=>A[t.options.value]==n.leftChecked[d])==-1&&n.leftChecked.splice(d,1);return F}),a=F=>{n.leftChecked=F?E.value.filter(d=>d[t.options.disabled]==!1).map(d=>d[t.options.value]):[]},o=xu(()=>{const F=n.leftChecked.length;return F>0&&F<E.value.filter(f=>f[t.options.disabled]==!1).length});Yu(()=>n.leftChecked,F=>{n.leftAllChecked=F.length>0&&F.length==E.value.filter(d=>d[t.options.disabled]==!1).length});const i=xu(()=>{let F=t.rightData.filter(d=>d[t.options.label].toLowerCase().includes(n.rightKeyword.toLowerCase()));if(n.rightChecked.length>0)for(let d=n.rightChecked.length-1;d>=0;d--)F.findIndex(A=>A[t.options.value]==n.rightChecked[d])==-1&&n.rightChecked.splice(d,1);return F}),l=F=>{n.rightChecked=F?i.value.filter(d=>d[t.options.disabled]==!1).map(d=>d[t.options.value]):[]},s=xu(()=>{const F=n.rightChecked.length;return F>0&&F<i.value.filter(f=>f[t.options.disabled]==!1).length});Yu(()=>n.rightChecked,F=>{n.rightAllChecked=F.length>0&&F.length==i.value.filter(d=>d[t.options.disabled]==!1).length});const B=F=>{if(F[t.options.value]&&F[t.options.disabled]===!1){let d=t.leftData.filter(A=>F[t.options.value]==A[t.options.value]),f=t.leftData.filter(A=>F[t.options.value]!=A[t.options.value]);r("update:leftData",f),r("update:rightData",t.rightData.concat(d)),r("right"),n.leftChecked=n.leftChecked.filter(A=>F[t.options.value]!=A)}},c=()=>{if(n.leftChecked?.length>0){let F=t.leftData.filter(f=>n.leftChecked.some(A=>A==f[t.options.value])),d=t.leftData.filter(f=>n.leftChecked.every(A=>A!=f[t.options.value]));r("update:leftData",d),r("update:rightData",t.rightData.concat(F)),r("right"),n.leftChecked=[]}},p=()=>{if(E.value?.length>0){let F=E.value.filter(A=>A[t.options.disabled]==!1),d=t.leftData.filter(A=>F.some(x=>x[t.options.value]==A[t.options.value])),f=t.leftData.filter(A=>F.every(x=>x[t.options.value]!=A[t.options.value]));r("update:leftData",f),r("update:rightData",t.rightData.concat(d)),r("allRight"),n.leftChecked=[]}},C=F=>{if(F[t.options.value]&&F[t.options.disabled]===!1){let d=t.rightData.filter(A=>F[t.options.value]==A[t.options.value]),f=t.rightData.filter(A=>F[t.options.value]!=A[t.options.value]);r("update:leftData",t.leftData.concat(d)),r("update:rightData",f),r("left"),n.rightChecked=n.rightChecked.filter(A=>F[t.options.value]!=A)}},m=()=>{if(n.rightChecked?.length>0){let F=t.rightData.filter(f=>n.rightChecked.some(A=>A==f[t.options.value])),d=t.rightData.filter(f=>n.rightChecked.every(A=>A!=f[t.options.value]));r("update:leftData",t.leftData.concat(F)),r("update:rightData",d),r("left"),n.rightChecked=[]}},D=()=>{if(i.value?.length>0){let F=i.value.filter(A=>A[t.options.disabled]==!1),d=t.rightData.filter(A=>F.some(x=>x[t.options.value]==A[t.options.value])),f=t.rightData.filter(A=>F.every(x=>x[t.options.value]!=A[t.options.value]));r("update:leftData",t.leftData.concat(d)),r("update:rightData",f),r("allLeft"),n.rightChecked=[]}};return(F,d)=>{const f=lu("el-checkbox"),A=lu("el-input"),x=lu("el-checkbox-group"),_=lu("el-col"),h=lu("el-button"),T=lu("el-row");return v(),cu(T,{gutter:10},{default:ou(()=>[su(_,{span:10},{default:ou(()=>[g("div",fi,[g("p",hi,[su(f,{modelValue:n.leftAllChecked,"onUpdate:modelValue":d[0]||(d[0]=k=>n.leftAllChecked=k),indeterminate:o.value,"validate-event":!1,onChange:a},{default:ou(()=>[Uu(ku(t.leftTitle),1)]),_:1},8,["modelValue","indeterminate"]),g("span",null,ku(n.leftChecked.length)+"/"+ku(t.leftData.length),1)]),g("div",gi,[su(A,{class:"transfer-panel__filter",modelValue:n.leftKeyword,"onUpdate:modelValue":d[1]||(d[1]=k=>n.leftKeyword=k),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),p5(su(x,{modelValue:n.leftChecked,"onUpdate:modelValue":d[2]||(d[2]=k=>n.leftChecked=k),"validate-event":!1,class:"fm-transfer-panel__list"},{default:ou(()=>[(v(!0),b(i5,null,y5(E.value,(k,y)=>(v(),cu(f,{key:y,value:k[t.options.value],label:k[t.options.label],disabled:k[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:S=>B(k)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[I6,!0]])])])]),_:1}),su(_,{span:4,class:"fm-transfer-buttons"},{default:ou(()=>[g("div",xi,[su(h,{type:"primary",style:{},icon:"ele-ArrowRight",onClick:c})]),g("div",vi,[su(h,{type:"primary",style:{},icon:"ele-ArrowLeft",onClick:m})]),g("div",_i,[su(h,{type:"primary",style:{},icon:"ele-DArrowRight",onClick:p})]),g("div",yi,[su(h,{type:"primary",style:{},icon:"ele-DArrowLeft",onClick:D})])]),_:1}),su(_,{span:10},{default:ou(()=>[g("div",bi,[g("p",wi,[su(f,{modelValue:n.rightAllChecked,"onUpdate:modelValue":d[3]||(d[3]=k=>n.rightAllChecked=k),indeterminate:s.value,"validate-event":!1,onChange:l},{default:ou(()=>[Uu(ku(t.rightTitle),1)]),_:1},8,["modelValue","indeterminate"]),g("span",null,ku(n.rightChecked.length)+"/"+ku(t.rightData.length),1)]),g("div",Ti,[su(A,{class:"transfer-panel__filter",modelValue:n.rightKeyword,"onUpdate:modelValue":d[4]||(d[4]=k=>n.rightKeyword=k),placeholder:"\u641C\u7D22","prefix-icon":"ele-Search",clearable:"","validate-event":!1},null,8,["modelValue"]),p5(su(x,{modelValue:n.rightChecked,"onUpdate:modelValue":d[5]||(d[5]=k=>n.rightChecked=k),"validate-event":!1,class:"fm-transfer-panel__list"},{default:ou(()=>[(v(!0),b(i5,null,y5(i.value,(k,y)=>(v(),cu(f,{key:y,value:k[t.options.value],label:k[t.options.label],disabled:k[t.options.disabled],"validate-event":!1,class:"fm-transfer-panel__item",onDblclick:S=>C(k)},null,8,["value","label","disabled","onDblclick"]))),128))]),_:1},8,["modelValue"]),[[I6,!0]])])])]),_:1})]),_:1})}}});const ki={class:"notice-bar-warp-text-box"},Li=["innerHTML"];var Pi=w({name:"FmNoticeBar",__name:"index",props:{mode:{type:String,default:""},text:{type:String,default:""},color:{type:String,default:"var(--el-color-warning)"},background:{type:String,default:"var(--el-color-warning-light-9)"},size:{type:[Number,String],default:14},height:{type:Number,default:40},delay:{type:Number,default:1},speed:{type:Number,default:100},scrollable:{type:Boolean,default:!1},leftIcon:{type:String,default:"iconfont icon-tongzhi2"},rightIcon:{type:String,default:""}},emits:["close","link"],setup(u,{emit:e}){const t=u,r=Au(null),n=Au(null),E=M5({isMode:!1,warpOWidth:0,textOWidth:0,animationDuration:0});X5(async()=>{t.scrollable||a()});const a=()=>{q5(()=>{if(r.value&&n.value){E.warpOWidth=r.value.offsetWidth,E.textOWidth=n.value.scrollWidth,E.animationDuration=(E.textOWidth+E.warpOWidth)/t.speed,n.value.style.animation="none",n.value.offsetHeight,n.value.style.animation=`marquee ${E.animationDuration}s linear infinite`;const o=`
2
2
  @keyframes marquee {
3
3
  0% { transform: translateX(${E.warpOWidth}px); }
4
4
  100% { transform: translateX(-${E.textOWidth}px); }
@@ -58,7 +58,7 @@ Only state can be modified.`);a[0]="$state",t0=!1,r.set(E,a,r.state.value),t0=!0
58
58
  state: () => new MyClass()
59
59
  Found in store "${h.$id}".`),C&&E&&t.hydrate&&t.hydrate(h.$state,C),l=!0,s=!0,h}/*! #__NO_SIDE_EFFECTS__ */function Te(u,e,t){let r;const n=typeof e=="function";r=n?t:e;function E(a,o){const i=H6();if(a=(process.env.NODE_ENV==="test"&&ye&&ye._testing?null:a)||(i?nt(_6,null):null),a&&M0(a),process.env.NODE_ENV!=="production"&&!ye)throw new Error(`[\u{1F34D}]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
60
60
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
61
- This will fail in production.`);a=ye,a._s.has(u)||(n?_r(u,e,r,a):vo(u,r,a),process.env.NODE_ENV!=="production"&&(E._pinia=a));const l=a._s.get(u);if(process.env.NODE_ENV!=="production"&&o){const s="__hot:"+u,B=n?_r(s,e,r,a,!0):vo(s,g5({},r),a,!0);o._hotUpdate(B),delete a.state.value[s],a._s.delete(s)}if(process.env.NODE_ENV!=="production"&&G5){const s=Re();if(s&&s.proxy&&!o){const B=s.proxy,c="_pStores"in B?B._pStores:B._pStores={};c[u]=l}}return l}return E.$id=u,E}const Y_=Te("fminputdropdownstore",()=>{const u=M5({optionsData:{}});return{state:u,getOptionsData:async(t,r,n,E=!1)=>{if(!E&&u.optionsData[n]&&u.optionsData[n].length>0)return u.optionsData[n];const a=await ae(t).get(null,r+"/?codetype="+n);return u.optionsData[n]=a.data.result??[]}}});var J_=w({name:"Fminputdropdown",__name:"index",props:b5({optionData:{type:Array,default:[]},bvalue:{type:String,default:"id"},blabel:{type:String,default:"name"},placeholder:{type:String,default:"\u8BF7\u9009\u62E9"},inputWidth:{type:String,default:"40%"},dropWidth:{type:String,default:"90px"},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"baseDataList"},basecode:{type:String,default:""}},{id:{type:Number,default:0},idModifiers:{},name:{type:String,default:""},nameModifiers:{}}),emits:b5(["change"],["update:id","update:name"]),setup(u,{emit:e}){const t=U5(u,"id"),r=U5(u,"name"),n=u,E=Y_(),a=M5({optionData:n.optionData}),o=e,i=s=>{const B=a.optionData.find(c=>c[n.bvalue]===s);t.value=B!=null?[n.bvalue]:0,r.value=B!=null?B[n.blabel]:"",o("change",B)};X5(async()=>{a.optionData=n.optionData,n.basecode&&n.basecode!=""&&(a.optionData=await E.getOptionsData(n.apiService,n.apiAction,n.basecode))});const l=async()=>{n.basecode&&n.basecode!=""&&(a.optionData=await E.getOptionsData(n.apiService,n.apiAction,n.basecode,!0))};return(s,B)=>{const c=lu("el-icon"),p=lu("el-input"),C=lu("el-dropdown-item"),m=lu("el-dropdown-menu"),D=lu("el-dropdown");return v(),cu(D,{class:"fminputdropdown",placement:"bottom",trigger:"click",style:{width:"100%"},onCommand:i},{dropdown:ou(()=>[su(m,{style:u5({width:u.dropWidth})},{default:ou(()=>[(v(!0),b(i5,null,y5(a.optionData,(F,d)=>(v(),cu(C,{key:d,command:F[u.bvalue],divided:""},{default:ou(()=>[Uu(ku(F[u.blabel]),1)]),_:2},1032,["command"]))),128))]),_:1},8,["style"])]),default:ou(()=>[su(p,{modelValue:r.value,"onUpdate:modelValue":B[0]||(B[0]=F=>r.value=F),placeholder:n.placeholder,style:u5({width:u.inputWidth})},{append:ou(()=>[su(c,{color:"#13c2c2",onClick:l},{default:ou(()=>[su(Du(gE))]),_:1})]),_:1},8,["modelValue","placeholder","style"])]),_:1})}}});const X_={class:"w100 selector-loading-container"};var Q_=w({name:"Fminputtable",__name:"index",props:{modelValue:[String,Number,Array,null],fetchOptions:{type:Function},islocalData:{type:Boolean,default:!1},localdataList:{type:Array,default:[]},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"BaseData"},method:{type:String,default:"post"},valueProp:{type:String,default:"id"},labelProp:{type:String,default:"name"},labelFormat:{type:Function,default:u=>{}},keywordProp:{type:String,default:"keyword"},dropdownWidth:{type:String,default:"100%"},dropdownHeight:{type:String,default:"550px"},placeholder:{type:String,default:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"},defaultOptions:{type:Array,default:[]},queryHeightOffset:{type:Number,default:35},queryLabelWidth:{type:String},queryParams:{type:Object,default:()=>({})},pagination:{type:Boolean,default:!0},disabled:Boolean,multiple:Boolean,clearable:Boolean},emits:["update:modelValue","change"],setup(u,{expose:e,emit:t}){const r={MAX_PAGE_SIZE:99999,DROPDOWN_DELAY:1e3,TABLE_HEIGHT_OFFSET:175},n=u,E=Au(),a=Au(),o=t,i=M5({selectedValues:"",tableQuery:{[n.keywordProp]:"",page:n.queryParams.page,pageSize:n.queryParams?.pageSize},tableData:{items:[],total:0},defaultOptions:n.defaultOptions,loading:!1,selectedRows:[],isQuerying:!1,justOpened:!1}),l=Au(-1),s=xu(()=>{const O=`${n.dropdownHeight} - ${r.TABLE_HEIGHT_OFFSET}px`,G=n.queryHeightOffset>0?` - ${n.queryHeightOffset}px`:"";return`calc(${O}${G})`}),B=O=>{const G=i.tableData.items.filter(L=>O.includes(L[n.valueProp])),M=i.selectedRows.filter(L=>O.includes(L[n.valueProp])),z=[...G];return M.forEach(L=>{z.find(U=>U[n.valueProp]===L[n.valueProp])||z.push(L)}),z},c=O=>!O||O[n.valueProp]===void 0||O[n.valueProp]===null?!1:n.multiple?Array.isArray(i.selectedValues)?i.selectedValues.some(G=>G===O[n.valueProp]):!1:i.selectedValues!==null&&i.selectedValues!==void 0&&i.selectedValues===O[n.valueProp],p=()=>{if(n.multiple){const O=Array.isArray(i.selectedValues)?i.selectedValues:[];i.selectedRows=B(O)}else{const O=i.tableData.items.find(G=>G[n.valueProp]===i.selectedValues);i.selectedRows=O?[O]:[]}},C=O=>{const G=i.tableData?.items||[];if(G.length){if(O.key==="ArrowDown"||O.key==="ArrowUp"){O.preventDefault();const M=O.key==="ArrowDown"?1:-1,z=Math.max(0,Math.min(l.value+M,G.length-1));if(z!==l.value){l.value=z;const L=G[z];E.value?.setCurrentRow(L)}}else if(O.key==="Enter"){const M=G[l.value];_(M)}}},m=O=>{i.loading=!0,i.tableQuery.pageSize=O,i.tableQuery.page=1,F()},D=O=>{i.loading=!0,i.tableQuery.page=O,F()};X5(()=>{a.value?.inputRef?.addEventListener("keydown",C)}),$r(()=>{a.value?.inputRef?.removeEventListener("keydown",C)});const F=()=>{if(i.isQuerying)return;i.isQuerying=!0,i.loading=!0;const O=Object.assign({},n.queryParams,i.tableQuery);typeof n.fetchOptions=="function"?n.fetchOptions(O).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):n.islocalData?(i.tableData.items=n.localdataList,i.tableData.total=1,i.loading=!1,i.isQuerying=!1,p()):n.method=="post"?ae(n.apiAction).post(O,n.apiAction).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):ae(n.apiAction).get(O,n.apiAction).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1})},d=()=>{i.loading=!0;const O=i.tableQuery.pageSize;i.tableQuery=Object.assign({},n.queryParams,{pageSize:O}),i.tableQuery.page=1,F()},f=O=>{if(i.justOpened){i.justOpened=!1;return}i.isQuerying||(i.loading=!0,typeof O=="string"&&(i.tableQuery[n.keywordProp]=O.trim(),i.tableQuery.page=1),F())},A=(O=!1)=>{if(i.loading=!0,O){i.tableQuery[n.keywordProp]=void 0;const G=a.value.$el.querySelector("input");G&&(G.value="")}i.tableQuery.page=1,f(i.tableQuery)},x=()=>{i.loading=!0,i.tableQuery.page=1,F()},_=O=>{if(!(!O||!O[n.valueProp])){if(typeof O[n.valueProp]=="string"&&(O[n.valueProp]=O[n.valueProp]?.trim()),T([O]),n.multiple){Array.isArray(i.selectedValues)||(i.selectedValues=[]);const G=Array.isArray(i.selectedValues)?[...i.selectedValues]:[],M=G.indexOf(O[n.valueProp]);M>-1?(G.splice(M,1),i.selectedRows=i.selectedRows.filter(z=>z[n.valueProp]!==O[n.valueProp])):(G.push(O[n.valueProp]),i.selectedRows.find(L=>L[n.valueProp]===O[n.valueProp])||i.selectedRows.push(O)),i.selectedValues=G}else i.selectedValues=O[n.valueProp],i.selectedRows=[O];o("update:modelValue",i.selectedValues),o("change",i.selectedValues,n.multiple?i.selectedRows:O),n.multiple||(E.value?.setCurrentRow(O),a.value?.blur())}},h=O=>{if(O){i.loading=!0,i.justOpened=!0;const G={page:i.tableQuery.page,pageSize:i.tableQuery.pageSize,[n.keywordProp]:void 0};i.tableQuery=Object.assign({},n.queryParams,G),F(),setTimeout(()=>{i.justOpened=!1},r.DROPDOWN_DELAY)}else i.loading=!1,i.justOpened=!1},T=O=>{const G=new Map;for(const M of[...O??[],...i.defaultOptions]){const z=M?.[n.valueProp],L=n.labelFormat?.(M)||M?.[n.labelProp];z&&L&&G.set(z,{[n.valueProp]:z,[n.labelProp]:L})}i.defaultOptions=Array.from(G.values())},k=(O,G=!0)=>{n.pagination||(O=Object.assign(O,{pageSize:r.MAX_PAGE_SIZE})),O=Object.assign({},n.queryParams,O??{}),i.tableQuery=G?Object.assign(i.tableQuery,O):O},y=(O,G)=>{O=Array.isArray(O)?O:[O],i.tableData.total=O.length,i.tableData.items=O,n.multiple?(i.selectedValues=O.map(M=>M[n.valueProp]),i.selectedRows=O,o("update:modelValue",i.selectedValues),o("change",i.selectedValues,O)):(i.selectedValues=O[0]?.[n.valueProp],i.selectedRows=O[0]?[O[0]]:[],o("update:modelValue",i.selectedValues),o("change",i.selectedValues,O[0]))},S=O=>{if(i.selectedValues=O,o("update:modelValue",O),n.multiple){const G=Array.isArray(O)?O:[],M=B(G);i.selectedRows=M,o("change",O,M)}else{const G=i.tableData?.items?.find(M=>M[n.valueProp]===O);G?(i.selectedRows=[G],E.value?.setCurrentRow(G)):(i.selectedRows=[],E.value?.setCurrentRow(null)),o("change",O,G)}},H=({row:O})=>c(O)?{backgroundColor:"var(--el-color-primary-light-9)",borderLeft:"3px solid var(--el-color-primary)"}:{},$=({row:O})=>c(O)?"selected-row":"";return Yu(()=>n.modelValue,O=>{n.multiple?i.selectedValues=Array.isArray(O)?O:O?[O]:[]:i.selectedValues=O,p()},{immediate:!0}),Yu(()=>n.defaultOptions,O=>T(O),{immediate:!0}),e({setValue:y,handleQuery:A,setQueryParams:k,setDefaultOptions:T}),(O,G)=>{const M=lu("el-option"),z=lu("el-button"),L=lu("el-button-group"),U=lu("el-row"),Q=lu("el-form"),N=lu("el-empty"),I=lu("el-table"),q=lu("el-pagination"),P=lu("el-select"),X=ce("reclick"),Y=ce("loading");return v(),b(i5,null,[Bu(" Element Plus\u4E0B\u62C9\u9009\u62E9\u5668\u7EC4\u4EF6 "),su(P,Ju(O.$attrs,{modelValue:i.selectedValues,"onUpdate:modelValue":G[1]||(G[1]=ru=>i.selectedValues=ru),clearable:u.clearable,multiple:u.multiple,disabled:u.disabled,placeholder:u.placeholder,"remote-method":f,onVisibleChange:h,onChange:S,style:{width:u.dropdownWidth},"popper-class":"popper-class",ref_key:"selectRef",ref:a,"remote-show-suffix":"",filterable:"",remote:""}),{default:ou(()=>[Bu(" \u9690\u85CF\u7684\u9009\u9879\uFF0C\u7528\u4E8E\u5360\u4F4D\uFF0C\u9632\u6B62Element Plus\u8B66\u544A "),su(M,{style:{width:"0",height:"0"},value:""}),Bu(" \u9ED8\u8BA4\u9009\u9879\uFF0C\u7528\u4E8E\u56DE\u663E\u6570\u636E "),Bu(" \u5F53\u9009\u4E2D\u7684\u6570\u636E\u4E0D\u5728\u5F53\u524D\u9875\u65F6\uFF0C\u901A\u8FC7\u8FD9\u4E9B\u9690\u85CF\u9009\u9879\u8FDB\u884C\u56DE\u663E "),(v(!0),b(i5,null,y5(i.defaultOptions??[],ru=>(v(),cu(M,{key:ru[u.valueProp],label:u.labelFormat(ru)||ru[u.labelProp],value:ru[u.valueProp],style:{width:"0",height:"0"}},null,8,["label","value"]))),128)),Bu(" \u4E0B\u62C9\u6846\u5185\u5BB9\u533A\u57DF "),Bu(` \r
61
+ This will fail in production.`);a=ye,a._s.has(u)||(n?_r(u,e,r,a):vo(u,r,a),process.env.NODE_ENV!=="production"&&(E._pinia=a));const l=a._s.get(u);if(process.env.NODE_ENV!=="production"&&o){const s="__hot:"+u,B=n?_r(s,e,r,a,!0):vo(s,g5({},r),a,!0);o._hotUpdate(B),delete a.state.value[s],a._s.delete(s)}if(process.env.NODE_ENV!=="production"&&G5){const s=Re();if(s&&s.proxy&&!o){const B=s.proxy,c="_pStores"in B?B._pStores:B._pStores={};c[u]=l}}return l}return E.$id=u,E}const Y_=Te("fminputdropdownstore",()=>{const u=M5({optionsData:{}});return{state:u,getOptionsData:async(t,r,n,E=!1)=>{if(!E&&u.optionsData[n]&&u.optionsData[n].length>0)return u.optionsData[n];const a=await ae(t).get(null,r+"/?codetype="+n);return u.optionsData[n]=a.data.result??[]}}});var J_=w({name:"Fminputdropdown",__name:"index",props:b5({optionData:{type:Array,default:[]},bvalue:{type:String,default:"id"},blabel:{type:String,default:"name"},placeholder:{type:String,default:"\u8BF7\u9009\u62E9"},inputWidth:{type:String,default:"40%"},dropWidth:{type:String,default:"90px"},dropHeight:{type:String,default:"180px"},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"baseDataList"},basecode:{type:String,default:""}},{id:{type:Number,default:0},idModifiers:{},name:{type:String,default:""},nameModifiers:{}}),emits:b5(["change"],["update:id","update:name"]),setup(u,{emit:e}){const t=U5(u,"id"),r=U5(u,"name"),n=u,E=Y_(),a=M5({optionData:n.optionData}),o=e,i=s=>{const B=a.optionData.find(c=>c[n.bvalue]===s);t.value=B!=null?[n.bvalue]:0,r.value=B!=null?B[n.blabel]:"",o("change",B)};X5(async()=>{a.optionData=n.optionData,n.basecode&&n.basecode!=""&&(a.optionData=await E.getOptionsData(n.apiService,n.apiAction,n.basecode))});const l=async()=>{n.basecode&&n.basecode!=""&&(a.optionData=await E.getOptionsData(n.apiService,n.apiAction,n.basecode,!0))};return(s,B)=>{const c=lu("el-icon"),p=lu("el-input"),C=lu("el-dropdown-item"),m=lu("el-dropdown-menu"),D=lu("el-dropdown");return v(),cu(D,{class:"fminputdropdown",placement:"bottom",trigger:"click",style:{width:"100%"},onCommand:i},{dropdown:ou(()=>[su(m,{style:u5({width:u.dropWidth,height:u.dropHeight})},{default:ou(()=>[(v(!0),b(i5,null,y5(a.optionData,(F,d)=>(v(),cu(C,{key:d,command:F[u.bvalue],divided:""},{default:ou(()=>[Uu(ku(F[u.blabel]),1)]),_:2},1032,["command"]))),128))]),_:1},8,["style"])]),default:ou(()=>[su(p,{modelValue:r.value,"onUpdate:modelValue":B[0]||(B[0]=F=>r.value=F),placeholder:n.placeholder,style:u5({width:u.inputWidth})},{append:ou(()=>[su(c,{color:"#13c2c2",onClick:l},{default:ou(()=>[su(Du(gE))]),_:1})]),_:1},8,["modelValue","placeholder","style"])]),_:1})}}});const X_={class:"w100 selector-loading-container"};var Q_=w({name:"Fminputtable",__name:"index",props:{modelValue:[String,Number,Array,null],fetchOptions:{type:Function},islocalData:{type:Boolean,default:!1},localdataList:{type:Array,default:[]},apiService:{type:String,default:"baseData"},apiAction:{type:String,default:"BaseData"},method:{type:String,default:"post"},valueProp:{type:String,default:"id"},labelProp:{type:String,default:"name"},labelFormat:{type:Function,default:u=>{}},keywordProp:{type:String,default:"keyword"},dropdownWidth:{type:String,default:"100%"},dropdownHeight:{type:String,default:"550px"},placeholder:{type:String,default:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD"},defaultOptions:{type:Array,default:[]},queryHeightOffset:{type:Number,default:35},queryLabelWidth:{type:String},queryParams:{type:Object,default:()=>({})},pagination:{type:Boolean,default:!0},disabled:Boolean,multiple:Boolean,clearable:Boolean},emits:["update:modelValue","change"],setup(u,{expose:e,emit:t}){const r={MAX_PAGE_SIZE:99999,DROPDOWN_DELAY:1e3,TABLE_HEIGHT_OFFSET:175},n=u,E=Au(),a=Au(),o=t,i=M5({selectedValues:"",tableQuery:{[n.keywordProp]:"",page:n.queryParams.page,pageSize:n.queryParams?.pageSize},tableData:{items:[],total:0},defaultOptions:n.defaultOptions,loading:!1,selectedRows:[],isQuerying:!1,justOpened:!1}),l=Au(-1),s=xu(()=>{const O=`${n.dropdownHeight} - ${r.TABLE_HEIGHT_OFFSET}px`,G=n.queryHeightOffset>0?` - ${n.queryHeightOffset}px`:"";return`calc(${O}${G})`}),B=O=>{const G=i.tableData.items.filter(L=>O.includes(L[n.valueProp])),M=i.selectedRows.filter(L=>O.includes(L[n.valueProp])),z=[...G];return M.forEach(L=>{z.find(U=>U[n.valueProp]===L[n.valueProp])||z.push(L)}),z},c=O=>!O||O[n.valueProp]===void 0||O[n.valueProp]===null?!1:n.multiple?Array.isArray(i.selectedValues)?i.selectedValues.some(G=>G===O[n.valueProp]):!1:i.selectedValues!==null&&i.selectedValues!==void 0&&i.selectedValues===O[n.valueProp],p=()=>{if(n.multiple){const O=Array.isArray(i.selectedValues)?i.selectedValues:[];i.selectedRows=B(O)}else{const O=i.tableData.items.find(G=>G[n.valueProp]===i.selectedValues);i.selectedRows=O?[O]:[]}},C=O=>{const G=i.tableData?.items||[];if(G.length){if(O.key==="ArrowDown"||O.key==="ArrowUp"){O.preventDefault();const M=O.key==="ArrowDown"?1:-1,z=Math.max(0,Math.min(l.value+M,G.length-1));if(z!==l.value){l.value=z;const L=G[z];E.value?.setCurrentRow(L)}}else if(O.key==="Enter"){const M=G[l.value];_(M)}}},m=O=>{i.loading=!0,i.tableQuery.pageSize=O,i.tableQuery.page=1,F()},D=O=>{i.loading=!0,i.tableQuery.page=O,F()};X5(()=>{a.value?.inputRef?.addEventListener("keydown",C)}),$r(()=>{a.value?.inputRef?.removeEventListener("keydown",C)});const F=()=>{if(i.isQuerying)return;i.isQuerying=!0,i.loading=!0;const O=Object.assign({},n.queryParams,i.tableQuery);typeof n.fetchOptions=="function"?n.fetchOptions(O).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):n.islocalData?(i.tableData.items=n.localdataList,i.tableData.total=1,i.loading=!1,i.isQuerying=!1,p()):n.method=="post"?ae(n.apiAction).post(O,n.apiAction).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1}):ae(n.apiAction).get(O,n.apiAction).then(G=>{const M=G.data?.result;i.tableData.items=M?.items??[],i.tableData.total=M?.total??0,i.loading=!1,i.isQuerying=!1,p()}).catch(G=>{Vu.error("\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),i.tableData.items=[],i.tableData.total=0,i.loading=!1,i.isQuerying=!1})},d=()=>{i.loading=!0;const O=i.tableQuery.pageSize;i.tableQuery=Object.assign({},n.queryParams,{pageSize:O}),i.tableQuery.page=1,F()},f=O=>{if(i.justOpened){i.justOpened=!1;return}i.isQuerying||(i.loading=!0,typeof O=="string"&&(i.tableQuery[n.keywordProp]=O.trim(),i.tableQuery.page=1),F())},A=(O=!1)=>{if(i.loading=!0,O){i.tableQuery[n.keywordProp]=void 0;const G=a.value.$el.querySelector("input");G&&(G.value="")}i.tableQuery.page=1,f(i.tableQuery)},x=()=>{i.loading=!0,i.tableQuery.page=1,F()},_=O=>{if(!(!O||!O[n.valueProp])){if(typeof O[n.valueProp]=="string"&&(O[n.valueProp]=O[n.valueProp]?.trim()),T([O]),n.multiple){Array.isArray(i.selectedValues)||(i.selectedValues=[]);const G=Array.isArray(i.selectedValues)?[...i.selectedValues]:[],M=G.indexOf(O[n.valueProp]);M>-1?(G.splice(M,1),i.selectedRows=i.selectedRows.filter(z=>z[n.valueProp]!==O[n.valueProp])):(G.push(O[n.valueProp]),i.selectedRows.find(L=>L[n.valueProp]===O[n.valueProp])||i.selectedRows.push(O)),i.selectedValues=G}else i.selectedValues=O[n.valueProp],i.selectedRows=[O];o("update:modelValue",i.selectedValues),o("change",i.selectedValues,n.multiple?i.selectedRows:O),n.multiple||(E.value?.setCurrentRow(O),a.value?.blur())}},h=O=>{if(O){i.loading=!0,i.justOpened=!0;const G={page:i.tableQuery.page,pageSize:i.tableQuery.pageSize,[n.keywordProp]:void 0};i.tableQuery=Object.assign({},n.queryParams,G),F(),setTimeout(()=>{i.justOpened=!1},r.DROPDOWN_DELAY)}else i.loading=!1,i.justOpened=!1},T=O=>{const G=new Map;for(const M of[...O??[],...i.defaultOptions]){const z=M?.[n.valueProp],L=n.labelFormat?.(M)||M?.[n.labelProp];z&&L&&G.set(z,{[n.valueProp]:z,[n.labelProp]:L})}i.defaultOptions=Array.from(G.values())},k=(O,G=!0)=>{n.pagination||(O=Object.assign(O,{pageSize:r.MAX_PAGE_SIZE})),O=Object.assign({},n.queryParams,O??{}),i.tableQuery=G?Object.assign(i.tableQuery,O):O},y=(O,G)=>{O=Array.isArray(O)?O:[O],i.tableData.total=O.length,i.tableData.items=O,n.multiple?(i.selectedValues=O.map(M=>M[n.valueProp]),i.selectedRows=O,o("update:modelValue",i.selectedValues),o("change",i.selectedValues,O)):(i.selectedValues=O[0]?.[n.valueProp],i.selectedRows=O[0]?[O[0]]:[],o("update:modelValue",i.selectedValues),o("change",i.selectedValues,O[0]))},S=O=>{if(i.selectedValues=O,o("update:modelValue",O),n.multiple){const G=Array.isArray(O)?O:[],M=B(G);i.selectedRows=M,o("change",O,M)}else{const G=i.tableData?.items?.find(M=>M[n.valueProp]===O);G?(i.selectedRows=[G],E.value?.setCurrentRow(G)):(i.selectedRows=[],E.value?.setCurrentRow(null)),o("change",O,G)}},H=({row:O})=>c(O)?{backgroundColor:"var(--el-color-primary-light-9)",borderLeft:"3px solid var(--el-color-primary)"}:{},$=({row:O})=>c(O)?"selected-row":"";return Yu(()=>n.modelValue,O=>{n.multiple?i.selectedValues=Array.isArray(O)?O:O?[O]:[]:i.selectedValues=O,p()},{immediate:!0}),Yu(()=>n.defaultOptions,O=>T(O),{immediate:!0}),e({setValue:y,handleQuery:A,setQueryParams:k,setDefaultOptions:T}),(O,G)=>{const M=lu("el-option"),z=lu("el-button"),L=lu("el-button-group"),U=lu("el-row"),Q=lu("el-form"),N=lu("el-empty"),I=lu("el-table"),q=lu("el-pagination"),P=lu("el-select"),X=ce("reclick"),Y=ce("loading");return v(),b(i5,null,[Bu(" Element Plus\u4E0B\u62C9\u9009\u62E9\u5668\u7EC4\u4EF6 "),su(P,Ju(O.$attrs,{modelValue:i.selectedValues,"onUpdate:modelValue":G[1]||(G[1]=ru=>i.selectedValues=ru),clearable:u.clearable,multiple:u.multiple,disabled:u.disabled,placeholder:u.placeholder,"remote-method":f,onVisibleChange:h,onChange:S,style:{width:u.dropdownWidth},"popper-class":"popper-class",ref_key:"selectRef",ref:a,"remote-show-suffix":"",filterable:"",remote:""}),{default:ou(()=>[Bu(" \u9690\u85CF\u7684\u9009\u9879\uFF0C\u7528\u4E8E\u5360\u4F4D\uFF0C\u9632\u6B62Element Plus\u8B66\u544A "),su(M,{style:{width:"0",height:"0"},value:""}),Bu(" \u9ED8\u8BA4\u9009\u9879\uFF0C\u7528\u4E8E\u56DE\u663E\u6570\u636E "),Bu(" \u5F53\u9009\u4E2D\u7684\u6570\u636E\u4E0D\u5728\u5F53\u524D\u9875\u65F6\uFF0C\u901A\u8FC7\u8FD9\u4E9B\u9690\u85CF\u9009\u9879\u8FDB\u884C\u56DE\u663E "),(v(!0),b(i5,null,y5(i.defaultOptions??[],ru=>(v(),cu(M,{key:ru[u.valueProp],label:u.labelFormat(ru)||ru[u.labelProp],value:ru[u.valueProp],style:{width:"0",height:"0"}},null,8,["label","value"]))),128)),Bu(" \u4E0B\u62C9\u6846\u5185\u5BB9\u533A\u57DF "),Bu(` \r
62
62
  v-loading\u6307\u4EE4\uFF1A\u663E\u793A\u52A0\u8F7D\u52A8\u753B\r
63
63
  \u6CE8\u610F\uFF1Aloading\u72B6\u6001\u653E\u5728div\u4E0A\u800C\u4E0D\u662Ftable\u4E0A\uFF0C\u662F\u4E3A\u4E86\u8986\u76D6\u6574\u4E2A\u4E0B\u62C9\u533A\u57DF\uFF08\u5305\u62EC\u67E5\u8BE2\u8868\u5355\u548C\u5206\u9875\uFF09\r
64
64
  \u8FD9\u6837\u53EF\u4EE5\u907F\u514D\u67E5\u8BE2\u65F6\u95EA\u73B0"\u6682\u65E0\u6570\u636E"\u7684\u63D0\u793A\r
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.106 */
1
+ /*! fm-dev v1.0.108 */
2
2
  import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, mergeModels, useModel, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, createSlots, renderSlot, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, mergeProps, resolveDynamicComponent, useSlots, toHandlers, onBeforeUnmount, onUpdated, useAttrs, normalizeProps, guardReactiveProps } from 'vue';
3
3
  import crypto from 'crypto';
4
4
  import require$$0 from 'url';
@@ -35419,6 +35419,10 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
35419
35419
  type: String,
35420
35420
  default: "90px"
35421
35421
  },
35422
+ dropHeight: {
35423
+ type: String,
35424
+ default: "180px"
35425
+ },
35422
35426
  /**
35423
35427
  * api service name
35424
35428
  */
@@ -35494,7 +35498,7 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
35494
35498
  }, {
35495
35499
  dropdown: withCtx(() => [
35496
35500
  createVNode(_component_el_dropdown_menu, {
35497
- style: normalizeStyle({ width: __props.dropWidth })
35501
+ style: normalizeStyle({ width: __props.dropWidth, height: __props.dropHeight })
35498
35502
  }, {
35499
35503
  default: withCtx(() => [
35500
35504
  (openBlock(true), createElementBlock(
@@ -740,6 +740,10 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
740
740
  type: StringConstructor;
741
741
  default: string;
742
742
  };
743
+ dropHeight: {
744
+ type: StringConstructor;
745
+ default: string;
746
+ };
743
747
  apiService: {
744
748
  type: StringConstructor;
745
749
  default: string;
@@ -800,6 +804,10 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
800
804
  type: StringConstructor;
801
805
  default: string;
802
806
  };
807
+ dropHeight: {
808
+ type: StringConstructor;
809
+ default: string;
810
+ };
803
811
  apiService: {
804
812
  type: StringConstructor;
805
813
  default: string;
@@ -831,6 +839,7 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
831
839
  apiAction: string;
832
840
  inputWidth: string;
833
841
  dropWidth: string;
842
+ dropHeight: string;
834
843
  basecode: string;
835
844
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
836
845
  declare const Fminputtable: {
@@ -43,6 +43,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
43
43
  type: StringConstructor;
44
44
  default: string;
45
45
  };
46
+ dropHeight: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
46
50
  /**
47
51
  * api service name
48
52
  */
@@ -118,6 +122,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
118
122
  type: StringConstructor;
119
123
  default: string;
120
124
  };
125
+ dropHeight: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
121
129
  /**
122
130
  * api service name
123
131
  */
@@ -158,6 +166,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
158
166
  apiAction: string;
159
167
  inputWidth: string;
160
168
  dropWidth: string;
169
+ dropHeight: string;
161
170
  basecode: string;
162
171
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
163
172
  export default _default;
@@ -43,6 +43,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
43
  type: String,
44
44
  default: "90px"
45
45
  },
46
+ dropHeight: {
47
+ type: String,
48
+ default: "180px"
49
+ },
46
50
  /**
47
51
  * api service name
48
52
  */
@@ -118,7 +122,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
118
122
  }, {
119
123
  dropdown: vue.withCtx(() => [
120
124
  vue.createVNode(_component_el_dropdown_menu, {
121
- style: vue.normalizeStyle({ width: __props.dropWidth })
125
+ style: vue.normalizeStyle({ width: __props.dropWidth, height: __props.dropHeight })
122
126
  }, {
123
127
  default: vue.withCtx(() => [
124
128
  (vue.openBlock(true), vue.createElementBlock(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes