Commit ee7693b2 by Joey

feat(@gms/gms-plugin-workflow): 指定机构角色增加角色描述

parent ed39915f
...@@ -53,16 +53,16 @@ export default { ...@@ -53,16 +53,16 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
callback(this.formatTree(res.data, item.children)); callback(this.formatTree(res.data, true));
} }
}); });
}, },
formatTree(data) { formatTree(data, withTag) {
return data.map((element) => { return data.map((element) => {
var checked = this.formData.value && this.formData.value.includes(element.id); var checked = this.formData.value && this.formData.value.includes(element.id);
if (element.hasOwnProperty("leaf")) if (element.hasOwnProperty("leaf"))
return { return {
title: element.title, title: withTag ? element.name ? `${element.title}${element.name})` : element.title : element.title,
loading: false, loading: false,
id: element.id, id: element.id,
leaf: false, leaf: false,
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}; };
else else
return { return {
title: element.title, title: withTag ? element.name ? `${element.title}${element.name})` : element.title : element.title,
id: element.id, id: element.id,
checked: checked, checked: checked,
leaf: true, leaf: true,
......
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