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

2218 lines
80 KiB

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