fix(系统设置): 修复环境变量转存csv报错的缺陷
--bug=1016037 --user=王孝刚 【项目设置】环境通用配置中,上传本地文件后转存,报错了 https://www.tapd.cn/55049933/s/1228007
This commit is contained in:
parent
1fc2a27e8e
commit
5def27bb7d
|
@ -3,27 +3,27 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-upload
|
<el-upload
|
||||||
action="#"
|
action="#"
|
||||||
class="api-body-upload"
|
class="api-body-upload"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:file-list="parameter.files"
|
:file-list="parameter.files"
|
||||||
:beforeUpload="uploadValidate"
|
:beforeUpload="uploadValidate"
|
||||||
:on-exceed="exceed"
|
:on-exceed="exceed"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
ref="upload">
|
ref="upload">
|
||||||
<div class="upload-default" @click.stop>
|
<div class="upload-default" @click.stop>
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="right"
|
placement="right"
|
||||||
trigger="hover">
|
trigger="hover">
|
||||||
<div>
|
<div>
|
||||||
<el-upload
|
<el-upload
|
||||||
action="#"
|
action="#"
|
||||||
class="ms-body-upload"
|
class="ms-body-upload"
|
||||||
:http-request="upload"
|
:http-request="upload"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="exceed"
|
:on-exceed="exceed"
|
||||||
:beforeUpload="uploadValidate"
|
:beforeUpload="uploadValidate"
|
||||||
ref="uploadLocal">
|
ref="uploadLocal">
|
||||||
<el-button type="text"> {{ $t('permission.project_file.local_upload') }}</el-button>
|
<el-button type="text"> {{ $t('permission.project_file.local_upload') }}</el-button>
|
||||||
<span slot="file"/>
|
<span slot="file"/>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -90,12 +90,13 @@ export default {
|
||||||
}
|
}
|
||||||
let request = {
|
let request = {
|
||||||
id: getUUID(),
|
id: getUUID(),
|
||||||
resourceId: this.id,
|
csv: true,
|
||||||
|
resourceId: this.file.id,
|
||||||
moduleId: moduleId,
|
moduleId: moduleId,
|
||||||
projectId: getCurrentProjectID(),
|
projectId: getCurrentProjectID(),
|
||||||
fileName: this.file.name
|
fileName: this.file.name
|
||||||
};
|
};
|
||||||
this.$fileUpload("/file/metadata/api/upload", null, files, request, (response) => {
|
this.$fileUpload("/file/metadata/dump/file", null, files, request, (response) => {
|
||||||
this.$success(this.$t("organization.integration.successful_operation"));
|
this.$success(this.$t("organization.integration.successful_operation"));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -131,7 +132,7 @@ export default {
|
||||||
for (let i = 0; i < this.parameter.files.length; i++) {
|
for (let i = 0; i < this.parameter.files.length; i++) {
|
||||||
let fileName = file.file ? file.file.name : file.name;
|
let fileName = file.file ? file.file.name : file.name;
|
||||||
let paramFileName = this.parameter.files[i].file ?
|
let paramFileName = this.parameter.files[i].file ?
|
||||||
this.parameter.files[i].file.name : this.parameter.files[i].name;
|
this.parameter.files[i].file.name : this.parameter.files[i].name;
|
||||||
if (fileName === paramFileName) {
|
if (fileName === paramFileName) {
|
||||||
this.parameter.files.splice(i, 1);
|
this.parameter.files.splice(i, 1);
|
||||||
this.$refs.upload.handleRemove(file);
|
this.$refs.upload.handleRemove(file);
|
||||||
|
@ -177,7 +178,7 @@ export default {
|
||||||
this.$refs.upload.handleRemove(file);
|
this.$refs.upload.handleRemove(file);
|
||||||
for (let i = 0; i < this.parameter.files.length; i++) {
|
for (let i = 0; i < this.parameter.files.length; i++) {
|
||||||
let paramFileName = this.parameter.files[i].name ?
|
let paramFileName = this.parameter.files[i].name ?
|
||||||
this.parameter.files[i].name : this.parameter.files[i].file.name;
|
this.parameter.files[i].name : this.parameter.files[i].file.name;
|
||||||
if (fileName === paramFileName) {
|
if (fileName === paramFileName) {
|
||||||
this.parameter.files.splice(i, 1);
|
this.parameter.files.splice(i, 1);
|
||||||
this.$refs.upload.handleRemove(file);
|
this.$refs.upload.handleRemove(file);
|
||||||
|
|
Loading…
Reference in New Issue