|
|
@@ -32,6 +32,7 @@ |
|
|
|
<div class="form-part" v-if="section.key == 'base'"> |
|
|
|
<el-skeleton v-if="!showForm" animated /> |
|
|
|
<DialogForm |
|
|
|
key="drawer-dialog-form" |
|
|
|
v-if="showForm" |
|
|
|
ref="form" |
|
|
|
:dataForm="form" |
|
|
@@ -163,19 +164,31 @@ export default { |
|
|
|
attrQuery: null, // 属性列表的请求 |
|
|
|
infoQuery: null, // 基本信息的请求 |
|
|
|
attrFormSubmitting: false, |
|
|
|
attrListLoading: false |
|
|
|
attrListLoading: false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
formRows() { |
|
|
|
return this.sections[0].rows.map((row) => { |
|
|
|
return row.map((col) => ({ |
|
|
|
...col, |
|
|
|
bind: { |
|
|
|
// 详情 模式下,禁用各种输入 |
|
|
|
disabled: this.mode == 'detail', |
|
|
|
}, |
|
|
|
})); |
|
|
|
return row.map((col) => { |
|
|
|
if (col.key == 'eq-pics') { |
|
|
|
// 重置图片的位置 |
|
|
|
return { |
|
|
|
...col, |
|
|
|
style: { |
|
|
|
left: 0, |
|
|
|
right: 'unset' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
...col, |
|
|
|
bind: { |
|
|
|
// 详情 模式下,禁用各种输入 |
|
|
|
disabled: this.mode == 'detail', |
|
|
|
}, |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
tableBtn() { |
|
|
@@ -231,8 +244,8 @@ export default { |
|
|
|
this.attrListLoading = true; |
|
|
|
const res = await this.$axios(this.attrQuery); |
|
|
|
if (res.code == 0) { |
|
|
|
this.list = data.list; |
|
|
|
this.total = data.total; |
|
|
|
this.list = res.data.list; |
|
|
|
this.total = res.data.total; |
|
|
|
} |
|
|
|
this.attrListLoading = false; |
|
|
|
}, |
|
|
@@ -332,7 +345,7 @@ export default { |
|
|
|
method: isEdit ? 'put' : 'post', |
|
|
|
data: this.attrForm, |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (res.code == 0) { |
|
|
|
this.closeAttrForm(); |
|
|
|
this.$message({ |
|
|
|