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

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

@ -3,459 +3,528 @@ export function ZzwwTrain() {
let scope = this; let scope = this;
this.deviceList = [ this.deviceList = [
{ {
id:"ZLQ", tittle:"防溜防护检查",
name:"止轮器", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZLQ",
name:"止轮器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"FD", tittle:"车辆端部检查(前端)",
name:"风笛", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"FD",
name:"风笛",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"SDD",
name:"上大灯",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XDD",
name:"下大灯",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"YGQ",
name:"雨刮器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"DFBL",
name:"挡风玻璃",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"BYC",
name:"百叶窗",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"DCFS",
name:"调车扶手",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XTB",
name:"下踏板",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"SD", tittle:"车辆端部检查(前端)",
name:"上灯", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"CG",
name:"车钩",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GS",
name:"钩舌",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"SDD", tittle:"车辆端部检查(前端)",
name:"上大灯", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZJSM",
name:"折角塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDGRG",
name:"制动管软管",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"XDD", tittle:"车辆端部检查(前端)",
name:"下大灯", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"FCD",
name:"防尘堵",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"AQL",
name:"安全链",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"YGQ", tittle:"车辆端部检查(前端)",
name:"雨X刮器", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"PZQ",
name:"排障器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"SSQ",
name:"扫石器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"DFBL", tittle:"左前部",
name:"挡风玻璃", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZJF",
name:"中继阀",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZYFG",
name:"作用风缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDSM",
name:"制动塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"JCXHCGQ",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"TJ",
name:"托架",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"KYJ",
name:"空压机",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"KYJPD",
name:"空压机皮带",
color:"#ff0000",
status:"",
value:"未检查",
}
// ,
// {
// id:"PDYL",
// name:"皮带压轮",
// color:"#ff0000",
// status:"",
// value:"未检查",
// }
]
}, },
{ {
id:"BYC", tittle:"转向架左侧",
name:"百叶窗", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZXTH",
name:"轴箱弹簧",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZXDG",
name:"轴箱端盖",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"YYJZQ",
name:"液压减震器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CL",
name:"车轮踏面",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"DCFS", tittle:"转向架左侧",
name:"调车扶手", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"QYZ",
name:"牵引座",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"QYG",
name:"牵引杆",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GB",
name:"拐臂",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"XTB", tittle:"转向架左侧",
name:"下踏板", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"SDCGQ",
name:"速度传感器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"CG", tittle:"转向架左侧",
name:"车钩", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZDG",
name:"制动缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZW",
name:"闸瓦",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZWT",
name:"闸瓦托",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZWTZG",
name:"闸瓦调整杆",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"GS", tittle:"车辆中部(左侧)",
name:"钩舌", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"RYX",
name:"燃油箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XDCX",
name:"蓄电池箱",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"CG1", tittle:"左侧后部",
name:"车钩", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"RLZDJAZZ",
name:"人力制动机",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"ZJSM", tittle:"车辆(右侧)",
name:"折角塞门", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZFG",
name:"总风缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZFGSM",
name:"总风缸塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XYQ",
name:"消音器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"ZDGRG", tittle:"右前部",
name:"制动管软管", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"KLQ",
name:"空滤器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"JCXHCGQ",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
]
}, },
{ {
id:"ZDGRG1", tittle:"车辆底部检查",
name:"制动管软管", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"GWS",
name:"钩尾销",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"BSX",
name:"变速箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"FDJ",
name:"发动机",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CL",
name:"车轮",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CZ",
name:"车轴",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CDZ",
name:"传动轴",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CZCLX",
name:"车轴齿轮箱",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"FCD", tittle:"车辆底部检查",
name:"防尘堵", text:"",
color:"#ff0000", devices: [
status:"", {
value:"未检查", id:"FLP",
name:"法兰盘",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"AQL", tittle:"车辆底部检查",
name:"安全链", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"ZJHXX",
name:"中间换向箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GDZ",
name:"固定轴",
color:"#ff0000",
status:"",
value:"未检查",
}
]
}, },
{ {
id:"AQL1", tittle:"车上检查",
name:"安全链", text:"",
color:"#ff0000", devices:[
status:"", {
value:"未检查", id:"CC",
}, name:"车窗",
{ color:"#ff0000",
id:"PZQ", status:"",
name:"排障器", value:"未检查",
color:"#ff0000", },
status:"", {
value:"未检查", id:"CM",
}, name:"车门",
{ color:"#ff0000",
id:"PZQ1", status:"",
name:"排障器", value:"未检查",
color:"#ff0000", },
status:"", {
value:"未检查", id:"BPX",
}, name:"备品箱",
{ color:"#ff0000",
id:"PSQ", status:"",
name:"排石器", value:"未检查",
color:"#ff0000", }
status:"", ]
value:"未检查",
},
{
id:"PSQ1",
name:"排石器1",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZJF",
name:"中继阀",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZYFG",
name:"作用风缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDSM",
name:"制动塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"",
name:"",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDSM1",
name:"制动塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"JCXHCGQ",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"TJ",
name:"托架",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"KYJ",
name:"空压机",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"KYJPD",
name:"空压机皮带",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"PDYL",
name:"皮带压轮",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZXTH",
name:"轴箱弹簧",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZXDG",
name:"轴箱端盖",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"YYJZQ",
name:"液压减震器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CLTM",
name:"车轮踏面",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"QYZ",
name:"牵引座",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"QYG",
name:"牵引杆",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GB",
name:"拐臂",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"SDCGQ",
name:"速度传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDG",
name:"制动缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZW",
name:"闸瓦",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZWT",
name:"闸瓦托",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZWTZG",
name:"闸瓦调整杆",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"RYX",
name:"燃油箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"YW",
name:"油位",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XDCX",
name:"蓄电池箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"RLZDJAZZ",
name:"人力制动机",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZFG",
name:"总风缸",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XYQ",
name:"消音器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"JCXHCGQ1",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"KLQ",
name:"空滤器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GWS",
name:"钩尾销",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"FDJ",
name:"发动机",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CL",
name:"车轮",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CZ",
name:"车轴",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CDZ",
name:"传动轴",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CZCLX",
name:"车轴齿轮箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CZCLX1",
name:"车轴齿轮箱1",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZJHXX",
name:"中间换向箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"GDZ",
name:"固定轴",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CC",
name:"车窗",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"CM",
name:"车门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"BPX",
name:"备品箱",
color:"#ff0000",
status:"",
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){