index.vue 27 KB

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