Commit 1e82085a authored by renjintao's avatar renjintao

工艺规程产品选择

parent eb30b182
...@@ -98,14 +98,24 @@ export default { ...@@ -98,14 +98,24 @@ export default {
}); });
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
let type = "md-folder";
let title = data.title;
if (data.isProduct != 0) {
let version = this.$store.getters.dictionaryByCode(
"material.main.version",
data.version
);
type = "ios-image";
if (version) {
title = data.title + "(" + data.mmcode + "/" + version.name + ")";
} else {
title = data.title + "(" + data.mmcode + ")";
}
}
//渲染树的样式 //渲染树的样式
return h( return h(
"span", "span",
{ {
style: {
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: { on: {
click: () => { click: () => {
let arrTree = []; let arrTree = [];
...@@ -114,7 +124,25 @@ export default { ...@@ -114,7 +124,25 @@ export default {
} }
} }
}, },
data.title [
h("Icon", {
props: {
type: type
},
style: {
marginRight: "8px"
}
}),
h(
"span",
{
style: {
color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)"
}
},
title
)
]
); );
}, },
onClear() { onClear() {
......
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