ludc
2025-01-16 5203081b68e3a8dc139d1807b2f8774e4a00a82a
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a0ec9c8","chunk-3c390539"],{2450:function(t,e,a){"use strict";a("f7c0")},af5a:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"avue-dialog",staticStyle:{"margin-top":"-20vh !important"},attrs:{"close-on-click-modal":!1,visible:t.visible,width:t.width,"append-to-body":"",title:"上传文件"},on:{"update:visible":function(e){t.visible=e}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.visible=!1}}},[t._v("关闭")])]},proxy:!0}])},[e("Divider",{attrs:{left:"30px",text:"导入提示"}}),e("ul",{staticStyle:{color:"#e73a3a"}},[t.paramVOS.tipList?t._e():e("li",[t._v("\n      请点击浏览文件进行上传\n    ")]),t._l(t.paramVOS.tipList,(function(a,i){return t.paramVOS.tipList&&t.paramVOS.tipList.length>=1?e("li",{key:i},[t._v(" "+t._s(i+1)+" : "+t._s(a)+"。")]):t._e()}))],2),e("Divider",{attrs:{left:"30px",text:"选择文件后会自动上传"}}),e("el-upload",{staticClass:"upload-demo",attrs:{"before-upload":t.beforeUpload,data:t.fileData,headers:t.uploadHeaders,"on-change":t.uploadChange,"on-error":t.onError,"on-success":t.onSuccess,"show-file-list":!1,action:"/api/vciFileUploadController/uploadFile"}},[e("el-button",{staticStyle:{margin:"15px 35px"},attrs:{size:"small",type:"primary"}},[t._v("浏览文件")])],1)],1)},r=[],o=(a("6b54"),a("7f7f"),a("28a5"),a("96cf"),a("1da1")),n=(a("6762"),a("2fdb"),a("0a5a")),s=(a("d9a3"),a("c54a")),c={name:"upload-file",props:{paramVOS:{type:Object,default:{}},sourceData:{type:Object,default:{}},dataStore:{type:Array,default:[]}},data:function(){return{flga:!0,pageLoading:null,downloadLoading:!1,visible:!1}},created:function(){console.log(this.sourceData)},watch:{visible:{handler:function(t,e){}}},computed:{uploadHeaders:function(){return{Authorizationtoken:Object(n["a"])()}},fileData:function(){return{ownbizOid:this.sourceData.oid,ownBtmName:this.sourceData.btmname,secretGrade:this.paramVOS.secretGrade||-1,fileDocClassify:this.paramVOS.fileDocClassify||"",updateFileFlag:this.paramVOS.updateFileFlag||!0}},width:function(){return Object(s["b"])(this.paramVOS.width)?"40%":this.paramVOS.width.includes("px")||this.paramVOS.width.includes("%")?this.paramVOS.width:this.paramVOS.width+"px"},fullscreen:function(){return console.log(this.paramVOS),!this.paramVOS.width&&!this.paramVOS.height&&!this.paramVOS.form}},methods:{beforeUpload:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.name.split(".").pop().toLowerCase(),!this.paramVOS.filetype){t.next=5;break}if(this.paramVOS.filetype.includes(a)){t.next=5;break}return this.$message.error("只允许上传".concat(this.paramVOS.filetype.toString(),"格式的文件")),t.abrupt("return",Promise.reject(!1));case 5:return this.pageLoading=this.$loading({lock:!0,text:"文件上传中",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"}),t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),onSuccess:function(t){200===t.code?(this.$message.success("上传成功!"),this.visible=!1):this.$message.error(t.msg)},onError:function(t){this.pageLoading.close(),this.$message.error(t)},uploadChange:function(t){"success"!==t.status&&"error"!==t.status||this.pageLoading.close()}}},l=c,u=(a("2450"),a("2877")),d=Object(u["a"])(l,i,r,!1,null,"33e9e176",null);e["default"]=d.exports},f73b:function(t,e,a){"use strict";a.r(e),a.d(e,"doAction",(function(){return s})),a.d(e,"showStartWindow",(function(){return c})),a.d(e,"doBefore",(function(){return l})),a.d(e,"doAfter",(function(){return u}));var i=a("140e"),r=(a("c54a"),a("8bbf")),o=a.n(r),n=a("af5a"),s=(a("d9a3"),function(t,e){if(t.sourceData=t.sourceData||{},t.dataStore=t.dataStore||[],!t.dataStore||t.dataStore.length<1)return o.a.prototype.$message.error("请选择要上传的分类!"),!1;Object(i["callPreEvent"])(t,l,(function(t){c(t,(function(){Object(i["callPostEvent"])(t,u,e,"uploadfile")}))}))}),c=function(t,e){var a=t.paramVOS,i=o.a.extend(n["default"]),r=new i;r.sourceData=t.sourceData,r.dataStore=t.dataStore,r.paramVOS=a,r.dialogClose=function(){s.visible=!1,document.body.removeChild(s.$el),r.$destroy(),r=null},e&&(r.saveCallback=e);var s=r.$mount();document.body.appendChild(s.$el),r.visible=!0},l=function(t,e){console.log("执行增加前置事件"),e&&e(t)},u=function(t,e,a){console.log("执行增加后置事件"),e&&e(a)}},f7c0:function(t,e,a){}}]);