cnhis-design-vue 3.1.51-beta.4 → 3.1.51-beta.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,provide as a,computed as l,watch as i,openBlock as n,createElementBlock as r,createElementVNode as s,createCommentVNode as o,renderSlot as c,unref as u,createVNode as f,withCtx as d,createTextVNode as m,toDisplayString as h,Fragment as p,renderList as v}from"vue";import
|
|
1
|
+
import{defineComponent as e,ref as t,provide as a,computed as l,watch as i,openBlock as n,createElementBlock as r,createElementVNode as s,createCommentVNode as o,renderSlot as c,unref as u,createVNode as f,withCtx as d,createTextVNode as m,toDisplayString as h,Fragment as p,renderList as v}from"vue";import b from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import y from"../../table-filter/src/hooks/useAdvanced.js";import k from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as C,NIcon as j}from"naive-ui";import{Search as A}from"@vicons/ionicons5";import{isObject as S,cloneDeep as O}from"lodash-es";import{InjectionFilterApiConfig as x,InjectionFilterSearchConfig as q}from"../../table-filter/src/constants/index.js";const R={class:"base-search-block"},F={class:"base-container"},V={class:"bease-left"},Q={class:"base-ul"},N={key:0,class:"baseli showQuickBtn"},_=s("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),w={key:0,class:"qqConObjCount"},E={key:1,class:"baseli"},I={key:2,class:"baseli"},P=s("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var B=e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0,hideResetBtn:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object},appendValueConfig:{type:Object,default:()=>({})}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{expose:B,emit:U}){const D=e,{outQuickSearchFn:L}=g(),{isRender:W,getRenderSearchConObj:$,isExistDefValByRenderWidget:z,resetRenderWidgetValue:M}=k(),{transformData:T,transformParams:G}=y(),H=t([]),J=t(!1),K=t([]);a(x,D.filterApiConfig),a(q,K);const X=l((()=>Z("hideQuickSearch"))),Y=l((()=>Z("hideResetBtn")));function Z(e){return 0==D.showSettings[e]}function ee(){U("foldQuickSearch",!0)}function te(e={}){const t=ae()||[];!function(e,t,a=!1,l={}){let i=[];K.value.length>0&&(i=O(K.value));U("onFilterSearch",e,t,a,i,l)}(t,G(t),!0,e)}function ae(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let a=0;a<e.length;a++){let l=e[a];const i=$(l);i&&t.push(i)}return t.filter((e=>e.value||Object.keys(e).includes("isAccurateSearch")))}(K.value)}function le(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{M(e)})),L.handlerInitSearchItem(e)}(K.value),U("handleReset",{targetType:"outQuickSearchReset"})}return i((()=>D.searchFieldList),(e=>{e&&e.length>0&&function(){K.value=[];let e=O(T(D.searchFieldList,{_filterApiConfig:D.filterApiConfig})).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));K.value=e,L.handlerInitSearchItem(K.value),K.value.some((e=>W(e)?z(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),i((()=>D.qqConObjCount),(e=>{const t=H.value.length||0;J.value=t+Number(e)>0&&Y.value}),{immediate:!0}),i((()=>K),(()=>{H.value=ae()||[];const e=G(H.value);J.value=H.value.length+Number(D.qqConObjCount)>0&&Y.value,U("getFilterParam",H.value,e)}),{immediate:!0,deep:!0}),i((()=>D.appendValueConfig),(e=>{if(S(e)&&Object.keys(e).length>0){const t=Object.keys(e);K.value.forEach((a=>{t.includes(a.columnName)&&(a.value=e[a.columnName])}))}}),{immediate:!0,deep:!0}),B({handleReset:le,getFilterParams:function(){const e=ae()||[];return G(e)},setFilterParams:function(e){const t=e?Object.keys(e):[];t.length>0&&K.value.forEach((a=>{var l;if(W(a)&&t.includes(a.columnName)){const t=e[a.columnName];a.value=Array.isArray(t)&&!1===(null==(l=a.widgetCfg)?void 0:l.multiple)?t[0]:t}}))}}),(t,a)=>(n(),r("div",R,[s("div",F,[s("div",V,[s("ul",Q,[o(" 筛选分类插槽 "),c(t.$slots,"classification"),u(X)?(n(),r("li",N,[f(u(C),{class:"search-default",type:"default",onClick:ee},{default:d((()=>[_,m(" 筛选"),e.qqConObjCount?(n(),r("span",w,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(n(!0),r(p,null,v(K.value,(e=>(n(),r(p,null,[e.isRender?(n(),r("li",{class:"baseli outQuickSearch-li",key:e._frontId},[f(b,{cfg:e,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,isAccurate:e.isAccurateSearchVal,"onUpdate:isAccurate":t=>e.isAccurateSearchVal=t,onOutFilterChange:te},null,8,["cfg","modelValue","onUpdate:modelValue","isAccurate","onUpdate:isAccurate"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),K.value&&K.value.length>0?(n(),r("li",E,[f(u(C),{type:"primary",onClick:te},{default:d((()=>[f(u(j),{component:u(A),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),m(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),J.value?(n(),r("li",I,[f(u(C),{onClick:le},{default:d((()=>[P,m(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),c(t.$slots,"buttons")])])])]))}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
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,y
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.51-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.51-beta.5",s="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-beta.5",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51-beta.
|
|
3
|
+
"version": "3.1.51-beta.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "ba0bbd018c3b8aa0fc3a2c68cf8505e18874b269"
|
|
67
67
|
}
|