management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/e961f1eae05c09f4a4a4eef004f...

1 line
9.4 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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":["import \"core-js/modules/es6.regexp.search\";\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 props: {\n accept: {\n type: String,\n default: \"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n },\n uploadUrl: {\n type: String,\n default: null\n },\n title: {\n type: String,\n default: \"导入信息\"\n },\n tips: {\n type: String,\n default: \"只能上传excel文件\"\n },\n templateUrl: {\n type: String,\n default: null\n }\n },\n data: function data() {\n return {\n dialogVisible: false,\n fileList: [],\n uploadHeaders: {},\n count: 0,\n errorList: [],\n baseUrl: window.SITE_CONFIG['apiURL']\n };\n },\n created: function created() {\n this.uploadHeaders = {\n Authorization: 'Bearer ' + Cookies.get('access_token') || ''\n };\n },\n methods: {\n init: function init() {\n this.dialogVisible = true; // this.$nextTick(()=>{\n // this.$refs['uploadBtn'].$el.click();\n // })\n },\n beforeUpload: function beforeUpload(file) {\n this.count++;\n return true;\n },\n handleSuccess: function handleSuccess(res) {\n this.count--;\n\n if (res.code != 0) {\n // this.$message({\n // \ttype: \"error\",\n // \tshowClose: true,\n // \tduration: 0,\n // \tmessage: res.msg\n // })\n this.errorList.push(res.msg);\n } // 上传完后提示 上传完成信息\n\n\n if (this.count == 0) {\n if (this.errorList.length == 0) {\n this.$message({\n type: \"success\",\n message: \"上传完成\"\n });\n } else {\n // for(let i=0;i<this.errorList.length;i++){\n // \tthis.$message({\n // \t\ttype: \"error\",\n // \t\tshowClose: true,\n // \t\tduration: 0,\n // \t\tmessage: this.errorList[i]\n // \t})\n // }\n this.$notify({\n type: \"error\",\n title: '上传失败',\n dangerouslyUseHTMLString: true,\n message: this.errorList.join(\"<br>\"),\n duration: 0\n }); // 置空错误列表\n\n this.errorList = [];\n }\n }\n },\n clearFileList: function clearFileList() {\n this.$refs['upload'].clearFiles();\n\n if (this.$parent.$parent.search) {\n this.$parent.$parent.search();\n } else {\n this.$parent.$parent.resetForm(\"ruleForm\");\n }\n }\n }\n};",{"version":3,"sources":["upload-excel-or-img.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAA,OAAA,MAAA,WAAA;AACA,eAAA;AACA,EAAA,KAAA,EAAA;AACA,IAAA,MAAA,EAAA;AACA,M