@indfnd/common-pro 1.2.46 → 1.2.48

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.48](http://git.inspur.com/imp-ec/szyx_2/app/business/gy-common/compare/v1.2.47...v1.2.48) (2026-06-12)
6
+
7
+ ### [1.2.47](http://git.inspur.com/imp-ec/szyx_2/app/business/gy-common/compare/v1.2.46...v1.2.47) (2026-06-02)
8
+
9
+
10
+ ### Features
11
+
12
+ * 向后兼容ipb-sc ([60f82c5](http://git.inspur.com/imp-ec/szyx_2/app/business/gy-common/commit/60f82c5e34286ab5ec99ade94e126f7e6b0dbedc))
13
+
5
14
  ### [1.2.46](http://git.inspur.com/imp-ec/szyx_2/app/business/gy-common/compare/v1.2.45...v1.2.46) (2026-05-28)
6
15
 
7
16
  ### [1.2.45](http://git.inspur.com/imp-ec/szyx_2/app/business/gy-common/compare/v1.2.44...v1.2.45) (2026-05-27)
@@ -0,0 +1 @@
1
+ export const id=288;export const ids=[288];export const modules={1288:(e,t,i)=>{i.r(t),i.d(t,{default:()=>c});var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tree-select-poptip"},[e.loading?t("Spin",{attrs:{fix:""}}):e._e(),e._v(" "),t("Input",{staticClass:"selected-input",class:{readonly:e.readonly},attrs:{value:e.selectedTitles,title:e.selectedTitles,icon:e.readonly?"":"md-arrow-dropdown",clearable:!e.readonly,disabled:e.readonly,placeholder:"请选择",readonly:""},on:{"on-clear":e.clearSelected,"on-focus":function(t){e.visible=!0},"on-click":function(t){e.visible=!0}}}),e._v(" "),t("LamboNModal",{staticClass:"ind-modal",attrs:{lazyRender:!1,title:e.selectTitle,footerHide:e.footerHide,transfer:e.transfer},on:{"on-visible-change":e.visibleChange,"on-ok":e.doOk,"on-cancel":function(t){e.visible=!1}},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[t("div",{ref:"treeWrapper",staticClass:"tree-select-wrapper"},[t("LamboNNewTree",e._b({ref:"tree",staticStyle:{height:"calc(100vh - 190px)"},attrs:{value:e.value||e.defaultValue,data:e.data,dataApi:e.dataApi,isShowHeader:!1,multiple:e.showCheckbox},on:{"on-select-change":e.onSelectChange,"on-load":e.initSelectedTitles}},"LamboNNewTree",e.$attrs,!1))],1)])],1)};l._withStripped=!0;var s=i(8030),a=i(9534),o=i(5016),n=i.n(o);const d={name:"LamboNNewTreeSelect",inheritAttrs:!1,components:{LamboNModal:s.LamboNModal,LamboNNewTree:a.LamboNNewTree},props:{isAutoLoad:{type:Boolean,default:!0},data:Array,dataApi:Function,value:Array,defaultValue:Array,readonly:Boolean,showCheckbox:Boolean,selectLeafOnly:{type:Boolean,default:!0},footerHide:Boolean,transfer:{type:Boolean,default(){return!this.$IVIEW||""===this.$IVIEW.transfer||this.$IVIEW.transfer}},selectTitle:{type:String,default:"请选择"},cancelText:{type:String,default:"取消"},okText:{type:String,default:"确定"},lazyRender:{type:Boolean,default:!0},saving:Boolean,cancelNotClose:Boolean},data:()=>({loading:!0,visible:!1,selectedTitles:""}),deactivated(){this.visible=!1},watch:{value:{handler:async function(e){await this.$nextTick(),this.isAutoLoad?this.updateSelectedTitles():this.selectedTitles=n().join(n().map(e||[],"title"),",")},deep:!0}},methods:{visibleChange(e){this.visible=e},initSelectedTitles(e,t){this.updateSelectedTitles(t),this.loading=!1},onSelectChange(e,t){this.updateSelectedTitles(e),this.$emit("on-select-change",e),e.length>0&&!this.showCheckbox&&(this.visible=!1)},clearSelected(){this.selectedTitles="",this.$emit("input",[])},async updateSelectedTitles(){await this.$nextTick();let e=this.getCheckedNodes(!0);e.length||(e=this.getSelectedNodes()),this.selectedTitles=n().join(n().map(e||[],"title"),",")},getSelectedNodes(){return this.$refs.tree.getSelectedNodes()},getCheckedNodes(e=!1){return this.$refs.tree.getCheckedNodes(e)},setSelectedTitles(e){this.selectedTitles=e},doOk(){this.visible=!1,this.updateSelectedTitles(),this.showCheckbox&&this.selectLeafOnly?this.$emit("input",this.getCheckedNodes(!0)):this.showCheckbox?this.$emit("input",this.getCheckedNodes(!1)):this.$emit("input",this.getSelectedNodes())}}};const c=(0,i(4486).default)(d,l,[],!1,null,null,null).exports}};
@@ -0,0 +1 @@
1
+ export const id=296;export const ids=[296];export const modules={6296:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lambo-new-tree-wrapper ind-flex-column",class:[e.isTree?"lambo-mobile-tree":"",e.showHeader?"lambo-new-tree-widthheader":""],staticStyle:{width:"100%",height:"100%"}},[t("div",{staticClass:"lambo-new-tree-content ind-flex-grow ind-flex-column"},[e.isShowSearch?t("Input",{staticClass:"ind-flex-no-shrink",staticStyle:{"z-index":"1"},attrs:{clearable:"",search:"",placeholder:e.inputPlaceholder},on:{"on-clear":e.doSearch,"on-change":e.doSearch,"on-search":e.doSearch},model:{value:e.searchVal,callback:function(t){e.searchVal="string"==typeof t?t.trim():t},expression:"searchVal"}},[e.inputPrepend?t("span",{attrs:{slot:"prepend"},slot:"prepend"},[e._v(e._s(e.inputPrepend))]):e._e()]):e._e(),e._v(" "),t("LamboNTable",{ref:"table",attrs:{rowClick:"",showContextMenu:"",headerHeight:49,rowMultiSelectWithClick:"",isRowSelectable:e.isRowSelectable,groupSelectsChildren:e.multiple,showBottom:!1,keepSelected:!0,value:e.data,dataApi:e.selectDataApi,searchParams:e.urlParams,columns:e.columnsData,rowKey:"id",showTableOption:!1,groupDefaultExpanded:e.expandAll?-1:3,isExternalFilterPresent:e.isExternalFilterPresent,doesExternalFilterPass:e.doesExternalFilterPass,getContextMenuItemsProps:e.getContextMenuItems,rowSelectionMode:e.multiple?"multiple":"single",disablePage:""},on:{"on-select-change":e.onSelectChange}})],1)])};i._withStripped=!0;var a=s(5016),l=s.n(a);const r={name:"LamboNNewTree",inheritAttrs:!1,components:{LamboNTable:s(3920).default},props:{isShowSearch:{type:Boolean,default:!0},inputPlaceholder:{type:String,default:"多个用空格分隔"},title:String,show:Boolean,value:Array,type:String,multiple:Boolean,data:Array,dataApi:Function,urlParams:{type:Object,default:()=>({})},rowKey:String,defaultVisible:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!1},enableSelectAll:Boolean,expandAll:Boolean},data(){return{dataLoading:!1,loading:!1,searchVal:"",searchTerms:[],rows:[],selectRowKey:"",selectDataApi:this.dataApi,columnsData:this.columns,dataInited:!1,selectedRows:[],columns:[{headerName:"标题",minWidth:200,flex:1,field:"title",align:"left",tree:!0,showDisabledCheckboxes:!0,cellClass:this.multiple?"":"ind-radio",valueGetter:e=>e.data.title+(e.data.leafNumber?`(${e.data.leafNumber})`:"")+(e.data.statusName?`【${e.data.statusName}】`:""),cellRendererParams:{checkbox:!0,suppressCount:!0}}]}},created(){this.init()},watch:{type(){this.init()},multiple(){this.init()},searchVal(){this.doSearch()},dataApi(){this.init()},urlParams:{handler:function(e,t){!this.dataInited&&l().isEqual(e,t)||this.init()},deep:!0},value:{handler:function(){this.dataInited&&this.$refs?.table?.gridApi&&this.setSelected()},deep:!0}},computed:{isTree(){return l().some(this.columnsData,(e=>1==e.tree))}},methods:{isRowSelectable(e){return!e.data.disabled&&(this.enableSelectAll||this.multiple||!this.multiple&&!(e.data.children&&e.data.children.length))},async init(){if(!this._initing){if(this._initing=!0,!this.type)return this.selectDataApi=this.dataApi,this.columnsData=this.columns,this.selectRowKey=this.rowKey,(this.defaultVisible||this.show)&&this.getTableData(),void(this._initing=!1);this.defaultVisible&&this.getTableData(),this._initing=!1}},doSearch:l().debounce((function(){const e=this.$refs.table.gridApi,t=e.getSelectedRows();if(this.searchVal&&this.searchVal.trim()?this.searchTerms=this.searchVal.trim().split(/\s+/).filter((e=>e)):this.searchTerms=[],e.onFilterChanged(),this.searchTerms.length>0){const t=new Set;e.forEachNode((e=>{if(this.doesExternalFilterPass(e)){let s=e;for(;s;)s.parent&&s.parent.group&&t.add(s.parent),s=s.parent}})),t.forEach((e=>{e.setExpanded(!0)}))}this.$nextTick((()=>{t.length>0&&this.$refs.table.setSelection(t,!0),this.getFilteredData()}))}),5),isExternalFilterPresent(){return this.searchTerms.length>0},doesExternalFilterPass(e){const t=e.data;if(!t)return!1;if(e.selected)return!0;const s=t[this.columnsData[0]?.field||"title"];if(!s)return!1;const i=String(s).toLowerCase();return this.searchTerms.some((e=>i.includes(e.toLowerCase())))},getFilteredData(){var e=[];if(this.$refs.table.gridApi.forEachNodeAfterFilterAndSort((function(t){e.push(t.data)})),this.isTree){let t=[];l().forEach(e,(e=>{0===e.children.length&&t.push(e)})),this.dataLen=t?.length||0}else this.dataLen=e?.length||e?.filteredRows?.length},getTableData(){this.dataLoading||(this.dataInited?this.$nextTick((()=>{this.setSelected()})):(this.dataLoading=!0,setTimeout((async()=>{await(this.$refs?.table?.tableRefresh()),this.dataInited=!0,await this.setSelected(),this.$nextTick((()=>{this.$emit("on-load",l().cloneDeep(this.$refs?.table.tableData),this.showCheckbox?this.getCheckedNodes():this.getSelectedNodes())})),this.dataLoading=!1}),5)))},onSelectChange(e){if(this.multiple)this.selectedRows=[...e];else{let t=this.selectedRows.length,s=e.length;if(1===t&&0===s)return this.$refs?.table?.setSelection(this.selectedRows,!0),void this.$emit("on-select-change",this.selectedRows,this.selectedRows[0]);if(1===t&&2===s){let t=l().cloneDeep(e);return l().remove(t,(e=>l().some(this.selectedRows,(t=>t[this.rowKey||"id"]==e[this.rowKey||"id"])))),this.$refs?.table?.setSelection(t,!0),void this.$emit("on-select-change",t,t[0])}this.selectedRows=e}this.$emit("on-select-change",this.selectedRows,this.selectedRows[0])},async setSelected(){await this.$nextTick(),this.value.length?this.$refs?.table?.setSelectionByRowKey(this.value,!this.multiple):this.$refs?.table?.clearSelection()},getContextMenuItems(e){const t=e.node,s=[{name:"展开全部节点",action:()=>{this.expandAllNodes()}},{name:"收起全部节点",action:()=>{this.collapseAllNodes()}}];return t&&t.childrenAfterGroup&&t.childrenAfterGroup.length>0&&s.push({name:"展开子节点",action:()=>{this.expandChildNodes(t)}},{name:"收起子节点",action:()=>{this.collapseChildNodes(t)}}),s},expandAllNodes(){this.$refs.table.gridApi.forEachNode((e=>{e.childrenAfterGroup&&e.childrenAfterGroup.length>0&&e.setExpanded(!0)}))},collapseAllNodes(){this.$refs.table.gridApi.forEachNode((e=>{e.childrenAfterGroup&&e.childrenAfterGroup.length>0&&e.setExpanded(!1)}))},expandChildNodes(e){if(e.childrenAfterGroup&&e.childrenAfterGroup.length>0){e.setExpanded(!0);const t=e=>{e.childrenAfterGroup&&e.childrenAfterGroup.forEach((e=>{e.childrenAfterGroup&&e.childrenAfterGroup.length>0&&(e.setExpanded(!0),t(e))}))};t(e)}},collapseChildNodes(e){if(e.childrenAfterGroup&&e.childrenAfterGroup.length>0){const t=e=>{e.childrenAfterGroup&&e.childrenAfterGroup.forEach((e=>{e.childrenAfterGroup&&e.childrenAfterGroup.length>0&&(t(e),e.setExpanded(!1))}))};t(e),e.setExpanded(!1)}},getSelectedNodes(){return this.$refs?.table?.gridApi?.getSelectedRows()||[]},getCheckedNodes(e=!1){const t=this.$refs?.table?.gridApi?.getSelectedRows()||[];return e?t.filter((e=>!e.children||!e.children.length)):t}}};const n=(0,s(4486).default)(r,i,[],!1,null,null,null).exports}};