index.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. <template>
  2. <view @click="resetTimer">
  3. <img
  4. v-if="screenSaveFlag"
  5. class="screen-save-box"
  6. src="static/images/screen-saver.png"
  7. alt=""
  8. />
  9. <view v-else>
  10. <view class="container-lab">
  11. <!-- 头部 -->
  12. <view class="header">
  13. <img src="static/images/header.png" class="header-img" alt="" />
  14. <view class="hleft" @click="toSettingPage"></view>
  15. <view class="hcenter"></view>
  16. <view class="hright" v-if="isOnlineInfo" @click="handleGetOff">
  17. <img src="static/images/cancel.png" alt="" />
  18. </view>
  19. </view>
  20. <!-- END -->
  21. <view class="container">
  22. <!-- 设备头 -->
  23. <view class="deviceInfo">
  24. <view
  25. class="deviceInfoTitle"
  26. style="justify-content: space-between"
  27. >
  28. <view class="instr-info">
  29. <img src="static/images/icon-instr.png" class="comImg" alt="" />
  30. <view class="title">设备信息</view>
  31. </view>
  32. <view class="handle-instr-wrap">
  33. <view class="handle-instr open-btn" @click="openInstr">
  34. 打开设备
  35. </view>
  36. <view class="handle-instr close-btn" @click="closeInstr">
  37. 关闭设备
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 内容 -->
  42. <ul class="deviecDetail">
  43. <li>
  44. <view class="devicelab">日期:</view>
  45. <view class="title-info" id="clock">{{ curTime }}</view>
  46. </li>
  47. <li>
  48. <view class="devicelab">设备名称:</view>
  49. <view class="title-info">{{ instrInfo.instName }}</view>
  50. </li>
  51. <li>
  52. <view class="devicelab">设备编号:</view>
  53. <view class="title-info">
  54. {{ instrInfo.instCode }} {{ terminal }}
  55. </view>
  56. </li>
  57. <li>
  58. <view class="devicelab tongji">使用统计:</view>
  59. </li>
  60. <!-- 本周 -->
  61. <li>
  62. <view class="devicelab" style="font-weight: 700">本周</view>
  63. </li>
  64. <li>
  65. <view class="devicelab">使用次数</view>
  66. <view class="title-info">{{ instrInfo.useCountWeek }}次</view>
  67. </li>
  68. <li
  69. style="
  70. display: flex;
  71. justify-content: space-between;
  72. justify-content: center;
  73. "
  74. >
  75. <view class="devicelab">使用时长</view>
  76. <view class="frequency">
  77. <!-- <view class="line">
  78. <view id="wheek_rate" class="realline"></view>
  79. </view> -->
  80. <p class="num">{{ instrInfo.useTimeWeek }}小时</p>
  81. </view>
  82. </li>
  83. <!-- 本月 -->
  84. <li>
  85. <view class="devicelab" style="font-weight: 700">本月</view>
  86. </li>
  87. <li>
  88. <view class="devicelab">使用次数</view>
  89. <view class="title-info">{{ instrInfo.useCountMonth }}次</view>
  90. </li>
  91. <li
  92. style="
  93. display: flex;
  94. justify-content: space-between;
  95. justify-content: center;
  96. "
  97. >
  98. <view class="devicelab">使用时长</view>
  99. <view class="frequency">
  100. <!-- <view class="line">
  101. <view id="month_rate" class="realline"></view>
  102. </view> -->
  103. <p class="num">{{ instrInfo.useTimeMonth }}小时</p>
  104. </view>
  105. </li>
  106. </ul>
  107. <!-- 底部统计 -->
  108. <!-- <view class="footer">
  109. <view class="tItem">
  110. <p class="tItemTitle">统计</p>
  111. <p class="tItemNum">22</p>
  112. </view>
  113. <view class="tItem">
  114. <p class="tItemTitle">数据量</p>
  115. <p class="tItemNum">33</p>
  116. </view>
  117. </view> -->
  118. </view>
  119. <!-- 设备右侧 -->
  120. <view class="deviceRight">
  121. <view class="deviceTop">
  122. <!-- 实验人员 -->
  123. <view class="deviceInfo laboratoryBox" v-if="isOnlineInfo">
  124. <view class="deviceInfoTitle">
  125. <img
  126. src="static/images/icon-user.png"
  127. class="comImg"
  128. alt=""
  129. />
  130. <view class="title">实验员</view>
  131. </view>
  132. <!-- 详情 信息 -->
  133. <view class="deviceInfoTop">
  134. <view class="imgBox">
  135. <img
  136. :src="completionImgPath(isOnlineInfo.avatar)"
  137. alt="加载失败"
  138. />
  139. </view>
  140. <ul class="laboratoryDetail">
  141. <li>
  142. <view class="laboratoryLab">姓名:</view>
  143. <view class="title">{{ isOnlineInfo.userName }}</view>
  144. </li>
  145. <li>
  146. <view class="laboratoryLab">课题组:</view>
  147. <view class="title">{{ isOnlineInfo.projectName }}</view>
  148. </li>
  149. <li>
  150. <view class="laboratoryLab">电话:</view>
  151. <view class="title">{{ isOnlineInfo.userContact }}</view>
  152. </li>
  153. </ul>
  154. </view>
  155. <view class="laboratory">
  156. <view class="tItem">
  157. <p class="tItemTitle">预约开始时间</p>
  158. <p class="tItemNum">{{ isOnlineInfo.startTime }}</p>
  159. </view>
  160. <view class="tItem">
  161. <p class="tItemTitle">预约结束时间</p>
  162. <p class="tItemNum">{{ isOnlineInfo.endTime }}</p>
  163. </view>
  164. <view class="tItem">
  165. <p class="tItemTitle">实际开始时间</p>
  166. <p class="tItemNum">
  167. {{ isOnlineInfo.usedRecord.startTime }}
  168. </p>
  169. </view>
  170. <view class="tItem">
  171. <p class="tItemTitle">实验时长</p>
  172. <p id="jishi_time" class="tItemNum">{{ formattedTime }}</p>
  173. </view>
  174. </view>
  175. </view>
  176. <!-- 实验人员 -->
  177. <view class="deviceInfo laboratoryBox" v-else>
  178. <view class="deviceInfoTitle">
  179. <img
  180. src="static/images/icon-user.png"
  181. class="comImg"
  182. alt=""
  183. />
  184. <view class="title">实验员尚未登录</view>
  185. </view>
  186. <!-- 未登录 -->
  187. <view class="nologin" @click="openFaceCheck">
  188. <view class="nologinImgBox">
  189. <img src="static/images/login.png" alt="" />
  190. </view>
  191. </view>
  192. </view>
  193. <!-- 下一个预约 -->
  194. <view class="deviceInfo nextOrder">
  195. <view class="deviceInfoTitle">
  196. <img
  197. src="static/images/icon-appoint.png"
  198. class="comImg"
  199. alt=""
  200. />
  201. <view class="title">下一个预约信息</view>
  202. </view>
  203. <view
  204. id="notNext"
  205. class="nextTop"
  206. v-if="appointList.length == 0"
  207. >
  208. <view class="nextNoLoginImgBox">
  209. <img src="static/images/data0.png" alt="" />
  210. </view>
  211. <view>暂无预约</view>
  212. </view>
  213. <view v-else class="next-order-wrap">
  214. <view
  215. v-for="(v, i) in appointList"
  216. :key="i"
  217. style="margin-bottom: 10px"
  218. >
  219. <view id="hasNext" class="deviceInfoTop">
  220. <view class="imgBox">
  221. <img
  222. id="nextImageUrl"
  223. :src="completionImgPath(v.avatar)"
  224. alt="加载失败"
  225. />
  226. </view>
  227. <ul class="laboratoryDetail pd10">
  228. <li>
  229. <view class="laboratoryLab">姓名:</view>
  230. <view id="nextUserName" class="title">
  231. {{ v.userName }}
  232. </view>
  233. </li>
  234. <li>
  235. <view class="laboratoryLab">课题组:</view>
  236. <view id="nextDepartment" class="title">
  237. {{ v.projectName }}
  238. </view>
  239. </li>
  240. <li>
  241. <view class="laboratoryLab">电话:</view>
  242. <view id="nextMobile" class="title">
  243. {{ v.userContact }}
  244. </view>
  245. </li>
  246. </ul>
  247. </view>
  248. <view id="nextAppointTime" class="nextLaboratory">
  249. <view class="tItem">
  250. <p class="tItemTitle">预约开始时间</p>
  251. <p id="appointStartTime" class="tItemNum">
  252. {{ v.startTime }}
  253. </p>
  254. </view>
  255. <view class="tItem">
  256. <p class="tItemTitle">预约结束时间</p>
  257. <p id="appointEndTime" class="tItemNum">
  258. {{ v.endTime }}
  259. </p>
  260. </view>
  261. </view>
  262. </view>
  263. </view>
  264. </view>
  265. </view>
  266. <!-- 设备数据 -->
  267. <view class="deviceData">
  268. <view class="deviceInfoHeader">
  269. <view class="deviceInfoTitle">
  270. <img
  271. src="static/images/icon-notice.png"
  272. class="comImg"
  273. alt=""
  274. />
  275. <view class="title">公告</view>
  276. </view>
  277. <!--<view class="deviceInfoBtn">-->
  278. <!--<button class="flesh btn" id="fleshClick">刷 新</button>-->
  279. <!--</view>-->
  280. </view>
  281. <ul class="deviceList">
  282. <li style="display: flex" v-for="(v, i) in noticeList" :key="i">
  283. <view class="notice-home-content" @click="openContent(v)">
  284. <view class="notice-home-p">
  285. {{ v.noticeTitle }}
  286. </view>
  287. </view>
  288. <view class="notice-home-createdName">
  289. {{ v.createdName }}
  290. </view>
  291. <view class="notice-home-date">
  292. {{ parseTime(v.createdTime, "{y}-{m}-{d}") }}
  293. </view>
  294. </li>
  295. </ul>
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. <u-popup
  301. v-if="noticeShow"
  302. :show="noticeShow"
  303. @close="noticeShow = false"
  304. mode="center"
  305. :round="10"
  306. :closeable="true"
  307. >
  308. <view class="notice-wrap">
  309. <view class="notice-header">{{ noticeInfo.noticeTitle }}</view>
  310. <view class="notice-content">
  311. <view v-html="noticeInfo.noticeContent"></view>
  312. </view>
  313. </view>
  314. </u-popup>
  315. </view>
  316. </view>
  317. </template>
  318. <script>
  319. import instApi from "../../api/inst";
  320. import to from "await-to-js";
  321. export default {
  322. data() {
  323. return {
  324. noticeShow: false, //公共详情
  325. noticeInfo: "", //公告详情
  326. clickTimer: null, //点击次数
  327. clickCount: 0, //点击次数
  328. timer: null, //当前时间
  329. infoTimer: null, //仪器详情
  330. curTime: "", //当前时间
  331. curTimetimer: null, //上机时间
  332. screenSaveTimer: null, //屏保时间
  333. idleTime: 5 * 60 * 1000, // 设置超时时间:5分钟
  334. screenSaveFlag: false,
  335. instrInfo: {
  336. id: 0,
  337. instName: "",
  338. instCode: "",
  339. useCountWeek: 0,
  340. useTimeWeek: 0,
  341. useCountMonth: 0,
  342. useTimeMonth: 0,
  343. },
  344. appointList: [], //预约列表
  345. noticeList: [], //公告
  346. terminal: "",
  347. isOnlineInfo: null, //在线信息
  348. userId: 0,
  349. currentTime: new Date(), // 当前时间
  350. };
  351. },
  352. computed: {
  353. formattedTime() {
  354. if (!this.isOnlineInfo) {
  355. return "-";
  356. }
  357. const diff =
  358. this.currentTime - new Date(this.isOnlineInfo.usedRecord.startTime);
  359. const hours = String(Math.floor(diff / (1000 * 60 * 60))).padStart(
  360. 2,
  361. "0"
  362. );
  363. const minutes = String(
  364. Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))
  365. ).padStart(2, "0");
  366. const seconds = String(
  367. Math.floor((diff % (1000 * 60)) / 1000)
  368. ).padStart(2, "0");
  369. return `${hours}:${minutes}:${seconds}`;
  370. },
  371. },
  372. onLoad(option) {
  373. this.userId = option.id;
  374. },
  375. async onShow() {
  376. this.startIdleTimer();
  377. if (!uni.getStorageSync("labsop_no")) {
  378. uni.redirectTo({
  379. url: "/pages/setting/index",
  380. });
  381. } else {
  382. // 获取仪器信息
  383. this.getInstrInfo();
  384. this.getAppointList();
  385. this.getNotice();
  386. await this.getGetOnInfo();
  387. // 获取日期
  388. this.timer = setInterval(() => {
  389. this.getNowTime();
  390. }, 1000);
  391. // 仪器信息
  392. this.infoTimer = setInterval(() => {
  393. this.getInstrInfo();
  394. this.getAppointList();
  395. this.getNotice();
  396. }, 60000);
  397. // 上机信息
  398. if (this.userId && !this.isOnlineInfo) {
  399. this.getOn();
  400. }
  401. this.handleSwitchInstr();
  402. }
  403. },
  404. onHide() {
  405. //离开页面前清除计时器
  406. clearInterval(this.timer);
  407. clearInterval(this.clickTimer);
  408. clearInterval(this.infoTimer);
  409. clearInterval(this.curTimetimer);
  410. this.resetTimer();
  411. this.timer = null;
  412. this.clickTimer = null;
  413. this.infoTimer = null;
  414. this.curTimetimer = null;
  415. },
  416. mounted() {},
  417. beforeDestroy() {
  418. //离开页面前清除计时器
  419. clearInterval(this.timer);
  420. clearInterval(this.clickTimer);
  421. clearInterval(this.infoTimer);
  422. clearInterval(this.curTimetimer);
  423. this.resetTimer();
  424. this.timer = null;
  425. this.clickTimer = null;
  426. this.infoTimer = null;
  427. this.curTimetimer = null;
  428. },
  429. methods: {
  430. //屏保计时
  431. startIdleTimer() {
  432. this.screenSaveTimer = setTimeout(() => {
  433. this.toScreenSaver();
  434. }, this.idleTime);
  435. },
  436. // 点击操作重置屏保计时
  437. resetTimer() {
  438. clearTimeout(this.screenSaveTimer);
  439. this.screenSaveFlag = false;
  440. this.startIdleTimer(); // 重置计时器
  441. },
  442. // 进入屏保
  443. toScreenSaver() {
  444. this.screenSaveFlag = true;
  445. },
  446. // 打开公告详情
  447. async openContent(row) {
  448. this.noticeShow = true;
  449. this.noticeInfo = row;
  450. },
  451. // 获取仪器信息
  452. async getInstrInfo() {
  453. this.terminal = uni.getStorageSync("labsop_no");
  454. let [err, res] = await to(
  455. instApi.getInstrInfo({ terminal: this.terminal })
  456. );
  457. if (err) return;
  458. this.instrInfo = res.data;
  459. },
  460. // 获取预约信息
  461. async getAppointList() {
  462. this.terminal = uni.getStorageSync("labsop_no");
  463. let [err, res] = await to(
  464. instApi.getAppointInfo({ terminal: this.terminal })
  465. );
  466. if (err) return;
  467. this.appointList = res.data;
  468. },
  469. // 获取公告信息
  470. async getNotice() {
  471. this.terminal = uni.getStorageSync("labsop_no");
  472. let [err, res] = await to(
  473. instApi.getNoticeInfo({ terminal: this.terminal })
  474. );
  475. if (err) return;
  476. this.noticeList = res.data;
  477. },
  478. // 上机
  479. async getOn() {
  480. const handleAppoint = uni.getStorageSync("handleAppoint");
  481. console.log("handleAppoint----------", handleAppoint);
  482. if (handleAppoint !== "appointLine") return;
  483. let [err, res] = await to(
  484. instApi.getOn({ terminal: this.terminal, UserId: this.userId })
  485. );
  486. uni.removeStorageSync("handleAppoint");
  487. if (err) return;
  488. this.getGetOnInfo();
  489. this.getAppointList();
  490. uni.showToast({
  491. title: "上机成功",
  492. icon: "success",
  493. duration: 1000,
  494. });
  495. },
  496. // 打开设备
  497. async handleSwitchInstr() {
  498. const handleType = uni.getStorageSync("handleType");
  499. console.log("handleType----------", handleType);
  500. if (handleType !== "openInstr") return;
  501. let [err, res] = await to(
  502. instApi.switch({
  503. switch: true,
  504. terminal: this.terminal,
  505. userId: Number(this.userId),
  506. })
  507. );
  508. uni.removeStorageSync("handleType");
  509. if (err) return;
  510. uni.showToast({
  511. title: "设备打开成功",
  512. icon: "success",
  513. duration: 1000,
  514. });
  515. },
  516. // 关闭设备
  517. async closeInstr() {
  518. uni.showModal({
  519. title: "提示",
  520. content: "确认关闭当前仪器?",
  521. success: async (modalRes) => {
  522. if (modalRes.confirm) {
  523. let [err, res] = await to(
  524. instApi.switch({
  525. switch: false,
  526. terminal: this.terminal,
  527. })
  528. );
  529. if (err) return;
  530. uni.showToast({
  531. title: "设备关闭成功",
  532. icon: "success",
  533. duration: 1000,
  534. });
  535. }
  536. },
  537. });
  538. },
  539. // 获取正在上机信息
  540. async getGetOnInfo() {
  541. let [err, res] = await to(
  542. instApi.getOnInfo({ terminal: this.terminal })
  543. );
  544. if (err) return;
  545. this.isOnlineInfo = res.data;
  546. this.curTimetimer = setInterval(this.updateTime, 1000);
  547. },
  548. // 下机
  549. handleGetOff() {
  550. uni.showModal({
  551. title: "提示",
  552. content: "退出设备将会断电、终止实验,您确定要注销登录吗?",
  553. success: async (res) => {
  554. if (res.confirm) {
  555. let [err, res] = await to(
  556. instApi.geOff({
  557. terminal: this.terminal,
  558. UserId: this.userId || "" + this.isOnlineInfo.userId,
  559. })
  560. );
  561. if (err) return;
  562. if (res.code == 200) {
  563. uni.redirectTo({
  564. url: "/pages/home/index",
  565. });
  566. }
  567. }
  568. },
  569. });
  570. },
  571. // 跳转人脸识别
  572. openFaceCheck() {
  573. uni.redirectTo({
  574. url: "/pages/face/index",
  575. });
  576. },
  577. openInstr() {
  578. uni.redirectTo({
  579. url: "/pages/face/openInstrFace",
  580. });
  581. },
  582. completionImgPath(path) {
  583. let url = path;
  584. if (url.indexOf("http") == -1) {
  585. url = process.uniEnv.VITE_FILE + url;
  586. }
  587. return url;
  588. },
  589. // 跳转设置页
  590. toSettingPage() {
  591. this.clickCount++;
  592. if (this.clickCount === 6) {
  593. uni.redirectTo({
  594. url: "/pages/setting/index",
  595. });
  596. this.clickCount = 0;
  597. clearTimeout(this.clickTimer);
  598. } else {
  599. clearTimeout(this.clickTimer);
  600. this.clickTimer = setTimeout(() => {
  601. this.clickCount = 0;
  602. }, 2000);
  603. }
  604. },
  605. updateTime() {
  606. this.currentTime = new Date();
  607. },
  608. getNowTime() {
  609. var date = new Date();
  610. //年 getFullYear():四位数字返回年份
  611. var year = date.getFullYear(); //getFullYear()代替getYear()
  612. //月 getMonth():0 ~ 11
  613. var month = date.getMonth() + 1;
  614. //日 getDate():(1 ~ 31)
  615. var day = date.getDate();
  616. //时 getHours():(0 ~ 23)
  617. var hour = date.getHours();
  618. //分 getMinutes(): (0 ~ 59)
  619. var minute = date.getMinutes();
  620. //秒 getSeconds():(0 ~ 59)
  621. var second = date.getSeconds();
  622. var myArray = new Array(7);
  623. myArray[0] = "星期日";
  624. myArray[1] = "星期一";
  625. myArray[2] = "星期二";
  626. myArray[3] = "星期三";
  627. myArray[4] = "星期四";
  628. myArray[5] = "星期五";
  629. myArray[6] = "星期六";
  630. var weekday = date.getDay();
  631. var time =
  632. year +
  633. "-" +
  634. this.addZero(month) +
  635. "-" +
  636. this.addZero(day) +
  637. " " +
  638. myArray[weekday] +
  639. " " +
  640. this.addZero(hour) +
  641. ":" +
  642. this.addZero(minute) +
  643. ":" +
  644. this.addZero(second);
  645. this.curTime = time;
  646. },
  647. //小于10的拼接上0字符串
  648. addZero(s) {
  649. return s < 10 ? "0" + s : s;
  650. },
  651. },
  652. };
  653. </script>
  654. <style lang="scss" scoped>
  655. .container-lab {
  656. width: 100vw;
  657. height: 100vh;
  658. display: flex;
  659. flex-direction: column;
  660. }
  661. /* 头部 */
  662. .header {
  663. width: 100%;
  664. height: 12.6vh;
  665. padding: 0 3.9vw 0 3.125vw;
  666. box-sizing: border-box;
  667. display: flex;
  668. justify-content: space-between;
  669. align-items: flex-end;
  670. .header-img {
  671. position: absolute;
  672. left: 0;
  673. top: 0;
  674. width: 100%;
  675. height: 12.6vh;
  676. z-index: -1;
  677. }
  678. }
  679. .hleft {
  680. width: 28.4vw;
  681. height: 100%;
  682. font-size: 1.72vw;
  683. /*background-color: #009688;*/
  684. /*border-radius: 0 1.56vw 1.56vw 0;*/
  685. padding-left: 2vw;
  686. box-sizing: border-box;
  687. display: flex;
  688. align-items: center;
  689. }
  690. .hcenter {
  691. flex: 1;
  692. // width: 43.36vw;
  693. height: 100%;
  694. line-height: 12.6vh;
  695. text-align: center;
  696. font-size: 3.44vw;
  697. color: #ffffff;
  698. }
  699. .hright {
  700. width: 16.4vw;
  701. height: 5vh;
  702. display: flex;
  703. justify-content: flex-end;
  704. align-items: center;
  705. }
  706. .hright img {
  707. width: 3.125vw;
  708. height: auto;
  709. cursor: pointer;
  710. }
  711. /* 中间内容 */
  712. .container {
  713. width: 95%;
  714. flex: 1;
  715. margin: 5vh auto;
  716. display: flex;
  717. }
  718. /* 设备信息 */
  719. .deviceInfo {
  720. width: 31.25vw;
  721. height: 100%;
  722. // height: 77vh;
  723. margin-right: 2vw;
  724. background-color: #fff;
  725. box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
  726. opacity: 1;
  727. border-radius: 0.4vw;
  728. }
  729. .deviceInfoTitle {
  730. width: 100%;
  731. height: 5.5vh;
  732. display: flex;
  733. align-items: center;
  734. padding-left: 0.78vw;
  735. border-bottom: 1px solid #f0f2f5;
  736. box-sizing: border-box;
  737. margin-bottom: 1vh;
  738. .instr-info {
  739. display: flex;
  740. align-items: center;
  741. }
  742. .handle-instr-wrap {
  743. display: flex;
  744. }
  745. .handle-instr {
  746. padding: 5px 16px;
  747. border: 1px solid;
  748. border-radius: 10px;
  749. margin-right: 10px;
  750. color: #fff;
  751. }
  752. .open-btn {
  753. background: #409eff;
  754. }
  755. .close-btn {
  756. background: #f56c6c;
  757. }
  758. }
  759. .info-title {
  760. flex: 1;
  761. padding-right: 10px;
  762. }
  763. .comImg {
  764. width: 2.34vw;
  765. height: auto;
  766. margin-right: 0.7vw;
  767. }
  768. .title {
  769. display: inline-block;
  770. color: #303133;
  771. font-size: 1.4vw;
  772. }
  773. /* 设备信息 */
  774. .deviecDetail {
  775. padding-left: 0;
  776. }
  777. .deviecDetail li {
  778. list-style: none;
  779. width: 100%;
  780. // height: 6.25vh;
  781. line-height: 6.25vh;
  782. padding-left: 30px;
  783. box-sizing: border-box;
  784. display: flex;
  785. }
  786. .devicelab {
  787. display: inline-block;
  788. width: 6.2vw;
  789. color: #606266;
  790. font-size: 1.2vw;
  791. text-align: left;
  792. margin-right: 0.5vw;
  793. }
  794. .tongji {
  795. width: 8.3vw !important;
  796. font-weight: 700;
  797. }
  798. .frequency {
  799. display: flex;
  800. align-items: center;
  801. width: 24.8vw;
  802. height: 100%;
  803. }
  804. .num {
  805. display: inline-block;
  806. width: 20%;
  807. color: #303133;
  808. margin-left: 10px;
  809. font-size: 1.4vw;
  810. }
  811. .line {
  812. width: 80%;
  813. height: 1.5vh;
  814. background-color: #ededed;
  815. border-radius: 0.46vw;
  816. }
  817. .realline {
  818. width: 0%;
  819. height: 1.5vh;
  820. background-color: #1d66dc;
  821. border-radius: 0.46vw;
  822. }
  823. .footer {
  824. margin-top: 6vh;
  825. width: 100%;
  826. height: 0.8vh;
  827. display: flex;
  828. justify-content: center;
  829. align-items: center;
  830. }
  831. .tItem {
  832. width: 14vw;
  833. margin-right: 2vw;
  834. margin-bottom: 1.75vh;
  835. text-align: center;
  836. }
  837. .tItem:nth-child(2n) {
  838. margin-right: 0;
  839. }
  840. .tItemTitle {
  841. color: #606266;
  842. margin-top: 0.45vh;
  843. font-size: 1.2vw;
  844. font-weight: 700;
  845. }
  846. .tItemNum {
  847. font-size: 1.3vw;
  848. color: #3399ff;
  849. font-weight: 700;
  850. }
  851. /* 右侧 */
  852. .deviceRight {
  853. width: 60vw;
  854. flex: 1;
  855. }
  856. .deviceTop {
  857. width: 100%;
  858. display: flex;
  859. margin-bottom: 3vh;
  860. }
  861. /* 实验员信息 */
  862. .deviceInfoTop {
  863. width: 100%;
  864. height: 12.5vh;
  865. padding-left: 2.8vw;
  866. box-sizing: border-box;
  867. display: flex;
  868. margin-bottom: 1.875vh;
  869. }
  870. .imgBox {
  871. width: 7.8vw;
  872. height: 13vh;
  873. border-radius: 50%;
  874. margin-right: 1.4vw;
  875. }
  876. .imgBox img {
  877. width: 7.8vw;
  878. height: 100%;
  879. border-radius: 50%;
  880. }
  881. /* 实验人员 */
  882. .laboratoryBox {
  883. width: 31.25vw;
  884. height: 37.5vh;
  885. display: flex;
  886. flex-direction: column;
  887. .nologin {
  888. flex: 1;
  889. }
  890. }
  891. .nologinImgBox {
  892. display: flex;
  893. align-items: center;
  894. justify-content: center;
  895. height: 100%;
  896. }
  897. .laboratory {
  898. width: 100%;
  899. display: flex;
  900. justify-content: center;
  901. flex-wrap: wrap;
  902. }
  903. .nextLaboratory {
  904. width: 100%;
  905. display: flex;
  906. justify-content: center;
  907. }
  908. .laboratoryDetail li {
  909. list-style: none;
  910. width: 100%;
  911. height: 4.375vh;
  912. line-height: 4.375vh;
  913. display: flex;
  914. }
  915. .pd10 {
  916. padding-left: 10px;
  917. }
  918. /* */
  919. .laboratoryLab {
  920. display: inline-block;
  921. width: 3.9vw;
  922. color: #606266;
  923. font-size: 1.2vw;
  924. text-align: right;
  925. margin-right: 0.7vw;
  926. }
  927. /* 下一次预约 */
  928. .nextOrder {
  929. width: 28.5vw;
  930. height: 37.5vh;
  931. margin-right: 0;
  932. display: flex;
  933. flex-direction: column;
  934. }
  935. .next-order-wrap {
  936. flex: 1;
  937. overflow: auto;
  938. padding: 0 0 20px 0;
  939. }
  940. /* 照片 */
  941. .nextTop {
  942. width: 100%;
  943. display: flex;
  944. flex-direction: column;
  945. justify-content: space-around;
  946. align-items: center;
  947. }
  948. .nextImgBox {
  949. width: 7.8vw;
  950. height: 13vh;
  951. border-radius: 50%;
  952. margin-right: 1.4vw;
  953. }
  954. .nextNoLoginImgBox {
  955. margin-top: 20px;
  956. }
  957. .nextImgBox img {
  958. width: 7.8vw;
  959. height: 100%;
  960. border-radius: 50%;
  961. }
  962. .nextBox {
  963. width: 4.69vw;
  964. height: 7.5vh;
  965. border-radius: 50%;
  966. background-color: #3399ff;
  967. color: #fff;
  968. display: flex;
  969. justify-content: center;
  970. align-items: center;
  971. }
  972. /* 设备数据 */
  973. .deviceData {
  974. width: 100%;
  975. height: 36.5vh;
  976. background-color: #fff;
  977. box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
  978. opacity: 1;
  979. border-radius: 0.4vw;
  980. }
  981. .deviceList {
  982. width: 100%;
  983. height: 29vh;
  984. overflow-y: auto;
  985. padding: 0 2.18vw 1.88vh 2.18vw;
  986. box-sizing: border-box;
  987. }
  988. .deviceList li {
  989. list-style: none;
  990. width: 100%;
  991. height: 4.75vh;
  992. line-height: 4.75vh;
  993. font-size: 1.1vw;
  994. color: #606266;
  995. overflow: hidden;
  996. text-overflow: ellipsis;
  997. white-space: nowrap;
  998. border-bottom: 1px dashed #f0f2f5;
  999. display: flex;
  1000. }
  1001. .deviceList li view:first-child {
  1002. margin-right: 10px;
  1003. }
  1004. .notice-wrap {
  1005. width: 50vw;
  1006. height: 60vh;
  1007. .notice-header {
  1008. padding: 20px 20px 0;
  1009. font-size: 20px;
  1010. font-weight: bold;
  1011. }
  1012. .notice-content {
  1013. padding: 20px;
  1014. }
  1015. }
  1016. .screen-save-box {
  1017. position: fixed;
  1018. left: 0;
  1019. top: 0;
  1020. width: 100%;
  1021. height: 100%;
  1022. }
  1023. .notice-home-content {
  1024. flex: 1;
  1025. overflow: hidden;
  1026. }
  1027. .notice-home-p {
  1028. // 省略号
  1029. overflow: hidden;
  1030. white-space: nowrap;
  1031. text-overflow: ellipsis;
  1032. }
  1033. .notice-home-createdName {
  1034. font-size: 14px;
  1035. width: 200px;
  1036. text-align: right;
  1037. }
  1038. .notice-home-date {
  1039. font-size: 14px;
  1040. width: 80px;
  1041. text-align: right;
  1042. }
  1043. .notice-home-p:hover {
  1044. color: #3399ff;
  1045. }
  1046. </style>