cnhis-design-vue 3.2.4-beta.25 → 3.2.4-beta.26
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/button-print/index.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +6 -6
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +5 -5
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -290,6 +290,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
290
290
|
default: () => {
|
291
291
|
isShowPrintAll: boolean;
|
292
292
|
isShowOutSetting: boolean;
|
293
|
+
customProps: {};
|
293
294
|
};
|
294
295
|
};
|
295
296
|
}, {
|
@@ -395,6 +396,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
395
396
|
default: () => {
|
396
397
|
isShowPrintAll: boolean;
|
397
398
|
isShowOutSetting: boolean;
|
399
|
+
customProps: {};
|
398
400
|
};
|
399
401
|
};
|
400
402
|
}>> & {}>>;
|
@@ -435,6 +437,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
435
437
|
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
436
438
|
isShowPrintAllBtn: import("vue").ComputedRef<any>;
|
437
439
|
isShowOutSettingBtn: import("vue").ComputedRef<any>;
|
440
|
+
printCustomProps: import("vue").ComputedRef<any>;
|
438
441
|
showSettingItems: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
|
439
442
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
440
443
|
initShowDownList: () => Promise<void>;
|
@@ -2216,6 +2219,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
2216
2219
|
default: () => {
|
2217
2220
|
isShowPrintAll: boolean;
|
2218
2221
|
isShowOutSetting: boolean;
|
2222
|
+
customProps: {};
|
2219
2223
|
};
|
2220
2224
|
};
|
2221
2225
|
}>>, {
|
@@ -296,6 +296,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
296
296
|
default: () => {
|
297
297
|
isShowPrintAll: boolean;
|
298
298
|
isShowOutSetting: boolean;
|
299
|
+
customProps: {};
|
299
300
|
};
|
300
301
|
};
|
301
302
|
}, {
|
@@ -401,6 +402,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
401
402
|
default: () => {
|
402
403
|
isShowPrintAll: boolean;
|
403
404
|
isShowOutSetting: boolean;
|
405
|
+
customProps: {};
|
404
406
|
};
|
405
407
|
};
|
406
408
|
}>> & {}>>;
|
@@ -441,6 +443,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
441
443
|
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
442
444
|
isShowPrintAllBtn: import("vue").ComputedRef<any>;
|
443
445
|
isShowOutSettingBtn: import("vue").ComputedRef<any>;
|
446
|
+
printCustomProps: import("vue").ComputedRef<any>;
|
444
447
|
showSettingItems: import("vue").ComputedRef<AnyObject[]>;
|
445
448
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
446
449
|
initShowDownList: () => Promise<void>;
|
@@ -2222,6 +2225,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2222
2225
|
default: () => {
|
2223
2226
|
isShowPrintAll: boolean;
|
2224
2227
|
isShowOutSetting: boolean;
|
2228
|
+
customProps: {};
|
2225
2229
|
};
|
2226
2230
|
};
|
2227
2231
|
}>>, {
|
@@ -99,6 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
99
|
default: () => {
|
100
100
|
isShowPrintAll: boolean;
|
101
101
|
isShowOutSetting: boolean;
|
102
|
+
customProps: {};
|
102
103
|
};
|
103
104
|
};
|
104
105
|
}, {
|
@@ -207,6 +208,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
207
208
|
default: () => {
|
208
209
|
isShowPrintAll: boolean;
|
209
210
|
isShowOutSetting: boolean;
|
211
|
+
customProps: {};
|
210
212
|
};
|
211
213
|
};
|
212
214
|
}>> & {}>>;
|
@@ -247,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
247
249
|
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
248
250
|
isShowPrintAllBtn: import("vue").ComputedRef<any>;
|
249
251
|
isShowOutSettingBtn: import("vue").ComputedRef<any>;
|
252
|
+
printCustomProps: import("vue").ComputedRef<any>;
|
250
253
|
showSettingItems: import("vue").ComputedRef<AnyObject[]>;
|
251
254
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
252
255
|
initShowDownList: () => Promise<void>;
|
@@ -2031,6 +2034,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2031
2034
|
default: () => {
|
2032
2035
|
isShowPrintAll: boolean;
|
2033
2036
|
isShowOutSetting: boolean;
|
2037
|
+
customProps: {};
|
2034
2038
|
};
|
2035
2039
|
};
|
2036
2040
|
}>>, {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,inject as e,ref as n,reactive as i,computed as r,onMounted as a,watch as o,openBlock as l,createElementBlock as s,Fragment as c,createElementVNode as p,createCommentVNode as u,createVNode as d,unref as m,withCtx as y,renderList as f,createBlock as v,createTextVNode as g,toDisplayString as k,isRef as h,renderSlot as b,withModifiers as w,normalizeClass as P,mergeProps as O}from"vue";import{isObject as S}from"@vue/shared";import{useMessage as C,NButtonGroup as I,NDropdown as T,NButton as L,NIcon as M,NPopover as F,NCheckbox as j,NDivider as x}from"naive-ui";import{PrintOutline as E,SettingsOutline as N,ChevronDownSharp as _,ArrowForwardOutline as D}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as z}from"../constants/index.js";import{Print as J}from"../utils/print.js";import{isIReport as U}from"../utils/browserPrint.js";import V from"./IdentityVerification.vue.js";import{format as A}from"date-fns";import"../api.js";const B={class:"newprint-button-outer"},R=p("span",{class:"label bold"},"外显设置",-1),H={class:"newprint-button-poperOver"},K={class:"print-lite"},q={class:"label bold"},G={class:"print-li"},Y={class:"print-lite"},$={class:"newprint-button-poperOver"},Q=["onMouseenter","onClick"],W={class:"label bold"},X={class:"newprint-button-poperOver"},Z={class:"print-lite"},tt={class:"label bold"},et={class:"print-li"},nt={class:"print-lite"},it={class:"print-lite"},rt=["onClick"],at={class:"newprint-button-poperOver"},ot=["onMouseenter"],lt={class:"print-lite"},st=["onClick"];var ct=t({__name:"NewPrintComponent",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},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,default:1},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,isShowOutSetting:!0})}},setup(t,{expose:ct}){const pt=t,ut=[{label:"分割线",key:"divider"},{label:"外显设置",key:"outSetting"}],dt=C();let mt;const yt=e(z),ft=n(""),vt=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1});let gt=n([]),kt=n([{label:pt.pdfLoadText,key:"downloadPdf"},{label:pt.previewText,key:"previewText"},{label:pt.formatEditText,key:"formatEditText"},{label:"重置打印机",key:"resetPrinter"}]);const ht=i({oneMouseType:"",oneClickType:"",twoMouseType:""}),bt=i({oneShow:!1,isOperation:!1,isOutSetting:!1}),wt=n([]),Pt=n([]),Ot=r((()=>{if(!vt.currentFormatId)return{};let t=vt.currentFormatId;return vt.formatList.find((e=>e.id===t))}));r((()=>{var t;return(null==(t=Ot.value)?void 0:t.name)||"格式选择"}));const St=r((()=>{let t=vt.formatList.find((t=>t.id===vt.currentFormatId));return null==t?void 0:t.templateId})),Ct=r((()=>{var t;return null==(t=pt.newPrintSetting)?void 0:t.isShowPrintAll})),It=r((()=>{var t;return null==(t=pt.newPrintSetting)?void 0:t.isShowOutSetting})),Tt=r((()=>{const t=ut.map((t=>t.key));return gt.value.filter((e=>!t.includes(e.key)))})),Lt=r({get:()=>Tt.value.every((t=>t.selected)),set(t){Tt.value.forEach((e=>{e.selected=t}))}}),Mt=async()=>{await Zt(),bt.oneShow=!0},Ft=async t=>{if(pt.directPrint){if(vt.spinning)return;return"button"===t?void await ne():Mt()}return Mt()},jt=(t,e)=>{ht[t]=e},xt=()=>{wt.value=gt.value.filter((t=>!t.selected)),Pt.value=Tt.value.filter((t=>t.selected)).map((t=>({...t,isLoading:!1}))),Nt("oneShow"),Nt("isOutSetting")},Et=t=>{bt[t]=!0},Nt=t=>{ht.oneClickType="",bt[t]=!1,"isOutSetting"==t&&(bt.isOutSetting=!1)},_t=(t,e)=>{At(!1);let n={type:e,formatId:vt.currentFormatId,templateId:St.value};yt("success",t,n)},Dt=t=>{At(!1),yt("error",t),S(t)&&"notInstalledApp"===t.type&&dt.error(t.message)},zt=t=>{At(!1),yt("cancel",t)},Jt=t=>{yt("error",{message:"前置条件执行错误",type:t,preExecution:!0})},Ut=()=>JSON.stringify({...pt.token?{token:pt.token}:{}}),Vt=(t=[],e)=>{var n,i;let r={},a={};if((null==(n=vt.templateParams[e].customizeDataset)?void 0:n.length)>0){const e=(null==(i=Object.keys(t[0].datasetData||{}))?void 0:i[0])||"",n=JSON.stringify(t.map((t=>JSON.parse(t.datasetData[e]))));a={datasetData:{}},a.datasetData[e]=n}else Object.keys(t[0]).forEach((e=>{a[e]=[],t.forEach((t=>{a[e].includes(t[e])||a[e].push(t[e])})),a[e]=a[e].join(",")}));return r=Object.assign({},JSON.parse(Ut()),a),JSON.stringify(r)},At=(t,e)=>{if(vt.isClickOuterPrint){if(t&&e){const n=Pt.value.find((t=>t.key==e));return void(n&&(n.isLoading=t))}Pt.value.forEach((t=>{t.isLoading=!1}))}else vt.spinning=t},Bt=()=>vt.isClickOuterPrint?Pt.value.some((t=>t.isLoading)):vt.spinning,Rt=(t,e,n,i)=>{const r=vt.printParams[t];vt.isClickOuterPrint=i,Ht(r,t,e,n)},Ht=async(t=[],e,n,i,r)=>{let a=t.length;const o=async t=>{try{--a<=0&&_t(t,"print")}catch(t){console.log("error",t)}};pt.showLoading&&Bt()&&!r||(At(!0,i),pt.prevFn("print").then((()=>{vt.curPrintParamList=t;const r={formatId:i,templateId:n,authorizationKey:ft.value,printdlgshow:pt.printdlgshow,signature:pt.signature,copies:pt.printCopies};if("MULTI"===pt.strategy)for(let e=0;e<t.length;e++)e>0&&(r.printdlgshow="0"),mt.printDirect({...r,params:Object.assign({},JSON.parse(Ut()),t[e])},o,Dt,zt);else mt.printDirect({...r,params:Vt(t,e)},(t=>{_t(t,"print")}),Dt,zt)})).catch((()=>{Jt("print"),At(!1)})).finally((()=>{vt.visible=!1})))},Kt=async(t,{templateCode:e,templateId:n,key:i},r)=>{const a=vt.printParams[e];switch(vt.isClickOuterPrint=r,t){case"previewText":(async(t=[],e,n,i)=>{pt.showLoading&&Bt()||(At(!0,i),pt.prevFn("preview").then((()=>{vt.curPrintParamList=t;const r="MULTI"===pt.strategy?Object.assign({},JSON.parse(Ut()),t[0]):Vt(t,e),a={formatId:i,templateId:n,authorizationKey:ft.value,params:r,btnprint:pt.btnprint,signature:pt.signature};mt.preview(a,(t=>{_t(t,"preview")}),Dt)})).catch((()=>{Jt("preview"),At(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,i);break;case"formatEditText":((t=[],e,n,i)=>{pt.showLoading&&Bt()||(At(!0,i),pt.prevFn("edit").then((()=>{vt.curPrintParamList=t,vt.currentFormatId=i,vt.identityVerification.visible=!0})).catch((()=>{Jt("edit")})).finally((()=>{At(!1)})))})(a,0,0,i);break;case"downloadPdf":(async(t=[],e,n,i)=>{pt.showLoading&&Bt()||(At(!0,i),pt.prevFn("download").then((()=>{vt.curPrintParamList=t;const r="MULTI"===pt.strategy?Object.assign({},JSON.parse(Ut()),t[0]):Vt(t,e),a={formatId:i,templateId:n,authorizationKey:ft.value,print:{print:"1",type:"1"},params:r,signature:pt.signature};mt.downloadPDF(a,(t=>_t(t,"preview")),Dt)})).catch((()=>{Jt("download"),At(!1)})).finally((()=>{vt.visible=!1})))})(a,e,n,i)}},qt=()=>{yt("clickoutside")},Gt=(t,e=[])=>{let n={};return e.forEach((e=>{n=Object.assign({},Qt(n,e,t))})),n},Yt=(t,e,n)=>{const i={};return e.forEach((e=>{let r=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=A(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&r&&(i[e[n]]=r)})),i},$t=({customizeDataset:t=[],param:e=[]},n={})=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData||(i.datasetData={}),i.datasetData[t.name]=JSON.stringify(Yt(n,e,"fieldName"))})),i=Object.assign({},i,Yt(n,e,"key")),i},Qt=(t,e,n)=>{if(e.templateNumbers){for(let i=0;i<e.templateNumbers.length;i++){const r=e.templateNumbers[i],a=n[r];if(!a)return dt.error("当前勾选的数据没有匹配的模板"),t;t[r]||(t[r]=[]),t[r].push($t(a,e))}return t}const i=Object.keys(n);for(let r=0;r<i.length;r++){const a=i[r],o=n[a];if(!o)return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push($t(o,e))}return t},Wt=async t=>{vt.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):[],(()=>{var t;const e=vt.formatList.map((t=>({templateCode:t.number,templateId:t.templateId,label:t.name,key:t.id,selected:!1})));gt.value.unshift(...e),It.value&>.value.push(...ut),wt.value=gt.value.filter((t=>!t.selected)),pt.hideButtons.length>0&&(kt.value=kt.value.filter((t=>!pt.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),i=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},r=Object.keys(i);r.includes("RY7.2.21.1.M2.G94181E")||(kt.value=kt.value.filter((t=>"downloadPdf"!=t.key))),r.includes("RY7.2.21.1.M2.G33633A")||(kt.value=kt.value.filter((t=>"formatEditText"!=t.key)))}})(),vt.templateParams=(t=>{let e={};return t&&t.forEach((t=>{if(!t.templateConfig)return!1;e[t.number]=t.templateConfig})),e})(t.obj),vt.printParams=Gt(vt.templateParams,pt.params)},Xt=async()=>{var t;if(vt.isInited)return!0;vt.isInited=!0,vt.spinning=!0,(()=>{if(mt)return!1;mt=new J})();const e=await pt.queryPrintFormatByNumber();return await Wt(e),(null==(t=e.obj)?void 0:t.length)>0&&(ft.value=e.obj[0].authorizationKey||""),vt.spinning=!1,!0},Zt=async(t=!0)=>{var e,n;if(await pt.clickPrevFn())if((null==(e=pt.params)?void 0:e.length)||(null==(n=pt.printParams)?void 0:n.length)){if(!vt.visible){if(!await Xt())return!1}t&&(vt.visible=!vt.visible)}else dt.warning(pt.noDataMsg)},te=()=>{vt.watchPrintParamsReformatFn&&vt.watchPrintParamsReformatFn(),vt.isInited?vt.printParams=Gt(vt.templateParams,pt.params):vt.watchPrintParamsReformatFn=()=>o((()=>vt.isInited),(t=>{if(!t)return!1;te()}))},ee=t=>{if(vt.identityVerification.visible=!1,U(vt.currentFormatId))return _t(null,"edit");const e={formatId:vt.currentFormatId,templateId:St.value,params:Object.assign({},JSON.parse(Ut()),vt.curPrintParamList[0]),token:t};mt.editPrintFormat(e,(t=>{_t(t,"edit")}),Dt)};async function ne(){await Zt(!1),(()=>{const t=Object.keys(vt.printParams);vt.isClickOuterPrint=!1;for(let e=0;e<t.length;e++){const n=t[e],i=vt.printParams[n],r=vt.formatList.filter((t=>t.number==n));r&&r.length>0&&r.forEach((t=>{Ht(i,t.number,t.templateId,t.id,!0)}))}})()}return a((()=>{vt.isInited=!1})),o((()=>pt.params),(t=>{if(!(null==t?void 0:t.length))return!1;te()}),{deep:!0}),ct({directPrint:ne}),(e,n)=>(l(),s(c,null,[p("div",B,[u(" 外显按钮集合 "),d(m(I),null,{default:y((()=>[(l(!0),s(c,null,f(Pt.value,(e=>(l(),v(m(T),{key:e.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:qt,options:m(kt),onSelect:t=>Kt(t,e,!0)},{default:y((()=>[d(m(L),{loading:t.showLoading&&e.isLoading,onClick:t=>Rt(e.templateCode,e.templateId,e.key,!0)},{icon:y((()=>[d(m(M),{component:m(E),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(e.label),1)])),_:2},1032,["loading","onClick"])])),_:2},1032,["options","onSelect"])))),128))])),_:1}),u(' <n-button-group>\r\n\t\t\t<n-popover\r\n\t\t\t\tv-for="outer in outterPrintItems"\r\n :key="outer.key"\r\n\t\t\t\ttrigger="hover"\r\n\t\t\t\t:show-arrow="false"\r\n\t\t\t\t:show="downlistPopover.isOperation"\r\n\t\t\t\t@clickoutside="handleClickOutHide(\'isOperation\')"\r\n\t\t\t>\r\n\t\t\t\t<template #trigger>\r\n\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t@mouseenter="delayShowPopover(\'isOperation\')"\r\n\t\t\t\t\t\t@mouseleave="handleClickOutHide(\'isOperation\')"\r\n\t\t\t\t\t\t@click="console.log(33)"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t<n-icon :component="PrintOutline" size="18"></n-icon>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t<span class="label bold">{{ outer.label }}</span>\r\n\t\t\t\t\t</n-button>\r\n\t\t\t\t</template>\r\n\t\t\t\t<div class="newprint-button-poperOver">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass="print-li"\r\n\t\t\t\t\t\tv-for="operation in operations"\r\n\t\t\t\t\t\t:key="operation.key"\r\n\t\t\t\t\t\t:class="downlistOperation.twoMouseType==operation.key ? \'active\' : \'\' "\r\n\t\t\t\t\t\t@mouseenter="handleTypeChange(\'twoMouseType\', operation.key)"\r\n\t\t\t\t\t\t@mouseleave="handleTypeChange(\'twoMouseType\', \'\')"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class="print-lite">\r\n\t\t\t\t\t\t\t<span class="label"> {{ operation.label }} </span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</n-popover>\r\n\t\t</n-button-group> '),u(" 外显设置按钮 "),vt.isInited&&Pt.value.length>0&&Pt.value.length==m(Tt).length?(l(),v(m(F),{key:0,trigger:"click","show-arrow":!1,show:bt.isOutSetting,onClickoutside:n[2]||(n[2]=t=>Nt("isOutSetting"))},{trigger:y((()=>[d(m(L),{onClick:n[0]||(n[0]=t=>Et("isOutSetting"))},{default:y((()=>[R,d(m(M),{style:{"margin-left":"8px"},component:m(N),size:"18"},null,8,["component"])])),_:1})])),default:y((()=>[p("div",H,[(l(!0),s(c,null,f(m(Tt),(t=>(l(),s("div",{class:"print-li",key:t.key},[p("div",K,[p("span",q,k(t.label),1),d(m(j),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),p("div",G,[d(m(x)),p("div",Y,[d(m(L),{type:"primary",size:"small",onClick:xt},{default:y((()=>[g("保存")])),_:1}),d(m(j),{checked:m(Lt),"onUpdate:checked":n[1]||(n[1]=t=>h(Lt)?Lt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])])])])])),_:1},8,["show"])):(l(),s(c,{key:1},[u(" 打印全部按钮 "),d(m(F),{trigger:"click","show-arrow":!1,show:bt.oneShow,onClickoutside:n[10]||(n[10]=t=>Nt("oneShow"))},{trigger:y((()=>[b(e.$slots,"button",{handleClickPrintBtn:Zt,printSpinning:vt.spinning,printbtnText:t.btnText,printVisible:vt.visible},(()=>[d(m(I),{class:"newprint-button-component",onClick:n[4]||(n[4]=w((()=>Ft("icon")),["stop"]))},{default:y((()=>[d(m(L),{loading:t.showLoading&&vt.spinning,onClick:n[3]||(n[3]=w((()=>Ft("button")),["stop"]))},{icon:y((()=>[d(m(M),{component:m(E),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(m(Ct)?"打印全部":t.btnText),1)])),_:1},8,["loading"]),d(m(L),{class:"icon-select"},{icon:y((()=>[d(m(M),{component:m(_),size:"18"},null,8,["component"])])),_:1})])),_:1})]))])),default:y((()=>[p("div",$,[(l(!0),s(c,null,f(wt.value,(t=>(l(),s("div",{class:P(["print-li",ht.oneMouseType==t.key||ht.oneClickType==t.key?"active":""]),key:t.key,onMouseenter:e=>jt("oneMouseType",t.key),onMouseleave:n[9]||(n[9]=t=>jt("oneMouseType","")),onClick:e=>{return n="oneClickType",i=t.key,void jt(n,i);var n,i}},["divider"==t.key?(l(),v(m(x),{key:0})):"outSetting"==t.key?(l(),s(c,{key:1},[u(" 第二层外显设置 "),d(m(F),{trigger:"click","show-arrow":!1,placement:"right-start",show:bt.isOutSetting,onClickoutside:n[7]||(n[7]=t=>Nt("isOutSetting"))},{trigger:y((()=>[p("div",{class:"print-lite",onClick:n[5]||(n[5]=t=>Et("isOutSetting"))},[p("span",W,k(t.label),1),d(m(M),{style:{background:"transparent"},component:m(N),size:"18"},null,8,["component"])])])),default:y((()=>[p("div",X,[(l(!0),s(c,null,f(m(Tt),(t=>(l(),s("div",{class:"print-li",key:t.key},[p("div",Z,[p("span",tt,k(t.label),1),d(m(j),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),p("div",et,[d(m(x)),p("div",nt,[d(m(L),{type:"primary",size:"small",onClick:xt},{default:y((()=>[g("保存")])),_:1}),d(m(j),{checked:m(Lt),"onUpdate:checked":n[6]||(n[6]=t=>h(Lt)?Lt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])])])])])),_:2},1032,["show"])],2112)):(l(),s(c,{key:2},[u(" 第二层功能操作 "),p("div",it,[p("span",{class:"label bold",onClick:e=>Rt(t.templateCode,t.templateId,t.key,!1)},k(t.label),9,rt),d(m(F),{trigger:"click","show-arrow":!1,placement:"right-start",show:bt[t.key],onClickoutside:e=>Nt(t.key)},{trigger:y((()=>[d(m(M),{component:m(D),size:"18",onClick:e=>Et(t.key)},null,8,["component","onClick"])])),default:y((()=>[p("div",at,[(l(!0),s(c,null,f(m(kt),(e=>(l(),s("div",{class:P(["print-li",ht.twoMouseType==e.key?"active":""]),key:e.key,onMouseenter:t=>jt("twoMouseType",e.key),onMouseleave:n[8]||(n[8]=t=>jt("twoMouseType",""))},[p("div",lt,[p("span",{class:"label",onClick:n=>Kt(e.key,t,!1)},k(e.label),9,st)])],42,ot)))),128))])])),_:2},1032,["show","onClickoutside"])])],2112))],42,Q)))),128))])])),_:3},8,["show"])],2112))]),d(V,O(e.$attrs,{modelValue:vt.identityVerification.visible,"onUpdate:modelValue":n[11]||(n[11]=t=>vt.identityVerification.visible=t),formatId:vt.currentFormatId,templateId:m(St),onSuccess:ee}),null,16,["modelValue","formatId","templateId"])],64))}});export{ct as default};
|
1
|
+
import{defineComponent as t,inject as e,ref as n,reactive as i,computed as r,onMounted as a,watch as o,openBlock as l,createElementBlock as s,Fragment as u,createElementVNode as c,createCommentVNode as p,createVNode as d,unref as m,withCtx as y,renderList as v,createBlock as f,createTextVNode as g,toDisplayString as k,isRef as h,renderSlot as b,withModifiers as w,normalizeClass as P,mergeProps as O}from"vue";import{isObject as S}from"@vue/shared";import{useMessage as C,NButtonGroup as I,NDropdown as T,NButton as L,NIcon as M,NPopover as F,NCheckbox as j,NDivider as x}from"naive-ui";import{PrintOutline as E,SettingsOutline as N,ChevronDownSharp as _,ArrowForwardOutline as D}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as z}from"../constants/index.js";import{Print as J}from"../utils/print.js";import{isIReport as U}from"../utils/browserPrint.js";import V from"./IdentityVerification.vue.js";import{format as A}from"date-fns";import"../api.js";const B={class:"newprint-button-outer"},R=c("span",{class:"label bold"},"外显设置",-1),H={class:"newprint-button-poperOver"},K={class:"print-lite"},q={class:"label bold"},G={class:"print-li"},Y={class:"print-lite"},$={class:"newprint-button-poperOver"},Q=["onMouseenter","onClick"],W={class:"label bold"},X={class:"newprint-button-poperOver"},Z={class:"print-lite"},tt={class:"label bold"},et={class:"print-li"},nt={class:"print-lite"},it={class:"print-lite"},rt=["onClick"],at={class:"newprint-button-poperOver"},ot=["onMouseenter"],lt={class:"print-lite"},st=["onClick"];var ut=t({__name:"NewPrintComponent",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},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,default:1},newPrintSetting:{type:Object,default:()=>({isShowPrintAll:!0,isShowOutSetting:!0,customProps:{}})}},setup(t,{expose:ut}){const ct=t,pt=[{label:"分割线",key:"divider"},{label:"外显设置",key:"outSetting"}],dt=C();let mt;const yt=e(z),vt=n(""),ft=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,isClickOuterPrint:!1});let gt=n([]),kt=n([{label:ct.pdfLoadText,key:"downloadPdf"},{label:ct.previewText,key:"previewText"},{label:ct.formatEditText,key:"formatEditText"},{label:"重置打印机",key:"resetPrinter"}]);const ht=i({oneMouseType:"",oneClickType:"",twoMouseType:""}),bt=i({oneShow:!1,isOperation:!1,isOutSetting:!1}),wt=n([]),Pt=n([]),Ot=r((()=>{if(!ft.currentFormatId)return{};let t=ft.currentFormatId;return ft.formatList.find((e=>e.id===t))}));r((()=>{var t;return(null==(t=Ot.value)?void 0:t.name)||"格式选择"}));const St=r((()=>{let t=ft.formatList.find((t=>t.id===ft.currentFormatId));return null==t?void 0:t.templateId})),Ct=r((()=>{var t;return null==(t=ct.newPrintSetting)?void 0:t.isShowPrintAll})),It=r((()=>{var t;return null==(t=ct.newPrintSetting)?void 0:t.isShowOutSetting})),Tt=r((()=>{var t;return(null==(t=ct.newPrintSetting)?void 0:t.customProps)||{}})),Lt=r((()=>{const t=pt.map((t=>t.key));return gt.value.filter((e=>!t.includes(e.key)))})),Mt=r({get:()=>Lt.value.every((t=>t.selected)),set(t){Lt.value.forEach((e=>{e.selected=t}))}}),Ft=async()=>{await te(),bt.oneShow=!0},jt=async t=>{if(ct.directPrint){if(ft.spinning)return;return"button"===t?void(Ct.value?await ie():Ft()):Ft()}return Ft()},xt=(t,e)=>{ht[t]=e},Et=()=>{wt.value=gt.value.filter((t=>!t.selected)),Pt.value=Lt.value.filter((t=>t.selected)).map((t=>({...t,isLoading:!1}))),_t("oneShow"),_t("isOutSetting")},Nt=t=>{bt[t]=!0},_t=t=>{ht.oneClickType="",bt[t]=!1,"isOutSetting"==t&&(bt.isOutSetting=!1)},Dt=(t,e)=>{Bt(!1);let n={type:e,formatId:ft.currentFormatId,templateId:St.value};yt("success",t,n)},zt=t=>{Bt(!1),yt("error",t),S(t)&&"notInstalledApp"===t.type&&dt.error(t.message)},Jt=t=>{Bt(!1),yt("cancel",t)},Ut=t=>{yt("error",{message:"前置条件执行错误",type:t,preExecution:!0})},Vt=()=>JSON.stringify({...ct.token?{token:ct.token}:{}}),At=(t=[],e)=>{var n,i;let r={},a={};if((null==(n=ft.templateParams[e].customizeDataset)?void 0:n.length)>0){const e=(null==(i=Object.keys(t[0].datasetData||{}))?void 0:i[0])||"",n=JSON.stringify(t.map((t=>JSON.parse(t.datasetData[e]))));a={datasetData:{}},a.datasetData[e]=n}else Object.keys(t[0]).forEach((e=>{a[e]=[],t.forEach((t=>{a[e].includes(t[e])||a[e].push(t[e])})),a[e]=a[e].join(",")}));return r=Object.assign({},JSON.parse(Vt()),Tt.value,a),JSON.stringify(r)},Bt=(t,e)=>{if(ft.isClickOuterPrint){if(t&&e){const n=Pt.value.find((t=>t.key==e));return void(n&&(n.isLoading=t))}Pt.value.forEach((t=>{t.isLoading=!1}))}else ft.spinning=t},Rt=()=>ft.isClickOuterPrint?Pt.value.some((t=>t.isLoading)):ft.spinning,Ht=(t,e,n,i)=>{const r=ft.printParams[t];ft.isClickOuterPrint=i,Kt(r,t,e,n)},Kt=async(t=[],e,n,i,r)=>{let a=t.length;const o=async t=>{try{--a<=0&&Dt(t,"print")}catch(t){console.log("error",t)}};ct.showLoading&&Rt()&&!r||(Bt(!0,i),ct.prevFn("print").then((()=>{ft.curPrintParamList=t;const r={formatId:i,templateId:n,authorizationKey:vt.value,printdlgshow:ct.printdlgshow,signature:ct.signature,copies:ct.printCopies};if("MULTI"===ct.strategy)for(let e=0;e<t.length;e++)e>0&&(r.printdlgshow="0"),mt.printDirect({...r,params:Object.assign({},JSON.parse(Vt()),Tt.value,t[e])},o,zt,Jt);else mt.printDirect({...r,params:At(t,e)},(t=>{Dt(t,"print")}),zt,Jt)})).catch((()=>{Ut("print"),Bt(!1)})).finally((()=>{ft.visible=!1})))},qt=async(t,{templateCode:e,templateId:n,key:i},r)=>{const a=ft.printParams[e];switch(ft.isClickOuterPrint=r,t){case"previewText":(async(t=[],e,n,i)=>{ct.showLoading&&Rt()||(Bt(!0,i),ct.prevFn("preview").then((()=>{ft.curPrintParamList=t;const r="MULTI"===ct.strategy?Object.assign({},JSON.parse(Vt()),Tt.value,t[0]):At(t,e),a={formatId:i,templateId:n,authorizationKey:vt.value,params:r,btnprint:ct.btnprint,signature:ct.signature};mt.preview(a,(t=>{Dt(t,"preview")}),zt)})).catch((()=>{Ut("preview"),Bt(!1)})).finally((()=>{ft.visible=!1})))})(a,e,n,i);break;case"formatEditText":((t=[],e,n,i)=>{ct.showLoading&&Rt()||(Bt(!0,i),ct.prevFn("edit").then((()=>{ft.curPrintParamList=t,ft.currentFormatId=i,ft.identityVerification.visible=!0})).catch((()=>{Ut("edit")})).finally((()=>{Bt(!1)})))})(a,0,0,i);break;case"downloadPdf":(async(t=[],e,n,i)=>{ct.showLoading&&Rt()||(Bt(!0,i),ct.prevFn("download").then((()=>{ft.curPrintParamList=t;const r="MULTI"===ct.strategy?Object.assign({},JSON.parse(Vt()),Tt.value,t[0]):At(t,e),a={formatId:i,templateId:n,authorizationKey:vt.value,print:{print:"1",type:"1"},params:r,signature:ct.signature};mt.downloadPDF(a,(t=>Dt(t,"preview")),zt)})).catch((()=>{Ut("download"),Bt(!1)})).finally((()=>{ft.visible=!1})))})(a,e,n,i)}},Gt=()=>{},Yt=(t,e=[])=>{let n={};return e.forEach((e=>{n=Object.assign({},Wt(n,e,t))})),n},$t=(t,e,n)=>{const i={};return e.forEach((e=>{let r=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=A(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&r&&(i[e[n]]=r)})),i},Qt=({customizeDataset:t=[],param:e=[]},n={})=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData||(i.datasetData={}),i.datasetData[t.name]=JSON.stringify($t(n,e,"fieldName"))})),i=Object.assign({},i,$t(n,e,"key")),i},Wt=(t,e,n)=>{if(e.templateNumbers){for(let i=0;i<e.templateNumbers.length;i++){const r=e.templateNumbers[i],a=n[r];if(!a)return dt.error("当前勾选的数据没有匹配的模板"),t;t[r]||(t[r]=[]),t[r].push(Qt(a,e))}return t}const i=Object.keys(n);for(let r=0;r<i.length;r++){const a=i[r],o=n[a];if(!o)return dt.error("当前勾选的数据没有匹配的模板"),t;t[a]||(t[a]=[]),t[a].push(Qt(o,e))}return t},Xt=async t=>{ft.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):[],(()=>{var t;const e=ft.formatList.map((t=>({templateCode:t.number,templateId:t.templateId,label:t.name,key:t.id,selected:!1})));gt.value.unshift(...e),It.value&>.value.push(...pt),wt.value=gt.value.filter((t=>!t.selected)),ct.hideButtons.length>0&&(kt.value=kt.value.filter((t=>!ct.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),i=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},r=Object.keys(i);r.includes("RY7.2.21.1.M2.G94181E")||(kt.value=kt.value.filter((t=>"downloadPdf"!=t.key))),r.includes("RY7.2.21.1.M2.G33633A")||(kt.value=kt.value.filter((t=>"formatEditText"!=t.key)))}})(),ft.templateParams=(t=>{let e={};return t&&t.forEach((t=>{if(!t.templateConfig)return!1;e[t.number]=t.templateConfig})),e})(t.obj),ft.printParams=Yt(ft.templateParams,ct.params)},Zt=async()=>{var t;if(ft.isInited)return!0;ft.isInited=!0,ft.spinning=!0,(()=>{if(mt)return!1;mt=new J})();const e=await ct.queryPrintFormatByNumber();return await Xt(e),(null==(t=e.obj)?void 0:t.length)>0&&(vt.value=e.obj[0].authorizationKey||""),ft.spinning=!1,!0},te=async(t=!0)=>{var e,n;if(await ct.clickPrevFn())if((null==(e=ct.params)?void 0:e.length)||(null==(n=ct.printParams)?void 0:n.length)){if(!ft.visible){if(!await Zt())return!1}t&&(ft.visible=!ft.visible)}else dt.warning(ct.noDataMsg)},ee=()=>{ft.watchPrintParamsReformatFn&&ft.watchPrintParamsReformatFn(),ft.isInited?ft.printParams=Yt(ft.templateParams,ct.params):ft.watchPrintParamsReformatFn=()=>o((()=>ft.isInited),(t=>{if(!t)return!1;ee()}))},ne=t=>{if(ft.identityVerification.visible=!1,U(ft.currentFormatId))return Dt(null,"edit");const e={formatId:ft.currentFormatId,templateId:St.value,params:Object.assign({},JSON.parse(Vt()),Tt.value,ft.curPrintParamList[0]),token:t};mt.editPrintFormat(e,(t=>{Dt(t,"edit")}),zt)};async function ie(){await te(!1),(()=>{const t=Object.keys(ft.printParams);ft.isClickOuterPrint=!1;for(let e=0;e<t.length;e++){const n=t[e],i=ft.printParams[n],r=ft.formatList.filter((t=>t.number==n));r&&r.length>0&&r.forEach((t=>{Kt(i,t.number,t.templateId,t.id,!0)}))}})()}return a((()=>{ft.isInited=!1})),o((()=>ct.params),(t=>{if(!(null==t?void 0:t.length))return!1;ee()}),{deep:!0}),ut({directPrint:ie}),(e,n)=>(l(),s(u,null,[c("div",B,[p(" 外显按钮集合 "),d(m(I),null,{default:y((()=>[(l(!0),s(u,null,v(Pt.value,(e=>(l(),f(m(T),{key:e.key,class:"c-dropdown",placement:"bottom-start",trigger:"hover",onClickoutside:Gt,options:m(kt),onSelect:t=>qt(t,e,!0)},{default:y((()=>[d(m(L),{loading:t.showLoading&&e.isLoading,onClick:t=>Ht(e.templateCode,e.templateId,e.key,!0)},{icon:y((()=>[d(m(M),{component:m(E),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(e.label),1)])),_:2},1032,["loading","onClick"])])),_:2},1032,["options","onSelect"])))),128))])),_:1}),p(' <n-button-group>\r\n\t\t\t<n-popover\r\n\t\t\t\tv-for="outer in outterPrintItems"\r\n :key="outer.key"\r\n\t\t\t\ttrigger="hover"\r\n\t\t\t\t:show-arrow="false"\r\n\t\t\t\t:show="downlistPopover.isOperation"\r\n\t\t\t\t@clickoutside="handleClickOutHide(\'isOperation\')"\r\n\t\t\t>\r\n\t\t\t\t<template #trigger>\r\n\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t@mouseenter="delayShowPopover(\'isOperation\')"\r\n\t\t\t\t\t\t@mouseleave="handleClickOutHide(\'isOperation\')"\r\n\t\t\t\t\t\t@click="console.log(33)"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t<n-icon :component="PrintOutline" size="18"></n-icon>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t<span class="label bold">{{ outer.label }}</span>\r\n\t\t\t\t\t</n-button>\r\n\t\t\t\t</template>\r\n\t\t\t\t<div class="newprint-button-poperOver">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass="print-li"\r\n\t\t\t\t\t\tv-for="operation in operations"\r\n\t\t\t\t\t\t:key="operation.key"\r\n\t\t\t\t\t\t:class="downlistOperation.twoMouseType==operation.key ? \'active\' : \'\' "\r\n\t\t\t\t\t\t@mouseenter="handleTypeChange(\'twoMouseType\', operation.key)"\r\n\t\t\t\t\t\t@mouseleave="handleTypeChange(\'twoMouseType\', \'\')"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class="print-lite">\r\n\t\t\t\t\t\t\t<span class="label"> {{ operation.label }} </span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</n-popover>\r\n\t\t</n-button-group> '),p(" 外显设置按钮 "),ft.isInited&&Pt.value.length>0&&Pt.value.length==m(Lt).length&&m(It)?(l(),f(m(F),{key:0,trigger:"click","show-arrow":!1,show:bt.isOutSetting,onClickoutside:n[2]||(n[2]=t=>_t("isOutSetting"))},{trigger:y((()=>[d(m(L),{onClick:n[0]||(n[0]=t=>Nt("isOutSetting"))},{default:y((()=>[R,d(m(M),{style:{"margin-left":"8px"},component:m(N),size:"18"},null,8,["component"])])),_:1})])),default:y((()=>[c("div",H,[(l(!0),s(u,null,v(m(Lt),(t=>(l(),s("div",{class:"print-li",key:t.key},[c("div",K,[c("span",q,k(t.label),1),d(m(j),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",G,[d(m(x)),c("div",Y,[d(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),d(m(j),{checked:m(Mt),"onUpdate:checked":n[1]||(n[1]=t=>h(Mt)?Mt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])])])])])),_:1},8,["show"])):(l(),s(u,{key:1},[p(" 打印全部按钮 "),d(m(F),{trigger:"click","show-arrow":!1,show:bt.oneShow,onClickoutside:n[10]||(n[10]=t=>_t("oneShow"))},{trigger:y((()=>[b(e.$slots,"button",{handleClickPrintBtn:te,printSpinning:ft.spinning,printbtnText:t.btnText,printVisible:ft.visible},(()=>[d(m(I),{class:"newprint-button-component",onClick:n[4]||(n[4]=w((()=>jt("icon")),["stop"]))},{default:y((()=>[d(m(L),{loading:t.showLoading&&ft.spinning,onClick:n[3]||(n[3]=w((()=>jt("button")),["stop"]))},{icon:y((()=>[d(m(M),{component:m(E),size:"18"},null,8,["component"])])),default:y((()=>[g(" "+k(m(Ct)?"打印全部":t.btnText),1)])),_:1},8,["loading"]),d(m(L),{class:"icon-select"},{icon:y((()=>[d(m(M),{component:m(_),size:"18"},null,8,["component"])])),_:1})])),_:1})]))])),default:y((()=>[c("div",$,[(l(!0),s(u,null,v(wt.value,(t=>(l(),s("div",{class:P(["print-li",ht.oneMouseType==t.key||ht.oneClickType==t.key?"active":""]),key:t.key,onMouseenter:e=>xt("oneMouseType",t.key),onMouseleave:n[9]||(n[9]=t=>xt("oneMouseType","")),onClick:e=>{return n="oneClickType",i=t.key,void xt(n,i);var n,i}},["divider"==t.key?(l(),f(m(x),{key:0})):"outSetting"==t.key?(l(),s(u,{key:1},[p(" 第二层外显设置 "),d(m(F),{trigger:"click","show-arrow":!1,placement:"right-start",show:bt.isOutSetting,onClickoutside:n[7]||(n[7]=t=>_t("isOutSetting"))},{trigger:y((()=>[c("div",{class:"print-lite",onClick:n[5]||(n[5]=t=>Nt("isOutSetting"))},[c("span",W,k(t.label),1),d(m(M),{style:{background:"transparent"},component:m(N),size:"18"},null,8,["component"])])])),default:y((()=>[c("div",X,[(l(!0),s(u,null,v(m(Lt),(t=>(l(),s("div",{class:"print-li",key:t.key},[c("div",Z,[c("span",tt,k(t.label),1),d(m(j),{checked:t.selected,"onUpdate:checked":e=>t.selected=e},{default:y((()=>[g("外显")])),_:2},1032,["checked","onUpdate:checked"])])])))),128)),c("div",et,[d(m(x)),c("div",nt,[d(m(L),{type:"primary",size:"small",onClick:Et},{default:y((()=>[g("保存")])),_:1}),d(m(j),{checked:m(Mt),"onUpdate:checked":n[6]||(n[6]=t=>h(Mt)?Mt.value=t:null)},{default:y((()=>[g("全选")])),_:1},8,["checked"])])])])])),_:2},1032,["show"])],2112)):(l(),s(u,{key:2},[p(" 第二层功能操作 "),c("div",it,[c("span",{class:"label bold",onClick:e=>Ht(t.templateCode,t.templateId,t.key,!1)},k(t.label),9,rt),d(m(F),{trigger:"click","show-arrow":!1,placement:"right-start",show:bt[t.key],onClickoutside:e=>_t(t.key)},{trigger:y((()=>[d(m(M),{component:m(D),size:"18",onClick:e=>Nt(t.key)},null,8,["component","onClick"])])),default:y((()=>[c("div",at,[(l(!0),s(u,null,v(m(kt),(e=>(l(),s("div",{class:P(["print-li",ht.twoMouseType==e.key?"active":""]),key:e.key,onMouseenter:t=>xt("twoMouseType",e.key),onMouseleave:n[8]||(n[8]=t=>xt("twoMouseType",""))},[c("div",lt,[c("span",{class:"label",onClick:n=>qt(e.key,t,!1)},k(e.label),9,st)])],42,ot)))),128))])])),_:2},1032,["show","onClickoutside"])])],2112))],42,Q)))),128))])])),_:3},8,["show"])],2112))]),d(V,O(e.$attrs,{modelValue:ft.identityVerification.visible,"onUpdate:modelValue":n[11]||(n[11]=t=>ft.identityVerification.visible=t),formatId:ft.currentFormatId,templateId:m(St),onSuccess:ne}),null,16,["modelValue","formatId","templateId"])],64))}});export{ut as default};
|
@@ -437,9 +437,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
437
437
|
requiredDisable: boolean;
|
438
438
|
hide: boolean;
|
439
439
|
}>;
|
440
|
-
isHighlightRow: boolean;
|
441
440
|
idx: number;
|
442
441
|
isHighlight: boolean;
|
442
|
+
isHighlightRow: boolean;
|
443
443
|
}>;
|
444
444
|
EditDialog: import("vue").DefineComponent<{
|
445
445
|
visible: {
|
@@ -480,11 +480,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
480
480
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
481
481
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
482
482
|
}>>;
|
483
|
-
emit: (event: "
|
483
|
+
emit: (event: "confirm" | "update:visible", ...args: any[]) => void;
|
484
484
|
formRef: import("vue").Ref<any>;
|
485
485
|
conditionRef: import("vue").Ref<any>;
|
486
486
|
filterVisible: import("vue").Ref<boolean>;
|
487
|
-
title: import("vue").ComputedRef<"
|
487
|
+
title: import("vue").ComputedRef<"修改" | "新增" | "过滤条件">;
|
488
488
|
model: {
|
489
489
|
name: string;
|
490
490
|
color: string;
|
@@ -1352,7 +1352,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1352
1352
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
1353
1353
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
1354
1354
|
}>>;
|
1355
|
-
emit: (event: "
|
1355
|
+
emit: (event: "confirm" | "update:visible", ...args: any[]) => void;
|
1356
1356
|
conditionRef: import("vue").Ref<any>;
|
1357
1357
|
onConfirm: () => void;
|
1358
1358
|
onClose: () => void;
|
@@ -1598,7 +1598,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1598
1598
|
}>>, {
|
1599
1599
|
data: AnyObject;
|
1600
1600
|
}>;
|
1601
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
1601
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1602
1602
|
visible: {
|
1603
1603
|
type: BooleanConstructor;
|
1604
1604
|
default: boolean;
|
@@ -1614,7 +1614,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1614
1614
|
visible: boolean;
|
1615
1615
|
model: AnyObject;
|
1616
1616
|
}>;
|
1617
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
1617
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1618
1618
|
visible: {
|
1619
1619
|
type: BooleanConstructor;
|
1620
1620
|
default: boolean;
|
@@ -458,9 +458,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
458
458
|
requiredDisable: boolean;
|
459
459
|
hide: boolean;
|
460
460
|
}>;
|
461
|
-
isHighlightRow: boolean;
|
462
461
|
idx: number;
|
463
462
|
isHighlight: boolean;
|
463
|
+
isHighlightRow: boolean;
|
464
464
|
}>;
|
465
465
|
setStyle: typeof setStyle;
|
466
466
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -555,9 +555,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
555
555
|
requiredDisable: boolean;
|
556
556
|
hide: boolean;
|
557
557
|
}>;
|
558
|
-
isHighlightRow: boolean;
|
559
558
|
idx: number;
|
560
559
|
isHighlight: boolean;
|
560
|
+
isHighlightRow: boolean;
|
561
561
|
}>;
|
562
562
|
isArray: {
|
563
563
|
(value?: any): value is any[];
|
@@ -279,8 +279,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
279
279
|
requiredDisable: boolean;
|
280
280
|
hide: boolean;
|
281
281
|
}>;
|
282
|
-
isHighlightRow: boolean;
|
283
282
|
idx: number;
|
284
283
|
isHighlight: boolean;
|
284
|
+
isHighlightRow: boolean;
|
285
285
|
}>;
|
286
286
|
export default _default;
|
@@ -40,11 +40,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
41
41
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
42
42
|
}>>;
|
43
|
-
emit: (event: "
|
43
|
+
emit: (event: "confirm" | "update:visible", ...args: any[]) => void;
|
44
44
|
formRef: import("vue").Ref<any>;
|
45
45
|
conditionRef: import("vue").Ref<any>;
|
46
46
|
filterVisible: import("vue").Ref<boolean>;
|
47
|
-
title: import("vue").ComputedRef<"
|
47
|
+
title: import("vue").ComputedRef<"修改" | "新增" | "过滤条件">;
|
48
48
|
model: {
|
49
49
|
name: string;
|
50
50
|
color: string;
|
@@ -912,7 +912,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
912
912
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
913
913
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
914
914
|
}>>;
|
915
|
-
emit: (event: "
|
915
|
+
emit: (event: "confirm" | "update:visible", ...args: any[]) => void;
|
916
916
|
conditionRef: import("vue").Ref<any>;
|
917
917
|
onConfirm: () => void;
|
918
918
|
onClose: () => void;
|
@@ -1158,7 +1158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1158
1158
|
}>>, {
|
1159
1159
|
data: AnyObject;
|
1160
1160
|
}>;
|
1161
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
1161
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1162
1162
|
visible: {
|
1163
1163
|
type: BooleanConstructor;
|
1164
1164
|
default: boolean;
|
@@ -1174,7 +1174,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1174
1174
|
visible: boolean;
|
1175
1175
|
model: AnyObject;
|
1176
1176
|
}>;
|
1177
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
1177
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1178
1178
|
visible: {
|
1179
1179
|
type: BooleanConstructor;
|
1180
1180
|
default: boolean;
|
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
24
24
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
25
25
|
}>>;
|
26
|
-
emit: (event: "
|
26
|
+
emit: (event: "confirm" | "update:visible", ...args: any[]) => void;
|
27
27
|
conditionRef: import("vue").Ref<any>;
|
28
28
|
onConfirm: () => void;
|
29
29
|
onClose: () => void;
|
@@ -269,7 +269,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
269
269
|
}>>, {
|
270
270
|
data: AnyObject;
|
271
271
|
}>;
|
272
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
272
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
273
273
|
visible: {
|
274
274
|
type: BooleanConstructor;
|
275
275
|
default: boolean;
|
@@ -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 t}from"../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"title",showHeaderOverflow:"title",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
|
1
|
+
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../constants/index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,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"}},o,{height:o.height?"auto":void 0});return i.selectType=o.selectType||(s.isPositive(o.isBatchSelect)?"checkbox":s.isPositive(o.isSingleSelect)?"radio":void 0),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.4-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.4-beta.26",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.4-beta.26",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.2.4-beta.
|
3
|
+
"version": "3.2.4-beta.26",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -71,5 +71,5 @@
|
|
71
71
|
"iOS 7",
|
72
72
|
"last 3 iOS versions"
|
73
73
|
],
|
74
|
-
"gitHead": "
|
74
|
+
"gitHead": "d407a2b90095711bcaeab9fd3ecd455080bfe268"
|
75
75
|
}
|