cnhis-design-vue 3.1.51-release.0 → 3.1.51-release.2
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/base-search/index.d.ts +13 -8
- package/es/components/base-search/src/index.vue.d.ts +13 -8
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/callback/index.d.ts +69 -0
- package/es/components/callback/index.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue.d.ts +353 -0
- package/es/components/callback/src/components/dialog/drawer.vue.js +1 -0
- package/es/components/callback/src/components/dialog/drawer.vue2.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue.d.ts +166 -0
- package/es/components/callback/src/components/dialog/modal.vue.js +1 -0
- package/es/components/callback/src/components/dialog/modal.vue2.js +1 -0
- package/es/components/callback/src/components/popup/index.vue.d.ts +48 -0
- package/es/components/callback/src/components/popup/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.d.ts +62 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue.js +1 -0
- package/es/components/callback/src/components/render/drawerIframe/index.vue2.js +1 -0
- package/es/components/callback/src/components/render/enums.d.ts +5 -0
- package/es/components/callback/src/components/render/enums.js +1 -0
- package/es/components/callback/src/components/render/index.vue.d.ts +57 -0
- package/es/components/callback/src/components/render/index.vue.js +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +5700 -0
- package/es/components/callback/src/components/render/popupMaps.js +1 -0
- package/es/components/callback/src/index.vue.d.ts +68 -0
- package/es/components/callback/src/index.vue.js +1 -0
- package/es/components/callback/src/index.vue2.js +1 -0
- package/es/components/callback/src/types/index.d.ts +11 -0
- package/es/components/callback/style/callback-iconfont.ttf +0 -0
- package/es/components/callback/style/index.css +1 -0
- package/es/components/classification/index.d.ts +57 -15
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +57 -15
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue.d.ts +57 -15
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/expand-field/index.d.ts +0 -13
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +0 -13
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue.d.ts +0 -13
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/form-config/index.d.ts +174 -25
- package/es/components/form-config/src/FormConfig.vue.d.ts +175 -26
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -10
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- package/es/components/form-config/src/constants/index.d.ts +19 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +7 -3
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +79 -2
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +10 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +16 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/form-render/src/types/index.d.ts +1 -19
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +4 -3
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +13 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
- package/es/components/quick-search/index.d.ts +13 -8
- package/es/components/quick-search/src/index.vue.d.ts +13 -8
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +615 -255
- package/es/components/select-label/index.d.ts +617 -256
- package/es/components/select-label/index.js +1 -1
- package/es/components/{iho-select-label/src/LabelFormContent.vue.d.ts → select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts} +5 -5
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -0
- package/es/components/{iho-select-label/src/SelectLabel.vue.d.ts → select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts} +7 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -0
- package/es/components/{iho-select-label/src/components/label-classify.vue.d.ts → select-label/src/ihoLabel/iho-label-classify.vue.d.ts} +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.js +1 -0
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -0
- package/es/components/select-label/src/index.vue.d.ts +899 -0
- package/es/components/select-label/src/index.vue.js +1 -0
- package/es/components/select-label/src/index.vue2.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +6 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -5
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +52 -7
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +34 -2
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -6
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +57 -15
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +56 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +55 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -7
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -6
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +16 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +19 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/directive/flexibleResize.d.ts +4 -0
- package/es/{components/classification/src → shared}/directive/flexibleResize.js +1 -1
- package/es/shared/directive/index.d.ts +1 -0
- package/es/shared/directive/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +27 -0
- package/es/shared/utils/business.d.ts +1 -2
- package/es/shared/utils/index.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/classification/src/directive/flexibleResize.d.ts +0 -28
- package/es/components/iho-select-label/index.d.ts +0 -363
- package/es/components/iho-select-label/index.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +0 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue.js +0 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue.js +0 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
- package/es/components/iho-select-label/style/iho-select-label-iconfont.ttf +0 -0
- package/es/components/iho-select-label/style/index.css +0 -1
- package/es/components/table-filter/src/types/tool.d.ts +0 -7
- /package/es/components/{iho-select-label → callback}/src/types/index.js +0 -0
- /package/es/components/{iho-select-label → select-label}/src/types/index.d.ts +0 -0
- /package/es/components/{table-filter/src/types/tool.js → select-label/src/types/index.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,reactive as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,reactive as t,ref as i,provide as l,toRef as n,openBlock as o,createElementBlock as s,createVNode as d,unref as r,withCtx as c,createElementVNode as p,createCommentVNode as u,Fragment as y,renderList as m,normalizeClass as v,toDisplayString as f,createBlock as C,withDirectives as g,createTextVNode as h,vShow as k}from"vue";import{useMessage as b,NSpin as A,NInput as L,NIcon as w,NButton as U,NSelect as _,NTooltip as N}from"naive-ui";import{CloseOutline as V,AddOutline as x,AddCircleSharp as D}from"@vicons/ionicons5";import S from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as F}from"./hooks/useFilterConditions.js";import{conditionOptions as z}from"./helpers/options.js";import{InjectionClassifyFilterList as O}from"../../constants/index.js";const P={class:"searchConditionByApi_wrapper"},q={class:"class-filter-content"},E={key:0,class:"item-name"},R=p("span",{class:"label"},"筛选分类名称:",-1),J={key:1,class:"quickSearch-content"},K=p("span",{class:"label"},"父类名称:",-1),M=["onDblclick","onClick"],Q={key:0,class:"s-content"},G={key:2,class:"item-name"},H=p("span",{class:"label"}," 过滤条件: ",-1),T=p("span",null,"添加",-1),W={class:"select-item-list"},X={class:"index-span"},Y=["onClick"];var Z=e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:Z,emit:$}){const ee=e,ae=b(),te={class:"classify-fieldkey-popover"},ie=a(),le=t({className:"",displayCategory:"",filterConditions:[]}),ne=i(!1);l(O,n(le,"filterConditions"));const{State:oe,isEnableAddDisplayCategory:se,editDisplayCategory:de,handleDisplayCategorySelect:re,handleDisplayCategoryRemove:ce,handleDisplayCategoryAdd:pe,handlerBlur:ue,initDisplayCategories:ye}=j(n(le,"displayCategory"),{conditionList:ee.conditionList},ae),{State:me,paramOptions:ve,addFilterCondition:fe,delFilterCondition:Ce,updateKey:ge,updateCondition:he,getParamCfg:ke,initFilterConditions:be,getRawFilterConditions:Ae}=F(n(le,"filterConditions"),ee.searchFieldList,B.API);function Le(){le.className="",le.displayCategory="",le.filterConditions=[]}async function we(){var e;try{if(Le(),ne.value=!0,ye(ie.displayCategoryList,ee.actionList_prop.displayCategory||void 0),ee.actionList_prop){le.className=ee.actionList_prop.name,await be(ee.tableId,null!=(e=ee.actionList_prop.conObj)?e:[]);le.filterConditions.length<1&&ve.value&&ve.value.length>0&&fe()}}finally{ne.value=!1}}return we(),Z({handleInitConditions:we,saveAdd:function(){new Promise((e=>{le.className||!ee.showItemName?0!==le.filterConditions.length?le.filterConditions.some((({key:e,condition:a,value:t,presetVal:i})=>!e||!a||a===I.EQUAL&&!t&&!i))?ae.warning("请补充完整条件内容"):e(!0):ae.warning("请至少添加一个条件"):ae.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===ee.actionList_prop.from&&(a=ee.actionList_prop.sid,e=null==ee?void 0:ee.conditionList.find((e=>e.sid===a)));const t={displayCategory:le.displayCategory,name:le.className||"",conObj:Ae()},i={id:e?e.sid:"",tableId:ee.tableId,setting:JSON.stringify(t)};$("saveAdd",i,!1)}))},cancelSaveAdd:function(){Le(),$("cancelSaveAdd")},addAction:fe,checkActionList:function(){return le.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(o(),s("div",P,[d(r(A),{show:ne.value},{default:c((()=>[p("div",q,[e.showItemName?(o(),s("div",E,[R,d(r(L),{value:le.className,"onUpdate:value":t[0]||(t[0]=e=>le.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):u("v-if",!0),e.showItemName?(o(),s("div",J,[K,(o(!0),s(y,null,m(r(oe).displayCategories,((e,a)=>(o(),s("div",{class:v(["edit-tag",{"edit-tag-select":e.value===le.displayCategory&&e.disabled}]),key:a,onDblclick:a=>r(de)(a,e),onClick:a=>function(e){re(e)}(e)},[e.disabled?(o(),s("div",Q,[p("span",null,f(e.value),1)])):(o(),C(r(L),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),d(r(w),{component:r(V),class:"anticon-close",size:"20",onClick:t=>r(ce)(a,e)},null,8,["component","onClick"])],42,M)))),128)),r(se)?(o(),s(y,{key:0},[g(d(r(U),{class:"ant-btn",icon:"plus",dashed:"",onClick:r(pe)},{default:c((()=>[d(r(w),{component:r(x),size:"20"},null,8,["component"]),h(" "+f("添加父类"))])),_:1},8,["onClick"]),[[k,!r(oe).showAdd]]),g(d(r(L),{class:"edit-tag",value:r(oe).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>r(oe).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:r(ue),maxLength:10},null,8,["value","onBlur"]),[[k,r(oe).showAdd]])],64)):u("v-if",!0)])):u("v-if",!0),e.hideAddBtn?u("v-if",!0):(o(),s("div",G,[H,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>r(fe)&&r(fe)(...e)),style:{cursor:"pointer"}},[d(r(w),{component:r(D),class:"blue",size:"18"},null,8,["component"]),T])])),p("ul",W,[(o(!0),s(y,null,m(le.filterConditions,((e,a)=>(o(),s("li",{key:a},[p("span",X,f(a+1),1),u(" 选择 field_key "),d(r(_),{class:"form-item",placeholder:"请选择",value:e.key,"menu-props":te,to:"body",filterable:"",options:r(ve),"onUpdate:value":e=>r(ge)(a,e)},null,8,["value","options","onUpdate:value"]),u(" 选择 关系 "),e.key?(o(),C(r(_),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:r(z),"onUpdate:value":e=>r(he)(a,e)},null,8,["value","options","onUpdate:value"])):u("v-if",!0),u(" 自定义 "),e.key&&e.condition&&e.condition!==r(I).NULL?(o(),C(S,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,isAccurate:e.isAccurateSearch,"onUpdate:isAccurate":a=>e.isAccurateSearch=a,"param-cfg":r(ke)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","isAccurate","onUpdate:isAccurate","param-cfg"])):u("v-if",!0),d(r(N),{title:"删除",trigger:"hover"},{trigger:c((()=>[p("i",{onClick:e=>r(Ce)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,Y)])),default:c((()=>[h(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}});export{Z as default};
|
package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
componentCfg: {
|
|
5
|
+
type: PropType<AnyObject>;
|
|
6
|
+
};
|
|
7
|
+
value: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
isAccurateSearchVal: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
$attrs: any;
|
|
17
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
componentCfg: {
|
|
19
|
+
type: PropType<AnyObject>;
|
|
20
|
+
};
|
|
21
|
+
value: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
isAccurateSearchVal: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}>>;
|
|
33
|
+
emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
|
|
34
|
+
valueCp: import("vue").WritableComputedRef<string>;
|
|
35
|
+
isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
|
|
36
|
+
isShowSearch: import("vue").ComputedRef<any>;
|
|
37
|
+
NCheckbox: any;
|
|
38
|
+
NInput: any;
|
|
39
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
componentCfg: {
|
|
41
|
+
type: PropType<AnyObject>;
|
|
42
|
+
};
|
|
43
|
+
value: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
isAccurateSearchVal: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
}>> & {
|
|
52
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
value: string;
|
|
56
|
+
isAccurateSearchVal: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./InputCustom.vue2.js";import u from"../../../../../../_virtual/_plugin-vue_export-helper.js";var e=u(t,[["__file","InputCustom.vue"]]);export{e as default};
|
package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as t,computed as a,openBlock as u,createBlock as l,unref as c,mergeProps as r,isRef as p,createSlots as i,withCtx as n,createVNode as o,createTextVNode as d}from"vue";import{NInput as v,NCheckbox as s}from"naive-ui";var f=e({__name:"InputCustom",props:{componentCfg:{type:Object},value:{type:String,default:""},isAccurateSearchVal:{type:Boolean,default:!1}},emits:["update:value","update:isAccurate"],setup(e,{emit:f}){const m=e,h=t(),y=a({set(e){f("update:value",e)},get:()=>m.value}),g=a({set(e){f("update:isAccurate",e)},get:()=>m.isAccurateSearchVal}),k=a((()=>{var e;return(null==(e=h.accurateSearch)?void 0:e.switchEnable)&&1===h.filterExplicit}));return(e,t)=>(u(),l(c(v),r(c(h),{value:c(y),"onUpdate:value":t[1]||(t[1]=e=>p(y)?y.value=e:null),type:"text"}),i({_:2},[c(k)?{name:"prefix",fn:n((()=>[o(c(s),{checked:c(g),"onUpdate:checked":t[0]||(t[0]=e=>p(g)?g.value=e:null)},{default:n((()=>[d("精确查询")])),_:1},8,["checked"])])),key:"0"}:void 0]),1040,["value"]))}});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as i,withDirectives as a,openBlock as n,createElementBlock as l,normalizeStyle as o,createBlock as s,unref as c,Fragment as u,renderList as d,toDisplayString as p,createCommentVNode as r,createElementVNode as v,normalizeClass as m,withCtx as f,createTextVNode as y,createVNode as h}from"vue";import{NEmpty as g,NPopover as L,NButtonGroup as k,NButton as b,NIcon as E}from"naive-ui";import P
|
|
1
|
+
import{defineComponent as e,ref as t,computed as i,withDirectives as a,openBlock as n,createElementBlock as l,normalizeStyle as o,createBlock as s,unref as c,Fragment as u,renderList as d,toDisplayString as p,createCommentVNode as r,createElementVNode as v,normalizeClass as m,withCtx as f,createTextVNode as y,createVNode as h}from"vue";import{NEmpty as g,NPopover as L,NButtonGroup as k,NButton as b,NIcon as E}from"naive-ui";import{vFlexibleResize as P}from"../../../../../../../shared/directive/flexibleResize.js";import{WidgetValEnums as O}from"../../../../types/enums.js";import{ArrowBack as W,ArrowForward as _}from"@vicons/ionicons5";const x={key:0,class:"dynamic-header"},M={class:"dynamic-content"},S=["onClick"],C={key:0,class:"content"},j={class:"content"},w={class:"dynamic-pagination"};var z=e({__name:"index",props:{dynamicOptionInfo:{type:Object,default:()=>({})},fieldTitleList:{type:Array,default:()=>[]},optionList:{type:Array,default:()=>[]},isMultiple:{type:Boolean,default:!1},curPage:{type:Number,default:1},isLastPage:{type:Boolean,default:!1},isShowWhole:{type:Boolean,default:!1}},emits:["updateSelect","updatePage"],setup(e,{emit:z}){const B=e,H=t(200),A=i((()=>{var e,t;return null!=(t=null==(e=B.dynamicOptionInfo)?void 0:e.showKeys)?t:[]})),I=i((()=>A.value&&A.value.length>0?A.value.map((e=>{let t="";return B.fieldTitleList.forEach((i=>{i.columnName===e&&(t=i.title)})),t})):[]));function N(e){const t=B.curPage+e;z("updatePage",t)}function R({distance:e}){const t=H.value+e;H.value=Math.min(Math.max(t,200),1e3)}function T(){}return(t,i)=>a((n(),l("div",{class:"select-dynamic-options",style:o({minWidth:H.value+"px",position:"relative"})},[0===e.optionList.length?(n(),s(c(g),{key:0,description:"无数据"})):(n(),l(u,{key:1},[c(I)&&c(I).length>1?(n(),l("div",x,[(n(!0),l(u,null,d(c(I),(e=>(n(),l("span",{key:e,class:"name"},p(e),1)))),128))])):r("v-if",!0),v("ul",M,[(n(!0),l(u,null,d(e.optionList,(t=>(n(),l("li",{class:m(t.actived?"actived":""),key:t.value,onClick:e=>function(e){var t,i,a;if(!B.isMultiple||e.value===O.WHOLE)return null==(t=B.optionList)||t.forEach((e=>{e.actived=!1})),e.actived=!0,void z("updateSelect",[e.value]);null==(i=B.optionList)||i.forEach((e=>{e.value===O.WHOLE&&(e.actived=!1)})),e.actived?e.actived=!1:e.actived=!0;const n=null==(a=B.optionList)?void 0:a.filter((e=>e.actived)).map((e=>e.value));z("updateSelect",n)}(t)},[e.isShowWhole&&t.value===c(O).WHOLE?(n(),l("span",C,p(t.label),1)):(n(!0),l(u,{key:1},d(c(A),(e=>(n(),s(c(L),{key:e,trigger:"hover",duration:0},{trigger:f((()=>[v("span",j,p(t[e]),1)])),default:f((()=>[y(" "+p(t[e]),1)])),_:2},1024)))),128))],10,S)))),128))]),v("div",w,[h(c(k),null,{default:f((()=>[h(c(b),{onClick:i[0]||(i[0]=e=>N(-1)),disabled:e.curPage<=1},{icon:f((()=>[h(c(E),{component:c(W),size:"16"},null,8,["component"])])),default:f((()=>[y(" 上一页 ")])),_:1},8,["disabled"]),h(c(b),{"icon-placement":"right",onClick:i[1]||(i[1]=e=>N(1)),disabled:e.isLastPage},{icon:f((()=>[h(c(E),{component:c(_),size:"16"},null,8,["component"])])),default:f((()=>[y(" 下一页 ")])),_:1},8,["disabled"])])),_:1})])],64))],4)),[[c(P),{mode:"VR",onMove:R,onEnd:T}]])}});export{z as default};
|
|
@@ -1292,4 +1292,59 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
|
1292
1292
|
}>> & {
|
|
1293
1293
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
1294
1294
|
}, {}>;
|
|
1295
|
-
|
|
1295
|
+
declare const InputCustom: import("vue").DefineComponent<{
|
|
1296
|
+
componentCfg: {
|
|
1297
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
1298
|
+
};
|
|
1299
|
+
value: {
|
|
1300
|
+
type: StringConstructor;
|
|
1301
|
+
default: string;
|
|
1302
|
+
};
|
|
1303
|
+
isAccurateSearchVal: {
|
|
1304
|
+
type: BooleanConstructor;
|
|
1305
|
+
default: boolean;
|
|
1306
|
+
};
|
|
1307
|
+
}, {
|
|
1308
|
+
$attrs: any;
|
|
1309
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
1310
|
+
componentCfg: {
|
|
1311
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
1312
|
+
};
|
|
1313
|
+
value: {
|
|
1314
|
+
type: StringConstructor;
|
|
1315
|
+
default: string;
|
|
1316
|
+
};
|
|
1317
|
+
isAccurateSearchVal: {
|
|
1318
|
+
type: BooleanConstructor;
|
|
1319
|
+
default: boolean;
|
|
1320
|
+
};
|
|
1321
|
+
}>> & {
|
|
1322
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
1323
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
1324
|
+
}>>;
|
|
1325
|
+
emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
|
|
1326
|
+
valueCp: import("vue").WritableComputedRef<string>;
|
|
1327
|
+
isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
|
|
1328
|
+
isShowSearch: import("vue").ComputedRef<any>;
|
|
1329
|
+
NCheckbox: any;
|
|
1330
|
+
NInput: any;
|
|
1331
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1332
|
+
componentCfg: {
|
|
1333
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
1334
|
+
};
|
|
1335
|
+
value: {
|
|
1336
|
+
type: StringConstructor;
|
|
1337
|
+
default: string;
|
|
1338
|
+
};
|
|
1339
|
+
isAccurateSearchVal: {
|
|
1340
|
+
type: BooleanConstructor;
|
|
1341
|
+
default: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
}>> & {
|
|
1344
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
1345
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
1346
|
+
}, {
|
|
1347
|
+
value: string;
|
|
1348
|
+
isAccurateSearchVal: boolean;
|
|
1349
|
+
}>;
|
|
1350
|
+
export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),
|
|
1
|
+
import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),u=e((()=>import("./InputNumberGroup.vue.js"))),r=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),n=e((()=>import("./Select.vue.js"))),v=e((()=>import("./SelectDynamic.vue.js"))),j=e((()=>import("./InputCustom.vue.js")));export{t as CheckboxGroup,r as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,j as InputCustom,u as InputNumberGroup,i as LabelInner,s as LabelOut,n as Select,v as SelectDynamic};
|
|
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
valueCp(): any;
|
|
13
13
|
unit(): any;
|
|
14
|
+
isAccurateSearchVal(): any;
|
|
14
15
|
}, {
|
|
15
16
|
search(): void;
|
|
16
17
|
getEleWidth(cfg: any): {
|
|
@@ -22,7 +23,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
23
|
}> | null;
|
|
23
24
|
handleUpdate(val: any): void;
|
|
24
25
|
handleUpdateUnit(val: any): void;
|
|
25
|
-
|
|
26
|
+
handleUpdateAccurateSearch(val: any): void;
|
|
27
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:unit" | "update:isAccurate" | "outFilterChange")[], "update:modelValue" | "update:unit" | "update:isAccurate" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
28
|
cfg: {
|
|
27
29
|
type: ObjectConstructor;
|
|
28
30
|
required: true;
|
|
@@ -33,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
35
|
}>> & {
|
|
34
36
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
35
37
|
"onUpdate:unit"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
36
39
|
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
37
40
|
}, {}>;
|
|
38
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as
|
|
1
|
+
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const l=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(l.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:l,widgetCfg:s,accurateSearch:n,filterExplicit:u}=e,{props:c,handlerProps:h}=a.get(t);let p={...c,accurateSearch:n,filterExplicit:u};h&&(p=h(p,{...s,title:i||r})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:l,style:s,eventsBySearch:n=[]}=a.get(i),u={...this.initialProps,value:r,componentCfg:e},c=n.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,u)}),{...e,[`on${i}`]:r}}),{});return t(l,{...s,...u,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...c})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
|
|
@@ -18,7 +18,61 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
18
18
|
setDefaultValue: (defaultValue: any) => any;
|
|
19
19
|
style?: undefined;
|
|
20
20
|
} | {
|
|
21
|
-
component:
|
|
21
|
+
component: import("vue").DefineComponent<{
|
|
22
|
+
componentCfg: {
|
|
23
|
+
type: import("vue").PropType<import("../../../..").AnyObject>;
|
|
24
|
+
};
|
|
25
|
+
value: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
isAccurateSearchVal: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
$attrs: any;
|
|
35
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
+
componentCfg: {
|
|
37
|
+
type: import("vue").PropType<import("../../../..").AnyObject>;
|
|
38
|
+
};
|
|
39
|
+
value: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
isAccurateSearchVal: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
}>>;
|
|
51
|
+
emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
|
|
52
|
+
valueCp: import("vue").WritableComputedRef<string>;
|
|
53
|
+
isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
|
|
54
|
+
isShowSearch: import("vue").ComputedRef<any>;
|
|
55
|
+
NCheckbox: any;
|
|
56
|
+
NInput: any;
|
|
57
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
componentCfg: {
|
|
59
|
+
type: import("vue").PropType<import("../../../..").AnyObject>;
|
|
60
|
+
};
|
|
61
|
+
value: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
isAccurateSearchVal: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
}>> & {
|
|
70
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
value: string;
|
|
74
|
+
isAccurateSearchVal: boolean;
|
|
75
|
+
}>;
|
|
22
76
|
props: {
|
|
23
77
|
clearable: boolean;
|
|
24
78
|
allowInput: (value: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a
|
|
1
|
+
import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
|
|
@@ -25,6 +25,7 @@ export default function useAdvanced(): {
|
|
|
25
25
|
};
|
|
26
26
|
rangeFilter: boolean | undefined;
|
|
27
27
|
unit: any;
|
|
28
|
+
isAccurateSearchVal: boolean;
|
|
28
29
|
_extendData: IExtendConfigurationType;
|
|
29
30
|
title: string;
|
|
30
31
|
alias: string | undefined;
|
|
@@ -34,6 +35,7 @@ export default function useAdvanced(): {
|
|
|
34
35
|
advanceOptionSetting: string;
|
|
35
36
|
placeholder: string | undefined;
|
|
36
37
|
advanceColWidth: number | null | undefined;
|
|
38
|
+
accurateSearch: any;
|
|
37
39
|
}[];
|
|
38
40
|
getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
|
|
39
41
|
transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as t,WidgetValEnums as i}from"../types/enums.js";import{isString as n}from"lodash-es";import{formatDateRangeInfo as l,presetValToTimestamp as a}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const r={[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(i,n){return i.map((i=>{var l,a,o;const{optionInfo:u={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:s,defaultValue:E,optionType:c,filterExplicit:p,rangeFilter:T}=i,d={},m={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?r[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width,accurateSearch:f.accurateSearch?f.accurateSearch:{}};var f;let g,v,y=s;p?(g=s===t.SELECT&&c===e.MULTIPLE?null==E?void 0:E.valueList:null==(l=null==E?void 0:E.valueList)?void 0:l[0],v=null==E?void 0:E.unit,s===t.LABEL&&(y="SELECTLABEL",g=null==E?void 0:E.valueList),s===t.DATE&&(y="DATE_OUT"),s===t.DATE_TIME&&(y="DATETIME_OUT")):s===t.SELECT&&(null==u?void 0:u.list)&&(null==u?void 0:u.list.length)<10&&(y="CHECKBOX_GROUP"),T&&(s===t.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),s===t.DATE&&(y=p?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),s===t.DATE_TIME&&(y=p?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),s===t.SELECT&&!1===(null==u?void 0:u.manualMapping)&&(y=t.SELECTDYNAMIC);const A={isRender:!0,widgetType:y,originType:s,valueList:null==(a=null==u?void 0:u.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:c,multiple:c===e.MULTIPLE||y===t.SELECTLABEL,manualMapping:null==u?void 0:u.manualMapping,showWholeOption:null==u?void 0:u.showWholeOption,dynamicOptionInfo:null==u?void 0:u.dynamicOptionInfo,classifyStr:null==E?void 0:E.classifyStr,linkageFieldKeys:null!=(o=null==E?void 0:E.linkageFieldKeys)?o:[]};return{...m,fieldType:i.dataType,columnName:i.name,settingObj:d,setting:JSON.stringify(d),widgetCfg:A,rangeFilter:T,unit:null!=v?v:"",isAccurateSearchVal:!1,_extendData:null!=n?n:{}}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return[t.SELECT,t.CHECKBOX_GROUP,t.SELECTDYNAMIC].includes(n)&&l.multiple?i:i[0]},transformClassifyChild:function(e,i){const n={};return e&&e.length>0&&e.forEach((e=>{const r=e.field_key;n[r]="";const u=i.find((e=>e.name===r));if(u){const i=Array.isArray(e.value)&&u.type===t.SELECT?e.value:e.value.toString();if(n[r]=i,e.unit&&e.unit!==o.CUSTOM){let i="";u.type===t.DATE&&(i=u.rangeFilter?l(e.unit,"YYYY-MM-DD",u.optionType):a(e.unit,"YYYY-MM-DD")),u.type===t.DATE_TIME&&(i=u.rangeFilter?l(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):a(e.unit,"YYYY-MM-DD HH:mm:ss")),n[r]=i}}})),n},transformParams:function(e){const l={},a=[t.SELECT,t.SELECTDYNAMIC,t.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{let t="";const o=e.field_key;e.value&&(t=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>n(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString()),Array.isArray(t)&&t.length>0&&t.includes(i.WHOLE)||(Object.keys(e).includes("isAccurateSearch")&&(l[e.accurateSearchKey]=e.isAccurateSearch?1:0),l[o]=t)})),l}}}export{u as default};
|
|
@@ -3,13 +3,7 @@ export default function (): {
|
|
|
3
3
|
isRender: (cfg: ISearchType) => any;
|
|
4
4
|
getDefValByRenderWidget: (cfg: ISearchType) => Promise<any>;
|
|
5
5
|
initRenderWidgetCfg: (cfg: ISearchType) => Promise<any>;
|
|
6
|
-
getRenderSearchConObj: (cfg: ISearchType) =>
|
|
7
|
-
widgetType: any;
|
|
8
|
-
field_key: string;
|
|
9
|
-
con: string | undefined;
|
|
10
|
-
value: any[] | null;
|
|
11
|
-
unit: string;
|
|
12
|
-
} | null;
|
|
6
|
+
getRenderSearchConObj: (cfg: ISearchType) => any;
|
|
13
7
|
getDefValByRenderConObj: (conObj: ISearchConfigType, cfg: ISearchType) => any;
|
|
14
8
|
isExistDefValByRenderWidget: (cfg: ISearchType) => boolean;
|
|
15
9
|
resetRenderWidgetValue: (cfg: ISearchType) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as t,WidgetOptionEnums as n}from"../types/enums.js";const
|
|
1
|
+
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as t,WidgetOptionEnums as n}from"../types/enums.js";const r=[t.CHECKBOX_GROUP,t.DATE,t.DATE_TIME,t.DATE_RANGE_INNER,t.DATETIME_RANGE_INNER,t.LABEL];function i(){function i(e){var t;return null==(t=e.widgetCfg)?void 0:t.isRender}async function a(t){const{widgetType:r,defaultValue:i,defValueUnit:a,optionSetting:u,multiple:c}=t.widgetCfg||{},l=e.get(r);let o;if(l){const{setDefaultValue:e}=l;e&&(o=await e(i,a,{optSetting:null!=u?u:n.ALL,multiple:c,_cfg:t}))}return o}return{isRender:i,getDefValByRenderWidget:a,initRenderWidgetCfg:async function(e){const t=i(e);if(!t)return t;const{widgetType:n}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),e.isRender=t,e.widgetType=n,e.con="EQ",r.includes(n)&&(e._isBlock=!0),1==e.filterExplicit&&(e.value=await a(e)),t},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:t,con:n,value:r,widgetType:a,unit:u=""}=e,c=Array.isArray(r)?r:r?[r]:[],l={widgetType:a,field_key:t,con:n,value:c.length>0?c:null,unit:u};return e.accurateSearch.switchEnable&&(l.isAccurateSearch=e.isAccurateSearchVal,l.accurateSearchKey=e.accurateSearch.searchKey),l},getDefValByRenderConObj:function(e,n){if(!i(n))return null;const{widgetType:r,multiple:a}=n.widgetCfg||{},{value:u}=e;return r!==t.SELECT&&r!==t.CHECKBOX_GROUP||!a?Array.isArray(u)?u[0]:u:Array.isArray(u)?u:u?[u]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:t,defValueUnit:n}=e.widgetCfg||{};return!(!t&&!n)},resetRenderWidgetValue:function(e){const t=i(e);return t?(e.value=null,t):t}}}export{i as default};
|
|
@@ -48,9 +48,4 @@ export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
|
|
|
48
48
|
remark: string | undefined;
|
|
49
49
|
} | null)[];
|
|
50
50
|
export declare const transformConditions: (rawConditions: any, params: any[]) => any;
|
|
51
|
-
export declare const transformRawConditions: (conditions: any[]) =>
|
|
52
|
-
field_key: any;
|
|
53
|
-
con: any;
|
|
54
|
-
value: any;
|
|
55
|
-
unit: any;
|
|
56
|
-
}[];
|
|
51
|
+
export declare const transformRawConditions: (conditions: any[]) => any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DataTypeEnums as e,WidgetTypeEnums as
|
|
1
|
+
import{DataTypeEnums as e,WidgetTypeEnums as t,WidgetOptionEnums as l}from"../types/enums.js";const a=(a,i=[])=>a===e.API?i.map((e=>{var i,n,u,r,p,o,c,d,y,s,v,E;const m=null!=(n=null==(i=e.optionInfo)?void 0:i.list)?n:[];let f=e.type;return e.type===t.LABEL&&(f=t.SELECTLABEL),e.type===t.SELECT&&!1===(null==(u=null==e?void 0:e.optionInfo)?void 0:u.manualMapping)&&(f=t.SELECTDYNAMIC),e.rangeFilter&&(e.type===t.INPUT_NUMBER&&(f=t.INPUTNUMBER_RANGE),e.type===t.DATE&&(f=t.DATE_RANGE_INNER),e.type===t.DATE_TIME&&(f=t.DATETIME_RANGE_INNER)),{dataType:a,p_name:e.name,p_type:e.dataType,title:e.title,customTitle:e.customTitle,type:f,optionSetting:e.optionType,openAdvancedFilter:e.isShowSearch,filterOutDisplay:e.filterExplicit,filterOutRequired:e.explicitRequired,width:e.width,defValCfg:{value:e.type===t.SELECT&&e.optionType===l.MULTIPLE?null!=(p=null==(r=e.defaultValue)?void 0:r.valueList)?p:[]:null!=(d=null==(c=null==(o=e.defaultValue)?void 0:o.valueList)?void 0:c[0])?d:null,presetVal:e.type===t.SELECT&&e.optionType===l.MULTIPLE?(null==(y=e.defaultValue)?void 0:y.unit)?[null==(s=e.defaultValue)?void 0:s.unit]:[]:null!=(E=null==(v=e.defaultValue)?void 0:v.unit)?E:null},mappingConfig:{mappingMethod:null,mapping:m.map((({name:e,value:t})=>({label:e,value:t})))},remark:e.remark,optionInfo:e.optionInfo,_rawData:e}})):[],i=t=>t.map((t=>{var l;const{title:a,customTitle:i,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:r,width:p,optionSetting:o,defValCfg:c,mappingConfig:d,remark:y,_rawData:s}=t,{value:v,presetVal:E}=c,{mapping:m}=d;if(t.dataType===e.API){const{p_name:e,p_type:c,type:d}=t;return{...s,name:e,title:a,customTitle:i,type:d,dataType:c,isShowSearch:n,filterExplicit:u,explicitRequired:r,width:p,optionType:o,defaultValue:{valueList:Array.isArray(v)?v:v?[v]:[],unit:Array.isArray(E)?E[0]:E},optionInfo:{manualMapping:null==(l=null==s?void 0:s.optionInfo)?void 0:l.manualMapping,list:m.map((({label:e,value:t})=>({name:e,value:t})))},remark:y}}return null})).filter((e=>!!e)),n=(e,a)=>e.map((e=>{var i,n;const u=((e,t)=>t.find((t=>t.p_name===e)))(e.field_key,a);let r=e.value;r&&!Array.isArray(r)&&(r=[r]);const p=(null==u?void 0:u.type)!==t.SELECT&&(null==u?void 0:u.type)!==t.SELECTDYNAMIC||(null==u?void 0:u.optionSetting)!==l.MULTIPLE?null!=(i=null==r?void 0:r[0])?i:null:null!=r?r:[],o={key:e.field_key,condition:e.con,value:p,presetVal:null!=(n=e.unit)?n:null};return Object.keys(e).includes("isAccurateSearch")&&(o.isAccurateSearch=e.isAccurateSearch,o.accurateSearchKey=e.accurateSearchKey),o})),u=e=>e.map((e=>{const t={field_key:e.key,con:e.condition,value:Array.isArray(e.value)?e.value:e.value?[e.value]:[],unit:e.presetVal};return Object.keys(e).includes("isAccurateSearch")&&(t.isAccurateSearch=e.isAccurateSearch,t.accurateSearchKey=e.accurateSearchKey),t}));export{n as transformConditions,i as transformDataToEnd,a as transformDataToFront,u as transformRawConditions};
|
|
@@ -24,6 +24,8 @@ export declare type ISearchType = {
|
|
|
24
24
|
value?: any;
|
|
25
25
|
sid?: string;
|
|
26
26
|
alias?: string;
|
|
27
|
+
accurateSearch?: any;
|
|
28
|
+
isAccurateSearchVal?: boolean;
|
|
27
29
|
};
|
|
28
30
|
export declare type IFilterItemType = {
|
|
29
31
|
con: string;
|
|
@@ -85,6 +87,8 @@ export declare type ISearchConfigType = {
|
|
|
85
87
|
is_compare_field?: boolean;
|
|
86
88
|
limit_date?: any;
|
|
87
89
|
wordbookValueList?: any;
|
|
90
|
+
isAccurateSearch?: boolean;
|
|
91
|
+
accurateSearchKey?: string;
|
|
88
92
|
};
|
|
89
93
|
export declare type ITreeDataType = {
|
|
90
94
|
name: string;
|
|
@@ -134,6 +138,7 @@ export declare type IApiServerType = {
|
|
|
134
138
|
rangeFilter?: boolean;
|
|
135
139
|
remark?: string;
|
|
136
140
|
keyword?: boolean;
|
|
141
|
+
accurateSearch?: any;
|
|
137
142
|
};
|
|
138
143
|
export declare type dynamicOptionInfoType = {
|
|
139
144
|
filterKeys: string[];
|
|
@@ -187,13 +192,23 @@ export declare type IFilterConditionType = {
|
|
|
187
192
|
export declare type IFormStateType = {
|
|
188
193
|
className: string;
|
|
189
194
|
displayCategory: string;
|
|
190
|
-
filterConditions:
|
|
195
|
+
filterConditions: IfilterConditionsType[];
|
|
196
|
+
};
|
|
197
|
+
export declare type IfilterConditionsType = {
|
|
198
|
+
condition: string;
|
|
199
|
+
key: string;
|
|
200
|
+
presetVal: string;
|
|
201
|
+
value: string;
|
|
202
|
+
isAccurateSearch?: boolean;
|
|
203
|
+
accurateSearchKey?: string;
|
|
191
204
|
};
|
|
192
205
|
export declare type ISearchParamsType = {
|
|
193
206
|
field_key: string;
|
|
194
207
|
con: string;
|
|
195
208
|
value: string[];
|
|
196
209
|
unit: 'custom' | null;
|
|
210
|
+
isAccurateSearch?: boolean;
|
|
211
|
+
accurateSearchKey?: string;
|
|
197
212
|
};
|
|
198
213
|
export declare type IFilterCategoryLabelItemType = {
|
|
199
214
|
classifyId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Func } from '../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, Func } from '../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
value: {
|
|
@@ -17,6 +17,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
precision: {
|
|
18
18
|
type: NumberConstructor;
|
|
19
19
|
};
|
|
20
|
+
whiteList: {
|
|
21
|
+
type: PropType<string[]>;
|
|
22
|
+
};
|
|
23
|
+
inputProps: {
|
|
24
|
+
type: PropType<AnyObject>;
|
|
25
|
+
};
|
|
26
|
+
popperProps: {
|
|
27
|
+
type: PropType<AnyObject>;
|
|
28
|
+
};
|
|
20
29
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
30
|
value: {
|
|
22
31
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -34,6 +43,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
43
|
precision: {
|
|
35
44
|
type: NumberConstructor;
|
|
36
45
|
};
|
|
46
|
+
whiteList: {
|
|
47
|
+
type: PropType<string[]>;
|
|
48
|
+
};
|
|
49
|
+
inputProps: {
|
|
50
|
+
type: PropType<AnyObject>;
|
|
51
|
+
};
|
|
52
|
+
popperProps: {
|
|
53
|
+
type: PropType<AnyObject>;
|
|
54
|
+
};
|
|
37
55
|
}>>, {
|
|
38
56
|
onChange: Func<any[], any>;
|
|
39
57
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,computed as t,ref as l,watch as u,createVNode as n,mergeProps as o}from"vue";import{findAncestor as a}from"../../utils/index.js";import{isArray as i,isString as r,isNumber as s,isObject as v}from"lodash-es";import{NInput as p,NDropdown as c}from"naive-ui";import"../../../components/form-render/index.js";import{createInputSlot as f}from"../../../components/form-render/src/utils/index.js";var d=e({props:{value:{type:[Number,String]},onChange:{type:Function,default:()=>({})},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number},whiteList:{type:Array},inputProps:{type:Object},popperProps:{type:Object}},setup(e){const d=f(e),m=t((()=>i(e.whiteList)?e.whiteList.reduce(((e,t)=>(r(t)&&e.push({label:t,value:t}),e)),[]):[]));const h=l(),g=t({get:()=>h.value,set:e=>s(e)?h.value=e+"":r(e)?e.endsWith("/")?h.value="/":void(h.value=m.value.some((t=>t.label!==e&&t.label.includes(e)))?"":e):void 0});function b(e=-1){const t=s(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===t?"":`(\\.[0-9]${s(t)?`{0,${t}}`:"*"})?`}$`)}u((()=>e.value),(e=>g.value=e),{immediate:!0});const y=b();function j(){if(r(g.value)&&"-"!==g.value)if("/"===g.value||function(e,t=!1){return m.value.length&&m.value.some((({value:l})=>t?l.includes(e):l===e))}(g.value))e.onChange(g.value);else if(y.test(g.value)){const t=g.value.endsWith(".")?g.value.slice(0,-1):g.value;e.onChange(g.value=t)}else g.value=e.value;else g.value=e.value}const w=l(!1),x=l();function $(){w.value=!0}function C(e){var t;if(!e.target)return;const l=e.target;(null==(t=x.value)?void 0:t.$el)&&a(l,(e=>e===x.value.$el))||(w.value=!1)}function F(e,t){var l,u;v(t)&&(g.value=t.value,null==(u=null==(l=x.value)?void 0:l.focus)||u.call(l))}const O=t((()=>b(e.precision)));function P(e){return!(null!=e&&""!==e&&"/"!==e&&r(e)&&!e.endsWith("/"))||(!(!m.value.length||!m.value.some((t=>t.label.includes(e))))||O.value.test(e)&&"-."!==e&&!e.startsWith("."))}return()=>{const t=n(p,o({ref:x,value:g.value,"onUpdate:value":e=>g.value=e,"allow-input":P,onBlur:j,onClick:$,onFocus:$},e.inputProps),d.value);return m.value.length?n(c,o({onSelect:F,options:m.value,show:w.value,width:"trigger",onClickoutside:C},e.popperProps),{default:()=>t}):t}}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{constructor(t){this.maskMove=t=>{const e=this._isV?t.screenX:t.screenY,s=e-this._mv;this._mv=e;const{onMove:o}=this.options;o&&o({evt:t,distance:s})},this.maskUp=t=>{const{onEnd:e}=this.options,s=this._isV?t.screenX:t.screenY;e&&e({evt:t,distance:s-this._ms}),this.maskRemove()},this.toolDown=t=>{this.maskInsert(),this._isV=/^V/.test(this.options.mode),this._ms=this._mv=this._isV?t.screenX:t.screenY;const{onStart:e}=this.options;e&&e({evt:t,distance:0})},this.options=t||{},this.tool=null,this.mask=null,this._elPosition=null,this._isV=!1,this._ms=0,this._mv=0,this.init(t)}init(t){const{el:e}=t;if(!e)return;const s=this.toolCreate();this.initElPosition(),e.appendChild(s)}destroyed(){const{el:t}=this.options;this.maskRemove(),this.toolRemove(),this._elPosition?t.style.setProperty("position",this._elPosition):t.style.removeProperty("position")}initElPosition(){const t=this.options.el;if(!t)return;this._elPosition=t.style.position;const e=window.getComputedStyle(t,null).position;e&&"static"!==e||t.style.setProperty("position","relative")}maskCreate(t){if(this.mask)return this.mask;const e=document.createElement("div");return e.style="position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:"+(/^V/.test(t)?"col":"row")+"-resize",e.addEventListener("mousemove",this.maskMove),e.addEventListener("mouseup",this.maskUp),this.mask=e,e}maskRemove(){const t=this.mask;t&&(t.parentNode&&t.parentNode.removeChild(t),t.removeEventListener("mousemove",this.maskMove),t.removeEventListener("mouseup",this.maskUp),this.mask=null)}maskInsert(){const t=this.mask||this.maskCreate(this.options.mode);return document.body.appendChild(t),t}toolCreate(){if(this.tool)return this.tool;const t=document.createElement("div");return t.addEventListener("mousedown",this.toolDown),this.tool=t,this.toolInitStyle(),t}toolRemove(){const t=this.tool;t&&(t.parentNode&&t.parentNode.removeChild(t),this.tool=null)}toolInitStyle(){let t="user-select:none;cursor:col-resize;position:absolute;";const e=this.options.mode;/^V/.test(e)?t+="width: 8px;cursor:col-resize;":t+="height: 8px;cursor:row-resize;";const s={VR:"left",VL:"right",HT:"bottom",HB:"top"},o=s[e];t+=Object.keys(s).reduce(((t,e)=>{const i=s[e];return i!==o&&(t+=`${i}:0;`),t}),""),this.tool&&(this.tool.style=t)}}
|
|
1
|
+
class t{constructor(t){this.maskMove=t=>{const e=this._isV?t.screenX:t.screenY,s=e-this._mv;this._mv=e;const{onMove:o}=this.options;o&&o({evt:t,distance:s})},this.maskUp=t=>{const{onEnd:e}=this.options,s=this._isV?t.screenX:t.screenY;e&&e({evt:t,distance:s-this._ms}),this.maskRemove()},this.toolDown=t=>{this.maskInsert(),this._isV=/^V/.test(this.options.mode),this._ms=this._mv=this._isV?t.screenX:t.screenY;const{onStart:e}=this.options;e&&e({evt:t,distance:0})},this.options=t||{},this.tool=null,this.mask=null,this._elPosition=null,this._isV=!1,this._ms=0,this._mv=0,this.init(t)}init(t){const{el:e}=t;if(!e)return;const s=this.toolCreate();this.initElPosition(),e.appendChild(s)}destroyed(){const{el:t}=this.options;this.maskRemove(),this.toolRemove(),this._elPosition?t.style.setProperty("position",this._elPosition):t.style.removeProperty("position")}initElPosition(){const t=this.options.el;if(!t)return;this._elPosition=t.style.position;const e=window.getComputedStyle(t,null).position;e&&"static"!==e||t.style.setProperty("position","relative")}maskCreate(t){if(this.mask)return this.mask;const e=document.createElement("div");return e.style="position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:"+(/^V/.test(t)?"col":"row")+"-resize",e.addEventListener("mousemove",this.maskMove),e.addEventListener("mouseup",this.maskUp),this.mask=e,e}maskRemove(){const t=this.mask;t&&(t.parentNode&&t.parentNode.removeChild(t),t.removeEventListener("mousemove",this.maskMove),t.removeEventListener("mouseup",this.maskUp),this.mask=null)}maskInsert(){const t=this.mask||this.maskCreate(this.options.mode);return document.body.appendChild(t),t}toolCreate(){if(this.tool)return this.tool;const t=document.createElement("div");return t.addEventListener("mousedown",this.toolDown),this.tool=t,this.toolInitStyle(),t}toolRemove(){const t=this.tool;t&&(t.parentNode&&t.parentNode.removeChild(t),this.tool=null)}toolInitStyle(){let t="user-select:none;cursor:col-resize;position:absolute;";const e=this.options.mode;/^V/.test(e)?t+="width: 8px;cursor:col-resize;":t+="height: 8px;cursor:row-resize;";const s={VR:"left",VL:"right",HT:"bottom",HB:"top"},o=s[e];t+=Object.keys(s).reduce(((t,e)=>{const i=s[e];return i!==o&&(t+=`${i}:0;`),t}),""),this.tool&&(this.tool.style=t)}}const e={mounted(e,{value:s}){e._flexibleResize||(e._flexibleResize=new t({el:e,mode:s.mode||"VR",onMove:s.onMove,onEnd:s.onEnd}))},beforeUnmount(t){t._flexibleResize&&(t._flexibleResize.destroyed(),t._flexibleResize=void 0)}};export{e as vFlexibleResize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './flexibleResize';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{vFlexibleResize}from"./flexibleResize.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",s="3.1.51-release.
|
|
1
|
+
var e="@cnhis-design-vue/shared",s="3.1.51-release.2",i="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.51-release.2",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,i as main,e as name,n as peerDependencies,s as version};
|
|
@@ -20,3 +20,30 @@ export declare type FormOperationalConfig = {
|
|
|
20
20
|
operationalPrecision: string;
|
|
21
21
|
operationalResult: string;
|
|
22
22
|
};
|
|
23
|
+
export declare type IFlexibleType = {
|
|
24
|
+
el: HTMLBaseElement;
|
|
25
|
+
mode: string;
|
|
26
|
+
onMove: (result: any) => void;
|
|
27
|
+
onEnd: (result: any) => void;
|
|
28
|
+
onStart?: (result: any) => void;
|
|
29
|
+
};
|
|
30
|
+
export declare namespace FormLowCodeReactions {
|
|
31
|
+
type ConObj = {
|
|
32
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
33
|
+
field_key: string;
|
|
34
|
+
value: unknown;
|
|
35
|
+
};
|
|
36
|
+
type Config = {
|
|
37
|
+
conObj: ConObj[];
|
|
38
|
+
} & Partial<{
|
|
39
|
+
sqlExpression: string;
|
|
40
|
+
showField: string[];
|
|
41
|
+
hideField: string[];
|
|
42
|
+
requiredField: string[];
|
|
43
|
+
notRequiredField: string[];
|
|
44
|
+
enabledField: string[];
|
|
45
|
+
disabledField: string[];
|
|
46
|
+
__oppositeBindField: Config;
|
|
47
|
+
__oppositeTargetField: Config;
|
|
48
|
+
}>;
|
|
49
|
+
}
|