bug ui
This commit is contained in:
@@ -146,7 +146,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col>
|
||||
<el-form-item label="维修附件" prop="file">
|
||||
<FileUpload v-model="file" :disabled="disabled" />
|
||||
<FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="disabled" @name="setFileName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -206,11 +206,15 @@ export default {
|
||||
visible: false,
|
||||
disabled: false,
|
||||
dataForm: {},
|
||||
file: ''
|
||||
file: '',
|
||||
fileName: ''
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
setFileName(val) {
|
||||
this.fileName = val
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
@@ -225,12 +229,15 @@ export default {
|
||||
resetFields(args) {
|
||||
return this.$refs.form.resetFields(args);
|
||||
},
|
||||
initData() {
|
||||
this.file = ''
|
||||
this.fileName = ''
|
||||
},
|
||||
init(row, isdetail) {
|
||||
// this.initData();
|
||||
this.initData();
|
||||
this.disabled = isdetail || false;
|
||||
this.dataForm.id = row.id || undefined;
|
||||
this.visible = true;
|
||||
console.log('111', this.dataForm, row)
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
@@ -241,6 +248,10 @@ export default {
|
||||
this.formLoading = false
|
||||
this.dataForm = response.data;
|
||||
this.dataForm.maintenanceStatus = row.maintenanceStatus || 0
|
||||
if (this.dataForm.files.length > 0) {
|
||||
this.file = this.dataForm.files[0].fileUrl
|
||||
this.fileName = this.dataForm.files[0].fileName
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// if (this.urlOptions.isGetCode) {
|
||||
@@ -261,6 +272,7 @@ export default {
|
||||
let arry = []
|
||||
temp.forEach(item => {
|
||||
arry.push({
|
||||
fileName: this.fileName,
|
||||
fileType: 2,
|
||||
fileUrl: item
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user