{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\components\\upload\\fileListUpload.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\upload\\fileListUpload.vue","mtime":1723832016853},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.find-index\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\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\nvar imgType = ['jpg', 'jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG', 'bmp', 'BMP', 'gif', 'GIF'];\nimport { mapState } from 'vuex';\nimport basicData from '@/api/basicData.js';\nimport req from '@/request.js';\nexport default {\n props: {\n dadToSon: {\n type: Object,\n default: function _default() {}\n },\n limit: {\n type: Number,\n default: function _default() {\n return 5;\n }\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n updata: {\n bizPath: this.dadToSon.bizPath\n },\n dialogImageUrl: '',\n updialogVisible: false,\n fileList: [],\n loading: false,\n disabledBtn: false //按钮禁用控制\n };\n },\n mounted: function mounted() {\n this.dadToSon.fileList.forEach(function (item) {\n var type = item.name.split('.')[1];\n item.isImage = imgType.includes(type);\n item.name = item.name || item.attachmentName || '';\n item.url = item.url || item.attachmentPath || '';\n });\n this.fileList = this.dadToSon.fileList;\n },\n watch: {\n dadToSon: {\n handler: function handler(newVal) {\n newVal.fileList.forEach(function (item) {\n var type = item.name.split('.')[1];\n item.isImage = imgType.includes(type);\n item.name = item.name || item.attachmentName || '';\n item.url = item.url || item.attachmentPath || '';\n });\n this.fileList = newVal.fileList;\n },\n immediate: true,\n deep: true\n }\n },\n created: function created() {},\n computed: mapState({\n deleteUrl: function deleteUrl() {\n return window.context.yhxt + '/bizMigrantBuildersInformation/v1/updateMigrantWorkersInformation';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n },\n upload: function upload() {\n return window.context.yhxt + '/bizAccessory/v1/minioUpload';\n }\n }),\n methods: {\n handleExceed: function handleExceed(file, fileList) {\n if (file.length > this.limit) {\n this.$message.warning(\"\\u4E0A\\u4F20\\u4E2A\\u6570\\u8D85\\u8FC7\\u9650\\u5236\\u4E2A\\u6570\\uFF0C\\u6700\\u591A\\u4E0A\\u4F20\".concat(this.limit, \"\\u4E2A\\uFF01\\uFF01\\uFF01\"));\n }\n },\n uploadBeforeFile: function uploadBeforeFile() {\n this.loading = true;\n },\n error: function error() {\n this.loading = false;\n },\n success: function success(response, file, fileList) {\n console.log(response, file, fileList, 'ddddddddd');\n this.loading = false;\n this.$message({\n type: response.state == true ? 'success' : 'warning',\n message: response.state == true ? '上传成功' : '上传失败'\n });\n var imgList = [];\n fileList.forEach(function (item) {\n if (!item.id) {\n if (item.response) {\n imgList.push(item.response.value);\n }\n } else {\n imgList.push(item);\n }\n });\n this.fileList = fileList;\n this.$emit('sonToDad1');\n this.$emit('sonToDad', imgList);\n },\n //删除事件\n handleRemove: function handleRemove(file) {\n var INdex = this.fileList.findIndex(function (item) {\n return item.uid == file.uid;\n });\n this.fileList.splice(INdex, 1);\n var imgList = [];\n this.fileList.forEach(function (item) {\n if (!item.id) {\n if (item.response) {\n imgList.push(item.response.value);\n }\n } else {\n imgList.push(item);\n }\n });\n this.$emit('sonToDad', imgList);\n if (file.id) {\n basicData.deleteEnclosureManagement(file.id).then(function (res) {});\n }\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n this.dialogImageUrl = file.url;\n this.updialogVisible = true;\n },\n handleDownload: function handleDownload(file) {\n var _this = this;\n if (file.id) {\n req.downloadGetCopy(window.context.yhxt + \"/bizAccessory/v1/minIoAllDownFile?bizPath=\".concat(this.dadToSon.bizPath, \"&ids=\").concat(file.id)).then(function (res) {\n if (res) {\n _this.$message.success('下载成功');\n }\n });\n } else {\n this.$message.info('请先保存附件');\n }\n }\n }\n};",null]}