Files
qhmes/web-dist/js/nativeMockData-D5nIVXYv.js

2 lines
8.4 KiB
Java
Raw Normal View History

2026-06-16 18:19:57 +08:00
var rr=Object.defineProperty;var I=Object.getOwnPropertySymbols;var or=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable;var M=Math.pow,V=(r,t,u)=>t in r?rr(r,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):r[t]=u,C=(r,t)=>{for(var u in t||(t={}))or.call(t,u)&&V(r,u,t[u]);if(I)for(var u of I(t))tr.call(t,u)&&V(r,u,t[u]);return r};function ar(){return{fieldMap:{},tableSources:["mainTable","detailList"],params:[],detailTables:[]}}function ir(r){return{id:r.id,component:r.type,bindField:r.bindField||"",region:r.region||"",bandId:r.bandId||"",rect:{x:r.x,y:r.y,w:r.w,h:r.h,zIndex:r.zIndex},style:C({},r.style||{}),payload:r.type==="image"?{src:r.src,fit:r.fit}:r.type==="table"||r.type==="detailTable"?{source:r.source,mergeColumnKeys:r.mergeColumnKeys||[],strictGrouping:r.strictGrouping!==!1,enableMultiHeader:r.enableMultiHeader===!0,tableHeightMode:r.tableHeightMode,fixedRows:r.fixedRows,showHeader:r.showHeader,rowHeight:r.rowHeight,headerHeight:r.headerHeight,headerFontSize:r.headerFontSize,bodyFontSize:r.bodyFontSize,headerBgColor:r.headerBgColor,headerTextColor:r.headerTextColor,footerLabelColumnKey:r.footerLabelColumnKey,footerLabelText:r.footerLabelText,footerLabelCenter:r.footerLabelCenter,footerShowTotal:r.footerShowTotal!==!1,footerTotalMode:r.footerTotalMode||"overall",headerConfig:r.headerConfig,columns:r.columns}:r.type==="freeTable"?{printRepeated:r.printRepeated===!0,rowCount:Number(r.rowCount||1),colCount:Number(r.colCount||1),borderColor:r.borderColor||"#d9d9d9",borderWidth:Number(r.borderWidth||1),outerBorderLineStyle:r.outerBorderLineStyle||"solid",innerBorderHorizontalLineStyle:r.innerBorderHorizontalLineStyle||"solid",innerBorderVerticalLineStyle:r.innerBorderVerticalLineStyle||"solid",colWidths:Array.isArray(r.colWidths)?[...r.colWidths]:void 0,rowHeights:Array.isArray(r.rowHeights)?[...r.rowHeights]:void 0,outerBorder:r.outerBorder,innerBorder:r.innerBorder,cells:Array.isArray(r.cells)?r.cells.map(t=>({row:t.row,col:t.col,rowspan:Math.max(1,Number((t==null?void 0:t.rowspan)||1)),colspan:Math.max(1,Number((t==null?void 0:t.colspan)||1)),text:t.text,bindField:t.bindField,contentType:t.contentType||"text",fillCell:t.fillCell,contentScale:t.contentScale,imageFit:t.imageFit,qrLevel:t.qrLevel,qrRenderType:t.qrRenderType,barcodeFormat:t.barcodeFormat,decimalPlaces:t.decimalPlaces,roundHalfUp:t.roundHalfUp,amountType:t.amountType,autoWrap:t.autoWrap,autoFitFont:t.autoFitFont,align:t.align,verticalAlign:t.verticalAlign,fontSize:t.fontSize,color:t.color,backgroundColor:t.backgroundColor,hideBorderTop:t.hideBorderTop,hideBorderRight:t.hideBorderRight,hideBorderBottom:t.hideBorderBottom,hideBorderLeft:t.hideBorderLeft})):[]}:r.type==="reportHeader"||r.type==="reportFooter"?{text:r.text,bookmarkText:r.bookmarkText,keepTogether:r.keepTogether,centerWithDetail:r.centerWithDetail,refreshPage:r.refreshPage,visible:r.visible,stretch:r.stretch,shrink:r.shrink,printRepeated:r.printRepeated,printAtPageBottom:r.printAtPageBottom,removeBlankWhenNoData:r.removeBlankWhenNoData}:r.type==="qrcode"||r.type==="barcode"?{value:r.value}:{text:r.text,format:r.format}}}function nr(r){return{engine:"native-template-style",version:"1.0.0",page:C({},r.page),elements:r.elements.map(t=>ir(t)),dataBinding:r.dataBinding||ar()}}function dr(r,t=2){return JSON.stringify(nr(r),null,t)}function er(r,t){const u=(o,n)=>Math.floor(Math.random()*(n-o+1))+o,v=o=>o[u(0,Math.max(0,o.length-1))],z=["标准件","不锈钢","铝板","铜件","塑胶件","辅料","组件"],P=["用于产线组装的关键部件,需按工艺要求进行批次追溯与检验记录。","该物料用于连续生产流程,建议结合库存周转与批次有效期进行动态补料。","本条数据为模拟长文本,主要用于验证列宽变化后自动换行与字号自适应效果。"],G=(o,n)=>`${o}_${v(z)}_${n+1}`,J=(o,n)=>`${o}_${n+1}_${v(P)}`,q=(o,n,d)=>d&&Math.random()<.45?J(o,n):G(o,n),D=o=>String(o||"").replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"CODE",w=o=>`QR_${D(o)}_${u(1e5,999999)}`,N=o=>`BAR${u(1e11,99