HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/index-legacy-ec2601c7.js
System.register(["./hook-legacy-6819754d.js","./message-legacy-10af7c73.js","./handsontable.full-legacy-8a142e06.js","./vue-router-legacy-a12307c3.js","./index-legacy-212fb97f.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./_plugin-vue_export-helper-legacy-762b7923.js","./lowcode-legacy-6cedbfd4.js","./utils-legacy-c0023c33.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js"],(function(e,l){"use strict";var t,a,n,i,u,o,s,r,d,c,v,m,f,p,h,y,g,_,x,b,C=document.createElement("style");return C.textContent=".el-dialog[data-v-978fe420]{z-index:1000!important}.htContextMenu[data-v-978fe420]:not(.htGhostTable){z-index:2060!important}\n",document.head.appendChild(C),{setters:[e=>{t=e.useExcelloader},e=>{a=e.be},e=>{n=e.H},e=>{i=e.d},e=>{u=e.E},e=>{o=e.d,s=e.r,r=e.o,d=e.w,c=e.Q,v=e.e,m=e.f,f=e.g,p=e.y,h=e.m,y=e.u,g=e.v,_=e.b5,x=e.b4},e=>{b=e._},null,null,null,null,null,null],execute:function(){const l=e=>(_("data-v-978fe420"),e=e(),x(),e),C={class:"w-full h-full !m-0"},j={class:"!m-0"},E=l((()=>f("h1",null,"XLS数据导入",-1))),w=l((()=>f("div",{id:"xls_table"},null,-1))),H=o({name:"/excel_import/index"}),L=o({...H,props:{fields:{type:Array,default:()=>[]}},emits:["update:visible","data-apply","save"],setup(e,{emit:l}){const o=e;i();const{loadModelFieldList:_,save_loading:x,tpl_map:b,file_id:H,mergeCells:L,clsData:M,clsOrgData:I,numColumns:R,numRows:T,col_import:z,col_heads:S,begin_col:F,field_options:k,upLoadXlsPrintUri:A,upLoadFileUriHeader:O,upLoadinfo:B,uploadFileFailed:D,formInline:G,model_id:U,hot:W}=t(),X=s("");X.value=A(U.value);const J=(e,l)=>{B.value=l,1==parseInt(e.success)?(a(l.name+"文件上传成功",{type:"success"}),R.value=e.data.xls.numColumns,T.value=e.data.xls.numRows,H.value=e.data.file_id,L.value=e.data.mergeCells,I.value=e.data.xls_data,M.value=e.data.data,z.value=e.data.col_import,S.value=e.data.col_heads,function(){const e=Array.from({length:T.value},((e,l)=>{const t=[{value:"",title:"默认"},{value:"begin",title:"明细开始行"},{value:"not_import",title:"不导入行"},{value:"end",title:"明细结束行"}],n=document.createElement("select");return t.forEach((e=>{const l=document.createElement("option");l.textContent=e.title,l.value=e.value,n.appendChild(l)})),n.id="col_select_"+l,n.value="",n.addEventListener("change",(function(){let e=this.id.split("_");if(-1!=F.value&&"begin"==this.value)return a("一次导入只能有一个明细导入行",{type:"warning"}),n.value="",n;z.value[e[2]]=this.value,"begin"==this.value||"normal"==this.value?(W.value.render(),"begin"==this.value&&(F.value=parseInt(e[2]),u({title:"注意:",message:"开始导入行:本行做为列名匹配,不导入本行数据,请悉知",type:"warning",duration:15e3}))):-1!=F.value&&parseInt(e[2])==F.value&&(F.value=-1)})),z.value&&z.value[l]&&(n.value=z.value[l]),n}));W.value&&W.value.destroy(),document.getElementById("xls_table").innerHTML="",W.value=new n(document.getElementById("xls_table"),{data:M.value,rowHeaderWidth:100,colHeaders:!0,rowHeaders:!0,readOnly:!0,manualColumnResize:!0,manualRowResize:!0,height:P.value,afterGetRowHeader:function(l,t){if(l>=0&&l<e.length){const a=document.createElement("div");a.style.display="flex",a.style.alignItems="center";const n=document.createElement("span");n.innerHTML="&nbsp;",a.appendChild(t.firstChild),a.appendChild(n),a.appendChild(e[l]),t.innerHTML="",t.appendChild(a)}},mergeCells:L.value,columns:Array.from({length:R.value},((e,l)=>({data:l,title:K(l),renderer:N,width:80}))),rowHeights:Array.from({length:T.value},((e,l)=>23)),licenseKey:"non-commercial-and-evaluation"})}()):a(l.name+"文件上传成功,但解析失败,请确定是否符合格式",{type:"error"})},K=e=>{let l,t=e+1,a="";for(;t>0;)l=(t-1)%26,a=String.fromCharCode(65+l)+a,t=Math.floor((t-l)/26);return a},N=function(e,l,t,a,i,u,o){if(n.renderers.TextRenderer.apply(this,arguments),l.style.fontFamily="宋体",l.style.fontSize="12px",I.value&&I.value[t][a]&&I.value[t][a].font&&(l.style.fontFamily=I.value[t][a].font.font_name,l.style.fontSize=I.value[t][a].font.font_size+"px",I.value[t][a].font.bold&&(l.style.fontWeight="bold"),I.value[t][a].font.italic&&(l.style.fontStyle="italic")),l.innerHTML=u,z.value[t]&&("begin"==z.value[t]||"normal"==z.value[t])){const e=document.createElement("select");k.value.forEach((l=>{const t=document.createElement("option");t.value=l.value,t.textContent=l.title,e.appendChild(t)})),e.value="",e.id=z.value[t]+"_"+t+"_"+a,S.value&&S.value[e.id]&&(e.value=S.value[e.id]),e.addEventListener("change",(function(){this.value,S.value[this.id]=this.value}));const n=document.createElement("span");n.innerHTML="&nbsp;",l.innerHTML&&(l.appendChild(n),l.appendChild(e))}},P=s(500);function Q(e){}function q(){let e=JSON.stringify({col_import:z.value,col_heads:S.value});return e?H.value?void l("save",{fields:o.fields,tpl:e,file_id:H.value}):(a("请上传文件",{type:"error"}),!1):(a("匹配数据为空,无法保存",{type:"error"}),!1)}return r((()=>{_(o.fields)})),d((()=>o.fields),(e=>{e&&_(o.fields)}),{deep:!0}),(e,l)=>{const t=c("el-button"),a=c("el-upload"),n=c("el-form-item"),i=c("el-form");return v(),m("div",C,[f("div",j,[E,p(i,{inline:!0,model:y(G)},{default:h((()=>[p(n,{label:"上传模版:",class:"flex items-center justify-center h-16"},{default:h((()=>[p(a,{ref:"upload",class:"upload-demo flex items-center justify-center",action:X.value,headers:y(O),limit:1,"on-success":J,"on-error":y(D)},{trigger:h((()=>[p(t,null,{default:h((()=>[g("选择模版文件")])),_:1})])),_:1},8,["action","headers","on-error"])])),_:1}),p(n,{label:"",class:"flex items-center justify-center"},{default:h((()=>[p(t,{type:"primary",onClick:q,loading:y(x)},{default:h((()=>[g("开始导入")])),_:1},8,["loading"])])),_:1}),p(n,{label:"",class:"flex items-center justify-center"},{default:h((()=>[p(t,{onClick:Q},{default:h((()=>[g("重置")])),_:1})])),_:1})])),_:1},8,["model"]),w])])}}});e("default",b(L,[["__scopeId","data-v-978fe420"]]))}}}));