ManageEquipment.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  1. <template>
  2. <div class="main_right_height">
  3. <TopDes :flag="false" topDesFont="设备管理"></TopDes>
  4. <div>
  5. <el-row style="margin-top: 15px">
  6. <el-col :span="1">&nbsp;</el-col>
  7. <el-col :span="10" style="text-align: left">
  8. <el-button size="small" class="xl_down_button" @click="addEquipment()">
  9. 新增设备</el-button
  10. >
  11. <el-button size="small" class="xl_down_button" @click="updateJizhan()">
  12. 修改蓝牙基站MAC</el-button
  13. >
  14. </el-col>
  15. <el-col :span="11" style="text-align: left"> </el-col>
  16. <el-col :span="1">&nbsp;</el-col>
  17. </el-row>
  18. </div>
  19. <div style="margin-top: 16px">
  20. <el-row>
  21. <el-col :span="1"> &nbsp;</el-col>
  22. <el-col :span="10">
  23. <el-table
  24. :data="tableData"
  25. style="width: 100%"
  26. @selection-change="handleSelectionChange"
  27. :header-cell-style="{
  28. background: '#66B497',
  29. color: '#FFFFFF',
  30. 'letter-spacing': '4px',
  31. }"
  32. :row-class-name="tableRowClassName"
  33. >
  34. <!-- <el-table-column type="selection" align="center" width="55">
  35. </el-table-column> -->
  36. <el-table-column prop="ID" align="center" label="id"> </el-table-column>
  37. <el-table-column prop="Type" :formatter="typeFor" align="center" label="类型">
  38. </el-table-column>
  39. <el-table-column prop="AliasName" align="center" label="名称">
  40. </el-table-column>
  41. <el-table-column prop="Mac" align="center" label="MAC"> </el-table-column>
  42. <el-table-column label="操作" align="center" width="100px">
  43. <template slot-scope="scope">
  44. <!-- <el-button
  45. class="xl_d_button"
  46. size="mini"
  47. @click="singleDownload(scope.$index, scope.row)"
  48. >扫描设备</el-button
  49. > -->
  50. <el-popconfirm
  51. confirmButtonText="确定"
  52. cancelButtonText="取消"
  53. @confirm="removeFun(scope.$index, scope.row)"
  54. icon="el-icon-info"
  55. iconColor="red"
  56. title="确定要删除该设备吗?"
  57. >
  58. <el-button class="xl_d_button" size="mini" slot="reference"
  59. >删除</el-button
  60. >
  61. </el-popconfirm>
  62. <!-- <el-button
  63. class="xl_d_button"
  64. size="mini"
  65. @click="removeFun(scope.$index, scope.row)"
  66. >移除</el-button
  67. > -->
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. </el-col>
  72. <el-col :span="2">&nbsp;</el-col>
  73. <el-col :span="10">
  74. <el-table
  75. :data="mergeData"
  76. style="width: 100%"
  77. @selection-change="handleSelectionChange"
  78. :header-cell-style="{
  79. background: '#66B497',
  80. color: '#FFFFFF',
  81. 'letter-spacing': '4px',
  82. }"
  83. :row-class-name="tableRowClassName"
  84. >
  85. <el-table-column
  86. prop="rssi"
  87. align="center"
  88. label="信号强度"
  89. :formatter="rssiFor"
  90. >
  91. </el-table-column>
  92. <el-table-column prop="aliasName" align="center" label="名称">
  93. </el-table-column>
  94. <el-table-column
  95. prop="deviceType"
  96. align="center"
  97. label="类型"
  98. :formatter="typeFormatter"
  99. >
  100. </el-table-column>
  101. <el-table-column prop="mac" align="center" label="MAC"> </el-table-column>
  102. <el-table-column label="操作" align="center" width="140px">
  103. <template slot-scope="scope" style='width:120px'>
  104. <div style='display:flex;flex-direction:column;justify-items: center;align-items:center'>
  105. <el-button
  106. :disabled="buttonLinkFlag"
  107. class="xl_d_button"
  108. style='width:auto'
  109. size="mini"
  110. slot="reference"
  111. @click="linkJudge(scope.$index, scope.row, scope.row.connect)"
  112. >
  113. <span v-if="scope.row.connect">断开连接</span
  114. ><span v-if="!scope.row.connect">连接</span>
  115. <!-- <span >断开连接</span
  116. > -->
  117. </el-button>
  118. <!-- v-show="scope.row.addFlag" -->
  119. <el-button
  120. style="margin-top: 10px;width:100px;margin-right:2px"
  121. v-show="scope.row.addFlag"
  122. :disabled="buttonLinkFlag"
  123. class="xl_d_button"
  124. size="mini"
  125. slot="reference"
  126. @click="addFast(scope.row)"
  127. >
  128. <span>添加至列表</span>
  129. </el-button>
  130. </div>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. </el-col>
  135. <el-col :span="1"> &nbsp;</el-col>
  136. </el-row>
  137. </div>
  138. <!-- <p align="center" style="margin-bottom: 40px">
  139. <el-pagination
  140. @size-change="handleSizeChange"
  141. @current-change="handleCurrentChange"
  142. :current-page="pageNum"
  143. :page-size="pageSize"
  144. :page-sizes="[10, , 50, 100, 200, 300, 400]"
  145. layout="total, sizes, prev, pager, next, jumper"
  146. :total="totolSize"
  147. >
  148. </el-pagination>
  149. </p> -->
  150. <el-dialog :visible.sync="centerDialogVisible" width="545px" center class="dig_equi">
  151. <div slot="title" class="title_di" style="width: 545px">
  152. <img width="545px" src="../assets/manage/bg_di.png" />
  153. <img
  154. class="equipment_bg"
  155. width="85px"
  156. height="85px"
  157. src="../assets/manage/bg_title.png"
  158. />
  159. </div>
  160. <span class="min_equi">
  161. <div class="equipment_class">
  162. <div style="margin-left: 40px; width: 120px">选择设备:&nbsp;&nbsp;</div>
  163. <el-select
  164. v-model="type"
  165. style="width: 100%; margin-right: 40px"
  166. placeholder="请选择设备"
  167. >
  168. <el-option
  169. v-for="item in options"
  170. :key="item.value"
  171. :label="item.label"
  172. :value="item.value"
  173. >
  174. </el-option>
  175. </el-select>
  176. </div>
  177. <div class="equipment_class">
  178. <div style="margin-left: 40px; width: 150px">设备MAC:&nbsp;&nbsp;</div>
  179. <el-input
  180. style="width: 100%; margin-right: 40px"
  181. v-model="mac"
  182. placeholder="例如DC:0D:30:03:39:05"
  183. ></el-input>
  184. </div>
  185. </span>
  186. <span slot="footer" class="dialog-footer">
  187. <button class="cancle_add" @click="centerDialogVisible = false">取消</button>
  188. <button class="com_add" @click="addFun()">确定</button>
  189. </span>
  190. </el-dialog>
  191. <el-dialog :visible.sync="centerDialogVisible" width="545px" center class="dig_equi">
  192. <div slot="title" class="title_di" style="width: 545px">
  193. <img width="545px" src="../assets/manage/bg_di.png" />
  194. <div class="equipment_title">新增设备</div>
  195. <img
  196. class="equipment_bg"
  197. width="85px"
  198. height="85px"
  199. src="../assets/manage/bg_title.png"
  200. />
  201. </div>
  202. <span class="min_equi">
  203. <div class="equipment_class">
  204. <div style="margin-left: 40px; width: 120px">选择设备:&nbsp;&nbsp;</div>
  205. <el-select
  206. v-model="type"
  207. style="width: 100%; margin-right: 40px"
  208. placeholder="请选择设备"
  209. >
  210. <el-option
  211. v-for="item in options"
  212. :key="item.value"
  213. :label="item.label"
  214. :value="item.value"
  215. >
  216. </el-option>
  217. </el-select>
  218. </div>
  219. <div class="equipment_class">
  220. <div style="margin-left: 40px; width: 125px">设备MAC:&nbsp;&nbsp;</div>
  221. <el-input
  222. style="width: 100%; margin-right: 40px"
  223. v-model="mac"
  224. placeholder="例如DC:0D:30:03:39:05"
  225. ></el-input>
  226. </div>
  227. <div class="equipment_class">
  228. <div style="margin-left: 40px; width: 120px">设备名称:&nbsp;&nbsp;</div>
  229. <el-input
  230. style="width: 100%; margin-right: 40px"
  231. v-model="aliasName"
  232. placeholder=""
  233. ></el-input>
  234. </div>
  235. </span>
  236. <span slot="footer" class="dialog-footer">
  237. <button class="cancle_add" @click="centerDialogVisible = false">取消</button>
  238. <button class="com_add" @click="addFun()">确定</button>
  239. </span>
  240. </el-dialog>
  241. <el-dialog :visible.sync="visibleFast" width="545px" center class="dig_equi">
  242. <div slot="title" class="title_di" style="width: 545px">
  243. <img width="545px" src="../assets/manage/bg_di.png" />
  244. <div class="equipment_title">设置设备名称</div>
  245. <img
  246. class="equipment_bg"
  247. width="85px"
  248. height="85px"
  249. src="../assets/manage/bg_title.png"
  250. />
  251. </div>
  252. <span class="min_equi">
  253. <div class="equipment_class">
  254. <div style="margin-left: 40px; width: 120px">设备名称:&nbsp;&nbsp;</div>
  255. <el-input
  256. style="width: 100%; margin-right: 40px"
  257. v-model="aliasNameFast"
  258. placeholder=""
  259. ></el-input>
  260. </div>
  261. </span>
  262. <span slot="footer" class="dialog-footer">
  263. <button class="cancle_add" @click="visibleFast = false">取消</button>
  264. <button class="com_add" @click="addFastFun()">确定</button>
  265. </span>
  266. </el-dialog>
  267. <!-- 修改mac -->
  268. <el-dialog :visible.sync="baseStationFlag" width="545px" center class="dig_equi">
  269. <div slot="title" class="title_di" style="width: 545px">
  270. <img width="545px" src="../assets/manage/bg_di.png" />
  271. <div class="equipment_title">填写蓝牙基站</div>
  272. <img
  273. class="equipment_bg"
  274. width="85px"
  275. height="85px"
  276. src="../assets/manage/bg_title.png"
  277. />
  278. </div>
  279. <p class="eweima">
  280. 提示:蓝牙基站MAC填写,可以选择蓝牙基站上附带的二维码图片,也可以手动书写
  281. </p>
  282. <button class="sweep">
  283. <input
  284. type="file"
  285. ref="fileId"
  286. class="fileIdClass"
  287. @change="upload($event)"
  288. />从本地选择二维码
  289. </button>
  290. <span class="min_equi">
  291. <div class="equipment_class">
  292. <div style="margin-left: 40px; width: 220px">填写蓝牙基站MAC:&nbsp;&nbsp;</div>
  293. <el-input v-model="baseStationDes"></el-input>
  294. <!-- <el-select
  295. clearable
  296. v-model="baseStationDes"
  297. style="width: 100%; margin-right: 40px"
  298. placeholder="请选择蓝牙基站mac"
  299. filterable
  300. allow-create
  301. default-first-option
  302. >
  303. <el-option
  304. v-for="item in baseStationOptions"
  305. :key="item.mac"
  306. :label="item.mac"
  307. :value="item.mac"
  308. >
  309. </el-option>
  310. </el-select> -->
  311. </div>
  312. </span>
  313. <span slot="footer" class="dialog-footer">
  314. <button class="cancle_add" @click="baseStationFlag = false">取消</button>
  315. <button class="com_add" @click="saveBaseSation">确定</button>
  316. </span>
  317. </el-dialog>
  318. <!-- 关闭弹框 -->
  319. <el-dialog :visible.sync="comFlag" width="545px" center class="dig_equi">
  320. <div slot="title" class="title_di" style="width: 545px">
  321. <img width="545px" src="../assets/manage/bg_di.png" />
  322. <div class="equipment_title">提示</div>
  323. <img
  324. class="equipment_bg"
  325. width="85px"
  326. height="85px"
  327. src="../assets/manage/bg_title.png"
  328. />
  329. </div>
  330. <span class="min_equi">
  331. <div class="equipment_class">
  332. <div style="margin-left: 40px; width: 240px">
  333. 提示:关闭软件后生效,确认关闭吗?
  334. </div>
  335. </div>
  336. </span>
  337. <span slot="footer" class="dialog-footer">
  338. <button class="cancle_add" @click="comFlag = false">取消</button>
  339. <button class="com_add" @click="visiblePopFun">确定</button>
  340. </span>
  341. </el-dialog>
  342. </div>
  343. </template>
  344. <script>
  345. import axios from "axios";
  346. import jsFileDownload from "js-file-download";
  347. import jsQR from "jsqr";
  348. import Jimp from "jimp";
  349. let ipcRenderer = require("electron").ipcRenderer;
  350. export default {
  351. data() {
  352. return {
  353. lanMac: "",
  354. comFlag: false,
  355. visiblePop: false,
  356. centerDialogVisible: false,
  357. //蓝牙基站所选参数
  358. baseStationDes: "",
  359. baseStationOptions: [],
  360. options: [
  361. {
  362. value: "0",
  363. label: "脑电",
  364. },
  365. {
  366. value: "1",
  367. label: "心电",
  368. },
  369. ],
  370. //手动添加
  371. mac: "",
  372. aliasName: "",
  373. type: "1",
  374. //快速添加
  375. macFast: "",
  376. aliasNameFast: "",
  377. typeFast: "1",
  378. visibleFast: false,
  379. head_style: "#f5f7fa",
  380. value1: "",
  381. startDate: "",
  382. endDate: "",
  383. identifier: "",
  384. pageNum: 1,
  385. pageSize: 10,
  386. totolSize: 10,
  387. nameSearch: "",
  388. tableData: [],
  389. scanData: [],
  390. multipleSelection: [],
  391. flag: "",
  392. disableFlag: true,
  393. websock: null,
  394. linkIndex: null,
  395. isSelectedList: [],
  396. connectedData: [],
  397. mergeTimeFlag: null,
  398. listTimeFlag: null,
  399. mergeData: [],
  400. listTmp: [],
  401. userLink: {
  402. num: "",
  403. mac: "",
  404. ecgAllList: [], //心电数据部分
  405. ecgSectionList: [], //心电数据全部
  406. //开始脑电各个部分的数据
  407. },
  408. buttonLinkFlag: false,
  409. disabledTimeFlag: null,
  410. //蓝牙基站的flag
  411. baseStationFlag: false,
  412. isAnimation: false,
  413. timer: null,
  414. };
  415. },
  416. created() {
  417. this.initWebsocket();
  418. },
  419. mounted() {
  420. let that = this;
  421. this.disconnectDevice();
  422. this.flag = this.$route.query.flag;
  423. this.queryScan();
  424. this.queryEle();
  425. //根据扫描列表和已连接列表看看哪些是重复的//重复的就是已连接的
  426. that.mergeTimeFlag = setInterval(that.mergeDataFun, 1000);
  427. that.listTimeFlag = setInterval(that.connectList, 6000);
  428. },
  429. beforeDestroy() {
  430. clearTimeout(this.mergeTimeFlag);
  431. clearInterval(this.listTimeFlag);
  432. clearInterval(this.disabledTimeFlag);
  433. this.websock.close(1000);
  434. this.closeScan();
  435. this.disconnectDevice();
  436. },
  437. destroyed() {
  438. //离开之后断开websocket连接
  439. },
  440. methods: {
  441. cance() {
  442. this.isAnimation = false;
  443. cancelAnimationFrame(this.timer);
  444. },
  445. upload(e) {
  446. this.cance();
  447. const file = e.target.files[0];
  448. const createObjectURL =
  449. window.createObjectURL ||
  450. window.URL.createObjectURL ||
  451. window.webkitURL.createObjectUR;
  452. this.baseStationDes = "";
  453. // this.imgurl = createObjectURL(file);
  454. const fReader = new FileReader();
  455. // fReader.readAsDataURL(file); // Base64 8Bit字节码
  456. // fReader.readAsBinaryString(file); // Binary 原始二进制
  457. fReader.readAsArrayBuffer(file); // ArrayBuffer 文件流
  458. fReader.onload = (e) => {
  459. console.log(e);
  460. // this.imgurl2 = e.target.result;
  461. e.target.result &&
  462. Jimp.read(e.target.result)
  463. .then(async (res) => {
  464. this.$refs.fileId.value = "";
  465. const { data, width, height } = res.bitmap;
  466. try {
  467. const resolve = await jsQR(data, width, height);
  468. this.baseStationDes = resolve.data;
  469. } catch (err) {
  470. this.$message.info("识别失败,请检查二维码是否正确");
  471. // this.result = "识别失败,请检查二维码是否正确!";
  472. } finally {
  473. // console.info("读取到的文件:", res);
  474. }
  475. })
  476. .catch((err) => {
  477. this.$refs.fileId.value = "";
  478. this.$message.info("读取文件错误");
  479. // console.error("文件读取错误:", err);
  480. });
  481. };
  482. },
  483. visiblePopFun() {
  484. this.baseStationFlag = false;
  485. this.visiblePop = false;
  486. this.comFlag = false;
  487. //调用关闭软件的方法
  488. ipcRenderer.send("window-close");
  489. },
  490. //保存蓝牙基站mac
  491. saveBaseSation() {
  492. //判断选择框是否选了mac了
  493. if (this.baseStationDes == "") {
  494. this.visiblePop = false;
  495. this.$message.info("尚未填写蓝牙基站MAC");
  496. return;
  497. }
  498. let path = `v2/gateway/set`;
  499. this.$http.postTmp(path, { mac: this.baseStationDes }, (res) => {
  500. if (res.data.code == 200) {
  501. this.baseStationFlag = false;
  502. this.comFlag = true;
  503. //修改成功后提示需要重启软件
  504. //修改成功后关掉
  505. // this.$message.success("添加成功");
  506. // this.queryEle();
  507. } else {
  508. this.$message.error(res.data.message);
  509. }
  510. });
  511. },
  512. //更新蓝牙基站mac
  513. updateJizhan() {
  514. let that = this;
  515. that.baseStationDes = "";
  516. //清空选项
  517. this.baseStationFlag = true;
  518. //调用蓝牙基站mac
  519. //查询接口得到返回的mac数据
  520. that.$http.getTmp(`v2/gateway/find`, {}, (res) => {
  521. if (res.code == 200) {
  522. that.baseStationOptions = res.data;
  523. // if(res.data,length>0){
  524. // for(let i =0;i<res.data.length;i++){
  525. // let a = res.data[i]
  526. // }
  527. // }
  528. } else {
  529. // this.$message.error(res.message);
  530. }
  531. });
  532. },
  533. addFast(val) {
  534. this.macFast = val.mac;
  535. this.typeFast = val.type;
  536. this.aliasNameFast = "";
  537. this.visibleFast = true;
  538. //然选择设备的弹出框弹出来
  539. //弹出框弹出来
  540. // macFast: "",
  541. // aliasNameFast: "",
  542. // typeFast: "1",
  543. },
  544. //新增设备
  545. addFastFun() {
  546. //判断设备名称是不是空
  547. if (this.aliasNameFast == "") {
  548. this.$message.info("设备名称不能为空");
  549. return;
  550. }
  551. this.visibleFast = false;
  552. let path = "v1/device/add";
  553. let data = {
  554. type: this.typeFast,
  555. mac: this.macFast,
  556. aliasName: this.aliasNameFast,
  557. };
  558. this.$http.postTmp(path, data, (res) => {
  559. if (res.data.code == 200) {
  560. this.$message.success("添加成功");
  561. this.queryEle();
  562. } else {
  563. this.$message.error(res.data.message);
  564. }
  565. });
  566. },
  567. //状态切换
  568. linkJudge(index, val, flag) {
  569. if (flag) {
  570. //buttonLinkFlag
  571. this.disconnectEquipment(val);
  572. } else {
  573. this.linkFun(index, val);
  574. }
  575. },
  576. //断开所有设备的操作
  577. disconnectDevice() {
  578. let that = this;
  579. that.$http.getTmp(`v2/device/dis/connAll`, {}, (res) => {
  580. if (res.data.code == 200) {
  581. } else {
  582. // this.$message.error(res.message);
  583. }
  584. });
  585. },
  586. //断开连接的脑电
  587. disconnectEquipment(val) {
  588. let that = this;
  589. that.buttonLinkFlag = true;
  590. that.$http.postTmp(`v2/device/dis/conn`, { mac: val.mac }, (res) => {
  591. that.disableStatus();
  592. if (res.data.code == 200) {
  593. } else {
  594. this.$message.error(res.message);
  595. }
  596. });
  597. },
  598. typeFormatter(val) {
  599. if (val.type == "1") {
  600. return "心电";
  601. } else {
  602. return "脑电";
  603. }
  604. },
  605. rssiFor(val) {
  606. if (val.rssi == 0) {
  607. return "";
  608. } else {
  609. return val.rssi;
  610. }
  611. },
  612. nameFormatter(val) {
  613. if (val.Name == "BW-ECG-01") {
  614. return "心电";
  615. } else {
  616. return "脑电";
  617. }
  618. },
  619. disableStatus() {
  620. let that = this;
  621. this.disabledTimeFlag = setTimeout(() => {
  622. this.buttonLinkFlag = false;
  623. }, 8000);
  624. },
  625. linkFun(index, val) {
  626. let that = this;
  627. that.buttonLinkFlag = true;
  628. that.$http.postTmp(
  629. `/v2/device/conn`,
  630. {
  631. ai: val.ai + "",
  632. mac: val.mac,
  633. at: val.at + "",
  634. },
  635. (res) => {
  636. that.disableStatus();
  637. if (res.data.code == 200) {
  638. // that.linkStatus = false;
  639. // this.linkIndex = index;
  640. //如果是脑电的话直接调用打开数据接口
  641. //如果是心电需要先调用写入输入数据-发送指令接口
  642. if (val.type == "0") {
  643. }
  644. // this.$message.success("设备连接成功");
  645. } else {
  646. // this.$message.error("访问服务器失败!");
  647. this.$message.error(res.data.message);
  648. }
  649. }
  650. );
  651. },
  652. //写入数据--发送指令
  653. writeData(mac) {
  654. let that = this;
  655. let userName = sessionStorage.getItem("name");
  656. that.$http.postTmp(
  657. `/v2/device/write/data`,
  658. { mac: mac, userName: userName },
  659. (res) => {
  660. // that.openData();
  661. if (res.data.code == 200) {
  662. } else {
  663. this.$message.error("访问服务器失败!");
  664. }
  665. }
  666. );
  667. },
  668. openData() {
  669. let that = this;
  670. that.$http.getTmp(`/v1/device/open/notify`, {}, (res) => {
  671. if (res.code == 200) {
  672. // that.tableData = res.data;
  673. // that.totolSize = res.data.totalElements;
  674. } else {
  675. this.$message.error("访问服务器失败!");
  676. }
  677. });
  678. },
  679. initWebsocket() {
  680. const wsuri = "ws://127.0.0.1:8000/ws?uid=client&to_uid=server";
  681. // const wsuri = "ws://192.168.1.103:8000/ws?uid=client&to_uid=server";
  682. this.websock = new WebSocket(wsuri);
  683. this.websock.onmessage = this.websocketonmessage;
  684. this.websock.onopen = this.websocketonopen;
  685. this.websock.onerror = this.websocketonerror;
  686. this.websock.onclose = this.websocketclose;
  687. },
  688. //查询连接列表
  689. connectList() {
  690. let that = this;
  691. that.$http.getTmp(`v2/device/connected/list`, {}, (res) => {
  692. //判断当前的列表是否存在该用户已点击的列表
  693. });
  694. },
  695. websocketonopen() {
  696. //连接建立之后执行send方法发送数据
  697. let actions = { test: "12345" };
  698. this.websocketsend(JSON.stringify(actions));
  699. },
  700. websocketonerror() {
  701. //连接建立失败重连
  702. // this.initWebSocket();
  703. },
  704. websocketonmessage(e) {
  705. let that = this;
  706. //数据接收
  707. const redata = JSON.parse(e.data);
  708. // console.log(redata);
  709. // if(redata.content == "设备连接成功"){
  710. // console.log(redata);
  711. // }
  712. // if(redata.content == "设备连接失败"){
  713. // console.log(redata);
  714. // }
  715. if (
  716. redata.content != "开启扫描成功" &&
  717. redata.content != "设置过滤成功" &&
  718. redata.content != "Successful connection to socket service" &&
  719. redata.content != "关闭扫描成功" &&
  720. redata.content != "设置UUID成功" &&
  721. redata.content !== "成功"
  722. ) {
  723. if (redata.content == "设置UUID失败") {
  724. that.$message.error("蓝牙基站设置uuid失败,请联系管理员");
  725. }
  726. //首先判断是否redata.content是否是未定义
  727. if (redata.hasOwnProperty("content")) {
  728. if (redata.content != "") {
  729. let dataLin = JSON.parse(redata.content);
  730. if (redata.msgType == "device") {
  731. // let dataLin = JSON.parse(redata.content);
  732. let a = {
  733. mac: dataLin.m,
  734. name: dataLin.n,
  735. rssi: dataLin.rssi,
  736. aliasName: dataLin.aliasName,
  737. ai: dataLin.ai,
  738. at: dataLin.at,
  739. type: dataLin.t, //当type为1时为心电
  740. };
  741. that.changeList(a);
  742. //获取到很多数据,取每秒最大的包含量
  743. } else if (redata.msgType == "connectedList") {
  744. //数组储存每次返回的已选列表
  745. //将每次的数据进行储存,然后经过去重及为已选列表的数据
  746. console.log(dataLin);
  747. let obj = {
  748. mac: dataLin.m,
  749. name: dataLin.n,
  750. rssi: dataLin.rssi,
  751. aliasName: dataLin.aliasName,
  752. connect: true,
  753. ai: dataLin.ai,
  754. at: dataLin.at,
  755. type: dataLin.t, //当type为1时为心
  756. };
  757. that.isSelectedList.push(obj);
  758. // console.log(obj)
  759. //创建一个变量,将变量赋值根据mac进行去重
  760. let list = JSON.parse(JSON.stringify(that.isSelectedList));
  761. //然后将list进行去重
  762. //然后将该结果去重
  763. let listBarring = [];
  764. for (let i = 0; i < list.length; i++) {
  765. let flag = false;
  766. for (let j = 0; j < listBarring.length; j++) {
  767. if (list[i].mac == listBarring[j].mac) {
  768. flag = true;
  769. }
  770. }
  771. if (!flag) {
  772. listBarring.push(list[i]);
  773. }
  774. }
  775. that.isSelectedList = JSON.parse(JSON.stringify(listBarring));
  776. console.log(that.isSelectedList);
  777. that.connectedData = JSON.parse(JSON.stringify(listBarring));
  778. // that.userLink.mac
  779. //当已连接设备列表包含当前mac是则为连接状态
  780. // that.linkStatus = true;
  781. //listBarring 将值赋值给已选列表的值
  782. //判断当前是脑电吗
  783. } else if (redata.msgType == "disConnect") {
  784. console.log("------------------------------------");
  785. console.log(dataLin);
  786. let mac = dataLin.m;
  787. let list = JSON.parse(JSON.stringify(that.connectedData));
  788. let list1 = [];
  789. for (let i = 0; i < list.length; i++) {
  790. if (list[i].mac != mac) {
  791. list1.push(list[i]);
  792. }
  793. }
  794. that.connectedData = JSON.parse(JSON.stringify(list1));
  795. let listLin = JSON.parse(JSON.stringify(that.isSelectedList));
  796. let listLin1 = [];
  797. for (let i = 0; i < listLin.length; i++) {
  798. if (listLin[i].mac != mac) {
  799. listLin1.push(list[i]);
  800. }
  801. }
  802. that.isSelectedList = JSON.parse(JSON.stringify(listLin1));
  803. }
  804. }
  805. }
  806. }
  807. },
  808. websocketsend(Data) {
  809. //数据发送
  810. this.websock.send(Data);
  811. },
  812. websocketclose(e) {
  813. // console.log("断开连接", e);
  814. if (e.code == 1005) {
  815. this.initWebsocket();
  816. } else {
  817. console.log("断开连接", e);
  818. }
  819. //关闭
  820. },
  821. changeList(obj) {
  822. // console.log(obj);
  823. let that = this;
  824. that.listTmp.push(obj);
  825. //让两个变量不是指向一个地址
  826. let arrayStr = JSON.stringify(that.listTmp);
  827. let array = JSON.parse(arrayStr);
  828. var newArr = new Array();
  829. var flag = false;
  830. for (var i = 0; i < array.length; i++) {
  831. for (var j = 0; j < newArr.length; j++) {
  832. if (array[i].mac == newArr[j].mac) {
  833. newArr[j] = array[i];
  834. flag = true;
  835. break;
  836. }
  837. }
  838. if (!flag) {
  839. newArr.push(array[i]);
  840. }
  841. }
  842. that.listTmp = JSON.parse(JSON.stringify(newArr));
  843. // console.log(JSON.stringify(newArr));
  844. //listTmp即使最大扫描列表
  845. that.scanData = newArr;
  846. },
  847. scanEquipment() {
  848. this.queryScan();
  849. },
  850. removeFun(val, row) {
  851. let path = `v1/device/${row.Mac}/remove`;
  852. this.$http.deleteTmp(path, {}, (res) => {
  853. if (res.data.code == 200) {
  854. this.$message(res.data.message);
  855. this.queryEle();
  856. }
  857. });
  858. },
  859. typeFor(val) {
  860. if (val.Type == "0") {
  861. return "脑电";
  862. } else if (val.Type == "1") {
  863. return "心电";
  864. }
  865. },
  866. addFun() {
  867. let path = "v1/device/add";
  868. let data = {
  869. type: this.type,
  870. mac: this.mac,
  871. aliasName: this.aliasName,
  872. };
  873. if (this.mac == "") {
  874. this.$message.info("设备MAC不能为空");
  875. return;
  876. }
  877. if (this.aliasName == "") {
  878. this.$message.info("设备名称不能为空");
  879. return;
  880. }
  881. this.$http.postTmp(path, data, (res) => {
  882. if (res.data.code == 200) {
  883. this.centerDialogVisible = false;
  884. this.queryEle();
  885. } else {
  886. this.$message.error(res.data.message);
  887. }
  888. });
  889. },
  890. addEquipment() {
  891. this.centerDialogVisible = true;
  892. this.mac = "";
  893. this.aliasName = "";
  894. },
  895. dateForMa(row) {
  896. let date = new Date(row.createTime);
  897. let formattedDate = `${date.getFullYear()}-${("0" + (date.getMonth() + 1)).slice(
  898. -2
  899. )}-${("0" + date.getDate()).slice(-2)} ${("0" + date.getHours()).slice(-2)}:${(
  900. "0" + date.getMinutes()
  901. ).slice(-2)}:${("0" + date.getSeconds()).slice(-2)}`;
  902. return formattedDate;
  903. },
  904. //返回上一页
  905. goBack() {
  906. this.$router.go(-1);
  907. },
  908. //批量下载
  909. download(val, value) {
  910. //获取数组集合
  911. let idArr = [];
  912. for (let i = 0; i < this.multipleSelection.length; i++) {
  913. idArr.push(this.multipleSelection[i].id);
  914. }
  915. this.batchDownloadOriginal(val, value, idArr);
  916. },
  917. //全部下载(原始数据)
  918. batchDownloadOriginalAll() {
  919. let that = this;
  920. let arr = [];
  921. //原始数据批量下载路径
  922. let path = `chat/chatRecord/AllDownload?identifier=${that.nameSearch}&beginDate=${that.startDate}&endDate=${that.endDate}`;
  923. // let path = `record/download`;
  924. let baseUrl = sessionStorage.getItem("baseUrl");
  925. //window.location.href = `${baseUrl}${path}?ids=${arr}`;
  926. let a = arr.join();
  927. axios({
  928. method: "get",
  929. url: `${baseUrl}${path}`,
  930. timeout: 600000, // 请求超时时间,数据量多后台响应慢的情况可以调大点,没生效的话可能是vue.config.js里的配置影响了
  931. responseType: "blob", // 返回类型为数据流
  932. data: {
  933. // ids: arr,
  934. // flag: that.flag,
  935. // startDate: that.startDate,
  936. // endDate: that.endDate,
  937. // userName: that.nameSearch,
  938. }, // 需要传参的话,在这传
  939. }).then((res) => {
  940. if (res && res.data) {
  941. // console.log(decodeURIComponent(res.headers["filename"]))
  942. // 调用js-file-download下载文件,第一个参数是数据流,第二个参数是文件名,我这后端返回时把文件名放到响应的header的filename字段中,所以用这种方式取出
  943. jsFileDownload(res.data, decodeURIComponent(res.headers["filename"]));
  944. }
  945. });
  946. },
  947. //批量下载(原始数据)
  948. batchDownloadOriginal(val, value, idArr) {
  949. let that = this;
  950. let arr = [];
  951. //原始数据批量下载路径
  952. let path = `v1/record/download/source`;
  953. if (val === 2) {
  954. path = `chat/chatRecord/batchDownload`;
  955. }
  956. if ((val === 1 && value === 1) || (val === 2 && value === 1)) {
  957. arr = idArr;
  958. } else {
  959. arr = [];
  960. }
  961. // let path = `record/download`;
  962. let baseUrl = sessionStorage.getItem("baseUrl");
  963. //window.location.href = `${baseUrl}${path}?ids=${arr}`;
  964. let a = arr.join();
  965. axios({
  966. method: "get",
  967. url: `${baseUrl}${path}?ids=${a}`,
  968. timeout: 600000, // 请求超时时间,数据量多后台响应慢的情况可以调大点,没生效的话可能是vue.config.js里的配置影响了
  969. responseType: "blob", // 返回类型为数据流
  970. data: {
  971. ids: arr,
  972. flag: that.flag,
  973. startDate: that.startDate,
  974. endDate: that.endDate,
  975. userName: that.nameSearch,
  976. }, // 需要传参的话,在这传
  977. }).then((res) => {
  978. if (res && res.data) {
  979. // console.log(decodeURIComponent(res.headers["filename"]))
  980. // 调用js-file-download下载文件,第一个参数是数据流,第二个参数是文件名,我这后端返回时把文件名放到响应的header的filename字段中,所以用这种方式取出
  981. jsFileDownload(res.data, decodeURIComponent(res.headers["filename"]));
  982. }
  983. });
  984. },
  985. handleSelectionChange(val) {
  986. this.multipleSelection = val;
  987. },
  988. timeChange(val) {
  989. if (val === null) {
  990. this.startDate = "";
  991. this.endDate = "";
  992. } else {
  993. this.startDate = this.fomatterDate(this.value1[0]);
  994. this.endDate = this.fomatterDate(this.value1[1]);
  995. }
  996. this.pageNum = 1;
  997. this.queryEle();
  998. },
  999. //格式化时间格式
  1000. fomatterDate(val) {
  1001. var date = new Date(val);
  1002. let year = date.getFullYear();
  1003. let month = this.fomatterM(date.getMonth() + 1);
  1004. let currentDay = this.fomatterM(date.getDate());
  1005. return year + "-" + month + "-" + currentDay;
  1006. },
  1007. fomatterM(val) {
  1008. if (val < 10) {
  1009. return "0" + val;
  1010. } else {
  1011. return val + "";
  1012. }
  1013. },
  1014. searchEle() {
  1015. this.pageNum = 1;
  1016. this.queryEle();
  1017. },
  1018. //扫描设备
  1019. //合并数据
  1020. mergeDataFun() {
  1021. let that = this;
  1022. //先选出扫描列表
  1023. //list为扫描列表
  1024. let scanDataTmp = JSON.stringify(this.scanData);
  1025. console.log(JSON.stringify('----'))
  1026. console.log(JSON.stringify(this.scanData))
  1027. let scanDataTmpFin = JSON.parse(scanDataTmp);
  1028. let list = [];
  1029. for (let i = 0; i < scanDataTmpFin.length; i++) {
  1030. let obj = {
  1031. rssi: "",
  1032. aliasName: "",
  1033. name: "",
  1034. mac: "",
  1035. connect: false,
  1036. type: "",
  1037. ai: "",
  1038. at: "",
  1039. };
  1040. obj.rssi = scanDataTmpFin[i].rssi;
  1041. obj.aliasName = scanDataTmpFin[i].aliasName;
  1042. obj.name = scanDataTmpFin[i].name;
  1043. obj.mac = scanDataTmpFin[i].mac;
  1044. obj.connect = false;
  1045. obj.type = scanDataTmpFin[i].type;
  1046. obj.ai = scanDataTmpFin[i].ai;
  1047. obj.at = scanDataTmpFin[i].at;
  1048. list.push(obj);
  1049. }
  1050. //判断某个
  1051. //先取出与扫描列表显示不一样的
  1052. //循环list
  1053. //与已选列表进行对比,如果已选列表中有重复
  1054. //已选列表必定显示
  1055. //如果已选列表为空
  1056. //已连接列表中应该全部显示+扫描列表与已选列表不重复的mac的则为全部的
  1057. //先将扫描列表与已选列表全部格式化合并为一个数组
  1058. //先查已选列表中在扫描列表中没有的----
  1059. //然后最后将其加入扫描列表
  1060. //然后查询已选列表中在扫描列表中有的
  1061. //已选列表
  1062. let connectedDataTmp = JSON.stringify(this.connectedData);
  1063. let connectedDataTmpFin = JSON.parse(connectedDataTmp);
  1064. //知道了已选列表
  1065. //在已选列表中找到与扫描列表不同的对象
  1066. //不包含的列表
  1067. //以下listBarring是已选列表中且与扫描列表不同的
  1068. let listBarring = [];
  1069. for (let i = 0; i < connectedDataTmpFin.length; i++) {
  1070. let flag = false;
  1071. for (let j = 0; j < list.length; j++) {
  1072. if (connectedDataTmpFin[i].mac == list[j].mac) {
  1073. flag = true;
  1074. }
  1075. }
  1076. if (!flag) {
  1077. listBarring.push(connectedDataTmpFin[i]);
  1078. }
  1079. }
  1080. //在找出扫描列表与已选列表相同的,将已选列表的数据同步给扫描列表
  1081. for (let i = 0; i < list.length; i++) {
  1082. for (let j = 0; j < connectedDataTmpFin.length; j++) {
  1083. if (list[i].mac == connectedDataTmpFin[j].mac) {
  1084. list[i].connect = true;
  1085. list[i].rssi = connectedDataTmpFin[j].rssi;
  1086. list[i].aliasName = connectedDataTmpFin[j].aliasName;
  1087. }
  1088. }
  1089. }
  1090. //然后合并两个数组
  1091. let listFin = list.concat(listBarring);
  1092. //判断当前选择的是脑电还是心电
  1093. let currentDeviceList = [];
  1094. for (let i = 0; i < listFin.length; i++) {
  1095. currentDeviceList.push(listFin[i]);
  1096. }
  1097. for (let k = 0; k < currentDeviceList.length; k++) {
  1098. if (that.userLink.mac !== "" && that.userLink.mac == currentDeviceList[k].mac) {
  1099. currentDeviceList[k].userNum = that.userLink.num;
  1100. }
  1101. }
  1102. //将数组其他选项
  1103. //将此数组与设备列表数组进行比较
  1104. let finalData = [];
  1105. finalData = JSON.parse(JSON.stringify(currentDeviceList));
  1106. for (let p = 0; p < finalData.length; p++) {
  1107. finalData[p].addFlag = true;
  1108. }
  1109. for (let p = 0; p < finalData.length; p++) {
  1110. for (let m = 0; m < this.tableData.length; m++) {
  1111. if (finalData[p].mac == this.tableData[m].Mac) {
  1112. finalData[p].addFlag = false;
  1113. }
  1114. }
  1115. }
  1116. // console.log(finalData);
  1117. this.mergeData = finalData;
  1118. },
  1119. changeList(obj) {
  1120. console.log('<<<<<<<<')
  1121. console.log(obj);
  1122. let that = this;
  1123. that.listTmp.push(obj);
  1124. //让两个变量不是指向一个地址
  1125. let arrayStr = JSON.stringify(that.listTmp);
  1126. let array = JSON.parse(arrayStr);
  1127. var newArr = new Array();
  1128. var flag = false;
  1129. for (var i = 0; i < array.length; i++) {
  1130. for (var j = 0; j < newArr.length; j++) {
  1131. if (array[i].mac == newArr[j].mac) {
  1132. newArr[j] = array[i];
  1133. flag = true;
  1134. break;
  1135. }
  1136. }
  1137. if (!flag) {
  1138. newArr.push(array[i]);
  1139. }
  1140. }
  1141. that.listTmp = JSON.parse(JSON.stringify(newArr));
  1142. // console.log(JSON.stringify(newArr));
  1143. //listTmp即使最大扫描列表
  1144. that.scanData = newArr;
  1145. },
  1146. queryEle() {
  1147. let that = this;
  1148. that.$http.getTmp(`/v1/device/list?type=`, {}, (res) => {
  1149. if (res.code == 200) {
  1150. that.tableData = res.data;
  1151. // that.totolSize = res.data.totalElements;
  1152. } else {
  1153. this.$message.error("访问服务器失败!");
  1154. }
  1155. });
  1156. },
  1157. handleSizeChange(val) {
  1158. this.pageSize = val;
  1159. this.queryEle();
  1160. },
  1161. handleCurrentChange(val) {
  1162. this.pageNum = val;
  1163. this.queryEle();
  1164. // this.pageNum = val;
  1165. // this.queryList();
  1166. },
  1167. //开启扫描扫描
  1168. queryScan() {
  1169. let that = this;
  1170. that.$http.getTmp(`/v2/device/scan`, {}, (res) => {});
  1171. },
  1172. //关闭扫描
  1173. closeScan() {
  1174. this.tableVisible = false;
  1175. let that = this;
  1176. that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => {});
  1177. },
  1178. singleDownload(index, row) {
  1179. let baseUrl = sessionStorage.getItem("baseUrl");
  1180. let path = `/chat/chatRecord/download?id=${row.id}`;
  1181. // let arr = [row.id];
  1182. axios({
  1183. method: "get",
  1184. url: `${baseUrl}${path}`,
  1185. timeout: 600000, // 请求超时时间,数据量多后台响应慢的情况可以调大点,没生效的话可能是vue.config.js里的配置影响了
  1186. responseType: "blob", // 返回类型为数据流
  1187. data: {
  1188. // ids: arr,
  1189. }, // 需要传参的话,在这传
  1190. }).then((res) => {
  1191. if (res && res.data) {
  1192. console.log(res.headers["filename"]);
  1193. // console.log(decodeURIComponent(res.headers["filename"]))
  1194. // 调用js-file-download下载文件,第一个参数是数据流,第二个参数是文件名,我这后端返回时把文件名放到响应的header的filename字段中,所以用这种方式取出
  1195. jsFileDownload(res.data, decodeURIComponent(res.headers["filename"]));
  1196. }
  1197. });
  1198. },
  1199. getAnswerQuestionPaymentSuccess(id) {
  1200. sessionStorage.setItem("back_page", "3");
  1201. let _this = this;
  1202. _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
  1203. if (res.data.code == 200 && res.data.data) {
  1204. _this.resultJsonParams = res.data.data;
  1205. // let sleep = JSON.parse(
  1206. // _this.resultJsonParams.userRecordEntity.testResult
  1207. // );
  1208. // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
  1209. // if (_this.scale_flag === "20210910163158") {
  1210. // _this.askEnd(sleep);
  1211. // this.inputFlag = 0;
  1212. // }
  1213. // if (_this.scale_flag === "20220805135201") {
  1214. // _this.askEnd(sleep);
  1215. // this.inputFlag = 0;
  1216. // }
  1217. // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
  1218. // .version;
  1219. let testResult = JSON.parse(res.data.data.userRecordEntity.testResult)[0]
  1220. .version;
  1221. if (testResult == 2) {
  1222. _this.$router.push({
  1223. name: "scaleResultSCl",
  1224. params: { tableData: _this.resultJsonParams },
  1225. });
  1226. } else {
  1227. _this.$router.push({
  1228. name: "scaleResult",
  1229. params: { tableData: _this.resultJsonParams },
  1230. });
  1231. }
  1232. }
  1233. });
  1234. // _this.$http.get(`/getRecordById?id=${id}`, {}, (res) => {
  1235. // if (res.code == 200) {
  1236. // _this.resultJsonParams = res.data;
  1237. // let testResult = JSON.parse(res.data?.userRecordEntity?.testResult)[0]
  1238. // .version;
  1239. // if (testResult == 2) {
  1240. // _this.$router.push({
  1241. // name: "scaleResultSCl",
  1242. // query: _this.resultJsonParams,
  1243. // });
  1244. // } else {
  1245. // _this.$router.push({
  1246. // name: "ScaleResult",
  1247. // query: JSON.stringify(_this.resultJsonParams),
  1248. // });
  1249. // }
  1250. // }
  1251. // console.log("请求数据的list", res);
  1252. // });
  1253. },
  1254. handleDelete(index, row) {},
  1255. tableRowClassName({ rowIndex }) {
  1256. if (rowIndex % 2 === 0) {
  1257. return "warning-row";
  1258. } else if (rowIndex % 2 === 1) {
  1259. return "success-row";
  1260. }
  1261. return "success-row";
  1262. },
  1263. },
  1264. };
  1265. </script>
  1266. <style scoped>
  1267. .main_right_height {
  1268. height: 100vh !important;
  1269. display: block !important;
  1270. overflow-y: auto !important;
  1271. background: #ffffff;
  1272. }
  1273. .el-input-group {
  1274. line-height: normal;
  1275. display: inline-table;
  1276. width: 200px !important;
  1277. border-collapse: separate;
  1278. border-spacing: 0;
  1279. }
  1280. .equipment_class {
  1281. width: 100%;
  1282. margin-top: 30px;
  1283. display: flex;
  1284. flex-direction: row;
  1285. justify-items: center;
  1286. align-items: center;
  1287. }
  1288. .dig_equi >>> .el-dialog__header {
  1289. padding: 0 !important;
  1290. }
  1291. .dig_equi >>> .el-dialog {
  1292. border-top-left-radius: 12px;
  1293. border-top-right-radius: 12px;
  1294. }
  1295. .dig_equi >>> .el-dialog__headerbtn .el-dialog__close {
  1296. color: #ffffff;
  1297. }
  1298. .title_di {
  1299. width: 545px;
  1300. background-color: transparent;
  1301. }
  1302. .min_equi {
  1303. display: flex;
  1304. flex-direction: column;
  1305. align-items: center;
  1306. }
  1307. .cancle_add {
  1308. cursor: pointer;
  1309. width: 87px;
  1310. height: 45px;
  1311. background: #ffffff;
  1312. border-radius: 4px;
  1313. border: 1px solid #e5e5e5;
  1314. margin-right: 40px;
  1315. font-family: Alibaba PuHuiTi 2;
  1316. font-weight: normal;
  1317. font-size: 20px;
  1318. color: #666666;
  1319. }
  1320. .com_add {
  1321. cursor: pointer;
  1322. width: 87px;
  1323. height: 45px;
  1324. background-color: #5e8af7;
  1325. border-radius: 4px;
  1326. border: 1px solid #e5e5e5;
  1327. color: #ffffff;
  1328. font-family: Alibaba PuHuiTi 2;
  1329. font-weight: normal;
  1330. font-size: 20px;
  1331. }
  1332. .equipment_bg {
  1333. position: absolute;
  1334. left: 10px;
  1335. top: -10px;
  1336. }
  1337. .equipment_title {
  1338. position: absolute;
  1339. left: 0;
  1340. right: 0;
  1341. top: 14px;
  1342. font-size: 24px;
  1343. color: #ffffff;
  1344. }
  1345. .fileIdClass {
  1346. cursor: pointer;
  1347. }
  1348. </style>
  1349. <style lang="less">
  1350. .sweep {
  1351. cursor: pointer;
  1352. position: relative;
  1353. padding: 12px;
  1354. width: 100%;
  1355. font-size: 18px;
  1356. cursor: pointer;
  1357. color: white;
  1358. background: #42b983;
  1359. border: 1px solid #42b983;
  1360. overflow: hidden;
  1361. input {
  1362. position: absolute;
  1363. /* font-size: 50px; */
  1364. margin-left: -180px;
  1365. line-height: 50px;
  1366. margin-top: -15px;
  1367. width: 100%;
  1368. opacity: 0;
  1369. }
  1370. }
  1371. .eweima {
  1372. font-size: 12px;
  1373. color: #b2afaa;
  1374. margin-bottom: 20px;
  1375. }
  1376. </style>