完成签约之后直接添加人员,录入下发凭证
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.

2199 lines
80 KiB

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