Commit 94873de6 authored by 仇晓婷's avatar 仇晓婷

修改

parent 2796c156
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h("state", { return h("state", {
props: { props: {
code: "materail.category.status", code: "material.main.status",
type: "text", type: "text",
value: params.row.status + "" value: params.row.status + ""
} }
...@@ -137,18 +137,18 @@ export default { ...@@ -137,18 +137,18 @@ export default {
title: "描述", title: "描述",
align: "left" align: "left"
}, },
{ {
key: "creationTime", key: "creationTime",
title: "创建时间", title: "创建时间",
hide:false, hide: false,
align: "left" align: "left"
}, },
{ {
key: "creatorUserId", key: "creatorUserId",
title: "创建人", title: "创建人",
hide:false, hide: false,
align: "left", align: "left",
type:"user" type: "user"
}, },
{ {
title: "操作", title: "操作",
...@@ -240,24 +240,26 @@ export default { ...@@ -240,24 +240,26 @@ export default {
}).then(r => { }).then(r => {
if (r.result) { if (r.result) {
var items = r.result.filter(u => { var items = r.result.filter(u => {
return !this.columns.some(p => { return (
return p.key == u.field; !this.columns.some(p => {
})&&u.dataType!=5; return p.key == u.field;
}) && u.dataType != 5
);
}); });
this.cols=this.$u.clone(this.columns); this.cols = this.$u.clone(this.columns);
let extra= items.map(u=>{ let extra = items.map(u => {
var col={ var col = {
key:u.field, key: u.field,
title:u.title title: u.title
}; };
if(u.dataType==3){ if (u.dataType == 3) {
col.code=u.note; col.code = u.note;
} }
return col return col;
}) });
this.cols= this.cols.concat(extra); this.cols = this.cols.concat(extra);
var action=this.cols.splice(this.columns.length-1,1); var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length-1]); this.cols.push(this.columns[this.columns.length - 1]);
} }
}); });
}, },
...@@ -329,8 +331,8 @@ export default { ...@@ -329,8 +331,8 @@ export default {
watch: { watch: {
nodeInfo: { nodeInfo: {
handler(newName, oldName) { handler(newName, oldName) {
console.log("ovo",newName,oldName) console.log("ovo", newName, oldName);
if(newName.rootCategoryId){ if (newName.rootCategoryId) {
this.initCols(); this.initCols();
} }
if (newName.categoryId) { if (newName.categoryId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment