属性分类
This commit is contained in:
parent
1a683a7e82
commit
003d6b2298
|
|
@ -28,12 +28,7 @@
|
|||
|
||||
|
||||
<a-tab-pane key="2" tab="料品自定义属性">
|
||||
|
||||
<a-divider orientation="left">属性A类</a-divider>
|
||||
|
||||
|
||||
|
||||
<a-divider orientation="left">属性B类</a-divider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -473,9 +468,17 @@ export default {
|
|||
this.attributes = a.data.attribute;
|
||||
|
||||
let formData = {};
|
||||
|
||||
let groupNames = [];
|
||||
a.data.attribute.forEach(item => {
|
||||
|
||||
let formItem = { field: '', title: '', span: 12, itemRender: {} };
|
||||
let groupName = item.category.name;
|
||||
if(groupName && !groupNames.filter(a=>a == groupName).length){
|
||||
|
||||
this.options.formOptions2.items.push({ title: groupName, span: 24, itemRender: { type:"MkFormInputShow" },titleColon:false });
|
||||
groupNames.push(groupName);
|
||||
}
|
||||
|
||||
formItem.field = "attr" + item.id;
|
||||
formItem.title = item.name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue