|
@@ -126,9 +126,7 @@
|
|
@overUpload="overUpload"
|
|
@overUpload="overUpload"
|
|
:size="100"
|
|
:size="100"
|
|
></uploadFile>
|
|
></uploadFile>
|
|
- <p class="upload-txt-rules">
|
|
|
|
- 文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb
|
|
|
|
- </p>
|
|
|
|
|
|
+ <p class="upload-txt-rules">文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb</p>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="上传文件"
|
|
label="上传文件"
|
|
@@ -151,7 +149,7 @@
|
|
@change="handleChange"
|
|
@change="handleChange"
|
|
style="margin-right: 20px"
|
|
style="margin-right: 20px"
|
|
>
|
|
>
|
|
- <a-button :disabled="fileUrl=='' && !projectId">
|
|
|
|
|
|
+ <a-button :disabled="fileUrl == '' && !projectId">
|
|
<a-icon type="upload" />
|
|
<a-icon type="upload" />
|
|
{{ loadDisabled ? '上传中,请稍后' : '文件上传' }}
|
|
{{ loadDisabled ? '上传中,请稍后' : '文件上传' }}
|
|
</a-button>
|
|
</a-button>
|
|
@@ -291,6 +289,7 @@ export default {
|
|
imageToken: '',
|
|
imageToken: '',
|
|
uploadAction: '/kuaishouAppPackage/importAppExcel',
|
|
uploadAction: '/kuaishouAppPackage/importAppExcel',
|
|
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
|
|
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
|
|
|
|
+ okCreated: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -360,8 +359,10 @@ export default {
|
|
if (info.file.response.code == 200) {
|
|
if (info.file.response.code == 200) {
|
|
// this.application = true
|
|
// this.application = true
|
|
// this.$emit('getDataList')
|
|
// this.$emit('getDataList')
|
|
|
|
+ this.okCreated = true
|
|
this.$message.success(info.file.response.message)
|
|
this.$message.success(info.file.response.message)
|
|
} else {
|
|
} else {
|
|
|
|
+ this.okCreated = false
|
|
this.$message.error(info.file.response.message)
|
|
this.$message.error(info.file.response.message)
|
|
}
|
|
}
|
|
} else if (info.file.status === 'error') {
|
|
} else if (info.file.status === 'error') {
|
|
@@ -490,7 +491,10 @@ export default {
|
|
},
|
|
},
|
|
handleCancel() {
|
|
handleCancel() {
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
- this.imageUrl = ''
|
|
|
|
|
|
+ this.fileUrl = ''
|
|
|
|
+ this.projectId = undefined
|
|
|
|
+ this.$refs.selectTable.keyValue = ''
|
|
|
|
+ this.$refs.selectTable.getData()
|
|
this.file = ''
|
|
this.file = ''
|
|
this.platform = '1'
|
|
this.platform = '1'
|
|
this.application = false
|
|
this.application = false
|
|
@@ -522,13 +526,7 @@ export default {
|
|
},
|
|
},
|
|
changeShowUpload() {
|
|
changeShowUpload() {
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
- if (this.uploadType == '1') {
|
|
|
|
- this.showUploadFile = true
|
|
|
|
- this.showDownLoad = false
|
|
|
|
- } else {
|
|
|
|
- this.showUploadFile = false
|
|
|
|
- this.showDownLoad = true
|
|
|
|
- }
|
|
|
|
|
|
+ this.fileUrl = ''
|
|
},
|
|
},
|
|
changeShowUploadType() {
|
|
changeShowUploadType() {
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
@@ -563,9 +561,14 @@ export default {
|
|
this.url.insertTemplateUrl = '/kuaishouAppPackage/importAppExcel'
|
|
this.url.insertTemplateUrl = '/kuaishouAppPackage/importAppExcel'
|
|
params.platform = this.appType == 'ios' ? +this.platform + 2 : +this.platform
|
|
params.platform = this.appType == 'ios' ? +this.platform + 2 : +this.platform
|
|
params.imageUrl = this.fileUrl
|
|
params.imageUrl = this.fileUrl
|
|
- this.$message.success('创建成功')
|
|
|
|
- this.handleCancel()
|
|
|
|
- this.$emit('getDataList')
|
|
|
|
|
|
+ if (this.okCreated) {
|
|
|
|
+ this.$message.success('创建成功')
|
|
|
|
+ this.handleCancel()
|
|
|
|
+ this.$emit('getDataList')
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error('excel文件有误,请重新上传后点击')
|
|
|
|
+ }
|
|
|
|
+
|
|
return
|
|
return
|
|
} else {
|
|
} else {
|
|
this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|
|
this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|