|
|
@@ -782,27 +782,17 @@ export default {
|
|
|
notify('error', '删除失败:'+error)
|
|
|
},
|
|
|
beforeApkUpload (file) {
|
|
|
- const isAPK = file.type === 'application/vnd.android.package-archive'
|
|
|
- const isDMG = file.type === 'application/octet-stream'
|
|
|
-
|
|
|
- if (!isAPK && !isDMG) {
|
|
|
- this.$message.error('上传安装包只能是 APK 或 DMG 格式!')
|
|
|
- }
|
|
|
- return isAPK || isDMG
|
|
|
+ return true;
|
|
|
+ //const fileTypeList = ['dmg', 'exe', 'apk']
|
|
|
+ //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
|
|
|
},
|
|
|
beforeFileUpload (file) {
|
|
|
- console.log(file)
|
|
|
- const isPDF = file.type === 'application/pdf'
|
|
|
- const isDOC = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
|
|
- const isEXCEL = file.type === 'application/vnd.ms-excel'
|
|
|
- const isXLS = file.type === 'application/x-xls'
|
|
|
- const isTXT = file.type === 'text/plain'
|
|
|
- const isXLSX = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
- //console.log(file)
|
|
|
- if (!(isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX)) {
|
|
|
- this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
|
|
|
- }
|
|
|
- return isDOC || isEXCEL || isPDF || isTXT || isXLS || isXLSX
|
|
|
+ return true;
|
|
|
+ //const fileTypeList = ['pdf', 'xls', 'xlsx', 'doc', 'docx', 'txt']
|
|
|
+ //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
|
|
|
+ },
|
|
|
+ beforeFileUploadError () {
|
|
|
+ this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
|
|
|
},
|
|
|
analyseDemand () {
|
|
|
this.$router.push({name: 'AnalyseDemand'})
|