QingXiCheAndQvCarEventClick.js 109 KB

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