index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  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="headerImg" 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. headerImg: "static/images/header.png", // 头部背景图片
  351. };
  352. },
  353. computed: {
  354. formattedTime() {
  355. if (!this.isOnlineInfo) {
  356. return "-";
  357. }
  358. const diff =
  359. this.currentTime - new Date(this.isOnlineInfo.usedRecord.startTime);
  360. const hours = String(Math.floor(diff / (1000 * 60 * 60))).padStart(
  361. 2,
  362. "0"
  363. );
  364. const minutes = String(
  365. Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))
  366. ).padStart(2, "0");
  367. const seconds = String(
  368. Math.floor((diff % (1000 * 60)) / 1000)
  369. ).padStart(2, "0");
  370. return `${hours}:${minutes}:${seconds}`;
  371. },
  372. },
  373. onLoad(option) {
  374. this.userId = option.id;
  375. },
  376. async onShow() {
  377. this.startIdleTimer();
  378. if (!uni.getStorageSync("labsop_no")) {
  379. uni.redirectTo({
  380. url: "/pages/setting/index",
  381. });
  382. } else {
  383. // 获取仪器信息
  384. this.getInstrInfo();
  385. this.getAppointList();
  386. this.getNotice();
  387. await this.getGetOnInfo();
  388. // 获取日期
  389. this.timer = setInterval(() => {
  390. this.getNowTime();
  391. }, 1000);
  392. // 仪器信息
  393. this.infoTimer = setInterval(() => {
  394. this.getInstrInfo();
  395. this.getAppointList();
  396. this.getNotice();
  397. }, 60000);
  398. // 上机信息
  399. if (this.userId && !this.isOnlineInfo) {
  400. this.getOn();
  401. }
  402. this.handleSwitchInstr();
  403. }
  404. },
  405. onHide() {
  406. //离开页面前清除计时器
  407. clearInterval(this.timer);
  408. clearInterval(this.clickTimer);
  409. clearInterval(this.infoTimer);
  410. clearInterval(this.curTimetimer);
  411. this.resetTimer();
  412. this.timer = null;
  413. this.clickTimer = null;
  414. this.infoTimer = null;
  415. this.curTimetimer = null;
  416. },
  417. mounted() {},
  418. beforeDestroy() {
  419. //离开页面前清除计时器
  420. clearInterval(this.timer);
  421. clearInterval(this.clickTimer);
  422. clearInterval(this.infoTimer);
  423. clearInterval(this.curTimetimer);
  424. this.resetTimer();
  425. this.timer = null;
  426. this.clickTimer = null;
  427. this.infoTimer = null;
  428. this.curTimetimer = null;
  429. },
  430. methods: {
  431. //屏保计时
  432. startIdleTimer() {
  433. this.screenSaveTimer = setTimeout(() => {
  434. this.toScreenSaver();
  435. }, this.idleTime);
  436. },
  437. // 点击操作重置屏保计时
  438. resetTimer() {
  439. clearTimeout(this.screenSaveTimer);
  440. this.screenSaveFlag = false;
  441. this.startIdleTimer(); // 重置计时器
  442. },
  443. // 进入屏保
  444. toScreenSaver() {
  445. this.screenSaveFlag = true;
  446. },
  447. // 打开公告详情
  448. async openContent(row) {
  449. this.noticeShow = true;
  450. this.noticeInfo = row;
  451. },
  452. // 获取仪器信息
  453. async getInstrInfo() {
  454. this.terminal = uni.getStorageSync("labsop_no");
  455. let [err, res] = await to(
  456. instApi.getInstrInfo({ terminal: this.terminal })
  457. );
  458. if (err) return;
  459. this.instrInfo = res.data;
  460. },
  461. // 获取预约信息
  462. async getAppointList() {
  463. this.terminal = uni.getStorageSync("labsop_no");
  464. let [err, res] = await to(
  465. instApi.getAppointInfo({ terminal: this.terminal })
  466. );
  467. if (err) return;
  468. this.appointList = res.data;
  469. },
  470. // 获取公告信息
  471. async getNotice() {
  472. this.terminal = uni.getStorageSync("labsop_no");
  473. let [err, res] = await to(
  474. instApi.getNoticeInfo({ terminal: this.terminal })
  475. );
  476. if (err) return;
  477. this.noticeList = res.data;
  478. },
  479. // 上机
  480. async getOn() {
  481. const handleAppoint = uni.getStorageSync("handleAppoint");
  482. console.log("handleAppoint----------", handleAppoint);
  483. if (handleAppoint !== "appointLine") return;
  484. let [err, res] = await to(
  485. instApi.getOn({ terminal: this.terminal, UserId: this.userId })
  486. );
  487. uni.removeStorageSync("handleAppoint");
  488. if (err) return;
  489. this.getGetOnInfo();
  490. this.getAppointList();
  491. uni.showToast({
  492. title: "上机成功",
  493. icon: "success",
  494. duration: 1000,
  495. });
  496. },
  497. // 打开设备
  498. async handleSwitchInstr() {
  499. const handleType = uni.getStorageSync("handleType");
  500. console.log("handleType----------", handleType);
  501. if (handleType !== "openInstr") return;
  502. let [err, res] = await to(
  503. instApi.switch({
  504. switch: true,
  505. terminal: this.terminal,
  506. userId: Number(this.userId),
  507. })
  508. );
  509. uni.removeStorageSync("handleType");
  510. if (err) return;
  511. uni.showToast({
  512. title: "设备打开成功",
  513. icon: "success",
  514. duration: 1000,
  515. });
  516. },
  517. // 关闭设备
  518. async closeInstr() {
  519. uni.showModal({
  520. title: "提示",
  521. content: "确认关闭当前仪器?",
  522. success: async (modalRes) => {
  523. if (modalRes.confirm) {
  524. let [err, res] = await to(
  525. instApi.switch({
  526. switch: false,
  527. terminal: this.terminal,
  528. })
  529. );
  530. if (err) return;
  531. uni.showToast({
  532. title: "设备关闭成功",
  533. icon: "success",
  534. duration: 1000,
  535. });
  536. }
  537. },
  538. });
  539. },
  540. // 获取正在上机信息
  541. async getGetOnInfo() {
  542. let [err, res] = await to(
  543. instApi.getOnInfo({ terminal: this.terminal })
  544. );
  545. if (err) return;
  546. this.isOnlineInfo = res.data;
  547. this.curTimetimer = setInterval(this.updateTime, 1000);
  548. },
  549. // 下机
  550. handleGetOff() {
  551. uni.showModal({
  552. title: "提示",
  553. content: "退出设备将会断电、终止实验,您确定要注销登录吗?",
  554. success: async (res) => {
  555. if (res.confirm) {
  556. let [err, res] = await to(
  557. instApi.geOff({
  558. terminal: this.terminal,
  559. UserId: this.userId || "" + this.isOnlineInfo.userId,
  560. })
  561. );
  562. if (err) return;
  563. if (res.code == 200) {
  564. uni.redirectTo({
  565. url: "/pages/home/index",
  566. });
  567. }
  568. }
  569. },
  570. });
  571. },
  572. // 跳转人脸识别
  573. openFaceCheck() {
  574. uni.redirectTo({
  575. url: "/pages/face/index",
  576. });
  577. },
  578. openInstr() {
  579. uni.redirectTo({
  580. url: "/pages/face/openInstrFace",
  581. });
  582. },
  583. completionImgPath(path) {
  584. let url = path;
  585. if (url.indexOf("http") == -1) {
  586. url = process.uniEnv.VITE_FILE + url;
  587. }
  588. return url;
  589. },
  590. // 跳转设置页
  591. toSettingPage() {
  592. this.clickCount++;
  593. if (this.clickCount === 6) {
  594. uni.redirectTo({
  595. url: "/pages/setting/index",
  596. });
  597. this.clickCount = 0;
  598. clearTimeout(this.clickTimer);
  599. } else {
  600. clearTimeout(this.clickTimer);
  601. this.clickTimer = setTimeout(() => {
  602. this.clickCount = 0;
  603. }, 2000);
  604. }
  605. },
  606. updateTime() {
  607. this.currentTime = new Date();
  608. },
  609. getNowTime() {
  610. var date = new Date();
  611. //年 getFullYear():四位数字返回年份
  612. var year = date.getFullYear(); //getFullYear()代替getYear()
  613. //月 getMonth():0 ~ 11
  614. var month = date.getMonth() + 1;
  615. //日 getDate():(1 ~ 31)
  616. var day = date.getDate();
  617. //时 getHours():(0 ~ 23)
  618. var hour = date.getHours();
  619. //分 getMinutes(): (0 ~ 59)
  620. var minute = date.getMinutes();
  621. //秒 getSeconds():(0 ~ 59)
  622. var second = date.getSeconds();
  623. var myArray = new Array(7);
  624. myArray[0] = "星期日";
  625. myArray[1] = "星期一";
  626. myArray[2] = "星期二";
  627. myArray[3] = "星期三";
  628. myArray[4] = "星期四";
  629. myArray[5] = "星期五";
  630. myArray[6] = "星期六";
  631. var weekday = date.getDay();
  632. var time =
  633. year +
  634. "-" +
  635. this.addZero(month) +
  636. "-" +
  637. this.addZero(day) +
  638. " " +
  639. myArray[weekday] +
  640. " " +
  641. this.addZero(hour) +
  642. ":" +
  643. this.addZero(minute) +
  644. ":" +
  645. this.addZero(second);
  646. this.curTime = time;
  647. },
  648. //小于10的拼接上0字符串
  649. addZero(s) {
  650. return s < 10 ? "0" + s : s;
  651. },
  652. },
  653. };
  654. </script>
  655. <style lang="scss" scoped>
  656. .container-lab {
  657. width: 100vw;
  658. height: 100vh;
  659. display: flex;
  660. flex-direction: column;
  661. }
  662. /* 头部 */
  663. .header {
  664. width: 100%;
  665. height: 12.6vh;
  666. padding: 0 3.9vw 0 3.125vw;
  667. box-sizing: border-box;
  668. display: flex;
  669. justify-content: space-between;
  670. align-items: flex-end;
  671. .header-img {
  672. position: absolute;
  673. left: 0;
  674. top: 0;
  675. width: 100%;
  676. height: 12.6vh;
  677. z-index: -1;
  678. }
  679. }
  680. .hleft {
  681. width: 28.4vw;
  682. height: 100%;
  683. font-size: 1.72vw;
  684. /*background-color: #009688;*/
  685. /*border-radius: 0 1.56vw 1.56vw 0;*/
  686. padding-left: 2vw;
  687. box-sizing: border-box;
  688. display: flex;
  689. align-items: center;
  690. }
  691. .hcenter {
  692. flex: 1;
  693. // width: 43.36vw;
  694. height: 100%;
  695. line-height: 12.6vh;
  696. text-align: center;
  697. font-size: 3.44vw;
  698. color: #ffffff;
  699. }
  700. .hright {
  701. width: 16.4vw;
  702. height: 5vh;
  703. display: flex;
  704. justify-content: flex-end;
  705. align-items: center;
  706. }
  707. .hright img {
  708. width: 3.125vw;
  709. height: auto;
  710. cursor: pointer;
  711. }
  712. /* 中间内容 */
  713. .container {
  714. width: 95%;
  715. flex: 1;
  716. margin: 5vh auto;
  717. display: flex;
  718. }
  719. /* 设备信息 */
  720. .deviceInfo {
  721. width: 31.25vw;
  722. height: 100%;
  723. // height: 77vh;
  724. margin-right: 2vw;
  725. background-color: #fff;
  726. box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
  727. opacity: 1;
  728. border-radius: 0.4vw;
  729. }
  730. .deviceInfoTitle {
  731. width: 100%;
  732. height: 5.5vh;
  733. display: flex;
  734. align-items: center;
  735. padding-left: 0.78vw;
  736. border-bottom: 1px solid #f0f2f5;
  737. box-sizing: border-box;
  738. margin-bottom: 1vh;
  739. .instr-info {
  740. display: flex;
  741. align-items: center;
  742. }
  743. .handle-instr-wrap {
  744. display: flex;
  745. }
  746. .handle-instr {
  747. padding: 5px 16px;
  748. border: 1px solid;
  749. border-radius: 10px;
  750. margin-right: 10px;
  751. color: #fff;
  752. }
  753. .open-btn {
  754. background: #409eff;
  755. }
  756. .close-btn {
  757. background: #f56c6c;
  758. }
  759. }
  760. .info-title {
  761. flex: 1;
  762. padding-right: 10px;
  763. }
  764. .comImg {
  765. width: 2.34vw;
  766. height: auto;
  767. margin-right: 0.7vw;
  768. }
  769. .title {
  770. display: inline-block;
  771. color: #303133;
  772. font-size: 1.4vw;
  773. }
  774. /* 设备信息 */
  775. .deviecDetail {
  776. padding-left: 0;
  777. }
  778. .deviecDetail li {
  779. list-style: none;
  780. width: 100%;
  781. // height: 6.25vh;
  782. line-height: 6.25vh;
  783. padding-left: 30px;
  784. box-sizing: border-box;
  785. display: flex;
  786. }
  787. .devicelab {
  788. display: inline-block;
  789. width: 6.2vw;
  790. color: #606266;
  791. font-size: 1.2vw;
  792. text-align: left;
  793. margin-right: 0.5vw;
  794. }
  795. .tongji {
  796. width: 8.3vw !important;
  797. font-weight: 700;
  798. }
  799. .frequency {
  800. display: flex;
  801. align-items: center;
  802. width: 24.8vw;
  803. height: 100%;
  804. }
  805. .num {
  806. display: inline-block;
  807. width: 20%;
  808. color: #303133;
  809. margin-left: 10px;
  810. font-size: 1.4vw;
  811. }
  812. .line {
  813. width: 80%;
  814. height: 1.5vh;
  815. background-color: #ededed;
  816. border-radius: 0.46vw;
  817. }
  818. .realline {
  819. width: 0%;
  820. height: 1.5vh;
  821. background-color: #1d66dc;
  822. border-radius: 0.46vw;
  823. }
  824. .footer {
  825. margin-top: 6vh;
  826. width: 100%;
  827. height: 0.8vh;
  828. display: flex;
  829. justify-content: center;
  830. align-items: center;
  831. }
  832. .tItem {
  833. width: 14vw;
  834. margin-right: 2vw;
  835. margin-bottom: 1.75vh;
  836. text-align: center;
  837. }
  838. .tItem:nth-child(2n) {
  839. margin-right: 0;
  840. }
  841. .tItemTitle {
  842. color: #606266;
  843. margin-top: 0.45vh;
  844. font-size: 1.2vw;
  845. font-weight: 700;
  846. }
  847. .tItemNum {
  848. font-size: 1.3vw;
  849. color: #3399ff;
  850. font-weight: 700;
  851. }
  852. /* 右侧 */
  853. .deviceRight {
  854. width: 60vw;
  855. flex: 1;
  856. }
  857. .deviceTop {
  858. width: 100%;
  859. display: flex;
  860. margin-bottom: 3vh;
  861. }
  862. /* 实验员信息 */
  863. .deviceInfoTop {
  864. width: 100%;
  865. height: 12.5vh;
  866. padding-left: 2.8vw;
  867. box-sizing: border-box;
  868. display: flex;
  869. margin-bottom: 1.875vh;
  870. }
  871. .imgBox {
  872. width: 7.8vw;
  873. height: 13vh;
  874. border-radius: 50%;
  875. margin-right: 1.4vw;
  876. }
  877. .imgBox img {
  878. width: 7.8vw;
  879. height: 100%;
  880. border-radius: 50%;
  881. }
  882. /* 实验人员 */
  883. .laboratoryBox {
  884. width: 31.25vw;
  885. height: 37.5vh;
  886. display: flex;
  887. flex-direction: column;
  888. .nologin {
  889. flex: 1;
  890. }
  891. }
  892. .nologinImgBox {
  893. display: flex;
  894. align-items: center;
  895. justify-content: center;
  896. height: 100%;
  897. }
  898. .laboratory {
  899. width: 100%;
  900. display: flex;
  901. justify-content: center;
  902. flex-wrap: wrap;
  903. }
  904. .nextLaboratory {
  905. width: 100%;
  906. display: flex;
  907. justify-content: center;
  908. }
  909. .laboratoryDetail li {
  910. list-style: none;
  911. width: 100%;
  912. height: 4.375vh;
  913. line-height: 4.375vh;
  914. display: flex;
  915. }
  916. .pd10 {
  917. padding-left: 10px;
  918. }
  919. /* */
  920. .laboratoryLab {
  921. display: inline-block;
  922. width: 3.9vw;
  923. color: #606266;
  924. font-size: 1.2vw;
  925. text-align: right;
  926. margin-right: 0.7vw;
  927. }
  928. /* 下一次预约 */
  929. .nextOrder {
  930. width: 28.5vw;
  931. height: 37.5vh;
  932. margin-right: 0;
  933. display: flex;
  934. flex-direction: column;
  935. }
  936. .next-order-wrap {
  937. flex: 1;
  938. overflow: auto;
  939. padding: 0 0 20px 0;
  940. }
  941. /* 照片 */
  942. .nextTop {
  943. width: 100%;
  944. display: flex;
  945. flex-direction: column;
  946. justify-content: space-around;
  947. align-items: center;
  948. }
  949. .nextImgBox {
  950. width: 7.8vw;
  951. height: 13vh;
  952. border-radius: 50%;
  953. margin-right: 1.4vw;
  954. }
  955. .nextNoLoginImgBox {
  956. margin-top: 20px;
  957. }
  958. .nextImgBox img {
  959. width: 7.8vw;
  960. height: 100%;
  961. border-radius: 50%;
  962. }
  963. .nextBox {
  964. width: 4.69vw;
  965. height: 7.5vh;
  966. border-radius: 50%;
  967. background-color: #3399ff;
  968. color: #fff;
  969. display: flex;
  970. justify-content: center;
  971. align-items: center;
  972. }
  973. /* 设备数据 */
  974. .deviceData {
  975. width: 100%;
  976. height: 36.5vh;
  977. background-color: #fff;
  978. box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12);
  979. opacity: 1;
  980. border-radius: 0.4vw;
  981. }
  982. .deviceList {
  983. width: 100%;
  984. height: 29vh;
  985. overflow-y: auto;
  986. padding: 0 2.18vw 1.88vh 2.18vw;
  987. box-sizing: border-box;
  988. }
  989. .deviceList li {
  990. list-style: none;
  991. width: 100%;
  992. height: 4.75vh;
  993. line-height: 4.75vh;
  994. font-size: 1.1vw;
  995. color: #606266;
  996. overflow: hidden;
  997. text-overflow: ellipsis;
  998. white-space: nowrap;
  999. border-bottom: 1px dashed #f0f2f5;
  1000. display: flex;
  1001. }
  1002. .deviceList li view:first-child {
  1003. margin-right: 10px;
  1004. }
  1005. .notice-wrap {
  1006. width: 50vw;
  1007. height: 60vh;
  1008. .notice-header {
  1009. padding: 20px 20px 0;
  1010. font-size: 20px;
  1011. font-weight: bold;
  1012. }
  1013. .notice-content {
  1014. padding: 20px;
  1015. }
  1016. }
  1017. .screen-save-box {
  1018. position: fixed;
  1019. left: 0;
  1020. top: 0;
  1021. width: 100%;
  1022. height: 100%;
  1023. }
  1024. .notice-home-content {
  1025. flex: 1;
  1026. overflow: hidden;
  1027. }
  1028. .notice-home-p {
  1029. // 省略号
  1030. overflow: hidden;
  1031. white-space: nowrap;
  1032. text-overflow: ellipsis;
  1033. }
  1034. .notice-home-createdName {
  1035. font-size: 14px;
  1036. width: 200px;
  1037. text-align: right;
  1038. }
  1039. .notice-home-date {
  1040. font-size: 14px;
  1041. width: 80px;
  1042. text-align: right;
  1043. }
  1044. .notice-home-p:hover {
  1045. color: #3399ff;
  1046. }
  1047. </style>