WRe3-WRe25
时间: 2024-04-20 20:20:03 浏览: 13
WRe3-WRe25是一种钨合金,它由钨(W)和铼(Re)两种元素组成。这种合金具有优异的高温力学性能和耐腐蚀性,因此在高温环境下广泛应用于航空航天、能源、化工等领域。
以下是WRe3-WRe25的一些特点和应用:
1. 高温稳定性:WRe3-WRe25合金具有良好的高温稳定性,能够在高温环境下保持较好的力学性能和化学稳定性。
2. 抗腐蚀性:该合金对氧化、硫化等腐蚀介质具有较好的抗腐蚀性能,适用于一些腐蚀性较强的工作环境。
3. 高强度:WRe3-WRe25合金具有较高的强度和硬度,能够承受较大的载荷和应力。
4. 耐磨性:该合金具有良好的耐磨性,适用于一些需要抵抗磨损的场合。
5. 应用领域:WRe3-WRe25合金常用于制造高温零件、热电偶、电极、喷嘴等高温工作部件。
相关问题
// var data = { // 0: {YY: "string0", HLS: "string0", YZ: "string0"}, // 1: {DV: "string1", TYH: "string1", NM: "string1"}, // 2: {NG: "string2", EFY: "string2", WRE: "string2"}, // }; 转为树形结构
同样可以使用类似的方法将数据转换为树形结构:
```javascript
function buildTree(data) {
const keys = Object.keys(data);
const idMapping = keys.reduce((acc, key, i) => {
acc[key] = i;
return acc;
}, {});
let root;
keys.forEach(key => {
const el = data[key];
const parentId = el.parentId || "0";
if (parentId === "0") {
root = el;
return;
}
const parentEl = data[parentId];
parentEl.children = [...(parentEl.children || []), el];
});
return root;
}
const data = {
0: {YY: "string0", HLS: "string0", YZ: "string0"},
1: {DV: "string1", TYH: "string1", NM: "string1", parentId: "0"},
2: {NG: "string2", EFY: "string2", WRE: "string2", parentId: "0"},
3: {AAA: "string3", BBB: "string3", parentId: "1"},
4: {CCC: "string4", DDD: "string4", parentId: "1"},
5: {EEE: "string5", FFF: "string5", parentId: "2"}
};
const tree = buildTree(data);
console.log(tree);
```
输出结果:
```json
{
"YY": "string0",
"HLS": "string0",
"YZ": "string0",
"children": [
{
"DV": "string1",
"TYH": "string1",
"NM": "string1",
"parentId": "0",
"children": [
{
"AAA": "string3",
"BBB": "string3",
"parentId": "1"
},
{
"CCC": "string4",
"DDD": "string4",
"parentId": "1"
}
]
},
{
"NG": "string2",
"EFY": "string2",
"WRE": "string2",
"parentId": "0",
"children": [
{
"EEE": "string5",
"FFF": "string5",
"parentId": "2"
}
]
}
]
}
```
注意,这里新增了一个 `parentId` 字段来表示父节点的 id,如果没有指定则默认为 `"0"`。同时数据的键值表示节点的 id,也就是说 `"0"` 表示根节点。
var data = { 0: {YY: "string0", HLS: "string0", YZ: "string0"}, 1: {DV: "string1", TYH: "string1", NM: "string1"}, 2: {NG: "string2", EFY: "string2", WRE: "string2"}, }; 将这个格式转换为 正确的dtree数据格式
可以使用以下代码将数据格式转换为 dtree 数据格式:
```javascript
var data = {
0: {YY: "string0", HLS: "string0", YZ: "string0"},
1: {DV: "string1", TYH: "string1", NM: "string1"},
2: {NG: "string2", EFY: "string2", WRE: "string2"},
};
var dtreeData = [];
Object.keys(data).forEach(function(parentId) {
var parent = {id: parentId, title: parentId, children: []};
Object.keys(data[parentId]).forEach(function(childId) {
parent.children.push({id: childId, title: data[parentId][childId]});
});
dtreeData.push(parent);
});
console.log(dtreeData);
```
输出结果如下:
```javascript
[
{
"id": "0",
"title": "0",
"children": [
{"id": "YY", "title": "string0"},
{"id": "HLS", "title": "string0"},
{"id": "YZ", "title": "string0"}
]
},
{
"id": "1",
"title": "1",
"children": [
{"id": "DV", "title": "string1"},
{"id": "TYH", "title": "string1"},
{"id": "NM", "title": "string1"}
]
},
{
"id": "2",
"title": "2",
"children": [
{"id": "NG", "title": "string2"},
{"id": "EFY", "title": "string2"},
{"id": "WRE", "title": "string2"}
]
}
]
```
其中,每个对象代表一棵树的根节点,`id` 为节点的 ID,`title` 为节点的显示文本,`children` 为子节点列表。如果节点没有子节点,则 `children` 属性为空数组。