1 line
4.2 KiB
JSON
1 line
4.2 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\\views\\modules\\equipmentManage\\five-access-upload.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\equipmentManage\\five-access-upload.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\nimport Cookies from 'js-cookie'\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tvisible: false,\n\t\t\turl: '',\n\t\t\tfileList: [],\n\t\t\theaders: {\n\t\t\t\tAuthorization: 'Bearer ' + Cookies.get('access_token') || ''\n\t\t\t}\n\t\t}\n\t},\n\tmethods: {\n\t\tinit(id) {\n\t\t\tthis.visible = true\n\t\t\tthis.url =\n\t\t\t\t`${window.SITE_CONFIG['apiURL']}/system/fvscdevice/setUpScree`\n\t\t\tthis.fileList = []\n\t\t},\n\t\t// 上传之前\n\t\tbeforeUploadHandle(file) {\n\t\t\tif (!/.+\\.jpg$/.test(file.name) && !/.+\\.png$/.test(file.name)) {\n\t\t\t\tthis.$message.error(this.$t('upload.tip', {\n\t\t\t\t\t'format': 'jpg、png'\n\t\t\t\t}))\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\t// 上传成功\n\t\tsuccessHandle(res, file, fileList) {\n\t\t\tif (res.code !== 0) {\n\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t}\n\t\t\tthis.$message({\n\t\t\t\tmessage: this.$t('prompt.success'),\n\t\t\t\ttype: 'success',\n\t\t\t\tduration: 500,\n\t\t\t\tonClose: () => {\n\t\t\t\t\tthis.visible = false\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n",{"version":3,"sources":["five-access-upload.vue"],"names":[],"mappings":";;;;;;;;;;;;;AAaA;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","file":"five-access-upload.vue","sourceRoot":"src/views/modules/equipmentManage","sourcesContent":["<template>\n\t<el-dialog :visible.sync=\"visible\" :title=\"$t('oss.upload')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\"\n\t :append-to-body=true>\n\t\t<el-upload name=\"file\" :action=\"url\" :file-list=\"fileList\" drag multiple :before-upload=\"beforeUploadHandle\"\n\t\t :on-success=\"successHandle\" class=\"text-center\" :headers=\"headers\">\n\t\t\t<i class=\"el-icon-upload\"></i>\n\t\t\t<div class=\"el-upload__text\" v-html=\"$t('upload.text')\"></div>\n\t\t\t<div class=\"el-upload__tip\" slot=\"tip\">{{ $t('upload.tip', { 'format': 'jpg、png' }) }}</div>\n\t\t</el-upload>\n\t</el-dialog>\n</template>\n\n<script>\n\timport Cookies from 'js-cookie'\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvisible: false,\n\t\t\t\turl: '',\n\t\t\t\tfileList: [],\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: 'Bearer ' + Cookies.get('access_token') || ''\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tinit(id) {\n\t\t\t\tthis.visible = true\n\t\t\t\tthis.url =\n\t\t\t\t\t`${window.SITE_CONFIG['apiURL']}/system/fvscdevice/setUpScree`\n\t\t\t\tthis.fileList = []\n\t\t\t},\n\t\t\t// 上传之前\n\t\t\tbeforeUploadHandle(file) {\n\t\t\t\tif (!/.+\\.jpg$/.test(file.name) && !/.+\\.png$/.test(file.name)) {\n\t\t\t\t\tthis.$message.error(this.$t('upload.tip', {\n\t\t\t\t\t\t'format': 'jpg、png'\n\t\t\t\t\t}))\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 上传成功\n\t\t\tsuccessHandle(res, file, fileList) {\n\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t}\n\t\t\t\tthis.$message({\n\t\t\t\t\tmessage: this.$t('prompt.success'),\n\t\t\t\t\ttype: 'success',\n\t\t\t\t\tduration: 500,\n\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\tthis.visible = false\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n</script>\n"]}]} |