@huilian/components-tms 3.7.9 → 3.7.10

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/lib/bundle.esm.js CHANGED
@@ -2749,7 +2749,7 @@ for(let key in this.formData){if(this.formData[key]!==""){formData.append(key,th
2749
2749
  // fileType: failFileType,
2750
2750
  // };
2751
2751
  const searchParams=new URLSearchParams();searchParams.append("fileCode",fileCode);searchParams.append("fileType",failFileType);for(let key in this.errorParams){if(this.errorParams[key]||this.errorParams[key]==0){searchParams.append(key,this.errorParams[key]);}}// 加密
2752
- let headers={"Content-Type":"application/x-www-form-urlencoded"};const urlApi="/gateway/huilianApi/errorcs/exportErrorFile";if(window.HLEncryption){headers=window.HLEncryption.setRequestHeaders({url:urlApi,headers:headers});}const response=await fetch(urlApi,{method:"post",headers:headers,body:searchParams.toString()});if(!response.ok){throw new Error(`下载请求失败: ${response.statusText}`);}const blob=await response.blob();const name=response.headers.get("content-disposition").split("filename=")[1];const url=window.URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=decodeURIComponent(name);document.body.appendChild(a);a.click();document.body.removeChild(a);window.URL.revokeObjectURL(url);}else{this.$message({message:"无文件可下载",type:"warning"});}}}};/* script */const __vue_script__$1=script$1;/* template */var __vue_render__$1=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"StandardImportComponents",staticStyle:{display:"inline-block"}},[_c("el-button",{attrs:{type:_vm.btnType},on:{click:_vm.openDialog}},[_vm._v(_vm._s(_vm.btnText))]),_vm._v(" "),_c("el-dialog",{attrs:{title:_vm.dialogTitle,visible:_vm.dialogVisible,width:"600px","close-on-click-modal":false,"close-on-press-escape":false,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event;}}},[_c("div",[_vm._t("content-header")],2),_vm._v(" "),_c("div",{staticStyle:{position:"relative"}},[_c("el-upload",{ref:"importFile",attrs:{action:_vm.importApi,"file-list":_vm.fileList,accept:"."+_vm.fileType,"before-upload":_vm.beforeUploadForm,data:_vm.formData,limit:1,"on-change":_vm.handleChange,"on-remove":_vm.handleRemove,"on-success":_vm.handleSuccess,"on-error":_vm.handleError,"auto-upload":false,"http-request":_vm.customHttpRequest}},[_c("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[_vm._v("选取文件")]),_vm._v(" "),_c("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[_vm._v("\n "+_vm._s(_vm.fileTypeComputer)+"\n ")])],1),_vm._v(" "),_c("div",{staticStyle:{position:"absolute",top:"0",left:"100px"}},[_c("el-button",{attrs:{type:"text"},on:{click:_vm.getTemp}},[_vm._v(" 模板下载 ")])],1),_vm._v(" "),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.detailData.successCount||_vm.detailData.failCount,expression:"detailData.successCount || detailData.failCount"}],staticClass:"mt-10",staticStyle:{"font-size":"12px","font-weight":"400",color:"#999999"}},[_vm._v("\n 导入结果(仅展示最后一次上传结果):\n "),_c("span",{staticStyle:{color:"#333333"}},[_vm._v("\n 成功"+_vm._s(_vm.detailData.successCount||0)+"条,失败"+_vm._s(_vm.detailData.failCount||0)+"条\n ")]),_vm._v("\n  \n "),_c("a",{directives:[{name:"show",rawName:"v-show",value:_vm.showFailLink&&_vm.detailData.failCount,expression:"showFailLink && detailData.failCount"}],staticStyle:{color:"#599ebf"},attrs:{href:"javascript:void(0)"},on:{click:_vm.handleFailLinkClick}},[_vm._v("\n "+_vm._s(_vm.onFailClick?"查看失败信息":"下载失败信息")+"\n ")])])],1),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{on:{click:_vm.handleClose}},[_vm._v(" 完成导入 ")]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",loading:_vm.isSubmitLoading},on:{click:_vm.query}},[_vm._v("\n 导入数据\n ")])],1)])],1);};var __vue_staticRenderFns__$1=[];__vue_render__$1._withStripped=true;/* style */const __vue_inject_styles__$1=undefined;/* scoped */const __vue_scope_id__$1=undefined;/* module identifier */const __vue_module_identifier__$1=undefined;/* functional template */const __vue_is_functional_template__$1=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$1=/*#__PURE__*/normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,false,undefined,undefined,undefined);__vue_component__$1.install=function(Vue){Vue.component(__vue_component__$1.name,__vue_component__$1);};var pdfmake={exports:{}};/*! pdfmake v0.3.6, @license MIT, @link http://pdfmake.org */(function(module,exports){(function webpackUniversalModuleDefinition(root,factory){module.exports=factory();})(Object(typeof self!=='undefined'?self:commonjsGlobal),()=>{return(/******/(()=>{// webpackBootstrap
2752
+ let headers={"Content-Type":"application/x-www-form-urlencoded"};const urlApi="/gateway/huilianApi/errorcs/exportErrorFile";if(window.HLEncryption){headers=window.HLEncryption.setRequestHeaders({url:urlApi,headers:headers});}const response=await fetch(urlApi,{method:"post",headers:headers,body:searchParams.toString()});if(!response.ok){throw new Error(`下载请求失败: ${response.statusText}`);}const blob=await response.blob();const name=response.headers.get("content-disposition").split("filename=")[1];const url=window.URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=decodeURIComponent(name);document.body.appendChild(a);a.click();document.body.removeChild(a);window.URL.revokeObjectURL(url);}else{this.$message({message:"无文件可下载",type:"warning"});}}}};/* script */const __vue_script__$1=script$1;/* template */var __vue_render__$1=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"StandardImportComponents",staticStyle:{display:"inline-block"}},[_c("el-button",{attrs:{type:_vm.btnType},on:{click:_vm.openDialog}},[_vm._v(_vm._s(_vm.btnText))]),_vm._v(" "),_c("el-dialog",{attrs:{title:_vm.dialogTitle,visible:_vm.dialogVisible,width:"600px","close-on-click-modal":false,"close-on-press-escape":false,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event;}}},[_c("div",[_vm._t("content-header")],2),_vm._v(" "),_c("div",{staticStyle:{position:"relative"}},[_c("el-upload",{ref:"importFile",attrs:{action:_vm.importApi,"file-list":_vm.fileList,accept:"."+_vm.fileType,"before-upload":_vm.beforeUploadForm,data:_vm.formData,limit:1,"on-change":_vm.handleChange,"on-remove":_vm.handleRemove,"on-success":_vm.handleSuccess,"on-error":_vm.handleError,"auto-upload":false,"http-request":_vm.customHttpRequest}},[_c("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[_vm._v("选取文件")]),_vm._v(" "),_c("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[_vm._v("\n "+_vm._s(_vm.fileTypeComputer)+"\n ")])],1),_vm._v(" "),_c("div",{staticStyle:{position:"absolute",top:"0",left:"100px"}},[_c("el-button",{attrs:{type:"text"},on:{click:_vm.getTemp}},[_vm._v(" 模板下载 ")])],1),_vm._v(" "),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.detailData.successCount||_vm.detailData.failCount,expression:"detailData.successCount || detailData.failCount"}],staticClass:"mt-10",staticStyle:{"font-size":"12px","font-weight":"400",color:"#999999"}},[_vm._v("\n 导入结果(仅展示最后一次上传结果):\n "),_c("span",{staticStyle:{color:"#333333"}},[_vm._v("\n 成功"+_vm._s(_vm.detailData.successCount||0)+"条,失败"+_vm._s(_vm.detailData.failCount||0)+"条\n ")]),_vm._v("\n  \n "),_c("a",{directives:[{name:"show",rawName:"v-show",value:_vm.showFailLink&&_vm.detailData.failCount,expression:"showFailLink && detailData.failCount"}],staticStyle:{color:"#599ebf"},attrs:{href:"javascript:void(0)"},on:{click:_vm.handleFailLinkClick}},[_vm._v("\n "+_vm._s(_vm.onFailClick?"查看失败信息":"下载失败信息")+"\n ")])])],1),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{directives:[{name:"show",rawName:"v-show",value:_vm.detailData.successCount||_vm.detailData.failCount,expression:"detailData.successCount || detailData.failCount"}],on:{click:_vm.handleClose}},[_vm._v("\n 导入完成,关闭弹窗\n ")]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",loading:_vm.isSubmitLoading},on:{click:_vm.query}},[_vm._v("\n 导入数据\n ")])],1)])],1);};var __vue_staticRenderFns__$1=[];__vue_render__$1._withStripped=true;/* style */const __vue_inject_styles__$1=undefined;/* scoped */const __vue_scope_id__$1=undefined;/* module identifier */const __vue_module_identifier__$1=undefined;/* functional template */const __vue_is_functional_template__$1=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$1=/*#__PURE__*/normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,false,undefined,undefined,undefined);__vue_component__$1.install=function(Vue){Vue.component(__vue_component__$1.name,__vue_component__$1);};var pdfmake={exports:{}};/*! pdfmake v0.3.6, @license MIT, @link http://pdfmake.org */(function(module,exports){(function webpackUniversalModuleDefinition(root,factory){module.exports=factory();})(Object(typeof self!=='undefined'?self:commonjsGlobal),()=>{return(/******/(()=>{// webpackBootstrap
2753
2753
  /******/var __webpack_modules__={/***/7133(__unused_webpack_module,__webpack_exports__,__webpack_require__){// EXPORTS
2754
2754
  __webpack_require__.d(__webpack_exports__,{"default":()=>/* binding */browser_extensions});// EXTERNAL MODULE: ./node_modules/pdfkit/js/pdfkit.es.js
2755
2755
  var pdfkit_es=__webpack_require__(1254);/* provided dependency */var Buffer=__webpack_require__(783)["Buffer"];const typeName=(bold,italics)=>{let type='normal';if(bold&&italics){type='bolditalics';}else if(bold){type='bold';}else if(italics){type='italics';}return type;};class PDFDocument extends pdfkit_es/* default */.A{constructor(fonts,images,patterns,attachments,options,virtualfs){if(fonts===void 0){fonts={};}if(images===void 0){images={};}if(patterns===void 0){patterns={};}if(attachments===void 0){attachments={};}if(options===void 0){options={};}if(virtualfs===void 0){virtualfs=null;}super(options);this.fonts={};this.fontCache={};for(let font in fonts){if(fonts.hasOwnProperty(font)){let fontDef=fonts[font];this.fonts[font]={normal:fontDef.normal,bold:fontDef.bold,italics:fontDef.italics,bolditalics:fontDef.bolditalics};}}this.patterns={};for(let pattern in patterns){if(patterns.hasOwnProperty(pattern)){let patternDef=patterns[pattern];this.patterns[pattern]=this.pattern(patternDef.boundingBox,patternDef.xStep,patternDef.yStep,patternDef.pattern,patternDef.colored);}}this.images=images;this.attachments=attachments;this.virtualfs=virtualfs;}getFontType(bold,italics){return typeName(bold,italics);}getFontFile(familyName,bold,italics){let type=this.getFontType(bold,italics);if(!this.fonts[familyName]||!this.fonts[familyName][type]){return null;}return this.fonts[familyName][type];}provideFont(familyName,bold,italics){let type=this.getFontType(bold,italics);if(this.getFontFile(familyName,bold,italics)===null){throw new Error(`Font '${familyName}' in style '${type}' is not defined in the font section of the document definition.`);}this.fontCache[familyName]=this.fontCache[familyName]||{};if(!this.fontCache[familyName][type]){let def=this.fonts[familyName][type];if(!Array.isArray(def)){def=[def];}if(this.virtualfs&&this.virtualfs.existsSync(def[0])){def[0]=this.virtualfs.readFileSync(def[0]);}this.fontCache[familyName][type]=this.font(...def)._font;}return this.fontCache[familyName][type];}provideImage(src){const realImageSrc=src=>{let image=this.images[src];if(!image){return src;}if(this.virtualfs&&this.virtualfs.existsSync(image)){return this.virtualfs.readFileSync(image);}let index=image.indexOf('base64,');if(index<0){return this.images[src];}return Buffer.from(image.substring(index+7),'base64');};if(this._imageRegistry[src]){return this._imageRegistry[src];}let image;try{image=this.openImage(realImageSrc(src));if(!image){throw new Error('No image');}}catch(error){throw new Error(`Invalid image: ${error.toString()}\nImages dictionary should contain dataURL entries (or local file paths in node.js)`,{cause:error});}image.embed(this);this._imageRegistry[src]=image;return image;}/**
@@ -10552,4 +10552,4 @@ for(let i=0;i<rows;i++){for(let j=0;j<cols;j++){watermarks.push({svg:`
10552
10552
  <text transform="translate(10,200) rotate(-45)" font-weight="bold" fill="#f5f5f5" style="font-size: 16px;opacity:0.7;">${text}</text>
10553
10553
  </svg>
10554
10554
  `,// absolutePosition: { x: 0, y: -100 }
10555
- absolutePosition:{x:j*(pageWidth/(cols-0.5)),y:i*(pageHeight/(rows-0.5))-100}});}}return watermarks;}}};/* script */const __vue_script__=script;/* template */var __vue_render__=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{attrs:{id:"DataToPdfBox"}},[_c("el-dialog",{attrs:{title:_vm.dialogParams.title,visible:_vm.visible,width:_vm.dialogParams.width,"close-on-click-modal":false,"before-close":_vm.cancel},on:{"update:visible":function($event){_vm.visible=$event;}}},[_vm._t("html"),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{attrs:{loading:_vm.isSubmitLoading},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.dialogParams.buttonText))])],1)],2)],1);};var __vue_staticRenderFns__=[];__vue_render__._withStripped=true;/* style */const __vue_inject_styles__=undefined;/* scoped */const __vue_scope_id__=undefined;/* module identifier */const __vue_module_identifier__=undefined;/* functional template */const __vue_is_functional_template__=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__=/*#__PURE__*/normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,false,undefined,undefined,undefined);__vue_component__.install=function(Vue){Vue.component(__vue_component__.name,__vue_component__);};var version="3.7.9";const components=[__vue_component__$k,__vue_component__$j,__vue_component__$i,__vue_component__$h,__vue_component__$4,__vue_component__$3,__vue_component__$2,__vue_component__$1,__vue_component__];const install=function(Vue){components.forEach(component=>{Vue.component(component.name,component);});};if(typeof window!=="undefined"&&window.Vue){install(window.Vue);}var index={version,install};export{__vue_component__ as DataToPdf,__vue_component__$2 as ExportList,__vue_component__$4 as FormTableScheme,__vue_component__$j as HelloVue,__vue_component__$3 as HtmlToImg,__vue_component__$k as MyButton,__vue_component__$h as ShowFile,__vue_component__$1 as StandardImport,__vue_component__$i as UploadFile,index as default,install};
10555
+ absolutePosition:{x:j*(pageWidth/(cols-0.5)),y:i*(pageHeight/(rows-0.5))-100}});}}return watermarks;}}};/* script */const __vue_script__=script;/* template */var __vue_render__=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{attrs:{id:"DataToPdfBox"}},[_c("el-dialog",{attrs:{title:_vm.dialogParams.title,visible:_vm.visible,width:_vm.dialogParams.width,"close-on-click-modal":false,"before-close":_vm.cancel},on:{"update:visible":function($event){_vm.visible=$event;}}},[_vm._t("html"),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{attrs:{loading:_vm.isSubmitLoading},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.dialogParams.buttonText))])],1)],2)],1);};var __vue_staticRenderFns__=[];__vue_render__._withStripped=true;/* style */const __vue_inject_styles__=undefined;/* scoped */const __vue_scope_id__=undefined;/* module identifier */const __vue_module_identifier__=undefined;/* functional template */const __vue_is_functional_template__=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__=/*#__PURE__*/normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,false,undefined,undefined,undefined);__vue_component__.install=function(Vue){Vue.component(__vue_component__.name,__vue_component__);};var version="3.7.10";const components=[__vue_component__$k,__vue_component__$j,__vue_component__$i,__vue_component__$h,__vue_component__$4,__vue_component__$3,__vue_component__$2,__vue_component__$1,__vue_component__];const install=function(Vue){components.forEach(component=>{Vue.component(component.name,component);});};if(typeof window!=="undefined"&&window.Vue){install(window.Vue);}var index={version,install};export{__vue_component__ as DataToPdf,__vue_component__$2 as ExportList,__vue_component__$4 as FormTableScheme,__vue_component__$j as HelloVue,__vue_component__$3 as HtmlToImg,__vue_component__$k as MyButton,__vue_component__$h as ShowFile,__vue_component__$1 as StandardImport,__vue_component__$i as UploadFile,index as default,install};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huilian/components-tms",
3
- "version": "3.7.9",
3
+ "version": "3.7.10",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "npx rollup -wc rollup.config.dev.js",