dfs-page-config 0.5.80 → 0.5.81
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/dist/dfs-page-config.js
CHANGED
|
@@ -128760,11 +128760,10 @@ const isFontAvailable = (Ff) => {
|
|
|
128760
128760
|
pAe.value.focus();
|
|
128761
128761
|
}, 100)) : ElMessageBox.alert(
|
|
128762
128762
|
`
|
|
128763
|
-
<
|
|
128764
|
-
${kh("点击下载字体")}: <a href="${CircularXXMedium}" download="CircularXX-Medium.otf" target="_blank">CircularXX-Medium.otf</a><br />
|
|
128763
|
+
<p style="color: red; margin-bottom: 12px;">${kh("请安装字体,")} <span style="font-size: 16px; font-weight: bold; color: green;">${kh("安装后关闭所有浏览器窗口重新打开")}</span>。</p>
|
|
128765
128764
|
${kh("点击下载字体")}: <a href="${CircularXXRegular}" download="CircularXX-Regular.otf" target="_blank">CircularXX-Regular.otf</a>
|
|
128766
128765
|
`,
|
|
128767
|
-
kh("
|
|
128766
|
+
kh("所需字体未安装"),
|
|
128768
128767
|
{
|
|
128769
128768
|
showConfirmButton: !1,
|
|
128770
128769
|
// center: true,
|
|
@@ -128811,7 +128810,7 @@ const isFontAvailable = (Ff) => {
|
|
|
128811
128810
|
changePrintType: VAe
|
|
128812
128811
|
};
|
|
128813
128812
|
}
|
|
128814
|
-
}),
|
|
128813
|
+
}), FabricHangTag_vue_vue_type_style_index_0_scoped_36337c57_lang = "", _withScopeId$1 = (Ff) => (pushScopeId("data-v-36337c57"), Ff = Ff(), popScopeId(), Ff), _hoisted_1$1 = {
|
|
128815
128814
|
style: { height: "max-content", display: "block" },
|
|
128816
128815
|
class: "el-upload-list--picture-card"
|
|
128817
128816
|
}, _hoisted_2$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "point" }, null, -1)), _hoisted_3$1 = {
|
|
@@ -129084,7 +129083,7 @@ function _sfc_render$1(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
129084
129083
|
}, 8, ["title", "modelValue"])
|
|
129085
129084
|
], 64);
|
|
129086
129085
|
}
|
|
129087
|
-
const FabricHangTag = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
129086
|
+
const FabricHangTag = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-36337c57"]]);
|
|
129088
129087
|
FabricHangTag.install = (Ff) => Ff.component(FabricHangTag.name, FabricHangTag);
|
|
129089
129088
|
AgTable.install = (Ff) => Ff.component(AgTable.name, AgTable);
|
|
129090
129089
|
const _sfc_main = defineComponent({
|
|
@@ -2180,10 +2180,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2180
2180
|
`).reverse().forEach((nme,KAe)=>{oAe.ADD_PRINT_TEXTA("text03-"+KAe,EAe-WAe,XAe,_Ae,PAe,nme),WAe+=PAe+3}),UAe.fabricFeatureDescList&&[...UAe.fabricFeatureDescList].reverse().forEach((KAe,qAe)=>{const eme=Math.ceil(KAe.length/xAe)*PAe+(qAe>0?4:0);WAe+=eme,oAe.ADD_PRINT_TEXTA("text04-"+qAe,EAe-WAe+3,XAe,_Ae,eme," ● "),oAe.SET_PRINT_STYLEA(0,"FontSize",3),oAe.ADD_PRINT_TEXTA("text05-"+qAe,EAe-WAe,parseInt(XAe)+3+"mm",_Ae,eme,KAe)}),WAe+=JAe,UAe.fabricIntroduction&&UAe.fabricIntroduction.split(`
|
|
2181
2181
|
`).reverse().forEach((nme,KAe)=>{oAe.ADD_PRINT_TEXTA("text06-"+KAe,EAe-WAe,XAe,_Ae,PAe,nme),WAe+=PAe+3}),WAe+=JAe,UAe.fabricSeries=UAe.fabricSeries||UAe.name,UAe.fabricSeries&&UAe.fabricSeries.split(`
|
|
2182
2182
|
`).reverse().forEach((nme,KAe)=>{oAe.ADD_PRINT_TEXTA("text07-"+KAe,EAe-WAe,XAe,_Ae,PAe,nme),oAe.SET_PRINT_STYLEA(0,"FontSize",12),oAe.SET_PRINT_STYLEA(0,"Bold",1),WAe+=PAe+12})}function TAe(){ElMessageBox.prompt("",kh("设置横向偏移"),{customStyle:{width:"350px"},confirmButtonText:kh("确认"),cancelButtonText:kh("取消"),inputPattern:/^\d*$/,inputErrorMessage:kh("请输入数字"),inputPlaceholder:hAe.offset,buttonSize:"small",center:!0}).then(({value:UAe})=>{hAe.offset=(UAe||0)+"mm",localStorage.setItem("fabricHangTagPrintOffset",hAe.offset)}).catch(()=>{})}function BAe(){hAe.directionDialogVisible=!0}function FAe(){localStorage.setItem("fabricHangTagDirection",hAe.direction),hAe.directionDialogVisible=!1}function IAe(){isFontAvailable("CircularXX")&&isFontAvailable("CircularXX Medium")?(hAe.dialogState=!0,setTimeout(()=>{pAe.value.focus()},100)):ElMessageBox.alert(`
|
|
2183
|
-
<
|
|
2184
|
-
${kh("点击下载字体")}: <a href="${CircularXXMedium}" download="CircularXX-Medium.otf" target="_blank">CircularXX-Medium.otf</a><br />
|
|
2183
|
+
<p style="color: red; margin-bottom: 12px;">${kh("请安装字体,")} <span style="font-size: 16px; font-weight: bold; color: green;">${kh("安装后关闭所有浏览器窗口重新打开")}</span>。</p>
|
|
2185
2184
|
${kh("点击下载字体")}: <a href="${CircularXXRegular}" download="CircularXX-Regular.otf" target="_blank">CircularXX-Regular.otf</a>
|
|
2186
|
-
`,kh("
|
|
2185
|
+
`,kh("所需字体未安装"),{showConfirmButton:!1,dangerouslyUseHTMLString:!0}).catch(()=>{})}function kAe(){hAe.printCount=""}function VAe(){const UAe=document.createElement("style");UAe.innerHTML=`
|
|
2187
2186
|
@font-face {
|
|
2188
2187
|
font-family: 'CircularXX-Regular';
|
|
2189
2188
|
src: url(${CircularXXRegular});
|
|
@@ -2191,4 +2190,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2191
2190
|
@font-face {
|
|
2192
2191
|
font-family: 'CircularXX-Medium';
|
|
2193
2192
|
src: url(${CircularXXMedium});
|
|
2194
|
-
`,document.head.appendChild(XAe)}function HAe(){localStorage.setItem("fabricHangTagPrintType",hAe.printType)}return{t:kh,fabricHangTagNewRef:sAe,printCountRef:pAe,...vue$1.toRefs(hAe),show:gAe,close:CAe,print:wAe,confirm,setOffset:TAe,setDirection:BAe,confirmDirection:FAe,showDialog:IAe,closeDialog:kAe,changePrintType:HAe}}}),FabricHangTag_vue_vue_type_style_index_0_scoped_bc443ff9_lang="",_withScopeId$1=Ff=>(vue$1.pushScopeId("data-v-bc443ff9"),Ff=Ff(),vue$1.popScopeId(),Ff),_hoisted_1$1={style:{height:"max-content",display:"block"},class:"el-upload-list--picture-card"},_hoisted_2$1=_withScopeId$1(()=>vue$1.createElementVNode("span",{class:"point"},null,-1)),_hoisted_3$1={class:"el-upload-list__item-actions",style:{"z-index":"2","border-radius":"10px"}},_hoisted_4={class:"print-ele",ref:"printEle",style:{width:"192px",height:"288px",padding:"5px 10px","line-height":"9pt","font-family":"CircularXX-Regular",display:"flex","flex-direction":"column","justify-content":"flex-end"}},_hoisted_5=["innerHTML"],_hoisted_6={key:0,style:{height:"6pt"}},_hoisted_7=["innerHTML"],_hoisted_8={key:1,style:{height:"8pt"}},_hoisted_9={style:{margin:"8px 0"}},_hoisted_10=_withScopeId$1(()=>vue$1.createElementVNode("span",{style:{margin:"0 5px","font-size":"6px"}},"●",-1)),_hoisted_11=["innerHTML"],_hoisted_12={key:3,style:{height:"8pt"}},_hoisted_13={id:"barcode",style:{width:"100px"}},_hoisted_14={style:{position:"absolute",bottom:"22px",right:"30px"}},_hoisted_15={class:"dialog-footer"},_hoisted_16={class:"dialog-footer"};function _sfc_render$1(Ff,kh,tAe,oAe,sAe,pAe){var TAe,BAe,FAe;const hAe=vue$1.resolveComponent("ZoomIn"),gAe=ElIcon,AAe=__unplugin_components_1,CAe=ElRadioButton,wAe=ElRadioGroup,EAe=ElButton,_Ae=ElInputNumber,xAe=ElFormItem,DAe=ElForm,PAe=ElDialog,OAe=ElRadio;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.withDirectives(vue$1.createElementVNode("div",{class:vue$1.normalizeClass([Ff.zoomIn?"zoom-in":""]),onClick:kh[3]||(kh[3]=(...IAe)=>Ff.close&&Ff.close(...IAe))},[vue$1.createElementVNode("div",{onClick:kh[2]||(kh[2]=vue$1.withModifiers(()=>{},["stop"])),class:"container",style:{width:"max-content",background:"#e0e0e1",padding:"40px 10px 10px",color:"#000","font-size":"7pt","line-height":"7pt",display:"flex","flex-direction":"column","justify-content":"flex-end","border-radius":"10px",position:"relative","user-select":"none","word-break":"break-word"}},[vue$1.createElementVNode("div",_hoisted_1$1,[_hoisted_2$1,vue$1.createElementVNode("span",_hoisted_3$1,[vue$1.createVNode(gAe,{onClick:kh[0]||(kh[0]=IAe=>Ff.zoomIn=!0),style:{cursor:"pointer"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(hAe)]),_:1})]),vue$1.withDirectives(vue$1.createVNode(AAe,{ref:"fabricHangTagNewRef",data:Ff.data},null,8,["data"]),[[vue$1.vShow,Ff.printType=="new"]]),vue$1.withDirectives(vue$1.createElementVNode("div",_hoisted_4,[vue$1.createElementVNode("div",null,[vue$1.createElementVNode("p",{style:{"font-size":"17px","font-family":"CircularXX-Medium","margin-bottom":"5px","line-height":"20px"},innerHTML:(TAe=Ff.data.fabricSeries||Ff.data.name)==null?void 0:TAe.replace(/\n/g,"</br>")},null,8,_hoisted_5),Ff.data.friendlyReminder?vue$1.createCommentVNode("",!0):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_6)),vue$1.createElementVNode("p",{style:{margin:"5px 0"},innerHTML:(BAe=Ff.data.fabricIntroduction)==null?void 0:BAe.replace(/\n/g,"</br>")},null,8,_hoisted_7),Ff.data.friendlyReminder?vue$1.createCommentVNode("",!0):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_8)),vue$1.createElementVNode("ul",_hoisted_9,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.data.fabricFeatureDescList,IAe=>(vue$1.openBlock(),vue$1.createElementBlock("li",{key:IAe,style:{margin:"1pt 0",display:"flex","align-items":"center"}},[_hoisted_10,vue$1.createTextVNode(" "+vue$1.toDisplayString(IAe),1)]))),128))]),Ff.data.friendlyReminder?(vue$1.openBlock(),vue$1.createElementBlock("p",{key:2,style:{margin:"3pt 0"},innerHTML:(FAe=Ff.data.friendlyReminder)==null?void 0:FAe.replace(/\n/g,"</br>")},null,8,_hoisted_11)):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_12)),vue$1.withDirectives((vue$1.openBlock(),vue$1.createElementBlock("svg",_hoisted_13,null,512)),[[vue$1.vShow,Ff.data.barCodeId]]),vue$1.createElementVNode("span",_hoisted_14,vue$1.toDisplayString(Ff.data.code),1)])],512),[[vue$1.vShow,Ff.printType=="old"]])]),vue$1.createVNode(wAe,{modelValue:Ff.printType,"onUpdate:modelValue":kh[1]||(kh[1]=IAe=>Ff.printType=IAe),size:"small",onChange:Ff.changePrintType,style:{display:"flex","justify-content":"center",position:"absolute",top:"8px",left:"-2px","z-index":"3",transform:"scale(0.8)"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(CAe,{label:"new"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("新版")),1)]),_:1}),vue$1.createVNode(CAe,{label:"old"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("旧版")),1)]),_:1})]),_:1},8,["modelValue","onChange"]),Ff.showPrintButton?(vue$1.openBlock(),vue$1.createBlock(EAe,{key:0,class:"print-button",onClick:vue$1.withModifiers(Ff.showDialog,["stop"]),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("打印")),1)]),_:1},8,["onClick"])):vue$1.createCommentVNode("",!0)])],2),[[vue$1.vShow,Ff.isShow]]),vue$1.createVNode(PAe,{title:Ff.t("打印数量"),modelValue:Ff.dialogState,"onUpdate:modelValue":kh[6]||(kh[6]=IAe=>Ff.dialogState=IAe),width:"350px",center:"","close-on-click-modal":!1,onClose:Ff.closeDialog},{footer:vue$1.withCtx(()=>[vue$1.createElementVNode("span",_hoisted_15,[vue$1.createVNode(EAe,{onClick:kh[5]||(kh[5]=IAe=>Ff.dialogState=!1),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("取消")),1)]),_:1}),vue$1.createVNode(EAe,{type:"primary",onClick:Ff.print,size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确认")),1)]),_:1},8,["onClick"])])]),default:vue$1.withCtx(()=>[vue$1.createVNode(DAe,{"label-width":"20px"},{default:vue$1.withCtx(()=>[vue$1.createVNode(xAe,{label:" ",style:{"margin-bottom":"0"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(_Ae,{ref:"printCountRef",modelValue:Ff.printCount,"onUpdate:modelValue":kh[4]||(kh[4]=IAe=>Ff.printCount=IAe),min:1,precision:0,controls:!1,placeholder:Ff.t("请输入打印数量"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1}),vue$1.createVNode(xAe,{label:" "},{default:vue$1.withCtx(()=>[vue$1.createVNode(EAe,{onClick:Ff.setOffset,link:"",size:"small",style:{color:"#409eff"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("设置横向偏移")),1)]),_:1},8,["onClick"]),vue$1.createVNode(EAe,{onClick:Ff.setDirection,link:"",size:"small",style:{color:"#409eff"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("设置标签方向")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["title","modelValue","onClose"]),vue$1.createVNode(PAe,{title:Ff.t("设置标签方向"),modelValue:Ff.directionDialogVisible,"onUpdate:modelValue":kh[9]||(kh[9]=IAe=>Ff.directionDialogVisible=IAe),width:"350px",center:"","close-on-click-modal":!1},{footer:vue$1.withCtx(()=>[vue$1.createElementVNode("span",_hoisted_16,[vue$1.createVNode(EAe,{onClick:kh[8]||(kh[8]=IAe=>Ff.directionDialogVisible=!1),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("取消")),1)]),_:1}),vue$1.createVNode(EAe,{type:"primary",onClick:Ff.confirmDirection,size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确定")),1)]),_:1},8,["onClick"])])]),default:vue$1.withCtx(()=>[vue$1.createVNode(wAe,{modelValue:Ff.direction,"onUpdate:modelValue":kh[7]||(kh[7]=IAe=>Ff.direction=IAe),style:{display:"flex","justify-content":"center",height:"74px"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(OAe,{label:"1"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("纵向")),1)]),_:1}),vue$1.createVNode(OAe,{label:"2"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("横向")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])],64)}const FabricHangTag=_export_sfc$1(_sfc_main$1,[["render",_sfc_render$1],["__scopeId","data-v-bc443ff9"]]);FabricHangTag.install=Ff=>Ff.component(FabricHangTag.name,FabricHangTag),AgTable.install=Ff=>Ff.component(AgTable.name,AgTable);const _sfc_main=vue$1.defineComponent({name:"UploadDownloadCenter",setup(){let Ff=!1;const kh=vue$1.computed(()=>store.state.uploadDownloadDialogVisible);let tAe=null;const oAe=()=>{tAe=window.setInterval(hAe,5e3)},sAe=()=>{tAe&&clearInterval(tAe),tAe=null,store.commit("setUploadDownloadDialogVisible",!1),Ff=!1},pAe=vue$1.reactive({pageKey:"UploadDownloadCenter",components:[{type:"AgTable",key:"table",url:"/export-service/common-task/page",method:"POST",columns:AAe(),data:{resultKey:"records",totalKey:"total"},configFlag:{sizeColumnsToFit:!0}}]});function hAe(){setTimeout(()=>{queryData(store,pAe.pageKey,"table")},1e3)}const gAe=()=>{Ff||(hAe(),oAe(),Ff=!0)};function AAe(){return[{field:"typeName",headerName:"类型",width:100},{field:"fileName",headerName:"文件名",width:200,cellRenderer:({data:kAe})=>kAe.fileUrl?`<a href="${kAe.fileUrl}" target="_blank">${kAe.fileName}</a>`:kAe.fileName},{field:"taskStatusName",headerName:"状态",width:120,cellRenderer:({data:kAe})=>`<span style="color: ${{0:"#909399",1:"#67C23A",2:"#409EFF",3:"#409EFF",4:"#67C23A",5:"#F56C6C","-1":"#F56C6C"}[kAe.taskStatus]||"#909399"}">${kAe.taskStatusName}</span>`},{field:"failReason",headerName:"备注",width:200,cellRenderer:({data:kAe})=>kAe.failFileUrl?`<a href="${kAe.failFileUrl}" target="_blank">${kAe.failReason}</a>`:kAe.failReason},{field:"createdAt",headerName:"操作时间",width:180},{field:"createdUserName",headerName:"操作人",width:120}]}const CAe=vue$1.ref(null),wAe=vue$1.reactive({x:0,y:0});let EAe=!1,_Ae=0,xAe=0,DAe=0,PAe=0;const OAe=kAe=>{CAe.value&&(EAe=!0,_Ae=kAe.clientX,xAe=kAe.clientY,DAe=wAe.x,PAe=wAe.y,document.addEventListener("mousemove",TAe),document.addEventListener("mouseup",BAe))},TAe=kAe=>{if(!EAe||!CAe.value)return;const VAe=kAe.clientX-_Ae,HAe=kAe.clientY-xAe;let UAe=DAe+VAe,XAe=PAe+HAe;const JAe=CAe.value.offsetWidth,WAe=CAe.value.offsetHeight;UAe=Math.max(0,Math.min(window.innerWidth-JAe,UAe)),XAe=Math.max(0,Math.min(window.innerHeight-WAe,XAe)),wAe.x=UAe,wAe.y=XAe},BAe=()=>{if(!CAe.value)return;EAe=!1,document.removeEventListener("mousemove",TAe),document.removeEventListener("mouseup",BAe);const kAe=CAe.value.offsetWidth,VAe=wAe.x,HAe=window.innerWidth-(wAe.x+kAe);CAe.value.style.transition="all 0.2s ease-out",VAe<HAe?wAe.x=0:wAe.x=window.innerWidth-kAe;const UAe=CAe.value.offsetHeight;wAe.y=Math.max(0,Math.min(window.innerHeight-UAe,wAe.y)),setTimeout(()=>{CAe.value&&(CAe.value.style.transition="")},300)},FAe=()=>{if(!CAe.value)return;const kAe=CAe.value.offsetWidth,VAe=CAe.value.offsetHeight;wAe.x=window.innerWidth-kAe,wAe.y=window.innerHeight-VAe-30};return vue$1.onMounted(()=>{window.addEventListener("resize",FAe),vue$1.nextTick(()=>{if(CAe.value){const kAe=CAe.value.offsetWidth,VAe=CAe.value.offsetHeight;wAe.x=window.innerWidth-kAe,wAe.y=window.innerHeight-VAe-30}})}),{pageConfigData:pAe,getData:hAe,dialogVisible:kh,handleOpenDialog:gAe,dragButton:CAe,buttonPosition:wAe,startDrag:OAe,handleMouseDown:kAe=>{const VAe=new Date().getTime();OAe(kAe);const HAe=UAe=>{BAe();const XAe=new Date().getTime(),JAe=Math.sqrt(Math.pow(UAe.clientX-_Ae,2)+Math.pow(UAe.clientY-xAe,2));XAe-VAe<200&&JAe<5&&store.commit("setUploadDownloadDialogVisible",!0)};document.addEventListener("mouseup",HAe,{once:!0})},stopPolling:sAe}}}),UploadDownloadCenter_vue_vue_type_style_index_0_scoped_4d249b38_lang="",UploadDownloadCenter_vue_vue_type_style_index_1_lang="",_withScopeId=Ff=>(vue$1.pushScopeId("data-v-4d249b38"),Ff=Ff(),vue$1.popScopeId(),Ff),_hoisted_1=_withScopeId(()=>vue$1.createElementVNode("p",{class:"drag-button-text"},"上传\\下载",-1)),_hoisted_2=[_hoisted_1],_hoisted_3={style:{height:"72vh"}};function _sfc_render(Ff,kh,tAe,oAe,sAe,pAe){const hAe=Page,gAe=ElDialog;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.createElementVNode("div",{class:"drag-button",ref:"dragButton",onMousedown:kh[0]||(kh[0]=(...AAe)=>Ff.handleMouseDown&&Ff.handleMouseDown(...AAe)),style:vue$1.normalizeStyle({left:Ff.buttonPosition.x+"px",top:Ff.buttonPosition.y+"px"})},_hoisted_2,36),vue$1.createVNode(gAe,{class:"upload-download-center-dialog",title:"上传/下载中心",modelValue:Ff.dialogVisible,"onUpdate:modelValue":kh[1]||(kh[1]=AAe=>Ff.dialogVisible=AAe),width:"80%","destroy-on-close":!0,top:"6vh",center:"",onOpen:Ff.handleOpenDialog,onClose:Ff.stopPolling},{default:vue$1.withCtx(()=>[vue$1.createElementVNode("div",_hoisted_3,[vue$1.createVNode(hAe,{pageConfigData:Ff.pageConfigData},null,8,["pageConfigData"])])]),_:1},8,["modelValue","onOpen","onClose"])],64)}const UploadDownloadCenter=_export_sfc$1(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-4d249b38"]]);UploadDownloadCenter.install=Ff=>Ff.component(UploadDownloadCenter.name,UploadDownloadCenter);let timer=null,staticResourceMonitor=2e3,apiRequestThreshold=3e3;const userInfo=JSON.parse(localStorage.getItem("userInfo")||"{}"),username=userInfo.name||userInfo.displayName||"",PERFORMANCE_SERVER_URL="https://performance-monitor.prod.doublefs.com/api/performance";function reportPerformanceData(Ff){try{const kh=encodeURIComponent(JSON.stringify({url:window.location.href,timestamp:Date.now(),username,...Ff})),tAe=new Image;tAe.src=`${PERFORMANCE_SERVER_URL}?data=${kh}`,tAe.style.display="none",tAe.onload=()=>{console.log("性能数据上报成功"),document.body.removeChild(tAe)},tAe.onerror=oAe=>{console.error("性能数据上报失败",oAe),document.body.removeChild(tAe)},document.body.appendChild(tAe)}catch(kh){console.error("上报性能数据失败:",kh)}}const analyzeResourceLoadTime=()=>{if(!window.performance||!window.performance.getEntriesByType){console.warn("Performance API不可用,无法分析资源加载时间");return}const Ff=window.performance.getEntriesByType("resource"),kh=[],tAe=[],oAe=[],sAe=[];if(Ff.filter(hAe=>!hAe.isReport).forEach(hAe=>{hAe.isReport=!0;const gAe=hAe.name.toLowerCase();gAe.endsWith(".css")||hAe.initiatorType==="css"||hAe.initiatorType==="link"?hAe.duration>staticResourceMonitor&&tAe.push(hAe):gAe.endsWith(".js")||hAe.initiatorType==="script"?hAe.duration>staticResourceMonitor&&kh.push(hAe):hAe.initiatorType==="img"?hAe.duration>staticResourceMonitor&&sAe.push(hAe):(hAe.initiatorType==="xmlhttprequest"||hAe.initiatorType==="fetch")&&hAe.duration>apiRequestThreshold&&oAe.push(hAe)}),kh.length>0&&(console.log(`检测到${kh.length}个JS资源加载时间超过${staticResourceMonitor}ms:`),kh.forEach(hAe=>{console.log(`- JS: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),tAe.length>0&&(console.log(`检测到${tAe.length}个CSS资源加载时间超过${staticResourceMonitor}ms:`),tAe.forEach(hAe=>{console.log(`- CSS: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),sAe.length>0&&(console.log(`检测到${sAe.length}个图片资源加载时间超过${staticResourceMonitor}ms:`),sAe.forEach(hAe=>{console.log(`- 图片: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),oAe.length>0&&(console.log(`检测到${oAe.length}个API请求时间超过${apiRequestThreshold}ms:`),oAe.forEach(hAe=>{console.log(`- API: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),kh.length>0||tAe.length>0||oAe.length>0||sAe.length>0){const hAe={jsResources:kh.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),cssResources:tAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),apiResources:oAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),imgResources:sAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType}))};reportPerformanceData(hAe)}return{jsResources:kh,cssResources:tAe,apiResources:oAe,imgResources:sAe}},initPerformanceMonitor=(Ff=1e3,kh=3e3)=>{staticResourceMonitor=Ff,apiRequestThreshold=kh,window.addEventListener("load",()=>{clearTimeout(timer),timer=setTimeout(()=>{analyzeResourceLoadTime()},5e3)}),service.interceptors.request.use(tAe=>(clearTimeout(timer),timer=setTimeout(()=>{analyzeResourceLoadTime()},5e3),tAe),tAe=>Promise.reject(tAe.data))},index=(Ff,kh)=>{var oAe,sAe;kh.env||console.error('缺少环境变量,请在main.ts中注册"DfsPageConfig"时配置env【app.use(DfsPageConfig, {..., env: {"VITE_NODE_ENV":"production","VITE_APP_API":"https://gateway-c4.doublefs.com","BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}})】'),["getters","_actions"].forEach(pAe=>{Object.keys(store[pAe]).forEach(hAe=>{kh.store[pAe][hAe]=store[pAe][hAe]})}),kh.store._mutations&&(kh.store._mutations.setUploadDownloadDialogVisible=store._mutations.setUploadDownloadDialogVisible),store.commit("saveUrl",kh.baseUrl),store.commit("saveLocale",kh.locale),store.commit("saveEnv",kh.env),kh.store.state._CONFIG_DATA=store.state._CONFIG_DATA,kh.store.state._BASE_URL=kh.baseUrl,store._mutations.setLoading=kh.store._mutations.setLoading,install(Ff),Ff.component("DfsPageConfig",Page);const tAe=()=>({t:pAe=>pAe});Ff.config.globalProperties.useI18n=kh.useI18n||tAe,kh.monitorConfig&&((sAe=(oAe=kh.env)==null?void 0:oAe.VITE_NODE_ENV)==null?void 0:sAe.indexOf("prod"))>-1&&initPerformanceMonitor(kh.monitorConfig.staticResourceMonitor,kh.monitorConfig.apiRequestThreshold),kh.isSendSensors&&sensors$1(kh.env,kh.project_name),kh.watermark&&watermark.init()};exports.AgTable=AgTable,exports.CellSelect=_sfc_main$3,exports.Dialog=Dialog,exports.EleTable=EleTable,exports.FabricHangTag=FabricHangTag,exports.Form=Form,exports.SearchMenu=SearchMenu,exports.Upload=Upload,exports.UploadComp=UploadComp,exports.UploadDownloadCenter=UploadDownloadCenter,exports.default=index,exports.getLodopObj=getLodopObj,exports.getTargetComp=getTargetComp,exports.handleProxy=handleProxy,exports.queryData=queryData,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2193
|
+
`,document.head.appendChild(XAe)}function HAe(){localStorage.setItem("fabricHangTagPrintType",hAe.printType)}return{t:kh,fabricHangTagNewRef:sAe,printCountRef:pAe,...vue$1.toRefs(hAe),show:gAe,close:CAe,print:wAe,confirm,setOffset:TAe,setDirection:BAe,confirmDirection:FAe,showDialog:IAe,closeDialog:kAe,changePrintType:HAe}}}),FabricHangTag_vue_vue_type_style_index_0_scoped_36337c57_lang="",_withScopeId$1=Ff=>(vue$1.pushScopeId("data-v-36337c57"),Ff=Ff(),vue$1.popScopeId(),Ff),_hoisted_1$1={style:{height:"max-content",display:"block"},class:"el-upload-list--picture-card"},_hoisted_2$1=_withScopeId$1(()=>vue$1.createElementVNode("span",{class:"point"},null,-1)),_hoisted_3$1={class:"el-upload-list__item-actions",style:{"z-index":"2","border-radius":"10px"}},_hoisted_4={class:"print-ele",ref:"printEle",style:{width:"192px",height:"288px",padding:"5px 10px","line-height":"9pt","font-family":"CircularXX-Regular",display:"flex","flex-direction":"column","justify-content":"flex-end"}},_hoisted_5=["innerHTML"],_hoisted_6={key:0,style:{height:"6pt"}},_hoisted_7=["innerHTML"],_hoisted_8={key:1,style:{height:"8pt"}},_hoisted_9={style:{margin:"8px 0"}},_hoisted_10=_withScopeId$1(()=>vue$1.createElementVNode("span",{style:{margin:"0 5px","font-size":"6px"}},"●",-1)),_hoisted_11=["innerHTML"],_hoisted_12={key:3,style:{height:"8pt"}},_hoisted_13={id:"barcode",style:{width:"100px"}},_hoisted_14={style:{position:"absolute",bottom:"22px",right:"30px"}},_hoisted_15={class:"dialog-footer"},_hoisted_16={class:"dialog-footer"};function _sfc_render$1(Ff,kh,tAe,oAe,sAe,pAe){var TAe,BAe,FAe;const hAe=vue$1.resolveComponent("ZoomIn"),gAe=ElIcon,AAe=__unplugin_components_1,CAe=ElRadioButton,wAe=ElRadioGroup,EAe=ElButton,_Ae=ElInputNumber,xAe=ElFormItem,DAe=ElForm,PAe=ElDialog,OAe=ElRadio;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.withDirectives(vue$1.createElementVNode("div",{class:vue$1.normalizeClass([Ff.zoomIn?"zoom-in":""]),onClick:kh[3]||(kh[3]=(...IAe)=>Ff.close&&Ff.close(...IAe))},[vue$1.createElementVNode("div",{onClick:kh[2]||(kh[2]=vue$1.withModifiers(()=>{},["stop"])),class:"container",style:{width:"max-content",background:"#e0e0e1",padding:"40px 10px 10px",color:"#000","font-size":"7pt","line-height":"7pt",display:"flex","flex-direction":"column","justify-content":"flex-end","border-radius":"10px",position:"relative","user-select":"none","word-break":"break-word"}},[vue$1.createElementVNode("div",_hoisted_1$1,[_hoisted_2$1,vue$1.createElementVNode("span",_hoisted_3$1,[vue$1.createVNode(gAe,{onClick:kh[0]||(kh[0]=IAe=>Ff.zoomIn=!0),style:{cursor:"pointer"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(hAe)]),_:1})]),vue$1.withDirectives(vue$1.createVNode(AAe,{ref:"fabricHangTagNewRef",data:Ff.data},null,8,["data"]),[[vue$1.vShow,Ff.printType=="new"]]),vue$1.withDirectives(vue$1.createElementVNode("div",_hoisted_4,[vue$1.createElementVNode("div",null,[vue$1.createElementVNode("p",{style:{"font-size":"17px","font-family":"CircularXX-Medium","margin-bottom":"5px","line-height":"20px"},innerHTML:(TAe=Ff.data.fabricSeries||Ff.data.name)==null?void 0:TAe.replace(/\n/g,"</br>")},null,8,_hoisted_5),Ff.data.friendlyReminder?vue$1.createCommentVNode("",!0):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_6)),vue$1.createElementVNode("p",{style:{margin:"5px 0"},innerHTML:(BAe=Ff.data.fabricIntroduction)==null?void 0:BAe.replace(/\n/g,"</br>")},null,8,_hoisted_7),Ff.data.friendlyReminder?vue$1.createCommentVNode("",!0):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_8)),vue$1.createElementVNode("ul",_hoisted_9,[(vue$1.openBlock(!0),vue$1.createElementBlock(vue$1.Fragment,null,vue$1.renderList(Ff.data.fabricFeatureDescList,IAe=>(vue$1.openBlock(),vue$1.createElementBlock("li",{key:IAe,style:{margin:"1pt 0",display:"flex","align-items":"center"}},[_hoisted_10,vue$1.createTextVNode(" "+vue$1.toDisplayString(IAe),1)]))),128))]),Ff.data.friendlyReminder?(vue$1.openBlock(),vue$1.createElementBlock("p",{key:2,style:{margin:"3pt 0"},innerHTML:(FAe=Ff.data.friendlyReminder)==null?void 0:FAe.replace(/\n/g,"</br>")},null,8,_hoisted_11)):(vue$1.openBlock(),vue$1.createElementBlock("p",_hoisted_12)),vue$1.withDirectives((vue$1.openBlock(),vue$1.createElementBlock("svg",_hoisted_13,null,512)),[[vue$1.vShow,Ff.data.barCodeId]]),vue$1.createElementVNode("span",_hoisted_14,vue$1.toDisplayString(Ff.data.code),1)])],512),[[vue$1.vShow,Ff.printType=="old"]])]),vue$1.createVNode(wAe,{modelValue:Ff.printType,"onUpdate:modelValue":kh[1]||(kh[1]=IAe=>Ff.printType=IAe),size:"small",onChange:Ff.changePrintType,style:{display:"flex","justify-content":"center",position:"absolute",top:"8px",left:"-2px","z-index":"3",transform:"scale(0.8)"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(CAe,{label:"new"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("新版")),1)]),_:1}),vue$1.createVNode(CAe,{label:"old"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("旧版")),1)]),_:1})]),_:1},8,["modelValue","onChange"]),Ff.showPrintButton?(vue$1.openBlock(),vue$1.createBlock(EAe,{key:0,class:"print-button",onClick:vue$1.withModifiers(Ff.showDialog,["stop"]),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("打印")),1)]),_:1},8,["onClick"])):vue$1.createCommentVNode("",!0)])],2),[[vue$1.vShow,Ff.isShow]]),vue$1.createVNode(PAe,{title:Ff.t("打印数量"),modelValue:Ff.dialogState,"onUpdate:modelValue":kh[6]||(kh[6]=IAe=>Ff.dialogState=IAe),width:"350px",center:"","close-on-click-modal":!1,onClose:Ff.closeDialog},{footer:vue$1.withCtx(()=>[vue$1.createElementVNode("span",_hoisted_15,[vue$1.createVNode(EAe,{onClick:kh[5]||(kh[5]=IAe=>Ff.dialogState=!1),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("取消")),1)]),_:1}),vue$1.createVNode(EAe,{type:"primary",onClick:Ff.print,size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确认")),1)]),_:1},8,["onClick"])])]),default:vue$1.withCtx(()=>[vue$1.createVNode(DAe,{"label-width":"20px"},{default:vue$1.withCtx(()=>[vue$1.createVNode(xAe,{label:" ",style:{"margin-bottom":"0"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(_Ae,{ref:"printCountRef",modelValue:Ff.printCount,"onUpdate:modelValue":kh[4]||(kh[4]=IAe=>Ff.printCount=IAe),min:1,precision:0,controls:!1,placeholder:Ff.t("请输入打印数量"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1}),vue$1.createVNode(xAe,{label:" "},{default:vue$1.withCtx(()=>[vue$1.createVNode(EAe,{onClick:Ff.setOffset,link:"",size:"small",style:{color:"#409eff"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("设置横向偏移")),1)]),_:1},8,["onClick"]),vue$1.createVNode(EAe,{onClick:Ff.setDirection,link:"",size:"small",style:{color:"#409eff"}},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("设置标签方向")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["title","modelValue","onClose"]),vue$1.createVNode(PAe,{title:Ff.t("设置标签方向"),modelValue:Ff.directionDialogVisible,"onUpdate:modelValue":kh[9]||(kh[9]=IAe=>Ff.directionDialogVisible=IAe),width:"350px",center:"","close-on-click-modal":!1},{footer:vue$1.withCtx(()=>[vue$1.createElementVNode("span",_hoisted_16,[vue$1.createVNode(EAe,{onClick:kh[8]||(kh[8]=IAe=>Ff.directionDialogVisible=!1),size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("取消")),1)]),_:1}),vue$1.createVNode(EAe,{type:"primary",onClick:Ff.confirmDirection,size:"small"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("确定")),1)]),_:1},8,["onClick"])])]),default:vue$1.withCtx(()=>[vue$1.createVNode(wAe,{modelValue:Ff.direction,"onUpdate:modelValue":kh[7]||(kh[7]=IAe=>Ff.direction=IAe),style:{display:"flex","justify-content":"center",height:"74px"}},{default:vue$1.withCtx(()=>[vue$1.createVNode(OAe,{label:"1"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("纵向")),1)]),_:1}),vue$1.createVNode(OAe,{label:"2"},{default:vue$1.withCtx(()=>[vue$1.createTextVNode(vue$1.toDisplayString(Ff.t("横向")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])],64)}const FabricHangTag=_export_sfc$1(_sfc_main$1,[["render",_sfc_render$1],["__scopeId","data-v-36337c57"]]);FabricHangTag.install=Ff=>Ff.component(FabricHangTag.name,FabricHangTag),AgTable.install=Ff=>Ff.component(AgTable.name,AgTable);const _sfc_main=vue$1.defineComponent({name:"UploadDownloadCenter",setup(){let Ff=!1;const kh=vue$1.computed(()=>store.state.uploadDownloadDialogVisible);let tAe=null;const oAe=()=>{tAe=window.setInterval(hAe,5e3)},sAe=()=>{tAe&&clearInterval(tAe),tAe=null,store.commit("setUploadDownloadDialogVisible",!1),Ff=!1},pAe=vue$1.reactive({pageKey:"UploadDownloadCenter",components:[{type:"AgTable",key:"table",url:"/export-service/common-task/page",method:"POST",columns:AAe(),data:{resultKey:"records",totalKey:"total"},configFlag:{sizeColumnsToFit:!0}}]});function hAe(){setTimeout(()=>{queryData(store,pAe.pageKey,"table")},1e3)}const gAe=()=>{Ff||(hAe(),oAe(),Ff=!0)};function AAe(){return[{field:"typeName",headerName:"类型",width:100},{field:"fileName",headerName:"文件名",width:200,cellRenderer:({data:kAe})=>kAe.fileUrl?`<a href="${kAe.fileUrl}" target="_blank">${kAe.fileName}</a>`:kAe.fileName},{field:"taskStatusName",headerName:"状态",width:120,cellRenderer:({data:kAe})=>`<span style="color: ${{0:"#909399",1:"#67C23A",2:"#409EFF",3:"#409EFF",4:"#67C23A",5:"#F56C6C","-1":"#F56C6C"}[kAe.taskStatus]||"#909399"}">${kAe.taskStatusName}</span>`},{field:"failReason",headerName:"备注",width:200,cellRenderer:({data:kAe})=>kAe.failFileUrl?`<a href="${kAe.failFileUrl}" target="_blank">${kAe.failReason}</a>`:kAe.failReason},{field:"createdAt",headerName:"操作时间",width:180},{field:"createdUserName",headerName:"操作人",width:120}]}const CAe=vue$1.ref(null),wAe=vue$1.reactive({x:0,y:0});let EAe=!1,_Ae=0,xAe=0,DAe=0,PAe=0;const OAe=kAe=>{CAe.value&&(EAe=!0,_Ae=kAe.clientX,xAe=kAe.clientY,DAe=wAe.x,PAe=wAe.y,document.addEventListener("mousemove",TAe),document.addEventListener("mouseup",BAe))},TAe=kAe=>{if(!EAe||!CAe.value)return;const VAe=kAe.clientX-_Ae,HAe=kAe.clientY-xAe;let UAe=DAe+VAe,XAe=PAe+HAe;const JAe=CAe.value.offsetWidth,WAe=CAe.value.offsetHeight;UAe=Math.max(0,Math.min(window.innerWidth-JAe,UAe)),XAe=Math.max(0,Math.min(window.innerHeight-WAe,XAe)),wAe.x=UAe,wAe.y=XAe},BAe=()=>{if(!CAe.value)return;EAe=!1,document.removeEventListener("mousemove",TAe),document.removeEventListener("mouseup",BAe);const kAe=CAe.value.offsetWidth,VAe=wAe.x,HAe=window.innerWidth-(wAe.x+kAe);CAe.value.style.transition="all 0.2s ease-out",VAe<HAe?wAe.x=0:wAe.x=window.innerWidth-kAe;const UAe=CAe.value.offsetHeight;wAe.y=Math.max(0,Math.min(window.innerHeight-UAe,wAe.y)),setTimeout(()=>{CAe.value&&(CAe.value.style.transition="")},300)},FAe=()=>{if(!CAe.value)return;const kAe=CAe.value.offsetWidth,VAe=CAe.value.offsetHeight;wAe.x=window.innerWidth-kAe,wAe.y=window.innerHeight-VAe-30};return vue$1.onMounted(()=>{window.addEventListener("resize",FAe),vue$1.nextTick(()=>{if(CAe.value){const kAe=CAe.value.offsetWidth,VAe=CAe.value.offsetHeight;wAe.x=window.innerWidth-kAe,wAe.y=window.innerHeight-VAe-30}})}),{pageConfigData:pAe,getData:hAe,dialogVisible:kh,handleOpenDialog:gAe,dragButton:CAe,buttonPosition:wAe,startDrag:OAe,handleMouseDown:kAe=>{const VAe=new Date().getTime();OAe(kAe);const HAe=UAe=>{BAe();const XAe=new Date().getTime(),JAe=Math.sqrt(Math.pow(UAe.clientX-_Ae,2)+Math.pow(UAe.clientY-xAe,2));XAe-VAe<200&&JAe<5&&store.commit("setUploadDownloadDialogVisible",!0)};document.addEventListener("mouseup",HAe,{once:!0})},stopPolling:sAe}}}),UploadDownloadCenter_vue_vue_type_style_index_0_scoped_4d249b38_lang="",UploadDownloadCenter_vue_vue_type_style_index_1_lang="",_withScopeId=Ff=>(vue$1.pushScopeId("data-v-4d249b38"),Ff=Ff(),vue$1.popScopeId(),Ff),_hoisted_1=_withScopeId(()=>vue$1.createElementVNode("p",{class:"drag-button-text"},"上传\\下载",-1)),_hoisted_2=[_hoisted_1],_hoisted_3={style:{height:"72vh"}};function _sfc_render(Ff,kh,tAe,oAe,sAe,pAe){const hAe=Page,gAe=ElDialog;return vue$1.openBlock(),vue$1.createElementBlock(vue$1.Fragment,null,[vue$1.createElementVNode("div",{class:"drag-button",ref:"dragButton",onMousedown:kh[0]||(kh[0]=(...AAe)=>Ff.handleMouseDown&&Ff.handleMouseDown(...AAe)),style:vue$1.normalizeStyle({left:Ff.buttonPosition.x+"px",top:Ff.buttonPosition.y+"px"})},_hoisted_2,36),vue$1.createVNode(gAe,{class:"upload-download-center-dialog",title:"上传/下载中心",modelValue:Ff.dialogVisible,"onUpdate:modelValue":kh[1]||(kh[1]=AAe=>Ff.dialogVisible=AAe),width:"80%","destroy-on-close":!0,top:"6vh",center:"",onOpen:Ff.handleOpenDialog,onClose:Ff.stopPolling},{default:vue$1.withCtx(()=>[vue$1.createElementVNode("div",_hoisted_3,[vue$1.createVNode(hAe,{pageConfigData:Ff.pageConfigData},null,8,["pageConfigData"])])]),_:1},8,["modelValue","onOpen","onClose"])],64)}const UploadDownloadCenter=_export_sfc$1(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-4d249b38"]]);UploadDownloadCenter.install=Ff=>Ff.component(UploadDownloadCenter.name,UploadDownloadCenter);let timer=null,staticResourceMonitor=2e3,apiRequestThreshold=3e3;const userInfo=JSON.parse(localStorage.getItem("userInfo")||"{}"),username=userInfo.name||userInfo.displayName||"",PERFORMANCE_SERVER_URL="https://performance-monitor.prod.doublefs.com/api/performance";function reportPerformanceData(Ff){try{const kh=encodeURIComponent(JSON.stringify({url:window.location.href,timestamp:Date.now(),username,...Ff})),tAe=new Image;tAe.src=`${PERFORMANCE_SERVER_URL}?data=${kh}`,tAe.style.display="none",tAe.onload=()=>{console.log("性能数据上报成功"),document.body.removeChild(tAe)},tAe.onerror=oAe=>{console.error("性能数据上报失败",oAe),document.body.removeChild(tAe)},document.body.appendChild(tAe)}catch(kh){console.error("上报性能数据失败:",kh)}}const analyzeResourceLoadTime=()=>{if(!window.performance||!window.performance.getEntriesByType){console.warn("Performance API不可用,无法分析资源加载时间");return}const Ff=window.performance.getEntriesByType("resource"),kh=[],tAe=[],oAe=[],sAe=[];if(Ff.filter(hAe=>!hAe.isReport).forEach(hAe=>{hAe.isReport=!0;const gAe=hAe.name.toLowerCase();gAe.endsWith(".css")||hAe.initiatorType==="css"||hAe.initiatorType==="link"?hAe.duration>staticResourceMonitor&&tAe.push(hAe):gAe.endsWith(".js")||hAe.initiatorType==="script"?hAe.duration>staticResourceMonitor&&kh.push(hAe):hAe.initiatorType==="img"?hAe.duration>staticResourceMonitor&&sAe.push(hAe):(hAe.initiatorType==="xmlhttprequest"||hAe.initiatorType==="fetch")&&hAe.duration>apiRequestThreshold&&oAe.push(hAe)}),kh.length>0&&(console.log(`检测到${kh.length}个JS资源加载时间超过${staticResourceMonitor}ms:`),kh.forEach(hAe=>{console.log(`- JS: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),tAe.length>0&&(console.log(`检测到${tAe.length}个CSS资源加载时间超过${staticResourceMonitor}ms:`),tAe.forEach(hAe=>{console.log(`- CSS: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),sAe.length>0&&(console.log(`检测到${sAe.length}个图片资源加载时间超过${staticResourceMonitor}ms:`),sAe.forEach(hAe=>{console.log(`- 图片: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),oAe.length>0&&(console.log(`检测到${oAe.length}个API请求时间超过${apiRequestThreshold}ms:`),oAe.forEach(hAe=>{console.log(`- API: ${hAe.name}: ${(hAe.duration/1e3).toFixed(2)}s`)})),kh.length>0||tAe.length>0||oAe.length>0||sAe.length>0){const hAe={jsResources:kh.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),cssResources:tAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),apiResources:oAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType})),imgResources:sAe.map(gAe=>({name:gAe.name,duration:gAe.duration,initiatorType:gAe.initiatorType}))};reportPerformanceData(hAe)}return{jsResources:kh,cssResources:tAe,apiResources:oAe,imgResources:sAe}},initPerformanceMonitor=(Ff=1e3,kh=3e3)=>{staticResourceMonitor=Ff,apiRequestThreshold=kh,window.addEventListener("load",()=>{clearTimeout(timer),timer=setTimeout(()=>{analyzeResourceLoadTime()},5e3)}),service.interceptors.request.use(tAe=>(clearTimeout(timer),timer=setTimeout(()=>{analyzeResourceLoadTime()},5e3),tAe),tAe=>Promise.reject(tAe.data))},index=(Ff,kh)=>{var oAe,sAe;kh.env||console.error('缺少环境变量,请在main.ts中注册"DfsPageConfig"时配置env【app.use(DfsPageConfig, {..., env: {"VITE_NODE_ENV":"production","VITE_APP_API":"https://gateway-c4.doublefs.com","BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}})】'),["getters","_actions"].forEach(pAe=>{Object.keys(store[pAe]).forEach(hAe=>{kh.store[pAe][hAe]=store[pAe][hAe]})}),kh.store._mutations&&(kh.store._mutations.setUploadDownloadDialogVisible=store._mutations.setUploadDownloadDialogVisible),store.commit("saveUrl",kh.baseUrl),store.commit("saveLocale",kh.locale),store.commit("saveEnv",kh.env),kh.store.state._CONFIG_DATA=store.state._CONFIG_DATA,kh.store.state._BASE_URL=kh.baseUrl,store._mutations.setLoading=kh.store._mutations.setLoading,install(Ff),Ff.component("DfsPageConfig",Page);const tAe=()=>({t:pAe=>pAe});Ff.config.globalProperties.useI18n=kh.useI18n||tAe,kh.monitorConfig&&((sAe=(oAe=kh.env)==null?void 0:oAe.VITE_NODE_ENV)==null?void 0:sAe.indexOf("prod"))>-1&&initPerformanceMonitor(kh.monitorConfig.staticResourceMonitor,kh.monitorConfig.apiRequestThreshold),kh.isSendSensors&&sensors$1(kh.env,kh.project_name),kh.watermark&&watermark.init()};exports.AgTable=AgTable,exports.CellSelect=_sfc_main$3,exports.Dialog=Dialog,exports.EleTable=EleTable,exports.FabricHangTag=FabricHangTag,exports.Form=Form,exports.SearchMenu=SearchMenu,exports.Upload=Upload,exports.UploadComp=UploadComp,exports.UploadDownloadCenter=UploadDownloadCenter,exports.default=index,exports.getLodopObj=getLodopObj,exports.getTargetComp=getTargetComp,exports.handleProxy=handleProxy,exports.queryData=queryData,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|