safetyCardScan.vue 31 KB

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