QingXiCheAndQvCarEventClick.js 109 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740
  1. import { QingXiCheAndQvCarEvent } from "./QingXiCheAndQvCarEvent.js";
  2. import { QingXiCheAndQvComHighlightLayer } from "./QingXiCheAndQvComHighlightLayer.js";
  3. import { ComVal } from "../common/ComVal.js";
  4. import { WindowEvent } from "../../WindowQingXiCheAndQv/js/WindowEvent.js";
  5. import { QingXiCheAndQvComRes } from '../js/QingXiCheAndQvComRes.js';
  6. import { QingXiCheAndQvComClipPlaneMeshEvent } from './QingXiCheAndQvComClipPlaneMeshEvent.js';
  7. import { QingXiCheAdnQvCarEventStep } from './QingXiCheAdnQvCarEventStep.js';
  8. import { ElMessage, ElMessageBox } from 'element-plus';
  9. /**
  10. * 操作清洗车仿真 点击物体的时候触发 逻辑
  11. */
  12. export class QingXiCheAndQvCarEventClick {
  13. // 每次 new 出对象则会调用这个构造函数
  14. constructor() {
  15. /**
  16. * 三维世界对象 src\components\ThreeWorldEvent\js\QingXiCheAndQvThreeWorldEventMain.js
  17. */
  18. this.objThreeWorldEventMain = null;
  19. /**
  20. * 当前移动的物体列表,和对应的参数
  21. * 当数组存在目标的时候,则 拖拽的时候,目标物体跟着鼠标移动
  22. */
  23. this.moveMeshList = [];
  24. // 记录第一次点击拖拽时候的坐标
  25. this.moveMeshListClick = {
  26. "x" : 0, "y" : 0, "z" : 0
  27. };
  28. /**
  29. * 当前这些参数不等于null的时候,则说明再拖拽移动目标物体
  30. * 此时固定相机的坐标,和视角
  31. */
  32. this.moveCameraRadius = null;
  33. this.moveCameraAlpha = null;
  34. this.moveCameraBeta = null;
  35. // 记录最后因为 this.moveMeshList 逻辑,鼠标移动的坐标
  36. this.moveCoordinate = {
  37. "x" : 0, "y" : 0, "z" : 0
  38. };
  39. // 是否开启每帧判断的逻辑
  40. this.renderEventBool = false;
  41. // 记录 QingXiCheAndQvProcessEventStore
  42. this.QingXiCheAndQvProcessEventStore = null;
  43. }
  44. // 实现单例模式
  45. static find() {
  46. if (!QingXiCheAndQvCarEventClick.instance) {
  47. QingXiCheAndQvCarEventClick.instance = new QingXiCheAndQvCarEventClick();
  48. }
  49. return QingXiCheAndQvCarEventClick.instance;
  50. }
  51. /**
  52. * 鼠标点击的时候
  53. * pickResult 点击的具体坐标,物体等信息
  54. */
  55. clickMeshEvent = function(pickResult) {
  56. let thisClass = this;
  57. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  58. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  59. let objIframe = objThreeWorldEventMain.objIframe;
  60. let objScene = objThreeWorldEventMain.objScene;
  61. let BABYLON = objThreeWorldEventMain.BABYLON;
  62. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  63. // console.log(
  64. // "鼠标点击的时候", pickResult
  65. // );
  66. // 处理中则不做处理
  67. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  68. return this;
  69. }
  70. let type = QingXiCheAndQvCarEvent.find().eventName;
  71. let meshMoveConfig = thisClass.meshMoveConfig(type);
  72. if (meshMoveConfig == null) {
  73. thisClass.moveMeshListReset();
  74. return;
  75. }
  76. // 目标物体
  77. let pickedMesh = pickResult["pickedMesh"];
  78. if (typeof pickedMesh["id"] != "string") {
  79. return;
  80. }
  81. let meshId = pickedMesh["id"];
  82. // 点击的坐标
  83. let pickedPoint = pickResult["pickedPoint"];
  84. let meshList = meshMoveConfig["meshList"];
  85. let meshJson = meshMoveConfig["meshJson"];
  86. // 点击的不是在物体的列表里的时候
  87. if (meshJson[meshId] == null || meshJson[meshId] == undefined) {
  88. thisClass.moveMeshListReset();
  89. return;
  90. }
  91. let objSceneActiveCamera = ChengGuangYuanJing.CommonVal.find().objSceneActiveCamera;
  92. thisClass.moveCameraRadius = objSceneActiveCamera.radius;
  93. thisClass.moveCameraAlpha = objSceneActiveCamera.alpha;
  94. thisClass.moveCameraBeta = objSceneActiveCamera.beta;
  95. thisClass.moveMeshListClick = {
  96. "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
  97. };
  98. console.log(
  99. "thisClass.moveMeshListClick",
  100. thisClass.moveMeshListClick
  101. );
  102. thisClass.moveMeshList = [];
  103. // 记录点击的时候的物体的坐标
  104. for (let i = 0; i < meshList.length; i++) {
  105. let thisMeshId = meshList[i];
  106. let thisObjMesh = objScene.getMeshById(thisMeshId);
  107. if (thisObjMesh != null && thisObjMesh != undefined) {
  108. // 设置为不可选中
  109. thisObjMesh.isPickable = false;
  110. let addJson = {
  111. "meshId" : thisObjMesh.id,
  112. "x" : thisObjMesh.absolutePosition.x,
  113. "y" : thisObjMesh.absolutePosition.y,
  114. "z" : thisObjMesh.absolutePosition.z,
  115. };
  116. thisClass.moveMeshList.push(
  117. // 必须转换下,这样就是独立的对象
  118. JSON.parse(JSON.stringify(addJson))
  119. );
  120. }
  121. }
  122. return thisClass;
  123. }
  124. /**
  125. * 重置为不是拖拽逻辑
  126. */
  127. moveMeshListReset = function() {
  128. let thisClass = this;
  129. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  130. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  131. let objIframe = objThreeWorldEventMain.objIframe;
  132. let objScene = objThreeWorldEventMain.objScene;
  133. let BABYLON = objThreeWorldEventMain.BABYLON;
  134. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  135. // 先将对应的物体,恢复可以选中
  136. if (thisClass.moveMeshList.length > 0) {
  137. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  138. let thisConfig = thisClass.moveMeshList[i];
  139. let thisMeshId = thisConfig["meshId"];
  140. let thisObjMesh = objScene.getMeshById(thisMeshId);
  141. if (thisObjMesh != null && thisObjMesh != undefined) {
  142. // 设置为可选中
  143. thisObjMesh.isPickable = true;
  144. }
  145. }
  146. }
  147. thisClass.moveMeshList = [];
  148. thisClass.moveCameraRadius = null;
  149. thisClass.moveCameraAlpha = null;
  150. thisClass.moveCameraBeta = null;
  151. }
  152. /**
  153. * 更新被拖拽物体的位置
  154. */
  155. moveMeshListCoordinateUpdate = function() {
  156. let thisClass = this;
  157. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  158. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  159. let objIframe = objThreeWorldEventMain.objIframe;
  160. let objScene = objThreeWorldEventMain.objScene;
  161. let BABYLON = objThreeWorldEventMain.BABYLON;
  162. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  163. if (thisClass.moveMeshList.length > 0) {
  164. // 追加的xyz坐标
  165. var addPosition = {
  166. "x" : thisClass.moveCoordinate.x - thisClass.moveMeshListClick.x,
  167. "y" : thisClass.moveCoordinate.y - thisClass.moveMeshListClick.y,
  168. "z" : thisClass.moveCoordinate.z - thisClass.moveMeshListClick.z,
  169. };
  170. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  171. let thisConfig = thisClass.moveMeshList[i];
  172. let thisMeshId = thisConfig["meshId"];
  173. let thisObjMesh = objScene.getMeshById(thisMeshId);
  174. if (thisObjMesh != null && thisObjMesh != undefined) {
  175. // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
  176. thisObjMesh.setAbsolutePosition(
  177. new BABYLON.Vector3(
  178. parseFloat(thisConfig["x"]) + addPosition.x,
  179. parseFloat(thisConfig["y"]) + addPosition.y,
  180. parseFloat(thisConfig["z"]) + addPosition.z
  181. )
  182. );
  183. }
  184. }
  185. }
  186. }
  187. /**
  188. * 将当前的物体列表,回归到最初原始的坐标位置
  189. */
  190. moveMeshListResetPosition = function () {
  191. let thisClass = this;
  192. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  193. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  194. let objIframe = objThreeWorldEventMain.objIframe;
  195. let objScene = objThreeWorldEventMain.objScene;
  196. let BABYLON = objThreeWorldEventMain.BABYLON;
  197. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  198. if (thisClass.moveMeshList.length > 0) {
  199. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  200. let thisConfig = thisClass.moveMeshList[i];
  201. let thisMeshId = thisConfig["meshId"];
  202. let thisObjMesh = objScene.getMeshById(thisMeshId);
  203. if (thisObjMesh != null && thisObjMesh != undefined) {
  204. // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
  205. thisObjMesh.setAbsolutePosition(
  206. new BABYLON.Vector3(
  207. parseFloat(thisConfig["x"]),
  208. parseFloat(thisConfig["y"]),
  209. parseFloat(thisConfig["z"])
  210. )
  211. );
  212. }
  213. }
  214. }
  215. }
  216. /**
  217. * 鼠标移动的时候
  218. * pickResult 点击的具体坐标,物体等信息
  219. */
  220. clickMoveMeshEvent = function(pickResult) {
  221. let thisClass = this;
  222. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  223. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  224. let objIframe = objThreeWorldEventMain.objIframe;
  225. let objScene = objThreeWorldEventMain.objScene;
  226. let BABYLON = objThreeWorldEventMain.BABYLON;
  227. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  228. // console.log(
  229. // "鼠标移动的时候", pickResult
  230. // );
  231. // 处理中则不做处理
  232. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  233. return this;
  234. }
  235. // 此时移动的坐标
  236. let pickedPoint = pickResult["pickedPoint"];
  237. thisClass.moveCoordinate = {
  238. "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
  239. };
  240. thisClass.moveMeshListCoordinateUpdate();
  241. return thisClass;
  242. }
  243. /**
  244. * 判断是否拖拽到指定的坐标范围了
  245. * 范围内 返回 true , 否则返回 false
  246. */
  247. dragBool = function() {
  248. let thisClass = this;
  249. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  250. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  251. let objIframe = objThreeWorldEventMain.objIframe;
  252. let objScene = objThreeWorldEventMain.objScene;
  253. let BABYLON = objThreeWorldEventMain.BABYLON;
  254. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  255. // 当没有被点击的物体的时候,说明该逻辑是没有拖拽到附近的
  256. if (thisClass.moveMeshList.length <= 0) {
  257. return false;
  258. }
  259. // 最终应该拖拽到哪个坐标附近
  260. let targetPosition = {
  261. "x" : -0.00247241766192019,
  262. "y" : -0.8081836700439453,
  263. "z" : 36.005401611328125,
  264. }
  265. // 得到两点之间的距离
  266. let thisVector3distanceTo = BABYLON.Vector3.Distance(
  267. new BABYLON.Vector3(parseFloat(targetPosition.x), parseFloat(targetPosition.y), parseFloat(targetPosition.z)),
  268. new BABYLON.Vector3(parseFloat(thisClass.moveCoordinate.x), parseFloat(thisClass.moveCoordinate.y), parseFloat(thisClass.moveCoordinate.z))
  269. );
  270. // console.log(
  271. // "拖拽后的距离", thisVector3distanceTo
  272. // );
  273. if (thisVector3distanceTo <= 0.5) {
  274. return true;
  275. }
  276. return false;
  277. }
  278. /**
  279. * 每帧被执行,用于判断距离等情况使用
  280. */
  281. renderEvent = () => {
  282. let thisClass = this;
  283. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  284. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  285. let objIframe = objThreeWorldEventMain.objIframe;
  286. let objScene = objThreeWorldEventMain.objScene;
  287. let BABYLON = objThreeWorldEventMain.BABYLON;
  288. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  289. if (thisClass.renderEventBool == false) {
  290. return this;
  291. }
  292. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  293. return this;
  294. }
  295. let type = QingXiCheAndQvCarEvent.find().eventName;
  296. // console.log("每帧 renderEvent ---", type);
  297. switch (type) {
  298. case '行至车辆区域':
  299. let roleAndPositionTargetBool = objThreeWorldEventMain.roleAndPositionTargetBool();
  300. if (roleAndPositionTargetBool == true) {
  301. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  302. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  303. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  304. thisClass.renderEventBool = false;
  305. // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
  306. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  307. thisClass.downTimeEvent();
  308. }
  309. break;
  310. case '绕车一周':
  311. // console.log("绕车一周 每帧执行");
  312. let aroundTheCarPointBool = objThreeWorldEventMain.aroundTheCarPointBool();
  313. // console.log("绕车一周 每帧执行 ---", aroundTheCarPointBool);
  314. if (aroundTheCarPointBool == true) {
  315. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  316. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  317. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  318. thisClass.renderEventBool = false;
  319. // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
  320. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  321. thisClass.downTimeEvent();
  322. }
  323. break;
  324. }
  325. }
  326. /**
  327. * 统一处理完成当前任务的逻辑
  328. */
  329. downTimeEvent = () => {
  330. let thisClass = this;
  331. ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
  332. confirmButtonClass : 'el-button--success',
  333. confirmButtonText: '下一步',
  334. callback: (action) => {
  335. thisClass.QingXiCheAndQvProcessEventStore.obj.downTime = "" + new Date().getTime();
  336. },
  337. });
  338. }
  339. /**
  340. * 鼠标弹起的时候
  341. * 根据点击到的物体,和当前的流程,触发对应的逻辑
  342. * pickResult 点击的具体坐标,物体等信息
  343. */
  344. main = (pickResult) => {
  345. let thisClass = this;
  346. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  347. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  348. let objIframe = objThreeWorldEventMain.objIframe;
  349. let objScene = objThreeWorldEventMain.objScene;
  350. let BABYLON = objThreeWorldEventMain.BABYLON;
  351. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  352. console.log("typeClick 111111", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
  353. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  354. return this;
  355. }
  356. console.log("typeClick 222222", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
  357. var objMesh = pickResult.pickedMesh;
  358. var objPosition = pickResult.pickedPoint;
  359. // 获取点击对象的方向【 一定要加上 true,否则载入的获取模型的方向,会有问题 】
  360. // eslint-disable-next-line no-unused-vars
  361. var getNormal = pickResult.getNormal(true);
  362. let type = QingXiCheAndQvCarEvent.find().eventName;
  363. let dragBool = thisClass.dragBool();
  364. switch(type) {
  365. // 仿真模拟
  366. case '仿真模拟':
  367. break;
  368. // 人物换装
  369. case '人物换装':
  370. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  371. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  372. // 切换成正在处理中
  373. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  374. // 切换视角
  375. objIframeEdit.modelPeopleLook(3);
  376. objIframeEdit.cameraVisualAngleGetListNameGpsTo("穿衣服_2");
  377. objIframeEdit.roleShow(false);
  378. let thisTime = new Date().getTime();
  379. // 控制延迟逻辑
  380. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  381. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  382. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_鞋子', function() {
  383. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_裤子', function() {
  384. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_上衣', function() {
  385. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_安全帽', function() {
  386. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  387. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  388. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  389. thisClass.downTimeEvent();
  390. });
  391. });
  392. });
  393. });
  394. });
  395. }
  396. break;
  397. // 打开车门进入驾驶室
  398. case '打开车门进入驾驶室':
  399. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  400. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  401. // 切换成正在处理中
  402. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  403. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
  404. // 切换视角
  405. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  406. objIframeEdit.modelPeopleLook(3);
  407. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车打开车门");
  408. objIframeEdit.roleShow(false);
  409. let thisTime = new Date().getTime();
  410. // 控制延迟逻辑
  411. // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  412. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 3, function(fpsEventAddRet) {
  413. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  414. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
  415. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  416. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  417. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  418. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车进入副驾驶2");
  419. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  420. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  421. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  422. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  423. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  424. thisClass.downTimeEvent();
  425. });
  426. });
  427. });
  428. });
  429. });
  430. }
  431. break;
  432. // 确认手刹已拉起档位是P档然后发动车辆
  433. case '确认手刹已拉起档位是P档然后发动车辆':
  434. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  435. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  436. // 切换成正在处理中
  437. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  438. // 切换视角
  439. objIframeEdit.modelPeopleLook(3);
  440. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车切换挡位到空挡");
  441. objIframeEdit.roleShow(false);
  442. let thisTime = new Date().getTime();
  443. // 控制延迟逻辑
  444. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  445. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  446. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  447. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  448. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  449. thisClass.downTimeEvent();
  450. });
  451. }
  452. break;
  453. // 发动车辆
  454. case '发动车辆':
  455. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  456. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  457. // 切换成正在处理中
  458. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  459. // 切换视角
  460. objIframeEdit.modelPeopleLook(3);
  461. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车启动车辆");
  462. objIframeEdit.roleShow(false);
  463. let thisTime = new Date().getTime();
  464. // 控制延迟逻辑
  465. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  466. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  467. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_旋转钥匙', function() {
  468. QingXiCheAndQvCarEvent.find().carOpen(true);
  469. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  470. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  471. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  472. thisClass.downTimeEvent();
  473. // // 切换视角
  474. // objIframeEdit.modelPeopleLook(3);
  475. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
  476. // objIframeEdit.roleShow(false);
  477. // thisTime = new Date().getTime();
  478. // // 控制延迟逻辑
  479. // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  480. // ComVal.find().fpsEventDel(fpsEventAddRet.code);
  481. // QingXiCheAndQvCarEvent.find().eventEnd = 2;
  482. // QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  483. // QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  484. // });
  485. });
  486. });
  487. }
  488. break;
  489. // 打开车辆双闪同时开启工作双闪灯
  490. case '打开车辆双闪同时开启工作双闪灯':
  491. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  492. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  493. // 控制延迟逻辑
  494. ComVal.find().fpsEventAdd("type_click_" + new Date().getTime(), {}, 1000, function(fpsEventAddRet) {
  495. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  496. // 切换成正在处理中
  497. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  498. QingXiCheAndQvCarEvent.find().carShuangShanOpen(true);
  499. // 切换视角
  500. objIframeEdit.modelPeopleLook(3);
  501. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车开启双闪");
  502. objIframeEdit.roleShow(false);
  503. let thisTime = new Date().getTime();
  504. // 控制延迟逻辑
  505. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  506. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  507. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  508. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  509. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  510. thisClass.downTimeEvent();
  511. });
  512. });
  513. }
  514. break;
  515. // 踩下车辆离合器5秒
  516. case '踩下车辆离合器5秒':
  517. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  518. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  519. // 切换成正在处理中
  520. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  521. // 切换视角
  522. objIframeEdit.modelPeopleLook(3);
  523. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车踩离合5秒");
  524. objIframeEdit.roleShow(false);
  525. let thisTime = new Date().getTime();
  526. // 控制延迟逻辑
  527. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  528. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  529. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
  530. WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
  531. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  532. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  533. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  534. thisClass.downTimeEvent();
  535. });
  536. });
  537. });
  538. }
  539. break;
  540. // 按下取力器开关
  541. case '按下取力器开关':
  542. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  543. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  544. // 切换成正在处理中
  545. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  546. // 切换视角
  547. objIframeEdit.modelPeopleLook(3);
  548. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
  549. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车按下取力器开关");
  550. objIframeEdit.roleShow(false);
  551. let thisTime = new Date().getTime();
  552. // 控制延迟逻辑
  553. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  554. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  555. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  556. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  557. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  558. thisClass.downTimeEvent();
  559. });
  560. }
  561. break;
  562. // 缓慢抬起离合器
  563. case '缓慢抬起离合器':
  564. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  565. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  566. // 切换成正在处理中
  567. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  568. // 切换视角
  569. objIframeEdit.modelPeopleLook(3);
  570. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("抬起离合器踏板2");
  571. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车缓慢抬起离合器");
  572. objIframeEdit.roleShow(false);
  573. let thisTime = new Date().getTime();
  574. // 控制延迟逻辑
  575. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  576. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  577. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('缓慢抬起离合器', function() {
  578. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  579. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  580. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  581. thisClass.downTimeEvent();
  582. });
  583. });
  584. }
  585. break;
  586. // 确定车辆双闪和工作箭头等是否正常
  587. case '确定车辆双闪和工作箭头等是否正常':
  588. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  589. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  590. // 切换成正在处理中
  591. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  592. // 切换视角
  593. objIframeEdit.modelPeopleLook(3);
  594. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
  595. objIframeEdit.roleShow(false);
  596. let thisTime = new Date().getTime();
  597. // 控制延迟逻辑
  598. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  599. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  600. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  601. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  602. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  603. thisClass.downTimeEvent();
  604. });
  605. }
  606. break;
  607. // 下车
  608. case '下车':
  609. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  610. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  611. // 切换成正在处理中
  612. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  613. // 切换视角
  614. objIframeEdit.modelPeopleLook(3);
  615. objIframeEdit.cameraVisualAngleGetListNameGpsTo("启动");
  616. objIframeEdit.roleShow(false);
  617. let thisTime = new Date().getTime();
  618. // 控制延迟逻辑
  619. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  620. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  621. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
  622. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车下车_1");
  623. // 控制延迟逻辑
  624. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 2, function(fpsEventAddRet) {
  625. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  626. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  627. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  628. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  629. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  630. thisClass.downTimeEvent();
  631. });
  632. });
  633. });
  634. });
  635. }
  636. break;
  637. // 下车确定安全灯显示是否正常
  638. case '下车确定安全灯显示是否正常':
  639. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  640. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  641. // 切换成正在处理中
  642. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  643. // QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  644. // 切换视角
  645. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  646. objIframeEdit.modelPeopleLook(3);
  647. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("下车观察各项灯光");
  648. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定安全灯是否正常");
  649. objIframeEdit.roleShow(false);
  650. let thisTime = new Date().getTime();
  651. // 控制延迟逻辑
  652. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  653. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  654. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  655. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  656. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  657. thisClass.downTimeEvent();
  658. });
  659. // });
  660. }
  661. break;
  662. // 在施工范围放置警示标识
  663. case '在施工范围放置警示标识':
  664. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  665. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  666. // 切换成正在处理中
  667. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  668. // 切换视角
  669. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();// 先记录下当前视角
  670. objIframeEdit.modelPeopleLook(3);
  671. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车摆放安全桩");
  672. objIframeEdit.roleShow(false);
  673. let thisTime = new Date().getTime();
  674. // 控制延迟逻辑
  675. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  676. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  677. QingXiCheAndQvComClipPlaneMeshEvent.find().anQuanZhuangLookYes(function() {
  678. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  679. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  680. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  681. thisClass.downTimeEvent();
  682. });
  683. });
  684. }
  685. break;
  686. // 从水管固定座上拧下高压水管
  687. case '从水管固定座上拧下高压水管':
  688. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  689. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  690. // 切换成正在处理中
  691. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  692. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  693. // 切换视角
  694. objIframeEdit.modelPeopleLook(3);
  695. objIframeEdit.cameraVisualAngleGetListNameGpsTo("从水管固定座上拧下高压水管2");
  696. objIframeEdit.roleShow(false);
  697. let thisTime = new Date().getTime();
  698. // 控制延迟逻辑
  699. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  700. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  701. // QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
  702. QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes_2(function() {
  703. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  704. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  705. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  706. thisClass.downTimeEvent();
  707. });
  708. });
  709. }
  710. break;
  711. // 调整卷筒器到合适位置
  712. case '调整卷筒器到合适位置':
  713. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  714. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  715. // 切换成正在处理中
  716. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  717. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  718. // 切换视角
  719. objIframeEdit.modelPeopleLook(3);
  720. objIframeEdit.cameraVisualAngleGetListNameGpsTo("调整卷筒器到合适位置2");
  721. objIframeEdit.roleShow(false);
  722. let thisTime = new Date().getTime();
  723. // 控制延迟逻辑
  724. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  725. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  726. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_1', function() {
  727. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_2', function() {
  728. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  729. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  730. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  731. thisClass.downTimeEvent();
  732. });
  733. });
  734. });
  735. }
  736. break;
  737. // 取出高压水管并放入布管器内
  738. case '取出高压水管并放入布管器内':
  739. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  740. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  741. // 切换成正在处理中
  742. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  743. // 切换视角
  744. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  745. objIframeEdit.modelPeopleLook(3);
  746. objIframeEdit.cameraVisualAngleGetListNameGpsTo("取出高压水管并放入布管器内2");
  747. objIframeEdit.roleShow(false);
  748. let thisTime = new Date().getTime();
  749. // 控制延迟逻辑
  750. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  751. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  752. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes(function() {
  753. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  754. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  755. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  756. thisClass.downTimeEvent();
  757. });
  758. });
  759. }
  760. break;
  761. // 套上高压水管护管器
  762. case '套上高压水管护管器':
  763. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  764. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  765. // 切换成正在处理中
  766. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  767. // 切换视角
  768. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  769. objIframeEdit.modelPeopleLook(3);
  770. objIframeEdit.cameraVisualAngleGetListNameGpsTo("套上高压水管护管器2");
  771. objIframeEdit.roleShow(false);
  772. let thisTime = new Date().getTime();
  773. // 控制延迟逻辑
  774. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  775. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  776. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_套上高压水管护管器', function() {
  777. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  778. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  779. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  780. thisClass.downTimeEvent();
  781. // QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
  782. // QingXiCheAndQvCarEvent.find().eventEnd = 2;
  783. // QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  784. // QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  785. // });
  786. });
  787. });
  788. }
  789. break;
  790. // 安装合适的高压喷头
  791. case '安装合适的高压喷头':
  792. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  793. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  794. // 切换成正在处理中
  795. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  796. // 切换视角
  797. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  798. objIframeEdit.modelPeopleLook(3);
  799. objIframeEdit.cameraVisualAngleGetListNameGpsTo("安装合适的高压喷头2");
  800. objIframeEdit.roleShow(false);
  801. let thisTime = new Date().getTime();
  802. // 控制延迟逻辑
  803. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  804. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  805. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_打开箱子', function() {
  806. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置', function() {
  807. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
  808. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  809. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  810. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  811. thisClass.downTimeEvent();
  812. });
  813. });
  814. });
  815. });
  816. }
  817. break;
  818. // 将高压水管放入待施工的管道内
  819. case '将高压水管放入待施工的管道内':
  820. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  821. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  822. // 切换成正在处理中
  823. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  824. // 切换视角
  825. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  826. objIframeEdit.modelPeopleLook(3);
  827. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管放入待施工的管道内2");
  828. objIframeEdit.roleShow(false);
  829. let thisTime = new Date().getTime();
  830. // 控制延迟逻辑
  831. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  832. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  833. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_打开井盖', function() {
  834. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_弯曲', function() {
  835. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_下井', function() {
  836. });
  837. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_2(function() {
  838. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  839. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  840. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  841. thisClass.downTimeEvent();
  842. });
  843. });
  844. });
  845. });
  846. }
  847. break;
  848. // 在触屏操作面板上将管长清零
  849. case '在触屏操作面板上将管长清零':
  850. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  851. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  852. // 切换成正在处理中
  853. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  854. // 切换视角
  855. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  856. objIframeEdit.modelPeopleLook(3);
  857. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在触屏操作面板上将管长清零2");
  858. objIframeEdit.roleShow(false);
  859. let thisTime = new Date().getTime();
  860. // 控制延迟逻辑
  861. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  862. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  863. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  864. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  865. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  866. thisClass.downTimeEvent();
  867. });
  868. }
  869. break;
  870. // 在安全的情况开启冲水开关
  871. case '在安全的情况开启冲水开关':
  872. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  873. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  874. // 切换成正在处理中
  875. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  876. // 切换视角
  877. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  878. objIframeEdit.modelPeopleLook(3);
  879. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在安全的情况开启冲水开关2");
  880. objIframeEdit.roleShow(false);
  881. let thisTime = new Date().getTime();
  882. // 控制延迟逻辑
  883. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  884. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  885. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  886. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  887. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  888. thisClass.downTimeEvent();
  889. });
  890. }
  891. break;
  892. // 根据现场工况调节冲水压力
  893. case '根据现场工况调节冲水压力':
  894. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  895. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  896. // 切换成正在处理中
  897. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  898. // 切换视角
  899. objIframeEdit.modelPeopleLook(3);
  900. objIframeEdit.cameraVisualAngleGetListNameGpsTo("根据现场工况调节冲水压力2");
  901. objIframeEdit.roleShow(false);
  902. let thisTime = new Date().getTime();
  903. // 控制延迟逻辑
  904. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  905. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  906. QingXiCheAdnQvCarEventStep.find().waterEvent(true);
  907. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  908. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  909. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  910. thisClass.downTimeEvent();
  911. });
  912. }
  913. break;
  914. // 疏通管道后减小油门到初始状态
  915. case '疏通管道后减小油门到初始状态':
  916. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  917. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  918. // 切换成正在处理中
  919. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  920. // 切换视角
  921. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  922. objIframeEdit.modelPeopleLook(3);
  923. objIframeEdit.cameraVisualAngleGetListNameGpsTo("疏通管道后减小油门到初始状态2");
  924. objIframeEdit.roleShow(false);
  925. let thisTime = new Date().getTime();
  926. // 控制延迟逻辑
  927. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  928. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  929. QingXiCheAdnQvCarEventStep.find().waterEvent(false);
  930. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  931. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  932. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  933. thisClass.downTimeEvent();
  934. });
  935. }
  936. break;
  937. // 带压收回高压水管
  938. case '带压收回高压水管':
  939. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  940. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  941. // 切换成正在处理中
  942. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  943. // 切换视角
  944. objIframeEdit.modelPeopleLook(3);
  945. objIframeEdit.cameraVisualAngleGetListNameGpsTo("带压收回高压水管2");
  946. objIframeEdit.roleShow(false);
  947. let thisTime = new Date().getTime();
  948. // 控制延迟逻辑
  949. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  950. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  951. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  952. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  953. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  954. });
  955. }
  956. break;
  957. // 至触摸屏关闭冲水开关
  958. case '至触摸屏关闭冲水开关':
  959. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  960. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  961. // 切换成正在处理中
  962. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  963. // 切换视角
  964. objIframeEdit.modelPeopleLook(3);
  965. objIframeEdit.cameraVisualAngleGetListNameGpsTo("至触摸屏关闭冲水开关2");
  966. objIframeEdit.roleShow(false);
  967. let thisTime = new Date().getTime();
  968. // 控制延迟逻辑
  969. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  970. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  971. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  972. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  973. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  974. });
  975. }
  976. break;
  977. // 缓慢收回高压水管
  978. case '缓慢收回高压水管':
  979. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  980. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  981. // 切换成正在处理中
  982. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  983. // 切换视角
  984. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  985. objIframeEdit.modelPeopleLook(3);
  986. objIframeEdit.cameraVisualAngleGetListNameGpsTo("缓慢收回高压水管2");
  987. objIframeEdit.roleShow(false);
  988. let thisTime = new Date().getTime();
  989. // 控制延迟逻辑
  990. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  991. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  992. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_变直', function() {
  993. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_关闭井盖', function() {
  994. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_地面', function() {
  995. });
  996. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_3(function() {
  997. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  998. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  999. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1000. thisClass.downTimeEvent();
  1001. });
  1002. });
  1003. });
  1004. });
  1005. }
  1006. break;
  1007. // 拆卸高压喷头放入喷头机箱内
  1008. case '拆卸高压喷头放入喷头机箱内':
  1009. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1010. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1011. // 切换成正在处理中
  1012. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1013. // 切换视角
  1014. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1015. objIframeEdit.modelPeopleLook(3);
  1016. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拆卸高压喷头放入喷头机箱内2");
  1017. objIframeEdit.roleShow(false);
  1018. let thisTime = new Date().getTime();
  1019. // 控制延迟逻辑
  1020. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1021. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1022. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_喷头放入箱内', function() {
  1023. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_箱子盖起', function() {
  1024. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1025. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1026. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1027. thisClass.downTimeEvent();
  1028. });
  1029. });
  1030. });
  1031. }
  1032. break;
  1033. // 收起高压水管将卷筒恢复到初始状态
  1034. case '收起高压水管将卷筒恢复到初始状态':
  1035. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1036. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1037. // 切换成正在处理中
  1038. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1039. // 切换视角
  1040. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1041. objIframeEdit.modelPeopleLook(3);
  1042. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
  1043. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车收回高压水管并拆卸高压喷头放入喷头机箱内1");
  1044. objIframeEdit.roleShow(false);
  1045. let thisTime = new Date().getTime();
  1046. // 控制延迟逻辑
  1047. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1048. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1049. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_4(function() {
  1050. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器回到原始位置', function() {
  1051. objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
  1052. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1053. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1054. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes_2(function() {
  1055. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_2', function() {
  1056. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_1', function() {
  1057. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1058. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1059. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1060. thisClass.downTimeEvent();
  1061. });
  1062. });
  1063. });
  1064. });
  1065. });
  1066. });
  1067. });
  1068. }
  1069. break;
  1070. // 将高压水管拧到水管固定座
  1071. case '将高压水管拧到水管固定座':
  1072. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1073. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1074. // 切换成正在处理中
  1075. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1076. // 切换视角
  1077. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1078. objIframeEdit.modelPeopleLook(3);
  1079. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管拧到水管固定座2");
  1080. objIframeEdit.roleShow(false);
  1081. let thisTime = new Date().getTime();
  1082. // 控制延迟逻辑
  1083. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1084. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1085. QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
  1086. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1087. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1088. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1089. thisClass.downTimeEvent();
  1090. });
  1091. });
  1092. }
  1093. break;
  1094. // 小卷筒使用方法_开启卷帘门
  1095. case '小卷筒使用方法_开启卷帘门':
  1096. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1097. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1098. // 切换成正在处理中
  1099. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1100. // 切换视角
  1101. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1102. objIframeEdit.modelPeopleLook(3);
  1103. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定2");
  1104. objIframeEdit.roleShow(false);
  1105. let thisTime = new Date().getTime();
  1106. // 控制延迟逻辑
  1107. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1108. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1109. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_开启卷帘门', function() {
  1110. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1111. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1112. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1113. thisClass.downTimeEvent();
  1114. });
  1115. });
  1116. }
  1117. break;
  1118. // 小卷筒使用方法_开启车身侧门
  1119. case '小卷筒使用方法_开启车身侧门':
  1120. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1121. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1122. // 切换成正在处理中
  1123. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1124. // 切换视角
  1125. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1126. objIframeEdit.modelPeopleLook(3);
  1127. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定1");
  1128. objIframeEdit.roleShow(false);
  1129. let thisTime = new Date().getTime();
  1130. // 控制延迟逻辑
  1131. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1132. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1133. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_开启车身侧门', function() {
  1134. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1135. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1136. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1137. thisClass.downTimeEvent();
  1138. });
  1139. });
  1140. }
  1141. break;
  1142. // 小卷筒使用方法_拉出水管到需要的长度固定
  1143. case '小卷筒使用方法_拉出水管到需要的长度固定':
  1144. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1145. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1146. // 切换成正在处理中
  1147. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1148. // 切换视角
  1149. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1150. objIframeEdit.modelPeopleLook(3);
  1151. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定2");
  1152. objIframeEdit.roleShow(false);
  1153. let thisTime = new Date().getTime();
  1154. // 控制延迟逻辑
  1155. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1156. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1157. QingXiCheAndQvComClipPlaneMeshEvent.find().shuiQiangGuanLook_1(function() {
  1158. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1159. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1160. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1161. thisClass.downTimeEvent();
  1162. });
  1163. });
  1164. }
  1165. break;
  1166. // 小卷筒使用方法_安装手持水枪
  1167. case '小卷筒使用方法_安装手持水枪':
  1168. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1169. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1170. // 切换成正在处理中
  1171. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1172. // 切换视角
  1173. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1174. objIframeEdit.modelPeopleLook(3);
  1175. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车安装手持水枪");
  1176. objIframeEdit.roleShow(false);
  1177. let thisTime = new Date().getTime();
  1178. // 控制延迟逻辑
  1179. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1180. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1181. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_安装手持水枪', function() {
  1182. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1183. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1184. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1185. thisClass.downTimeEvent();
  1186. });
  1187. });
  1188. }
  1189. break;
  1190. // 小卷筒使用方法_切换手动三通阀
  1191. case '小卷筒使用方法_切换手动三通阀':
  1192. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1193. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1194. // 切换成正在处理中
  1195. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1196. // 切换视角
  1197. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1198. objIframeEdit.modelPeopleLook(3);
  1199. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车切换手动三通阀");
  1200. objIframeEdit.roleShow(false);
  1201. let thisTime = new Date().getTime();
  1202. // 控制延迟逻辑
  1203. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1204. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1205. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1206. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1207. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1208. thisClass.downTimeEvent();
  1209. });
  1210. }
  1211. break;
  1212. // 小卷筒使用方法_扣动手持水枪的开关即可出水
  1213. case '小卷筒使用方法_扣动手持水枪的开关即可出水':
  1214. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1215. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1216. // 切换成正在处理中
  1217. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1218. // 切换视角
  1219. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1220. objIframeEdit.modelPeopleLook(3);
  1221. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车扣动手持水枪的开关即可出水");
  1222. objIframeEdit.roleShow(false);
  1223. let thisTime = new Date().getTime();
  1224. // 控制延迟逻辑
  1225. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1226. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1227. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1228. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1229. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1230. thisClass.downTimeEvent();
  1231. });
  1232. }
  1233. break;
  1234. // 回到驾驶室踩下车辆离合器5秒
  1235. case '回到驾驶室踩下车辆离合器5秒':
  1236. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1237. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1238. // 切换成正在处理中
  1239. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1240. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
  1241. WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
  1242. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1243. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1244. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1245. });
  1246. });
  1247. }
  1248. break;
  1249. // 关闭取力器开关
  1250. case '关闭取力器开关':
  1251. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1252. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1253. // 切换成正在处理中
  1254. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1255. // 切换视角
  1256. objIframeEdit.modelPeopleLook(3);
  1257. objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
  1258. objIframeEdit.roleShow(false);
  1259. let thisTime = new Date().getTime();
  1260. // 控制延迟逻辑
  1261. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1262. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1263. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1264. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1265. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1266. });
  1267. }
  1268. break;
  1269. // 关闭车辆双闪和工作双闪箭头灯
  1270. case '关闭车辆双闪和工作双闪箭头灯':
  1271. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1272. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1273. // 切换成正在处理中
  1274. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1275. QingXiCheAndQvCarEvent.find().carShuangShanOpen(false);
  1276. // 切换视角
  1277. objIframeEdit.modelPeopleLook(3);
  1278. objIframeEdit.cameraVisualAngleGetListNameGpsTo("打开工作双闪箭头灯");
  1279. objIframeEdit.roleShow(false);
  1280. let thisTime = new Date().getTime();
  1281. // 控制延迟逻辑
  1282. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1283. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1284. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1285. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1286. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1287. });
  1288. }
  1289. break;
  1290. // 车辆正常熄火
  1291. case '车辆正常熄火':
  1292. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1293. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1294. // 切换成正在处理中
  1295. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1296. // 切换视角
  1297. objIframeEdit.modelPeopleLook(3);
  1298. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆");
  1299. objIframeEdit.roleShow(false);
  1300. let thisTime = new Date().getTime();
  1301. // 控制延迟逻辑
  1302. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1303. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1304. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_钥匙关闭_熄火', function() {
  1305. QingXiCheAndQvCarEvent.find().carOpen(false);
  1306. // 切换视角
  1307. objIframeEdit.modelPeopleLook(3);
  1308. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
  1309. objIframeEdit.roleShow(false);
  1310. thisTime = new Date().getTime();
  1311. // 控制延迟逻辑
  1312. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1313. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1314. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1315. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1316. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1317. });
  1318. });
  1319. });
  1320. }
  1321. break;
  1322. // //
  1323. // case '':
  1324. // break;
  1325. // //
  1326. // case '':
  1327. // break;
  1328. // 已完成所有任务
  1329. case 'equipmentRepositioningWork':
  1330. break;
  1331. // 数字修复虚拟仿真-将阀门关闭停止水流
  1332. case '数字修复虚拟仿真-将阀门关闭停止水流':
  1333. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1334. // 切换成正在处理中
  1335. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1336. // 切换视角
  1337. objIframeEdit.modelPeopleLook(3);
  1338. objIframeEdit.cameraVisualAngleGetListNameGpsTo("关闭阀门完成");
  1339. objIframeEdit.roleShow(false);
  1340. let thisTime = new Date().getTime();
  1341. // 控制延迟逻辑
  1342. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1343. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1344. // 停止水流
  1345. QingXiCheAdnQvCarEventStep.find().waterGuanEvent(false);
  1346. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1347. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1348. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1349. });
  1350. }
  1351. break;
  1352. // 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1353. case '数字修复虚拟仿真-将橡胶垫片放置到正确的位置':
  1354. // 切换成正在处理中
  1355. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1356. // 范围内
  1357. if (dragBool == true) {
  1358. // 回到原始位置
  1359. thisClass.moveMeshListResetPosition();
  1360. WindowEvent.find().WindowTxtViewOpenEvent(
  1361. // "现在播放橡胶垫片安装过程\n"
  1362. // +
  1363. "各类机械设备的法兰连接、轴承密封、泵体密封等部位都需要使用橡胶垫片,以保证设备的正常运行,防止润滑油、液压油等泄漏"
  1364. );
  1365. // WindowEvent.find().WindowVideoViewOpenEvent(
  1366. // QingXiCheAndQvCarEvent.find().videoJson["02"],
  1367. // { "自定义回调的字段" : "自定义回调的字段111" },
  1368. // function(WindowVideoViewOpenEventRes) {
  1369. // console.log(
  1370. // "WindowVideoViewOpenEventRes", WindowVideoViewOpenEventRes
  1371. // );
  1372. // }
  1373. // );
  1374. // 切换视角
  1375. objIframeEdit.modelPeopleLook(3);
  1376. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将橡胶垫片放置到正确的位置_完成");
  1377. objIframeEdit.roleShow(false);
  1378. let thisTime = new Date().getTime();
  1379. // 控制延迟逻辑
  1380. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1381. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1382. thisClass.xiangJiaoDianPianOk(function() {
  1383. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1384. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1385. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1386. });
  1387. });
  1388. } else {
  1389. // 回到原始位置
  1390. thisClass.moveMeshListResetPosition();
  1391. // 范围外
  1392. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1393. }
  1394. break;
  1395. // 数字修复虚拟仿真-将抱箍放置到正确的位置
  1396. case '数字修复虚拟仿真-将抱箍放置到正确的位置':
  1397. // 切换成正在处理中
  1398. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1399. // 范围内
  1400. if (dragBool == true) {
  1401. // 回到原始位置
  1402. thisClass.moveMeshListResetPosition();
  1403. WindowEvent.find().WindowTxtViewOpenEvent(
  1404. // "现在播放橡抱箍安装过程\n"
  1405. // +
  1406. "抱箍是一种用于抱住或箍住其他材料的紧固件,通过将两个或多个部件紧紧固定在一起,起到连接、支撑或加固的作用."
  1407. + "通常由箍板、翼板、拉结筋板、螺栓及内衬垫构成。其中,箍板是主要的抱紧部件,翼板用于增加连接面积或提供额外的支撑点,拉结筋板则增强箍板的强度和稳定性,螺栓用于将抱箍紧固,内衬垫则可增加摩擦力或保护被箍物体的表面"
  1408. );
  1409. // 切换视角
  1410. objIframeEdit.modelPeopleLook(3);
  1411. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将抱箍放置到正确的位置_完成");
  1412. objIframeEdit.roleShow(false);
  1413. let thisTime = new Date().getTime();
  1414. // 控制延迟逻辑
  1415. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1416. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1417. thisClass.baoGuOk(function() {
  1418. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1419. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1420. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1421. });
  1422. });
  1423. } else {
  1424. // 回到原始位置
  1425. thisClass.moveMeshListResetPosition();
  1426. // 范围外
  1427. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1428. }
  1429. break;
  1430. // 数字修复虚拟仿真-将插销安装到正确的位置
  1431. case '数字修复虚拟仿真-将插销安装到正确的位置':
  1432. // 切换成正在处理中
  1433. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1434. // 范围内
  1435. if (dragBool == true) {
  1436. // 回到原始位置
  1437. thisClass.moveMeshListResetPosition();
  1438. WindowEvent.find().WindowTxtViewOpenEvent(
  1439. // "现在播放插销安装过程\n"
  1440. // +
  1441. "通过将销杆插入对应的销孔中,实现物体之间的连接或锁定。利用销杆与销孔之间的配合精度和摩擦力,保持连接的稳定性。带有锁止机构的插销,通过特定的操作(如旋转、按压等)使锁止部件卡住销杆,防止其意外拔出,增强锁定效果。"
  1442. );
  1443. // 切换视角
  1444. objIframeEdit.modelPeopleLook(3);
  1445. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将插销安装到正确的位置_完成");
  1446. objIframeEdit.roleShow(false);
  1447. let thisTime = new Date().getTime();
  1448. // 控制延迟逻辑
  1449. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1450. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1451. thisClass.chaXiaoOk(function() {
  1452. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1453. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1454. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1455. });
  1456. });
  1457. } else {
  1458. // 回到原始位置
  1459. thisClass.moveMeshListResetPosition();
  1460. // 范围外
  1461. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1462. }
  1463. break;
  1464. // 数字修复虚拟仿真-将螺丝安装到正确的位置
  1465. case '数字修复虚拟仿真-将螺丝安装到正确的位置':
  1466. // 切换成正在处理中
  1467. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1468. // 范围内
  1469. if (dragBool == true) {
  1470. // 回到原始位置
  1471. thisClass.moveMeshListResetPosition();
  1472. WindowEvent.find().WindowTxtViewOpenEvent(
  1473. // "现在播放螺丝安装过程\n"
  1474. // +
  1475. "螺丝通常由头部和螺纹杆两部分组成。头部有不同的形状,如圆形、方形、六角形等,以便使用相应的工具进行拧紧或松开操作。螺纹杆上有螺旋状的螺纹,用于与螺母或带有内螺纹的部件配合。"
  1476. );
  1477. // 切换视角
  1478. objIframeEdit.modelPeopleLook(3);
  1479. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将螺丝安装到正确的位置_完成");
  1480. objIframeEdit.roleShow(false);
  1481. let thisTime = new Date().getTime();
  1482. // 控制延迟逻辑
  1483. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1484. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1485. thisClass.luoSiOk(function() {
  1486. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1487. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1488. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1489. });
  1490. });
  1491. } else {
  1492. // 回到原始位置
  1493. thisClass.moveMeshListResetPosition();
  1494. // 范围外
  1495. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1496. }
  1497. break;
  1498. // 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1499. case '数字修复虚拟仿真-用扳手将螺丝旋紧螺丝':
  1500. // 切换成正在处理中
  1501. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1502. // 范围内
  1503. if (dragBool == true) {
  1504. // 回到原始位置
  1505. thisClass.moveMeshListResetPosition();
  1506. WindowEvent.find().WindowTxtViewOpenEvent(
  1507. // "现在播放扳手使用过程\n"
  1508. // +
  1509. "扳手通常由头部和手柄两部分组成。头部是与螺栓或螺母接触并施加扭矩的部分,根据不同的类型有各种形状和结构;手柄则用于握持和施加力,一般为杆状,以提供足够的杠杆作用。"
  1510. );
  1511. // 切换视角
  1512. objIframeEdit.modelPeopleLook(3);
  1513. objIframeEdit.cameraVisualAngleGetListNameGpsTo("用扳手将螺丝旋紧螺丝_完成");
  1514. objIframeEdit.roleShow(false);
  1515. let thisTime = new Date().getTime();
  1516. // 控制延迟逻辑
  1517. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1518. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1519. thisClass.banShouOk(function() {
  1520. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1521. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1522. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1523. });
  1524. });
  1525. } else {
  1526. // 回到原始位置
  1527. thisClass.moveMeshListResetPosition();
  1528. // 范围外
  1529. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1530. }
  1531. break;
  1532. // //
  1533. // case '':
  1534. // break;
  1535. // //
  1536. // case '':
  1537. // break;
  1538. default:
  1539. break;
  1540. }
  1541. // 上面执行完成,固定执行如下逻辑
  1542. thisClass.moveMeshListReset();
  1543. }
  1544. /**
  1545. * 根据不同类型,触发对应物体列表高亮逻辑
  1546. * type 对应类型操作高亮
  1547. */
  1548. meshListComHighlightEvent = (type) => {
  1549. let thisClass = this;
  1550. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1551. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1552. let objIframe = objThreeWorldEventMain.objIframe;
  1553. let objScene = objThreeWorldEventMain.objScene;
  1554. let BABYLON = objThreeWorldEventMain.BABYLON;
  1555. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1556. let meshList = [];
  1557. // QingXiCheAndQvComHighlightLayer.find().delAll("自定义");
  1558. // 默认不闪烁
  1559. QingXiCheAndQvComHighlightLayer.find().flickerBool = false;
  1560. switch (type) {
  1561. case "数字修复虚拟仿真-将阀门关闭停止水流":
  1562. meshList = [
  1563. "model_1746598895146阀门_primitive0",
  1564. "model_1746598895146阀门_primitive1",
  1565. ];
  1566. // 开启闪烁逻辑
  1567. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1568. break;
  1569. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1570. meshList = [
  1571. "model_1746598895146橡胶垫",
  1572. ];
  1573. // 开启闪烁逻辑
  1574. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1575. break;
  1576. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1577. meshList = [
  1578. "model_1746598895146上箍",
  1579. "model_1746598895146插销轴",
  1580. "model_1746598895146下箍",
  1581. ];
  1582. // 开启闪烁逻辑
  1583. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1584. break;
  1585. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1586. meshList = [
  1587. "model_1746598895146插销1",
  1588. "model_1746598895146插销2",
  1589. ];
  1590. // 开启闪烁逻辑
  1591. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1592. break;
  1593. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1594. meshList = [
  1595. "model_1746598895146紧箍螺丝01",
  1596. "model_1746598895146紧箍螺丝02",
  1597. "model_1746598895146紧箍螺丝03",
  1598. ];
  1599. // 开启闪烁逻辑
  1600. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1601. break;
  1602. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1603. meshList = [
  1604. "model_1746598895146扳手",
  1605. ];
  1606. // 开启闪烁逻辑
  1607. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1608. break;
  1609. case "":
  1610. break;
  1611. }
  1612. for (let i = 0; i < meshList.length; i++) {
  1613. let meshId = meshList[i];
  1614. let objMesh = objScene.getMeshById(meshId);
  1615. if (objMesh != null && objMesh != undefined) {
  1616. // console.log(
  1617. // "添加发光的物体", meshId, objMesh
  1618. // );
  1619. // 先去除
  1620. QingXiCheAndQvComHighlightLayer.find().delMesh("自定义", objMesh);
  1621. // 在添加
  1622. QingXiCheAndQvComHighlightLayer.find().addMesh("自定义", objMesh, "rgb(79, 185, 255)");
  1623. }
  1624. }
  1625. }
  1626. /**
  1627. * 配置被拖拽物体的列表
  1628. * type 类型,根据不同类型进行获取
  1629. */
  1630. meshMoveConfig = function(type) {
  1631. let meshList = [];
  1632. switch(type) {
  1633. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1634. meshList = [
  1635. "model_1746598895146橡胶垫",
  1636. ];
  1637. break;
  1638. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1639. meshList = [
  1640. "model_1746598895146上箍",
  1641. "model_1746598895146插销轴",
  1642. "model_1746598895146下箍",
  1643. ];
  1644. break;
  1645. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1646. meshList = [
  1647. "model_1746598895146插销1",
  1648. "model_1746598895146插销2",
  1649. ];
  1650. break;
  1651. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1652. meshList = [
  1653. "model_1746598895146紧箍螺丝01",
  1654. "model_1746598895146紧箍螺丝02",
  1655. "model_1746598895146紧箍螺丝03",
  1656. ];
  1657. break;
  1658. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1659. meshList = [
  1660. "model_1746598895146扳手",
  1661. ];
  1662. break;
  1663. case "":
  1664. break;
  1665. }
  1666. if (meshList.length <= 0) {
  1667. return null;
  1668. }
  1669. let meshJson = {};
  1670. for (let i = 0; i < meshList.length; i++) {
  1671. let meshId = meshList[i];
  1672. meshJson[meshId] = meshId;
  1673. }
  1674. return {
  1675. "meshList" : meshList,
  1676. "meshJson" : meshJson,
  1677. };
  1678. }
  1679. /**
  1680. * 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1681. * callback 开启完成回调
  1682. */
  1683. xiangJiaoDianPianOk = (callback) => {
  1684. let thisClass = this;
  1685. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1686. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1687. let objIframe = objThreeWorldEventMain.objIframe;
  1688. let objScene = objThreeWorldEventMain.objScene;
  1689. let BABYLON = objThreeWorldEventMain.BABYLON;
  1690. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1691. // 播放动画列表
  1692. let playList = [
  1693. { "name" : "橡胶垫.001", "speed" : 2, "from" : 0, "to" : 200 },
  1694. ];
  1695. // 动画播放完成次数
  1696. let playEndNum = 0;
  1697. for (let i = 0; i < playList.length; i++) {
  1698. let thisPlayList = playList[i];
  1699. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1700. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1701. function(state, objAnimation) {
  1702. if (state == "播放完成") {
  1703. playEndNum += 1;
  1704. if (playEndNum >= playList.length) {
  1705. callback("yes");
  1706. }
  1707. }
  1708. }
  1709. );
  1710. }
  1711. }
  1712. /**
  1713. * 数字修复虚拟仿真-将抱箍放置到正确的位置
  1714. * callback 开启完成回调
  1715. */
  1716. baoGuOk = (callback) => {
  1717. let thisClass = this;
  1718. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1719. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1720. let objIframe = objThreeWorldEventMain.objIframe;
  1721. let objScene = objThreeWorldEventMain.objScene;
  1722. let BABYLON = objThreeWorldEventMain.BABYLON;
  1723. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1724. // 播放动画列表
  1725. let playList = [
  1726. { "name" : "上箍", "speed" : 2, "from" : 0, "to" : 300 },
  1727. { "name" : "插销轴.001", "speed" : 2, "from" : 0, "to" : 200 },
  1728. { "name" : "下箍.001", "speed" : 2, "from" : 0, "to" : 300 },
  1729. ];
  1730. // 动画播放完成次数
  1731. let playEndNum = 0;
  1732. for (let i = 0; i < playList.length; i++) {
  1733. let thisPlayList = playList[i];
  1734. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1735. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1736. function(state, objAnimation) {
  1737. if (state == "播放完成") {
  1738. playEndNum += 1;
  1739. if (playEndNum >= playList.length) {
  1740. callback("yes");
  1741. }
  1742. }
  1743. }
  1744. );
  1745. }
  1746. }
  1747. /**
  1748. * 数字修复虚拟仿真-将插销安装到正确的位置
  1749. * callback 开启完成回调
  1750. */
  1751. chaXiaoOk = function(callback) {
  1752. let thisClass = this;
  1753. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1754. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1755. let objIframe = objThreeWorldEventMain.objIframe;
  1756. let objScene = objThreeWorldEventMain.objScene;
  1757. let BABYLON = objThreeWorldEventMain.BABYLON;
  1758. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1759. // 播放动画列表
  1760. let playList = [
  1761. { "name" : "插销1.001", "speed" : 2, "from" : 300, "to" : 400 },
  1762. { "name" : "插销2.001", "speed" : 2, "from" : 300, "to" : 400 },
  1763. ];
  1764. // 动画播放完成次数
  1765. let playEndNum = 0;
  1766. for (let i = 0; i < playList.length; i++) {
  1767. let thisPlayList = playList[i];
  1768. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1769. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1770. function(state, objAnimation) {
  1771. if (state == "播放完成") {
  1772. playEndNum += 1;
  1773. if (playEndNum >= playList.length) {
  1774. callback("yes");
  1775. }
  1776. }
  1777. }
  1778. );
  1779. }
  1780. }
  1781. /**
  1782. * 数字修复虚拟仿真-将螺丝安装到正确的位置
  1783. * callback 开启完成回调
  1784. */
  1785. luoSiOk = function(callback) {
  1786. let thisClass = this;
  1787. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1788. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1789. let objIframe = objThreeWorldEventMain.objIframe;
  1790. let objScene = objThreeWorldEventMain.objScene;
  1791. let BABYLON = objThreeWorldEventMain.BABYLON;
  1792. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1793. // 播放动画列表
  1794. let playList = [
  1795. { "name" : "紧箍螺丝01.001", "speed" : 2, "from" : 400, "to" : 502 },
  1796. { "name" : "紧箍螺丝02.001", "speed" : 2, "from" : 400, "to" : 502 },
  1797. { "name" : "紧箍螺丝03|", "speed" : 2, "from" : 400, "to" : 502 },
  1798. ];
  1799. // 动画播放完成次数
  1800. let playEndNum = 0;
  1801. for (let i = 0; i < playList.length; i++) {
  1802. let thisPlayList = playList[i];
  1803. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1804. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1805. function(state, objAnimation) {
  1806. if (state == "播放完成") {
  1807. playEndNum += 1;
  1808. if (playEndNum >= playList.length) {
  1809. callback("yes");
  1810. }
  1811. }
  1812. }
  1813. );
  1814. }
  1815. }
  1816. /**
  1817. * 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1818. * callback 开启完成回调
  1819. */
  1820. banShouOk = function(callback) {
  1821. let thisClass = this;
  1822. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1823. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1824. let objIframe = objThreeWorldEventMain.objIframe;
  1825. let objScene = objThreeWorldEventMain.objScene;
  1826. let BABYLON = objThreeWorldEventMain.BABYLON;
  1827. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1828. // 播放动画列表
  1829. let playList = [
  1830. { "name" : "扳手.001", "speed" : 2, "from" : 500, "to" : 802 },
  1831. ];
  1832. // 动画播放完成次数
  1833. let playEndNum = 0;
  1834. for (let i = 0; i < playList.length; i++) {
  1835. let thisPlayList = playList[i];
  1836. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1837. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1838. function(state, objAnimation) {
  1839. if (state == "播放完成") {
  1840. playEndNum += 1;
  1841. if (playEndNum >= playList.length) {
  1842. callback("yes");
  1843. }
  1844. }
  1845. }
  1846. );
  1847. }
  1848. }
  1849. }