cnhis-design-vue 3.2.11-beta.6 → 3.2.11-beta.8
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/ai-chat/index.d.ts +36 -1
- package/es/components/ai-chat/src/Index.vue.d.ts +37 -2
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +28 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +7 -0
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +3 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -0
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +2 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/constants/index.d.ts +4 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +13 -0
- package/es/components/index.css +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,useAttrs as e,inject as n,ref as r,reactive as i,computed as a,onMounted as o,watch as l,openBlock as s,createElementBlock as p,Fragment as d,createVNode as u,unref as m,withCtx as c,renderSlot as f,withModifiers as v,createTextVNode as y,toDisplayString as g,mergeProps as b}from"vue";import{isObject as I}from"@vue/shared";import{useMessage as h,NDropdown as P,NButton as w,NIcon as F}from"naive-ui";import{ChevronDown as k}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as x}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as S}from"../utils/browserPrint.js";import E from"./IdentityVerification.vue.js";import{format as j}from"date-fns";import{savePrivateFormatApi as M,getPrivateFormatApi as O}from"../api.js";var L=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},noDefaultFormatMsg:{default:"获取打印格式失败,请联系管理员!",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number},resolution:{type:Number},printCustomProps:{type:Object,default:()=>({})},placement:{type:String},svrUpdateIp:{type:String}},setup(t,{expose:L}){var D;const R=t,C=e(),N=h();let V;const U=n(x),B={},z=r(""),A=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,iReportExecuteMode:1});let J=r([{label:R.printText,key:"printText"},{label:R.previewText,key:"previewText"},{label:R.pdfLoadText,key:"downloadPdf"},{label:R.formatEditText,key:"formatEditText"},...(null==(D=R.externalOptionConfig)?void 0:D.options)||[]]);const q=a((()=>{if(!A.currentFormatId)return{};let t=A.currentFormatId;return A.formatList.find((e=>e.id===t))})),K=a((()=>{var t;return(null==(t=q.value)?void 0:t.name)||"格式选择"})),_=a((()=>{let t=A.formatList.find((t=>t.id===A.currentFormatId));return null==t?void 0:t.templateId})),G=async t=>{if(R.directPrint){if(A.spinning)return;return"button"===t?void await ut():st()}return st()},H=t=>u("span",{class:{active:t.key===A.currentFormatId}},[t.label]),Y=(t,e)=>{A.spinning=!1;let n={type:e,formatId:A.currentFormatId,templateId:_.value};U("success",t,n)},$=t=>{A.spinning=!1,U("error",t),I(t)&&"notInstalledApp"===t.type&&N.error(t.message)},Q=t=>{A.spinning=!1,U("cancel",t)},W=t=>{U("error",{message:"前置条件执行错误",type:t,preExecution:!0})},X=(t=0)=>{var e;const n=(null==(e=R.printParams)?void 0:e.length)?R.printParams[t]:A.printParams[t];return JSON.stringify({...n||{},...R.token?{token:R.token}:{},...R.printCustomProps||{}})},Z=()=>{var t,e;let n={},r={};if(null==(t=A.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(A.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(A.printParams.map((e=>JSON.parse(e.datasetData[t]))));r={datasetData:{}},r.datasetData[t]=n}else Object.keys(A.printParams[0]).forEach((t=>{r[t]=[],A.printParams.forEach((e=>{r[t].includes(e[t])||r[t].push(e[t])})),r[t]=r[t].join(",")}));return n=Object.assign({},JSON.parse(X(0)),r),JSON.stringify(n)},tt=((t,e,n=!0)=>{let r=null;return function(...i){r&&clearTimeout(r),n&&!r&&t.apply(null,i),r=setTimeout((()=>{r=null,!n&&t.apply(null,i)}),e)}})((()=>{let t=A.printParams.length;const e=async e=>{try{--t<=0&&Y(e,"print")}catch(t){console.log("error",t)}};R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("print",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t={iReportExecuteMode:A.iReportExecuteMode,formatId:A.currentFormatId,templateId:_.value,authorizationKey:z.value,printdlgshow:R.printdlgshow,signature:R.signature,copies:R.printCopies,svrUpdateIp:R.svrUpdateIp};if("MULTI"===R.strategy)for(let n=0;n<A.printParams.length;n++)n>0&&(t.printdlgshow="0"),V.printDirect({...t,params:X(n)},e,$,Q);else V.printDirect({...t,params:Z()},(t=>{Y(t,"print")}),$,Q)})).catch((()=>{W("print"),A.spinning=!1})).finally((()=>{A.visible=!1})))}),800,!0),et=async(t,e)=>{var n,r;switch(t){case"printText":tt();break;case"previewText":(async()=>{R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("preview",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t="MULTI"===R.strategy?X():Z(),e={formatId:A.currentFormatId,iReportExecuteMode:A.iReportExecuteMode,templateId:_.value,authorizationKey:z.value,params:t,btnprint:R.btnprint,signature:R.signature};V.preview(e,(t=>{Y(t,"preview")}),$)})).catch((()=>{W("preview"),A.spinning=!1})).finally((()=>{A.visible=!1})))})();break;case"formatEditText":R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("edit",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{A.identityVerification.visible=!0})).catch((()=>{W("edit")})).finally((()=>{A.visible=!1,A.spinning=!1})));break;case"downloadPdf":(async()=>{R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("download",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t="MULTI"===R.strategy?X():Z(),e={formatId:A.currentFormatId,iReportExecuteMode:A.iReportExecuteMode,templateId:_.value,authorizationKey:z.value,print:{print:"1",type:"1",resolution:null==R?void 0:R.resolution},params:t,signature:R.signature};V.downloadPDF(e,(t=>Y(t,"preview")),$)})).catch((()=>{W("download"),A.spinning=!1})).finally((()=>{A.visible=!1})))})();break;default:{A.visible=!1;const i=A.formatList.find((e=>e.id===t))||{};if(Object.keys(i).length>0){A.currentFormatId=t;const[e]=J.value;e.label=(null==i?void 0:i.name)||e.label,await M({formatForms:[{...i}],name:B.name||i.templateName,number:B.number||i.number,templateId:B.templateId||i.templateId,...B.id?{id:B.id}:{}},{token:R.token})}else null==(r=null==(n=R.externalOptionConfig)?void 0:n.onSelect)||r.call(n,t,e);break}}},nt=()=>{A.visible=!1,U("clickoutside")},rt=()=>(A.isInited=!1,A.spinning=!1,setTimeout((()=>{A.visible=!1}),0),!1),it=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=j(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},at=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData={[t.name]:JSON.stringify(it(n,e,"fieldName"))}})),r=Object.assign({},r,it(n,e,"key")),r})),ot=async t=>{var e,n;if(A.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],A.iReportExecuteMode=(null==(e=null==t?void 0:t.obj)?void 0:e.length)>0&&t.obj[0].iReportExecuteMode||1,A.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";if(!C.isDoc){const{data:e}=await O({templateId:t[0].templateId},{token:R.token});if("SUCCESS"===e.result){const{formatForms:r=[]}=e.map||{};Object.assign(B,e.map||{});const i=null==(n=null==r?void 0:r[0])?void 0:n.id;if(i&&t.map((t=>t.id)).includes(i))return i}}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(A.formatList,"defaultFlag"),!A.currentFormatId)return J.value=[],N.error(R.noDefaultFormatMsg),rt();(()=>{var t;const e=A.formatList.map((t=>({label:t.name,key:t.id})));J.value.unshift({label:K.value,key:"format",children:e}),R.hideButtons.length>0&&(J.value=J.value.filter((t=>!R.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),r=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},i=Object.keys(r);i.includes("RY7.2.21.1.M2.G94181E")||(J.value=J.value.filter((t=>"downloadPdf"!=t.key))),i.includes("RY7.2.21.1.M2.G33633A")||(J.value=J.value.filter((t=>"formatEditText"!=t.key)))}})();let r=null==(n=await R.queryTemplateParams())?void 0:n.obj;if(!r||!_.value)return N.error("获取打印模板失败,请联系管理员!"),rt();A.templateParams=r,A.printParams=at(A.templateParams,R.params)},lt=async()=>{var t;if(A.isInited)return!0;A.isInited=!0,A.spinning=!0,(()=>{if(V)return!1;V=new T})();const e=await R.queryPrintFormatByNumber();return await ot(e),(null==(t=e.obj)?void 0:t.length)>0&&(z.value=e.obj[0].authorizationKey||""),A.spinning=!1,!0},st=async(t=!0)=>{var e,n;if(await R.clickPrevFn())if((null==(e=R.params)?void 0:e.length)||(null==(n=R.printParams)?void 0:n.length)){if(!A.visible){if(!await lt())return!1}t&&(A.visible=!A.visible)}else N.warning(R.noDataMsg)},pt=()=>{A.watchPrintParamsReformatFn&&A.watchPrintParamsReformatFn(),A.isInited?A.printParams=at(A.templateParams,R.params):A.watchPrintParamsReformatFn=()=>l((()=>A.isInited),(t=>{if(!t)return!1;pt()}))},dt=t=>{if(A.identityVerification.visible=!1,S(A.currentFormatId))return Y(null,"edit");const e={formatId:A.currentFormatId,templateId:_.value,params:X(),token:t};V.editPrintFormat(e,(t=>{Y(t,"edit")}),$)};async function ut(){await st(!1),tt()}return o((()=>{A.isInited=!1})),l((()=>R.params),(t=>{if(!(null==t?void 0:t.length))return!1;pt()}),{deep:!0}),L({directPrint:ut}),(e,n)=>(s(),p(d,null,[u(m(P),{class:"c-dropdown",placement:t.placement,trigger:"click",show:A.visible,onClickoutside:nt,options:m(J),onSelect:et,"render-label":H},{default:c((()=>[f(e.$slots,"button",{handleClickPrintBtn:st,printSpinning:A.spinning,printbtnText:t.btnText,printVisible:A.visible},(()=>[u(m(w),{class:"dropdown-button",loading:t.showLoading&&A.spinning,onClick:n[1]||(n[1]=v((()=>G("button")),["stop"]))},{default:c((()=>[y(g(t.btnText)+" ",1),u(m(F),{component:m(k),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=v((()=>G("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["placement","show","options"]),u(E,b(m(C),{modelValue:A.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>A.identityVerification.visible=t),formatId:A.currentFormatId,templateId:m(_),onSuccess:dt}),null,16,["modelValue","formatId","templateId"])],64))}});export{L as default};
|
1
|
+
import{defineComponent as t,useAttrs as e,inject as n,ref as r,reactive as i,computed as a,onMounted as o,watch as l,openBlock as s,createElementBlock as p,Fragment as d,createVNode as u,unref as m,withCtx as c,renderSlot as f,withModifiers as v,createTextVNode as y,toDisplayString as g,mergeProps as b}from"vue";import{isObject as I}from"@vue/shared";import{useMessage as h,NDropdown as P,NButton as w,NIcon as F}from"naive-ui";import{ChevronDown as x}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as k}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as S}from"../utils/browserPrint.js";import E from"./IdentityVerification.vue.js";import{format as M}from"date-fns";import{savePrivateFormatApi as j,getPrivateFormatApi as O}from"../api.js";import{cloneDeep as L}from"lodash";var R=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},noDefaultFormatMsg:{default:"获取打印格式失败,请联系管理员!",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number},resolution:{type:Number},printCustomProps:{type:Object,default:()=>({})},placement:{type:String},svrUpdateIp:{type:String}},setup(t,{expose:R}){var D;const C=t,N=e(),V=h();let U;const B=String(navigator.platform).toLowerCase().includes("linux"),z=n(k),A={},J=r(""),q=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,iReportExecuteMode:1});let K=r([{label:C.printText,key:"printText"},{label:C.previewText,key:"previewText"},{label:C.pdfLoadText,key:"downloadPdf"},{label:C.formatEditText,key:"formatEditText"},...(null==(D=C.externalOptionConfig)?void 0:D.options)||[]]);const _=r([]),G=a((()=>{if(!q.currentFormatId)return{};let t=q.currentFormatId;return q.formatList.find((e=>e.id===t))})),H=a((()=>{var t;return(null==(t=G.value)?void 0:t.name)||"格式选择"})),Y=a((()=>{let t=q.formatList.find((t=>t.id===q.currentFormatId));return null==t?void 0:t.templateId})),$=async t=>{if(C.directPrint){if(q.spinning)return;return"button"===t?void await ft():ut()}return ut()},Q=t=>u("span",{class:{active:t.key===q.currentFormatId}},[t.label]),W=(t,e)=>{q.spinning=!1;let n={type:e,formatId:q.currentFormatId,templateId:Y.value};z("success",t,n)},X=t=>{q.spinning=!1,z("error",t),I(t)&&"notInstalledApp"===t.type&&V.error(t.message)},Z=t=>{q.spinning=!1,z("cancel",t)},tt=t=>{z("error",{message:"前置条件执行错误",type:t,preExecution:!0})},et=(t=0)=>{var e;const n=(null==(e=C.printParams)?void 0:e.length)?C.printParams[t]:q.printParams[t];return JSON.stringify({...n||{},...C.token?{token:C.token}:{},...C.printCustomProps||{}})},nt=()=>{var t,e;let n={},r={};if(null==(t=q.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(q.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(q.printParams.map((e=>JSON.parse(e.datasetData[t]))));r={datasetData:{}},r.datasetData[t]=n}else Object.keys(q.printParams[0]).forEach((t=>{r[t]=[],q.printParams.forEach((e=>{r[t].includes(e[t])||r[t].push(e[t])})),r[t]=r[t].join(",")}));return n=Object.assign({},JSON.parse(et(0)),r),JSON.stringify(n)},rt=((t,e,n=!0)=>{let r=null;return function(...i){r&&clearTimeout(r),n&&!r&&t.apply(null,i),r=setTimeout((()=>{r=null,!n&&t.apply(null,i)}),e)}})((()=>{let t=q.printParams.length;const e=async e=>{try{--t<=0&&W(e,"print")}catch(t){console.log("error",t)}};C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("print",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t={iReportExecuteMode:q.iReportExecuteMode,formatId:q.currentFormatId,templateId:Y.value,authorizationKey:J.value,printdlgshow:C.printdlgshow,signature:C.signature,copies:C.printCopies,svrUpdateIp:C.svrUpdateIp};if("MULTI"===C.strategy)for(let n=0;n<q.printParams.length;n++)n>0&&(t.printdlgshow="0"),U.printDirect({...t,params:et(n)},e,X,Z);else U.printDirect({...t,params:nt()},(t=>{W(t,"print")}),X,Z)})).catch((()=>{tt("print"),q.spinning=!1})).finally((()=>{q.visible=!1})))}),800,!0),it=async(t,e)=>{var n,r;switch(t){case"printText":rt();break;case"previewText":(async()=>{C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("preview",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t="MULTI"===C.strategy?et():nt(),e={formatId:q.currentFormatId,iReportExecuteMode:q.iReportExecuteMode,templateId:Y.value,authorizationKey:J.value,params:t,btnprint:C.btnprint,signature:C.signature};U.preview(e,(t=>{W(t,"preview")}),X)})).catch((()=>{tt("preview"),q.spinning=!1})).finally((()=>{q.visible=!1})))})();break;case"formatEditText":C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("edit",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{q.identityVerification.visible=!0})).catch((()=>{tt("edit")})).finally((()=>{q.visible=!1,q.spinning=!1})));break;case"downloadPdf":(async()=>{C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("download",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t="MULTI"===C.strategy?et():nt(),e={formatId:q.currentFormatId,iReportExecuteMode:q.iReportExecuteMode,templateId:Y.value,authorizationKey:J.value,print:{print:"1",type:"1",resolution:null==C?void 0:C.resolution},params:t,signature:C.signature};U.downloadPDF(e,(t=>W(t,"preview")),X)})).catch((()=>{tt("download"),q.spinning=!1})).finally((()=>{q.visible=!1})))})();break;default:{q.visible=!1;const i=q.formatList.find((e=>e.id===t))||{};if(Object.keys(i).length>0){S(t)&&(B||2==q.iReportExecuteMode)?K.value=_.value.filter((t=>"formatEditText"!=t.key)):K.value=_.value,q.currentFormatId=t;const[e]=K.value;e.label=(null==i?void 0:i.name)||e.label,await j({formatForms:[{...i}],name:A.name||i.templateName,number:A.number||i.number,templateId:A.templateId||i.templateId,...A.id?{id:A.id}:{}},{token:C.token})}else null==(r=null==(n=C.externalOptionConfig)?void 0:n.onSelect)||r.call(n,t,e);break}}},at=()=>{q.visible=!1,z("clickoutside")},ot=()=>(q.isInited=!1,q.spinning=!1,setTimeout((()=>{q.visible=!1}),0),!1),lt=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=M(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},st=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData={[t.name]:JSON.stringify(lt(n,e,"fieldName"))}})),r=Object.assign({},r,lt(n,e,"key")),r})),pt=async t=>{var e,n;if(q.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],q.iReportExecuteMode=(null==(e=null==t?void 0:t.obj)?void 0:e.length)>0&&t.obj[0].iReportExecuteMode||1,q.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";if(!N.isDoc){const{data:e}=await O({templateId:t[0].templateId},{token:C.token});if("SUCCESS"===e.result){const{formatForms:r=[]}=e.map||{};Object.assign(A,e.map||{});const i=null==(n=null==r?void 0:r[0])?void 0:n.id;if(i&&t.map((t=>t.id)).includes(i))return i}}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(q.formatList,"defaultFlag"),!q.currentFormatId)return K.value=[],V.error(C.noDefaultFormatMsg),ot();(()=>{var t;const e=q.formatList.map((t=>({label:t.name,key:t.id})));K.value.unshift({label:H.value,key:"format",children:e}),C.hideButtons.length>0&&(K.value=K.value.filter((t=>!C.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),r=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},i=Object.keys(r);i.includes("RY7.2.21.1.M2.G94181E")||(K.value=K.value.filter((t=>"downloadPdf"!=t.key))),i.includes("RY7.2.21.1.M2.G33633A")||(K.value=K.value.filter((t=>"formatEditText"!=t.key)))}_.value=L(K.value),S(q.currentFormatId)&&(B||2==q.iReportExecuteMode)&&(K.value=_.value.filter((t=>"formatEditText"!=t.key)))})();let r=null==(n=await C.queryTemplateParams())?void 0:n.obj;if(!r||!Y.value)return V.error("获取打印模板失败,请联系管理员!"),ot();q.templateParams=r,q.printParams=st(q.templateParams,C.params)},dt=async()=>{var t;if(q.isInited)return!0;q.isInited=!0,q.spinning=!0,(()=>{if(U)return!1;U=new T})();const e=await C.queryPrintFormatByNumber();return await pt(e),(null==(t=e.obj)?void 0:t.length)>0&&(J.value=e.obj[0].authorizationKey||""),q.spinning=!1,!0},ut=async(t=!0)=>{var e,n;if(await C.clickPrevFn())if((null==(e=C.params)?void 0:e.length)||(null==(n=C.printParams)?void 0:n.length)){if(!q.visible){if(!await dt())return!1}t&&(q.visible=!q.visible)}else V.warning(C.noDataMsg)},mt=()=>{q.watchPrintParamsReformatFn&&q.watchPrintParamsReformatFn(),q.isInited?q.printParams=st(q.templateParams,C.params):q.watchPrintParamsReformatFn=()=>l((()=>q.isInited),(t=>{if(!t)return!1;mt()}))},ct=t=>{if(q.identityVerification.visible=!1,S(q.currentFormatId))return W(null,"edit");const e={formatId:q.currentFormatId,templateId:Y.value,params:et(),token:t};U.editPrintFormat(e,(t=>{W(t,"edit")}),X)};async function ft(){await ut(!1),rt()}return o((()=>{q.isInited=!1})),l((()=>C.params),(t=>{if(!(null==t?void 0:t.length))return!1;mt()}),{deep:!0}),R({directPrint:ft}),(e,n)=>(s(),p(d,null,[u(m(P),{class:"c-dropdown",placement:t.placement,trigger:"click",show:q.visible,onClickoutside:at,options:m(K),onSelect:it,"render-label":Q},{default:c((()=>[f(e.$slots,"button",{handleClickPrintBtn:ut,printSpinning:q.spinning,printbtnText:t.btnText,printVisible:q.visible},(()=>[u(m(w),{class:"dropdown-button",loading:t.showLoading&&q.spinning,onClick:n[1]||(n[1]=v((()=>$("button")),["stop"]))},{default:c((()=>[y(g(t.btnText)+" ",1),u(m(F),{component:m(x),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=v((()=>$("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["placement","show","options"]),u(E,b(m(N),{modelValue:q.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>q.identityVerification.visible=t),formatId:q.currentFormatId,templateId:m(Y),onSuccess:ct}),null,16,["modelValue","formatId","templateId"])],64))}});export{R as default};
|
@@ -4236,6 +4236,7 @@ export declare const CallbackMaps: Map<string, {
|
|
4236
4236
|
stickyFixedConfig?: {
|
4237
4237
|
enable?: boolean | undefined;
|
4238
4238
|
} | undefined;
|
4239
|
+
tableRowHeight?: string | number | undefined;
|
4239
4240
|
onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
4240
4241
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
4241
4242
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
@@ -7812,6 +7813,7 @@ export declare const CallbackMaps: Map<string, {
|
|
7812
7813
|
stickyFixedConfig?: {
|
7813
7814
|
enable?: boolean | undefined;
|
7814
7815
|
} | undefined;
|
7816
|
+
tableRowHeight?: string | number | undefined;
|
7815
7817
|
onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
7816
7818
|
onSettingClick?: (() => void) | undefined;
|
7817
7819
|
onFormClick?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
@@ -3236,6 +3236,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3236
3236
|
stickyFixedConfig?: {
|
3237
3237
|
enable?: boolean | undefined;
|
3238
3238
|
} | undefined;
|
3239
|
+
tableRowHeight?: string | number | undefined;
|
3239
3240
|
onFormChange?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
3240
3241
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
3241
3242
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
@@ -6812,6 +6813,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6812
6813
|
stickyFixedConfig?: {
|
6813
6814
|
enable?: boolean | undefined;
|
6814
6815
|
} | undefined;
|
6816
|
+
tableRowHeight?: string | number | undefined;
|
6815
6817
|
onFormChange?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
6816
6818
|
onSettingClick?: (() => void) | undefined;
|
6817
6819
|
onFormClick?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
@@ -3237,6 +3237,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3237
3237
|
stickyFixedConfig?: {
|
3238
3238
|
enable?: boolean | undefined;
|
3239
3239
|
} | undefined;
|
3240
|
+
tableRowHeight?: string | number | undefined;
|
3240
3241
|
onFormChange?: ((payload_0: import("../../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
3241
3242
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
3242
3243
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
@@ -6813,6 +6814,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
6813
6814
|
stickyFixedConfig?: {
|
6814
6815
|
enable?: boolean | undefined;
|
6815
6816
|
} | undefined;
|
6817
|
+
tableRowHeight?: string | number | undefined;
|
6816
6818
|
onFormChange?: ((payload_0: import("../../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
6817
6819
|
onSettingClick?: (() => void) | undefined;
|
6818
6820
|
onFormClick?: ((payload_0: import("../../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
@@ -74,6 +74,10 @@ export declare enum IHO_TABLE_FIXED_STATUS {
|
|
74
74
|
left = 1,
|
75
75
|
right = 2
|
76
76
|
}
|
77
|
+
export declare enum IHO_TABLE_ROW_HEIGHT {
|
78
|
+
'table-simple' = 30,
|
79
|
+
'table-classic' = 26
|
80
|
+
}
|
77
81
|
export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag"];
|
78
82
|
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", "rowDrag", "toggleRowExpand", "toggleTreeExpand", "copy", "scroll", "keydown", "keydownStart", "keydownEnd", "paste", "cut", "currentChange", "radioChange", "checkboxChange", "checkboxAll", "checkboxRangeStart", "checkboxRangeChange", "checkboxRangeEnd", "cellClick", "cellDblclick", "cellMenu", "cellMouseenter", "cellMouseleave", "headerCellClick", "headerCellDblclick", "headerCellMenu", "footerCellClick", "footerCellDblclick", "footerCellMenu", "sortChange", "filterChange", "filterVisible", "resizableChange", "menuClick", "editClosed", "editActived", "editDisabled", "validError", "custom", "openFnr", "fnrChange", "fnrFind", "fnrFindAll", "fnrReplace", "fnrReplaceAll", "cellAreaCopy", "cellAreaCut", "cellAreaPaste", "cellAreaMerge", "clearCellAreaMerge", "headerCellAreaSelection", "cellAreaSelectionStart", "cellAreaSelectionDrag", "cellAreaSelectionEnd", "cellAreaExtensionStart", "cellAreaExtensionDrag", "cellAreaExtensionEnd", "cellAreaArrowsStart", "cellAreaArrowsEnd", "activeCellChangeStart", "activeCellChangeEnd", "pageChange"];
|
79
83
|
export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
|
@@ -1 +1 @@
|
|
1
|
-
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.SWITCH="SWITCH",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),
|
1
|
+
import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.SWITCH="SWITCH",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),t=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(t||{}),r=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(r||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{}),i=(e=>(e[e["table-simple"]=30]="table-simple",e[e["table-classic"]=26]="table-classic",e))(i||{});const I=["formChange","settingClick","formClick","keyboard","rowDrag"],R=[...I,...E],c=Symbol("injectionIhoTableConfig"),D=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),b=Symbol("InjectionIhoTableAnnotation"),N=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),s=Symbol("InjectionIhoTableXeInstance"),M=Symbol("InjectionIhoTableLoading"),L=Symbol("InjectionIhoTableHandler"),d=Symbol("InjectionIhoTableGlobProps"),g=Symbol("InjectionIhoTableEventListener"),P=Symbol("InjectionTableAsyncQueue");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,t as IHO_TABLE_NUMBER_STATUS,i as IHO_TABLE_ROW_HEIGHT,r as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,I as IhoTableCustomEventNameTuple,R as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,b as InjectionIhoTableAnnotation,c as InjectionIhoTableConfig,O as InjectionIhoTableEmits,g as InjectionIhoTableEventListener,D as InjectionIhoTableFieldList,d as InjectionIhoTableGlobProps,L as InjectionIhoTableHandler,h as InjectionIhoTableInstance,M as InjectionIhoTableLoading,N as InjectionIhoTableUUID,s as InjectionIhoTableXeInstance,P as InjectionTableAsyncQueue,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
|
@@ -1 +1 @@
|
|
1
|
-
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../constants/index.js";import{defineTablePlugin as
|
1
|
+
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i,IHO_TABLE_ROW_HEIGHT as t}from"../constants/index.js";import{defineTablePlugin as s}from"../hooks/useTablePlugin.js";import{IhoTableStatusHelper as n}from"../utils/index.js";function l(){const l="defaultTablePlugin";return s({name:l,vxe(e){e.setup({zIndex:3e3})},apply(s){s.configHooks.config.tap({name:l,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},scrollX:{enabled:!1,gt:60},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"title",showHeaderOverflow:"title",editConfig:{trigger:"click",mode:"cell"},loadingConfig:{icon:"",text:"数据加载中..."}},o,{height:o.height?"auto":void 0});return o.tableRowHeight&&(i.rowConfig.height=t[o.tableRowHeight]||o.tableRowHeight),i.selectType=o.selectType||(n.isPositive(o.isBatchSelect)?"checkbox":n.isPositive(o.isSingleSelect)?"radio":void 0),i})),s.configHooks.mouseConfig.tap({name:l,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{l as defaultConfigPlugin};
|
@@ -82,6 +82,8 @@ export type IhoTableConfig = VxeTableProps & Partial<{
|
|
82
82
|
* @desc 竖向表格相关配置
|
83
83
|
* @property enable - 是否开启竖向表格
|
84
84
|
* @property headerWidth - 表头宽度
|
85
|
+
* @property bodyWidth - 表体宽度
|
86
|
+
* @property bodyMinWidth - 表体最小宽度
|
85
87
|
*/
|
86
88
|
verticalConfig: Partial<{
|
87
89
|
enable: boolean;
|
@@ -89,14 +91,25 @@ export type IhoTableConfig = VxeTableProps & Partial<{
|
|
89
91
|
bodyWidth: number | ((index: number) => number);
|
90
92
|
bodyMinWidth: number | ((index: number) => number);
|
91
93
|
}>;
|
94
|
+
/**
|
95
|
+
* @desc 滚动翻页加载
|
96
|
+
* @property enable - 是否开启
|
97
|
+
* @property capacity - 分页容量
|
98
|
+
* @property loading - 是否开启加载动画
|
99
|
+
*/
|
92
100
|
pagerScroll: Partial<{
|
93
101
|
enable: boolean;
|
94
102
|
capacity: number;
|
95
103
|
loading: boolean;
|
96
104
|
}>;
|
105
|
+
/**
|
106
|
+
* @desc sticky左右固定列模式
|
107
|
+
* @property enable - 是否开启
|
108
|
+
*/
|
97
109
|
stickyFixedConfig: Partial<{
|
98
110
|
enable: boolean;
|
99
111
|
}>;
|
112
|
+
tableRowHeight: 'table-simple' | 'table-classic' | number | string;
|
100
113
|
[K: string]: unknown;
|
101
114
|
}> &
|
102
115
|
/**
|