修改三维课程大铁考试数据结构

This commit is contained in:
sunzhenyu 2021-09-18 18:01:53 +08:00
parent fdd2701512
commit d92906d7d5
3 changed files with 509 additions and 439 deletions

View File

@ -326,13 +326,9 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
var intersects = raycaster.intersectObject( modelManager.otherModel.children[1],true); var intersects = raycaster.intersectObject( modelManager.otherModel.children[1],true);
if(intersects.length>0){ if(intersects.length>0){
for(let td=0;td<trainDeviceList.length;td++){
if(trainDeviceList[td].id == intersects[0].object.name){ jl3dZzwwTrainTestUpdate(intersects[0].object.name);
trainDeviceList[td].color = "#fff";
trainDeviceList[td].value = "已检查";
}
}
} }
} }

View File

@ -2,13 +2,23 @@
export function ZzwwTrain() { export function ZzwwTrain() {
let scope = this; let scope = this;
this.deviceList = [ this.deviceList = [
{
tittle:"防溜防护检查",
text:"",
devices:[
{ {
id:"ZLQ", id:"ZLQ",
name:"止轮器", name:"止轮器",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{ {
id:"FD", id:"FD",
name:"风笛", name:"风笛",
@ -16,13 +26,6 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"SD",
name:"上灯",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"SDD", id:"SDD",
name:"上大灯", name:"上大灯",
@ -39,7 +42,7 @@ export function ZzwwTrain() {
}, },
{ {
id:"YGQ", id:"YGQ",
name:"雨X刮器", name:"雨刮器",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
@ -71,7 +74,13 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{ {
id:"CG", id:"CG",
name:"车钩", name:"车钩",
@ -85,14 +94,14 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"CG1", tittle:"车辆端部检查(前端)",
name:"车钩", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{ {
id:"ZJSM", id:"ZJSM",
name:"折角塞门", name:"折角塞门",
@ -106,14 +115,13 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"ZDGRG1", tittle:"车辆端部检查(前端)",
name:"制动管软管", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{ {
id:"FCD", id:"FCD",
name:"防尘堵", name:"防尘堵",
@ -127,14 +135,13 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"AQL1", tittle:"车辆端部检查(前端)",
name:"安全链", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{ {
id:"PZQ", id:"PZQ",
name:"排障器", name:"排障器",
@ -142,27 +149,20 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{ {
id:"PZQ1", id:"SSQ",
name:"排障器", name:"扫石器",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"PSQ", tittle:"左前部",
name:"排石器", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{
id:"PSQ1",
name:"排石器1",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"ZJF", id:"ZJF",
name:"中继阀", name:"中继阀",
@ -184,20 +184,6 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"",
name:"",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDSM1",
name:"制动塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"JCXHCGQ", id:"JCXHCGQ",
name:"信号传感器", name:"信号传感器",
@ -225,14 +211,21 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
// ,
// {
// id:"PDYL",
// name:"皮带压轮",
// color:"#ff0000",
// status:"",
// value:"未检查",
// }
]
}, },
{ {
id:"PDYL", tittle:"转向架左侧",
name:"皮带压轮", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{ {
id:"ZXTH", id:"ZXTH",
name:"轴箱弹簧", name:"轴箱弹簧",
@ -255,12 +248,18 @@ export function ZzwwTrain() {
value:"未检查", value:"未检查",
}, },
{ {
id:"CLTM", id:"CL",
name:"车轮踏面", name:"车轮踏面",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"转向架左侧",
text:"",
devices:[
{ {
id:"QYZ", id:"QYZ",
name:"牵引座", name:"牵引座",
@ -281,14 +280,26 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"转向架左侧",
text:"",
devices:[
{ {
id:"SDCGQ", id:"SDCGQ",
name:"速度传感器", name:"速度传感器",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"转向架左侧",
text:"",
devices:[
{ {
id:"ZDG", id:"ZDG",
name:"制动缸", name:"制动缸",
@ -316,7 +327,13 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车辆中部(左侧)",
text:"",
devices:[
{ {
id:"RYX", id:"RYX",
name:"燃油箱", name:"燃油箱",
@ -324,27 +341,32 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"YW",
name:"油位",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"XDCX", id:"XDCX",
name:"蓄电池箱", name:"蓄电池箱",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"左侧后部",
text:"",
devices:[
{ {
id:"RLZDJAZZ", id:"RLZDJAZZ",
name:"人力制动机", name:"人力制动机",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车辆(右侧)",
text:"",
devices:[
{ {
id:"ZFG", id:"ZFG",
name:"总风缸", name:"总风缸",
@ -352,20 +374,26 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"ZFGSM",
name:"总风缸塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"XYQ", id:"XYQ",
name:"消音器", name:"消音器",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"JCXHCGQ1", tittle:"右前部",
name:"信号传感器", text:"",
color:"#ff0000", devices:[
status:"",
value:"未检查",
},
{ {
id:"KLQ", id:"KLQ",
name:"空滤器", name:"空滤器",
@ -373,6 +401,19 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"JCXHCGQ",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
]
},
{
tittle:"车辆底部检查",
text:"",
devices:[
{ {
id:"GWS", id:"GWS",
name:"钩尾销", name:"钩尾销",
@ -380,6 +421,13 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
}, },
{
id:"BSX",
name:"变速箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{ {
id:"FDJ", id:"FDJ",
name:"发动机", name:"发动机",
@ -414,14 +462,26 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{ {
id:"CZCLX1", tittle:"车辆底部检查",
name:"车轴齿轮箱1", text:"",
devices: [
{
id:"FLP",
name:"法兰盘",
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车辆底部检查",
text:"",
devices:[
{ {
id:"ZJHXX", id:"ZJHXX",
name:"中间换向箱", name:"中间换向箱",
@ -435,7 +495,13 @@ export function ZzwwTrain() {
color:"#ff0000", color:"#ff0000",
status:"", status:"",
value:"未检查", value:"未检查",
}
]
}, },
{
tittle:"车上检查",
text:"",
devices:[
{ {
id:"CC", id:"CC",
name:"车窗", name:"车窗",
@ -457,5 +523,8 @@ export function ZzwwTrain() {
status:"", status:"",
value:"未检查", value:"未检查",
} }
]
}
]; ];
} }

View File

@ -2,12 +2,10 @@
<div class="traintestpaneover" :style="{'background-image': 'url('+lessonbg+')'}"> <div class="traintestpaneover" :style="{'background-image': 'url('+lessonbg+')'}">
<div class="traintesttittle"> 待检查设备:</div> <div class="traintesttittle"> 待检查设备:</div>
<div class="addtraintestdivs" :style="{'color':item.color}" v-for="(item,index) in trainDeviceData.deviceList" @click="selsectTrainDevice(item)"> <div class="addtraintestdivs" :style="{'color':item.color}" v-for="(item,index) in trainDeviceData.deviceList[testIndex].devices" @click="selsectTrainDevice(item)">
{{item.name}}:{{item.value}} {{item.name}}:{{item.value}}
</div> </div>
<!-- <div class="addtraintestdiv"
:style="{'background-image': 'url('+localstatic+'/lesson3d/addbutton.png)'}"
@click="addjob(index)"></div> -->
</div> </div>
</template> </template>
@ -28,6 +26,7 @@
data() { data() {
return { return {
localstatic:JL3D_LOCAL_STATIC, localstatic:JL3D_LOCAL_STATIC,
testIndex:0,
jobList:[], jobList:[],
showJobList:false, showJobList:false,
showJob:false, showJob:false,
@ -45,6 +44,7 @@
}, },
mounted() { mounted() {
// this.initJobList(); // this.initJobList();
window.jl3dZzwwTrainTestUpdate = this.jl3dZzwwTrainTestUpdate;
}, },
beforeDestroy() { beforeDestroy() {
@ -63,19 +63,24 @@
initJobList(data){ initJobList(data){
this.jobList = data; this.jobList = data;
}, },
selectJob(item){ jl3dZzwwTrainTestUpdate(upname){
this.selectedJob = item; let nextText = true;
console.log(upname);
for(let td=0;td<this.trainDeviceData.deviceList[this.testIndex].devices.length;td++){
}, if(this.trainDeviceData.deviceList[this.testIndex].devices[td].id == upname){
addjob(index){ this.trainDeviceData.deviceList[this.testIndex].devices[td].color = "#fff";
this.selectedJob.controlList[index].data.push({ this.trainDeviceData.deviceList[this.testIndex].devices[td].value = "已检查";
cname:this.generateUUID(), }
text:"内容",
explainRole:"角色", if(this.trainDeviceData.deviceList[this.testIndex].devices[td].color != "#fff"){
nextNode:"null", nextText = false;
sceneId:this.lessonData.lessonData.lessonProgress[this.lessonEditIndex].id, }
type:"",
}); }
if(nextText && this.testIndex<=this.trainDeviceData.deviceList.length){
this.testIndex += 1;
}
}, },
selsectTrainDevice(selectTool,jobList){ selsectTrainDevice(selectTool,jobList){