webpackJsonp([34],{OK0t:function(t,e){},vRdD:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={data:function(){return{filesData:void 0}},props:{data:{type:Object,default:function(){return{}}},visiable:Boolean},methods:{tagItemImport:function(){if(console.log(this.filesData),!this.filesData)return this.$message.warning("请上传文件");this.$emit("submit",this.filesData,this.$refs.upload)},onClose:function(){this.filesData=void 0,this.$emit("close",!1)},handleUpload:function(){console.log(this.data),0===this.data.excelData.length&&this.reHandleUpload()},reHandleUpload:function(){this.$refs.upload.click()},handleFileChange:function(t){var e=t.target.files[0];console.log(e);if(e)return/(\.(xlsx|xls|csv))$/.test(e.name)?void(this.filesData=e):(this.$message.warning({duration:1e3,message:"仅支持上传xlsx、xls、csv格式的文件"}),void(t.target.value=""))},downloadExcelTemp:function(){var t=window.location.origin;t=t.indexOf("localhost")>=0?"http://gicdev.demogic.com/":t,window.location.href=""+t+this.data.downLoadUrl}}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t.data.title,visible:t.data.isShow,"custom-class":"manual-dialog"},on:{"update:visible":function(e){return t.$set(t.data,"isShow",e)},close:t.onClose}},[a("div",{staticClass:"import"},[a("div",{class:["excel-icon",t.filesData?"excel-icon--active":"excel-icon--add"],on:{click:t.handleUpload}},[a("span",{directives:[{name:"show",rawName:"v-show",value:0===t.data.excelData.length,expression:"data.excelData.length === 0"}],staticClass:"import-btn"},[t._v("点击上传会员")])]),t._v(" "),a("div",{staticClass:"import-cont"},[a("div",{staticClass:"import-handle"},[a("input",{ref:"upload",staticStyle:{display:"none"},attrs:{type:"file",accept:".xlsx, .xls, .csv"},on:{change:t.handleFileChange}}),t._v(" "),t.data.excelData.length>0?[a("span",[t._v(t._s(t.data.excelName))]),t._v(" "),a("span",{staticClass:"import-num"},[t._v("\n            已导入会员\n            "),a("span",{staticClass:"color-303133"},[t._v(t._s(t.data.excelData.length))]),t._v("\n            人\n          ")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:t.reHandleUpload}},[t._v("重新导入")])]:t._e()],2),t._v(" "),a("div",{staticClass:"import-tip"},[a("span",{staticClass:"import-tip-text"},[t._v("只能上传一个excel文件（2003版本以上），且数据不超过50000条")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:t.downloadExcelTemp}},[a("span",{staticClass:"font-12"},[t._v("下载Excel模板")])])],1),t._v(" "),a("div",{staticClass:"clear-old"},[a("el-checkbox",{model:{value:t.data.optType,callback:function(e){t.$set(t.data,"optType",e)},expression:"data.optType"}},[t._v("清空标签历史标记会员")]),t._v(" "),a("el-tooltip",{attrs:{content:"勾选后，此前被该标签标记的会员将移除此标签，此标签标记会员以本次导入为准。"}},[a("i",{staticClass:"iconfont icon-xinxixianshi"})])],1)])]),t._v(" "),a("template",{slot:"footer"},[a("el-button",{on:{click:function(e){return t.$emit("update:visiable",!1)}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.tagItemImport}},[t._v("确定")])],1)],2)},staticRenderFns:[]};var l=a("VU/8")(i,s,!1,function(t){a("OK0t")},"data-v-3ff51ef1",null);e.default=l.exports}});