forked from zhurui/management
1 line
7.8 KiB
JSON
1 line
7.8 KiB
JSON
|
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\public\\upload-excel-or-img.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\public\\upload-excel-or-img.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Cookies from 'js-cookie'\nexport default {\n\tprops: {\n\t\taccept: {\n\t\t\ttype: String,\n\t\t\tdefault: \"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n\t\t},\n\t\tuploadUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: \"导入信息\"\n\t\t},\n\t\ttips: {\n\t\t\ttype: String,\n\t\t\tdefault: \"只能上传excel文件\"\n\t\t},\n\t\ttemplateUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdialogVisible: false,\n\t\t\tfileList: [],\n\t\t\tuploadHeaders: {},\n\t\t\tcount:0,\n\t\t\terrorList:[],\n\t\t\tbaseUrl: window.SITE_CONFIG['apiURL']\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.uploadHeaders = {\n\t\t\tAuthorization: 'Bearer ' + Cookies.get('access_token') || ''\n\t\t}\n\t},\n\tmethods: {\n\t\tinit() {\n\t\t\tthis.dialogVisible = true;\n\t\t\t// this.$nextTick(()=>{\n\t\t\t// this.$refs['uploadBtn'].$el.click();\n\t\t\t// })\n\t\t},\n\t\tbeforeUpload(file){\n\t\t\tthis.count++;\n\t\t\treturn true\n\t\t},\n\t\thandleSuccess(res) {\n\t\t\tthis.count--;\n\t\t\tif (res.code != 0) {\n\t\t\t\t// this.$message({\n\t\t\t\t// \ttype: \"error\",\n\t\t\t\t// \tshowClose: true,\n\t\t\t\t// \tduration: 0,\n\t\t\t\t// \tmessage: res.msg\n\t\t\t\t// })\n\t\t\t\tthis.errorList.push(res.msg)\n\t\t\t} \n\t\t\t// 上传完后提示 上传完成信息\n\t\t\tif(this.count==0){\n\t\t\t\tif(this.errorList.length==0){\n\t\t\t\t\tthis.$message({\n\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\tmessage:\"上传完成\"\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// for(let i=0;i<this.errorList.length;i++){\n\t\t\t\t\t// \tthis.$message({\n\t\t\t\t\t// \t\ttype: \"error\",\n\t\t\t\t\t// \t\tshowClose: true,\n\t\t\t\t\t// \t\tduration: 0,\n\t\t\t\t\t// \t\tmessage: this.errorList[i]\n\t\t\t\t\t// \t})\n\t\t\t\t\t// }\n\t\t\t\t\t this.$notify({\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: '上传失败',\n\t\t\t\t\t\tdangerouslyUseHTMLString:true,\n\t\t\t\t\t\tmessage: this.errorList.join(\"<br>\"),\n\t\t\t\t\t\tduration: 0\n\t\t\t\t\t});\n\t\t\t\t\t// 置空错误列表\n\t\t\t\t\tthis.errorList=[]\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\t\tclearFileList(){\n\t\t\tthis.$refs['upload'].clearFiles();\n\t\t\tif(this.$parent.$parent.search){\n\t\t\t\tthis.$parent.$parent.search()\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.$parent.$parent.resetForm(\"ruleForm\")\n\t\t\t}\n\t\t}\n\t}\n}\n",{"version":3,"sources":["upload-excel-or-img.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA
|