{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\components\\ZUpload.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\components\\ZUpload.vue","mtime":1667545182708},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\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//\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//\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//\n//\n//\n//\n//\nimport qs from 'qs';\nimport { mapState } from 'vuex';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nexport default {\n name: 'UploadFile',\n props: {\n value: {\n type: [String, Number, Object],\n default: null\n },\n formItem: {\n type: Boolean,\n default: false\n },\n placeholder: {\n type: String,\n default: '点击上传'\n },\n handleClass: {\n type: String,\n default: null\n },\n subPath: {\n type: String,\n default: 'temp'\n },\n btnLabel: {\n type: String,\n required: false,\n default: '上传'\n },\n winTitle: {\n type: String,\n default: '文件上传'\n },\n btnIcon: {\n type: String,\n default: 'el-icon-upload'\n },\n fileMaxSize: {\n type: Number,\n default: 100\n },\n fileTemplate: {\n type: [String, Array],\n default: null\n },\n action: {\n type: String,\n default: window.context.portal + '/manager/common/upload/excel'\n }\n },\n data: function data() {\n return {\n loading: false,\n vloading: false,\n winStatus: false,\n form: {\n id: null,\n code: null,\n name: null,\n remark: null,\n parentId: null,\n sort: null\n },\n upladUrlParam: ''\n };\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n mounted: function mounted() {\n var param = {\n subpath: this.subPath\n };\n\n if (this.handleClass) {\n param.handle = this.handleClass;\n }\n\n if (this.value && this.value instanceof Object) {\n for (var k in this.value) {\n param[k] = this.value[k];\n }\n }\n\n this.upladUrlParam = '&' + qs.stringify(param, {\n indices: false\n });\n },\n methods: {\n updateVal: function updateVal(val) {\n this.$emit('input', val);\n },\n cancelCU: function cancelCU() {\n this.winStatus = false;\n },\n toUpload: function toUpload() {\n this.form.name = '';\n this.winStatus = true;\n },\n // 上传文件\n upload: function upload() {\n this.$refs.upload.submit();\n },\n handleOnChange: function handleOnChange(file, fileList) {\n if (!this.form.name || this.form.name === '') {\n this.form.name = file.name;\n }\n },\n handleOnremove: function handleOnremove(file) {\n this.form.name = '';\n },\n beforeUpload: function beforeUpload(file) {\n var isLt2M = true; // console.log(file)\n\n isLt2M = file.size / 1024 / 1024 < this.fileMaxSize;\n\n if (!isLt2M) {\n this.loading = false;\n this.vloading = false;\n this.$message.error('上传文件大小不能超过 ' + this.fileMaxSize + 'MB!');\n return false;\n }\n\n this.$emit('before-upload', file);\n this.vloading = true;\n this.loading = true;\n return isLt2M;\n },\n handleSuccess: function handleSuccess(response, file, fileList) {\n // this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\n this.$refs.upload.clearFiles();\n this.winStatus = false;\n this.loading = false;\n this.$emit('after-upload', response, file, fileList);\n this.updateVal('/' + this.subPath + '/' + response.type + '/' + response.realName);\n this.vloading = false;\n },\n // 监听上传失败\n handleError: function handleError(e, file, fileList) {\n this.loading = false;\n this.vloading = false;\n var msg = JSON.parse(e.message);\n this.$notify({\n title: msg.message,\n type: 'error',\n duration: 3500\n });\n this.$refs.upload.clearFiles();\n this.winStatus = false;\n }\n }\n};",null]}