cnhis-design-vue 3.1.46-release.1 → 3.1.46-release.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +1 -1
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +22 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +22 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +11 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -0
- package/es/components/form-render/index.d.ts +11 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +12 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +11 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -0
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -0
- package/es/components/form-render/src/types/index.d.ts +7 -0
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +11 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +11 -0
- package/es/components/scale-view/index.d.ts +8 -8
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +16 -16
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +21 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +19 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +11 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -0
- package/es/components/table-export-field/index.d.ts +110 -20
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +91 -16
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +13 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
- package/es/components/table-export-field/src/index.vue.d.ts +110 -20
- package/es/components/table-export-field/src/index.vue2.js +1 -1
- package/es/components/table-export-field/src/tool.d.ts +1 -0
- package/es/components/table-export-field/src/tool.js +1 -0
- package/es/components/table-export-field/style/index.css +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -1
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -9,10 +9,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
type: StringConstructor;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
-
fieldOriginList: {
|
|
13
|
-
type: PropType<any[]>;
|
|
14
|
-
default: () => never[];
|
|
15
|
-
};
|
|
16
12
|
curProgram: {
|
|
17
13
|
type: PropType<IExportSchemeType>;
|
|
18
14
|
default: () => {};
|
|
@@ -25,6 +21,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
21
|
type: PropType<any[]>;
|
|
26
22
|
default: () => never[];
|
|
27
23
|
};
|
|
24
|
+
showAllFieldList: {
|
|
25
|
+
type: PropType<any[]>;
|
|
26
|
+
default: () => never[];
|
|
27
|
+
};
|
|
28
28
|
}, {
|
|
29
29
|
defaultKey: string;
|
|
30
30
|
baseSetting: {
|
|
@@ -46,10 +46,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
46
|
type: StringConstructor;
|
|
47
47
|
default: string;
|
|
48
48
|
};
|
|
49
|
-
fieldOriginList: {
|
|
50
|
-
type: PropType<any[]>;
|
|
51
|
-
default: () => never[];
|
|
52
|
-
};
|
|
53
49
|
curProgram: {
|
|
54
50
|
type: PropType<IExportSchemeType>;
|
|
55
51
|
default: () => {};
|
|
@@ -62,12 +58,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
58
|
type: PropType<any[]>;
|
|
63
59
|
default: () => never[];
|
|
64
60
|
};
|
|
61
|
+
showAllFieldList: {
|
|
62
|
+
type: PropType<any[]>;
|
|
63
|
+
default: () => never[];
|
|
64
|
+
};
|
|
65
65
|
}>> & {
|
|
66
66
|
onCancelModal?: ((...args: any[]) => any) | undefined;
|
|
67
67
|
onUpdateCurProgram?: ((...args: any[]) => any) | undefined;
|
|
68
68
|
onUpdateFieldCheckList?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
onUpdateShowAllFieldList?: ((...args: any[]) => any) | undefined;
|
|
69
70
|
}>>;
|
|
70
|
-
emits: (event: "cancelModal" | "updateCurProgram" | "updateFieldCheckList", ...args: any[]) => void;
|
|
71
|
+
emits: (event: "cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList", ...args: any[]) => void;
|
|
71
72
|
isChangeWindow: import("vue").Ref<boolean>;
|
|
72
73
|
modalWidth: import("vue").Ref<string>;
|
|
73
74
|
bodyStyle: import("vue").Ref<{
|
|
@@ -79,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
80
|
fieldCheckList: import("vue").Ref<any[]>;
|
|
80
81
|
exportApiConfig: import("../../..").AnyObject;
|
|
81
82
|
curSchemeId: import("vue").ComputedRef<string>;
|
|
83
|
+
dragEnd: () => void;
|
|
82
84
|
deleteExportSchemeItem: (schemeId: string) => Promise<import("naive-ui").MessageReactive | undefined>;
|
|
83
85
|
doExportScheme: () => Promise<import("naive-ui").MessageReactive | undefined>;
|
|
84
86
|
renderTag: ({ option }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -151,8 +153,80 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
153
|
readonly defaultValue: (string | number)[] | null;
|
|
152
154
|
}>;
|
|
153
155
|
NCheckbox: any;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
Draggable: import("vue").DefineComponent<{
|
|
157
|
+
list: {
|
|
158
|
+
type: ArrayConstructor;
|
|
159
|
+
required: boolean;
|
|
160
|
+
default: any;
|
|
161
|
+
};
|
|
162
|
+
modelValue: {
|
|
163
|
+
type: ArrayConstructor;
|
|
164
|
+
required: boolean;
|
|
165
|
+
default: any;
|
|
166
|
+
};
|
|
167
|
+
itemKey: {
|
|
168
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
169
|
+
required: boolean;
|
|
170
|
+
};
|
|
171
|
+
clone: {
|
|
172
|
+
type: FunctionConstructor;
|
|
173
|
+
default: (original: any) => any;
|
|
174
|
+
};
|
|
175
|
+
tag: {
|
|
176
|
+
type: StringConstructor;
|
|
177
|
+
default: string;
|
|
178
|
+
};
|
|
179
|
+
move: {
|
|
180
|
+
type: FunctionConstructor;
|
|
181
|
+
default: any;
|
|
182
|
+
};
|
|
183
|
+
componentData: {
|
|
184
|
+
type: ObjectConstructor;
|
|
185
|
+
required: boolean;
|
|
186
|
+
default: any;
|
|
187
|
+
};
|
|
188
|
+
}, unknown, {
|
|
189
|
+
error: boolean;
|
|
190
|
+
}, {
|
|
191
|
+
realList(): any;
|
|
192
|
+
getKey(): any;
|
|
193
|
+
}, {
|
|
194
|
+
getUnderlyingVm(domElement: any): any;
|
|
195
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
196
|
+
emitChanges(evt: any): void;
|
|
197
|
+
alterList(onList: any): void;
|
|
198
|
+
spliceList(): void;
|
|
199
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
200
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
201
|
+
to: any;
|
|
202
|
+
related: any;
|
|
203
|
+
}): any;
|
|
204
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
205
|
+
onDragStart(evt: any): void;
|
|
206
|
+
onDragAdd(evt: any): void;
|
|
207
|
+
onDragRemove(evt: any): void;
|
|
208
|
+
onDragUpdate(evt: any): void;
|
|
209
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
210
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
211
|
+
onDragEnd(): void;
|
|
212
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
213
|
+
move: Function;
|
|
214
|
+
tag: string;
|
|
215
|
+
clone: Function;
|
|
216
|
+
list: unknown[];
|
|
217
|
+
modelValue: unknown[];
|
|
218
|
+
componentData: Record<string, any>;
|
|
219
|
+
} & {
|
|
220
|
+
itemKey?: string | Function | undefined;
|
|
221
|
+
}>, {
|
|
222
|
+
move: Function;
|
|
223
|
+
tag: string;
|
|
224
|
+
clone: Function;
|
|
225
|
+
list: unknown[];
|
|
226
|
+
modelValue: unknown[];
|
|
227
|
+
componentData: Record<string, any>;
|
|
228
|
+
}>;
|
|
229
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList")[], "cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
156
230
|
visible: {
|
|
157
231
|
type: BooleanConstructor;
|
|
158
232
|
default: boolean;
|
|
@@ -161,10 +235,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
161
235
|
type: StringConstructor;
|
|
162
236
|
default: string;
|
|
163
237
|
};
|
|
164
|
-
fieldOriginList: {
|
|
165
|
-
type: PropType<any[]>;
|
|
166
|
-
default: () => never[];
|
|
167
|
-
};
|
|
168
238
|
curProgram: {
|
|
169
239
|
type: PropType<IExportSchemeType>;
|
|
170
240
|
default: () => {};
|
|
@@ -177,16 +247,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
247
|
type: PropType<any[]>;
|
|
178
248
|
default: () => never[];
|
|
179
249
|
};
|
|
250
|
+
showAllFieldList: {
|
|
251
|
+
type: PropType<any[]>;
|
|
252
|
+
default: () => never[];
|
|
253
|
+
};
|
|
180
254
|
}>> & {
|
|
181
255
|
onCancelModal?: ((...args: any[]) => any) | undefined;
|
|
182
256
|
onUpdateCurProgram?: ((...args: any[]) => any) | undefined;
|
|
183
257
|
onUpdateFieldCheckList?: ((...args: any[]) => any) | undefined;
|
|
258
|
+
onUpdateShowAllFieldList?: ((...args: any[]) => any) | undefined;
|
|
184
259
|
}, {
|
|
185
260
|
visible: boolean;
|
|
186
261
|
tableListId: string;
|
|
187
|
-
fieldOriginList: any[];
|
|
188
262
|
curProgram: IExportSchemeType;
|
|
189
263
|
programOptions: IExportSchemeType[];
|
|
190
264
|
downLoadFieldList: any[];
|
|
265
|
+
showAllFieldList: any[];
|
|
191
266
|
}>;
|
|
192
267
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as s,unref as n,normalizeClass as d,isRef as r,withCtx as u,createVNode as c,normalizeStyle as m,createElementVNode as h,createTextVNode as f,renderSlot as p,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as w,NCard as x,NButton as L,NCheckbox as y,NSelect as k,NCheckboxGroup as F,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=h("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),U={class:"flex_between"},$=["title"];var T=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:T}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){T("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function se(e){T("updateCurProgram",e)}function ne(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l;Y.value=!1,Z.value=e&&(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]}function re(){T("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,T("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void T("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),s=[...t,...o];T("updateShowAllFieldList",s)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),s(n(w),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,"onUpdate:show":t[3]||(t[3]=e=>r(visible)?visible.value=e:null),maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:ne,onNegativeClick:re},{default:u((()=>[c(n(x),{style:m({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[h("div",j,[h("i",{onClick:ue,class:d(["iconfont-table-filter",Q.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),h("i",{onClick:re,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[h("div",H,[c(n(L),{onClick:re},{default:u((()=>[f("取消")])),_:1}),p(l.$slots,"add"),c(n(L),{type:"info",onClick:ne},{default:u((()=>[f("导出")])),_:1})])])),default:u((()=>[O,h("header",U,[c(n(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:u((()=>[f(" 全选 ")])),_:1},8,["checked","indeterminate"]),c(n(k),{style:{width:"200px"},value:n(le),"onUpdate:value":[t[1]||(t[1]=e=>r(le)?le.value=e:null),se],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),c(n(F),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:u((()=>[c(n(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:u((({element:e})=>{var l;return[c(n(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:u((()=>{var l,t;return[h("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,$)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{T as default};
|
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
type: PropType<IExportSchemeType>;
|
|
18
18
|
default: () => {};
|
|
19
19
|
};
|
|
20
|
+
showAllFieldList: {
|
|
21
|
+
type: PropType<any[]>;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
20
24
|
}, {
|
|
21
25
|
message: import("naive-ui").MessageApi;
|
|
22
26
|
saveTableListExportScheme: (params: any, filterApiConfig: any) => Promise<any>;
|
|
@@ -49,6 +53,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
53
|
type: PropType<IExportSchemeType>;
|
|
50
54
|
default: () => {};
|
|
51
55
|
};
|
|
56
|
+
showAllFieldList: {
|
|
57
|
+
type: PropType<any[]>;
|
|
58
|
+
default: () => never[];
|
|
59
|
+
};
|
|
52
60
|
}>> & {
|
|
53
61
|
onCancelSaveModal?: ((...args: any[]) => any) | undefined;
|
|
54
62
|
}>>;
|
|
@@ -676,6 +684,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
676
684
|
type: PropType<IExportSchemeType>;
|
|
677
685
|
default: () => {};
|
|
678
686
|
};
|
|
687
|
+
showAllFieldList: {
|
|
688
|
+
type: PropType<any[]>;
|
|
689
|
+
default: () => never[];
|
|
690
|
+
};
|
|
679
691
|
}>> & {
|
|
680
692
|
onCancelSaveModal?: ((...args: any[]) => any) | undefined;
|
|
681
693
|
}, {
|
|
@@ -683,5 +695,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
683
695
|
tableListId: string;
|
|
684
696
|
curProgram: IExportSchemeType;
|
|
685
697
|
programOptions: IExportSchemeType[];
|
|
698
|
+
showAllFieldList: any[];
|
|
686
699
|
}>;
|
|
687
700
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as
|
|
1
|
+
import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as s,isRef as u,withCtx as c,createVNode as m,createElementVNode as n,createTextVNode as d,createElementBlock as p,Fragment as v,renderList as f,toDisplayString as h}from"vue";import{useMessage as j,NModal as g,NCard as b,NIcon as N,NButton as y,NRadioGroup as P,NRadio as _,NForm as x,NFormItem as k,NInput as w}from"naive-ui";import{CloseOutline as I}from"@vicons/ionicons5";import{InjectionExportApiConfig as S}from"../constants/index.js";import C from"../hooks/useAsyncData.js";import{dragFieldCheckList as L}from"../tool.js";import{cloneDeep as A}from"lodash-es";const M={class:"svg-wrap"},O={class:"flex_right"},U={class:"save-project-content"};var z=e({__name:"SaveProjectModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},programOptions:{type:Array,default:()=>[]},curProgram:{type:Object,default:()=>({})},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveModal"],setup(e,{emit:z}){const F=e,K=j(),{saveTableListExportScheme:q}=C(),B={projectName:{required:!0,message:"请输入方案名称",trigger:["input","blur"]}},D=[{value:"updateProject",label:"更新方案"},{value:"addProject",label:"新增方案"}],E=a(null),R=t({projectName:""}),T=a(),$=a([]),G=l(S);function H(e){T.value=e}function J(){var e;null==(e=E.value)||e.validate((async e=>{if(e)return;if(function(){const e=R.projectName.trim();let a=[];if("addProject"===T.value&&(a=F.programOptions.map((e=>e.schemeName))),"updateProject"===T.value){const{schemeName:e}=F.curProgram;a=F.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(K.warning(`已存在${e}的方案名称`),!0)}())return;const a=function(){const e=R.projectName.trim(),{fieldKeys:a,schemeId:t}=F.curProgram;let l={fieldKeys:L(F.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:F.tableListId};return"updateProject"===T.value&&(l.schemeId=t),l}();await q(a,G)&&(K.success("保存并导出成功"),z("cancelSaveModal"))}))}function Q(){z("cancelSaveModal")}return o((()=>F.curProgram),(async e=>{if("default"===e.schemeId)$.value=D.filter((e=>"addProject"===e.value)),T.value="addProject",R.projectName="";else $.value=A(D),T.value="updateProject",R.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,t)=>(r(),i(s(g),{class:"table-export-field-modal",show:e.visible,"onUpdate:show":t[2]||(t[2]=e=>u(visible)?visible.value=e:null),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:J,onNegativeClick:Q},{default:c((()=>[m(s(b),{title:"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[n("div",M,[m(s(N),{component:s(I),size:"24",onClick:Q},null,8,["component"])])])),footer:c((()=>[n("div",O,[m(s(y),{onClick:Q},{default:c((()=>[d("取消")])),_:1}),m(s(y),{type:"info",onClick:J},{default:c((()=>[d("确认")])),_:1})])])),default:c((()=>[n("div",U,[m(s(P),{value:T.value,"onUpdate:value":[t[0]||(t[0]=e=>T.value=e),H],name:"radiogroup"},{default:c((()=>[(r(!0),p(v,null,f($.value,(e=>(r(),i(s(_),{key:e.value,value:e.value},{default:c((()=>[d(h(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),m(s(x),{ref_key:"formRef",ref:E,"label-placement":"left",rules:B,model:R},{default:c((()=>[m(s(k),{label:"方案名称",path:"projectName"},{default:c((()=>[m(s(w),{value:R.projectName,"onUpdate:value":t[1]||(t[1]=e=>R.projectName=e),placeholder:"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])])),_:1})])),_:1},8,["model"])])])),_:1})])),_:1},8,["show"]))}});export{z as default};
|
|
@@ -20,8 +20,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
defaultKey: string;
|
|
21
21
|
message: import("naive-ui").MessageApi;
|
|
22
22
|
getTableListExportScheme: (params: any, filterApiConfig: any) => Promise<any>;
|
|
23
|
-
deleteTableListExportScheme: (params: any, filterApiConfig: any) => Promise<any>;
|
|
24
|
-
exportTableListScheme: (params: any, filterApiConfig: any) => Promise<any>;
|
|
25
23
|
baseOption: {
|
|
26
24
|
schemeId: string;
|
|
27
25
|
schemeName: string;
|
|
@@ -60,13 +58,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
58
|
fieldKeys: string[];
|
|
61
59
|
updatedTime?: string | undefined;
|
|
62
60
|
}[]>;
|
|
63
|
-
downLoadFieldList: import("vue").
|
|
64
|
-
|
|
61
|
+
downLoadFieldList: import("vue").Ref<any[]>;
|
|
62
|
+
showAllFieldList: import("vue").Ref<any[]>;
|
|
63
|
+
isDefaultShowFields: import("vue").Ref<string[]>;
|
|
64
|
+
updateShowAllFieldList: (list: any[]) => void;
|
|
65
65
|
handleProjectModal: () => void;
|
|
66
66
|
handleExportModal: () => void;
|
|
67
67
|
updateCurProgram: (schemeId: string) => void;
|
|
68
68
|
updateFieldCheckList: (fieldCheckList: string[]) => void;
|
|
69
69
|
getExportFieldList: () => Promise<import("naive-ui").MessageReactive | undefined>;
|
|
70
|
+
setDefaultfieldKeys: (list: any[]) => any[];
|
|
71
|
+
calculateAllFieldList: () => void;
|
|
70
72
|
init: () => Promise<void>;
|
|
71
73
|
NButton: any;
|
|
72
74
|
ExportModal: import("vue").DefineComponent<{
|
|
@@ -78,10 +80,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
78
80
|
type: StringConstructor;
|
|
79
81
|
default: string;
|
|
80
82
|
};
|
|
81
|
-
fieldOriginList: {
|
|
82
|
-
type: PropType<any[]>;
|
|
83
|
-
default: () => never[];
|
|
84
|
-
};
|
|
85
83
|
curProgram: {
|
|
86
84
|
type: PropType<IExportSchemeType>;
|
|
87
85
|
default: () => {};
|
|
@@ -94,6 +92,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
92
|
type: PropType<any[]>;
|
|
95
93
|
default: () => never[];
|
|
96
94
|
};
|
|
95
|
+
showAllFieldList: {
|
|
96
|
+
type: PropType<any[]>;
|
|
97
|
+
default: () => never[];
|
|
98
|
+
};
|
|
97
99
|
}, {
|
|
98
100
|
defaultKey: string;
|
|
99
101
|
baseSetting: {
|
|
@@ -115,10 +117,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
117
|
type: StringConstructor;
|
|
116
118
|
default: string;
|
|
117
119
|
};
|
|
118
|
-
fieldOriginList: {
|
|
119
|
-
type: PropType<any[]>;
|
|
120
|
-
default: () => never[];
|
|
121
|
-
};
|
|
122
120
|
curProgram: {
|
|
123
121
|
type: PropType<IExportSchemeType>;
|
|
124
122
|
default: () => {};
|
|
@@ -131,12 +129,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
129
|
type: PropType<any[]>;
|
|
132
130
|
default: () => never[];
|
|
133
131
|
};
|
|
132
|
+
showAllFieldList: {
|
|
133
|
+
type: PropType<any[]>;
|
|
134
|
+
default: () => never[];
|
|
135
|
+
};
|
|
134
136
|
}>> & {
|
|
135
137
|
onCancelModal?: ((...args: any[]) => any) | undefined;
|
|
136
138
|
onUpdateCurProgram?: ((...args: any[]) => any) | undefined;
|
|
137
139
|
onUpdateFieldCheckList?: ((...args: any[]) => any) | undefined;
|
|
140
|
+
onUpdateShowAllFieldList?: ((...args: any[]) => any) | undefined;
|
|
138
141
|
}>>;
|
|
139
|
-
emits: (event: "cancelModal" | "updateCurProgram" | "updateFieldCheckList", ...args: any[]) => void;
|
|
142
|
+
emits: (event: "cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList", ...args: any[]) => void;
|
|
140
143
|
isChangeWindow: import("vue").Ref<boolean>;
|
|
141
144
|
modalWidth: import("vue").Ref<string>;
|
|
142
145
|
bodyStyle: import("vue").Ref<{
|
|
@@ -148,6 +151,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
151
|
fieldCheckList: import("vue").Ref<any[]>;
|
|
149
152
|
exportApiConfig: import("../..").AnyObject;
|
|
150
153
|
curSchemeId: import("vue").ComputedRef<string>;
|
|
154
|
+
dragEnd: () => void;
|
|
151
155
|
deleteExportSchemeItem: (schemeId: string) => Promise<import("naive-ui").MessageReactive | undefined>;
|
|
152
156
|
doExportScheme: () => Promise<import("naive-ui").MessageReactive | undefined>;
|
|
153
157
|
renderTag: ({ option }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -220,8 +224,80 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
220
224
|
readonly defaultValue: (string | number)[] | null;
|
|
221
225
|
}>;
|
|
222
226
|
NCheckbox: any;
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
Draggable: import("vue").DefineComponent<{
|
|
228
|
+
list: {
|
|
229
|
+
type: ArrayConstructor;
|
|
230
|
+
required: boolean;
|
|
231
|
+
default: any;
|
|
232
|
+
};
|
|
233
|
+
modelValue: {
|
|
234
|
+
type: ArrayConstructor;
|
|
235
|
+
required: boolean;
|
|
236
|
+
default: any;
|
|
237
|
+
};
|
|
238
|
+
itemKey: {
|
|
239
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
240
|
+
required: boolean;
|
|
241
|
+
};
|
|
242
|
+
clone: {
|
|
243
|
+
type: FunctionConstructor;
|
|
244
|
+
default: (original: any) => any;
|
|
245
|
+
};
|
|
246
|
+
tag: {
|
|
247
|
+
type: StringConstructor;
|
|
248
|
+
default: string;
|
|
249
|
+
};
|
|
250
|
+
move: {
|
|
251
|
+
type: FunctionConstructor;
|
|
252
|
+
default: any;
|
|
253
|
+
};
|
|
254
|
+
componentData: {
|
|
255
|
+
type: ObjectConstructor;
|
|
256
|
+
required: boolean;
|
|
257
|
+
default: any;
|
|
258
|
+
};
|
|
259
|
+
}, unknown, {
|
|
260
|
+
error: boolean;
|
|
261
|
+
}, {
|
|
262
|
+
realList(): any;
|
|
263
|
+
getKey(): any;
|
|
264
|
+
}, {
|
|
265
|
+
getUnderlyingVm(domElement: any): any;
|
|
266
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
267
|
+
emitChanges(evt: any): void;
|
|
268
|
+
alterList(onList: any): void;
|
|
269
|
+
spliceList(): void;
|
|
270
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
271
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
272
|
+
to: any;
|
|
273
|
+
related: any;
|
|
274
|
+
}): any;
|
|
275
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
276
|
+
onDragStart(evt: any): void;
|
|
277
|
+
onDragAdd(evt: any): void;
|
|
278
|
+
onDragRemove(evt: any): void;
|
|
279
|
+
onDragUpdate(evt: any): void;
|
|
280
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
281
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
282
|
+
onDragEnd(): void;
|
|
283
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
284
|
+
move: Function;
|
|
285
|
+
tag: string;
|
|
286
|
+
clone: Function;
|
|
287
|
+
list: unknown[];
|
|
288
|
+
modelValue: unknown[];
|
|
289
|
+
componentData: Record<string, any>;
|
|
290
|
+
} & {
|
|
291
|
+
itemKey?: string | Function | undefined;
|
|
292
|
+
}>, {
|
|
293
|
+
move: Function;
|
|
294
|
+
tag: string;
|
|
295
|
+
clone: Function;
|
|
296
|
+
list: unknown[];
|
|
297
|
+
modelValue: unknown[];
|
|
298
|
+
componentData: Record<string, any>;
|
|
299
|
+
}>;
|
|
300
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList")[], "cancelModal" | "updateCurProgram" | "updateFieldCheckList" | "updateShowAllFieldList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
225
301
|
visible: {
|
|
226
302
|
type: BooleanConstructor;
|
|
227
303
|
default: boolean;
|
|
@@ -230,10 +306,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
230
306
|
type: StringConstructor;
|
|
231
307
|
default: string;
|
|
232
308
|
};
|
|
233
|
-
fieldOriginList: {
|
|
234
|
-
type: PropType<any[]>;
|
|
235
|
-
default: () => never[];
|
|
236
|
-
};
|
|
237
309
|
curProgram: {
|
|
238
310
|
type: PropType<IExportSchemeType>;
|
|
239
311
|
default: () => {};
|
|
@@ -246,17 +318,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
246
318
|
type: PropType<any[]>;
|
|
247
319
|
default: () => never[];
|
|
248
320
|
};
|
|
321
|
+
showAllFieldList: {
|
|
322
|
+
type: PropType<any[]>;
|
|
323
|
+
default: () => never[];
|
|
324
|
+
};
|
|
249
325
|
}>> & {
|
|
250
326
|
onCancelModal?: ((...args: any[]) => any) | undefined;
|
|
251
327
|
onUpdateCurProgram?: ((...args: any[]) => any) | undefined;
|
|
252
328
|
onUpdateFieldCheckList?: ((...args: any[]) => any) | undefined;
|
|
329
|
+
onUpdateShowAllFieldList?: ((...args: any[]) => any) | undefined;
|
|
253
330
|
}, {
|
|
254
331
|
visible: boolean;
|
|
255
332
|
tableListId: string;
|
|
256
|
-
fieldOriginList: any[];
|
|
257
333
|
curProgram: IExportSchemeType;
|
|
258
334
|
programOptions: IExportSchemeType[];
|
|
259
335
|
downLoadFieldList: any[];
|
|
336
|
+
showAllFieldList: any[];
|
|
260
337
|
}>;
|
|
261
338
|
SaveProjectModal: import("vue").DefineComponent<{
|
|
262
339
|
visible: {
|
|
@@ -275,6 +352,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
275
352
|
type: PropType<IExportSchemeType>;
|
|
276
353
|
default: () => {};
|
|
277
354
|
};
|
|
355
|
+
showAllFieldList: {
|
|
356
|
+
type: PropType<any[]>;
|
|
357
|
+
default: () => never[];
|
|
358
|
+
};
|
|
278
359
|
}, {
|
|
279
360
|
message: import("naive-ui").MessageApi;
|
|
280
361
|
saveTableListExportScheme: (params: any, filterApiConfig: any) => Promise<any>;
|
|
@@ -307,6 +388,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
307
388
|
type: PropType<IExportSchemeType>;
|
|
308
389
|
default: () => {};
|
|
309
390
|
};
|
|
391
|
+
showAllFieldList: {
|
|
392
|
+
type: PropType<any[]>;
|
|
393
|
+
default: () => never[];
|
|
394
|
+
};
|
|
310
395
|
}>> & {
|
|
311
396
|
onCancelSaveModal?: ((...args: any[]) => any) | undefined;
|
|
312
397
|
}>>;
|
|
@@ -934,6 +1019,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
934
1019
|
type: PropType<IExportSchemeType>;
|
|
935
1020
|
default: () => {};
|
|
936
1021
|
};
|
|
1022
|
+
showAllFieldList: {
|
|
1023
|
+
type: PropType<any[]>;
|
|
1024
|
+
default: () => never[];
|
|
1025
|
+
};
|
|
937
1026
|
}>> & {
|
|
938
1027
|
onCancelSaveModal?: ((...args: any[]) => any) | undefined;
|
|
939
1028
|
}, {
|
|
@@ -941,6 +1030,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
941
1030
|
tableListId: string;
|
|
942
1031
|
curProgram: IExportSchemeType;
|
|
943
1032
|
programOptions: IExportSchemeType[];
|
|
1033
|
+
showAllFieldList: any[];
|
|
944
1034
|
}>;
|
|
945
1035
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "cancelModal"[], "cancelModal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
946
1036
|
visible: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as i,provide as t,
|
|
1
|
+
import{defineComponent as e,ref as i,provide as t,watch as l,openBlock as a,createElementBlock as o,createVNode as n,withCtx as s,unref as r,createTextVNode as d}from"vue";import{useMessage as u,NButton as c}from"naive-ui";import m from"./components/ExportModal.vue.js";import v from"./components/SaveProjectModal.vue.js";import f from"./hooks/useAsyncData.js";import{InjectionExportApiConfig as p}from"./constants/index.js";import{cloneDeep as b}from"lodash-es";const L={class:"table-export-field"};var g=e({__name:"index",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},fieldOriginList:{type:Array,default:()=>[]},exportApiConfig:{type:Object}},emits:["cancelModal"],setup(e,{emit:g}){const h=e,y="default",I=u(),{getTableListExportScheme:w}=f(),x={schemeId:y,schemeName:"列表显示字段",fieldKeys:[]},j=i(!1),A=i({schemeId:"",schemeName:"",fieldKeys:[]}),O=i([b(x)]),C=i([]),F=i([]),S=i([]);function M(e){F.value=e}function N(){j.value=!j.value}function P(){g("cancelModal")}function K(e){const i=O.value.find((i=>i.schemeId===e));i&&(A.value=b(i))}function U(e){A.value.fieldKeys=b(e)}function _(e){return e.map((e=>(e.schemeId===y&&(e.fieldKeys=S.value||[]),e)))}async function k(){!function(){var e;C.value=h.fieldOriginList.filter((e=>{var i;return!("operatorColumn"==e.columnName||e.settingObj&&(null==e?void 0:e.settingObj)&&"0"!==(null==(i=null==e?void 0:e.settingObj)?void 0:i.isHide))})),F.value=b(C.value);let i=C.value.filter((e=>"1"==e.isShow||e.fixedExport));S.value=(null==(e=null==i?void 0:i.map)?void 0:e.call(i,(e=>e.columnName)))||[]}(),await async function(){if(!h.tableListId)return I.warning("请传入列表id");try{let e=await w({id:h.tableListId},h.exportApiConfig);if(e){const{schemes:i=[],lastUsedSchemeName:t=""}=e.obj;if(i&&i.length>0){O.value=_([b(x),...i]);const e=i.find((e=>e.schemeName===t));if(e)return void(A.value=b(e))}O.value=_(b(O.value)),A.value=b(O.value[0])}}catch(e){I.error(`获取导出方案数据请求失败:${e}`)}}()}return t(p,h.exportApiConfig),l((()=>h.visible),(async e=>{e&&await k()}),{immediate:!0}),(i,t)=>(a(),o("div",L,[n(m,{visible:e.visible,tableListId:e.tableListId,curProgram:A.value,programOptions:O.value,downLoadFieldList:C.value,showAllFieldList:F.value,onCancelModal:P,onUpdateCurProgram:K,onUpdateFieldCheckList:U,onUpdateShowAllFieldList:M},{add:s((()=>[n(r(c),{type:"info",onClick:N},{default:s((()=>[d("导出并存为方案")])),_:1})])),_:1},8,["visible","tableListId","curProgram","programOptions","downLoadFieldList","showAllFieldList"]),n(v,{visible:j.value,tableListId:e.tableListId,showAllFieldList:F.value,programOptions:O.value,curProgram:A.value,onCancelSaveModal:N},null,8,["visible","tableListId","showAllFieldList","programOptions","curProgram"])]))}});export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dragFieldCheckList: (baseList: any[], targetList: string[]) => string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const c=(c,n)=>{const o=[];return c.map((c=>c.columnName)).forEach((c=>{n.includes(c)&&o.push(c)})),o};export{c as dragFieldCheckList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.table-export-field-modal .n-card-header .svg-wrap i{cursor:pointer;font-size:18px}.table-export-field-modal .n-card-header .svg-wrap i:last-child{margin-left:16px}.table-export-field-modal .n-card-header .svg-wrap .n-icon{cursor:pointer}.table-export-field-modal .export-field-
|
|
1
|
+
.table-export-field-modal .n-card-header .svg-wrap i{cursor:pointer;font-size:18px}.table-export-field-modal .n-card-header .svg-wrap i:last-child{margin-left:16px}.table-export-field-modal .n-card-header .svg-wrap .n-icon{cursor:pointer}.table-export-field-modal .n-card__content{display:flex;flex-direction:column;overflow-y:auto}.table-export-field-modal .n-card__content .tip{margin-bottom:12px}.table-export-field-modal .n-card__content .flex_between{display:flex;justify-content:space-between;margin-bottom:10px}.table-export-field-modal .n-card__content .n-checkbox-group{flex:1;overflow-y:auto}.table-export-field-modal .n-card__content .n-checkbox-group .draggable-checkbox-list{display:flex;flex-wrap:wrap;width:100%}.table-export-field-modal .n-card__content .n-checkbox-group .draggable-checkbox-list .n-checkbox{box-sizing:border-box;display:flex;flex-wrap:nowrap;padding:12px 0;width:20%}.table-export-field-modal .n-card__content .n-checkbox-group .draggable-checkbox-list .n-checkbox .n-checkbox__label{cursor:move;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-export-field-modal .n-card__content .n-checkbox-group .draggable-checkbox-list .n-checkbox.checkbox-disabled .n-checkbox__label{color:rgba(46,46,46,.4)}.table-export-field-modal .flex_right{display:flex;justify-content:flex-end}.table-export-field-modal .flex_right .n-button{margin-left:8px}.table-export-field-modal .save-project-content .n-radio-group{margin-bottom:20px}.table-export-field-modal .select-export-popover .n-base-select-option{padding-left:12px}.table-export-field-modal .select-export-popover .n-base-select-option.n-base-select-option--show-checkmark{padding-right:12px}.table-export-field-modal .select-export-popover .n-base-select-option .n-base-select-option__content{width:100%}.table-export-field-modal .select-export-popover .n-base-select-option .n-base-select-option__content .flex-between{align-items:center;cursor:pointer;display:flex;justify-content:space-between}.table-export-field-modal .select-export-popover .n-base-select-option .n-base-select-option__content .flex-between .content{flex:1;overflow:hidden;padding-right:5px;text-overflow:ellipsis;white-space:nowrap}.table-export-field-modal .select-export-popover .n-base-select-option .n-base-select-option__content .n-base-select-option__check{display:none!important}
|
package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,inject as l,computed as t,openBlock as
|
|
1
|
+
import{defineComponent as e,ref as a,inject as l,computed as t,openBlock as n,createBlock as u,unref as o,isRef as i,withModifiers as r,withCtx as s,createVNode as c,h as d}from"vue";import{useMessage as v,NSelect as p,NTag as m}from"naive-ui";import{WidgetOptionEnums as f,WidgetValEnums as y}from"../../../types/enums.js";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as V,InjectionClassifyFilterList as w}from"../../../constants/index.js";import{judgmentVariable as b}from"../../render-widget/helpers/setDefaultValue.js";import O from"../../render-widget/components/SelectDynamicOption/index.vue.js";import{isEqual as S}from"lodash-es";var k=e({__name:"SelectDynamic",props:{paramCfg:{type:Object,default:null},modelValue:{type:[Array,String,Number],default:null}},emits:["update:modelValue"],setup(e,{emit:k}){const L=e,P=v(),{getDynamicSelectData:j}=h(),C=a(!1),A=l(V),x=l(w),D=a(0),I={class:"select-dynamic-popover"},K=a(1),T=a(),E=a([]),U=a(),_=t((()=>{var e;return null==(e=L.paramCfg)?void 0:e.optionSetting})),M=t((()=>_.value===f.MULTIPLE)),N=t((()=>{const{dynamicOptionInfo:e={}}=L.paramCfg.optionInfo;return e})),$=t((()=>D.value>0&&K.value>=D.value)),F=t((()=>{var e;if(Array.isArray(L.modelValue)&&L.modelValue.length>0){const e=L.modelValue;if(H(e),!M.value&&1==e.length){const a=E.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return E.value.filter((a=>e.includes(a.value)))}return H([]),null!=(e=L.modelValue)?e:null})),J=t((()=>{if(Object.keys(N.value).length>0){const{defaultParams:e=[]}=N.value;return!b(e)}return!0}));function H(e){E.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function W(e){var a;const{defaultValue:l}=L.paramCfg._rawData;(null==(a=null==l?void 0:l.linkageFieldKeys)?void 0:a.length)>0&&l.linkageFieldKeys.forEach((e=>{const a=x.value.find((a=>a.key===e));a&&a.value&&(a.value=a.presetVal=null)})),S(L.modelValue,e)||k("update:modelValue",e)}async function q(e){K.value=e,await z(U.value,K.value)}async function z(e,a){try{if(Object.keys(N.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:r}=N.value;let s={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(s[u[0]]=e),C.value=!0;if(b(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=x.value.find((a=>a.key===e));a&&a.value&&a.value!==y.WHOLE&&(s[e]=a.value)}))}let c=await j(s,A);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]})));return T.value=null!=e?e:[],E.value=null!=t?t:[],D.value=l,t}}}catch(e){P.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{C.value=!1}}const B=g((async e=>{await async function(e){U.value=e.trim(),K.value=1,await z(U.value,K.value)}(e)}),300);async function G(){Object.keys(N.value).length>0&&A&&await z("",K.value)}async function Q(){k("update:modelValue",null),await G()}function R(e){e&&G()}function X({option:e,handleClose:a}){if(M.value){const l=e.value;return d(m,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(L.modelValue)&&L.modelValue.length>0){const e=L.modelValue,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);k("update:modelValue",l.length>0?l:null)}}}},{default:()=>d("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return d("div",l.label)}return J.value&&G(),(e,a)=>(n(),u(o(p),{id:"select-dynamic-popover",style:{width:"200px"},value:o(F),"onUpdate:value":a[0]||(a[0]=e=>i(F)?F.value=e:null),remote:"",clearable:"",filterable:"",maxTagCount:"responsive",loading:C.value,multiple:o(M),menuProps:I,"render-tag":X,onSearch:o(B),onClear:Q,"onUpdate:show":R,onClick:a[1]||(a[1]=r((()=>{}),["stop"]))},{empty:s((()=>[c(O,{dynamicOptionInfo:o(N),fieldTitleList:T.value,optionList:E.value,isMultiple:o(M),curPage:K.value,isLastPage:o($),onUpdateSelect:W,onUpdatePage:q},null,8,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage"])])),_:1},8,["value","loading","multiple","onSearch"]))}});export{k as default};
|
|
@@ -36,6 +36,6 @@ export default function useAdvanced(): {
|
|
|
36
36
|
advanceColWidth: number | null | undefined;
|
|
37
37
|
}[];
|
|
38
38
|
getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
|
|
39
|
-
transformClassifyChild: (conObjList: any) => {};
|
|
39
|
+
transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
|
|
40
40
|
transformParams: (paramsList: any[]) => {};
|
|
41
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{presetValToTimestamp as
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{formatDateRangeInfo as n,presetValToTimestamp as l}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const a={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function u(){return{transformData:function(t,n){return t.map((t=>{var l,o,u;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:T,filterExplicit:p,rangeFilter:d}=t,c={},m={title:(f=t).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?a[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let g,v,y=E;p?(g=E===i.SELECT&&T===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===i.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===i.DATE&&(y="DATE_OUT"),E===i.DATE_TIME&&(y="DATETIME_OUT")):E===i.SELECT&&(null==r?void 0:r.list)&&(null==r?void 0:r.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(E===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===i.DATE&&(y=p?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===i.DATE_TIME&&(y=p?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===i.SELECT&&!1===(null==r?void 0:r.manualMapping)&&(y=i.SELECTDYNAMIC);const L={isRender:!0,widgetType:y,originType:E,valueList:null==(o=null==r?void 0:r.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:T,multiple:T===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==r?void 0:r.manualMapping,showWholeOption:null==r?void 0:r.showWholeOption,dynamicOptionInfo:null==r?void 0:r.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(u=null==s?void 0:s.linkageFieldKeys)?u:[]};return{...m,fieldType:t.dataType,columnName:t.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:L,rangeFilter:d,unit:null!=v?v:"",_extendData:null!=n?n:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const a={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;a[u]="";const r=t.find((e=>e.name===u));if(r){const t=Array.isArray(e.value)&&r.type===i.SELECT?e.value:e.value.toString();if(a[u]=t,e.unit&&e.unit!==o.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD",r.optionType):l(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):l(e.unit,"YYYY-MM-DD HH:mm:ss")),a[u]=t}}})),a},transformParams:function(e){const n={},l=[i.SELECT,i.SELECTDYNAMIC];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,o=l.includes(e.widgetType)||e.value&&e.value.length>1?e.value:e.value.toString();Array.isArray(o)&&o.length>0&&o.includes(t.WHOLE)||(n[i]=o)})),n}}}export{u as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import { AnyObject } from '../../../es/shared/types';
|
|
3
|
-
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, formatRef: ComputedRef<string | [string, string]>, attrs: AnyObject): {
|
|
3
|
+
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, formatRef: ComputedRef<string | [string, string]>, attrs: AnyObject, isPanel?: boolean): {
|
|
4
4
|
focus: () => any;
|
|
5
5
|
blur: () => any;
|
|
6
6
|
};
|