@fmdevui/fm-dev 1.0.107 → 1.0.109

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.
@@ -3,15 +3,15 @@ export declare const usefminputdropdownstore: StoreDefinition<"fminputdropdownst
3
3
  state: {
4
4
  optionsData: any;
5
5
  };
6
- getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
6
+ getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
7
7
  }, "state">, Pick<{
8
8
  state: {
9
9
  optionsData: any;
10
10
  };
11
- getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
11
+ getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
12
12
  }, never>, Pick<{
13
13
  state: {
14
14
  optionsData: any;
15
15
  };
16
- getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
16
+ getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>) => Promise<any>;
17
17
  }, "getOptionsData">>;
@@ -756,6 +756,27 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
756
756
  type: StringConstructor;
757
757
  default: string;
758
758
  };
759
+ multibasecode: {
760
+ type: {
761
+ (arrayLength: number): any[];
762
+ (...items: any[]): any[];
763
+ new (arrayLength: number): any[];
764
+ new (...items: any[]): any[];
765
+ isArray(arg: any): arg is any[];
766
+ readonly prototype: any[];
767
+ from<T>(arrayLike: ArrayLike<T>): T[];
768
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
769
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
770
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
771
+ of<T>(...items: T[]): T[];
772
+ readonly [Symbol.species]: ArrayConstructor;
773
+ };
774
+ default: never[];
775
+ };
776
+ autoLoadData: {
777
+ type: BooleanConstructor;
778
+ default: boolean;
779
+ };
759
780
  id: {
760
781
  type: PropType<any>;
761
782
  };
@@ -820,6 +841,27 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
820
841
  type: StringConstructor;
821
842
  default: string;
822
843
  };
844
+ multibasecode: {
845
+ type: {
846
+ (arrayLength: number): any[];
847
+ (...items: any[]): any[];
848
+ new (arrayLength: number): any[];
849
+ new (...items: any[]): any[];
850
+ isArray(arg: any): arg is any[];
851
+ readonly prototype: any[];
852
+ from<T>(arrayLike: ArrayLike<T>): T[];
853
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
854
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
855
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
856
+ of<T>(...items: T[]): T[];
857
+ readonly [Symbol.species]: ArrayConstructor;
858
+ };
859
+ default: never[];
860
+ };
861
+ autoLoadData: {
862
+ type: BooleanConstructor;
863
+ default: boolean;
864
+ };
823
865
  id: {
824
866
  type: PropType<any>;
825
867
  };
@@ -841,6 +883,8 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
841
883
  dropWidth: string;
842
884
  dropHeight: string;
843
885
  basecode: string;
886
+ multibasecode: any[];
887
+ autoLoadData: boolean;
844
888
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
845
889
  declare const Fminputtable: {
846
890
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
@@ -68,6 +68,33 @@ declare const _default: DefineComponent<ExtractPropTypes<{
68
68
  type: StringConstructor;
69
69
  default: string;
70
70
  };
71
+ /**
72
+ * 基础编码 多个编码合在一起调用
73
+ */
74
+ multibasecode: {
75
+ type: {
76
+ (arrayLength: number): any[];
77
+ (...items: any[]): any[];
78
+ new (arrayLength: number): any[];
79
+ new (...items: any[]): any[];
80
+ isArray(arg: any): arg is any[];
81
+ readonly prototype: any[];
82
+ from<T>(arrayLike: ArrayLike<T>): T[];
83
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
84
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
85
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
86
+ of<T>(...items: T[]): T[];
87
+ readonly [Symbol.species]: ArrayConstructor;
88
+ };
89
+ default: never[];
90
+ };
91
+ /**
92
+ * 是否默认加载数据
93
+ */
94
+ autoLoadData: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
71
98
  id: {
72
99
  type: PropType<any>;
73
100
  };
@@ -147,6 +174,33 @@ declare const _default: DefineComponent<ExtractPropTypes<{
147
174
  type: StringConstructor;
148
175
  default: string;
149
176
  };
177
+ /**
178
+ * 基础编码 多个编码合在一起调用
179
+ */
180
+ multibasecode: {
181
+ type: {
182
+ (arrayLength: number): any[];
183
+ (...items: any[]): any[];
184
+ new (arrayLength: number): any[];
185
+ new (...items: any[]): any[];
186
+ isArray(arg: any): arg is any[];
187
+ readonly prototype: any[];
188
+ from<T>(arrayLike: ArrayLike<T>): T[];
189
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
190
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
191
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
192
+ of<T>(...items: T[]): T[];
193
+ readonly [Symbol.species]: ArrayConstructor;
194
+ };
195
+ default: never[];
196
+ };
197
+ /**
198
+ * 是否默认加载数据
199
+ */
200
+ autoLoadData: {
201
+ type: BooleanConstructor;
202
+ default: boolean;
203
+ };
150
204
  id: {
151
205
  type: PropType<any>;
152
206
  };
@@ -168,5 +222,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
168
222
  dropWidth: string;
169
223
  dropHeight: string;
170
224
  basecode: string;
225
+ multibasecode: any[];
226
+ autoLoadData: boolean;
171
227
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
172
228
  export default _default;
@@ -6,14 +6,23 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
6
6
  const state = reactive({
7
7
  optionsData: {}
8
8
  });
9
- const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
9
+ const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
10
10
  if (!reload) {
11
11
  if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
12
12
  return state.optionsData[basecode];
13
13
  }
14
14
  }
