canyin-project/ybcy/views/channel/index/static/js/chunk-759d8b97.864c52c5.js

1 line
9.8 KiB
JavaScript
Raw Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-759d8b97"],{"3bea":function(t,n,e){"use strict";e.r(n);var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{},[e("div",{staticClass:"outmain ba_f"},[t._m(0),e("el-button",{attrs:{size:"medium"},on:{click:t.handleEdit}},[e("a",{attrs:{href:t.dloadUrl()}},[t._v("下载模板")])]),e("div",{staticClass:"pad_20"},[e("el-upload",{staticClass:"upload-demo",attrs:{action:"https://jsonplaceholder.typicode.com/posts/","on-preview":t.handlePreview,"on-remove":t.handleRemove,"before-remove":t.beforeRemove,multiple:"",limit:1,"on-exceed":t.handleExceed,"file-list":t.fileList,data:t.uploadData,"auto-upload":!0,"on-change":t.changeFile,accept:".xls,.xlsx"}},[e("el-button",{staticClass:"el-button-small",attrs:{size:"medium",type:"primary"}},[t._v("点击上传")]),e("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传xls,xlsx文件且不超过200kb")])],1)],1)],1),e("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[e("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("导入")])],1)])},r=[function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"shuju_title mar_b20"},[e("div",{staticClass:"shuju_title_text"},[e("span",[t._v("快速导入")])])])}],o=(e("99af"),e("b0c0"),e("96cf"),e("1da1")),u=e("365c"),c=(e("5a4a"),{data:function(){return{fileList:[],upload:"",file:"",loading:!1,uploadData:{dataType:"0",oldFilePath:""}}},methods:{dloadUrl:function(){var t=u["a"].backendPath;return t+"channel/good/excel-down"},handleEdit:function(){},handleRemove:function(t,n){console.log(t,n)},handlePreview:function(t){console.log(t)},handleExceed:function(t,n){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+n.length," 个文件"))},beforeRemove:function(t,n){return this.$confirm("确定移除 ".concat(t.name,""))},changeFile:function(t,n){console.log(t,n),this.file=t,this.fileList=n;var e=this,a=new FileReader;a.readAsDataURL(t.raw),a.onload=function(t){this.result,e.imageUrl=this.result,console.log("result",this.result)}},onSubmit:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var e,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e=new FormData,a=sessionStorage.getItem("storeId")||"",e.append("file",t.file.raw),e.append("storeId",a),console.log("file",t.file.raw,e),t.$api.post("channel/good/good-excel-pull",e,(function(n){n.code,t.$message.success(n.msg)}));case 6:case"end":return n.stop()}}),n)})))()}}}),i=c,d=e("2877"),l=Object(d["a"])(i,a,r,!1,null,null,null);n["default"]=l.exports},"5a4a":function(t,n,e){"use strict";e.d(n,"B",(function(){return r})),e.d(n,"d",(function(){return o})),e.d(n,"G",(function(){return u})),e.d(n,"z",(function(){return c})),e.d(n,"r",(function(){return i})),e.d(n,"y",(function(){return d})),e.d(n,"W",(function(){return l})),e.d(n,"A",(function(){return s})),e.d(n,"F",(function(){return h})),e.d(n,"D",(function(){return f})),e.d(n,"f",(function(){return m})),e.d(n,"e",(function(){return p})),e.d(n,"g",(function(){return g})),e.d(n,"i",(function(){return b})),e.d(n,"w",(function(){return j})),e.d(n,"ab",(function(){return O})),e.d(n,"o",(function(){return v})),e.d(n,"Z",(function(){return y})),e.d(n,"C",(function(){return w})),e.d(n,"H",(function(){return _})),e.d(n,"q",(function(){return x})),e.d(n,"c",(function(){return k})),e.d(n,"h",(function(){return C})),e.d(n,"b",(function(){return R})),e.d(n,"u",(function(){return E})),e.d(n,"N",(function(){return F})),e.d(n,"m",(function(){return $})),e.d(n,"L",(function(){return D})),e.d(n,"x",(function(){return L})),e.d(n,"db",(function(){return P})),e.d(n,"j",(function(){return U})),e.d(n,"cb",(function(){return I})),e.d(n,"t",(function(){return S})),e.d(n,"J",(function(){return z})),e.d(n,"l",(function(){return J})),e.d(n,"I",(function(){return A})),e.d(n,"v",(function(){return T})),e.d(n,"S",(function(){return q})),e.d(n,"n",(function(){return B})),e.