完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2210 lines
80 KiB

  1. webpackJsonp([27,77],{
  2. /***/ "Qkmj":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "vIma":
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  10. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js
  11. var defineProperty = __webpack_require__("bOdI");
  12. var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
  13. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/promise.js
  14. var promise = __webpack_require__("//Fk");
  15. var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
  16. // EXTERNAL MODULE: ./node_modules/babel-runtime/regenerator/index.js
  17. var regenerator = __webpack_require__("Xxa5");
  18. var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
  19. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
  20. var asyncToGenerator = __webpack_require__("exGp");
  21. var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
  22. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  23. var stringify = __webpack_require__("mvHQ");
  24. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  25. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  26. var api = __webpack_require__("gyMJ");
  27. // EXTERNAL MODULE: ./src/components/zTree1.vue + 2 modules
  28. var zTree1 = __webpack_require__("6Ljo");
  29. // EXTERNAL MODULE: ./src/components/deviceLi.vue + 2 modules
  30. var deviceLi = __webpack_require__("4qFG");
  31. // EXTERNAL MODULE: ./src/components/UnlockRecord.vue + 2 modules
  32. var UnlockRecord = __webpack_require__("YBqH");
  33. // EXTERNAL MODULE: ./src/components/DeviceFeedbackLog.vue + 2 modules
  34. var DeviceFeedbackLog = __webpack_require__("5skf");
  35. // EXTERNAL MODULE: ./src/views/log/manholeCoverLog.vue + 2 modules
  36. var manholeCoverLog = __webpack_require__("wmJC");
  37. // EXTERNAL MODULE: ./src/utils/index.js
  38. var utils = __webpack_require__("0xDb");
  39. // EXTERNAL MODULE: ./node_modules/xlsx/xlsx.js
  40. var xlsx = __webpack_require__("uXZL");
  41. var xlsx_default = /*#__PURE__*/__webpack_require__.n(xlsx);
  42. // EXTERNAL MODULE: ./src/utils/util.js
  43. var util = __webpack_require__("oFuF");
  44. // EXTERNAL MODULE: ./src/utils/equipment.js
  45. var equipment = __webpack_require__("ObZk");
  46. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  47. var moment = __webpack_require__("PJh5");
  48. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  49. // EXTERNAL MODULE: ./src/api/allFun.js
  50. var allFun = __webpack_require__("mprh");
  51. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/device/manholeCoverDevice.vue
  52. var _methods;
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //
  81. //
  82. //
  83. //
  84. //
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. //
  154. //
  155. //
  156. //
  157. //
  158. //
  159. //
  160. //
  161. //
  162. //
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. //
  179. //
  180. //
  181. //
  182. //
  183. //
  184. //
  185. //
  186. //
  187. //
  188. //
  189. //
  190. //
  191. //
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. //
  199. //
  200. //
  201. //
  202. //
  203. //
  204. //
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. //
  221. //
  222. //
  223. //
  224. //
  225. //
  226. //
  227. //
  228. //
  229. //
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. //
  244. //
  245. //
  246. //
  247. //
  248. //
  249. //
  250. //
  251. //
  252. //
  253. //
  254. //
  255. //
  256. //
  257. //
  258. //
  259. //
  260. //
  261. //
  262. //
  263. //
  264. //
  265. //
  266. //
  267. //
  268. //
  269. //
  270. //
  271. //
  272. //
  273. //
  274. //
  275. //
  276. //
  277. //
  278. //
  279. //
  280. //
  281. //
  282. //
  283. //
  284. //
  285. //
  286. //
  287. //
  288. //
  289. //
  290. //
  291. //
  292. //
  293. //
  294. //
  295. //
  296. //
  297. //
  298. //
  299. //
  300. //
  301. //
  302. //
  303. //
  304. //
  305. //
  306. //
  307. //
  308. //
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. //
  359. //
  360. //
  361. //
  362. //
  363. //
  364. //
  365. //
  366. //
  367. //
  368. //
  369. //
  370. //
  371. //
  372. //
  373. //
  374. //
  375. //
  376. //
  377. //
  378. //
  379. //
  380. //
  381. //
  382. //
  383. //
  384. //
  385. //
  386. //
  387. //
  388. //
  389. //
  390. //
  391. //
  392. /* harmony default export */ var manholeCoverDevice = ({
  393. inject: ['reload'],
  394. name: "doorLock",
  395. data: function data() {
  396. return {
  397. searchRoom: '',
  398. deviceImg: __webpack_require__("It2U"),
  399. selectoption: [],
  400. selectoptionValue: '',
  401. senddeviceNum: '',
  402. sendroomId: '',
  403. commpontentStatus: true,
  404. Emergence: {
  405. EmerPhone: '',
  406. password: '',
  407. device: '',
  408. name: ''
  409. },
  410. defaultProps: {
  411. children: "children",
  412. label: "name"
  413. },
  414. options: [],
  415. drawer: false,
  416. value1: false,
  417. value2: 0,
  418. marks: {
  419. 0: "关",
  420. 50: "中",
  421. 100: "高"
  422. },
  423. switchtext: "关",
  424. activeName: "0",
  425. formInline: {},
  426. platlist: [{
  427. label: "电信",
  428. value: 1
  429. }, {
  430. label: "移动",
  431. value: 2
  432. }, {
  433. label: "联通",
  434. value: 3
  435. }],
  436. manufacturerList: [],
  437. setting: {
  438. edit: {
  439. enable: true,
  440. drag: {
  441. isMove: true
  442. },
  443. showRemoveBtn: false,
  444. showRenameBtn: false
  445. },
  446. check: {
  447. enable: false
  448. },
  449. data: {
  450. simpleData: {
  451. enable: true,
  452. pIdKey: "pid"
  453. }
  454. },
  455. view: {
  456. showIcon: true,
  457. addHoverDom: this.addHoverDom,
  458. removeHoverDom: this.removeHoverDom
  459. }
  460. },
  461. zNodes: [],
  462. bromm: {},
  463. query: {
  464. address: "",
  465. name: "",
  466. pageIndex: 1,
  467. pageSize: 20,
  468. options: []
  469. },
  470. search: {
  471. name: "",
  472. deviceNum: "",
  473. roomname: '',
  474. imei: "",
  475. isOnline: "",
  476. startBattery: '0',
  477. endBattery: '100'
  478. },
  479. tableData: [],
  480. multipleSelection: [],
  481. delList: [],
  482. editVisible: false,
  483. roomVisible: false,
  484. pageTotal: 0,
  485. sumpageTotal: 0,
  486. currentPage4: 1,
  487. form: {
  488. manufacturer: "",
  489. validateCode: ''
  490. },
  491. idx: -1,
  492. id: -1,
  493. abnormal: 0,
  494. online: 0,
  495. treedata: [],
  496. unonline: 0,
  497. Unlocking: false,
  498. Unlockingrow: {},
  499. lockingform: {
  500. password: ""
  501. },
  502. activeiconfont: true,
  503. info: [],
  504. uploadkj: false,
  505. userlist1statu: true,
  506. userlist2: [],
  507. multipleSelection1: [],
  508. batchAccess: "",
  509. getEmergenceStatus: false,
  510. getEmergenceNum: '',
  511. checkNodeId: '',
  512. pageSize: 10,
  513. pageNum: 1,
  514. sendStatus: true,
  515. userInfo: {
  516. type: ''
  517. },
  518. checkNodeId1: '',
  519. accessPlatform: {}
  520. };
  521. },
  522. components: {
  523. zTree: zTree1["a" /* default */],
  524. deviceLi: deviceLi["a" /* default */],
  525. UnlockRecord: UnlockRecord["a" /* default */],
  526. warningLog: manholeCoverLog["default"],
  527. DeviceFeedbackLog: DeviceFeedbackLog["a" /* default */]
  528. },
  529. beforeCreate: function beforeCreate() {},
  530. created: function created() {
  531. this.manufacturerList = this.$MANUFACTURER.MANUFACTURER.manholeCover;
  532. this.accessPlatform = this.$MANUFACTURER.accessPlatform;
  533. this.userInfo = JSON.parse(localStorage.getItem('info'));
  534. this.getdevice();
  535. this.getalllist();
  536. this.info = JSON.parse(localStorage.getItem("info"));
  537. this.$store.commit("increment", 1);
  538. this.getcard();
  539. this.getallTree();
  540. },
  541. methods: (_methods = {
  542. InputFun: function InputFun(e, name) {
  543. if (name == 'startBattery' || name == 'endBattery') {
  544. if (Number(e) < 0) {
  545. e = 0;
  546. }
  547. if (Number(e) > 100) {
  548. e = 100;
  549. }
  550. }
  551. this.search[name] = e;
  552. },
  553. selectTenantId: function selectTenantId(e) {
  554. localStorage.setItem('tenantId', e);
  555. this.reload();
  556. },
  557. // 重置初始化
  558. resetInitialization: function resetInitialization(row, callback) {
  559. var _this2 = this;
  560. if (row.manufactureId == 201) {
  561. var data3 = {
  562. code: "zg/deleteAllUsers",
  563. data: {
  564. lockerId: row.deviceNum,
  565. imei: row.imei,
  566. order: 6501
  567. }
  568. };
  569. Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res) {
  570. if (res.success) {
  571. _this2.$message.success("重置成功");
  572. callback(true);
  573. } else {
  574. callback(false);
  575. }
  576. });
  577. } else if (row.manufactureId == 101) {
  578. var data2 = {
  579. code: "isp/restoreSetting",
  580. data: {
  581. order: 6501,
  582. imei: row.imei,
  583. deviceNum: row.deviceNum,
  584. managerTelephone: "18270949468",
  585. managerPassword: "202108"
  586. }
  587. };
  588. Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) {
  589. if (res2.success) {
  590. _this2.$message.success("重置成功");
  591. var str = {
  592. deviceNum: row.deviceNum,
  593. imei: row.imei,
  594. order: 6101
  595. };
  596. Object(api["g" /* httpPost */])(str, _this2.$api.getDeviceRegisterManager).then(function (res1) {
  597. var str1 = {
  598. imei: row.imei, //row.imsi,
  599. deviceNum: row.deviceNum, //row.deviceNum,
  600. operateMode: 7,
  601. is: true,
  602. order: 6207,
  603. passwordStartTime: "20210813010101",
  604. passwordEndTime: "20680813010101"
  605. };
  606. Object(api["g" /* httpPost */])(str1, _this2.$api.getDeviceOperateUserInfo).then(function (res2) {});
  607. var str2 = {
  608. imei: row.imei, //row.imsi,
  609. deviceNum: row.deviceNum, //row.deviceNum,
  610. operateMode: 4,
  611. is: true,
  612. order: 6204,
  613. passwordStartTime: "20210813010101",
  614. passwordEndTime: "20680813010101"
  615. };
  616. Object(api["g" /* httpPost */])(str2, _this2.$api.getDeviceOperateUserInfo).then(function (res3) {
  617. if (res3.success) {
  618. _this2.$message.success("初始化成功");
  619. callback(true);
  620. }
  621. });
  622. });
  623. } else {
  624. _this2.$message.error(res2.msg);
  625. callback(false);
  626. }
  627. });
  628. }
  629. },
  630. getPersonCallback: function getPersonCallback(person, alllist, callback) {
  631. var personlist = [];
  632. person.map(function (li) {
  633. var obj = {
  634. person: li,
  635. data: alllist.filter(function (item) {
  636. if (item.deviceNum && item.cardId == li.card) {
  637. return item;
  638. }
  639. })
  640. };
  641. personlist.push(obj);
  642. });
  643. callback(personlist);
  644. },
  645. // 数据同步
  646. dataSynchronization: function dataSynchronization(index, row) {
  647. var _this3 = this;
  648. this.$confirm("是否确认数据同步?", "提示", {
  649. confirmButtonText: "确定",
  650. cancelButtonText: "取消",
  651. type: "warning"
  652. }).then(function () {
  653. _this3.orderDeviceData(row);
  654. });
  655. },
  656. // 获取指定锁所有非703凭证数据
  657. orderDeviceData: function orderDeviceData(row) {
  658. var _this4 = this;
  659. var _this = this;
  660. if (row.roomId) {
  661. var data1 = {
  662. pageNum: 0,
  663. pageSize: 0,
  664. q: {
  665. id: row.roomId
  666. }
  667. };
  668. Object(api["d" /* httpGet */])(data1, this.$api.getSiteTenant).then(function (res) {
  669. if (res.success) {
  670. var person = res.data.list;
  671. var data = {
  672. imei: row.imei
  673. };
  674. Object(api["d" /* httpGet */])(data, _this4.$api.orderDeviceData).then(function (res1) {
  675. if (res1.success) {
  676. var alllist = res1.data;
  677. _this4.getPersonCallback(person, alllist, function (callback) {
  678. var personlist = callback;
  679. _this.resetInitialization(row, function (callback) {
  680. if (row.manufactureId == 101) {
  681. personlist.map(function (lt) {
  682. var endTime = new Date(lt.person.endTime).getTime();
  683. var startTime = new Date(lt.person.startTime).getTime();
  684. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  685. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  686. var userTelephone = JSON.parse(lt.person.info).userTelephone;
  687. var userPassword = JSON.parse(lt.person.info).userPassword;
  688. var data = {
  689. deviceNum: row.deviceNum,
  690. imei: row.imei,
  691. userTelephone: userTelephone,
  692. userPassword: userPassword,
  693. password: userPassword,
  694. operateMode: 26,
  695. order: 6226,
  696. passwordStartTime: passwordStartTime,
  697. passwordEndTime: passwordEndTime,
  698. cardName: lt.person.name,
  699. roomName: row.roomName
  700. };
  701. equipment["a" /* default */].LDAddUser(data.deviceNum, data.imei, data.userTelephone, data.userPassword, data.password, passwordStartTime, passwordEndTime, data.operateMode, data.order, data.cardName, data.roomName, false, function (callback) {
  702. lt.data.map(function (ll) {
  703. util["a" /* default */].putCarfidAdd(row, ll);
  704. });
  705. });
  706. });
  707. } else if (row.manufactureId == 201) {
  708. personlist.map(function (lt) {
  709. var endTime = new Date(lt.person.endTime).getTime();
  710. var startTime = new Date(lt.person.startTime).getTime();
  711. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  712. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  713. var userTelephone = JSON.parse(lt.person.info).userTelephone;
  714. var userPassword = JSON.parse(lt.person.info).userPassword;
  715. var data = {
  716. lockerId: row.deviceNum,
  717. imei: row.imei,
  718. lockerUserId: userPassword,
  719. keyId: userPassword,
  720. role: 0,
  721. action: 1,
  722. order: 6226,
  723. cardName: lt.person.name,
  724. roomName: row.roomName
  725. };
  726. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) {
  727. if (callback.success) {
  728. lt.data.map(function (ll) {
  729. util["a" /* default */].putCarfidzgAdd(row, ll);
  730. });
  731. }
  732. });
  733. });
  734. }
  735. });
  736. });
  737. } else {
  738. _this4.$message.error(res1.msg);
  739. }
  740. });
  741. } else {
  742. _this4.$message.error(res.msg);
  743. }
  744. });
  745. } else {
  746. this.$message.error("暂无数据");
  747. }
  748. },
  749. // 从paas同步能对应得上的有效凭证
  750. syncCommands: function syncCommands() {
  751. Object(api["d" /* httpGet */])('', this.$api.syncCommands).then(function (res) {});
  752. },
  753. // 同步刷新
  754. refreshFun: function refreshFun() {
  755. Object(api["d" /* httpGet */])("", this.$api.lockDeviceInfoList).then(function (res) {});
  756. },
  757. // 选择房源
  758. checkNode: function checkNode(e) {
  759. this.checkNodeId = e;
  760. var options = this.options;
  761. var arr = this.getId(options, e[e.length - 1]);
  762. var listarr = [arr[0]];
  763. var obj = this.getNodeId(listarr);
  764. this.checkNodeId = obj;
  765. },
  766. checkNodeOne: function checkNodeOne(e) {
  767. this.checkNodeId1 = e[e.length - 1];
  768. this.checkRoomDevice(e[e.length - 1]);
  769. },
  770. checkRoomDevice: function checkRoomDevice(id) {
  771. var _this5 = this;
  772. var q = {
  773. roomIds: [id],
  774. lockType: 8
  775. };
  776. var data = {
  777. q: stringify_default()(q),
  778. pageNum: 1,
  779. pageSize: this.pageSize
  780. };
  781. Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
  782. if (res.data.list.length > 0) {
  783. _this5.$message.error("该房间已绑定锁,请重新选择");
  784. _this5.checkNodeId1 = '';
  785. }
  786. });
  787. },
  788. getParentId: function getParentId(list, id) {
  789. for (var i in list) {
  790. if (list[i].id == id) {
  791. return [list[i]];
  792. }
  793. if (list[i].children) {
  794. var node = this.getParentId(list[i].children, id);
  795. if (node !== undefined) {
  796. return node.concat(list[i]);
  797. }
  798. }
  799. }
  800. },
  801. getId: function getId(list, id) {
  802. for (var i in list) {
  803. if (list[i].id == id) {
  804. return [list[i]];
  805. }
  806. if (list[i].children) {
  807. var node = this.getParentId(list[i].children, id);
  808. if (node !== undefined) {
  809. return node;
  810. }
  811. }
  812. }
  813. },
  814. getNodeId: function getNodeId(list) {
  815. var newNodeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  816. for (var i in list) {
  817. newNodeId.push(list[i].id);
  818. if (list[i].children) {
  819. this.getNodeId(list[i].children, newNodeId);
  820. }
  821. }
  822. return newNodeId;
  823. },
  824. getallTree: function getallTree() {
  825. var _this6 = this;
  826. var data = {};
  827. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  828. var userlist = [];
  829. var temp = {},
  830. arr = [];
  831. res.data.forEach(function (item, index) {
  832. if (!temp[item.id]) {
  833. arr.push(item);
  834. temp[item.id] = true;
  835. }
  836. });
  837. arr.map(function (li) {
  838. if (li.expand) {
  839. if (JSON.parse(li.expand).type == "0") {
  840. userlist.push(li);
  841. }
  842. }
  843. });
  844. var arrdata = Object(utils["o" /* uniqueArray1 */])(res.data, "id");
  845. _this6.options = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
  846. });
  847. },
  848. // 获取门卡概况
  849. getcard: function getcard() {
  850. var _this7 = this;
  851. allFun["a" /* default */].getAnalysis("", 8, function (callback) {
  852. _this7.sumpageTotal = callback.total;
  853. _this7.online = callback.onlineTotal;
  854. _this7.unonline = callback.offlineTotal;
  855. _this7.abnormal = callback.abnormalTotal;
  856. });
  857. },
  858. // 发送离线密码
  859. sendEmergence: function sendEmergence() {
  860. var _this8 = this;
  861. var re = /^1\d{10}$/;
  862. if (re.test(this.Emergence.EmerPhone)) {
  863. var data = {
  864. code: this.Emergence.password,
  865. phone: this.Emergence.EmerPhone,
  866. device: this.Emergence.device,
  867. name: this.Emergence.name
  868. };
  869. Object(api["g" /* httpPost */])(data, this.$api.sendEmergence).then(function (res) {
  870. if (res.success) {
  871. _this8.$message.success('发送成功');
  872. } else {
  873. _this8.$message.error('发送失败');
  874. }
  875. });
  876. this.getEmergenceStatus = false;
  877. } else {
  878. this.$message.error('请填写正确手机号');
  879. }
  880. },
  881. handleCheckChange: function handleCheckChange(data, checked, node) {
  882. if (checked) {
  883. this.treedata = data;
  884. } else {
  885. if (this.checkedId == data.id) {
  886. this.$refs.tree.setCheckedKeys([data.id]);
  887. }
  888. }
  889. },
  890. // 临时密码
  891. getEmergence: function getEmergence(index, row) {
  892. var _this9 = this;
  893. var data = {
  894. code: "zg/getEmergence",
  895. data: {
  896. lockerId: row.deviceNum
  897. }
  898. };
  899. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  900. if (res.success) {
  901. _this9.$message.success("获取成功");
  902. _this9.Emergence.password = res.data.data;
  903. _this9.Emergence.device = row.deviceNum;
  904. _this9.Emergence.name = row.roomName;
  905. _this9.getEmergenceStatus = true;
  906. } else {
  907. _this9.$message.error("获取失败");
  908. }
  909. });
  910. },
  911. // input视图刷新
  912. changesr: function changesr(e) {
  913. this.$forceUpdate();
  914. },
  915. handleSelectionChange1: function handleSelectionChange1(val) {
  916. this.multipleSelection1 = val;
  917. },
  918. BatchAdd: function BatchAdd() {
  919. this.uploadkj = true;
  920. },
  921. //批量添加确认
  922. batchUploadfun: function batchUploadfun() {
  923. var _this10 = this;
  924. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
  925. return regenerator_default.a.wrap(function _callee$(_context) {
  926. while (1) {
  927. switch (_context.prev = _context.next) {
  928. case 0:
  929. if (!(_this10.batchAccess == "")) {
  930. _context.next = 4;
  931. break;
  932. }
  933. _this10.$message.error("请选择运营商");
  934. _context.next = 10;
  935. break;
  936. case 4:
  937. if (!(_this10.multipleSelection1.length == 0)) {
  938. _context.next = 8;
  939. break;
  940. }
  941. _this10.$message.error("请勾选要批量添加的设备");
  942. _context.next = 10;
  943. break;
  944. case 8:
  945. _context.next = 10;
  946. return _this10.multipleSelection1.map(function (li, index) {
  947. var str = {
  948. deviceNum: li.deviceNum,
  949. imei: li.imei,
  950. imsi: li.imei, //row.imsi,
  951. order: 5101,
  952. platformId: _this10.batchAccess
  953. };
  954. Object(api["g" /* httpPost */])(str, _this10.$api.DeviceRegisterDevice).then(function (res) {
  955. if (res.data.success) {
  956. // this.$message.success(res.data.msg);
  957. // this.editVisible = false;
  958. // this.getdevice();
  959. _this10.AddAdministrator(index, li);
  960. }
  961. });
  962. }).then(function (res) {
  963. _this10.$message.success("添加成功");
  964. _this10.editVisible = false;
  965. _this10.getdevice();
  966. });
  967. case 10:
  968. case "end":
  969. return _context.stop();
  970. }
  971. }
  972. }, _callee, _this10);
  973. }))();
  974. },
  975. //音量设置
  976. stepFun: function stepFun(val) {
  977. var _this11 = this;
  978. var operate = "00";
  979. if (val == 0) {
  980. operate = "00";
  981. } else if (val == 50) {
  982. operate = "01";
  983. } else if (val == 100) {
  984. operate = "02";
  985. }
  986. var data = {
  987. code: "isp/volumnSetting",
  988. data: {
  989. imei: this.formInline.imei,
  990. operate: operate
  991. }
  992. };
  993. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) {
  994. if (res2.data.success) {
  995. _this11.$message.success("设置成功");
  996. } else {
  997. _this11.$message.error(res.msg);
  998. }
  999. });
  1000. },
  1001. // 常开设置
  1002. switchFun: function switchFun(e) {
  1003. var _this12 = this;
  1004. var data = {};
  1005. if (e) {
  1006. this.switchtext = "开";
  1007. data = {
  1008. code: "isp/alwaysOpenSetting",
  1009. data: {
  1010. imei: this.formInline.imei,
  1011. operate: 1
  1012. }
  1013. };
  1014. } else {
  1015. this.switchtext = "关";
  1016. data = {
  1017. code: "isp/alwaysOpenSetting",
  1018. data: {
  1019. imei: this.formInline.imei,
  1020. operate: 0
  1021. }
  1022. };
  1023. }
  1024. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) {
  1025. if (res2.data.success) {
  1026. _this12.$message.success("设置成功");
  1027. } else {
  1028. _this12.$message.error(res.msg);
  1029. }
  1030. });
  1031. },
  1032. // 关闭侧边栏
  1033. handleClose: function handleClose() {
  1034. this.drawer = false;
  1035. },
  1036. // tabs标签页切换
  1037. handleClick: function handleClick(tab, event) {
  1038. this.commpontentStatus = true;
  1039. }
  1040. }, defineProperty_default()(_methods, "handleClose", function handleClose(done) {
  1041. done();
  1042. }), defineProperty_default()(_methods, "detailsFun", function detailsFun(index, row) {
  1043. this.drawer = true;
  1044. this.formInline = row;
  1045. this.sendStatus = false;
  1046. this.$nextTick(function () {
  1047. this.sendroomId = row.deviceNum;
  1048. this.senddeviceNum = row.deviceNum;
  1049. this.sendStatus = true;
  1050. });
  1051. }), defineProperty_default()(_methods, "Reset1", function Reset1(index, row) {
  1052. var data2 = {
  1053. code: "isp/restoreSetting",
  1054. data: {
  1055. order: 6501,
  1056. imei: row.imei,
  1057. deviceNum: row.deviceNum,
  1058. managerTelephone: "18270949468",
  1059. managerPassword: "202108"
  1060. }
  1061. };
  1062. Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) {
  1063. // if (res2.data.success) {
  1064. // this.$message.success("重置成功");
  1065. // } else {
  1066. // this.$message.error(res.msg);
  1067. // }
  1068. });
  1069. }), defineProperty_default()(_methods, "Reset", function Reset(index, row) {
  1070. var _this13 = this;
  1071. this.$confirm("是否确认重置门锁?", "提示", {
  1072. confirmButtonText: "确定",
  1073. cancelButtonText: "取消",
  1074. type: "warning"
  1075. }).then(function () {
  1076. if (row.manufactureId == 201) {
  1077. var data3 = {
  1078. code: "zg/deleteAllUsers",
  1079. data: {
  1080. lockerId: row.deviceNum,
  1081. imei: row.imei,
  1082. order: 6501,
  1083. cardName: _this13.info.username,
  1084. roomName: row.roomName
  1085. }
  1086. };
  1087. Object(api["g" /* httpPost */])(data3, _this13.$api.sendCommand).then(function (res) {
  1088. if (res.success) {
  1089. _this13.$message.success("重置成功");
  1090. var q = {
  1091. id: row.roomId
  1092. };
  1093. var tenant = {
  1094. q: stringify_default()(q)
  1095. };
  1096. Object(api["d" /* httpGet */])(tenant, _this13.$api.getSiteTenant).then(function (res) {
  1097. promise_default.a.all(res.data.list.map(function (element) {
  1098. return new promise_default.a(function (resolve, reject) {
  1099. resolve(element.card);
  1100. });
  1101. })).then(function (allId) {
  1102. allId.map(function (li) {
  1103. var str = [{
  1104. siteId: row.roomId,
  1105. cardId: li
  1106. }];
  1107. Object(api["g" /* httpPost */])(str, _this13.$api.unbindCard).then(function (res) {});
  1108. });
  1109. });
  1110. });
  1111. } else {
  1112. _this13.$message.success(res.msg);
  1113. }
  1114. });
  1115. } else if (row.manufactureId == 101) {
  1116. var data2 = {
  1117. code: "isp/restoreSetting",
  1118. data: {
  1119. order: 6501,
  1120. imei: row.imei,
  1121. deviceNum: row.deviceNum,
  1122. managerTelephone: "18270949468",
  1123. managerPassword: "202108",
  1124. cardName: _this13.info.username,
  1125. roomName: row.roomName
  1126. }
  1127. };
  1128. Object(api["g" /* httpPost */])(data2, _this13.$api.sendCommand).then(function (res2) {
  1129. if (res2.success) {
  1130. _this13.$message.success("重置成功");
  1131. var q = {
  1132. id: row.roomId
  1133. };
  1134. var tenant = {
  1135. q: stringify_default()(q)
  1136. };
  1137. Object(api["d" /* httpGet */])(tenant, _this13.$api.getSiteTenant).then(function (res) {
  1138. promise_default.a.all(res.data.list.map(function (element) {
  1139. return new promise_default.a(function (resolve, reject) {
  1140. resolve(element.card);
  1141. });
  1142. })).then(function (allId) {
  1143. allId.map(function (li) {
  1144. var str = [{
  1145. siteId: row.roomId,
  1146. cardId: li
  1147. }];
  1148. Object(api["g" /* httpPost */])(str, _this13.$api.unbindCard).then(function (res) {});
  1149. });
  1150. });
  1151. });
  1152. } else {
  1153. _this13.$message.error(res2.msg);
  1154. }
  1155. });
  1156. }
  1157. });
  1158. }), defineProperty_default()(_methods, "activeiconfun", function activeiconfun(t) {
  1159. this.activeiconfont = t;
  1160. }), defineProperty_default()(_methods, "getresult", function getresult() {
  1161. var data = {};
  1162. }), defineProperty_default()(_methods, "Unlockingsave", function Unlockingsave() {}), defineProperty_default()(_methods, "RemoteUnlocking", function RemoteUnlocking(index, row) {
  1163. var _this14 = this;
  1164. var str2 = {
  1165. imei: row.imei,
  1166. roomId: row.roomId,
  1167. openLockType: 2,
  1168. is: true
  1169. };
  1170. Object(api["g" /* httpPost */])(str2, this.$api.openLock).then(function (res3) {
  1171. if (res3.success) {
  1172. _this14.$message.success("开锁成功!");
  1173. _this14.Unlocking = false;
  1174. } else {
  1175. _this14.$message.error("开锁失败!");
  1176. }
  1177. });
  1178. }), defineProperty_default()(_methods, "AddAdministrator", function AddAdministrator(index, row) {
  1179. var _this15 = this;
  1180. var str = {
  1181. deviceNum: row.deviceNum,
  1182. imei: row.imei,
  1183. order: 6101
  1184. };
  1185. Object(api["g" /* httpPost */])(str, this.$api.getDeviceRegisterManager).then(function (res1) {
  1186. var str1 = {
  1187. imei: row.imei, //row.imsi,
  1188. deviceNum: row.deviceNum, //row.deviceNum,
  1189. operateMode: 7,
  1190. is: true,
  1191. order: 6207,
  1192. passwordStartTime: "20210813010101",
  1193. passwordEndTime: "20680813010101"
  1194. };
  1195. Object(api["g" /* httpPost */])(str1, _this15.$api.getDeviceOperateUserInfo).then(function (res2) {});
  1196. var str2 = {
  1197. imei: row.imei, //row.imsi,
  1198. deviceNum: row.deviceNum, //row.deviceNum,
  1199. operateMode: 4,
  1200. is: true,
  1201. order: 6204,
  1202. passwordStartTime: "20210813010101",
  1203. passwordEndTime: "20680813010101"
  1204. };
  1205. Object(api["g" /* httpPost */])(str2, _this15.$api.getDeviceOperateUserInfo).then(function (res3) {
  1206. if (res3.success) {
  1207. _this15.$message.success("初始化成功");
  1208. }
  1209. });
  1210. });
  1211. }), defineProperty_default()(_methods, "initialization", function initialization() {
  1212. var _this16 = this;
  1213. if (this.checkNodeId1 == '') {
  1214. this.$message.error("请选择房间");
  1215. } else {
  1216. if (this.form.manufacturer == 808) {
  1217. if (this.form.deviceNum == "" || this.form.imei == "" || this.form.platformId == "") {
  1218. this.$message.error("请填写完整信息");
  1219. } else {
  1220. var data = {
  1221. deviceNum: this.form.deviceNum,
  1222. imei: this.form.imei,
  1223. imsi: this.form.imei, //row.imsi,
  1224. order: 5101,
  1225. enterpriseId: this.userInfo.enterpriseId,
  1226. platformId: this.form.platformId,
  1227. manufactureId: this.form.manufacturer
  1228. };
  1229. allFun["a" /* default */].RegisterDevice(data, function (callback) {
  1230. if (callback.success) {
  1231. var data = [{
  1232. siteId: _this16.checkNodeId1,
  1233. deviceId: callback.data.id
  1234. }];
  1235. Object(api["g" /* httpPost */])(data, _this16.$api.bindDeviceSite).then(function (res) {
  1236. if (res.success) {
  1237. _this16.editVisible = false;
  1238. _this16.$message.success("绑定成功");
  1239. }
  1240. }).catch(function (error) {
  1241. _this16.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  1242. });
  1243. _this16.$message.success(callback.data.msg);
  1244. _this16.editVisible = false;
  1245. _this16.getdevice();
  1246. } else {
  1247. _this16.$message.error(callback.message);
  1248. }
  1249. });
  1250. }
  1251. }
  1252. }
  1253. }), defineProperty_default()(_methods, "onClick", function onClick(evt, treeId, treeNode) {
  1254. // 点击事件
  1255. this.treedata = treeNode;
  1256. }), defineProperty_default()(_methods, "getalllist", function getalllist() {
  1257. var _this17 = this;
  1258. var data = {};
  1259. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  1260. var array = Object(utils["n" /* uniqueArray */])(res.data, "id");
  1261. _this17.zNodes = Object(utils["p" /* ztreeToElementTree */])(array, {});
  1262. });
  1263. }), defineProperty_default()(_methods, "getdevice", function getdevice() {
  1264. var _this18 = this;
  1265. var data = {
  1266. pageNum: this.$store.state.currentPage,
  1267. pageSize: 10,
  1268. q: stringify_default()({
  1269. lockType: 8
  1270. })
  1271. };
  1272. Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
  1273. var online = 0,
  1274. unonline = 0,
  1275. devIds = "";
  1276. if (res.data.list.length > 0) {
  1277. res.data.list.map(function (li) {
  1278. var accessPlatform = _this18.accessPlatform.show.filter(function (item) {
  1279. return item.code == li.accessPlatform;
  1280. })[0];
  1281. if (accessPlatform) {
  1282. li['accessPlatformText'] = accessPlatform.desc;
  1283. } else {
  1284. li['accessPlatformText'] = '';
  1285. }
  1286. if (li.isOnline == 1) {
  1287. online++;
  1288. } else if (li.isOnline == 0) {
  1289. unonline++;
  1290. }
  1291. li.createAt = _this18.timestampToTime(li.createAt);
  1292. if (li.lastReportAt) {
  1293. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  1294. } else {
  1295. li.lastReportAt = '';
  1296. }
  1297. devIds += li.deviceNum + ",";
  1298. });
  1299. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  1300. _this18.tableData = newArr;
  1301. }
  1302. _this18.currentPage4 = 1;
  1303. _this18.pageTotal = res.data.total;
  1304. });
  1305. }), defineProperty_default()(_methods, "timestampToTime", function timestampToTime(cjsj) {
  1306. var date = new Date(cjsj); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  1307. var Y = date.getFullYear() + "-";
  1308. var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
  1309. var D = date.getDate() + " ";
  1310. var h = date.getHours() + ":";
  1311. var m = date.getMinutes() + ":";
  1312. var s = date.getSeconds();
  1313. return Y + M + D + h + m + s;
  1314. }), defineProperty_default()(_methods, "handleChange", function handleChange(value) {
  1315. console.log(value);
  1316. }), defineProperty_default()(_methods, "restSearch", function restSearch() {
  1317. this.search = {
  1318. name: "",
  1319. deviceNum: "",
  1320. roomname: '',
  1321. imei: "",
  1322. isOnline: "",
  1323. unBind: '',
  1324. startBattery: '',
  1325. endBattery: ''
  1326. };
  1327. this.checkNodeId = '';
  1328. this.searchRoom = '';
  1329. this.handleSearch();
  1330. }), defineProperty_default()(_methods, "handleSearch", function handleSearch() {
  1331. var _this19 = this;
  1332. var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
  1333. var imei = this.search.imei.replace(/\s*/g, "");
  1334. var q = {
  1335. deviceNum: deviceNum,
  1336. imei: imei,
  1337. isOnline: this.search.isOnline,
  1338. roomName: this.search.roomname,
  1339. roomIds: this.checkNodeId,
  1340. startBattery: this.search.startBattery,
  1341. endBattery: this.search.endBattery,
  1342. lockType: 8,
  1343. unBind: this.search.unBind
  1344. };
  1345. var data = {
  1346. q: stringify_default()(q),
  1347. pageNum: 1,
  1348. pageSize: this.pageSize
  1349. };
  1350. Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
  1351. if (res.data.list.length > 0) {
  1352. res.data.list.map(function (li) {
  1353. var accessPlatform = _this19.accessPlatform.show.filter(function (item) {
  1354. return item.code == li.accessPlatform;
  1355. })[0];
  1356. if (accessPlatform) {
  1357. li['accessPlatformText'] = accessPlatform.desc;
  1358. } else {
  1359. li['accessPlatformText'] = '';
  1360. }
  1361. li.createAt = _this19.timestampToTime(li.createAt);
  1362. if (li.lastReportAt) {
  1363. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  1364. } else {
  1365. li.lastReportAt = '';
  1366. }
  1367. });
  1368. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  1369. _this19.pageTotal = res.data.total;
  1370. _this19.tableData = newArr;
  1371. } else {
  1372. _this19.tableData = [];
  1373. }
  1374. _this19.currentPage4 = 1;
  1375. _this19.$store.commit("increment", 1);
  1376. });
  1377. // this.$set(this.query, "pageIndex", 1);
  1378. }), defineProperty_default()(_methods, "handleDelete", function handleDelete(index) {
  1379. var _this20 = this;
  1380. // 二次确认删除
  1381. this.$confirm("确定要删除吗?", "提示", {
  1382. type: "warning"
  1383. }).then(function () {
  1384. _this20.$message.success("删除成功");
  1385. _this20.tableData.splice(index, 1);
  1386. }).catch(function () {});
  1387. }), defineProperty_default()(_methods, "handleSelectionChange", function handleSelectionChange(val) {
  1388. this.multipleSelection = val;
  1389. }), defineProperty_default()(_methods, "delAllSelection", function delAllSelection() {
  1390. var length = this.multipleSelection.length;
  1391. var str = "";
  1392. this.delList = this.delList.concat(this.multipleSelection);
  1393. for (var i = 0; i < length; i++) {
  1394. str += this.multipleSelection[i].name + " ";
  1395. }
  1396. this.$message.error("\u5220\u9664\u4E86" + str);
  1397. this.multipleSelection = [];
  1398. }), defineProperty_default()(_methods, "deleteLock", function deleteLock(index, row) {
  1399. var _this21 = this;
  1400. this.$confirm("确定要删除吗?", "提示", {
  1401. type: "warning"
  1402. }).then(function () {
  1403. // if (row.manufactureId == 101) {
  1404. if (row.roomId) {
  1405. var data = [{
  1406. siteId: row.roomId,
  1407. deviceId: row.id
  1408. }];
  1409. Object(api["g" /* httpPost */])(data, _this21.$api.unbindDeviceSite).then(function (res) {
  1410. if (res.success) {
  1411. var data = {
  1412. device: row.deviceNum,
  1413. imei: row.imei,
  1414. order: 5102
  1415. };
  1416. allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
  1417. if (callback.success) {
  1418. _this21.getdevice();
  1419. _this21.$message.success('删除成功');
  1420. } else {
  1421. _this21.$message.error(callback.msg);
  1422. }
  1423. });
  1424. }
  1425. }).catch(function (error) {
  1426. _this21.$message.error("\u89E3\u7ED1\u5931\u8D25");
  1427. });
  1428. } else {
  1429. var data = {
  1430. deviceNum: row.deviceNum,
  1431. imei: row.imei,
  1432. order: 5102
  1433. };
  1434. console.log(data, _this21.$RegisterDevice, row.manufactureId);
  1435. allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
  1436. if (callback.success) {
  1437. _this21.getdevice();
  1438. _this21.$message.success('删除成功');
  1439. } else {
  1440. _this21.$message.error(callback.msg);
  1441. }
  1442. });
  1443. }
  1444. }).catch(function () {});
  1445. }), defineProperty_default()(_methods, "bindRoom", function bindRoom(index, row) {
  1446. this.bromm = row;
  1447. this.roomVisible = true;
  1448. this.$refs.tree.setCheckedKeys([]);
  1449. }), defineProperty_default()(_methods, "bindsave", function bindsave() {
  1450. var _this22 = this;
  1451. var treedata = this.treedata;
  1452. this.roomVisible = false;
  1453. var data = [{
  1454. siteId: treedata.id,
  1455. deviceId: this.bromm.id
  1456. }];
  1457. Object(api["g" /* httpPost */])(data, this.$api.bindDeviceSite).then(function (res) {
  1458. if (res.success) {
  1459. _this22.$message.success("绑定成功");
  1460. _this22.getdevice();
  1461. }
  1462. }).catch(function (error) {
  1463. _this22.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  1464. });
  1465. }), defineProperty_default()(_methods, "unbindsave", function unbindsave(index, row) {
  1466. var _this23 = this;
  1467. var data = [{
  1468. siteId: row.roomId,
  1469. deviceId: row.id
  1470. }];
  1471. var q = {
  1472. id: row.roomId
  1473. };
  1474. var tenant = {
  1475. q: stringify_default()(q)
  1476. };
  1477. // 二次确认解绑
  1478. this.$confirm("确定要解绑吗?", "提示", {
  1479. type: "warning"
  1480. }).then(function () {
  1481. // this.Reset(index, row)
  1482. Object(api["d" /* httpGet */])(tenant, _this23.$api.getSiteTenant).then(function (res) {
  1483. promise_default.a.all(res.data.list.map(function (element) {
  1484. return new promise_default.a(function (resolve, reject) {
  1485. resolve(element.card);
  1486. });
  1487. })).then(function (allId) {
  1488. allId.map(function (li) {
  1489. var str = [{
  1490. siteId: row.roomId,
  1491. cardId: li
  1492. }];
  1493. Object(api["g" /* httpPost */])(str, _this23.$api.unbindCard).then(function (res) {});
  1494. });
  1495. Object(api["g" /* httpPost */])(data, _this23.$api.unbindDeviceSite).then(function (res) {
  1496. if (res.success) {
  1497. _this23.$message.success("解绑成功");
  1498. _this23.getdevice();
  1499. } else {
  1500. _this23.$message.error("\u89E3\u7ED1\u5931\u8D25");
  1501. }
  1502. });
  1503. });
  1504. });
  1505. }).catch(function () {});
  1506. }), defineProperty_default()(_methods, "addequipment", function addequipment() {
  1507. this.editVisible = true;
  1508. this.form.customerCode = this.$store.state.customerCode;
  1509. }), defineProperty_default()(_methods, "handleEdit", function handleEdit(index, row) {
  1510. this.idx = index;
  1511. this.form = row;
  1512. this.editVisible = true;
  1513. }), defineProperty_default()(_methods, "saveEdit", function saveEdit() {
  1514. this.editVisible = false;
  1515. this.$message.success("\u4FEE\u6539\u7B2C " + (this.idx + 1) + " \u884C\u6210\u529F");
  1516. this.$set(this.tableData, this.idx, this.form);
  1517. }), defineProperty_default()(_methods, "handleSizeChange", function handleSizeChange(val) {
  1518. console.log("\u6BCF\u9875 " + val + " \u6761");
  1519. this.$router.replace({
  1520. path: this.$route.path,
  1521. query: {
  1522. page: this.$route.query.page ? this.$route.query.page : 1,
  1523. pageSize: val
  1524. }
  1525. });
  1526. this.pageSize = val;
  1527. this.getlistNum(0, val);
  1528. }), defineProperty_default()(_methods, "getlistNum", function getlistNum(val, size) {
  1529. var _this24 = this;
  1530. var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
  1531. var imei = this.search.imei.replace(/\s*/g, "");
  1532. var q = {
  1533. deviceNum: deviceNum,
  1534. imei: imei,
  1535. isOnline: this.search.isOnline,
  1536. roomName: this.search.roomname,
  1537. roomIds: this.checkNodeId,
  1538. startBattery: this.search.startBattery,
  1539. endBattery: this.search.endBattery,
  1540. lockType: 8,
  1541. unBind: this.search.unBind
  1542. };
  1543. var data = {
  1544. q: stringify_default()(q),
  1545. pageNum: val,
  1546. pageSize: size
  1547. };
  1548. Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
  1549. res.data.list.map(function (li) {
  1550. var accessPlatform = _this24.accessPlatform.show.filter(function (item) {
  1551. return item.code == li.accessPlatform;
  1552. })[0];
  1553. if (accessPlatform) {
  1554. li['accessPlatformText'] = accessPlatform.desc;
  1555. } else {
  1556. li['accessPlatformText'] = '';
  1557. }
  1558. li.createAt = _this24.timestampToTime(li.createAt);
  1559. if (li.lastReportAt) {
  1560. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  1561. } else {
  1562. li.lastReportAt = '';
  1563. }
  1564. });
  1565. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  1566. _this24.tableData = newArr;
  1567. _this24.pageTotal = res.data.total;
  1568. });
  1569. }), defineProperty_default()(_methods, "handlePageChange", function handlePageChange(val) {
  1570. var _this25 = this;
  1571. // this.$router.replace({
  1572. // path: this.$route.path,
  1573. // query: {
  1574. // page: this.$route.query.page ? this.$route.query.page : 1,
  1575. // pageSize: val,
  1576. // },
  1577. // });
  1578. this.pageNum = val;
  1579. this.$store.commit("increment", val);
  1580. var q = {
  1581. deviceNum: this.search.deviceNum,
  1582. imei: this.search.imei,
  1583. isOnline: this.search.isOnline,
  1584. roomName: this.search.roomname,
  1585. roomIds: this.checkNodeId,
  1586. startBattery: this.search.startBattery,
  1587. endBattery: this.search.endBattery,
  1588. lockType: 8,
  1589. unBind: this.search.unBind
  1590. };
  1591. var data = {
  1592. q: stringify_default()(q),
  1593. pageNum: val,
  1594. pageSize: this.pageSize
  1595. };
  1596. Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
  1597. res.data.list.map(function (li) {
  1598. var accessPlatform = _this25.accessPlatform.show.filter(function (item) {
  1599. return item.code == li.accessPlatform;
  1600. })[0];
  1601. if (accessPlatform) {
  1602. li['accessPlatformText'] = accessPlatform.desc;
  1603. } else {
  1604. li['accessPlatformText'] = '';
  1605. }
  1606. li.createAt = _this25.timestampToTime(li.createAt);
  1607. if (li.lastReportAt) {
  1608. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  1609. } else {
  1610. li.lastReportAt = '';
  1611. }
  1612. });
  1613. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  1614. _this25.tableData = newArr;
  1615. _this25.pageTotal = res.data.total;
  1616. });
  1617. }), defineProperty_default()(_methods, "btnClick", function btnClick() {
  1618. document.querySelector(".input-file").click();
  1619. }), defineProperty_default()(_methods, "exportData", function exportData(event) {
  1620. if (!event.currentTarget.files.length) {
  1621. return;
  1622. }
  1623. var that = this;
  1624. // 拿取文件对象
  1625. var f = event.currentTarget.files[0];
  1626. // 用FileReader来读取
  1627. var reader = new FileReader();
  1628. // 重写FileReader上的readAsBinaryString方法
  1629. FileReader.prototype.readAsBinaryString = function (f) {
  1630. var binary = "";
  1631. var wb; // 读取完成的数据
  1632. var outdata; // 你需要的数据
  1633. var reader = new FileReader();
  1634. reader.onload = function (e) {
  1635. // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节)
  1636. var bytes = new Uint8Array(reader.result);
  1637. var length = bytes.byteLength;
  1638. for (var i = 0; i < length; i++) {
  1639. binary += String.fromCharCode(bytes[i]);
  1640. }
  1641. // 接下来就是xlsx了,具体可看api
  1642. wb = xlsx_default.a.read(binary, {
  1643. type: "binary"
  1644. });
  1645. outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  1646. // 自定义方法向父组件传递数据
  1647. var arr1 = [];
  1648. outdata.map(function (li, index) {
  1649. var str = {};
  1650. str.deviceNum = li["设备号"];
  1651. str.imei = li["imei"];
  1652. str.ID = li["序号"];
  1653. arr1.push(str);
  1654. });
  1655. // this.tableData=arr
  1656. that.userlist1statu = false;
  1657. that.$nextTick(function () {
  1658. that.userlist2 = arr1;
  1659. that.userlist1statu = true;
  1660. });
  1661. };
  1662. reader.readAsArrayBuffer(f);
  1663. };
  1664. reader.readAsBinaryString(f);
  1665. }), _methods)
  1666. });
  1667. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-75a8a19a","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/device/manholeCoverDevice.vue
  1668. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":24}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('el-row',[_c('el-col',{attrs:{"span":6}},[_c('div',{staticClass:"grid-content grid-con-1"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("xXHN"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v("井盖总数")]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(_vm.sumpageTotal))])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("sFbI"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v("在线状态")]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(_vm.online))])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("BpHi"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v("离线状态")]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(_vm.unonline))])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("sNnU"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v("异常状态")]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(_vm.abnormal))])])])])])],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-cascader',{attrs:{"options":_vm.options,"size":"small","props":{ checkStrictly: true },"placeholder":"请选择房源","clearable":""},on:{"change":_vm.checkNode},model:{value:(_vm.searchRoom),callback:function ($$v) {_vm.searchRoom=$$v},expression:"searchRoom"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"房间名称","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.roomname),callback:function ($$v) {_vm.$set(_vm.search, "roomname", $$v)},expression:"search.roomname"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"序列号","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.deviceNum),callback:function ($$v) {_vm.$set(_vm.search, "deviceNum", $$v)},expression:"search.deviceNum"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"IMEI","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.imei),callback:function ($$v) {_vm.$set(_vm.search, "imei", $$v)},expression:"search.imei"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","placeholder":"状态","clearable":""},model:{value:(_vm.search.isOnline),callback:function ($$v) {_vm.$set(_vm.search, "isOnline", $$v)},expression:"search.isOnline"}},[_c('el-option',{key:"1",attrs:{"label":"离线","value":"0"}}),_vm._v(" "),_c('el-option',{key:"2",attrs:{"label":"在线","value":"1"}}),_vm._v(" "),_c('el-option',{key:"3",attrs:{"label":"异常","value":"2"}})],1),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","placeholder":"绑定状态","clearable":true},model:{value:(_vm.search.unBind),callback:function ($$v) {_vm.$set(_vm.search, "unBind", $$v)},expression:"search.unBind"}},[_c('el-option',{key:"0",attrs:{"label":"已绑定","value":"0"}}),_vm._v(" "),_c('el-option',{key:"1",attrs:{"label":"未绑定","value":"1"}})],1),_vm._v(" "),_c('div',{staticClass:"quantity"},[_vm._v("\n
  1669. ? 'success'
  1670. : scope.row.isOnline == '0'
  1671. ? 'danger'
  1672. : ''}},[(scope.row.isOnline == 1)?_c('span',[_vm._v("在线")]):_c('span',[_vm._v("离线")])])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"绑定房间","width":"200"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.roomName)?_c('span',{staticClass:"blue"},[_vm._v(_vm._s(scope.row.roomName))]):_c('span',{},[_vm._v("空")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"firmwareVersion","label":"版本","width":"160"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"createAt","label":"创建时间","width":"160"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"400","align":"center","fixed":"right"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.roomId)?_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.unbindsave(scope.$index, scope.row)}}},[_vm._v("解绑房间\n ")]):_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.bindRoom(scope.$index, scope.row)}}},[_vm._v("绑定房间")]),_vm._v(" "),_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.detailsFun(scope.$index, scope.row)}}},[_vm._v("设备详情")])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"current-page":_vm.$store.state.currentPage,"page-sizes":[10,20,100],"page-size":_vm.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.pageTotal},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handlePageChange}})],1)],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"绑定房间","visible":_vm.roomVisible,"width":"30%"},on:{"update:visible":function($event){_vm.roomVisible=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.roomVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.bindsave}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('div',{staticClass:"ztree"},[_c('el-tree',{ref:"tree",attrs:{"data":_vm.zNodes,"show-checkbox":"","node-key":"id","props":_vm.defaultProps},on:{"check-change":_vm.handleCheckChange}})],1)]),_vm._v(" "),_c('el-dialog',{attrs:{"title":"远程开锁密码","visible":_vm.Unlocking,"width":"30%"},on:{"update:visible":function($event){_vm.Unlocking=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.Unlocking = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.Unlockingsave}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('div',[_c('el-form',{ref:"locking",attrs:{"model":_vm.lockingform,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"管理员密码"}},[_c('el-input',{attrs:{"show-password":"","clearable":true},model:{value:(_vm.lockingform.password),callback:function ($$v) {_vm.$set(_vm.lockingform, "password", $$v)},expression:"lockingform.password"}})],1)],1)],1)]),_vm._v(" "),_c('el-dialog',{attrs:{"title":"编辑","visible":_vm.editVisible,"width":"30%"},on:{"update:visible":function($event){_vm.editVisible=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.editVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.initialization}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"型号"}},[_c('el-select',{attrs:{"placeholder":"请选择"},model:{value:(_vm.form.manufacturer),callback:function ($$v) {_vm.$set(_vm.form, "manufacturer", $$v)},expression:"form.manufacturer"}},_vm._l((_vm.manufacturerList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1),_vm._v(" "),(_vm.form.manufacturer==808)?_c('div',[_c('el-form-item',{att
  1673. var staticRenderFns = []
  1674. var esExports = { render: render, staticRenderFns: staticRenderFns }
  1675. /* harmony default export */ var device_manholeCoverDevice = (esExports);
  1676. // CONCATENATED MODULE: ./src/views/device/manholeCoverDevice.vue
  1677. function injectStyle (ssrContext) {
  1678. __webpack_require__("Qkmj")
  1679. }
  1680. var normalizeComponent = __webpack_require__("VU/8")
  1681. /* script */
  1682. /* template */
  1683. /* template functional */
  1684. var __vue_template_functional__ = false
  1685. /* styles */
  1686. var __vue_styles__ = injectStyle
  1687. /* scopeId */
  1688. var __vue_scopeId__ = "data-v-75a8a19a"
  1689. /* moduleIdentifier (server only) */
  1690. var __vue_module_identifier__ = null
  1691. var Component = normalizeComponent(
  1692. manholeCoverDevice,
  1693. device_manholeCoverDevice,
  1694. __vue_template_functional__,
  1695. __vue_styles__,
  1696. __vue_scopeId__,
  1697. __vue_module_identifier__
  1698. )
  1699. /* harmony default export */ var views_device_manholeCoverDevice = __webpack_exports__["default"] = (Component.exports);
  1700. /***/ }),
  1701. /***/ "wmJC":
  1702. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1703. "use strict";
  1704. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  1705. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  1706. var stringify = __webpack_require__("mvHQ");
  1707. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  1708. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  1709. var api = __webpack_require__("gyMJ");
  1710. // EXTERNAL MODULE: ./src/utils/index.js
  1711. var utils = __webpack_require__("0xDb");
  1712. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/log/manholeCoverLog.vue
  1713. //
  1714. //
  1715. //
  1716. //
  1717. //
  1718. //
  1719. //
  1720. //
  1721. //
  1722. //
  1723. //
  1724. //
  1725. //
  1726. //
  1727. //
  1728. //
  1729. //
  1730. //
  1731. //
  1732. //
  1733. //
  1734. //
  1735. //
  1736. //
  1737. //
  1738. //
  1739. //
  1740. //
  1741. //
  1742. //
  1743. //
  1744. //
  1745. /* harmony default export */ var manholeCoverLog = ({
  1746. name: "warningLog",
  1747. data: function data() {
  1748. return {
  1749. query: {
  1750. operType: "",
  1751. operateName: "",
  1752. operModul: ""
  1753. },
  1754. query1: {
  1755. operType: "",
  1756. operateName: "",
  1757. operModul: ""
  1758. },
  1759. activeName: "first",
  1760. tableData: [],
  1761. tableData1: [],
  1762. multipleSelection: [],
  1763. delList: [],
  1764. editVisible: false,
  1765. pageTotal: 0,
  1766. pageTotal1: 0,
  1767. form: {},
  1768. idx: -1,
  1769. id: -1,
  1770. AboutDevice: [],
  1771. userInfo: {
  1772. type: ''
  1773. },
  1774. alertTypeList: []
  1775. };
  1776. },
  1777. props: ['deviceNum'],
  1778. beforeCreate: function beforeCreate() {},
  1779. created: function created() {
  1780. this.alertTypeList = this.$MANUFACTURER.alertType.manholeCoverLog;
  1781. this.userInfo = JSON.parse(localStorage.getItem('info'));
  1782. this.getAboutDevice();
  1783. },
  1784. mounted: function mounted() {},
  1785. methods: {
  1786. selectTenantId: function selectTenantId(e) {
  1787. localStorage.setItem('tenantId', e);
  1788. this.reload();
  1789. },
  1790. restFun: function restFun() {
  1791. var _this = this;
  1792. this.query = {
  1793. operType: "",
  1794. operateName: "",
  1795. operModul: ""
  1796. };
  1797. var q = {};
  1798. if (this.deviceNum != '') {
  1799. q = {
  1800. alertType: this.query.alertType,
  1801. deviceNum: this.deviceNum,
  1802. deviceType: 8
  1803. };
  1804. } else {
  1805. q = {
  1806. alertType: this.query.alertType,
  1807. deviceNum: this.query.deviceName,
  1808. deviceType: 8
  1809. };
  1810. }
  1811. var data = {
  1812. pageNum: 1,
  1813. pageSize: 10,
  1814. q: this.searchParaProcess(q),
  1815. orderBy: "alert_time desc"
  1816. };
  1817. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  1818. var AboutDevice = _this.AboutDevice;
  1819. res.data.list.map(function (li) {
  1820. li.createAt = _this.time(+new Date(li.createAt));
  1821. li.alertTime = _this.time(+new Date(li.alertTime * 1000));
  1822. var resultArr = AboutDevice.filter(function (_item) {
  1823. return _item.deviceNum == li.deviceNum;
  1824. })[0];
  1825. if (resultArr) {
  1826. li.roomId = resultArr.id;
  1827. li.roomName = resultArr.roomName;
  1828. }
  1829. li['alertTypeDesc'] = '';
  1830. var alertTypeDesc = _this.alertTypeList.filter(function (item) {
  1831. return item.code == li.alertType;
  1832. })[0];
  1833. if (alertTypeDesc) {
  1834. li['alertTypeDesc'] = alertTypeDesc.desc;
  1835. }
  1836. });
  1837. _this.$store.commit('increment', 1);
  1838. _this.tableData = res.data.list;
  1839. _this.pageTotal = res.data.total;
  1840. });
  1841. },
  1842. // 查询和房间相关的设备
  1843. getAboutDevice: function getAboutDevice() {
  1844. var _this2 = this;
  1845. var data = {
  1846. pageNum: 0,
  1847. pageSize: 0,
  1848. q: stringify_default()({
  1849. lockType: 8
  1850. })
  1851. };
  1852. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  1853. _this2.AboutDevice = res.data.list;
  1854. _this2.getOperates();
  1855. });
  1856. },
  1857. time: function time() {
  1858. var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date();
  1859. var date = new Date(time + 8 * 3600 * 1000); // 增加8小时
  1860. return date.toJSON().substr(0, 19).replace("T", " ");
  1861. },
  1862. // 获取操作日志
  1863. getOperates: function getOperates() {
  1864. var _this3 = this;
  1865. var q = {};
  1866. if (this.deviceNum != '') {
  1867. q = {
  1868. deviceNum: this.deviceNum,
  1869. deviceType: 8
  1870. };
  1871. } else {
  1872. q = {
  1873. deviceNum: this.query.deviceName,
  1874. deviceType: 8
  1875. };
  1876. }
  1877. var data = {
  1878. pageNum: 1,
  1879. pageSize: 10,
  1880. orderBy: "alert_time desc",
  1881. q: stringify_default()(q)
  1882. // orderType:"desc"
  1883. };
  1884. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  1885. var AboutDevice = _this3.AboutDevice;
  1886. res.data.list.map(function (li) {
  1887. li.createAt = _this3.time(+new Date(li.createAt));
  1888. li.alertTime = _this3.time(+new Date(li.alertTime * 1000));
  1889. var resultArr = AboutDevice.filter(function (_item) {
  1890. return _item.deviceNum == li.deviceNum;
  1891. })[0];
  1892. if (resultArr) {
  1893. li.roomId = resultArr.id;
  1894. li.roomName = resultArr.roomName;
  1895. }
  1896. li['alertTypeDesc'] = '';
  1897. var alertTypeDesc = _this3.alertTypeList.filter(function (item) {
  1898. return item.code == li.alertType;
  1899. })[0];
  1900. if (alertTypeDesc) {
  1901. li['alertTypeDesc'] = alertTypeDesc.desc;
  1902. }
  1903. });
  1904. _this3.tableData = res.data.list;
  1905. _this3.pageTotal = res.data.total;
  1906. });
  1907. },
  1908. //门锁报警同步刷新
  1909. getlockAlert: function getlockAlert() {
  1910. Object(api["d" /* httpGet */])("", this.$api.getLockAlert1).then(function (res) {});
  1911. },
  1912. searchParaProcess: function searchParaProcess(obj) {
  1913. var myObj;
  1914. if (obj.alertType == "" || obj.alertType == "0") {
  1915. if (obj.deviceNum == "") {
  1916. myObj = {
  1917. deviceType: obj.deviceType
  1918. };
  1919. } else {
  1920. myObj = {
  1921. deviceNum: obj.deviceNum,
  1922. deviceType: obj.deviceType
  1923. };
  1924. }
  1925. } else {
  1926. if (obj.deviceNum == "") {
  1927. myObj = {
  1928. alertType: obj.alertType,
  1929. deviceType: obj.deviceType
  1930. };
  1931. } else {
  1932. myObj = {
  1933. alertType: obj.alertType,
  1934. deviceNum: obj.deviceNum,
  1935. deviceType: obj.deviceType
  1936. };
  1937. }
  1938. }
  1939. return stringify_default()(myObj);
  1940. },
  1941. // 触发搜索按钮
  1942. handleSearch: function handleSearch() {
  1943. var _this4 = this;
  1944. this.getlockAlert();
  1945. var q = {};
  1946. if (this.deviceNum != '') {
  1947. q = {
  1948. alertType: this.query.alertType,
  1949. deviceNum: this.deviceNum,
  1950. deviceType: 8
  1951. };
  1952. } else {
  1953. q = {
  1954. alertType: this.query.alertType,
  1955. deviceNum: this.query.deviceName,
  1956. deviceType: 8
  1957. };
  1958. }
  1959. var data = {
  1960. pageNum: 1,
  1961. pageSize: 10,
  1962. q: this.searchParaProcess(q),
  1963. orderBy: "alert_time desc"
  1964. };
  1965. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  1966. var AboutDevice = _this4.AboutDevice;
  1967. res.data.list.map(function (li) {
  1968. li.createAt = _this4.time(+new Date(li.createAt));
  1969. li.alertTime = _this4.time(+new Date(li.alertTime * 1000));
  1970. var resultArr = AboutDevice.filter(function (_item) {
  1971. return _item.deviceNum == li.deviceNum;
  1972. })[0];
  1973. if (resultArr) {
  1974. li.roomId = resultArr.id;
  1975. li.roomName = resultArr.roomName;
  1976. }
  1977. li['alertTypeDesc'] = '';
  1978. var alertTypeDesc = _this4.alertTypeList.filter(function (item) {
  1979. return item.code == li.alertType;
  1980. })[0];
  1981. if (alertTypeDesc) {
  1982. li['alertTypeDesc'] = alertTypeDesc.desc;
  1983. }
  1984. });
  1985. _this4.$store.commit('increment', 1);
  1986. _this4.tableData = res.data.list;
  1987. _this4.pageTotal = res.data.total;
  1988. });
  1989. // this.$set(this.query, "pageIndex", 1);
  1990. },
  1991. // 分页导航
  1992. handlePageChange: function handlePageChange(val) {
  1993. var _this5 = this;
  1994. this.$store.commit('increment', val);
  1995. var q = {};
  1996. if (this.deviceNum != '') {
  1997. q = {
  1998. alertType: this.query.alertType,
  1999. deviceNum: this.deviceNum,
  2000. deviceType: 8
  2001. };
  2002. } else {
  2003. q = {
  2004. alertType: this.query.alertType,
  2005. deviceNum: this.query.deviceName,
  2006. deviceType: 8
  2007. };
  2008. }
  2009. var data = {
  2010. pageNum: val,
  2011. pageSize: 10,
  2012. q: this.searchParaProcess(q),
  2013. orderBy: "alert_time desc"
  2014. };
  2015. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  2016. var AboutDevice = _this5.AboutDevice;
  2017. res.data.list.map(function (li) {
  2018. li.createAt = _this5.time(+new Date(li.createAt));
  2019. li.alertTime = _this5.time(+new Date(li.alertTime * 1000));
  2020. var resultArr = AboutDevice.filter(function (_item) {
  2021. return _item.deviceNum == li.deviceNum;
  2022. })[0];
  2023. if (resultArr) {
  2024. li.roomId = resultArr.id;
  2025. li.roomName = resultArr.roomName;
  2026. }
  2027. li['alertTypeDesc'] = '';
  2028. var alertTypeDesc = _this5.alertTypeList.filter(function (item) {
  2029. return item.code == li.alertType;
  2030. })[0];
  2031. if (alertTypeDesc) {
  2032. li['alertTypeDesc'] = alertTypeDesc.desc;
  2033. }
  2034. });
  2035. _this5.tableData = res.data.list;
  2036. _this5.pageTotal = res.data.total;
  2037. });
  2038. }
  2039. }
  2040. });
  2041. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-2cad84e8","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/log/manholeCoverLog.vue
  2042. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10",attrs:{"size":"small","placeholder":"设备号","clearable":true},model:{value:(_vm.query.deviceName),callback:function ($$v) {_vm.$set(_vm.query, "deviceName", $$v)},expression:"query.deviceName"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","clearable":true,"placeholder":"报警类型"},model:{value:(_vm.query.alertType),callback:function ($$v) {_vm.$set(_vm.query, "alertType", $$v)},expression:"query.alertType"}},_vm._l((_vm.alertTypeList),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.restFun}},[_vm._v("重置")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header"}},[_c('el-table-column',{attrs:{"prop":"id","label":"ID"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"roomName","label":"房间名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"alertTime","label":"报警时间"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"报警类型"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.alertTypeDesc))])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, prev, pager, next","current-page":_vm.$store.state.currentPage,"page-size":10,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1)],1)])}
  2043. var staticRenderFns = []
  2044. var esExports = { render: render, staticRenderFns: staticRenderFns }
  2045. /* harmony default export */ var log_manholeCoverLog = (esExports);
  2046. // CONCATENATED MODULE: ./src/views/log/manholeCoverLog.vue
  2047. function injectStyle (ssrContext) {
  2048. __webpack_require__("yN4I")
  2049. }
  2050. var normalizeComponent = __webpack_require__("VU/8")
  2051. /* script */
  2052. /* template */
  2053. /* template functional */
  2054. var __vue_template_functional__ = false
  2055. /* styles */
  2056. var __vue_styles__ = injectStyle
  2057. /* scopeId */
  2058. var __vue_scopeId__ = "data-v-2cad84e8"
  2059. /* moduleIdentifier (server only) */
  2060. var __vue_module_identifier__ = null
  2061. var Component = normalizeComponent(
  2062. manholeCoverLog,
  2063. log_manholeCoverLog,
  2064. __vue_template_functional__,
  2065. __vue_styles__,
  2066. __vue_scopeId__,
  2067. __vue_module_identifier__
  2068. )
  2069. /* harmony default export */ var views_log_manholeCoverLog = __webpack_exports__["default"] = (Component.exports);
  2070. /***/ }),
  2071. /***/ "yN4I":
  2072. /***/ (function(module, exports) {
  2073. // removed by extract-text-webpack-plugin
  2074. /***/ })
  2075. });