index.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669
  1. <template>
  2. <div class="recognize-main">
  3. <!-- <div>
  4. {{ this.infomation }}
  5. </div> -->
  6. <template>
  7. <!-- 人员人脸识别 step-0 同行人员人脸识别 step 9 -->
  8. <div
  9. class="infomation_content_video"
  10. v-if="processStep.num == 0 || processStep.num == 9"
  11. >
  12. <div>
  13. <div class="infomation_video">
  14. <div class="infomation_video_main">
  15. <!-- <video-image-window
  16. :cameraData="cameraInfo"
  17. :cameraId="cameraInfo.id"
  18. /> -->
  19. <video-local-window
  20. style="margin-top: 20px"
  21. :isUpload="uploadPic"
  22. @output="handleByfaceOut"
  23. @outputPath="handleByfaceUploadPath"
  24. />
  25. </div>
  26. </div>
  27. <div class="infomation_prompt_center" v-if="infomation.personEnable">
  28. 初次登记请录入人脸,屏幕内只保留登记人员
  29. </div>
  30. <div class="infomation_prompt_center" v-else>
  31. 初次登记请录入人脸,屏幕内只保留登记人员
  32. </div>
  33. <div>
  34. <el-button
  35. style="
  36. width: 160px;
  37. height: 80px;
  38. position: relative;
  39. bottom: 8vh;
  40. right: -38vw;
  41. font-size: xx-large;
  42. "
  43. type="primary "
  44. size="medium "
  45. @click="handleByfaceUpload"
  46. >录入人脸</el-button
  47. >
  48. <el-button
  49. style="
  50. width: 160px;
  51. height: 80px;
  52. position: relative;
  53. bottom: 8vh;
  54. right: -38vw;
  55. font-size: xx-large;
  56. "
  57. type="primary "
  58. size="medium "
  59. @click="handleClick(infomation, 7)"
  60. >跳过</el-button
  61. >
  62. </div>
  63. <!-- <div class="infomation_button" v-if="processStep.num !== 0">
  64. <el-button
  65. style="width: auto; height: 80px; font-size: xx-large"
  66. type="primary "
  67. size="medium "
  68. @click="handleClick(infomation, 3)"
  69. >确认</el-button
  70. >
  71. </div> -->
  72. </div>
  73. </div>
  74. <!-- 人员信息登记 step 1-4 进站目的 step 5 -->
  75. <div
  76. class="infomation_content"
  77. v-for="(item, index) in stepProcessInfomation"
  78. :key="item.step"
  79. v-if="processStep.num == item.step && processStep.num !== 5"
  80. >
  81. <div>
  82. <div class="infomation_prompt">{{ item.prompt }}</div>
  83. <div class="infomation_prop">
  84. <span>{{ item.propName }}</span>
  85. <span>
  86. <el-input
  87. ref="dealContent"
  88. v-model="infomation[item.prop]"
  89. rows="2"
  90. type="textarea"
  91. style="
  92. font-size: 40px;
  93. font-family: 'Microsoft YaHei';
  94. width: auto;
  95. "
  96. />
  97. </span>
  98. </div>
  99. <div class="infomation_data" v-if="processStep.num == 1">
  100. <el-image
  101. :key="refreshKey"
  102. style="
  103. width: 300px;
  104. height: 400px;
  105. top: 340px;
  106. left: 260px;
  107. position: absolute;
  108. "
  109. :src="tempPhotoPath"
  110. >
  111. </el-image>
  112. </div>
  113. <div class="infomation_button">
  114. <el-button
  115. style="width: 160px; height: 80px; font-size: xx-large"
  116. type="primary "
  117. size="medium "
  118. @click="handleClick(infomation, 8)"
  119. >上一步</el-button
  120. >
  121. <el-button
  122. style="width: 160px; height: 80px; font-size: xx-large"
  123. type="primary "
  124. size="medium "
  125. @click="handleClick(infomation[item.prop], 1)"
  126. >下一步</el-button
  127. >
  128. </div>
  129. </div>
  130. </div>
  131. <!-- 进站目的 step-5 -->
  132. <div class="infomation_content" v-if="processStep.num == 5">
  133. <div>
  134. <div class="infomation_prompt">
  135. 请点击选择或在输入框输入你的进站目的。
  136. </div>
  137. <div class="infomation_prompt_cause">
  138. <el-row>
  139. <el-col :span="10">
  140. <div class="infomation_prop_cause">
  141. <span>进站目的:</span>
  142. </div>
  143. </el-col>
  144. <el-col :span="14">
  145. <el-radio-group v-model="infomation.cause">
  146. <div class="infomation_prop_value">
  147. <el-radio
  148. v-for="(item, index) in causeList"
  149. :key="index"
  150. :label="item"
  151. ></el-radio>
  152. </div>
  153. </el-radio-group>
  154. <el-input
  155. ref="dealContent"
  156. v-model="infomation.cause"
  157. rows="2"
  158. type="textarea"
  159. style="
  160. margin-top: 6px;
  161. font-size: 40px;
  162. font-family: 'Microsoft YaHei';
  163. width: auto;
  164. "
  165. />
  166. </el-col>
  167. </el-row>
  168. <div class="infomation_button">
  169. <el-button
  170. style="width: 160px; height: 80px; font-size: xx-large"
  171. type="primary "
  172. size="medium "
  173. @click="handleClick(infomation, 8)"
  174. >上一步</el-button
  175. >
  176. <el-button
  177. style="width: 160px; height: 80px; font-size: xx-large"
  178. type="primary "
  179. size="medium "
  180. @click="handleClick(infomation[cause], 1)"
  181. >下一步</el-button
  182. >
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <!-- 人脸识别存在/人员信息登记完成 step-6 -->
  188. <div class="infomation_content" v-if="processStep.num == 6">
  189. <div>
  190. <div class="infomation_prompt">人员信息:</div>
  191. <div class="infomation_data_line"></div>
  192. <div class="infomation_data">
  193. <div
  194. class="infomation_data_content"
  195. v-for="(item, index) in stepProcessInfomation"
  196. :key="item.step"
  197. v-if="
  198. item.prop == 'name' ||
  199. (personType == 2 && item.prop == 'company') ||
  200. item.prop == 'cause' ||
  201. item.prop == 'telephone' ||
  202. (personType == 2 && item.prop == 'idNumber')
  203. "
  204. >
  205. <span class="infomation_data_prop">{{ item.propName }}</span>
  206. <span>
  207. <el-input
  208. ref="dealContent"
  209. v-model="infomation[item.prop]"
  210. rows="1"
  211. type="textarea"
  212. style="
  213. font-size: 40px;
  214. font-family: 'Microsoft YaHei';
  215. width: 380px;
  216. height: 68px;
  217. "
  218. />
  219. </span>
  220. </div>
  221. </div>
  222. <div class="infomation_data">
  223. <el-image
  224. v-if="personType == 1"
  225. :key="refreshKey"
  226. style="
  227. width: 200px;
  228. height: 300px;
  229. top: 340px;
  230. position: absolute;
  231. "
  232. :src="tempPhotoPath"
  233. >
  234. </el-image>
  235. <el-image
  236. v-if="personType == 2"
  237. :key="refreshKey"
  238. style="
  239. width: 200px;
  240. height: 300px;
  241. top: 380px;
  242. position: absolute;
  243. "
  244. :src="tempPhotoPath"
  245. >
  246. </el-image>
  247. </div>
  248. <div class="infomation_button">
  249. <el-button
  250. style="
  251. width: auto;
  252. height: 80px;
  253. position: relative;
  254. bottom: 12vh;
  255. right: -8vw;
  256. font-size: xx-large;
  257. "
  258. type="primary "
  259. size="medium "
  260. @click="handleClick(infomation, 8)"
  261. >上一步</el-button
  262. >
  263. <el-button
  264. style="
  265. width: auto;
  266. height: 80px;
  267. position: relative;
  268. bottom: 12vh;
  269. right: -8vw;
  270. font-size: xx-large;
  271. "
  272. type="primary "
  273. size="medium "
  274. @click="handleClick(infomation, 2)"
  275. >请门卫通知值班人员申请进站。。。</el-button
  276. >
  277. </div>
  278. </div>
  279. </div>
  280. <!-- 入场相关信息登记 step 7 -->
  281. <div class="infomation_content" v-if="processStep.num == 7">
  282. <div>
  283. <div class="infomation_prompt">请点击勾选相关信息。</div>
  284. <div class="infomation_data_line"></div>
  285. <div class="infomation_data">
  286. <div class="infomation_data_content2">
  287. <span class="infomation_data_prop">是否携带危化品:</span>
  288. <span class="infomation_data_check">
  289. <el-radio-group v-model="infomation.dangerousEnable">
  290. <el-radio :label="1">是</el-radio>
  291. <el-radio :label="0">否</el-radio>
  292. </el-radio-group>
  293. </span>
  294. </div>
  295. <div class="infomation_data_content2">
  296. <span class="infomation_data_prop">进站区域:</span>
  297. <span class="infomation_data_check">
  298. <el-checkbox-group v-model="infomation.areasEnable">
  299. <el-checkbox :label="1">工艺区</el-checkbox>
  300. <el-checkbox :label="2">办公区</el-checkbox>
  301. </el-checkbox-group>
  302. </span>
  303. </div>
  304. <div class="infomation_data_content2">
  305. <span class="infomation_data_prop">是否施工作业:</span>
  306. <span class="infomation_data_check">
  307. <el-radio-group v-model="infomation.workerEnable">
  308. <el-radio :label="1">是</el-radio>
  309. <el-radio :label="0">否</el-radio>
  310. </el-radio-group>
  311. </span>
  312. </div>
  313. <div class="infomation_data_content2">
  314. <span class="infomation_data_prop">是否有同行人员:</span>
  315. <span class="infomation_data_check">
  316. <el-radio-group v-model="infomation.personEnable">
  317. <el-radio :label="1">是</el-radio>
  318. <el-radio :label="0">否</el-radio>
  319. </el-radio-group>
  320. </span>
  321. </div>
  322. </div>
  323. <div class="infomation_button">
  324. <el-button
  325. style="
  326. width: 160px;
  327. height: 80px;
  328. position: relative;
  329. bottom: 2vh;
  330. right: -20vw;
  331. font-size: xx-large;
  332. "
  333. type="primary "
  334. size="medium "
  335. @click="handleClick(infomation, 7)"
  336. >下一步</el-button
  337. >
  338. </div>
  339. </div>
  340. </div>
  341. <!-- 进出须知 step 8 -->
  342. <div class="infomation_content_read" v-if="processStep.num == 8">
  343. <div>
  344. <div class="infomation_prompt_left">
  345. 请完整阅读并同意遵守《托克托压气站进站须知》。
  346. </div>
  347. <div class="infomation_data_line"></div>
  348. <div class="infomation_read">
  349. <div class="infomation_read_content">
  350. <p><strong>* 非生产装置区注意事项</strong></p>
  351. <ul>
  352. <li>
  353. <strong>进站手续:</strong
  354. >服从站内工作人员管理,按规定办理进、出站手续
  355. </li>
  356. <li>
  357. <strong>HSE要求:</strong
  358. >仔细阅读进站人员登记表中《HSE要求注意事项》的规定要求,并逐项进行确认和遵守
  359. </li>
  360. <li>
  361. <strong>接待人员:</strong
  362. >接待人员负责安排您在站内/阀室的活动,确保您的人身安全
  363. </li>
  364. <li>
  365. <strong>车辆停放:</strong
  366. >按照接待人员指定位置停车,车头指向疏散路线
  367. </li>
  368. <li>
  369. <strong>能源环境:</strong
  370. >节约用水,保持站内/阀室卫生,废弃物投放到分类垃圾箱内/带出阀室外处置
  371. </li>
  372. </ul>
  373. <p><strong>* 应急处置注意事项</strong></p>
  374. <ul>
  375. <li>
  376. <strong>急救处置:</strong>出现意外伤害及时与接待人员联系
  377. </li>
  378. <li>
  379. <strong>异常事件:</strong
  380. >发现异常事件要及时通知接待人员或附近的站场/作业区员工
  381. </li>
  382. <li>
  383. <strong>逃生通道:</strong
  384. >熟知逃生通道,必要时可要求接待人员组织逃生演练
  385. </li>
  386. <li>
  387. <strong>应急处置:</strong
  388. >紧急情况下服从接待人员指挥,沿逃生通道撤离事故现场
  389. </li>
  390. </ul>
  391. </div>
  392. </div>
  393. <div class="infomation_button">
  394. <el-button
  395. style="
  396. width: auto;
  397. height: 80px;
  398. position: relative;
  399. bottom: 0vh;
  400. right: -25vw;
  401. font-size: xx-large;
  402. "
  403. type="primary "
  404. size="medium "
  405. @click="handleClick(infomation, 3)"
  406. >我已阅读,并同意遵守</el-button
  407. >
  408. </div>
  409. </div>
  410. </div>
  411. <!-- 人员信息登记 step 10-13 -->
  412. <div
  413. class="infomation_content"
  414. v-for="(item, index) in stepProcessPerson"
  415. :key="item.step"
  416. v-if="processStep.num == item.step"
  417. >
  418. <div>
  419. <div class="infomation_prompt">{{ item.prompt }}</div>
  420. <div class="infomation_prop">
  421. <span>{{ item.propName }}</span>
  422. <span>
  423. <el-input
  424. ref="dealContent"
  425. v-model="person[item.prop]"
  426. rows="2"
  427. type="textarea"
  428. style="
  429. font-size: 40px;
  430. font-family: 'Microsoft YaHei';
  431. width: auto;
  432. "
  433. />
  434. </span>
  435. </div>
  436. <div class="infomation_data">
  437. <el-image
  438. :key="refreshKey"
  439. style="
  440. width: 300px;
  441. height: 400px;
  442. top: 340px;
  443. left: 260px;
  444. position: absolute;
  445. "
  446. :src="tempPhotoPath"
  447. >
  448. </el-image>
  449. </div>
  450. <div class="infomation_button">
  451. <el-button
  452. style="width: 160px; height: 80px; font-size: xx-large"
  453. type="primary "
  454. size="medium "
  455. @click="handleClick(infomation, 8)"
  456. >上一步</el-button
  457. >
  458. <el-button
  459. style="width: 160px; height: 80px; font-size: xx-large"
  460. type="primary "
  461. size="medium "
  462. @click="handleClick(person[item.prop], 9)"
  463. >下一步</el-button
  464. >
  465. </div>
  466. </div>
  467. </div>
  468. <!-- 登记信息确认 step 14 -->
  469. <div
  470. class="infomation_content"
  471. v-if="processStep.num == 14"
  472. :key="refreshKey"
  473. >
  474. <div>
  475. <div class="infomation_prompt_final">
  476. 登记信息(请确认登记信息,并按需添加同行人员后,确认信息进行绑卡):
  477. </div>
  478. <div class="infomation_data_final">
  479. <el-descriptions class="margin-top" :column="2">
  480. <el-descriptions-item label="人员姓名">{{
  481. infomation.name
  482. }}</el-descriptions-item>
  483. <el-descriptions-item label="工作单位" v-if="personType === 2">{{
  484. infomation.company
  485. }}</el-descriptions-item>
  486. <el-descriptions-item label="身份证号" v-if="personType === 2">{{
  487. infomation.idNumber
  488. }}</el-descriptions-item>
  489. <el-descriptions-item label="联系电话"
  490. >{{ infomation.telephone }}
  491. </el-descriptions-item>
  492. <el-descriptions-item label="进站目的">{{
  493. infomation.cause
  494. }}</el-descriptions-item>
  495. <el-descriptions-item label="总计人数" :key="refreshKey">{{
  496. infomation.count
  497. }}</el-descriptions-item>
  498. <el-descriptions-item label="是否携带危化品">
  499. <el-radio-group v-model="infomation.dangerousEnable">
  500. <el-radio :label="1">是</el-radio>
  501. <el-radio :label="0">否</el-radio>
  502. </el-radio-group>
  503. </el-descriptions-item>
  504. <el-descriptions-item label="进站区域"
  505. ><el-checkbox-group v-model="infomation.areasEnable">
  506. <el-checkbox :label="1">工艺区</el-checkbox>
  507. <el-checkbox :label="2">办公区</el-checkbox>
  508. </el-checkbox-group>
  509. </el-descriptions-item>
  510. <el-descriptions-item label="是否施工作业"
  511. ><el-radio-group v-model="infomation.workerEnable">
  512. <el-radio :label="1">是</el-radio>
  513. <el-radio :label="0">否</el-radio>
  514. </el-radio-group>
  515. </el-descriptions-item>
  516. <el-descriptions-item label="是否有同行人员"
  517. ><el-radio-group v-model="infomation.personEnable">
  518. <el-radio :label="1">是</el-radio>
  519. <el-radio :label="0">否</el-radio>
  520. </el-radio-group>
  521. </el-descriptions-item>
  522. </el-descriptions>
  523. <div
  524. class="info_list"
  525. v-if="infomation.personEnable"
  526. :key="refreshKey"
  527. >
  528. <base-table-list
  529. :tableConfig="tableConfig"
  530. @handleClick="handleTableClick"
  531. />
  532. </div>
  533. </div>
  534. <div class="infomation_button">
  535. <el-button
  536. style="
  537. width: auto;
  538. height: 80px;
  539. position: relative;
  540. bottom: 2vh;
  541. right: -12vw;
  542. font-size: xx-large;
  543. "
  544. type="primary "
  545. size="medium "
  546. @click="addPerson"
  547. >增加同行人员</el-button
  548. >
  549. <el-button
  550. style="
  551. width: auto;
  552. height: 80px;
  553. position: relative;
  554. bottom: 2vh;
  555. right: -12vw;
  556. font-size: xx-large;
  557. "
  558. type="primary "
  559. size="medium "
  560. @click="handleClick(infomation, 4)"
  561. >确认信息,开始绑卡</el-button
  562. >
  563. </div>
  564. </div>
  565. </div>
  566. <!-- 登记人员绑卡 step 15 -->
  567. <div class="infomation_content" v-if="processStep.num == 15">
  568. <div>
  569. <div class="infomation_prompt_final">
  570. 人员{{
  571. infomation.count
  572. }}人,(请先点击绑卡,再刷卡,依次完成所有人员的绑卡操作):
  573. </div>
  574. <div class="infomation_data_final">
  575. <div class="info_list" :key="refreshKey">
  576. <base-table-list
  577. :tableConfig="tableConfigInfo"
  578. @handleClick="handleTableClick"
  579. />
  580. </div>
  581. </div>
  582. <div class="infomation_button">
  583. <el-button
  584. style="
  585. width: auto;
  586. height: 80px;
  587. position: relative;
  588. bottom: -4vh;
  589. right: -20vw;
  590. font-size: xx-large;
  591. "
  592. type="primary "
  593. size="medium "
  594. @click="handleClick(infomation, 8)"
  595. >上一步</el-button
  596. >
  597. <el-button
  598. style="
  599. width: auto;
  600. height: 80px;
  601. position: relative;
  602. bottom: -4vh;
  603. right: -20vw;
  604. font-size: xx-large;
  605. "
  606. type="primary "
  607. size="medium "
  608. @click="handleClick(infomation, 6)"
  609. >完成登记</el-button
  610. >
  611. </div>
  612. </div>
  613. </div>
  614. <scanner-or-reader :enable="cardEnable" @output="handleReaderOut" />
  615. <id-reader :enable="idEnable" @output="readIdCard" />
  616. </template>
  617. </div>
  618. </template>
  619. <script>
  620. import BaseTableList from "@/views/components/base/BaseTableList";
  621. import VideoImageWindow from "./components/VideoImageWindow.vue";
  622. import VideoLocalWindow from "./components/VideoLocalWindow.vue";
  623. import ScannerOrReader from "@/components/ScannerOrReader";
  624. import IdReader from "@/components/IdReader";
  625. import { mapGetters } from "vuex";
  626. import { getDeepseekTaking } from "@/API/deepseek";
  627. import {
  628. personComingTagUpdate,
  629. RefreshDriver,
  630. bindAndUnbindrecord,
  631. GetPersonList,
  632. } from "@/API/custom";
  633. import Dayjs from "dayjs";
  634. export default {
  635. name: "recognize",
  636. components: {
  637. BaseTableList,
  638. VideoImageWindow,
  639. VideoLocalWindow,
  640. ScannerOrReader,
  641. IdReader,
  642. },
  643. data() {
  644. return {
  645. tempPhotoPath: "",
  646. refreshKey: 0, //页面刷新
  647. cardEnable: false, //rfid刷卡
  648. idEnable: false, //身份证刷卡
  649. uploadPic: false, //上传录入
  650. recognizeSuccess: false, //识别成功
  651. finallySet: false, //最终修改
  652. nameEnbale: false, //最终修改
  653. tempList: [],
  654. fullLoading: null,
  655. rfid: "",
  656. idCardData: {},
  657. //
  658. url: "",
  659. recognizeEnable: false,
  660. showIframe: true,
  661. personType: "2",
  662. processStep: {
  663. num: 0,
  664. content: {},
  665. },
  666. causeList: [
  667. "进站检查",
  668. "现场调研",
  669. "现场施工",
  670. "工作交流",
  671. "岗位应聘",
  672. "作业监督",
  673. "驻站跟班",
  674. "系统调试",
  675. ],
  676. stepProcessInfomation: [
  677. {
  678. step: 1,
  679. propName: "人员姓名:",
  680. prop: "name",
  681. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的姓名。",
  682. },
  683. {
  684. step: 4,
  685. propName: "工作单位:",
  686. prop: "company",
  687. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的工作单位。",
  688. },
  689. {
  690. step: 3,
  691. propName: "身份证号:",
  692. prop: "idNumber",
  693. prompt:
  694. "请点击输入框,按住键盘Caps键语音或拼音输入你的身份证号或将身份证贴近感应区。",
  695. },
  696. {
  697. step: 2,
  698. propName: "联系电话:",
  699. prop: "telephone",
  700. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的联系电话。",
  701. },
  702. {
  703. step: 5,
  704. propName: "进站目的:",
  705. prop: "cause",
  706. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的进站目的。",
  707. },
  708. ],
  709. stepProcessPerson: [
  710. {
  711. step: 10,
  712. propName: "人员姓名:",
  713. prop: "name",
  714. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的姓名。",
  715. },
  716. {
  717. step: 11,
  718. propName: "工作单位:",
  719. prop: "company",
  720. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的工作单位。",
  721. },
  722. {
  723. step: 12,
  724. propName: "身份证号:",
  725. prop: "idNumber",
  726. prompt:
  727. "请点击输入框,按住键盘Caps键语音或拼音输入你的身份证号或将身份证贴近感应区。",
  728. },
  729. {
  730. step: 13,
  731. propName: "联系电话:",
  732. prop: "telephone",
  733. prompt: "请点击输入框,按住键盘Caps键语音或拼音输入你的联系电话。",
  734. },
  735. ],
  736. infomation: {
  737. id: "",
  738. name: "",
  739. company: "",
  740. idNumber: "",
  741. telephone: "",
  742. cause: "",
  743. label: "",
  744. areasEnable: [2],
  745. dangerousEnable: 0,
  746. workerEnable: 0,
  747. personEnable: 0,
  748. persons: [],
  749. count: 1,
  750. read: "",
  751. check: false,
  752. photoPath: "",
  753. department: "",
  754. position: "",
  755. type: "",
  756. typeName: "",
  757. companyName: "",
  758. },
  759. names: "",
  760. areas: "",
  761. person: {
  762. id: "",
  763. name: "",
  764. company: "",
  765. idNumber: "",
  766. telephone: "",
  767. cardNo: "",
  768. photoPath: "",
  769. companyName: "",
  770. },
  771. cameraInfo: {
  772. areaId: null,
  773. areaName: null,
  774. baseCreateTime: "2024-12-10 11:11:51",
  775. baseModifyTime: "2024-12-24 19:02:45",
  776. brand: 1,
  777. buildId: "100001",
  778. buildName: "托克托",
  779. canHide: true,
  780. canHideStr: "是",
  781. canPlayBack: false,
  782. code: "TKTM02",
  783. controlChannel: 1,
  784. controlPort: 0,
  785. departmentId: "784131093203787776",
  786. departmentName: "托克托压气站",
  787. enable: true,
  788. enableStr: "启用",
  789. floorId: 0,
  790. floorNo: 1,
  791. height: 4,
  792. homeCarouselEnable: true,
  793. homeCarouselEnableStr: "启用",
  794. icon: "244450840335618105",
  795. iconName: "默认摄像头",
  796. iconPath: "/../static/images/camera.svg",
  797. id: "786550746739908608",
  798. ip: "192.168.70.61",
  799. location: { buildId: "100001", floorNo: 1, x: 63720, y: 187240 },
  800. name: "托克托门禁进站机",
  801. password: "",
  802. passwordKey: "",
  803. playChannel: 1,
  804. playPath: null,
  805. playPort: 0,
  806. protocolParam: null,
  807. ptzEnable: false,
  808. ptzEnableStr: "否",
  809. remark: null,
  810. sort: 0,
  811. streamIndex: 1,
  812. streamProtocol: 1,
  813. streamProtocolStr: "RTSP",
  814. type: 2,
  815. typeStr: "海康IPC",
  816. useType: "212006",
  817. useTypeStr: "门禁摄像头",
  818. userName: "admin",
  819. },
  820. tableConfigInfo: {
  821. needIndex: true,
  822. height: 530,
  823. header: [
  824. { title: "姓名", prop: "name", width: "" },
  825. { title: "工作单位", prop: "company", width: "" },
  826. // { title: "联系电话", prop: "telephone", width: "" },
  827. { title: "卡号", prop: "cardNo", width: "" },
  828. {
  829. title: "操作",
  830. prop: "operation",
  831. width: "",
  832. btns: [{ btnName: "绑卡", btnType: "bind" }],
  833. },
  834. ],
  835. tableData: [],
  836. },
  837. tableConfig: {
  838. needIndex: true,
  839. height: 280,
  840. header: [
  841. { title: "姓名", prop: "name", width: "" },
  842. { title: "工作单位", prop: "company", width: "" },
  843. // { title: "联系电话", prop: "telephone", width: "" },
  844. {
  845. title: "操作",
  846. prop: "operation",
  847. width: "",
  848. btns: [{ btnName: "删除", btnType: "del" }],
  849. },
  850. ],
  851. tableData: [],
  852. },
  853. pPath: "~@/assets/imgs/stationMap/default_0.png",
  854. };
  855. },
  856. watch: {
  857. "$route.query": {
  858. handler(newVal, oldVal) {
  859. console.log("Route:", newVal);
  860. if (newVal.type && newVal.type == 1) {
  861. this.personType = 1;
  862. } else {
  863. this.personType = 2;
  864. }
  865. this.infomation.department =
  866. this.personType === 1 ? "821025772184543232" : "821025720783347712";
  867. this.infomation.position =
  868. this.personType === 1 ? "821073061166981120" : "821073092108361728";
  869. this.infomation.type =
  870. this.personType === 1 ? "546093319541760000" : "403245878963347456";
  871. this.infomation.typeName = this.personType === 1 ? "访客" : "施工人员";
  872. this.person = {
  873. //初始化
  874. name: "",
  875. company: this.infomation.company,
  876. idNumber: "",
  877. telephone: "",
  878. label: "",
  879. photoPath: "",
  880. department:
  881. this.personType === 1 ? "821025772184543232" : "821025720783347712",
  882. position:
  883. this.personType === 1 ? "821073061166981120" : "821073092108361728",
  884. type:
  885. this.personType === 1 ? "546093319541760000" : "403245878963347456",
  886. typeName: this.personType === 1 ? "访客" : "施工人员",
  887. accessControlIds: [],
  888. companyName: this.infomation.company,
  889. };
  890. },
  891. deep: true,
  892. immediate: true,
  893. },
  894. "processStep.num": {
  895. handler(newVal, oldVal) {
  896. if (newVal == 14) {
  897. this.tableConfig.tableData = this.infomation.persons;
  898. this.infomation.count = 1 + this.infomation.persons.length;
  899. }
  900. if (newVal == 0 || newVal == 9) {
  901. //人脸识别
  902. this.recognizeEnable = true;
  903. } else {
  904. this.recognizeEnable = false;
  905. }
  906. if (newVal == 3 || newVal == 12) {
  907. //身份证识别
  908. this.idEnable = true;
  909. } else {
  910. this.idEnable = false;
  911. }
  912. console.log("步骤参数", newVal, this.recognizeEnable);
  913. setTimeout(() => {
  914. this.recognize();
  915. }, 500);
  916. this.refresh();
  917. },
  918. deep: true,
  919. immediate: true,
  920. },
  921. personInfo: {
  922. handler(newVal, oldVal) {
  923. console.log("personInfo:", newVal);
  924. if (newVal) {
  925. this.tableConfigInfo.tableData[newVal.dataIndex] = newVal.data;
  926. this.refresh();
  927. }
  928. },
  929. deep: true,
  930. immediate: true,
  931. },
  932. tempPhotoPath: {
  933. handler(newVal, oldVal) {
  934. console.log("照片路径:", newVal);
  935. this.refresh();
  936. },
  937. deep: true,
  938. immediate: true,
  939. },
  940. nameEnbale: {
  941. handler(newVal) {
  942. console.log("重名检测", newVal);
  943. if (newVal) {
  944. this.$alert("系统有同名人员,请加区分前缀、后缀修改名称", "提示", {
  945. confirmButtonText: "返回修改",
  946. callback: () => {
  947. if (this.processStep.num == 2 || this.processStep.num == 11) {
  948. this.processStep.num--;
  949. } else if (this.processStep.num == 14) {
  950. this.processStep.num = this.processStep.num - 4;
  951. this.infomation.persons.pop();
  952. }
  953. },
  954. });
  955. }
  956. },
  957. deep: true,
  958. immediate: true,
  959. },
  960. },
  961. mounted() {
  962. this.init();
  963. },
  964. computed: {
  965. ...mapGetters(["personInfo"]),
  966. VUE_APP_BASE_API() {
  967. return process.env.VUE_APP_BASE_API;
  968. },
  969. },
  970. methods: {
  971. init() {
  972. this.processStep.num = 0;
  973. this.infomation.personEnable = 0;
  974. // this.takingDeepseek();
  975. },
  976. async takingDeepseek() {
  977. try {
  978. const params = {
  979. output_format: "json",
  980. content: "先做自我介绍,再询问姓名",
  981. prompt_template:
  982. "请你扮演一个托克托压气站入场登记员,负责询问对方姓名,要求交流简洁",
  983. };
  984. // const params =
  985. // "{'output_format':'json','content':'先做自我介绍,再询问姓名','prompt_template':'请你扮演一个托克托压气站入场登记员,负责询问对方姓名,要求交流简洁'}";
  986. const res = await getDeepseekTaking(params);
  987. const strs = res.response.toString().split("</think>\n\n");
  988. console.log("当前反馈信息:", res.response, strs);
  989. if (strs.length > 1) {
  990. this.speak(strs[1]);
  991. }
  992. } catch (err) {
  993. console.log(err);
  994. }
  995. },
  996. speak(data) {
  997. this.$store.dispatch("globalConfig/setAlarmAudio", {
  998. show: true,
  999. alarmMsg: data,
  1000. });
  1001. },
  1002. recognize() {
  1003. if (this.recognizeEnable) {
  1004. // console.log("人脸识别", this.processStep);
  1005. // setTimeout(() => {
  1006. // this.processStep.num++;
  1007. // }, 3000);
  1008. }
  1009. },
  1010. async bindInfoRecord(person) {
  1011. try {
  1012. console.log("记录基础信息:", person);
  1013. this.names = "";
  1014. for (let i = 0; i < person.persons.length; i++) {
  1015. const p = person.persons[i];
  1016. this.names = this.names.concat(" ", p.name);
  1017. }
  1018. console.log("记录基础信息1:", this.names);
  1019. this.areas = "";
  1020. let areaName = "";
  1021. person.areasEnable.forEach((p) => {
  1022. areaName = p > 1 ? "办公区" : "工艺区";
  1023. this.areas = this.areas + " " + areaName;
  1024. });
  1025. console.log("记录基础信息2:", this.areas);
  1026. const record = {
  1027. field001: Dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), //登记时间
  1028. field002: person.name, //领队姓名
  1029. field003: person.companyName, //单位
  1030. field004: person.idNumber, //身份证号
  1031. field005: person.telephone, //联系电话
  1032. field006: person.cause, //进站目的
  1033. field007: person.count, //总计人数
  1034. field008: this.names, //同行人员姓名
  1035. field009: person.dangerousEnable ? "有" : "无", //危险品检查
  1036. field010: person.workerEnable ? "是" : "否", //施工作业
  1037. field011: this.areas, //进站区域
  1038. field012: person.photoPath, //登记照片
  1039. pageId: "842348058862690304", //入场登记
  1040. };
  1041. console.log("记录基础信息3:", record);
  1042. const res = await bindAndUnbindrecord(record);
  1043. console.log("登记记录反馈信息:", res);
  1044. } catch (err) {
  1045. console.log(err);
  1046. }
  1047. },
  1048. async getPersonList(person) {
  1049. try {
  1050. const params = {
  1051. // pageSize: 10000,
  1052. // pageIndex: 1,
  1053. name: person.name, //登记时间
  1054. };
  1055. this.nameEnbale = false;
  1056. const res = await GetPersonList(params);
  1057. this.tempList = res.data.content;
  1058. console.log("名称信息", params);
  1059. for (let i = 0; i < this.tempList.length; i++) {
  1060. const p = this.tempList[i];
  1061. if (p.name === params.name) {
  1062. this.nameEnbale = true;
  1063. }
  1064. }
  1065. // console.log("名称检索数据表", this.tempList);
  1066. } catch (err) {
  1067. console.log(err);
  1068. }
  1069. },
  1070. openFullScreen() {
  1071. const loading = this.$loading({
  1072. lock: true,
  1073. text: "领导审核中,请耐心等待",
  1074. spinner: "el-icon-loading",
  1075. background: "rgba(0, 0, 0, 0.7)",
  1076. });
  1077. setTimeout(() => {
  1078. loading.close();
  1079. this.processStep.num++;
  1080. }, 1000);
  1081. },
  1082. handleAudio(key, element = document) {
  1083. const options = {
  1084. key: key,
  1085. code: key === "CapsLock" ? "CapsLock" : "",
  1086. keyCode: key === "CapsLock" ? 20 : 0,
  1087. bubbles: true,
  1088. };
  1089. const keyDownEvent = new KeyboardEvent("keydown", options);
  1090. // const keyUpEvent = new KeyboardEvent("keyup", options);
  1091. element.dispatchEvent(keyDownEvent);
  1092. // element.dispatchEvent(keyUpEvent);
  1093. },
  1094. handleClick(e, type) {
  1095. if (type) {
  1096. switch (type) {
  1097. case 8:
  1098. this.processStep.num--;
  1099. // console.log("上一步");
  1100. break;
  1101. case 7:
  1102. this.processStep.num++;
  1103. // console.log("跳过人脸识别");
  1104. break;
  1105. case 1:
  1106. // console.log("人员登记信息流程");
  1107. if (this.processStep.num === 1 && this.infomation.id === "") {
  1108. this.getPersonList({ name: this.infomation.name });
  1109. }
  1110. if (this.personType == 1 && this.processStep.num === 2) {
  1111. this.processStep.num += 3;
  1112. } else {
  1113. this.processStep.num++;
  1114. }
  1115. break;
  1116. case 2:
  1117. this.openFullScreen();
  1118. // this.processStep.num++;
  1119. // console.log("入场登记通知领导");
  1120. break;
  1121. case 3:
  1122. if (this.infomation.personEnable) {
  1123. this.processStep.num++;
  1124. } else {
  1125. this.processStep.num += 6;
  1126. }
  1127. // console.log("人脸识别");
  1128. break;
  1129. case 4:
  1130. this.processStep.num++;
  1131. this.initTableInfo();
  1132. // console.log("登记绑卡");
  1133. break;
  1134. case 6:
  1135. this.checkPersonCardNo();
  1136. this.bindInfoRecord(this.infomation);
  1137. // console.log("完成登记");
  1138. break;
  1139. case 5:
  1140. if (this.personType == 1 && this.processStep.num === 11) {
  1141. this.processStep.num += 3;
  1142. this.infomation.persons.push(this.person);
  1143. } else {
  1144. if (this.processStep.num === 13) {
  1145. this.infomation.persons.push(this.person);
  1146. }
  1147. this.processStep.num++;
  1148. }
  1149. // console.log("同行人员信息");
  1150. break;
  1151. case 9:
  1152. if (this.processStep.num === 10) {
  1153. if (this.person.id === "") {
  1154. this.getPersonList({ name: this.person.name }); //人员重名检测
  1155. }
  1156. this.person.department = this.infomation.department;
  1157. this.processStep.num += 4;
  1158. this.infomation.persons.push(this.person);
  1159. }
  1160. console.log("同行人员信息");
  1161. break;
  1162. default:
  1163. break;
  1164. }
  1165. }
  1166. },
  1167. handleTableClick(data, index, btnType) {
  1168. if (btnType === "bind") {
  1169. console.log("绑卡", data, index);
  1170. data.companyName = data.company;
  1171. let dialogConfig = {
  1172. dialogId: "risk_" + data.id,
  1173. show: true, //是否显示
  1174. title: "绑卡信息",
  1175. width: 600, //px宽度
  1176. height: 320, //px高度
  1177. center: true, //是否居中定位
  1178. zIndex: 10,
  1179. type: 1,
  1180. data,
  1181. dataIndex: index,
  1182. };
  1183. this.$store.dispatch("dialog/addRiskDialog", dialogConfig);
  1184. }
  1185. if (btnType === "del") {
  1186. this.infomation.persons = this.infomation.persons.filter((e) => {
  1187. return e.name !== data.name;
  1188. });
  1189. this.person.id = "";
  1190. this.tableConfig.tableData = this.infomation.persons;
  1191. // console.log("删除", data, this.infomation.persons);
  1192. this.refresh();
  1193. }
  1194. if (btnType === "close") {
  1195. // console.log("解绑", data);
  1196. }
  1197. if (btnType === "input") {
  1198. // console.log("录入人脸", data);
  1199. }
  1200. },
  1201. addPerson() {
  1202. this.infomation.personEnable = 1;
  1203. this.person = {
  1204. //初始化
  1205. id: "",
  1206. name: "",
  1207. company: this.infomation.company,
  1208. idNumber: "",
  1209. telephone: "",
  1210. label: "",
  1211. photoPath: "",
  1212. department: this.infomation.department,
  1213. position:
  1214. this.personType === 1 ? "821073061166981120" : "821073092108361728",
  1215. type:
  1216. this.personType === 1 ? "546093319541760000" : "403245878963347456",
  1217. typeName: this.personType === 1 ? "访客" : "施工人员",
  1218. accessControlIds: [],
  1219. companyName: this.infomation.company,
  1220. };
  1221. this.processStep.num = 9; //步骤跳转
  1222. this.refresh();
  1223. },
  1224. initTableInfo() {
  1225. let list = [this.infomation];
  1226. list.push(...this.infomation.persons);
  1227. this.tableConfigInfo.tableData = list;
  1228. },
  1229. checkPersonCardNo() {
  1230. let count = 0;
  1231. let mes = "";
  1232. this.tableConfigInfo.tableData.forEach((item) => {
  1233. if (item.cardNo && item.cardNo.length > 0) {
  1234. count++;
  1235. } else {
  1236. mes = mes + item.name + ",";
  1237. }
  1238. });
  1239. if (this.tableConfigInfo.tableData.length > count) {
  1240. this.$confirm("人员" + mes + "未绑定卡片,是否继续?", "提示", {
  1241. confirmButtonText: "返回绑卡",
  1242. cancelButtonText: "确认完成登记",
  1243. type: "warning",
  1244. })
  1245. .then(() => {
  1246. this.$message({
  1247. type: "success",
  1248. message: "返回绑卡!",
  1249. });
  1250. })
  1251. .catch(() => {
  1252. this.$router.push("basePage");
  1253. this.$message({
  1254. type: "warning",
  1255. message: "完成登记",
  1256. });
  1257. });
  1258. } else {
  1259. this.$router.push("basePage");
  1260. }
  1261. },
  1262. handleByfaceUpload() {
  1263. this.uploadPic = true;
  1264. // console.log("上传父级开关", this.uploadPic);
  1265. },
  1266. // 头像上传
  1267. handleByfaceUploadPath(data) {
  1268. console.log("人脸上传图片路径", data);
  1269. if (data) {
  1270. switch (this.processStep.num) {
  1271. case 0:
  1272. if (this.recognizeSuccess) {
  1273. this.processStep.num += 5;
  1274. } else {
  1275. this.processStep.num++;
  1276. }
  1277. if (this.personType === 1) {
  1278. if (this.infomation.workNo === null) {
  1279. this.infomation["photoPath"] = data;
  1280. } else {
  1281. this.infomation["photoPath"] =
  1282. this.infomation["photoPath"] !== ""
  1283. ? this.infomation["photoPath"]
  1284. : data;
  1285. }
  1286. } else {
  1287. this.infomation["photoPath"] = data;
  1288. }
  1289. this.tempPhotoPath = "https://10.0.0.201:8083" + "/yapi" + data;
  1290. this.uploadPic = false;
  1291. this.recognizeSuccess = false;
  1292. break;
  1293. case 9:
  1294. if (this.recognizeSuccess) {
  1295. this.processStep.num += 5;
  1296. } else {
  1297. this.processStep.num++;
  1298. }
  1299. if (this.personType === 1) {
  1300. if (this.person.workNo === null) {
  1301. this.person["photoPath"] = data;
  1302. } else {
  1303. this.person["photoPath"] =
  1304. this.person["photoPath"] !== ""
  1305. ? this.person["photoPath"]
  1306. : data;
  1307. }
  1308. } else {
  1309. this.person["photoPath"] = data;
  1310. }
  1311. this.tempPhotoPath = "https://10.0.0.201:8083" + "/yapi" + data;
  1312. this.uploadPic = false;
  1313. this.recognizeSuccess = false;
  1314. break;
  1315. default:
  1316. break;
  1317. }
  1318. }
  1319. },
  1320. // 人脸识别读取
  1321. handleByfaceOut(data) {
  1322. // console.log("人脸识别反馈", data);
  1323. this.recognizeSuccess = true;
  1324. if (data) {
  1325. switch (this.processStep.num) {
  1326. case 0:
  1327. // this.processStep.num += 5;
  1328. this.infomation["id"] = data.id;
  1329. this.infomation["name"] = data.name;
  1330. this.infomation["companyName"] = data.companyName;
  1331. this.infomation["company"] = data.companyName
  1332. ? data.companyName
  1333. : data.departmentName;
  1334. this.infomation["idNumber"] = data.idNumber;
  1335. this.infomation["telephone"] = data.telephone;
  1336. this.infomation["cardNo"] = data.cardNo;
  1337. this.infomation["workNo"] = data.workNo;
  1338. this.infomation["photoPath"] = data.photoPath;
  1339. if (data.department) {
  1340. this.infomation["department"] = data.department;
  1341. } else {
  1342. this.infomation["department"] =
  1343. this.personType === 1
  1344. ? "821025772184543232"
  1345. : "821025720783347712";
  1346. }
  1347. this.infomation["position"] =
  1348. this.personType === 1
  1349. ? "821073061166981120"
  1350. : "821073092108361728";
  1351. this.infomation["type"] =
  1352. this.personType === 1
  1353. ? "546093319541760000"
  1354. : "403245878963347456";
  1355. this.infomation["accessControlIds"] = data.accessControlIds;
  1356. break;
  1357. case 9:
  1358. // this.processStep.num += 5;
  1359. this.person["id"] = data.id;
  1360. this.person["name"] = data.name;
  1361. this.person["companyName"] = data.companyName;
  1362. this.person["company"] = data.companyName
  1363. ? data.companyName
  1364. : data.departmentName;
  1365. this.person["idNumber"] = data.idNumber;
  1366. this.person["telephone"] = data.telephone;
  1367. this.person["cardNo"] = data.cardNo;
  1368. this.person["workNo"] = data.workNo;
  1369. this.person["photoPath"] = data.photoPath;
  1370. if (data.department) {
  1371. this.infomation["department"] = data.department;
  1372. } else {
  1373. this.infomation["department"] =
  1374. this.personType === 1
  1375. ? "821025772184543232"
  1376. : "821025720783347712";
  1377. }
  1378. this.person["position"] =
  1379. this.personType === 1
  1380. ? "821073061166981120"
  1381. : "821073092108361728";
  1382. this.person["type"] =
  1383. this.personType === 1
  1384. ? "546093319541760000"
  1385. : "403245878963347456";
  1386. this.person["accessControlIds"] = data.typeBelong;
  1387. if (!this.checkIn(data.id)) {
  1388. this.infomation.persons.push(this.person);
  1389. // console.log("添加", data.name);
  1390. } else {
  1391. // console.log("人员已添加");
  1392. }
  1393. break;
  1394. default:
  1395. break;
  1396. }
  1397. }
  1398. },
  1399. // 读取身份证
  1400. readIdCard(data) {
  1401. // console.log("身份证信息", data);
  1402. if (data) {
  1403. switch (this.processStep.num) {
  1404. case 3:
  1405. this.infomation["idNumber"] = data.cardno;
  1406. this.processStep.num++;
  1407. break;
  1408. case 12:
  1409. this.person["idNumber"] = data.cardno;
  1410. this.processStep.num++;
  1411. break;
  1412. default:
  1413. break;
  1414. }
  1415. }
  1416. // this.fullLoading = this.$loading({
  1417. // text: "身份证读取中",
  1418. // lock: true,
  1419. // spinner: "el-icon-loading",
  1420. // background: "rgba(0, 0, 0, 0.7)",
  1421. // });
  1422. // setTimeout(() => {
  1423. // if (data.code === "0") {
  1424. // this.idCardData = data;
  1425. // // this.GetPersonByIdCard();
  1426. // } else {
  1427. // this.$message.warning("读取身份证失败");
  1428. // this.fullLoading.close();
  1429. // }
  1430. // }, 1000);
  1431. },
  1432. // 读取rfid卡
  1433. handleReaderOut(code) {
  1434. console.log("rfid", code);
  1435. this.fullLoading = this.$loading({
  1436. text: "读取中",
  1437. lock: true,
  1438. spinner: "el-icon-loading",
  1439. background: "rgba(0, 0, 0, 0.7)",
  1440. });
  1441. setTimeout(() => {
  1442. if (!!code) {
  1443. this.rfid = code;
  1444. this.fullLoading.close();
  1445. // this.GetPersonByLabelRFID()
  1446. }
  1447. }, 1000);
  1448. },
  1449. checkIn(id) {
  1450. if (this.infomation.id === id) {
  1451. return true;
  1452. } else {
  1453. for (let i = 0; i < this.infomation.persons.length; i++) {
  1454. const p = this.infomation.persons[i];
  1455. if (p.id === id) {
  1456. return true;
  1457. }
  1458. }
  1459. return false;
  1460. }
  1461. },
  1462. refresh() {
  1463. this.refreshKey++;
  1464. },
  1465. },
  1466. };
  1467. </script>
  1468. <style>
  1469. .el-descriptions__body {
  1470. font-size: 36px;
  1471. color: #ffffff;
  1472. background-color: transparent;
  1473. }
  1474. .el-input__inner {
  1475. height: 120px;
  1476. }
  1477. .el-radio {
  1478. padding-top: 2%;
  1479. color: #fff;
  1480. }
  1481. .el-radio__label {
  1482. font-size: 36px;
  1483. vertical-align: middle;
  1484. }
  1485. .el-radio__inner {
  1486. width: 40px;
  1487. height: 40px;
  1488. background: #f7f8fa;
  1489. color: #333;
  1490. border: 0 !important;
  1491. border-radius: 0;
  1492. }
  1493. .el-radio__inner::after {
  1494. width: 0px;
  1495. }
  1496. .el-checkbox {
  1497. color: #fff;
  1498. }
  1499. .el-checkbox__label {
  1500. font-size: 36px;
  1501. vertical-align: middle;
  1502. }
  1503. .el-checkbox__inner {
  1504. width: 40px;
  1505. height: 40px;
  1506. background: #f7f8fa;
  1507. }
  1508. .el-checkbox__inner::after {
  1509. border: 0px solid #fff !important;
  1510. width: 0px;
  1511. }
  1512. </style>
  1513. <style lang="less" scoped>
  1514. .recognize-main {
  1515. width: 100%;
  1516. height: 100%;
  1517. padding: 100px 30px 40px;
  1518. pointer-events: auto;
  1519. color: #fff;
  1520. .infomation_content {
  1521. color: #fff;
  1522. .infomation_prompt {
  1523. font-size: 60px;
  1524. margin-top: 2%;
  1525. margin-left: 2%;
  1526. }
  1527. .infomation_prompt_cause {
  1528. font-size: 60px;
  1529. margin-top: 12%;
  1530. margin-left: 2%;
  1531. .infomation_prop_cause {
  1532. width: 100%;
  1533. height: 100px;
  1534. display: flex;
  1535. margin-top: 2%;
  1536. margin-left: 60%;
  1537. }
  1538. .infomation_prop_value {
  1539. }
  1540. }
  1541. .infomation_prop {
  1542. margin-top: 14%;
  1543. width: 100%;
  1544. height: 100px;
  1545. display: flex;
  1546. justify-content: center;
  1547. align-items: center;
  1548. font-size: 60px;
  1549. }
  1550. .infomation_data_line {
  1551. margin-top: 5%;
  1552. }
  1553. .infomation_data {
  1554. width: 100%;
  1555. display: flex;
  1556. justify-content: left;
  1557. flex-wrap: wrap;
  1558. font-size: 50px;
  1559. text-align: center;
  1560. .infomation_data_content {
  1561. margin-top: 2%;
  1562. margin-left: 12%;
  1563. width: 35%;
  1564. height: 100px;
  1565. justify-content: center;
  1566. align-items: flex-start;
  1567. }
  1568. .infomation_data_content2 {
  1569. margin-top: 2%;
  1570. margin-left: 8%;
  1571. width: 41%;
  1572. height: 100px;
  1573. display: flex;
  1574. justify-content: center;
  1575. align-items: center;
  1576. text-align: left;
  1577. }
  1578. }
  1579. .infomation_prompt_final {
  1580. font-size: 50px;
  1581. margin-top: 2%;
  1582. margin-left: 2%;
  1583. }
  1584. .infomation_data_final {
  1585. padding-top: 2%;
  1586. padding-left: 2%;
  1587. }
  1588. .infomation_button {
  1589. width: 100%;
  1590. display: flex;
  1591. justify-content: center;
  1592. align-items: center;
  1593. margin-top: 2%;
  1594. margin-left: 20%;
  1595. }
  1596. }
  1597. .infomation_content_video {
  1598. color: #fff;
  1599. display: flex;
  1600. justify-content: center;
  1601. align-items: center;
  1602. text-align: center; //水平居中
  1603. .infomation_prompt_center {
  1604. margin-bottom: 10vh;
  1605. font-size: 50px;
  1606. margin: 10px auto;
  1607. }
  1608. .infomation_video {
  1609. margin-top: 1%;
  1610. width: 1280px;
  1611. height: 800px;
  1612. .infomation_video_main {
  1613. width: 100%;
  1614. height: 100%;
  1615. }
  1616. }
  1617. }
  1618. .infomation_content_read {
  1619. color: #fff;
  1620. display: flex;
  1621. justify-content: center;
  1622. align-items: center;
  1623. .infomation_prompt_left {
  1624. font-size: 60px;
  1625. }
  1626. .infomation_data_line {
  1627. margin-top: 1%;
  1628. }
  1629. .infomation_read {
  1630. margin: 0 auto;
  1631. width: 80%;
  1632. border: 2px solid rgb(255, 255, 255);
  1633. border-radius: 15px;
  1634. .infomation_read_content {
  1635. padding: 10px;
  1636. font-size: 30px;
  1637. max-height: 700px;
  1638. overflow-y: scroll;
  1639. text-align: left;
  1640. line-height: 1.6;
  1641. strong {
  1642. color: #ffffff;
  1643. }
  1644. ul {
  1645. padding-left: 20px;
  1646. }
  1647. li {
  1648. margin-bottom: 8px;
  1649. }
  1650. }
  1651. }
  1652. .infomation_button {
  1653. width: 100%;
  1654. display: flex;
  1655. justify-content: center;
  1656. align-items: center;
  1657. margin-top: 2%;
  1658. margin-left: 20%;
  1659. }
  1660. }
  1661. }
  1662. </style>