Commit 468a1f33 authored by ninglx's avatar ninglx

wj-manage-web 处理车辆类型映射 15三轮车暂定为小客车模型

parent 7892be64
......@@ -117,7 +117,7 @@ export default {
}
Promise.all(queue).then(() => {
for (let item of this.$store.state.dicts.CarType) {
let targetType = dict.carTypeGlbMap[item.code];
let targetType = dict.carTypeGlbMap[item.code] || item.code;
let options = {
obj: `gltf/car${targetType}.glb`,
type: "gltf",
......
......@@ -13,27 +13,10 @@ export default {
'灰色': '#77787b',
},
carTypeGlbMap:{
0:'0',
1:'0',
// 1:'151',
2:'2',
3:'3',
4:'4',
// 4:'150',
5:'5',
6:'6',
// 6:'152',
7:'7',
8:'8',
9:'0',
10:'10',
11:'11',
12:'12',
13:'0',
14:'14',
150:'150',
151:'151',
152:'152',
15:'0',
153:'150',
154:'150',
160:'11',
......@@ -43,7 +26,6 @@ export default {
164:'11',
165:'11',
166:'11',
170:'170',
171:'170',
172:'170',
173:'170',
......
......@@ -618,7 +618,7 @@ export default {
renderingMode: "3d",
onAdd: (map, mbxContext) => {
for (let item of this.$store.state.dicts.CarType) {
let targetType = dict.carTypeGlbMap[item.code];
let targetType = dict.carTypeGlbMap[item.code] || item.code;
let options = {
obj: `gltf/car${targetType}.glb`,
type: "gltf",
......
......@@ -424,7 +424,7 @@ export default {
});
typeItme && (typeName = typeItme.name);
// 同类车型映射
let targetType = dict.carTypeGlbMap[options.type];
let targetType = dict.carTypeGlbMap[options.type]|| options.type;
let ent = vie.entities.add({
id: options.id,
model: {
......@@ -1116,7 +1116,7 @@ export default {
return item.code == track.color;
});
match && (vehicleColor = dict.colorMatch[match.name]);
let targetType = dict.carTypeGlbMap[track.type];
let targetType = dict.carTypeGlbMap[track.type]|| track.type;
viewer.entities.add({
id: track.id,
model: {
......
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