safetyCardScan.vue 32 KB

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