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

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);
if(intersects.length>0){
for(let td=0;td<trainDeviceList.length;td++){
if(trainDeviceList[td].id == intersects[0].object.name){
trainDeviceList[td].color = "#fff";
trainDeviceList[td].value = "已检查";
}
}
jl3dZzwwTrainTestUpdate(intersects[0].object.name);
}
}

View File

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

View File

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