提交 f64436a2 authored 作者: 潘鹏's avatar 潘鹏

attributes

上级 35167d10
......@@ -4,9 +4,17 @@ $(function () {
colModel: [
{label: 'id', name: 'id', index: 'id', key: true, hidden: true},
{label: '属性名', name: 'attrName', index: 'attr_name', width: 80},
{label: '属性描述', name: 'attrDesc', index: 'attr_desc', width: 80},
{label: '属性描述', name: 'descs', index: 'descs', width: 80,formatter:function (value, grid, rows){
let returnStr = '';
value.forEach(item=>{
let Str = `${item.attrValue}(${item.attrDesc}),`
returnStr+=Str
})
// returnStr=returnStr.split("undefined")[1]
return returnStr;
}},
{label: '是否开启', name: 'status', index: 'status', width: 80,formatter:function (value, grid, rows){
var returnStr;
let returnStr;
if (value == '0') {
returnStr = "<i-button class=\"ivu-btn ivu-btn-primary\" style='border-radius:25px;' type=\"info\">已开启</i-button>";
} else if (value == '1') {
......@@ -15,7 +23,7 @@ $(function () {
return returnStr;
}},
{label: '是否必填', name: 'need', index: 'need', width: 80,formatter:function (value, grid, rows){
var returnStr;
let returnStr;
if (value == false) {
returnStr = "<i-button class=\"ivu-btn ivu-btn-primary\" style='border-radius:25px;' type=\"info\">非必填</i-button>";
} else if (value == true) {
......@@ -86,6 +94,9 @@ let vm = new Vue({
}else {
flag = false
}
if(!item.attrDescId){
item.attrDescId = ""
}
})
let arrs = []
vm.attrDesc.forEach(item=>{
......@@ -193,6 +204,7 @@ let vm = new Vue({
// }
obj.attrValue = item.attrValue
obj.attrDesc= item.attrDesc
obj.attrDescId = item.attrDescId
vm.attrDesc.push(obj)
})
console.log(vm.attrDesc)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论