safetyCardScan.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  1. <!-- 安全检查扫一扫 实验室详情 -->
  2. <template>
  3. <view class="safetyCardScan">
  4. <view class="header">
  5. <view class="tabTitle">
  6. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  7. <view class="tabTitle_text">
  8. <img :src="item.img">
  9. <view
  10. :id="pageType==index&&index==0?'fontColor-A':(pageType==1&&index==1?'fontColor-B':(pageType==2&&index==2?'fontColor-C':''))">
  11. {{item.name}}
  12. </view>
  13. </view>
  14. <view :class="{on:pageType==index}" class="tabTitle_across">
  15. <img :src="imagesUrl('commonality/img_xyzc_bg@1x.png')">
  16. </view>
  17. <view class="line"></view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="safetyCard" v-if="pageType==0">
  22. <view class="lab-info">
  23. <img class="lab-info-l" :src="imagesUrl('commonality/icon_aqjc_shiyanshi.png')">
  24. <view class="lab-info-c">
  25. <view class="lab-info-c-t">
  26. <view class="lab-info-c-t-l">{{newData.subName}}</view>
  27. <view class="lab-info-c-t-r" v-if="newData.levelName&&newData.typeName"
  28. :style="'border:1rpx solid '+newData.levelColor+';background:'+newData.levelColorTow+';'">
  29. <text
  30. :style="'border-right:1rpx solid '+newData.levelColor+';color:'+newData.levelColor+';'">{{newData.levelName?newData.levelName:''}}</text>
  31. <text
  32. :style="'color:'+newData.levelColor+';'">{{newData.typeName?newData.typeName:''}}</text>
  33. </view>
  34. </view>
  35. <view class="lab-info-c-b">
  36. {{newData.roomNum?newData.roomNum:'-'}}房间&{{newData.buildName}}
  37. </view>
  38. </view>
  39. <view class="lab-info-r">{{newData.subArea}}㎡</view>
  40. </view>
  41. <view class="liability-unit">
  42. <view>学院单位</view>
  43. <view>{{newData.deptName}}</view>
  44. </view>
  45. <view class="small-title-new" @click="unfoldPackUp('subAdminShowType')">
  46. <view>实验室负责人</view>
  47. <uni-icons :type="newData.subAdminShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
  48. </view>
  49. <view class="sub-head" v-if="newData.subAdminShowType">
  50. <view>{{newData.adminName}}</view>
  51. <view @click="callPhone(newData.adminPhone)">
  52. <img :src="imagesUrl('manage/icon_aqxxp_dh.png')">
  53. <view>{{newData.adminPhone}}</view>
  54. </view>
  55. </view>
  56. <view class="small-title-new" @click="unfoldPackUp('adminShowType')">
  57. <view>安全员</view>
  58. <uni-icons :type="newData.adminShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
  59. </view>
  60. <view v-if="newData.adminShowType">
  61. <view class="sub-head" v-for="(item,index) in newData.safeUserList" :key="index">
  62. <view>{{item.safeUserName}}</view>
  63. <view @click="callPhone(item.safeUserPhone)">
  64. <img :src="imagesUrl('manage/icon_aqxxp_dh.png')" v-if="item.safeUserPhone">
  65. <view>{{item.safeUserPhone?item.safeUserPhone:'--'}}</view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="classify" v-for="(item,index) in newData.labInfoBrandModels" :key="index">
  70. <view v-if="item.privateList.length>0" class="small-title-new" @click="unfoldPackUp('list',index)">
  71. <view>{{item.brandName}}</view>
  72. <uni-icons :type="item.showType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
  73. </view>
  74. <view v-if="item.privateList.length>0 && item.brandType==1 && !item.isSpecial&&item.showType">
  75. <view class="small-items-new" v-for="(item2,index2) in item.privateList" :key="index2">
  76. <view>{{index2+1}}. </view>
  77. <view>{{item2.infoContent}}</view>
  78. </view>
  79. </view>
  80. <view v-if="item.privateList.length>0 && item.brandType==1 && item.isSpecial&&item.showType">
  81. <view class="small-items-new" v-for="(item2,index2) in item.privateList" :key="index2">
  82. <view></view>
  83. <view>{{item2.infoContent}}</view>
  84. </view>
  85. </view>
  86. <view v-if="item.privateList.length>0 && item.brandType==2&&item.showType">
  87. <view class="logotype-img-new">
  88. <img v-for="(item3,index3) in item.privateList" :key="index3" :src="baseUrl+item3.infoContent">
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="position-button-box" :class="signInType==0?'button-box-1':'button-box-2'" v-if="pageType == 0">
  94. <img class="position-button-p-1" v-if="signInType == 1" @click="laboratoryLabHkPassOutSignIn()"
  95. :src="imagesUrl('safetyCheck/icon_sys_qd@1x.png')">
  96. <img class="position-button-p-1" v-if="signInType == 2" @click="laboratoryLabHkPassOutSignOut()"
  97. :src="imagesUrl('safetyCheck/icon_sys_qt@1x.png')">
  98. <img class="position-button-p-1" @click="goPage('securityCheck',true)"
  99. :src="imagesUrl('safetyCheck/icon_aqjc_anquanjiancha.png')">
  100. <img class="position-button-p-2" @click="goPage('snapshot','')"
  101. :src="imagesUrl('safetyCheck/icon_aqjc_suishoupai.png')">
  102. </view>
  103. <!-- 物联控制 -->
  104. <iotControl ref="iotControl" v-if="pageType == 1" :subjectData="subjectData"></iotControl>
  105. <!-- 进出记录 -->
  106. <accessRecord v-if="pageType == 2" :subjectData="subjectData"></accessRecord>
  107. <!-- 语音广播弹窗 -->
  108. <voiceBroadcast v-if="broadcastPage" :subjectData="subjectData"></voiceBroadcast>
  109. <!-- 空调弹窗 -->
  110. <airConditioning v-if="conditioningPage" :airConditioningData="airConditioningData"></airConditioning>
  111. <view class="shade-box" v-if="securityCheck">
  112. <view class="null-box" @click="goPage('securityCheck',false)"></view>
  113. <view class="shade_n">
  114. <view class="title">
  115. <view>请选择实验室</view>
  116. </view>
  117. <view class="batch">
  118. <view class="batch-li" @click="batchClickTow(item)" v-for="(item,index) in securityCheckList">
  119. <view class="batch-li-l">
  120. <text>{{item.planTitle}}-{{item.checkName}}</text>
  121. <text>{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</text>
  122. </view>
  123. <view class="batch-li-r">
  124. <img :src="imagesUrl('commonality/icon_wd_gd@1x.png')">
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="shade-sign-in-max-box" v-if="signInShowType">
  131. <!-- 签到 -->
  132. <view class="shade-sign-in-min-box-1" v-if="signInDataType == 1">
  133. <view class="shade-sign-in-title-p">{{signInData.title}}</view>
  134. <view class="shade-sign-in-img-text-box">
  135. <view class="shade-sign-in-img-text-min-box">
  136. <img :src="imagesUrl('safetyCheck/icon_qdcg_qdr@1x.png')">
  137. <view>签到人:</view>
  138. </view>
  139. <view class="shade-sign-in-img-text-p">{{signInData.userName}}{{signInData.userAccount?'('+signInData.userAccount+')':''}}</view>
  140. </view>
  141. <view class="shade-sign-in-img-text-box">
  142. <view class="shade-sign-in-img-text-min-box">
  143. <img :src="imagesUrl('safetyCheck/icon_qdcg_qddd@1x.png')">
  144. <view>签到地点:</view>
  145. </view>
  146. <view class="shade-sign-in-img-text-p">{{signInData.subName}}</view>
  147. <view class="shade-sign-in-img-text-p" style="margin-top:15rpx;">{{signInData.address}}</view>
  148. </view>
  149. <view class="shade-sign-in-img-text-box">
  150. <view class="shade-sign-in-img-text-min-box">
  151. <img :src="imagesUrl('safetyCheck/icon_qdcg_qdsj@1x.png')">
  152. <view>签到时间:</view>
  153. </view>
  154. <view class="shade-sign-in-img-text-p">{{signInData.signIn}}</view>
  155. </view>
  156. <view class="off-button-p" @click="offButton()">关闭({{timeNum}})</view>
  157. </view>
  158. <!-- 签退 -->
  159. <view class="shade-sign-in-min-box-2" v-if="signInDataType == 2">
  160. <view class="shade-sign-in-title-p">{{signInData.title}}</view>
  161. <view class="shade-sign-in-img-text-box">
  162. <view class="shade-sign-in-img-text-min-box">
  163. <img :src="imagesUrl('safetyCheck/icon_qdcg_qdsj@1x.png')">
  164. <view>签退时间:</view>
  165. </view>
  166. <view class="shade-sign-in-img-text-p">{{signInData.signOut}}</view>
  167. </view>
  168. <view class="shade-sign-in-img-text-box">
  169. <view class="shade-sign-in-img-text-min-box">
  170. <img :src="imagesUrl('safetyCheck/icon_qtcg_tlsj@1x.png')">
  171. <view>本次停留时间</view>
  172. </view>
  173. <view class="shade-sign-in-img-text-p">{{signInData.residenceTime}}</view>
  174. </view>
  175. <view class="shade-sign-in-text-box">
  176. <view class="shade-sign-in-text-p-1">签到信息:</view>
  177. <view class="shade-sign-in-text-p-2">签到人:</view>
  178. <view class="shade-sign-in-text-p-2" style="margin-top:12rpx;">{{signInData.userName}}{{signInData.userAccount?'('+signInData.userAccount+')':''}}</view>
  179. <view class="shade-sign-in-text-p-2">签到地点:</view>
  180. <view class="shade-sign-in-text-p-2" style="margin-top:12rpx;">{{signInData.subName}}</view>
  181. <view class="shade-sign-in-text-p-2" style="margin-top:12rpx;">{{signInData.address}}</view>
  182. <view class="shade-sign-in-text-p-2">签到时间:</view>
  183. <view class="shade-sign-in-text-p-2" style="margin-top:12rpx;">{{signInData.signIn}}</view>
  184. </view>
  185. <view class="off-button-p" @click="offButton()">关闭({{timeNum}})</view>
  186. </view>
  187. </view>
  188. </view>
  189. </template>
  190. <script>
  191. import {
  192. parseTime
  193. } from '@/component/public.js'
  194. import {
  195. pageRestrictVerify
  196. } from '@/utils/index'
  197. import {
  198. iotControl
  199. } from '@/pages_manage/views/laboratory/iotControl.vue'
  200. import {
  201. accessRecord
  202. } from '@/pages_manage/views/laboratory/accessRecord.vue'
  203. import {
  204. voiceBroadcast
  205. } from '@/pages_manage/views/laboratory/voiceBroadcast.vue'
  206. import {
  207. airConditioning
  208. } from '@/pages_manage/views/laboratory/airConditioning.vue'
  209. import {
  210. config
  211. } from '@/api/request/config.js'
  212. import {
  213. } from '@/pages/api/index.js'
  214. import {
  215. securityAppCheckPlanScanCode,
  216. } from '@/pages_safetyCheck/api/index.js'
  217. import {
  218. laboratoryLabHkPassOutIsEnableSign,
  219. laboratoryLabHkPassOutIsSign,
  220. laboratoryLabHkPassOutSignIn,
  221. laboratoryLabHkPassOutSignOut,
  222. } from '@/pages_manage/api/index.js'
  223. export default {
  224. name: "safetyCardScan",
  225. components: {
  226. iotControl,
  227. accessRecord,
  228. voiceBroadcast,
  229. airConditioning,
  230. },
  231. data() {
  232. return {
  233. baseUrl: config.base_url,
  234. pageType: 1,
  235. tabText: [{
  236. name: '安全信息牌',
  237. img: this.imagesUrl('safetyCheck/icon_sys_aqxxp@1x.png'),
  238. },
  239. {
  240. name: '监测控制',
  241. img: this.imagesUrl('safetyCheck/icon_sys_jckz@1x.png'),
  242. },
  243. {
  244. name: '进出记录',
  245. img: this.imagesUrl('safetyCheck/icon_sys_jcjl@1x.png'),
  246. },
  247. ],
  248. pageType: 0,
  249. newData: {
  250. adminName: '',
  251. adminPhone: '',
  252. safeUserList: [],
  253. labInfoBrandModels: [],
  254. },
  255. subjectData: null,
  256. identityData: uni.getStorageSync('identityData'),
  257. //语音广播弹窗
  258. broadcastPage: false,
  259. //空调弹窗
  260. conditioningPage: false,
  261. // 空调弹窗
  262. airConditioningData: null,
  263. securityCheck: false,
  264. securityCheckList:[],
  265. form: {},
  266. //签到按钮状态
  267. signInType:0,
  268. signInShowType:false,
  269. signInDataType:0,
  270. signInData:{
  271. title:'签到成功',
  272. userName:'姓名',
  273. userAccount:'学号',
  274. subName:'实验室名称',
  275. address:'楼栋-楼层-房间号',
  276. signIn:'2025-09-20 15:15:15',
  277. signOut:'2025-09-20 15:15:15',
  278. residenceTime:'20-20-20-20',
  279. },
  280. timeNum:0,
  281. timeData:null,
  282. }
  283. },
  284. // 父页面
  285. onReachBottom() {
  286. uni.$emit('onReachBottom') // 设置监听事件
  287. },
  288. onPullDownRefresh() {
  289. uni.$emit('onPullDownRefresh') // 设置监听事件
  290. },
  291. onLoad(option) {
  292. let newData = JSON.parse(decodeURIComponent(option.infoData));
  293. newData.subAdminShowType = true;
  294. newData.adminShowType = true;
  295. if (newData.labInfoBrandModels) {
  296. for (let i = 0; i < newData.labInfoBrandModels.length; i++) {
  297. newData.labInfoBrandModels[i].showType = true;
  298. }
  299. }
  300. if (newData.levelColor) {
  301. newData.levelColorTow = this.hexToRgb(newData.levelColor, 0.2)
  302. }
  303. this.$nextTick(() => {
  304. this.$set(this, 'newData', newData);
  305. this.$set(this, 'subjectData', newData);
  306. this.$set(this, 'pageType', 0);
  307. this.laboratoryLabHkPassOutIsEnableSign();
  308. })
  309. },
  310. onShow() {
  311. this.$set(this, 'securityCheck', false)
  312. },
  313. mounted() {
  314. },
  315. methods: {
  316. //十六进制颜色值和RGB格式转换
  317. hexToRgb(hex, opacity = 1) {
  318. // 去除#号
  319. var color = hex.replace("#", "");
  320. // 分割成红、绿、蓝三部分的16进制字符串
  321. var red = parseInt(color.substring(0, 2), 16);
  322. var green = parseInt(color.substring(2, 4), 16);
  323. var blue = parseInt(color.substring(4, 6), 16);
  324. return `RGB(${red}, ${green}, ${blue},${opacity})`;
  325. },
  326. //拨打电话
  327. callPhone(tel) {
  328. if(tel){
  329. uni.makePhoneCall({
  330. phoneNumber: tel
  331. })
  332. }
  333. },
  334. goVideoPage() {
  335. console.log('视频')
  336. let obj = {
  337. type: 4,
  338. subId: this.newData.subId
  339. }
  340. uni.navigateTo({
  341. url: '/pages_manage/views/laboratory/videoPlayer?item=' + encodeURIComponent(JSON.stringify(
  342. obj))
  343. });
  344. },
  345. getIotControlData() {
  346. this.$refs['iotControl'].iotAppHardwareFindByType();
  347. },
  348. buttonClick(type, row) {
  349. let self = this;
  350. if (type == 'subDetail') {
  351. //实验室详情
  352. } else if (type == 'broadcastOpen') {
  353. //语音弹窗开启
  354. this.$set(this, 'broadcastPage', true);
  355. } else if (type == 'broadcastClose') {
  356. //语音弹窗关闭
  357. this.$set(this, 'broadcastPage', false);
  358. } else if (type == 'conditioningOpen') {
  359. //空调弹窗开启
  360. this.$set(this, 'airConditioningData', row);
  361. this.$set(this, 'conditioningPage', true);
  362. } else if (type == 'conditioningClose') {
  363. //空调弹窗关闭
  364. this.$set(this, 'conditioningPage', false);
  365. } else if (type == 'back') {
  366. this.$set(this, 'pageType', 2);
  367. }
  368. },
  369. //展开/收起操作
  370. unfoldPackUp(type, index) {
  371. if (type == 'subAdminShowType') {
  372. this.$set(this.newData, 'subAdminShowType', !this.newData.subAdminShowType);
  373. } else if (type == 'adminShowType') {
  374. this.$set(this.newData, 'adminShowType', !this.newData.adminShowType);
  375. } else if (type == 'list') {
  376. this.$set(this.newData.labInfoBrandModels[index], 'showType', !this.newData.labInfoBrandModels[index]
  377. .showType);
  378. }
  379. },
  380. //顶部tab点击
  381. tabClick(index) {
  382. if (this.pageType != index) {
  383. this.$set(this, 'pageType', index);
  384. }
  385. },
  386. goPage(type, status) {
  387. if (!pageRestrictVerify(type)) {
  388. uni.showToast({
  389. title: '没有相关权限,请联系管理员',
  390. icon: "none",
  391. mask: true,
  392. duration: 2000
  393. });
  394. return
  395. } else if (type == 'securityCheck') {
  396. if(status){
  397. this.securityAppCheckPlanScanCode(this.newData.subId,);
  398. }else{
  399. this.$set(this,'securityCheck',false);
  400. }
  401. } else if (type == 'snapshot') {
  402. console.log(111)
  403. console.log(this.newData)
  404. this.$set(this.form, "subId", this.newData.subId)
  405. this.$set(this.form, "subName", this.newData.subName)
  406. this.$set(this.form, "subRoom", this.newData.roomNum)
  407. this.$set(this.form, "deptId", this.newData.deptId)
  408. this.$set(this.form, "deptName", this.newData.deptName)
  409. this.$set(this.form, "buildId", this.newData.buildId)
  410. this.$set(this.form, "buildName", this.newData.buildName)
  411. this.$set(this.form, "floorId", this.newData.floorId)
  412. this.$set(this.form, "floorName", this.newData.floorName)
  413. this.$set(this.form, "typeId", this.newData.typeId)
  414. this.$set(this.form, "classTypeNames", this.newData.typeName)
  415. this.$set(this.form, "levelId", this.newData.levelId)
  416. this.$set(this.form, "classLevelName", this.newData.levelName)
  417. uni.navigateTo({
  418. url: '/pages_safetyCheck/views/snapshotManage/snapshotList?form=' +
  419. encodeURIComponent(JSON.stringify(this.form))
  420. });
  421. }
  422. },
  423. //查询计划
  424. async securityAppCheckPlanScanCode(subId,planSetId) {
  425. let self = this;
  426. let checkCategory = null;
  427. if(uni.getStorageSync('identityData')){
  428. if(uni.getStorageSync('identityData').type=='collegeAdmin'){
  429. checkCategory=2
  430. }else if(uni.getStorageSync('identityData').type=='schoolAdmin'){
  431. checkCategory=1
  432. }
  433. }
  434. let obj = {
  435. subId:subId,
  436. checkCategory:checkCategory,
  437. };
  438. if(planSetId){
  439. obj.planSetId = planSetId;
  440. }
  441. const {
  442. data
  443. } = await securityAppCheckPlanScanCode(obj);
  444. if (data.code == 200) {
  445. if(data.data[0]){
  446. if(data.data[1]){
  447. //多个
  448. self.$set(self,'securityCheckList',data.data);
  449. self.$set(self,'securityCheck',true);
  450. }else{
  451. //单个
  452. let infoData = data.data[0];
  453. infoData.pageType = 0;
  454. uni.navigateTo({
  455. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
  456. JSON.stringify(infoData))
  457. });
  458. }
  459. }else{
  460. //没有
  461. uni.showToast({
  462. title: '该实验室暂无检查计划!',
  463. icon: "none",
  464. mask: true,
  465. duration: 2000
  466. });
  467. }
  468. }
  469. },
  470. //是否可以门禁签到
  471. async laboratoryLabHkPassOutIsEnableSign(subId,planSetId) {
  472. let self = this;
  473. let obj = {
  474. subId:this.newData.subId
  475. };
  476. const {
  477. data
  478. } = await laboratoryLabHkPassOutIsEnableSign(obj);
  479. if (data.code == 200) {
  480. if(data.data){
  481. this.laboratoryLabHkPassOutIsSign();
  482. }
  483. }
  484. },
  485. //是否已经签到
  486. async laboratoryLabHkPassOutIsSign(subId,planSetId) {
  487. let self = this;
  488. let obj = {
  489. subId:this.newData.subId
  490. };
  491. const {
  492. data
  493. } = await laboratoryLabHkPassOutIsSign(obj);
  494. if (data.code == 200) {
  495. if(data.data){
  496. this.$set(this,'signInType',2);
  497. }else{
  498. this.$set(this,'signInType',1);
  499. }
  500. }
  501. },
  502. //门禁签到
  503. async laboratoryLabHkPassOutSignIn(subId,planSetId) {
  504. let self = this;
  505. let obj = {
  506. subId:this.newData.subId
  507. };
  508. const {
  509. data
  510. } = await laboratoryLabHkPassOutSignIn(obj);
  511. if (data.code == 200) {
  512. let obj = data.data;
  513. obj.title = '签到成功';
  514. obj.address = this.newData.buildName +'-'+this.newData.floorName +'-'+this.newData.roomNum;
  515. obj.signIn = parseTime(obj.signIn, "{y}-{m}-{d} {h}:{i}:{s}");
  516. this.$set(this,'signInData',obj);
  517. this.$set(this,'signInDataType',1);
  518. this.$set(this,'signInShowType',true);
  519. this.timerFunction();
  520. this.laboratoryLabHkPassOutIsSign();
  521. }
  522. },
  523. //门禁签退
  524. async laboratoryLabHkPassOutSignOut(subId,planSetId) {
  525. let self = this;
  526. let obj = {
  527. subId:this.newData.subId
  528. };
  529. const {
  530. data
  531. } = await laboratoryLabHkPassOutSignOut(obj);
  532. if (data.code == 200) {
  533. let obj = data.data;
  534. obj.title = '签退成功';
  535. obj.address = this.newData.buildName +'-'+this.newData.floorName +'-'+this.newData.roomNum;
  536. obj.signIn = parseTime(obj.signIn, "{y}-{m}-{d} {h}:{i}:{s}");
  537. obj.signOut = parseTime(obj.signOut, "{y}-{m}-{d} {h}:{i}:{s}");
  538. this.$set(this,'signInData',obj);
  539. this.$set(this,'signInDataType',2);
  540. this.$set(this,'signInShowType',true);
  541. this.timerFunction();
  542. this.laboratoryLabHkPassOutIsSign();
  543. }
  544. },
  545. timerFunction(){
  546. let self = this;
  547. this.$set(this,'timeNum',10);
  548. this.timeData = setInterval(refreshCount, 1000);
  549. function refreshCount() {
  550. if(self.timeNum>0){
  551. self.$set(self,'timeNum',self.timeNum - 1);
  552. }else{
  553. self.$set(self,'signInShowType',false);
  554. clearInterval(self.timeData);
  555. }
  556. }
  557. },
  558. offButton(){
  559. clearInterval(this.timeData);
  560. this.$set(this,'signInShowType',false);
  561. },
  562. batchClickTow(row) {
  563. let infoData = row;
  564. infoData.pageType = 0;
  565. uni.navigateTo({
  566. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
  567. JSON.stringify(infoData))
  568. });
  569. },
  570. }
  571. }
  572. </script>
  573. <style lang="stylus" scoped>
  574. @import '@/api/request/imagesUrl.styl';
  575. .safetyCardScan {
  576. height: 100%;
  577. #fontColor-A {
  578. color: #00DEDE;
  579. }
  580. #fontColor-B {
  581. color: #FF8C00;
  582. }
  583. #fontColor-C {
  584. color: #0083FD;
  585. }
  586. .header {
  587. height: 192rpx;
  588. width: 100%;
  589. // position: fixed;
  590. // top: 0rpx;
  591. // z-index: 100;
  592. background: #fff;
  593. .tabTitle {
  594. width: 750rpx;
  595. height: 188rpx;
  596. display flex;
  597. justify-content: flex-start;
  598. align-items: center;
  599. border-bottom: 4rpx solid #F5F5F5;
  600. .tabTitle_li {
  601. height: 188rpx;
  602. flex: 1;
  603. position: relative;
  604. text-align center;
  605. .tabTitle_text {
  606. display: flex;
  607. justify-content: center;
  608. flex-direction: column;
  609. align-items: center;
  610. >img {
  611. width: 80rpx;
  612. height: 80rpx;
  613. margin-top: 20rpx;
  614. }
  615. >view:nth-of-type(1) {
  616. font-size: 30rpx;
  617. color: #333333;
  618. line-height: 42rpx;
  619. text-align: left;
  620. margin-top: 10rpx;
  621. }
  622. >view:nth-of-type(2) {
  623. font-size: 24rpx;
  624. color: #666666;
  625. line-height: 34rpx;
  626. text-align: left;
  627. }
  628. position: relative;
  629. &.on {}
  630. }
  631. .line {
  632. width: 2rpx;
  633. height: 40rpx;
  634. background: #D8D8D8;
  635. position: absolute;
  636. top: 40%;
  637. }
  638. .tabTitle_across {
  639. /* width: 50rpx;
  640. height: 4rpx;
  641. background: #0183FA;
  642. border-radius: 2rpx; */
  643. margin-left: 38%;
  644. margin-top: 12rpx;
  645. display none;
  646. >img {
  647. width: 40rpx;
  648. height: 26rpx;
  649. }
  650. &.on {
  651. display block;
  652. }
  653. }
  654. }
  655. }
  656. }
  657. /* 安全信息牌 */
  658. .safetyCard {
  659. padding-bottom: 150rpx;
  660. .lab-info {
  661. background: #FFFFFF;
  662. display: flex;
  663. justify-content: space-between;
  664. .lab-info-l {
  665. width: 80rpx;
  666. height: 80rpx;
  667. background: #0183FA;
  668. border-radius: 10rpx 10rpx 10rpx 10rpx;
  669. margin-left: 30rpx;
  670. margin-top: 30rpx;
  671. }
  672. .lab-info-c {
  673. width: 500rpx;
  674. margin: 24rpx 30rpx 0 20rpx;
  675. .lab-info-c-t {
  676. display: flex;
  677. justify-content: space-between;
  678. .lab-info-c-t-l {
  679. font-size: 30rpx;
  680. color: #333333;
  681. line-height: 42rpx;
  682. text-align: left;
  683. overflow: hidden;
  684. text-overflow: ellipsis;
  685. white-space: nowrap;
  686. }
  687. .lab-info-c-t-r {
  688. display: flex;
  689. justify-content: flex-start;
  690. background: rgba(255, 0, 0, 0.2);
  691. border-radius: 10rpx 10rpx 10rpx 10rpx;
  692. border: 2rpx solid #FF0000;
  693. width: 200rpx;
  694. height: 40rpx;
  695. margin-left: 10rpx;
  696. >text {
  697. display: inline-block;
  698. flex: 1;
  699. text-align: center;
  700. font-size: 24rpx;
  701. color: #FF0000;
  702. line-height: 40rpx;
  703. text-align: center;
  704. overflow: hidden;
  705. text-overflow: ellipsis;
  706. white-space: nowrap;
  707. }
  708. >text:nth-of-type(1) {
  709. border-right: 2rpx solid #FF0000;
  710. }
  711. >text:nth-of-type(2) {}
  712. }
  713. }
  714. .lab-info-c-b {
  715. font-size: 30rpx;
  716. color: #666666;
  717. line-height: 42rpx;
  718. text-align: left;
  719. margin-top: 10rpx;
  720. overflow: hidden;
  721. text-overflow: ellipsis;
  722. white-space: nowrap;
  723. }
  724. }
  725. .lab-info-r {
  726. width: 100rpx;
  727. height: 150rpx;
  728. background: rgba(1, 131, 250, 0.2);
  729. border-radius: 0rpx 0rpx 0rpx 0rpx;
  730. font-size: 28rpx;
  731. color: #0183FA;
  732. line-height: 150rpx;
  733. text-align: center;
  734. }
  735. }
  736. .liability-unit {
  737. width: 750rpx;
  738. height: 80rpx;
  739. background: #FFFFFF;
  740. border-bottom: 1rpx solid #E0E0E0;
  741. padding: 0 30rpx;
  742. box-sizing: border-box;
  743. display: flex;
  744. justify-content: space-between;
  745. margin-top: 14rpx;
  746. >view:nth-of-type(1) {
  747. font-size: 30rpx;
  748. color: #333333;
  749. line-height: 80rpx;
  750. text-align: left;
  751. }
  752. >view:nth-of-type(2) {
  753. font-size: 30rpx;
  754. color: #666666;
  755. line-height: 80rpx;
  756. text-align: left;
  757. }
  758. }
  759. .small-title {
  760. width: 750rpx;
  761. height: 80rpx;
  762. background: #FFFFFF;
  763. border-bottom: 1rpx solid #E0E0E0;
  764. padding: 0 30rpx;
  765. box-sizing: border-box;
  766. display: flex;
  767. justify-content: space-between;
  768. align-items: center;
  769. >view {
  770. font-size: 30rpx;
  771. color: #333333;
  772. line-height: 80rpx;
  773. text-align: left;
  774. }
  775. >img {
  776. width: 24rpx;
  777. height: 12rpx;
  778. }
  779. }
  780. .sub-head {
  781. width: 750rpx;
  782. height: 80rpx;
  783. background: #fff;
  784. padding: 0 30rpx;
  785. box-sizing: border-box;
  786. display: flex;
  787. justify-content: space-between;
  788. align-items: center;
  789. border-bottom: 1rpx solid #E0E0E0;
  790. >view:nth-of-type(1) {
  791. font-family: PingFang SC;
  792. font-weight: 500;
  793. font-size: 30rpx;
  794. color: #666666;
  795. line-height: 30rpx;
  796. }
  797. >view:nth-of-type(2) {
  798. display: flex;
  799. justify-content: flex-end;
  800. align-items: center;
  801. >img {
  802. width: 34rpx;
  803. height: 34rpx;
  804. margin-right: 14rpx;
  805. }
  806. >view {
  807. font-family: PingFang SC;
  808. font-weight: 500;
  809. font-size: 30rpx;
  810. color: #0183FA;
  811. line-height: 30rpx;
  812. }
  813. }
  814. }
  815. .sub-head:last-child {
  816. border-bottom: none;
  817. }
  818. .small-title-new {
  819. width: 750rpx;
  820. height: 80rpx;
  821. background: #FFFFFF;
  822. border-bottom: 1rpx solid #E0E0E0;
  823. padding: 0 30rpx;
  824. box-sizing: border-box;
  825. display: flex;
  826. justify-content: space-between;
  827. align-items: center;
  828. >view {
  829. font-size: 30rpx;
  830. color: #333333;
  831. line-height: 80rpx;
  832. text-align: left;
  833. }
  834. >img {
  835. width: 24rpx;
  836. height: 12rpx;
  837. }
  838. }
  839. .classify {
  840. .small-items-new {
  841. padding-left: 20rpx;
  842. box-sizing: border-box;
  843. background: #fff;
  844. display: flex;
  845. justify-content: flex-start;
  846. padding: 30rpx;
  847. box-sizing: border-box;
  848. border-bottom: 1rpx solid #E0E0E0;
  849. >view:nth-of-type(1) {
  850. color: #999999;
  851. font-weight: 500;
  852. font-size: 28rpx;
  853. margin-right: 12rpx;
  854. line-height: 34rpx;
  855. }
  856. >view:nth-of-type(2) {
  857. display: block;
  858. font-family: PingFang SC;
  859. font-weight: 500;
  860. font-size: 28rpx;
  861. line-height: 34rpx;
  862. color: #999999;
  863. }
  864. }
  865. .logotype-img-new {
  866. padding: 26rpx 0 34rpx 0;
  867. box-sizing: border-box;
  868. background: #fff;
  869. >img {
  870. display: inline-block;
  871. width: 86rpx;
  872. height: 114rpx;
  873. margin-left: 30rpx;
  874. margin-bottom: 20rpx;
  875. }
  876. }
  877. .small-items {
  878. padding-left: 20rpx;
  879. box-sizing: border-box;
  880. background: #fff;
  881. display: flex;
  882. justify-content: flex-start;
  883. padding: 20rpx;
  884. box-sizing: border-box;
  885. >view:nth-of-type(1) {
  886. color: #999999;
  887. font-weight: 500;
  888. font-size: 28rpx;
  889. margin-right: 12rpx;
  890. line-height: 34rpx;
  891. }
  892. >view:nth-of-type(2) {
  893. display: block;
  894. font-family: PingFang SC;
  895. font-weight: 500;
  896. font-size: 28rpx;
  897. line-height: 34rpx;
  898. color: #999999;
  899. }
  900. }
  901. .logotype {
  902. width: 750rpx;
  903. height: 100rpx;
  904. font-family: PingFang SC;
  905. font-weight: 500;
  906. font-size: 32rpx;
  907. color: #333333;
  908. line-height: 100rpx;
  909. padding-left: 20rpx;
  910. box-sizing: border-box;
  911. background: #0183FA;
  912. color: #fff;
  913. }
  914. .logotype-img {
  915. padding: 26rpx 0 34rpx 0;
  916. box-sizing: border-box;
  917. background: #fff;
  918. >img {
  919. display: inline-block;
  920. width: 86rpx;
  921. height: 114rpx;
  922. margin-left: 30rpx;
  923. margin-bottom: 20rpx;
  924. }
  925. }
  926. }
  927. }
  928. .button-box-1{
  929. img:nth-child(1){
  930. margin:0 143rpx;
  931. }
  932. }
  933. .button-box-2{
  934. img:nth-child(1){
  935. margin-left:68rpx;
  936. }
  937. img:nth-child(2){
  938. margin:0 67rpx;
  939. }
  940. img:nth-child(3){
  941. margin-right:68rpx;
  942. }
  943. }
  944. .position-button-box {
  945. position: fixed;
  946. bottom: 40rpx;
  947. display: flex;
  948. justify-content: center;
  949. >img {
  950. width: 160rpx;
  951. height: 160rpx;
  952. }
  953. }
  954. .shade-box {
  955. height: 100%;
  956. width: 100%;
  957. position: fixed;
  958. display: flex;
  959. flex-direction: column;
  960. z-index: 200;
  961. background: rgba(0, 0, 0, 0.2);
  962. top: 0;
  963. .null-box {
  964. flex: 1;
  965. }
  966. .shade_n {
  967. position: absolute;
  968. bottom: 0;
  969. left: 0;
  970. width: 750rpx;
  971. height: 466rpx;
  972. background: #FFFFFF;
  973. border-radius: 20rpx 20rpx 0rpx 0rpx;
  974. overflow-y: auto;
  975. .title {
  976. display: flex;
  977. justify-content: space-between;
  978. align-items: center;
  979. padding: 0 50rpx 0 284rpx;
  980. box-sizing: border-box;
  981. border-bottom: 1rpx solid #E0E0E0;
  982. >view {
  983. font-size: 30rpx;
  984. color: #3D3D3D;
  985. line-height: 90rpx;
  986. text-align: left;
  987. }
  988. >img {
  989. width: 24rpx;
  990. height: 12rpx;
  991. }
  992. }
  993. .batch {
  994. padding: 0 30rpx;
  995. box-sizing: border-box;
  996. .batch-li {
  997. display: flex;
  998. justify-content: space-between;
  999. align-items: center;
  1000. border-bottom: 1rpx solid #E0E0E0;
  1001. padding: 20rpx 0 16rpx 0rpx;
  1002. box-sizing: border-box;
  1003. .batch-li-l {
  1004. >text:nth-of-type(1) {
  1005. display: block;
  1006. font-size: 30rpx;
  1007. color: #333333;
  1008. line-height: 42rpx;
  1009. text-align: left;
  1010. }
  1011. >text:nth-of-type(2) {
  1012. display: block;
  1013. font-size: 28rpx;
  1014. color: #666666;
  1015. line-height: 39rpx;
  1016. text-align: left;
  1017. margin-top: 6rpx;
  1018. }
  1019. }
  1020. .batch-li-r {
  1021. font-size: 28rpx;
  1022. color: #666666;
  1023. line-height: 39rpx;
  1024. text-align: left;
  1025. display: flex;
  1026. justify-content: flex-start;
  1027. align-items: center;
  1028. >img {
  1029. width: 24rpx;
  1030. height: 24rpx;
  1031. margin-left: 9rpx;
  1032. }
  1033. }
  1034. }
  1035. }
  1036. }
  1037. }
  1038. .shade-sign-in-max-box{
  1039. height: 100%;
  1040. width: 100%;
  1041. position: fixed;
  1042. display: flex;
  1043. flex-direction: column;
  1044. z-index: 200;
  1045. background: rgba(0, 0, 0, 0.2);
  1046. top: 0;
  1047. .shade-sign-in-min-box-1{
  1048. width:600rpx;
  1049. height:660rpx;
  1050. position: absolute;
  1051. top:50%;
  1052. left:50%;
  1053. margin-top:-442rpx;
  1054. margin-left:-300rpx;
  1055. background-color: #fff;
  1056. border-radius: 20rpx;
  1057. overflow: hidden
  1058. .shade-sign-in-title-p{
  1059. background: url($imagesUrl+'safetyCheck/img_qdcg@1x.png') no-repeat;
  1060. background-size:100%;
  1061. background-repeat: no-repeat;
  1062. }
  1063. }
  1064. .shade-sign-in-min-box-2{
  1065. width:600rpx;
  1066. height:920rpx;
  1067. position: absolute;
  1068. top:50%;
  1069. left:50%;
  1070. margin-top:-554rpx;
  1071. margin-left:-300rpx;
  1072. background-color: #fff;
  1073. border-radius: 20rpx;
  1074. overflow: hidden
  1075. .shade-sign-in-title-p{
  1076. background: url($imagesUrl+'safetyCheck/img_qtcg@1x.png') no-repeat;
  1077. background-size:100%;
  1078. background-repeat: no-repeat;
  1079. }
  1080. }
  1081. .shade-sign-in-title-p{
  1082. width: 600rpx;
  1083. height: 100rpx;
  1084. font-size:36rpx;
  1085. color:#fff;
  1086. text-align: center;
  1087. line-height:100rpx;
  1088. }
  1089. .shade-sign-in-img-text-box{
  1090. margin-left:49rpx;
  1091. margin-top:38rpx;
  1092. .shade-sign-in-img-text-min-box{
  1093. display: flex;
  1094. img{
  1095. width: 36rpx;
  1096. height: 36rpx;
  1097. margin-right:12rpx;
  1098. }
  1099. view{
  1100. height: 36rpx;
  1101. font-weight: normal;
  1102. font-size: 30rpx;
  1103. color: #666666;
  1104. line-height: 36rpx;
  1105. text-align: left;
  1106. font-style: normal;
  1107. text-transform: none;
  1108. }
  1109. }
  1110. .shade-sign-in-img-text-p{
  1111. margin-top:25rpx;
  1112. height: 36rpx;
  1113. font-weight: normal;
  1114. font-size: 30rpx;
  1115. color: #333333;
  1116. line-height: 36rpx;
  1117. text-align: left;
  1118. font-style: normal;
  1119. text-transform: none;
  1120. }
  1121. }
  1122. .shade-sign-in-text-box{
  1123. margin:0 40rpx;
  1124. width:520rpx;
  1125. height:420rpx;
  1126. background: #F5F5F5;
  1127. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1128. overflow: hidden;
  1129. margin-top:30rpx;
  1130. .shade-sign-in-text-p-1{
  1131. margin-left:46rpx;
  1132. margin-top:25rpx;
  1133. height: 30rpx;
  1134. font-weight: normal;
  1135. font-size: 30rpx;
  1136. color: #666666;
  1137. line-height: 30rpx;
  1138. text-align: left;
  1139. font-style: normal;
  1140. text-transform: none;
  1141. }
  1142. .shade-sign-in-text-p-2{
  1143. margin-left:46rpx;
  1144. margin-top:27rpx;
  1145. height: 30rpx;
  1146. font-weight: normal;
  1147. font-size: 26rpx;
  1148. color: #666666;
  1149. line-height: 30rpx;
  1150. text-align: left;
  1151. font-style: normal;
  1152. text-transform: none;
  1153. }
  1154. }
  1155. .off-button-p{
  1156. width:600rpx;
  1157. height:100rpx;
  1158. line-height:100rpx;
  1159. font-size:30rpx;
  1160. color: #0183FA;
  1161. text-align: center;
  1162. }
  1163. }
  1164. }
  1165. </style>