cnhis-design-vue 3.1.43-beta.1 → 3.1.43-beta.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/big-table/src/utils.js +1 -1
- package/es/components/form-config/index.d.ts +72 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +72 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +43 -0
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/hooks/useLowCodeEvent.d.ts +6 -0
- package/es/components/form-render/src/hooks/useLowCodeEvent.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -127
- package/es/components/form-render/src/types/index.d.ts +1 -2
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +18 -21
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +3 -2
- package/es/shared/utils/business.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../../../shared/assets/img/xb_small.png.js";import"xe-utils";import"moment";import t from"../../../shared/utils/vexutilsExpand.js";import{nextTick as i}from"vue";import{groupTraverser as n,createRowGroupList as r}from"../../iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js";const l=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},s=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i);return e.star?`${e.star}星`:""}return i},o=(e,t)=>{const i=e[t.columnName];if(l(i)){return JSON.parse(i).address||""}return i},a=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i),t=e.days||0;if(!(t>0))return"";if(t<91)return`${t} 天`;if(90<t&&t<365)return`${Math.floor(t/30)} 个月`;if(365<t&&t<1095)return`${e.year} 岁 ${e.month} 月`;if(1095<t)return`${e.year}岁`}return i||""},d=()=>{const e=document.querySelectorAll(".big-table-filter-wrap"),t=e[e.length-1].querySelector(".js-checkbox-wrap"),n=t.scrollTop;i((()=>{t.scrollTop=n}))},c=(e,t,i,n,r)=>{var l,s,o,a,d,c;if(n.isInlineOperating)return!1;const u=i.target,h=document.body,{left:f,right:g,top:p,width:m}=u.getBoundingClientRect();e.left="initial",e.right="initial",e.top="initial";if(f+400>h.clientWidth){const t=(null==h?void 0:h.getBoundingClientRect().right)||0;e.right=t-g-m/2+"px"}else e.left=f+"px";e.top=p+20+(n.filterTopOffset||0)+"px",e.visible=!e.visible;const v=null==(l=r.filterFields[t])?void 0:l.CONVERT.length;e.checkAll=v===(null==(o=null==(s=r.filterFields[t])?void 0:s.filterItems)?void 0:o.length),e.indeterminate=!!v&&v!==((null==(d=null==(a=e.setting)?void 0:a.showSetting)?void 0:d.length)||(null==(c=e.options)?void 0:c.length)),e.searchFilterText=""},u=(e,t)=>{const{rowGroupSetting:i}=t;return n(r(i,e,(e=>e.columnName||e.type)),((t,i)=>i?{field:t,title:t,align:"center"}:function(e,t){return t.find((t=>(t.columnName||t.type)===e))}(t,e)))},h=e=>{var t;return 1!=(e.notParticipatingSearch||"")&&["search","select","radio","checkbox"].includes(e.formType)&&(null==(t=e.options)?void 0:t.length)},f=(e,i)=>{Array.isArray(e)&&e.forEach((e=>{var n;if(i)e.CONVERT=[];else{if(e.setting){if(e.setting="string"==typeof e.setting?JSON.parse(e.setting):e.setting,!t.isEmpty(e.setting.wordbook))return e.con="QUOTE",e.dataSource=[],void(e.QUOTE=[]);if(e.setting.showSetting&&e.setting.showSetting.length>0)return e.con="CONVERT",e.setting.showSetting.forEach((e=>{e.label=e.change_text,e.value=JSON.stringify(e.filter)})),void(e.CONVERT=[])}(null==(n=e.fieldType)?void 0:n.includes("DATE"))?e.settingObj&&"BIRTHDAY"==e.settingObj.attr?(e.con="BIRTHDAY",e.showDate=!1,e.marginx="ml"):(e.con="DATE",e.showDate=!1,e.marginx="ml",e.DATE={con:null,start_val:null,end_val:null}):"TEXT"==e.fieldType?(e.con="CL",e.CL=""):("NUMBER"==e.fieldType||"JSONB"==e.fieldType)&&(e.con="EQ",e.EQ=""),"LABEL"===e.setting.attr&&(e.con="EQ",e.LABELAttr=!0,e.labelSelectList=[]),"EVALUATE"===e.setting.attr&&(e.con="CL",e.selecteds=[],e.EVALUATEAttr=!0)}}))},g=e=>{if("operatorColumn"!==e.columnName)return{name:"EditInput",enabled:1==e.isEdit}},p=(e,i,n)=>{const{groupCountMap:r}=n,l=[];return n.groupCountFields.forEach((e=>{const s=e.tips,o=e.color||"#000",a=e.unit||"";let d=e.defaultValue||0;if("all"==e.range)d=r[e.key];else if("page"==e.range){const{sum:r=0,count:l=0}=((e,i,n=[],r)=>{let l=0,s=0;const{fieldList:o=[]}=r.columnConfig;return e.forEach((e=>{m(e,(e=>{var a,d;if(!e.childrenList||!e.childrenList.length){let c=!0;if(n.length){const i={table:e,form:{},sys:(null==(d=null==(a=null==r?void 0:r.userInfo)?void 0:a.map)?void 0:d.sysParams)||{}};c=t.parseCondition(n,i,o)}if(c){const t=e[i]||0;l+=Number(t),++s}}}))})),{sum:l,count:s}})(i,e.field,e.conObj,n);d=l,"avg"==e.method?d=r/l||0:"sum"==e.method&&(d=r)}d=t.round(d,4),l.push(`<span style="color: ${o}">${s}:${d}${a}</span>`)})),l.join("、")},m=(e,t)=>{if(!e)return;const i=[e];for(;i.length>0;){const e=i.shift();e&&t(e),e.childrenList&&e.childrenList.reverse().forEach((e=>{i.unshift(e)}))}},v=({row:e})=>!e.forbiddenBatchSelect,y=({row:e})=>!e.$__SEPARATE,T=e=>{const t=[],i=(e,n)=>{e.length>0&&e.forEach((e=>{e.qianduan_id||(e.qianduan_id=e.theUniqueKey||window.crypto.getRandomValues(new Uint32Array(1))[0]),e.qianduan_parent_id=n||null,e.childrenList&&i(e.childrenList,e.qianduan_id),t.push(e)}))};return i(e),t},E=(e,t,i,n)=>{t.push(e),i.push(e[n]),e.childrenList&&e.childrenList.length&&e.childrenList.forEach((e=>{e.childrenList&&e.childrenList.length?E(e,t,i,n):(i.push(e[n]),t.push(e))}))},A=(e,t,i)=>{const n=[];if(!e.length)return 1;if(e.forEach((e=>n.push(e[i]))),!n.length)return 1;if(n.length!==t.length)return 1;return n.filter((e=>{t.includes(e)})).length},b=e=>{1!=e.checkedRows.length||v({row:e.checkedRows[0]})||e.checkedRows.pop()},_=(e,t)=>{if(!e.filterFields||!Object.keys(e.filterFields).length)return;const i=t.quickSearchConfig;if(!i||!i.length){return Object.keys(e.filterFields).forEach((t=>{e.filterFields[t].CONVERT=[]})),!1}for(const t in e.filterFields){const i=e.filterFields[t];i&&(i.CONVERT=[])}i.forEach((t=>{if(t.field_key in e.filterFields){if(!e.filterFields[t.field_key])return e.filterFields[t.field_key].CONVERT=[],!1;const i=t.value;e.filterFields[t.field_key].CONVERT=i}}))},O=({row:e})=>{if(e.rowColor){const i=t.hexToRGBA(e.rowColor,.2);return`background-color:${`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`}`}return null},R=(e,t)=>{var i,n;if(!t.isNestTable)return t.height;const r=(null==(i=t.styleSetting)?void 0:i.tableHeight)||"table-simple",l=(null==(n=t.data)?void 0:n.length)||1;return`${e.checkWidth[r]*l+90}px`},N=(e,t="name")=>e.alias||e[t],D=(t,i,n)=>("HEADPORTRAIT"===i&&(t||(t=e)),n(t)),w=(e,t,i)=>{if(!t||!t.length)return e;const n=t.find((e=>e.type===i));if(!n)return e;if(n.suffix)return e+n.suffix;let r=n.h;const l=n.w;"adaptive"===n.h&&"adaptive"!=n.w&&(r=n.w),"adaptive"===n.w&&"adaptive"!=n.h&&(r=n.h);return e+`_${r}x${l}`},L=(e,i,n)=>{if(!e||!e.length)return{display:"inline-block",maxWidth:"100%",maxheight:n};const r=e.find((e=>e.type===i));if(!r)return{display:"inline-block",height:n};return t.handleImageSize(r,n)},C=(e,i)=>{var n;const r=e[i.columnName];if(t.isJSON(r)){const e=r.includes("user_name"),t=JSON.parse(r);if(Array.isArray(t)){const i=t.length;if(i>1)return`已选${i}人`;if(1===i)return e&&(null==(n=t[0])?void 0:n.user_name)||`已选${i}人`}}},B=(e,t)=>{var i,n;const{settingObj:r={},fieldSetting:l={}}=t,{mergedFeildExpression:s}=l;let o=e[t.field];if(s){const t=/#{(.+?)\}/g;o=s.replace(t,((t,i)=>e[i]||""))}const a={content:o};return{btnName:null==(i=null==r?void 0:r.qrCode)?void 0:i.name,trigger_id:null==(n=null==r?void 0:r.qrCode)?void 0:n.id,params:a}},S=(e,t)=>{var i;return(null==(i=e[t])?void 0:i.length)?e[t].filter((e=>"EDIT_ROW"===e.settingObj[0].trigger_type)):[]},k=(e,t)=>t[e.columnName]&&e.fieldSetting&&1==e.fieldSetting.fontContentCopy,I=(e,t,i)=>{if(!e||0===e.length)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");const n=e.find((e=>e.type===t));if(!n)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");let r=i,l="auto";n.h&&(r="adaptive"===n.h?"auto":n.h+"px"),n.w&&(l="adaptive"===n.w?"auto":n.w+"px"),document.body.style.setProperty("--table-image-height",r),document.body.style.setProperty("--table-image-width",l)},Y=(e,t,i={})=>{const n=i[e];return{[t.name]:(r=n,r&&"string"==typeof r&&r.startsWith("###")&&(r=r.slice(3),r=(r=JSON.parse(r)).tooltip||r.value),r)};var r},H=(e,t)=>{Object.values(e.filterFields).forEach((e=>{e.visible=!1})),_(e,t)},j=(e,i)=>{const n=Object.values(e.filterFields),r=Object.keys(e.filterFields),l=((e,i)=>{var n;if(!Array.isArray(e))return[];const r=[];for(let l=0;l<e.length;l++){const s=e[l];let o=0,a="";if(s.EQ||s.CL)o=s.EQ||s.CL,"PERCENTAGE"===(null==(n=s.settingObj)?void 0:n.attr)&&(o=Number(o)/100),s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else if(t.isEmpty(s.QUOTE))if(t.isEmpty(s.CONVERT))if(s.DATE)(s.DATE.start_val||s.DATE.end_val)&&(s.DATE.con="IN"),s.tempCon=s.DATE.con,s.start_val=s.DATE.start_val?s.DATE.start_val.format("YYYY-MM-DD HH:mm:ss"):"",s.end_val=s.DATE.end_val?s.DATE.end_val.format("YYYY-MM-DD HH:mm:ss"):"";else if(s.BIRTHDAY){let e=!1;if((s.BIRTHDAY.limit_date.length>0||s.BIRTHDAY.start_val||s.BIRTHDAY.end_val)&&(s.BIRTHDAY.con="IN"),s.tempCon=s.BIRTHDAY.con,e=!(!s.BIRTHDAY.start_val&&!s.BIRTHDAY.end_val),s.BIRTHDAY.start_val&&!t.validateBirthday(s.BIRTHDAY.start_val,s.title,s.BIRTHDAY.unit))return;if(s.BIRTHDAY.end_val&&!t.validateBirthday(s.BIRTHDAY.end_val,s.title,s.BIRTHDAY.unit))return;if(+s.BIRTHDAY.start_val>+s.BIRTHDAY.end_val)return void window.$message.warning(`${s.title}请输入有效范围`,2);a=i.limit_date||"",s.unit=e&&s.BIRTHDAY.unit||"",s.start_val=s.BIRTHDAY.start_val||"",s.end_val=s.BIRTHDAY.end_val||""}else if(s.LABELAttr){const e=[];s.labelSelectList.forEach((t=>{e.push(t.labelName)})),o=e.join("|#|")}else s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else o=s.CONVERT.map((e=>["string","number"].includes(typeof e)?e:JSON.parse(e)));else o=s.QUOTE.join("|#|");const d={field_key:s.columnName,con:s.DATE||s.BIRTHDAY?s.tempCon:s.con,value:o,limit_date:a||"",start_val:s.start_val||"",end_val:s.end_val||"",unit:s.unit||""};r.push(d)}return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))})(n,e),s=[...l];return(i.tableParams.qqConObj?JSON.parse(i.tableParams.qqConObj):[]).forEach((e=>{r.includes(e.field_key)||s.push(e)})),s},x=(e,t,i)=>{var n;return t.clickFieldKey==t.columnName||"field"==e.relatedItems.triggerMethodPc&&t.columnName==e.relatedItems.triggerMethodField||t.isbtnLink&&i.btnLinks&&(null==(n=i.btnLinks)?void 0:n.includes(t.columnName))},$=(e,t)=>{t.showButtonTop=e.showButtonTop,t.isTree=e.isTree,t.openOnly=e.openOnly,t.isExpand=e.spreadAllBtn,t.levelLazyLoadSetting=Object.assign({},e.levelLazyLoadSetting),t.checkWidth=Object.assign({},t.checkWidth,e.checkWidth)},F=(e,i,n)=>{e.forEach((e=>{t.has(e,"childrenList")&&F(e.childrenList,i,n),t.has(e,n)&&(e[i]=e[n])}))},V=(e,t,i)=>{if(t.isNestTable)return;if(1==e.isTree)return e.visibleCheckAllWrap=!1,!1;e.visibleCheckAllWrap=i.length>1;const n=i.length>=e.curAbleCheckedLen,r=t.pageVO.pageSize===t.pageVO.total,l=i.length>e.currentPageSelectedLength;e.visibleCheckAllWrapMore=l||n&&!r};export{v as checkMethod,E as flattenRow,g as generateEditRender,C as getCandidateComponents,s as getEvaluate,p as getFooterGroup,S as getInlineEditBtn,o as getMapVal,O as getRowStyle,a as getageShowType,u as handleGroupColums,D as handleImgArr,w as handleImgSrc,N as handleName,B as handleQrCodeContent,R as handleTableHeight,I as handleTableImageSize,f as handlerInitSearchItem,H as hideFilterWrap,A as intersectRow,k as isCopy,h as isFilterItem,x as isLink,j as mergeConObjFn,L as modalDetailImage,d as reScrollFilterWrap,b as removeCheckedDisabledRows,Y as setDefaultFormData,_ as setFilterStatus,$ as setTableConfig,F as setTreeGroupTitle,V as setVisibleCheckAllWrap,c as showFilter,T as treeToList,y as visibleMethod};
|
|
1
|
+
import e from"../../../shared/assets/img/xb_small.png.js";import"xe-utils";import"moment";import t from"../../../shared/utils/vexutilsExpand.js";import{nextTick as i}from"vue";import{groupTraverser as n,createRowGroupList as r}from"../../iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js";const l=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},s=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i);return e.star?`${e.star}星`:""}return i},o=(e,t)=>{const i=e[t.columnName];if(l(i)){return JSON.parse(i).address||""}return i},a=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i),t=e.days||0;if(!(t>0))return"";if(t<91)return`${t} 天`;if(90<t&&t<365)return`${Math.floor(t/30)} 个月`;if(365<t&&t<1095)return`${e.year} 岁 ${e.month} 月`;if(1095<t)return`${e.year}岁`}return i||""},d=()=>{const e=document.querySelectorAll(".big-table-filter-wrap"),t=e[e.length-1].querySelector(".js-checkbox-wrap"),n=t.scrollTop;i((()=>{t.scrollTop=n}))},c=(e,t,i,n,r)=>{var l,s,o,a,d,c;if(n.isInlineOperating)return!1;const u=i.target,h=document.body,{left:f,right:g,top:p,width:m}=u.getBoundingClientRect();e.left="initial",e.right="initial",e.top="initial";if(f+400>h.clientWidth){const t=(null==h?void 0:h.getBoundingClientRect().right)||0;e.right=t-g-m/2+"px"}else e.left=f+"px";e.top=p+20+(n.filterTopOffset||0)+"px",e.visible=!e.visible;const v=null==(l=r.filterFields[t])?void 0:l.CONVERT.length;e.checkAll=v===(null==(o=null==(s=r.filterFields[t])?void 0:s.filterItems)?void 0:o.length),e.indeterminate=!!v&&v!==((null==(d=null==(a=e.setting)?void 0:a.showSetting)?void 0:d.length)||(null==(c=e.options)?void 0:c.length)),e.searchFilterText=""},u=(e,t)=>{const{rowGroupSetting:i}=t;return n(r(i,e,(e=>e.columnName||e.type)),((t,i)=>i?{field:t,title:t,align:"center"}:function(e,t){return t.find((t=>(t.columnName||t.type)===e))}(t,e)))},h=e=>{var t;return 1!=(e.notParticipatingSearch||"")&&["search","select","radio","checkbox"].includes(e.formType)&&(null==(t=e.options)?void 0:t.length)},f=(e,i)=>{Array.isArray(e)&&e.forEach((e=>{var n;if(i)e.CONVERT=[];else{if(e.setting){if(e.setting="string"==typeof e.setting?JSON.parse(e.setting):e.setting,!t.isEmpty(e.setting.wordbook))return e.con="QUOTE",e.dataSource=[],void(e.QUOTE=[]);if(e.setting.showSetting&&e.setting.showSetting.length>0)return e.con="CONVERT",e.setting.showSetting.forEach((e=>{e.label=e.change_text,e.value=JSON.stringify(e.filter)})),void(e.CONVERT=[])}(null==(n=e.fieldType)?void 0:n.includes("DATE"))?e.settingObj&&"BIRTHDAY"==e.settingObj.attr?(e.con="BIRTHDAY",e.showDate=!1,e.marginx="ml"):(e.con="DATE",e.showDate=!1,e.marginx="ml",e.DATE={con:null,start_val:null,end_val:null}):"TEXT"==e.fieldType?(e.con="CL",e.CL=""):("NUMBER"==e.fieldType||"JSONB"==e.fieldType)&&(e.con="EQ",e.EQ=""),"LABEL"===e.setting.attr&&(e.con="EQ",e.LABELAttr=!0,e.labelSelectList=[]),"EVALUATE"===e.setting.attr&&(e.con="CL",e.selecteds=[],e.EVALUATEAttr=!0)}}))},g=e=>{if("operatorColumn"!==e.columnName)return{name:"EditInput",enabled:1==e.isEdit}},p=(e,i,n)=>{const{groupCountMap:r}=n,l=[];return n.groupCountFields.forEach((e=>{const s=e.tips,o=e.color||"#000",a=e.unit||"";let d=e.defaultValue||0;if("all"==e.range)d=r[e.key];else if("page"==e.range){const{sum:r=0,count:l=0}=((e,i,n=[],r)=>{let l=0,s=0;const{fieldList:o=[]}=r.columnConfig;return e.forEach((e=>{m(e,(e=>{var a,d;if(!e.childrenList||!e.childrenList.length){let c=!0;if(n.length){const i={table:e,form:{},sys:(null==(d=null==(a=null==r?void 0:r.userInfo)?void 0:a.map)?void 0:d.sysParams)||{}};c=t.parseCondition(n,i,o)}if(c){const t=e[i]||0;l+=Number(t),++s}}}))})),{sum:l,count:s}})(i,e.field,e.conObj,n);d=l,"avg"==e.method?d=r/l||0:"sum"==e.method&&(d=r)}d=t.round(d,4),l.push(`<span style="color: ${o}">${s}:${d}${a}</span>`)})),l.join("、")},m=(e,t)=>{if(!e)return;const i=[e];for(;i.length>0;){const e=i.shift();e&&t(e),e.childrenList&&e.childrenList.reverse().forEach((e=>{i.unshift(e)}))}},v=({row:e})=>!e.forbiddenBatchSelect,y=({row:e})=>!e.$__SEPARATE,T=e=>{const t=[],i=(e,n)=>{e.length>0&&e.forEach((e=>{e.qianduan_id||(e.qianduan_id=e.theUniqueKey||window.crypto.getRandomValues(new Uint32Array(1))[0]),e.qianduan_parent_id=n||null,e.childrenList&&i(e.childrenList,e.qianduan_id),t.push(e)}))};return i(e),t},E=(e,t,i,n)=>{t.push(e),i.push(e[n]),e.childrenList&&e.childrenList.length&&e.childrenList.forEach((e=>{e.childrenList&&e.childrenList.length?E(e,t,i,n):(i.push(e[n]),t.push(e))}))},A=(e,t,i)=>{const n=[];if(!e.length)return 1;if(e.forEach((e=>n.push(e[i]))),!n.length)return 1;if(n.length!==t.length)return 1;return n.filter((e=>{t.includes(e)})).length},b=e=>{1!=e.checkedRows.length||v({row:e.checkedRows[0]})||e.checkedRows.pop()},_=(e,t)=>{if(!e.filterFields||!Object.keys(e.filterFields).length)return;const i=t.quickSearchConfig;if(!i||!i.length){return Object.keys(e.filterFields).forEach((t=>{e.filterFields[t].CONVERT=[]})),!1}for(const t in e.filterFields){const i=e.filterFields[t];i&&(i.CONVERT=[])}i.forEach((t=>{if(t.field_key in e.filterFields){if(!e.filterFields[t.field_key])return e.filterFields[t.field_key].CONVERT=[],!1;const i=t.value;e.filterFields[t.field_key].CONVERT=i}}))},O=({row:e})=>{if(e.rowColor){const i=t.hexToRGBA(e.rowColor,.2)||{};return`background-color:${`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`}`}return null},R=(e,t)=>{var i,n;if(!t.isNestTable)return t.height;const r=(null==(i=t.styleSetting)?void 0:i.tableHeight)||"table-simple",l=(null==(n=t.data)?void 0:n.length)||1;return`${e.checkWidth[r]*l+90}px`},N=(e,t="name")=>e.alias||e[t],D=(t,i,n)=>("HEADPORTRAIT"===i&&(t||(t=e)),n(t)),w=(e,t,i)=>{if(!t||!t.length)return e;const n=t.find((e=>e.type===i));if(!n)return e;if(n.suffix)return e+n.suffix;let r=n.h;const l=n.w;"adaptive"===n.h&&"adaptive"!=n.w&&(r=n.w),"adaptive"===n.w&&"adaptive"!=n.h&&(r=n.h);return e+`_${r}x${l}`},L=(e,i,n)=>{if(!e||!e.length)return{display:"inline-block",maxWidth:"100%",maxheight:n};const r=e.find((e=>e.type===i));if(!r)return{display:"inline-block",height:n};return t.handleImageSize(r,n)},C=(e,i)=>{var n;const r=e[i.columnName];if(t.isJSON(r)){const e=r.includes("user_name"),t=JSON.parse(r);if(Array.isArray(t)){const i=t.length;if(i>1)return`已选${i}人`;if(1===i)return e&&(null==(n=t[0])?void 0:n.user_name)||`已选${i}人`}}},B=(e,t)=>{var i,n;const{settingObj:r={},fieldSetting:l={}}=t,{mergedFeildExpression:s}=l;let o=e[t.field];if(s){const t=/#{(.+?)\}/g;o=s.replace(t,((t,i)=>e[i]||""))}const a={content:o};return{btnName:null==(i=null==r?void 0:r.qrCode)?void 0:i.name,trigger_id:null==(n=null==r?void 0:r.qrCode)?void 0:n.id,params:a}},S=(e,t)=>{var i;return(null==(i=e[t])?void 0:i.length)?e[t].filter((e=>"EDIT_ROW"===e.settingObj[0].trigger_type)):[]},k=(e,t)=>t[e.columnName]&&e.fieldSetting&&1==e.fieldSetting.fontContentCopy,I=(e,t,i)=>{if(!e||0===e.length)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");const n=e.find((e=>e.type===t));if(!n)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");let r=i,l="auto";n.h&&(r="adaptive"===n.h?"auto":n.h+"px"),n.w&&(l="adaptive"===n.w?"auto":n.w+"px"),document.body.style.setProperty("--table-image-height",r),document.body.style.setProperty("--table-image-width",l)},Y=(e,t,i={})=>{const n=i[e];return{[t.name]:(r=n,r&&"string"==typeof r&&r.startsWith("###")&&(r=r.slice(3),r=(r=JSON.parse(r)).tooltip||r.value),r)};var r},H=(e,t)=>{Object.values(e.filterFields).forEach((e=>{e.visible=!1})),_(e,t)},j=(e,i)=>{const n=Object.values(e.filterFields),r=Object.keys(e.filterFields),l=((e,i)=>{var n;if(!Array.isArray(e))return[];const r=[];for(let l=0;l<e.length;l++){const s=e[l];let o=0,a="";if(s.EQ||s.CL)o=s.EQ||s.CL,"PERCENTAGE"===(null==(n=s.settingObj)?void 0:n.attr)&&(o=Number(o)/100),s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else if(t.isEmpty(s.QUOTE))if(t.isEmpty(s.CONVERT))if(s.DATE)(s.DATE.start_val||s.DATE.end_val)&&(s.DATE.con="IN"),s.tempCon=s.DATE.con,s.start_val=s.DATE.start_val?s.DATE.start_val.format("YYYY-MM-DD HH:mm:ss"):"",s.end_val=s.DATE.end_val?s.DATE.end_val.format("YYYY-MM-DD HH:mm:ss"):"";else if(s.BIRTHDAY){let e=!1;if((s.BIRTHDAY.limit_date.length>0||s.BIRTHDAY.start_val||s.BIRTHDAY.end_val)&&(s.BIRTHDAY.con="IN"),s.tempCon=s.BIRTHDAY.con,e=!(!s.BIRTHDAY.start_val&&!s.BIRTHDAY.end_val),s.BIRTHDAY.start_val&&!t.validateBirthday(s.BIRTHDAY.start_val,s.title,s.BIRTHDAY.unit))return;if(s.BIRTHDAY.end_val&&!t.validateBirthday(s.BIRTHDAY.end_val,s.title,s.BIRTHDAY.unit))return;if(+s.BIRTHDAY.start_val>+s.BIRTHDAY.end_val)return void window.$message.warning(`${s.title}请输入有效范围`,2);a=i.limit_date||"",s.unit=e&&s.BIRTHDAY.unit||"",s.start_val=s.BIRTHDAY.start_val||"",s.end_val=s.BIRTHDAY.end_val||""}else if(s.LABELAttr){const e=[];s.labelSelectList.forEach((t=>{e.push(t.labelName)})),o=e.join("|#|")}else s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else o=s.CONVERT.map((e=>["string","number"].includes(typeof e)?e:JSON.parse(e)));else o=s.QUOTE.join("|#|");const d={field_key:s.columnName,con:s.DATE||s.BIRTHDAY?s.tempCon:s.con,value:o,limit_date:a||"",start_val:s.start_val||"",end_val:s.end_val||"",unit:s.unit||""};r.push(d)}return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))})(n,e),s=[...l];return(i.tableParams.qqConObj?JSON.parse(i.tableParams.qqConObj):[]).forEach((e=>{r.includes(e.field_key)||s.push(e)})),s},x=(e,t,i)=>{var n;return t.clickFieldKey==t.columnName||"field"==e.relatedItems.triggerMethodPc&&t.columnName==e.relatedItems.triggerMethodField||t.isbtnLink&&i.btnLinks&&(null==(n=i.btnLinks)?void 0:n.includes(t.columnName))},$=(e,t)=>{t.showButtonTop=e.showButtonTop,t.isTree=e.isTree,t.openOnly=e.openOnly,t.isExpand=e.spreadAllBtn,t.levelLazyLoadSetting=Object.assign({},e.levelLazyLoadSetting),t.checkWidth=Object.assign({},t.checkWidth,e.checkWidth)},F=(e,i,n)=>{e.forEach((e=>{t.has(e,"childrenList")&&F(e.childrenList,i,n),t.has(e,n)&&(e[i]=e[n])}))},V=(e,t,i)=>{if(t.isNestTable)return;if(1==e.isTree)return e.visibleCheckAllWrap=!1,!1;e.visibleCheckAllWrap=i.length>1;const n=i.length>=e.curAbleCheckedLen,r=t.pageVO.pageSize===t.pageVO.total,l=i.length>e.currentPageSelectedLength;e.visibleCheckAllWrapMore=l||n&&!r};export{v as checkMethod,E as flattenRow,g as generateEditRender,C as getCandidateComponents,s as getEvaluate,p as getFooterGroup,S as getInlineEditBtn,o as getMapVal,O as getRowStyle,a as getageShowType,u as handleGroupColums,D as handleImgArr,w as handleImgSrc,N as handleName,B as handleQrCodeContent,R as handleTableHeight,I as handleTableImageSize,f as handlerInitSearchItem,H as hideFilterWrap,A as intersectRow,k as isCopy,h as isFilterItem,x as isLink,j as mergeConObjFn,L as modalDetailImage,d as reScrollFilterWrap,b as removeCheckedDisabledRows,Y as setDefaultFormData,_ as setFilterStatus,$ as setTableConfig,F as setTreeGroupTitle,V as setVisibleCheckAllWrap,c as showFilter,T as treeToList,y as visibleMethod};
|
|
@@ -164,6 +164,20 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
164
164
|
remark?: string | undefined;
|
|
165
165
|
free_entry?: import("..").FormCommonState | undefined;
|
|
166
166
|
initialize_high?: number | undefined;
|
|
167
|
+
bindEventSetting?: {
|
|
168
|
+
[x: string]: unknown;
|
|
169
|
+
event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
170
|
+
event_field?: string | undefined;
|
|
171
|
+
params?: {
|
|
172
|
+
p_value?: string | undefined;
|
|
173
|
+
p_name: string;
|
|
174
|
+
p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
175
|
+
}[] | undefined;
|
|
176
|
+
results?: {
|
|
177
|
+
p_value: string;
|
|
178
|
+
p_name: string;
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
}[] | undefined;
|
|
167
181
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
168
182
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
169
183
|
lazyRequest?: boolean | undefined;
|
|
@@ -1861,6 +1875,20 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1861
1875
|
remark?: string | undefined;
|
|
1862
1876
|
free_entry?: import("..").FormCommonState | undefined;
|
|
1863
1877
|
initialize_high?: number | undefined;
|
|
1878
|
+
bindEventSetting?: {
|
|
1879
|
+
[x: string]: unknown;
|
|
1880
|
+
event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
1881
|
+
event_field?: string | undefined;
|
|
1882
|
+
params?: {
|
|
1883
|
+
p_value?: string | undefined;
|
|
1884
|
+
p_name: string;
|
|
1885
|
+
p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
1886
|
+
}[] | undefined;
|
|
1887
|
+
results?: {
|
|
1888
|
+
p_value: string;
|
|
1889
|
+
p_name: string;
|
|
1890
|
+
}[] | undefined;
|
|
1891
|
+
}[] | undefined;
|
|
1864
1892
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1865
1893
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
1866
1894
|
lazyRequest?: boolean | undefined;
|
|
@@ -3829,6 +3857,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3829
3857
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
3830
3858
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3831
3859
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3860
|
+
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
3832
3861
|
formModel: import("@formily/core").Form<{
|
|
3833
3862
|
[x: string]: any;
|
|
3834
3863
|
}>;
|
|
@@ -4502,6 +4531,20 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4502
4531
|
remark?: string | undefined;
|
|
4503
4532
|
free_entry?: import("..").FormCommonState | undefined;
|
|
4504
4533
|
initialize_high?: number | undefined;
|
|
4534
|
+
bindEventSetting?: {
|
|
4535
|
+
[x: string]: unknown;
|
|
4536
|
+
event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
4537
|
+
event_field?: string | undefined;
|
|
4538
|
+
params?: {
|
|
4539
|
+
p_value?: string | undefined;
|
|
4540
|
+
p_name: string;
|
|
4541
|
+
p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
4542
|
+
}[] | undefined;
|
|
4543
|
+
results?: {
|
|
4544
|
+
p_value: string;
|
|
4545
|
+
p_name: string;
|
|
4546
|
+
}[] | undefined;
|
|
4547
|
+
}[] | undefined;
|
|
4505
4548
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
4506
4549
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
4507
4550
|
lazyRequest?: boolean | undefined;
|
|
@@ -6211,6 +6254,20 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6211
6254
|
remark?: string | undefined;
|
|
6212
6255
|
free_entry?: import("..").FormCommonState | undefined;
|
|
6213
6256
|
initialize_high?: number | undefined;
|
|
6257
|
+
bindEventSetting?: {
|
|
6258
|
+
[x: string]: unknown;
|
|
6259
|
+
event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
6260
|
+
event_field?: string | undefined;
|
|
6261
|
+
params?: {
|
|
6262
|
+
p_value?: string | undefined;
|
|
6263
|
+
p_name: string;
|
|
6264
|
+
p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
6265
|
+
}[] | undefined;
|
|
6266
|
+
results?: {
|
|
6267
|
+
p_value: string;
|
|
6268
|
+
p_name: string;
|
|
6269
|
+
}[] | undefined;
|
|
6270
|
+
}[] | undefined;
|
|
6214
6271
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
6215
6272
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
6216
6273
|
lazyRequest?: boolean | undefined;
|
|
@@ -7892,6 +7949,20 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7892
7949
|
remark?: string | undefined;
|
|
7893
7950
|
free_entry?: import("..").FormCommonState | undefined;
|
|
7894
7951
|
initialize_high?: number | undefined;
|
|
7952
|
+
bindEventSetting?: {
|
|
7953
|
+
[x: string]: unknown;
|
|
7954
|
+
event_type: import("../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
7955
|
+
event_field?: string | undefined;
|
|
7956
|
+
params?: {
|
|
7957
|
+
p_value?: string | undefined;
|
|
7958
|
+
p_name: string;
|
|
7959
|
+
p_select: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
7960
|
+
}[] | undefined;
|
|
7961
|
+
results?: {
|
|
7962
|
+
p_value: string;
|
|
7963
|
+
p_name: string;
|
|
7964
|
+
}[] | undefined;
|
|
7965
|
+
}[] | undefined;
|
|
7895
7966
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
7896
7967
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
7897
7968
|
lazyRequest?: boolean | undefined;
|
|
@@ -9771,6 +9842,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9771
9842
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
9772
9843
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
9773
9844
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
9845
|
+
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
9774
9846
|
formModel: import("@formily/core").Form<{
|
|
9775
9847
|
[x: string]: any;
|
|
9776
9848
|
}>;
|
|
@@ -166,6 +166,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
166
|
remark?: string | undefined;
|
|
167
167
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
168
168
|
initialize_high?: number | undefined;
|
|
169
|
+
bindEventSetting?: {
|
|
170
|
+
[x: string]: unknown;
|
|
171
|
+
event_type: import("../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
172
|
+
event_field?: string | undefined;
|
|
173
|
+
params?: {
|
|
174
|
+
p_value?: string | undefined;
|
|
175
|
+
p_name: string;
|
|
176
|
+
p_select: import("../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
177
|
+
}[] | undefined;
|
|
178
|
+
results?: {
|
|
179
|
+
p_value: string;
|
|
180
|
+
p_name: string;
|
|
181
|
+
}[] | undefined;
|
|
182
|
+
}[] | undefined;
|
|
169
183
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
170
184
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
171
185
|
lazyRequest?: boolean | undefined;
|
|
@@ -1863,6 +1877,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1863
1877
|
remark?: string | undefined;
|
|
1864
1878
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
1865
1879
|
initialize_high?: number | undefined;
|
|
1880
|
+
bindEventSetting?: {
|
|
1881
|
+
[x: string]: unknown;
|
|
1882
|
+
event_type: import("../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
1883
|
+
event_field?: string | undefined;
|
|
1884
|
+
params?: {
|
|
1885
|
+
p_value?: string | undefined;
|
|
1886
|
+
p_name: string;
|
|
1887
|
+
p_select: import("../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
1888
|
+
}[] | undefined;
|
|
1889
|
+
results?: {
|
|
1890
|
+
p_value: string;
|
|
1891
|
+
p_name: string;
|
|
1892
|
+
}[] | undefined;
|
|
1893
|
+
}[] | undefined;
|
|
1866
1894
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1867
1895
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
1868
1896
|
lazyRequest?: boolean | undefined;
|
|
@@ -3831,6 +3859,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3831
3859
|
observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
|
|
3832
3860
|
setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
3833
3861
|
removeGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
3862
|
+
lowCodeEventTrigger: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
3834
3863
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
3835
3864
|
[x: string]: any;
|
|
3836
3865
|
}>;
|
|
@@ -4504,6 +4533,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4504
4533
|
remark?: string | undefined;
|
|
4505
4534
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
4506
4535
|
initialize_high?: number | undefined;
|
|
4536
|
+
bindEventSetting?: {
|
|
4537
|
+
[x: string]: unknown;
|
|
4538
|
+
event_type: import("../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
4539
|
+
event_field?: string | undefined;
|
|
4540
|
+
params?: {
|
|
4541
|
+
p_value?: string | undefined;
|
|
4542
|
+
p_name: string;
|
|
4543
|
+
p_select: import("../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
4544
|
+
}[] | undefined;
|
|
4545
|
+
results?: {
|
|
4546
|
+
p_value: string;
|
|
4547
|
+
p_name: string;
|
|
4548
|
+
}[] | undefined;
|
|
4549
|
+
}[] | undefined;
|
|
4507
4550
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
4508
4551
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
4509
4552
|
lazyRequest?: boolean | undefined;
|
|
@@ -6213,6 +6256,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6213
6256
|
remark?: string | undefined;
|
|
6214
6257
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
6215
6258
|
initialize_high?: number | undefined;
|
|
6259
|
+
bindEventSetting?: {
|
|
6260
|
+
[x: string]: unknown;
|
|
6261
|
+
event_type: import("../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
6262
|
+
event_field?: string | undefined;
|
|
6263
|
+
params?: {
|
|
6264
|
+
p_value?: string | undefined;
|
|
6265
|
+
p_name: string;
|
|
6266
|
+
p_select: import("../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
6267
|
+
}[] | undefined;
|
|
6268
|
+
results?: {
|
|
6269
|
+
p_value: string;
|
|
6270
|
+
p_name: string;
|
|
6271
|
+
}[] | undefined;
|
|
6272
|
+
}[] | undefined;
|
|
6216
6273
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
6217
6274
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
6218
6275
|
lazyRequest?: boolean | undefined;
|
|
@@ -7894,6 +7951,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7894
7951
|
remark?: string | undefined;
|
|
7895
7952
|
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
7896
7953
|
initialize_high?: number | undefined;
|
|
7954
|
+
bindEventSetting?: {
|
|
7955
|
+
[x: string]: unknown;
|
|
7956
|
+
event_type: import("../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
7957
|
+
event_field?: string | undefined;
|
|
7958
|
+
params?: {
|
|
7959
|
+
p_value?: string | undefined;
|
|
7960
|
+
p_name: string;
|
|
7961
|
+
p_select: import("../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
7962
|
+
}[] | undefined;
|
|
7963
|
+
results?: {
|
|
7964
|
+
p_value: string;
|
|
7965
|
+
p_name: string;
|
|
7966
|
+
}[] | undefined;
|
|
7967
|
+
}[] | undefined;
|
|
7897
7968
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
7898
7969
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
7899
7970
|
lazyRequest?: boolean | undefined;
|
|
@@ -9773,6 +9844,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9773
9844
|
observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
|
|
9774
9845
|
setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
9775
9846
|
removeGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
9847
|
+
lowCodeEventTrigger: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
9776
9848
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
9777
9849
|
[x: string]: any;
|
|
9778
9850
|
}>;
|
|
@@ -314,6 +314,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
314
314
|
observeFormGraph: Record<string, import("../../../../../es/components/form-render").GeneralField>;
|
|
315
315
|
setGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
316
316
|
removeGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
317
|
+
lowCodeEventTrigger: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
317
318
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
318
319
|
[x: string]: any;
|
|
319
320
|
}>;
|
|
@@ -129,6 +129,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
129
129
|
remark?: string | undefined;
|
|
130
130
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
131
131
|
initialize_high?: number | undefined;
|
|
132
|
+
bindEventSetting?: {
|
|
133
|
+
[x: string]: unknown;
|
|
134
|
+
event_type: import("../../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
135
|
+
event_field?: string | undefined;
|
|
136
|
+
params?: {
|
|
137
|
+
p_value?: string | undefined;
|
|
138
|
+
p_name: string;
|
|
139
|
+
p_select: import("../../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
results?: {
|
|
142
|
+
p_value: string;
|
|
143
|
+
p_name: string;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
}[] | undefined;
|
|
132
146
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
133
147
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
134
148
|
lazyRequest?: boolean | undefined;
|
|
@@ -1838,6 +1852,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1838
1852
|
remark?: string | undefined;
|
|
1839
1853
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
1840
1854
|
initialize_high?: number | undefined;
|
|
1855
|
+
bindEventSetting?: {
|
|
1856
|
+
[x: string]: unknown;
|
|
1857
|
+
event_type: import("../../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
1858
|
+
event_field?: string | undefined;
|
|
1859
|
+
params?: {
|
|
1860
|
+
p_value?: string | undefined;
|
|
1861
|
+
p_name: string;
|
|
1862
|
+
p_select: import("../../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
1863
|
+
}[] | undefined;
|
|
1864
|
+
results?: {
|
|
1865
|
+
p_value: string;
|
|
1866
|
+
p_name: string;
|
|
1867
|
+
}[] | undefined;
|
|
1868
|
+
}[] | undefined;
|
|
1841
1869
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1842
1870
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
1843
1871
|
lazyRequest?: boolean | undefined;
|
|
@@ -3519,6 +3547,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3519
3547
|
remark?: string | undefined;
|
|
3520
3548
|
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
3521
3549
|
initialize_high?: number | undefined;
|
|
3550
|
+
bindEventSetting?: {
|
|
3551
|
+
[x: string]: unknown;
|
|
3552
|
+
event_type: import("../../../../../es/shared/types").LOW_CODE_EVENT_TYPE;
|
|
3553
|
+
event_field?: string | undefined;
|
|
3554
|
+
params?: {
|
|
3555
|
+
p_value?: string | undefined;
|
|
3556
|
+
p_name: string;
|
|
3557
|
+
p_select: import("../../../../../es/shared/types").LOW_CODE_VALUE_RELATION;
|
|
3558
|
+
}[] | undefined;
|
|
3559
|
+
results?: {
|
|
3560
|
+
p_value: string;
|
|
3561
|
+
p_name: string;
|
|
3562
|
+
}[] | undefined;
|
|
3563
|
+
}[] | undefined;
|
|
3522
3564
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3523
3565
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
3524
3566
|
lazyRequest?: boolean | undefined;
|
|
@@ -5398,6 +5440,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5398
5440
|
observeFormGraph: Record<string, import("../../../../../es/components/form-render").GeneralField>;
|
|
5399
5441
|
setGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
5400
5442
|
removeGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
5443
|
+
lowCodeEventTrigger: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
5401
5444
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
5402
5445
|
[x: string]: any;
|
|
5403
5446
|
}>;
|
|
@@ -301,6 +301,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
301
301
|
observeFormGraph: Record<string, import("@formily/core/esm/types").GeneralField>;
|
|
302
302
|
setGraph: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
303
303
|
removeGraph: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
304
|
+
lowCodeEventTrigger: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
304
305
|
formModel: import("@formily/core/esm/models/Form").Form<{
|
|
305
306
|
[x: string]: any;
|
|
306
307
|
}>;
|
|
@@ -295,6 +295,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
295
295
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
296
296
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
297
297
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
298
|
+
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
298
299
|
formModel: import("@formily/core").Form<{
|
|
299
300
|
[x: string]: any;
|
|
300
301
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as p,normalizeStyle as d,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as p,normalizeStyle as d,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as v,withKeys as b,withModifiers as k,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as x}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as H,cloneDeep as S}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as R,onFieldUnmount as _,onFieldReact as O,onFormMount as w}from"@formily/core";import{FormProvider as B,FormConsumer as V}from"@formily/vue";import{NForm as I,NTabs as N,NTabPane as D,NConfigProvider as q}from"naive-ui";import{InjectionFormGraph as T}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as W}from"./hooks/useComplexOptions.js";import{useFormDomEvent as E,useFormExposeEvent as G}from"./hooks/useFormEvent.js";import{useFormGraph as K}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as M}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as P}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as J}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as $}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as z}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as Q}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as X}from"./hooks/useFormValidator.js";import{useAnchor as Y}from"./hooks/useAnchor.js";import{useFormContext as Z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import ee from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as oe}from"./utils/schema.js";const te={key:0,style:{height:"54px"}},re={style:{"white-space":"pre"}};var se=ee(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:Boolean,default:!0}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:ee,emit:se}){const ae=e,ie=x(),{nuiThemeOverrides:le}=$();X();const ne=o(),me=t((()=>H(ae.maxHeight)?ae.maxHeight+"px":ae.maxHeight)),{SchemaField:pe,businessCollector:de,formItemDepsCollector:ue,changeContextCollector:ce,formUUID:fe}=Z(ae,se),{anchorBarRef:he,currentAnchor:ye,generateAnchorList:je,updateAnchorList:ge,anchorIdList:ve,onScroll:be}=Y(ae,se,ne,ue);M(ae).callLifeCycle("onSetup");const{trigger:ke}=U(),{observeFormGraph:Fe,setGraph:Ce,removeGraph:xe}=K();r(T,Fe);const{lowCodeEventTrigger:He}=P(),Se=A({initialValues:ae.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();de.trigger(e,t),ue.trigger(t),se("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:ce.getContext(t,o.value)}),He(o),Ae(t,o.value)})),R("*",Ce),_("*",xe),ae.linebarAutoHidden&&(O("*",ke),w((e=>e.query("*").forEach(ke)))),ae.anchor&&(O("*",ge),w(je))}}),{lowCodeReactionsHandler:Ae,triggerAllReactionsHandler:Le}=J(t((()=>ae.lowCodeReactions)),Se);s(Le);const{schemaAdaptor:Re}=z(de);let _e=ae.fieldList||[];const Oe=t((()=>ae.schema?ae.schema:ae.fieldList?(_e=Q().traverse(S(ae.fieldList),ae.fieldVisitor),oe(Re(_e))):oe({}))),{onKeydown:we}=E({formModel:Se,formRenderRef:ne,props:ae}),{clearSpan:Be}=W();a((()=>Be(fe)));const Ve=G({formModel:Se,formRenderRef:ne,formItemDepsCollector:ue,getFieldList:()=>_e,formUUID:fe});return ee({formModel:Se,validate:(e="*")=>Ve.validate(e),getFormValues:(e=!0)=>Ve.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(de.triggerLock=!0),Ve.setFormValues(e,o,r),await i(),de.triggerLock=!1},setFieldState(e,o){Ve.setFieldState(e,o)},resetFields(e="*"){Ve.resetFields(e)},queryWidget:async e=>Ve.queryWidget(e),getFieldList:()=>_e,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(I),{class:p(["form-render",{"form-render--no-border":!e.bordered}]),"require-mark-placement":"left",style:d(m(ie))},{default:u((()=>[e.anchor?(l(),c("section",te,[f(m(N),{value:m(ye),"onUpdate:value":t[0]||(t[0]=e=>h(ye)?ye.value=e:null),type:"line",ref_key:"anchorBarRef",ref:he},{default:u((()=>[(l(!0),c(y,null,j(m(ve),(e=>(l(),n(m(D),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(le)},{default:u((()=>[v("section",{class:"form-render__wrapper",style:d({"--column":e.column,"--form-height":m(me)}),ref_key:"formRenderRef",ref:ne,onScroll:t[1]||(t[1]=(...e)=>m(be)&&m(be)(...e)),onKeydownCapture:t[2]||(t[2]=b(k(((...e)=>m(we)&&m(we)(...e)),["prevent"]),["enter"]))},[f(m(B),{form:m(Se)},{default:u((()=>[f(m(pe),{schema:m(Oe)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[v("div",re,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}}),[["__file","FormRender.vue"]]);export{se as default};
|
|
@@ -299,6 +299,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
299
299
|
observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
|
|
300
300
|
setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
301
301
|
removeGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
302
|
+
lowCodeEventTrigger: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
302
303
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
303
304
|
[x: string]: any;
|
|
304
305
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isArray as t,isObject as r}from"lodash-es";import{getBindEventSettingTrigger as n}from"../../../../shared/utils/business.js";function o(o){if(!e(o))return;const{decoratorProps:{fieldItem:i}={}}=o;i&&t(i.bindEventSetting)&&i.bindEventSetting.length&&i.bindEventSetting.forEach((e=>{r(e)&&n(e.event_type)(e,{getter:e=>o.form.getValuesIn(e),setter(e,t){o.form.setValuesIn(e,t)}})}))}function i(){return{lowCodeEventTrigger:o}}export{i as useLowCodeEvent};
|