QingXiCheAndQvCarEventClick.js 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502
  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("手握方向盘");
  539. objIframeEdit.roleShow(false);
  540. let thisTime = new Date().getTime();
  541. // 控制延迟逻辑
  542. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 2, 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. objIframeEdit.modelPeopleLook(3);
  676. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("下车观察各项灯光");
  677. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定安全灯是否正常");
  678. objIframeEdit.roleShow(false);
  679. let thisTime = new Date().getTime();
  680. // 控制延迟逻辑
  681. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  682. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  683. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  684. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  685. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  686. ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
  687. confirmButtonText: '知道了',
  688. callback: (action) => {
  689. },
  690. });
  691. });
  692. });
  693. }
  694. break;
  695. // 在施工范围放置警示标识
  696. case '在施工范围放置警示标识':
  697. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  698. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  699. // 切换成正在处理中
  700. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  701. // 切换视角
  702. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();// 先记录下当前视角
  703. objIframeEdit.modelPeopleLook(3);
  704. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车摆放安全桩");
  705. objIframeEdit.roleShow(false);
  706. let thisTime = new Date().getTime();
  707. // 控制延迟逻辑
  708. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  709. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  710. QingXiCheAndQvComClipPlaneMeshEvent.find().anQuanZhuangLookYes(function() {
  711. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  712. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  713. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  714. ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
  715. confirmButtonText: '知道了',
  716. callback: (action) => {
  717. },
  718. });
  719. });
  720. });
  721. }
  722. break;
  723. // 从水管固定座上拧下高压水管
  724. case '从水管固定座上拧下高压水管':
  725. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  726. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  727. // 切换成正在处理中
  728. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  729. // 切换视角
  730. objIframeEdit.modelPeopleLook(3);
  731. objIframeEdit.cameraVisualAngleGetListNameGpsTo("从水管固定座上拧下高压水管2");
  732. objIframeEdit.roleShow(false);
  733. let thisTime = new Date().getTime();
  734. // 控制延迟逻辑
  735. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  736. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  737. QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
  738. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  739. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  740. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  741. });
  742. });
  743. }
  744. break;
  745. // 调整卷筒器到合适位置
  746. case '调整卷筒器到合适位置':
  747. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  748. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  749. // 切换成正在处理中
  750. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  751. // 切换视角
  752. objIframeEdit.modelPeopleLook(3);
  753. objIframeEdit.cameraVisualAngleGetListNameGpsTo("调整卷筒器到合适位置2");
  754. objIframeEdit.roleShow(false);
  755. let thisTime = new Date().getTime();
  756. // 控制延迟逻辑
  757. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  758. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  759. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_1', function() {
  760. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_2', function() {
  761. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  762. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  763. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  764. });
  765. });
  766. });
  767. }
  768. break;
  769. // 取出高压水管并放入布管器内
  770. case '取出高压水管并放入布管器内':
  771. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  772. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  773. // 切换成正在处理中
  774. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  775. // 切换视角
  776. objIframeEdit.modelPeopleLook(3);
  777. objIframeEdit.cameraVisualAngleGetListNameGpsTo("取出高压水管并放入布管器内2");
  778. objIframeEdit.roleShow(false);
  779. let thisTime = new Date().getTime();
  780. // 控制延迟逻辑
  781. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  782. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  783. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes(function() {
  784. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  785. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  786. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  787. });
  788. });
  789. }
  790. break;
  791. // 套上高压水管护管器
  792. case '套上高压水管护管器':
  793. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  794. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  795. // 切换成正在处理中
  796. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  797. // 切换视角
  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. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
  807. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  808. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  809. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  810. });
  811. });
  812. });
  813. }
  814. break;
  815. // 安装合适的高压喷头
  816. case '安装合适的高压喷头':
  817. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  818. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  819. // 切换成正在处理中
  820. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  821. // 切换视角
  822. objIframeEdit.modelPeopleLook(3);
  823. objIframeEdit.cameraVisualAngleGetListNameGpsTo("安装合适的高压喷头2");
  824. objIframeEdit.roleShow(false);
  825. let thisTime = new Date().getTime();
  826. // 控制延迟逻辑
  827. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  828. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  829. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_打开箱子', function() {
  830. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置', function() {
  831. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  832. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  833. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  834. });
  835. });
  836. });
  837. }
  838. break;
  839. // 将高压水管放入待施工的管道内
  840. case '将高压水管放入待施工的管道内':
  841. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  842. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  843. // 切换成正在处理中
  844. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  845. // 切换视角
  846. objIframeEdit.modelPeopleLook(3);
  847. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管放入待施工的管道内2");
  848. objIframeEdit.roleShow(false);
  849. let thisTime = new Date().getTime();
  850. // 控制延迟逻辑
  851. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  852. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  853. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_打开井盖', function() {
  854. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_弯曲', function() {
  855. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_下井', function() {
  856. });
  857. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_2(function() {
  858. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  859. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  860. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  861. });
  862. });
  863. });
  864. });
  865. }
  866. break;
  867. // 在触屏操作面板上将管长清零
  868. case '在触屏操作面板上将管长清零':
  869. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  870. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  871. // 切换成正在处理中
  872. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  873. // 切换视角
  874. objIframeEdit.modelPeopleLook(3);
  875. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在触屏操作面板上将管长清零2");
  876. objIframeEdit.roleShow(false);
  877. let thisTime = new Date().getTime();
  878. // 控制延迟逻辑
  879. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  880. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  881. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  882. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  883. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  884. });
  885. }
  886. break;
  887. // 在安全的情况开启冲水开关
  888. case '在安全的情况开启冲水开关':
  889. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  890. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  891. // 切换成正在处理中
  892. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  893. // 切换视角
  894. objIframeEdit.modelPeopleLook(3);
  895. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在安全的情况开启冲水开关2");
  896. objIframeEdit.roleShow(false);
  897. let thisTime = new Date().getTime();
  898. // 控制延迟逻辑
  899. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  900. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  901. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  902. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  903. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  904. });
  905. }
  906. break;
  907. // 根据现场工况调节冲水压力
  908. case '根据现场工况调节冲水压力':
  909. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  910. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  911. // 切换成正在处理中
  912. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  913. // 切换视角
  914. objIframeEdit.modelPeopleLook(3);
  915. objIframeEdit.cameraVisualAngleGetListNameGpsTo("根据现场工况调节冲水压力2");
  916. objIframeEdit.roleShow(false);
  917. let thisTime = new Date().getTime();
  918. // 控制延迟逻辑
  919. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  920. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  921. QingXiCheAdnQvCarEventStep.find().waterEvent(true);
  922. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  923. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  924. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  925. });
  926. }
  927. break;
  928. // 疏通管道后减小油门到初始状态
  929. case '疏通管道后减小油门到初始状态':
  930. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  931. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  932. // 切换成正在处理中
  933. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  934. // 切换视角
  935. objIframeEdit.modelPeopleLook(3);
  936. objIframeEdit.cameraVisualAngleGetListNameGpsTo("疏通管道后减小油门到初始状态2");
  937. objIframeEdit.roleShow(false);
  938. let thisTime = new Date().getTime();
  939. // 控制延迟逻辑
  940. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  941. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  942. QingXiCheAdnQvCarEventStep.find().waterEvent(false);
  943. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  944. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  945. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  946. });
  947. }
  948. break;
  949. // 带压收回高压水管
  950. case '带压收回高压水管':
  951. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  952. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  953. // 切换成正在处理中
  954. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  955. // 切换视角
  956. objIframeEdit.modelPeopleLook(3);
  957. objIframeEdit.cameraVisualAngleGetListNameGpsTo("带压收回高压水管2");
  958. objIframeEdit.roleShow(false);
  959. let thisTime = new Date().getTime();
  960. // 控制延迟逻辑
  961. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  962. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  963. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  964. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  965. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  966. });
  967. }
  968. break;
  969. // 至触摸屏关闭冲水开关
  970. case '至触摸屏关闭冲水开关':
  971. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  972. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  973. // 切换成正在处理中
  974. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  975. // 切换视角
  976. objIframeEdit.modelPeopleLook(3);
  977. objIframeEdit.cameraVisualAngleGetListNameGpsTo("至触摸屏关闭冲水开关2");
  978. objIframeEdit.roleShow(false);
  979. let thisTime = new Date().getTime();
  980. // 控制延迟逻辑
  981. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  982. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  983. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  984. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  985. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  986. });
  987. }
  988. break;
  989. // 缓慢收回高压水管
  990. case '缓慢收回高压水管':
  991. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  992. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  993. // 切换成正在处理中
  994. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  995. // 切换视角
  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().animationAllTypeUpdate('清洗车_高压水管护管器_变直', function() {
  1004. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_关闭井盖', function() {
  1005. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_地面', function() {
  1006. });
  1007. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_3(function() {
  1008. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1009. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1010. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1011. });
  1012. });
  1013. });
  1014. });
  1015. }
  1016. break;
  1017. // 拆卸高压喷头放入喷头机箱内
  1018. case '拆卸高压喷头放入喷头机箱内':
  1019. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1020. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1021. // 切换成正在处理中
  1022. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1023. // 切换视角
  1024. objIframeEdit.modelPeopleLook(3);
  1025. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拆卸高压喷头放入喷头机箱内2");
  1026. objIframeEdit.roleShow(false);
  1027. let thisTime = new Date().getTime();
  1028. // 控制延迟逻辑
  1029. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1030. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1031. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_喷头放入箱内', function() {
  1032. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_箱子盖起', function() {
  1033. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1034. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1035. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1036. });
  1037. });
  1038. });
  1039. }
  1040. break;
  1041. // 收起高压水管将卷筒恢复到初始状态
  1042. case '收起高压水管将卷筒恢复到初始状态':
  1043. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1044. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1045. // 切换成正在处理中
  1046. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1047. // 切换视角
  1048. objIframeEdit.modelPeopleLook(3);
  1049. objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
  1050. objIframeEdit.roleShow(false);
  1051. let thisTime = new Date().getTime();
  1052. // 控制延迟逻辑
  1053. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1054. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1055. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_4(function() {
  1056. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器回到原始位置', function() {
  1057. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes_2(function() {
  1058. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_1', function() {
  1059. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_2', function() {
  1060. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1061. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1062. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1063. });
  1064. });
  1065. });
  1066. });
  1067. });
  1068. });
  1069. }
  1070. break;
  1071. // 将高压水管拧到水管固定座
  1072. case '将高压水管拧到水管固定座':
  1073. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1074. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1075. // 切换成正在处理中
  1076. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1077. // 切换视角
  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_2(function() {
  1086. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1087. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1088. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1089. });
  1090. });
  1091. }
  1092. break;
  1093. // 回到驾驶室踩下车辆离合器5秒
  1094. case '回到驾驶室踩下车辆离合器5秒':
  1095. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1096. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1097. // 切换成正在处理中
  1098. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1099. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
  1100. WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
  1101. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1102. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1103. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1104. });
  1105. });
  1106. }
  1107. break;
  1108. // 关闭取力器开关
  1109. case '关闭取力器开关':
  1110. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1111. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1112. // 切换成正在处理中
  1113. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1114. // 切换视角
  1115. objIframeEdit.modelPeopleLook(3);
  1116. objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
  1117. objIframeEdit.roleShow(false);
  1118. let thisTime = new Date().getTime();
  1119. // 控制延迟逻辑
  1120. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1121. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1122. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1123. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1124. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1125. });
  1126. }
  1127. break;
  1128. // 关闭车辆双闪和工作双闪箭头灯
  1129. case '关闭车辆双闪和工作双闪箭头灯':
  1130. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1131. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1132. // 切换成正在处理中
  1133. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1134. QingXiCheAndQvCarEvent.find().carShuangShanOpen(false);
  1135. // 切换视角
  1136. objIframeEdit.modelPeopleLook(3);
  1137. objIframeEdit.cameraVisualAngleGetListNameGpsTo("打开工作双闪箭头灯");
  1138. objIframeEdit.roleShow(false);
  1139. let thisTime = new Date().getTime();
  1140. // 控制延迟逻辑
  1141. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1142. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1143. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1144. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1145. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1146. });
  1147. }
  1148. break;
  1149. // 车辆正常熄火
  1150. case '车辆正常熄火':
  1151. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1152. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1153. // 切换成正在处理中
  1154. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1155. // 切换视角
  1156. objIframeEdit.modelPeopleLook(3);
  1157. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆");
  1158. objIframeEdit.roleShow(false);
  1159. let thisTime = new Date().getTime();
  1160. // 控制延迟逻辑
  1161. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1162. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1163. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_钥匙关闭_熄火', function() {
  1164. QingXiCheAndQvCarEvent.find().carOpen(false);
  1165. // 切换视角
  1166. objIframeEdit.modelPeopleLook(3);
  1167. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
  1168. objIframeEdit.roleShow(false);
  1169. thisTime = new Date().getTime();
  1170. // 控制延迟逻辑
  1171. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1172. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1173. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1174. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1175. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1176. });
  1177. });
  1178. });
  1179. }
  1180. break;
  1181. // //
  1182. // case '':
  1183. // break;
  1184. // //
  1185. // case '':
  1186. // break;
  1187. // 已完成所有任务
  1188. case 'equipmentRepositioningWork':
  1189. break;
  1190. // 数字修复虚拟仿真-将阀门关闭停止水流
  1191. case '数字修复虚拟仿真-将阀门关闭停止水流':
  1192. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1193. // 切换成正在处理中
  1194. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1195. // 切换视角
  1196. objIframeEdit.modelPeopleLook(3);
  1197. objIframeEdit.cameraVisualAngleGetListNameGpsTo("关闭阀门完成");
  1198. objIframeEdit.roleShow(false);
  1199. let thisTime = new Date().getTime();
  1200. // 控制延迟逻辑
  1201. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1202. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1203. // 停止水流
  1204. QingXiCheAdnQvCarEventStep.find().waterGuanEvent(false);
  1205. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1206. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1207. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1208. });
  1209. }
  1210. break;
  1211. // 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1212. case '数字修复虚拟仿真-将橡胶垫片放置到正确的位置':
  1213. // 切换成正在处理中
  1214. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1215. // 范围内
  1216. if (dragBool == true) {
  1217. // 回到原始位置
  1218. thisClass.moveMeshListResetPosition();
  1219. WindowEvent.find().WindowTxtViewOpenEvent(
  1220. // "现在播放橡胶垫片安装过程\n"
  1221. // +
  1222. "各类机械设备的法兰连接、轴承密封、泵体密封等部位都需要使用橡胶垫片,以保证设备的正常运行,防止润滑油、液压油等泄漏"
  1223. );
  1224. // WindowEvent.find().WindowVideoViewOpenEvent(
  1225. // QingXiCheAndQvCarEvent.find().videoJson["02"],
  1226. // { "自定义回调的字段" : "自定义回调的字段111" },
  1227. // function(WindowVideoViewOpenEventRes) {
  1228. // console.log(
  1229. // "WindowVideoViewOpenEventRes", WindowVideoViewOpenEventRes
  1230. // );
  1231. // }
  1232. // );
  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. thisClass.xiangJiaoDianPianOk(function() {
  1242. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1243. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1244. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1245. });
  1246. });
  1247. } else {
  1248. // 回到原始位置
  1249. thisClass.moveMeshListResetPosition();
  1250. // 范围外
  1251. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1252. }
  1253. break;
  1254. // 数字修复虚拟仿真-将抱箍放置到正确的位置
  1255. case '数字修复虚拟仿真-将抱箍放置到正确的位置':
  1256. // 切换成正在处理中
  1257. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1258. // 范围内
  1259. if (dragBool == true) {
  1260. // 回到原始位置
  1261. thisClass.moveMeshListResetPosition();
  1262. WindowEvent.find().WindowTxtViewOpenEvent(
  1263. // "现在播放橡抱箍安装过程\n"
  1264. // +
  1265. "抱箍是一种用于抱住或箍住其他材料的紧固件,通过将两个或多个部件紧紧固定在一起,起到连接、支撑或加固的作用."
  1266. + "通常由箍板、翼板、拉结筋板、螺栓及内衬垫构成。其中,箍板是主要的抱紧部件,翼板用于增加连接面积或提供额外的支撑点,拉结筋板则增强箍板的强度和稳定性,螺栓用于将抱箍紧固,内衬垫则可增加摩擦力或保护被箍物体的表面"
  1267. );
  1268. // 切换视角
  1269. objIframeEdit.modelPeopleLook(3);
  1270. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将抱箍放置到正确的位置_完成");
  1271. objIframeEdit.roleShow(false);
  1272. let thisTime = new Date().getTime();
  1273. // 控制延迟逻辑
  1274. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1275. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1276. thisClass.baoGuOk(function() {
  1277. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1278. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1279. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1280. });
  1281. });
  1282. } else {
  1283. // 回到原始位置
  1284. thisClass.moveMeshListResetPosition();
  1285. // 范围外
  1286. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1287. }
  1288. break;
  1289. // 数字修复虚拟仿真-将插销安装到正确的位置
  1290. case '数字修复虚拟仿真-将插销安装到正确的位置':
  1291. // 切换成正在处理中
  1292. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1293. // 范围内
  1294. if (dragBool == true) {
  1295. // 回到原始位置
  1296. thisClass.moveMeshListResetPosition();
  1297. WindowEvent.find().WindowTxtViewOpenEvent(
  1298. // "现在播放插销安装过程\n"
  1299. // +
  1300. "通过将销杆插入对应的销孔中,实现物体之间的连接或锁定。利用销杆与销孔之间的配合精度和摩擦力,保持连接的稳定性。带有锁止机构的插销,通过特定的操作(如旋转、按压等)使锁止部件卡住销杆,防止其意外拔出,增强锁定效果。"
  1301. );
  1302. // 切换视角
  1303. objIframeEdit.modelPeopleLook(3);
  1304. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将插销安装到正确的位置_完成");
  1305. objIframeEdit.roleShow(false);
  1306. let thisTime = new Date().getTime();
  1307. // 控制延迟逻辑
  1308. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1309. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1310. thisClass.chaXiaoOk(function() {
  1311. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1312. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1313. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1314. });
  1315. });
  1316. } else {
  1317. // 回到原始位置
  1318. thisClass.moveMeshListResetPosition();
  1319. // 范围外
  1320. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1321. }
  1322. break;
  1323. // 数字修复虚拟仿真-将螺丝安装到正确的位置
  1324. case '数字修复虚拟仿真-将螺丝安装到正确的位置':
  1325. // 切换成正在处理中
  1326. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1327. // 范围内
  1328. if (dragBool == true) {
  1329. // 回到原始位置
  1330. thisClass.moveMeshListResetPosition();
  1331. WindowEvent.find().WindowTxtViewOpenEvent(
  1332. // "现在播放螺丝安装过程\n"
  1333. // +
  1334. "螺丝通常由头部和螺纹杆两部分组成。头部有不同的形状,如圆形、方形、六角形等,以便使用相应的工具进行拧紧或松开操作。螺纹杆上有螺旋状的螺纹,用于与螺母或带有内螺纹的部件配合。"
  1335. );
  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. thisClass.luoSiOk(function() {
  1345. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1346. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1347. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1348. });
  1349. });
  1350. } else {
  1351. // 回到原始位置
  1352. thisClass.moveMeshListResetPosition();
  1353. // 范围外
  1354. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1355. }
  1356. break;
  1357. // 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1358. case '数字修复虚拟仿真-用扳手将螺丝旋紧螺丝':
  1359. // 切换成正在处理中
  1360. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1361. // 范围内
  1362. if (dragBool == true) {
  1363. // 回到原始位置
  1364. thisClass.moveMeshListResetPosition();
  1365. WindowEvent.find().WindowTxtViewOpenEvent(
  1366. // "现在播放扳手使用过程\n"
  1367. // +
  1368. "扳手通常由头部和手柄两部分组成。头部是与螺栓或螺母接触并施加扭矩的部分,根据不同的类型有各种形状和结构;手柄则用于握持和施加力,一般为杆状,以提供足够的杠杆作用。"
  1369. );
  1370. // 切换视角
  1371. objIframeEdit.modelPeopleLook(3);
  1372. objIframeEdit.cameraVisualAngleGetListNameGpsTo("用扳手将螺丝旋紧螺丝_完成");
  1373. objIframeEdit.roleShow(false);
  1374. let thisTime = new Date().getTime();
  1375. // 控制延迟逻辑
  1376. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1377. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1378. thisClass.banShouOk(function() {
  1379. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1380. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1381. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1382. });
  1383. });
  1384. } else {
  1385. // 回到原始位置
  1386. thisClass.moveMeshListResetPosition();
  1387. // 范围外
  1388. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1389. }
  1390. break;
  1391. // //
  1392. // case '':
  1393. // break;
  1394. // //
  1395. // case '':
  1396. // break;
  1397. default:
  1398. break;
  1399. }
  1400. // 上面执行完成,固定执行如下逻辑
  1401. thisClass.moveMeshListReset();
  1402. }
  1403. /**
  1404. * 根据不同类型,触发对应物体列表高亮逻辑
  1405. * type 对应类型操作高亮
  1406. */
  1407. meshListComHighlightEvent = (type) => {
  1408. let thisClass = this;
  1409. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1410. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1411. let objIframe = objThreeWorldEventMain.objIframe;
  1412. let objScene = objThreeWorldEventMain.objScene;
  1413. let BABYLON = objThreeWorldEventMain.BABYLON;
  1414. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1415. let meshList = [];
  1416. // QingXiCheAndQvComHighlightLayer.find().delAll("自定义");
  1417. // 默认不闪烁
  1418. QingXiCheAndQvComHighlightLayer.find().flickerBool = false;
  1419. switch (type) {
  1420. case "数字修复虚拟仿真-将阀门关闭停止水流":
  1421. meshList = [
  1422. "model_1746598895146阀门_primitive0",
  1423. "model_1746598895146阀门_primitive1",
  1424. ];
  1425. // 开启闪烁逻辑
  1426. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1427. break;
  1428. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1429. meshList = [
  1430. "model_1746598895146橡胶垫",
  1431. ];
  1432. // 开启闪烁逻辑
  1433. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1434. break;
  1435. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1436. meshList = [
  1437. "model_1746598895146上箍",
  1438. "model_1746598895146插销轴",
  1439. "model_1746598895146下箍",
  1440. ];
  1441. // 开启闪烁逻辑
  1442. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1443. break;
  1444. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1445. meshList = [
  1446. "model_1746598895146插销1",
  1447. "model_1746598895146插销2",
  1448. ];
  1449. // 开启闪烁逻辑
  1450. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1451. break;
  1452. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1453. meshList = [
  1454. "model_1746598895146紧箍螺丝01",
  1455. "model_1746598895146紧箍螺丝02",
  1456. "model_1746598895146紧箍螺丝03",
  1457. ];
  1458. // 开启闪烁逻辑
  1459. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1460. break;
  1461. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1462. meshList = [
  1463. "model_1746598895146扳手",
  1464. ];
  1465. // 开启闪烁逻辑
  1466. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1467. break;
  1468. case "":
  1469. break;
  1470. }
  1471. for (let i = 0; i < meshList.length; i++) {
  1472. let meshId = meshList[i];
  1473. let objMesh = objScene.getMeshById(meshId);
  1474. if (objMesh != null && objMesh != undefined) {
  1475. // console.log(
  1476. // "添加发光的物体", meshId, objMesh
  1477. // );
  1478. // 先去除
  1479. QingXiCheAndQvComHighlightLayer.find().delMesh("自定义", objMesh);
  1480. // 在添加
  1481. QingXiCheAndQvComHighlightLayer.find().addMesh("自定义", objMesh, "rgb(79, 185, 255)");
  1482. }
  1483. }
  1484. }
  1485. /**
  1486. * 配置被拖拽物体的列表
  1487. * type 类型,根据不同类型进行获取
  1488. */
  1489. meshMoveConfig = function(type) {
  1490. let meshList = [];
  1491. switch(type) {
  1492. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1493. meshList = [
  1494. "model_1746598895146橡胶垫",
  1495. ];
  1496. break;
  1497. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1498. meshList = [
  1499. "model_1746598895146上箍",
  1500. "model_1746598895146插销轴",
  1501. "model_1746598895146下箍",
  1502. ];
  1503. break;
  1504. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1505. meshList = [
  1506. "model_1746598895146插销1",
  1507. "model_1746598895146插销2",
  1508. ];
  1509. break;
  1510. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1511. meshList = [
  1512. "model_1746598895146紧箍螺丝01",
  1513. "model_1746598895146紧箍螺丝02",
  1514. "model_1746598895146紧箍螺丝03",
  1515. ];
  1516. break;
  1517. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1518. meshList = [
  1519. "model_1746598895146扳手",
  1520. ];
  1521. break;
  1522. case "":
  1523. break;
  1524. }
  1525. if (meshList.length <= 0) {
  1526. return null;
  1527. }
  1528. let meshJson = {};
  1529. for (let i = 0; i < meshList.length; i++) {
  1530. let meshId = meshList[i];
  1531. meshJson[meshId] = meshId;
  1532. }
  1533. return {
  1534. "meshList" : meshList,
  1535. "meshJson" : meshJson,
  1536. };
  1537. }
  1538. /**
  1539. * 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1540. * callback 开启完成回调
  1541. */
  1542. xiangJiaoDianPianOk = (callback) => {
  1543. let thisClass = this;
  1544. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1545. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1546. let objIframe = objThreeWorldEventMain.objIframe;
  1547. let objScene = objThreeWorldEventMain.objScene;
  1548. let BABYLON = objThreeWorldEventMain.BABYLON;
  1549. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1550. // 播放动画列表
  1551. let playList = [
  1552. { "name" : "橡胶垫.001", "speed" : 2, "from" : 0, "to" : 200 },
  1553. ];
  1554. // 动画播放完成次数
  1555. let playEndNum = 0;
  1556. for (let i = 0; i < playList.length; i++) {
  1557. let thisPlayList = playList[i];
  1558. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1559. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1560. function(state, objAnimation) {
  1561. if (state == "播放完成") {
  1562. playEndNum += 1;
  1563. if (playEndNum >= playList.length) {
  1564. callback("yes");
  1565. }
  1566. }
  1567. }
  1568. );
  1569. }
  1570. }
  1571. /**
  1572. * 数字修复虚拟仿真-将抱箍放置到正确的位置
  1573. * callback 开启完成回调
  1574. */
  1575. baoGuOk = (callback) => {
  1576. let thisClass = this;
  1577. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1578. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1579. let objIframe = objThreeWorldEventMain.objIframe;
  1580. let objScene = objThreeWorldEventMain.objScene;
  1581. let BABYLON = objThreeWorldEventMain.BABYLON;
  1582. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1583. // 播放动画列表
  1584. let playList = [
  1585. { "name" : "上箍", "speed" : 2, "from" : 0, "to" : 300 },
  1586. { "name" : "插销轴.001", "speed" : 2, "from" : 0, "to" : 200 },
  1587. { "name" : "下箍.001", "speed" : 2, "from" : 0, "to" : 300 },
  1588. ];
  1589. // 动画播放完成次数
  1590. let playEndNum = 0;
  1591. for (let i = 0; i < playList.length; i++) {
  1592. let thisPlayList = playList[i];
  1593. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1594. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1595. function(state, objAnimation) {
  1596. if (state == "播放完成") {
  1597. playEndNum += 1;
  1598. if (playEndNum >= playList.length) {
  1599. callback("yes");
  1600. }
  1601. }
  1602. }
  1603. );
  1604. }
  1605. }
  1606. /**
  1607. * 数字修复虚拟仿真-将插销安装到正确的位置
  1608. * callback 开启完成回调
  1609. */
  1610. chaXiaoOk = function(callback) {
  1611. let thisClass = this;
  1612. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1613. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1614. let objIframe = objThreeWorldEventMain.objIframe;
  1615. let objScene = objThreeWorldEventMain.objScene;
  1616. let BABYLON = objThreeWorldEventMain.BABYLON;
  1617. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1618. // 播放动画列表
  1619. let playList = [
  1620. { "name" : "插销1.001", "speed" : 2, "from" : 300, "to" : 400 },
  1621. { "name" : "插销2.001", "speed" : 2, "from" : 300, "to" : 400 },
  1622. ];
  1623. // 动画播放完成次数
  1624. let playEndNum = 0;
  1625. for (let i = 0; i < playList.length; i++) {
  1626. let thisPlayList = playList[i];
  1627. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1628. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1629. function(state, objAnimation) {
  1630. if (state == "播放完成") {
  1631. playEndNum += 1;
  1632. if (playEndNum >= playList.length) {
  1633. callback("yes");
  1634. }
  1635. }
  1636. }
  1637. );
  1638. }
  1639. }
  1640. /**
  1641. * 数字修复虚拟仿真-将螺丝安装到正确的位置
  1642. * callback 开启完成回调
  1643. */
  1644. luoSiOk = function(callback) {
  1645. let thisClass = this;
  1646. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1647. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1648. let objIframe = objThreeWorldEventMain.objIframe;
  1649. let objScene = objThreeWorldEventMain.objScene;
  1650. let BABYLON = objThreeWorldEventMain.BABYLON;
  1651. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1652. // 播放动画列表
  1653. let playList = [
  1654. { "name" : "紧箍螺丝01.001", "speed" : 2, "from" : 400, "to" : 502 },
  1655. { "name" : "紧箍螺丝02.001", "speed" : 2, "from" : 400, "to" : 502 },
  1656. { "name" : "紧箍螺丝03|", "speed" : 2, "from" : 400, "to" : 502 },
  1657. ];
  1658. // 动画播放完成次数
  1659. let playEndNum = 0;
  1660. for (let i = 0; i < playList.length; i++) {
  1661. let thisPlayList = playList[i];
  1662. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1663. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1664. function(state, objAnimation) {
  1665. if (state == "播放完成") {
  1666. playEndNum += 1;
  1667. if (playEndNum >= playList.length) {
  1668. callback("yes");
  1669. }
  1670. }
  1671. }
  1672. );
  1673. }
  1674. }
  1675. /**
  1676. * 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1677. * callback 开启完成回调
  1678. */
  1679. banShouOk = function(callback) {
  1680. let thisClass = this;
  1681. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1682. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1683. let objIframe = objThreeWorldEventMain.objIframe;
  1684. let objScene = objThreeWorldEventMain.objScene;
  1685. let BABYLON = objThreeWorldEventMain.BABYLON;
  1686. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1687. // 播放动画列表
  1688. let playList = [
  1689. { "name" : "扳手.001", "speed" : 2, "from" : 500, "to" : 802 },
  1690. ];
  1691. // 动画播放完成次数
  1692. let playEndNum = 0;
  1693. for (let i = 0; i < playList.length; i++) {
  1694. let thisPlayList = playList[i];
  1695. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1696. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1697. function(state, objAnimation) {
  1698. if (state == "播放完成") {
  1699. playEndNum += 1;
  1700. if (playEndNum >= playList.length) {
  1701. callback("yes");
  1702. }
  1703. }
  1704. }
  1705. );
  1706. }
  1707. }
  1708. }