15
- const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
16
- return state.optionsData[basecode] = res.data.result ?? [];
15
+ const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
16
+ if (multibasecode.length > 0) {
17
+ const mdata = res.data.result ?? [];
18
+ multibasecode.forEach((p) => {
19
+ state.optionsData[p] = mdata.filter((p2) => {
20
+ return p2.code === p2;
21
+ }) ?? [];
22
+ });
23
+ } else {
24
+ return state.optionsData[basecode] = res.data.result ?? [];
25
+ }
17
26
  };
18
27
  return {
19
28
  state,
@@ -41,7 +41,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  },
42
42
  dropHeight: {
43
43
  type: String,
44
- default: "300px"
44
+ default: "180px"
45
45
  },
46
46
  /**
47
47
  * api service name
@@ -63,6 +63,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
63
63
  basecode: {
64
64
  type: String,
65
65
  default: ""
66
+ },
67
+ /**
68
+ * 基础编码 多个编码合在一起调用
69
+ */
70
+ multibasecode: {
71
+ type: Array,
72
+ default: []
73
+ },
74
+ /**
75
+ * 是否默认加载数据
76
+ */
77
+ autoLoadData: {
78
+ type: Boolean,
79
+ default: true
66
80
  }
67
81
  }, {
68
82
  "id": {
@@ -94,13 +108,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
94
108
  };
95
109
  onMounted(async () => {
96
110
  state.optionData = props.optionData;
97
- if (props.basecode && props.basecode != "") {
98
- state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
111
+ if (props.autoLoadData && props.basecode && props.basecode != "") {
112
+ state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
99
113
  }
100
114
  });
101
115
  const handRestdata = async () => {
102
116
  if (props.basecode && props.basecode != "") {
103
- state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
117
+ state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
104
118
  }
105
119
  };
106
120
  return (_ctx, _cache) => {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.107 */
1
+ /*! fm-dev v1.0.109 */
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) :
@@ -35362,14 +35362,23 @@
35362
35362
  const state = vue.reactive({
35363
35363
  optionsData: {}
35364
35364
  });
35365
- const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
35365
+ const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
35366
35366
  if (!reload) {
35367
35367
  if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
35368
35368
  return state.optionsData[basecode];
35369
35369
  }
35370
35370
  }
35371
- const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
35372
- return state.optionsData[basecode] = res.data.result ?? [];
35371
+ const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
35372
+ if (multibasecode.length > 0) {
35373
+ const mdata = res.data.result ?? [];
35374
+ multibasecode.forEach((p) => {
35375
+ state.optionsData[p] = mdata.filter((p2) => {
35376
+ return p2.code === p2;
35377
+ }) ?? [];
35378
+ });
35379
+ } else {
35380
+ return state.optionsData[basecode] = res.data.result ?? [];
35381
+ }
35373
35382
  };
35374
35383
  return {
35375
35384
  state,
@@ -35416,7 +35425,7 @@
35416
35425
  },
35417
35426
  dropHeight: {
35418
35427
  type: String,
35419
- default: "300px"
35428
+ default: "180px"
35420
35429
  },
35421
35430
  /**
35422
35431
  * api service name
@@ -35438,6 +35447,20 @@
35438
35447
  basecode: {
35439
35448
  type: String,
35440
35449
  default: ""
35450
+ },
35451
+ /**
35452
+ * 基础编码 多个编码合在一起调用
35453
+ */
35454
+ multibasecode: {
35455
+ type: Array,
35456
+ default: []
35457
+ },
35458
+ /**
35459
+ * 是否默认加载数据
35460
+ */
35461
+ autoLoadData: {
35462
+ type: Boolean,
35463
+ default: true
35441
35464
  }
35442
35465
  }, {
35443
35466
  "id": {
@@ -35469,13 +35492,13 @@
35469
35492
  };
35470
35493
  vue.onMounted(async () => {
35471
35494
  state.optionData = props.optionData;
35472
- if (props.basecode && props.basecode != "") {
35473
- state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
35495
+ if (props.autoLoadData && props.basecode && props.basecode != "") {
35496
+ state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
35474
35497
  }
35475
35498
  });
35476
35499
  const handRestdata = async () => {
35477
35500
  if (props.basecode && props.basecode != "") {
35478
- state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
35501
+ state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
35479
35502
  }
35480
35503
  };
35481
35504
  return (_ctx, _cache) => {
package/index.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.107 */(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.109 */(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"},dropHeight:{type:String,default:"300px"},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
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,E=[])=>{if(!o&&u.optionsData[a]&&u.optionsData[a].length>0)return u.optionsData[a];const l=await Pe(t).get(null,n+"/?codetype="+a+"&mcodes="+E.join(","));if(E.length>0){const i=l.data.result??[];E.forEach(s=>{u.optionsData[s]=i.filter(C=>C.code===C)??[]})}else return u.optionsData[a]=l.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:""},multibasecode:{type:Array,default:[]},autoLoadData:{type:Boolean,default:!0}},{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.autoLoadData&&a.basecode&&a.basecode!=""&&(E.optionData=await o.getOptionsData(a.apiService,a.apiAction,a.basecode,!1,a.multibasecode))});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