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

3692 lines
138 KiB

  1. webpackJsonp([29],{
  2. /***/ "KDEK":
  3. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4. "use strict";
  5. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  6. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
  7. var helpers_typeof = __webpack_require__("pFYg");
  8. var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
  9. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/promise.js
  10. var promise = __webpack_require__("//Fk");
  11. var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
  12. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  13. var stringify = __webpack_require__("mvHQ");
  14. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  15. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  16. var api = __webpack_require__("gyMJ");
  17. // EXTERNAL MODULE: ./src/components/zTree1.vue + 2 modules
  18. var zTree1 = __webpack_require__("6Ljo");
  19. // EXTERNAL MODULE: ./src/components/deviceLi.vue + 2 modules
  20. var deviceLi = __webpack_require__("4qFG");
  21. // EXTERNAL MODULE: ./src/components/UnlockRecord.vue + 2 modules
  22. var UnlockRecord = __webpack_require__("YBqH");
  23. // EXTERNAL MODULE: ./src/components/DeviceFeedbackLog.vue + 2 modules
  24. var DeviceFeedbackLog = __webpack_require__("5skf");
  25. // EXTERNAL MODULE: ./src/components/warningLog.vue + 2 modules
  26. var warningLog = __webpack_require__("+K0N");
  27. // EXTERNAL MODULE: ./src/components/voucherCom.vue + 2 modules
  28. var voucherCom = __webpack_require__("JoDB");
  29. // EXTERNAL MODULE: ./src/utils/index.js
  30. var utils = __webpack_require__("0xDb");
  31. // EXTERNAL MODULE: ./node_modules/xlsx/xlsx.js
  32. var xlsx = __webpack_require__("uXZL");
  33. var xlsx_default = /*#__PURE__*/__webpack_require__.n(xlsx);
  34. // EXTERNAL MODULE: ./src/utils/util.js
  35. var util = __webpack_require__("oFuF");
  36. // EXTERNAL MODULE: ./src/utils/equipment.js
  37. var equipment = __webpack_require__("ObZk");
  38. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  39. var moment = __webpack_require__("PJh5");
  40. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  41. // EXTERNAL MODULE: ./src/api/allFun.js
  42. var allFun = __webpack_require__("mprh");
  43. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorLock.vue
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //
  81. //
  82. //
  83. //
  84. //
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. //
  154. //
  155. //
  156. //
  157. //
  158. //
  159. //
  160. //
  161. //
  162. //
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. //
  179. //
  180. //
  181. //
  182. //
  183. //
  184. //
  185. //
  186. //
  187. //
  188. //
  189. //
  190. //
  191. //
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. //
  199. //
  200. //
  201. //
  202. //
  203. //
  204. //
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. //
  221. //
  222. //
  223. //
  224. //
  225. //
  226. //
  227. //
  228. //
  229. //
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. //
  244. //
  245. //
  246. //
  247. //
  248. //
  249. //
  250. //
  251. //
  252. //
  253. //
  254. //
  255. //
  256. //
  257. //
  258. //
  259. //
  260. //
  261. //
  262. //
  263. //
  264. //
  265. //
  266. //
  267. //
  268. //
  269. //
  270. //
  271. //
  272. //
  273. //
  274. //
  275. //
  276. //
  277. //
  278. //
  279. //
  280. //
  281. //
  282. //
  283. //
  284. //
  285. //
  286. //
  287. //
  288. //
  289. //
  290. //
  291. //
  292. //
  293. //
  294. //
  295. //
  296. //
  297. //
  298. //
  299. //
  300. //
  301. //
  302. //
  303. //
  304. //
  305. //
  306. //
  307. //
  308. //
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. //
  359. //
  360. //
  361. //
  362. //
  363. //
  364. //
  365. //
  366. //
  367. //
  368. //
  369. //
  370. //
  371. //
  372. //
  373. //
  374. //
  375. //
  376. //
  377. //
  378. //
  379. //
  380. //
  381. //
  382. //
  383. //
  384. //
  385. //
  386. //
  387. //
  388. //
  389. //
  390. //
  391. //
  392. //
  393. //
  394. //
  395. //
  396. //
  397. //
  398. //
  399. //
  400. //
  401. //
  402. //
  403. //
  404. //
  405. //
  406. //
  407. //
  408. //
  409. //
  410. //
  411. //
  412. //
  413. //
  414. //
  415. //
  416. //
  417. //
  418. //
  419. //
  420. //
  421. //
  422. //
  423. //
  424. //
  425. //
  426. //
  427. //
  428. //
  429. //
  430. //
  431. //
  432. //
  433. //
  434. //
  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. var nowDate = new Date();
  681. var currentTime = nowDate;
  682. var endcurrentTime = Object(utils["g" /* getcurrentTime1 */])(1);
  683. /* harmony default export */ var doorLock = ({
  684. inject: ['reload'],
  685. name: "doorLock",
  686. data: function data() {
  687. return {
  688. normallyOpenRecordList: [],
  689. normallyTotal: 0,
  690. normallyPageNum: 1,
  691. normallyPageSzie: 20,
  692. optionsTime: [{
  693. value: 1,
  694. label: '1:00'
  695. }, {
  696. value: 2,
  697. label: '2:00'
  698. }, {
  699. value: 3,
  700. label: '3:00'
  701. }, {
  702. value: 4,
  703. label: '4:00'
  704. }, {
  705. value: 5,
  706. label: '5:00'
  707. }, {
  708. value: 6,
  709. label: '6:00'
  710. }, {
  711. value: 7,
  712. label: '7:00'
  713. }, {
  714. value: 8,
  715. label: '8:00'
  716. }, {
  717. value: 9,
  718. label: '9:00'
  719. }, {
  720. value: 10,
  721. label: '10:00'
  722. }, {
  723. value: 11,
  724. label: '11:00'
  725. }, {
  726. value: 12,
  727. label: '12:00'
  728. }, {
  729. value: 13,
  730. label: '13:00'
  731. }, {
  732. value: 14,
  733. label: '14:00'
  734. }, {
  735. value: 15,
  736. label: '15:00'
  737. }, {
  738. value: 16,
  739. label: '16:00'
  740. }, {
  741. value: 17,
  742. label: '17:00'
  743. }, {
  744. value: 18,
  745. label: '18:00'
  746. }, {
  747. value: 19,
  748. label: '19:00'
  749. }, {
  750. value: 20,
  751. label: '20:00'
  752. }, {
  753. value: 21,
  754. label: '21:00'
  755. }, {
  756. value: 22,
  757. label: '22:00'
  758. }, {
  759. value: 23,
  760. label: '23:00'
  761. }, {
  762. value: 24,
  763. label: '24:00'
  764. }],
  765. setopenStatus: false,
  766. opendTime: [currentTime, endcurrentTime],
  767. startHour: 1,
  768. endHour: 24,
  769. synchroLockNumber: "",
  770. contentSearchShow: false,
  771. myLine_option_one: {
  772. title: {
  773. text: "信号曲线",
  774. x: "0",
  775. y: "20",
  776. color: "#333"
  777. },
  778. tooltip: {
  779. trigger: "axis"
  780. },
  781. legend: {
  782. orient: "horizontal",
  783. x: "right",
  784. y: "top",
  785. data: ["门锁近期信号曲线"]
  786. },
  787. dataZoom: [{
  788. type: 'inside', //内置滑动,随鼠标滚轮展示
  789. xAxisIndex: [0],
  790. start: 0, //初始化时,滑动条宽度开始标度
  791. end: 100 //初始化时,滑动条宽度结束标度
  792. }],
  793. grid: {
  794. top: "16%",
  795. left: "0%",
  796. right: "0%",
  797. bottom: "0%",
  798. containLabel: true
  799. },
  800. xAxis: {
  801. name: "时间",
  802. type: "category",
  803. data: []
  804. },
  805. yAxis: {},
  806. series: [{
  807. name: "门锁信号",
  808. type: "line",
  809. smooth: true,
  810. data: [],
  811. itemStyle: {
  812. normal: {
  813. color: "#FFAE00",
  814. lineStyle: {
  815. color: "#397FFF"
  816. }
  817. }
  818. },
  819. areaStyle: {
  820. normal: {
  821. color: {
  822. type: "linear", //设置线性渐变
  823. x: 0,
  824. y: 0,
  825. x2: 0,
  826. y2: 1,
  827. colorStops: [{
  828. offset: 0,
  829. color: "rgba(57,127,255,.1)" // 0% 处的颜色
  830. }, {
  831. offset: 1,
  832. color: "#fff" // 100% 处的颜色
  833. }],
  834. globalCoord: false // 缺省为 false
  835. }
  836. }
  837. }
  838. }]
  839. },
  840. myLine_option_three: {
  841. title: {
  842. text: "信号曲线",
  843. x: "0",
  844. y: "20",
  845. color: "#333"
  846. },
  847. tooltip: {
  848. trigger: "axis"
  849. },
  850. legend: {
  851. orient: "horizontal",
  852. x: "right",
  853. y: "top",
  854. data: ["门锁近期信号曲线"]
  855. },
  856. dataZoom: [{
  857. type: 'inside', //内置滑动,随鼠标滚轮展示
  858. xAxisIndex: [0],
  859. start: 0, //初始化时,滑动条宽度开始标度
  860. end: 100 //初始化时,滑动条宽度结束标度
  861. }],
  862. grid: {
  863. top: "16%",
  864. left: "0%",
  865. right: "0%",
  866. bottom: "0%",
  867. containLabel: true
  868. },
  869. xAxis: {
  870. name: "时间",
  871. type: "category",
  872. data: []
  873. },
  874. yAxis: {},
  875. series: [{
  876. name: "门锁信号",
  877. type: "line",
  878. smooth: true,
  879. data: [],
  880. itemStyle: {
  881. normal: {
  882. color: "#FFAE00",
  883. lineStyle: {
  884. color: "#397FFF"
  885. }
  886. }
  887. },
  888. areaStyle: {
  889. normal: {
  890. color: {
  891. type: "linear", //设置线性渐变
  892. x: 0,
  893. y: 0,
  894. x2: 0,
  895. y2: 1,
  896. colorStops: [{
  897. offset: 0,
  898. color: "rgba(57,127,255,.1)" // 0% 处的颜色
  899. }, {
  900. offset: 1,
  901. color: "#fff" // 100% 处的颜色
  902. }],
  903. globalCoord: false // 缺省为 false
  904. }
  905. }
  906. }
  907. }]
  908. },
  909. myLine_option: {
  910. title: {
  911. text: "电量曲线",
  912. x: "0",
  913. y: "20"
  914. },
  915. tooltip: {
  916. trigger: "axis"
  917. },
  918. legend: {
  919. orient: "horizontal",
  920. x: "right",
  921. y: "top",
  922. data: ["门锁近期电量曲线"]
  923. },
  924. dataZoom: [{
  925. type: 'inside', //内置滑动,随鼠标滚轮展示
  926. xAxisIndex: [0],
  927. start: 0, //初始化时,滑动条宽度开始标度
  928. end: 100 //初始化时,滑动条宽度结束标度
  929. }],
  930. grid: {
  931. top: "16%",
  932. left: "0%",
  933. right: "0%",
  934. bottom: "0%",
  935. containLabel: true
  936. },
  937. xAxis: {
  938. name: "时间",
  939. type: "category",
  940. data: []
  941. },
  942. yAxis: {},
  943. series: [{
  944. name: "门锁电量",
  945. type: "line",
  946. smooth: true,
  947. data: [],
  948. itemStyle: {
  949. normal: {
  950. color: "#FFAE00",
  951. lineStyle: {
  952. color: "#397FFF"
  953. }
  954. }
  955. },
  956. areaStyle: {
  957. /*normal: { origin: 'start', color: 'rgba(57,127,255,.1)', opacity: 1 },*/
  958. normal: {
  959. color: {
  960. type: "linear", //设置线性渐变
  961. x: 0,
  962. y: 0,
  963. x2: 0,
  964. y2: 1,
  965. colorStops: [{
  966. offset: 0,
  967. color: "rgba(57,127,255,.1)" // 0% 处的颜色
  968. }, {
  969. offset: 1,
  970. color: "#fff" // 100% 处的颜色
  971. }],
  972. globalCoord: false // 缺省为 false
  973. }
  974. }
  975. }
  976. }]
  977. },
  978. pickerOptions: {
  979. shortcuts: [{
  980. text: '今天',
  981. onClick: function onClick(picker) {
  982. var end = new Date();
  983. picker.$emit('pick', [moment_default()().startOf('day').format("YYYY-MM-DD 00:00:00"), end]);
  984. }
  985. }, {
  986. text: '最近一周',
  987. onClick: function onClick(picker) {
  988. var end = new Date();
  989. var start = new Date();
  990. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  991. picker.$emit('pick', [start, end]);
  992. }
  993. }, {
  994. text: '本月',
  995. onClick: function onClick(picker) {
  996. var end = new Date();
  997. picker.$emit('pick', [moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), end]);
  998. }
  999. }, {
  1000. text: '今年至今',
  1001. onClick: function onClick(picker) {
  1002. var end = new Date();
  1003. var start = new Date(new Date().getFullYear(), 0);
  1004. picker.$emit('pick', [start, end]);
  1005. }
  1006. }, {
  1007. text: '最近六个月',
  1008. onClick: function onClick(picker) {
  1009. var end = new Date();
  1010. var start = new Date();
  1011. start.setMonth(start.getMonth() - 6);
  1012. picker.$emit('pick', [start, end]);
  1013. }
  1014. }]
  1015. },
  1016. dateTime: [moment_default()().subtract(3, 'months').format("YYYY-MM-DD 00:00:00"), moment_default()().format("YYYY-MM-DD HH:mm:ss")],
  1017. dateTimeOne: [moment_default()().subtract(3, 'months').format("YYYY-MM-DD 00:00:00"), moment_default()().format("YYYY-MM-DD HH:mm:ss")],
  1018. endDate: moment_default()().format("YYYY-MM-DD HH:mm:ss"),
  1019. startDate: moment_default()().subtract(3, 'months').format("YYYY-MM-DD 00:00:00"),
  1020. endDateOne: moment_default()().format("YYYY-MM-DD HH:mm:ss"),
  1021. startDateOne: moment_default()().subtract(3, 'months').format("YYYY-MM-DD 00:00:00"),
  1022. searchRoom: '',
  1023. deviceImg: __webpack_require__("Dvxw"),
  1024. selectoption: [],
  1025. selectoptionValue: '',
  1026. senddeviceNum: '',
  1027. sendDevice: {
  1028. deviceNum: ''
  1029. },
  1030. sendroomId: '',
  1031. commpontentStatus: true,
  1032. Emergence: {
  1033. EmerPhone: '',
  1034. password: '',
  1035. device: '',
  1036. name: ''
  1037. },
  1038. defaultProps: {
  1039. children: "children",
  1040. label: "name"
  1041. },
  1042. options: [],
  1043. drawer: false,
  1044. value1: false,
  1045. value2: 0,
  1046. marks: {
  1047. 0: "关",
  1048. 50: "中",
  1049. 100: "高"
  1050. },
  1051. switchtext: "关",
  1052. activeName: "0",
  1053. formInline: {},
  1054. platlist: [{
  1055. label: "电信",
  1056. value: 1
  1057. }, {
  1058. label: "移动",
  1059. value: 2
  1060. }, {
  1061. label: "联通",
  1062. value: 3
  1063. }],
  1064. manufacturerList: [],
  1065. setting: {
  1066. edit: {
  1067. enable: true,
  1068. drag: {
  1069. isMove: true
  1070. },
  1071. showRemoveBtn: false,
  1072. showRenameBtn: false
  1073. },
  1074. check: {
  1075. enable: false
  1076. },
  1077. data: {
  1078. simpleData: {
  1079. enable: true,
  1080. pIdKey: "pid"
  1081. }
  1082. },
  1083. view: {
  1084. showIcon: true,
  1085. addHoverDom: this.addHoverDom,
  1086. removeHoverDom: this.removeHoverDom
  1087. }
  1088. },
  1089. zNodes: [],
  1090. bromm: {},
  1091. query: {
  1092. address: "",
  1093. name: "",
  1094. pageIndex: 1,
  1095. pageSize: 20,
  1096. options: []
  1097. },
  1098. search: {
  1099. name: "",
  1100. deviceNum: "",
  1101. roomname: '',
  1102. imei: "",
  1103. isOnline: "",
  1104. startBattery: '',
  1105. endBattery: '',
  1106. firmwareVersion: '',
  1107. operationStatus: '',
  1108. isUsed: '',
  1109. iccid: '',
  1110. rssiStart: '',
  1111. rssiEnd: '',
  1112. createStart: '',
  1113. createEnd: '',
  1114. isAppBind: ''
  1115. },
  1116. tableData: [],
  1117. multipleSelection: [],
  1118. delList: [],
  1119. editVisible: false,
  1120. roomVisible: false,
  1121. pageTotal: 0,
  1122. sumpageTotal: 0,
  1123. currentPage4: 1,
  1124. form: {
  1125. lockerId: '',
  1126. manufacturer: "",
  1127. platformId: '',
  1128. imei: '',
  1129. deviceNum: '',
  1130. authKey: '',
  1131. validateCode: '',
  1132. lockerSuperAdminId: '',
  1133. customerCode: '',
  1134. type: ''
  1135. },
  1136. manufacturer: '',
  1137. idx: -1,
  1138. id: -1,
  1139. abnormal: 0,
  1140. online: 0,
  1141. treedata: [],
  1142. unonline: 0,
  1143. Unlocking: false,
  1144. Unlockingrow: {},
  1145. lockingform: {
  1146. password: ""
  1147. },
  1148. activeiconfont: true,
  1149. info: [],
  1150. uploadkj: false,
  1151. userlist1statu: true,
  1152. userlist2: [],
  1153. multipleSelection1: [],
  1154. batchAccess: "",
  1155. getEmergenceStatus: false,
  1156. getEmergenceNum: '',
  1157. checkNodeId: '',
  1158. pageSize: 10,
  1159. pageNum: 1,
  1160. sendStatus: true,
  1161. userInfo: {
  1162. type: ''
  1163. },
  1164. checkNodeId1: '',
  1165. accessPlatform: {},
  1166. paginationConfig: 'total, sizes, prev, pager, next, jumper',
  1167. colNum_6: 6,
  1168. drawerSize: '90%',
  1169. analysisData: { isAlwaysOpen: 0, notAlwaysOpen: 0, bingSite: 0 }
  1170. };
  1171. },
  1172. components: {
  1173. zTree: zTree1["a" /* default */],
  1174. deviceLi: deviceLi["a" /* default */],
  1175. UnlockRecord: UnlockRecord["a" /* default */],
  1176. warningLog: warningLog["a" /* default */],
  1177. DeviceFeedbackLog: DeviceFeedbackLog["a" /* default */],
  1178. voucherCom: voucherCom["a" /* default */]
  1179. },
  1180. beforeCreate: function beforeCreate() {
  1181. // var tenantId = JSON.parse(localStorage.getItem('tenantId'))
  1182. // if (tenantId == 400) {
  1183. // this.$store.commit('defaultsettenantid')
  1184. // }
  1185. },
  1186. created: function created() {
  1187. if (this.$route.params.isOnline) {
  1188. this.search.isOnline = this.$route.params.isOnline;
  1189. }
  1190. if (this.$route.params.endBattery) {
  1191. this.search.startBattery = '0';
  1192. this.search.endBattery = 20;
  1193. }
  1194. this.manufacturerList = this.$MANUFACTURER.MANUFACTURER.lock;
  1195. this.accessPlatform = this.$MANUFACTURER.accessPlatform;
  1196. this.userInfo = JSON.parse(localStorage.getItem('info'));
  1197. if (this.$route.params.isUsed) {
  1198. this.search.isUsed = this.$route.params.isUsed;
  1199. }
  1200. if (document.documentElement.clientWidth < 1080) {
  1201. this.paginationConfig = 'total, prev, pager, next';
  1202. this.colNum_6 = 12;
  1203. this.drawerSize = '100%';
  1204. } else {
  1205. this.paginationConfig = 'total, sizes, prev, pager, next, jumper';
  1206. this.colNum_6 = 6;
  1207. this.drawerSize = '90%';
  1208. }
  1209. },
  1210. mounted: function mounted() {
  1211. this.getdevice();
  1212. // this.getalllist();
  1213. this.$store.commit("increment", 1);
  1214. this.getcard();
  1215. this.getallTree();
  1216. document.addEventListener('keydown', this.keyDown);
  1217. },
  1218. methods: {
  1219. // 设备筛选导出结果
  1220. exportDeviceOrderMethods: function exportDeviceOrderMethods() {
  1221. var _this2 = this;
  1222. var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
  1223. var imei = this.search.imei.replace(/\s*/g, "");
  1224. if (this.search.isOnline == 2) {
  1225. this.search.isAppBind = 1;
  1226. } else {
  1227. this.search.isAppBind = '';
  1228. }
  1229. var q = {
  1230. deviceNum: deviceNum,
  1231. imei: imei,
  1232. isOnline: this.search.isOnline,
  1233. roomName: this.search.roomname,
  1234. roomIds: this.checkNodeId,
  1235. startBattery: this.search.startBattery,
  1236. endBattery: this.search.endBattery,
  1237. lockType: 1,
  1238. unBind: this.search.unBind,
  1239. firmwareVersion: this.search.firmwareVersion,
  1240. isUsed: this.search.isUsed,
  1241. iccid: this.search.iccid,
  1242. rssiStart: this.search.rssiStart,
  1243. rssiEnd: this.search.rssiEnd,
  1244. createStart: this.search.createStart,
  1245. createEnd: this.search.createEnd,
  1246. isAppBind: this.search.isAppBind
  1247. };
  1248. if (q.isOnline == 2) {
  1249. delete q.isOnline;
  1250. }
  1251. var qObject = util["a" /* default */].validObject(q);
  1252. var data = {
  1253. orderBy: "open_time desc",
  1254. q: stringify_default()(qObject)
  1255. };
  1256. Object(api["g" /* httpPost */])(data, this.$api.exportDeviceOrder).then(function (res) {
  1257. if (res.code == 200) {
  1258. var exportData = [];
  1259. //导出数据结构构造
  1260. res.data.forEach(function (item) {
  1261. exportData.push({
  1262. roomName: item.roomName,
  1263. deviceNum: item.deviceNum,
  1264. imei: item.imei,
  1265. isOnline: item.isOnline == 1 ? '在线' : item.isOnline == 2 ? '异常' : '离线',
  1266. battery: item.battery,
  1267. rssi: item.rssi,
  1268. createAt: moment_default()(item.createAt).format("YYYY-MM-DD HH:mm:ss"),
  1269. lastReportAt: moment_default()(item.lastReportAt).format("YYYY-MM-DD HH:mm:ss")
  1270. });
  1271. });
  1272. //导出表头设计
  1273. var head = {
  1274. roomName: '房间名称',
  1275. deviceNum: '设备号',
  1276. imei: 'IMEI',
  1277. isOnline: '状态',
  1278. battery: '电量',
  1279. rssi: '信号',
  1280. createAt: '注册时间',
  1281. lastReportAt: '上线时间'
  1282. //表头数据切换
  1283. };var list = exportData.map(function (item) {
  1284. var obj = {};
  1285. for (var k in item) {
  1286. if (head[k]) {
  1287. obj[head[k]] = item[k];
  1288. }
  1289. }
  1290. return obj;
  1291. });
  1292. // 创建工作表
  1293. var _data = xlsx_default.a.utils.json_to_sheet(list);
  1294. // 创建工作簿
  1295. var wb = xlsx_default.a.utils.book_new();
  1296. // 将工作表放入工作簿中
  1297. xlsx_default.a.utils.book_append_sheet(wb, _data, 'data');
  1298. // 生成文件并下载
  1299. xlsx_default.a.writeFile(wb, '门锁列表.xlsx');
  1300. } else {
  1301. _this2.$message.error(res.message);
  1302. }
  1303. });
  1304. // downloadPost(data, this.$api.exportDeviceOrder).then((res) => {
  1305. // const link = document.createElement("a");
  1306. // let blob = new Blob([res], {
  1307. // type: "application/vnd.ms-excel"
  1308. // });
  1309. // var objectUrl = URL.createObjectURL(blob);
  1310. // link.href = objectUrl;
  1311. // link.download = "门锁列表.xlsx";
  1312. // link.click();
  1313. // URL.revokeObjectURL(objectUrl);
  1314. // });
  1315. },
  1316. // 获取常开记录
  1317. getAlwaysOpens: function getAlwaysOpens() {
  1318. var _this3 = this;
  1319. var data = {
  1320. pageNum: this.normallyPageNum,
  1321. pageSize: this.normallyPageSzie,
  1322. orderType: "desc",
  1323. orderBy: "createTime",
  1324. q: stringify_default()({
  1325. deviceNum: this.formInline.deviceNum
  1326. })
  1327. };
  1328. Object(api["g" /* httpPost */])(data, this.$api.getAlwaysOpensApi).then(function (res) {
  1329. if (res.success) {
  1330. res.data.list.map(function (li) {
  1331. li.createTime = moment_default()(li.createTime).format("YYYY-MM-DD HH:mm:ss");
  1332. var content = JSON.parse(li.content);
  1333. if (content.operate) {
  1334. li.operate = content.operate;
  1335. } else {
  1336. li.operate = '';
  1337. }
  1338. if (content.endTime) {
  1339. li.endTime = content.endTime;
  1340. li.startTime = content.startTime;
  1341. li.startHour = content.openDoorSegmentList[0].startHour;
  1342. li.endHour = content.openDoorSegmentList[0].endHour;
  1343. li.opendDoorType = content.opendDoorType;
  1344. }
  1345. if (li.updateTime) {
  1346. li.updateTime = moment_default()(li.updateTime).format("YYYY-MM-DD HH:mm:ss");
  1347. }
  1348. });
  1349. _this3.normallyOpenRecordList = res.data.list;
  1350. _this3.normallyTotal = res.data.total;
  1351. } else {
  1352. _this3.$message.error(res.message);
  1353. }
  1354. });
  1355. },
  1356. // 常开记录分页
  1357. normallyHandleSizeChange: function normallyHandleSizeChange(val) {
  1358. this.normallyPageSzie = val;
  1359. this.getAlwaysOpens();
  1360. },
  1361. normallyHandleCurrentChange: function normallyHandleCurrentChange(val) {
  1362. this.normallyPageNum = val;
  1363. this.getAlwaysOpens();
  1364. },
  1365. // 电量图表初始化
  1366. initChart: function initChart() {
  1367. var myLine = this.$echarts.init(document.getElementById("myLine"));
  1368. myLine.setOption(this.myLine_option);
  1369. },
  1370. initChartOne: function initChartOne() {
  1371. var myLine = this.$echarts.init(document.getElementById("myLineOne"));
  1372. myLine.setOption(this.myLine_option_one);
  1373. },
  1374. initChartThree: function initChartThree() {
  1375. var myLine = this.$echarts.init(document.getElementById("myLineThree"));
  1376. myLine.setOption(this.myLine_option_three);
  1377. },
  1378. getElectricity: function getElectricity(e) {
  1379. this.endDate = moment_default()(this.dateTime[1]).format("YYYY-MM-DD HH:mm:ss");
  1380. this.startDate = moment_default()(this.dateTime[0]).format("YYYY-MM-DD HH:mm:ss");
  1381. this.quantityFun();
  1382. this.dateTimeOne = [this.dateTime[0], this.dateTime[1]];
  1383. this.endDateOne = moment_default()(this.dateTime[1]).format("YYYY-MM-DD HH:mm:ss");
  1384. this.startDateOne = moment_default()(this.dateTime[0]).format("YYYY-MM-DD HH:mm:ss");
  1385. this.quantityFunOne();
  1386. },
  1387. getSignal: function getSignal(e) {
  1388. this.endDateOne = moment_default()(this.dateTimeOne[1]).format("YYYY-MM-DD HH:mm:ss");
  1389. this.startDateOne = moment_default()(this.dateTimeOne[0]).format("YYYY-MM-DD HH:mm:ss");
  1390. this.quantityFunOne();
  1391. },
  1392. // 电量图表显示
  1393. quantityFun: function quantityFun() {
  1394. var _this4 = this;
  1395. var endDate = this.endDate;
  1396. var startDate = this.startDate;
  1397. var data = {
  1398. code: "logHeartbeat/batteryList",
  1399. data: {
  1400. pageNum: 1,
  1401. pageSize: 100000,
  1402. para: {
  1403. deviceNum: this.senddeviceNum,
  1404. startDate: startDate,
  1405. endDate: endDate
  1406. }
  1407. }
  1408. };
  1409. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  1410. if (res.success) {
  1411. var optiondata = [],
  1412. seriesdata = [];
  1413. res.data.list.map(function (li, index) {
  1414. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  1415. });
  1416. var array = _this4.factorial(res.data.list, 0);
  1417. array.map(function (li) {
  1418. optiondata.push(li.createAt);
  1419. seriesdata.push(li.battery);
  1420. });
  1421. _this4.myLine_option.xAxis.data = optiondata;
  1422. _this4.myLine_option.series[0].data = seriesdata;
  1423. _this4.$nextTick(function () {
  1424. _this4.initChart();
  1425. });
  1426. } else {
  1427. _this4.$message.error("数据错误");
  1428. }
  1429. });
  1430. },
  1431. factorial: function factorial(time, index) {
  1432. if (time.length - 1 > index) {
  1433. var date = new Date(time[index + 1].createAt).getTime();
  1434. var date1 = new Date(time[index].createAt).getTime();
  1435. // console.log(parseInt(date),index,parseInt(date1),(parseInt(date)-parseInt(date1)))
  1436. if (parseInt(date) - parseInt(date1) > 8640000) {
  1437. return this.factorial(time, index + 1);
  1438. } else {
  1439. time.splice(index, 1);
  1440. return this.factorial(time, index);
  1441. }
  1442. } else {
  1443. return time;
  1444. }
  1445. },
  1446. // 信号图表显示
  1447. quantityFunOne: function quantityFunOne() {
  1448. var _this5 = this;
  1449. var endDate = this.endDateOne;
  1450. var startDate = this.startDateOne;
  1451. var data = {
  1452. code: "logHeartbeat/rssiList",
  1453. data: {
  1454. pageNum: 1,
  1455. pageSize: 100000,
  1456. para: {
  1457. deviceNum: this.senddeviceNum,
  1458. startDate: startDate,
  1459. endDate: endDate
  1460. }
  1461. }
  1462. };
  1463. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  1464. if (res.success) {
  1465. var optiondata = [],
  1466. seriesdata = [];
  1467. res.data.list.map(function (li, index) {
  1468. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  1469. });
  1470. var array = _this5.factorial(res.data.list, 0);
  1471. array.map(function (li) {
  1472. optiondata.push(li.createAt);
  1473. seriesdata.push(li.rssi);
  1474. });
  1475. _this5.myLine_option_one.xAxis.data = optiondata;
  1476. _this5.myLine_option_one.series[0].data = seriesdata;
  1477. _this5.$nextTick(function () {
  1478. _this5.initChartOne();
  1479. });
  1480. } else {
  1481. _this5.$message.error("数据错误");
  1482. }
  1483. });
  1484. },
  1485. getTimeDate: function getTimeDate(n) {
  1486. var currentDate = new Date();
  1487. var preDate = new Date(currentDate.getTime() + n * 24 * 3600 * 1000);
  1488. var year = currentDate.getFullYear();
  1489. var mon = currentDate.getMonth() + 1;
  1490. var day = currentDate.getDay();
  1491. var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day);
  1492. return s;
  1493. },
  1494. // 信号图表显示
  1495. quantityFunThree: function quantityFunThree() {
  1496. var _this6 = this;
  1497. var data = {
  1498. code: "lockOnlineBattery/selectOnline",
  1499. data: {
  1500. deviceNum: this.senddeviceNum
  1501. }
  1502. };
  1503. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  1504. if (res.success) {
  1505. var optiondata = [],
  1506. seriesdata = [];
  1507. for (var i = 0; i < res.data.length; i++) {
  1508. var date = _this6.getTimeDate(i);
  1509. optiondata.push(date);
  1510. seriesdata.push(res.data.online[i]);
  1511. }
  1512. _this6.myLine_option_one.xAxis.data = optiondata;
  1513. _this6.myLine_option_one.series[0].data = seriesdata;
  1514. _this6.$nextTick(function () {
  1515. _this6.initChartThree();
  1516. });
  1517. } else {
  1518. _this6.$message.error("数据错误");
  1519. }
  1520. });
  1521. },
  1522. keyDown: function keyDown(e) {
  1523. //如果是回车则执行登录方法
  1524. if (e.keyCode == 13) {
  1525. if (this.$route.name == 'doorLock') {
  1526. this.handleSearch();
  1527. }
  1528. }
  1529. },
  1530. // 解冻
  1531. thawMethods: function thawMethods(index, row) {
  1532. var _this7 = this;
  1533. this.$confirm("是否解冻该门锁?", "提示", {
  1534. confirmButtonText: "确定",
  1535. cancelButtonText: "取消",
  1536. type: "warning"
  1537. }).then(function () {
  1538. allFun["a" /* default */].freeManageMethods(0, row, function (callback) {
  1539. if (callback.code == 200) {
  1540. _this7.$message.success("解冻指令下发成功");
  1541. } else {
  1542. _this7.$message.error("解冻失败");
  1543. }
  1544. });
  1545. });
  1546. },
  1547. // 冻结门锁
  1548. frozenMethods: function frozenMethods(index, row) {
  1549. var _this8 = this;
  1550. allFun["a" /* default */].freeManageMethods(1, row, function (callback) {
  1551. if (callback.code == 200) {
  1552. _this8.$message.success("冻结指令下发成功");
  1553. } else {
  1554. _this8.$message.error("冻结失败");
  1555. }
  1556. });
  1557. },
  1558. InputFun: function InputFun(e, name) {
  1559. if (name == 'startBattery' || name == 'endBattery') {
  1560. if (Number(e) < 0) {
  1561. e = 0;
  1562. }
  1563. if (Number(e) > 100) {
  1564. e = 100;
  1565. }
  1566. }
  1567. this.search[name] = e;
  1568. },
  1569. selectTenantId: function selectTenantId(e) {
  1570. localStorage.setItem('tenantId', e);
  1571. this.reload();
  1572. },
  1573. // 重置初始化
  1574. resetInitialization: function resetInitialization(row, callback) {
  1575. var _this9 = this;
  1576. if (row.manufactureId == 201 || row.manufactureId == 221) {
  1577. var data3 = {
  1578. code: "zg/deleteAllUsers",
  1579. data: {
  1580. lockerId: row.deviceNum,
  1581. imei: row.imei,
  1582. order: 6501
  1583. }
  1584. };
  1585. Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res) {
  1586. if (res.success) {
  1587. _this9.$message.success("重置成功");
  1588. callback(true);
  1589. } else {
  1590. callback(false);
  1591. }
  1592. });
  1593. } else if (row.manufactureId == 101) {
  1594. var data2 = {
  1595. code: "isp/restoreSetting",
  1596. data: {
  1597. order: 6501,
  1598. imei: row.imei,
  1599. deviceNum: row.deviceNum,
  1600. managerTelephone: "18270949468",
  1601. managerPassword: "202108"
  1602. }
  1603. };
  1604. Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) {
  1605. if (res2.success) {
  1606. _this9.$message.success("重置成功");
  1607. var str = {
  1608. deviceNum: row.deviceNum,
  1609. imei: row.imei,
  1610. order: 6101
  1611. };
  1612. Object(api["g" /* httpPost */])(str, _this9.$api.getDeviceRegisterManager).then(function (res1) {
  1613. var str1 = {
  1614. imei: row.imei, //row.imsi,
  1615. deviceNum: row.deviceNum, //row.deviceNum,
  1616. operateMode: 7,
  1617. is: true,
  1618. order: 6207,
  1619. passwordStartTime: "20210813010101",
  1620. passwordEndTime: "20680813010101"
  1621. };
  1622. Object(api["g" /* httpPost */])(str1, _this9.$api.getDeviceOperateUserInfo).then(function (res2) {});
  1623. var str2 = {
  1624. imei: row.imei, //row.imsi,
  1625. deviceNum: row.deviceNum, //row.deviceNum,
  1626. operateMode: 4,
  1627. is: true,
  1628. order: 6204,
  1629. passwordStartTime: "20210813010101",
  1630. passwordEndTime: "20680813010101"
  1631. };
  1632. Object(api["g" /* httpPost */])(str2, _this9.$api.getDeviceOperateUserInfo).then(function (res3) {
  1633. if (res3.success) {
  1634. _this9.$message.success("初始化成功");
  1635. callback(true);
  1636. }
  1637. });
  1638. });
  1639. } else {
  1640. _this9.$message.error(res2.msg);
  1641. callback(false);
  1642. }
  1643. });
  1644. }
  1645. },
  1646. getPersonCallback: function getPersonCallback(person, alllist, callback) {
  1647. var personlist = [];
  1648. person.map(function (li) {
  1649. var obj = {
  1650. person: li,
  1651. data: alllist.filter(function (item) {
  1652. if (item.deviceNum && item.cardId == li.cardId) {
  1653. return item;
  1654. }
  1655. })
  1656. };
  1657. personlist.push(obj);
  1658. });
  1659. callback(personlist);
  1660. },
  1661. setReset: function setReset(row) {
  1662. var _this10 = this;
  1663. if (row.manufactureId == 201 || row.manufactureId == 221) {
  1664. var data3 = {
  1665. code: "zg/deleteAllUsers",
  1666. data: {
  1667. lockerId: row.deviceNum,
  1668. imei: row.imei,
  1669. order: 6501,
  1670. cardName: this.userInfo.username,
  1671. roomName: row.roomName
  1672. }
  1673. };
  1674. Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res) {
  1675. if (res.success) {
  1676. _this10.$message.success("重置成功");
  1677. var q = {
  1678. id: row.roomId
  1679. };
  1680. var tenant = {
  1681. q: stringify_default()(q)
  1682. };
  1683. Object(api["d" /* httpGet */])(tenant, _this10.$api.getSiteTenant).then(function (res) {
  1684. promise_default.a.all(res.data.list.map(function (element) {
  1685. return new promise_default.a(function (resolve, reject) {
  1686. resolve(element.cardId);
  1687. });
  1688. })).then(function (allId) {
  1689. allId.map(function (li) {
  1690. var str = [{
  1691. siteId: row.roomId,
  1692. cardId: li
  1693. }];
  1694. Object(api["g" /* httpPost */])(str, _this10.$api.unbindCard).then(function (res) {});
  1695. });
  1696. });
  1697. });
  1698. } else {
  1699. _this10.$message.success(res.msg);
  1700. }
  1701. });
  1702. } else if (row.manufactureId == 101) {
  1703. var data2 = {
  1704. code: "isp/restoreSetting",
  1705. data: {
  1706. order: 6501,
  1707. imei: row.imei,
  1708. deviceNum: row.deviceNum,
  1709. managerTelephone: "18270949468",
  1710. managerPassword: "202108",
  1711. cardName: this.userInfo.username,
  1712. roomName: row.roomName
  1713. }
  1714. };
  1715. Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) {
  1716. if (res2.success) {
  1717. _this10.$message.success("重置成功");
  1718. var q = {
  1719. id: row.roomId
  1720. };
  1721. var tenant = {
  1722. q: stringify_default()(q)
  1723. };
  1724. Object(api["d" /* httpGet */])(tenant, _this10.$api.getSiteTenant).then(function (res) {
  1725. promise_default.a.all(res.data.list.map(function (element) {
  1726. return new promise_default.a(function (resolve, reject) {
  1727. resolve(element.cardId);
  1728. });
  1729. })).then(function (allId) {
  1730. var str = {
  1731. deviceNum: row.deviceNum,
  1732. imei: row.imei,
  1733. order: 6101
  1734. };
  1735. Object(api["g" /* httpPost */])(str, _this10.$api.getDeviceRegisterManager).then(function (res1) {
  1736. var str1 = {
  1737. imei: row.imei, //row.imsi,
  1738. deviceNum: row.deviceNum, //row.deviceNum,
  1739. operateMode: 7,
  1740. is: true,
  1741. order: 6207,
  1742. passwordStartTime: "20210813010101",
  1743. passwordEndTime: "20680813010101"
  1744. };
  1745. Object(api["g" /* httpPost */])(str1, _this10.$api.getDeviceOperateUserInfo).then(function (res2) {});
  1746. var str2 = {
  1747. imei: row.imei, //row.imsi,
  1748. deviceNum: row.deviceNum, //row.deviceNum,
  1749. operateMode: 4,
  1750. is: true,
  1751. order: 6204,
  1752. passwordStartTime: "20210813010101",
  1753. passwordEndTime: "20680813010101"
  1754. };
  1755. Object(api["g" /* httpPost */])(str2, _this10.$api.getDeviceOperateUserInfo).then(function (res3) {
  1756. if (res3.success) {
  1757. _this10.$message.success("初始化成功");
  1758. }
  1759. });
  1760. });
  1761. allId.map(function (li) {
  1762. var str = [{
  1763. siteId: row.roomId,
  1764. cardId: li
  1765. }];
  1766. Object(api["g" /* httpPost */])(str, _this10.$api.unbindCard).then(function (res) {});
  1767. });
  1768. });
  1769. });
  1770. } else {
  1771. _this10.$message.error(res2.msg);
  1772. }
  1773. });
  1774. }
  1775. },
  1776. // 数据同步
  1777. dataSynchronization: function dataSynchronization(index, row) {
  1778. var _this11 = this;
  1779. console.log(row);
  1780. this.$confirm("是否确认数据同步?", "提示", {
  1781. confirmButtonText: "确定",
  1782. cancelButtonText: "取消",
  1783. type: "warning"
  1784. }).then(function () {
  1785. _this11.orderDeviceData(row);
  1786. });
  1787. },
  1788. sendPersonCerf: function sendPersonCerf(row, setPersonList, alllist) {
  1789. var _this12 = this;
  1790. setPersonList.forEach(function (li) {
  1791. _this12.getPersonInfo(li, function (callback) {
  1792. if (callback.code == 200) {
  1793. if (callback.data.list.length > 0) {
  1794. var personli = callback.data.list[0];
  1795. if (row.manufactureId == 101) {
  1796. var alllistAll = alllist.filter(function (item) {
  1797. return item.cardId == li;
  1798. });
  1799. var endTime = alllistAll[0].endTime * 1000;
  1800. var startTime = alllistAll[0].startTime * 1000;
  1801. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  1802. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  1803. var userTelephone = JSON.parse(personli.info).userTelephone;
  1804. var userPassword = JSON.parse(personli.info).userPassword;
  1805. var data = {
  1806. deviceNum: row.deviceNum,
  1807. imei: row.imei,
  1808. userTelephone: userTelephone,
  1809. userPassword: userPassword,
  1810. password: userPassword,
  1811. operateMode: 26,
  1812. order: 6226,
  1813. passwordStartTime: passwordStartTime,
  1814. passwordEndTime: passwordEndTime,
  1815. cardName: personli.name,
  1816. roomName: row.roomName
  1817. };
  1818. 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) {
  1819. alllistAll.map(function (ll) {
  1820. util["a" /* default */].putCarfidAdd(row, ll);
  1821. });
  1822. });
  1823. } else if (row.manufactureId == 201 || row.manufactureId == 221) {
  1824. var alllistAll = alllist.filter(function (item) {
  1825. return item.cardId == li;
  1826. });
  1827. var endTime = alllistAll[0].endTime * 1000;
  1828. var startTime = alllistAll[0].startTime * 1000;
  1829. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  1830. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  1831. var userTelephone = JSON.parse(personli.info).userTelephone;
  1832. var userPassword = JSON.parse(personli.info).userPassword;
  1833. var data = {
  1834. lockerId: row.deviceNum,
  1835. imei: row.imei,
  1836. lockerUserId: userPassword,
  1837. keyId: userPassword,
  1838. role: 0,
  1839. action: 1,
  1840. order: 6226,
  1841. cardName: personli.name,
  1842. roomName: row.roomName
  1843. };
  1844. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) {
  1845. console.log(callback, 'callback');
  1846. if (callback.success) {
  1847. alllistAll.map(function (ll) {
  1848. util["a" /* default */].putCarfidzgAdd(row, ll);
  1849. });
  1850. }
  1851. });
  1852. }
  1853. }
  1854. }
  1855. });
  1856. });
  1857. },
  1858. getPersonInfo: function getPersonInfo(li, callback) {
  1859. var q = {
  1860. id: li
  1861. };
  1862. var data = {
  1863. pageNum: 1,
  1864. pageSize: 10,
  1865. orderBy: "create_time desc",
  1866. q: stringify_default()(q)
  1867. };
  1868. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res1) {
  1869. callback(res1);
  1870. });
  1871. },
  1872. // 获取指定锁所有非703凭证数据
  1873. orderDeviceData: function orderDeviceData(row) {
  1874. var _this13 = this;
  1875. var _this = this;
  1876. if (row.roomId) {
  1877. var data1 = {
  1878. pageNum: 0,
  1879. pageSize: 0,
  1880. q: {
  1881. id: row.roomId
  1882. }
  1883. };
  1884. Object(api["d" /* httpGet */])(data1, this.$api.getSiteTenant).then(function (res) {
  1885. if (res.success) {
  1886. var person = res.data.list;
  1887. var data = {
  1888. pageNum: 0,
  1889. pageSize: 0,
  1890. orderBy: "create_at desc",
  1891. q: {
  1892. deviceNum: row.deviceNum,
  1893. types: "0,1,2,3,4",
  1894. inStatus: "0,1"
  1895. }
  1896. };
  1897. Object(api["d" /* httpGet */])(data, _this13.$api.getCertificates).then(function (res1) {
  1898. if (res1.success) {
  1899. var alllist = util["a" /* default */].zlib_unzip(res1.data);
  1900. _this13.getPersonCallback(person, alllist, function (callback) {
  1901. console.log(person, alllist, callback);
  1902. var personlist = callback;
  1903. _this.resetInitialization(row, function (callback1) {
  1904. console.log(callback1, row);
  1905. if (row.manufactureId == 101) {
  1906. personlist.map(function (lt) {
  1907. var endTime = new Date(lt.person.endTime).getTime();
  1908. var startTime = new Date(lt.person.startTime).getTime();
  1909. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  1910. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  1911. var userTelephone = JSON.parse(lt.person.info).userTelephone;
  1912. var userPassword = JSON.parse(lt.person.info).userPassword;
  1913. var data = {
  1914. deviceNum: row.deviceNum,
  1915. imei: row.imei,
  1916. userTelephone: userTelephone,
  1917. userPassword: userPassword,
  1918. password: userPassword,
  1919. operateMode: 26,
  1920. order: 6226,
  1921. passwordStartTime: passwordStartTime,
  1922. passwordEndTime: passwordEndTime,
  1923. cardName: lt.person.name,
  1924. roomName: row.roomName
  1925. };
  1926. 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) {
  1927. lt.data.map(function (ll) {
  1928. util["a" /* default */].putCarfidAdd(row, ll);
  1929. });
  1930. });
  1931. });
  1932. } else if (row.manufactureId == 201 || row.manufactureId == 221) {
  1933. personlist.map(function (lt) {
  1934. var endTime = new Date(lt.person.endTime).getTime();
  1935. var startTime = new Date(lt.person.startTime).getTime();
  1936. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  1937. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  1938. var userTelephone = JSON.parse(lt.person.info).userTelephone;
  1939. var userPassword = JSON.parse(lt.person.info).userPassword;
  1940. var data = {
  1941. lockerId: row.deviceNum,
  1942. imei: row.imei,
  1943. lockerUserId: userPassword,
  1944. keyId: userPassword,
  1945. role: 0,
  1946. action: 1,
  1947. order: 6226,
  1948. cardName: lt.person.name,
  1949. roomName: row.roomName
  1950. };
  1951. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback2) {
  1952. if (callback2.success) {
  1953. lt.data.map(function (ll) {
  1954. util["a" /* default */].putCarfidzgAdd(row, ll);
  1955. });
  1956. }
  1957. });
  1958. });
  1959. }
  1960. });
  1961. });
  1962. } else {
  1963. _this13.$message.error(res1.msg);
  1964. }
  1965. });
  1966. } else {
  1967. _this13.$message.error(res.msg);
  1968. }
  1969. });
  1970. } else {
  1971. this.$message.error("暂无数据");
  1972. }
  1973. },
  1974. // 从paas同步能对应得上的有效凭证
  1975. syncCommands: function syncCommands() {
  1976. Object(api["d" /* httpGet */])('', this.$api.syncCommands).then(function (res) {});
  1977. },
  1978. // 同步刷新
  1979. refreshFun: function refreshFun() {
  1980. var _this14 = this;
  1981. Object(api["d" /* httpGet */])("", this.$api.lockDeviceInfoList).then(function (res) {
  1982. _this14.handleSearch();
  1983. });
  1984. },
  1985. // 选择房源
  1986. checkNode: function checkNode(e) {
  1987. this.checkNodeId = e;
  1988. var options = this.options;
  1989. var arr = this.getId(options, e[e.length - 1]);
  1990. console.log(arr);
  1991. var listarr = [arr[0]];
  1992. var obj = this.getNodeId(listarr);
  1993. this.checkNodeId = obj;
  1994. },
  1995. checkNodeOne: function checkNodeOne(e) {
  1996. this.checkNodeId1 = e[e.length - 1];
  1997. this.checkRoomDevice(e[e.length - 1]);
  1998. },
  1999. checkRoomDevice: function checkRoomDevice(id) {
  2000. var _this15 = this;
  2001. var q = {
  2002. roomIds: [id],
  2003. lockType: 1
  2004. };
  2005. var data = {
  2006. q: stringify_default()(q),
  2007. pageNum: 1,
  2008. pageSize: this.pageSize
  2009. };
  2010. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  2011. if (res.data.list.length > 0) {
  2012. _this15.$message.error("该房间已绑定锁,请重新选择");
  2013. _this15.checkNodeId1 = '';
  2014. }
  2015. });
  2016. },
  2017. getParentId: function getParentId(list, id) {
  2018. for (var i in list) {
  2019. if (list[i].id == id) {
  2020. return [list[i]];
  2021. }
  2022. if (list[i].children) {
  2023. var node = this.getParentId(list[i].children, id);
  2024. if (node !== undefined) {
  2025. return node.concat(list[i]);
  2026. }
  2027. }
  2028. }
  2029. },
  2030. getId: function getId(list, id) {
  2031. for (var i in list) {
  2032. if (list[i].id == id) {
  2033. return [list[i]];
  2034. }
  2035. if (list[i].children) {
  2036. var node = this.getParentId(list[i].children, id);
  2037. if (node !== undefined) {
  2038. return node;
  2039. }
  2040. }
  2041. }
  2042. },
  2043. getNodeId: function getNodeId(list) {
  2044. var newNodeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  2045. for (var i in list) {
  2046. newNodeId.push(list[i].id);
  2047. if (list[i].children) {
  2048. this.getNodeId(list[i].children, newNodeId);
  2049. }
  2050. }
  2051. return newNodeId;
  2052. },
  2053. getallTree: function getallTree() {
  2054. var _this16 = this;
  2055. var data = {};
  2056. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  2057. var userlist = [];
  2058. var temp = {},
  2059. arr = [];
  2060. res.data.forEach(function (item, index) {
  2061. if (!temp[item.id]) {
  2062. arr.push(item);
  2063. temp[item.id] = true;
  2064. }
  2065. });
  2066. arr.map(function (li) {
  2067. if (li.expand) {
  2068. if (JSON.parse(li.expand).type == "0") {
  2069. userlist.push(li);
  2070. }
  2071. }
  2072. });
  2073. var list = res.data.sort(function (pre, cur) {
  2074. return pre.id - cur.id;
  2075. });
  2076. var arrdata = Object(utils["o" /* uniqueArray1 */])(list, "id");
  2077. _this16.options = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
  2078. _this16.zNodes = _this16.options;
  2079. });
  2080. },
  2081. // 获取门卡概况
  2082. getcard: function getcard() {
  2083. var _this17 = this;
  2084. allFun["a" /* default */].getAnalysis("", 1, function (callback) {
  2085. _this17.analysisData = callback;
  2086. _this17.sumpageTotal = callback.total;
  2087. _this17.online = callback.onlineTotal;
  2088. _this17.unonline = callback.offlineTotal;
  2089. _this17.abnormal = callback.isAppBind;
  2090. });
  2091. },
  2092. // 发送离线密码
  2093. sendEmergence: function sendEmergence() {
  2094. var _this18 = this;
  2095. var re = /^1\d{10}$/;
  2096. if (re.test(this.Emergence.EmerPhone)) {
  2097. var data = {
  2098. code: this.Emergence.password,
  2099. phone: this.Emergence.EmerPhone,
  2100. device: this.Emergence.device,
  2101. name: this.Emergence.name
  2102. };
  2103. Object(api["g" /* httpPost */])(data, this.$api.sendEmergence).then(function (res) {
  2104. if (res.success) {
  2105. _this18.$message.success('发送成功');
  2106. } else {
  2107. _this18.$message.error('发送失败');
  2108. }
  2109. });
  2110. this.getEmergenceStatus = false;
  2111. } else {
  2112. this.$message.error('请填写正确手机号');
  2113. }
  2114. },
  2115. handleCheckChange: function handleCheckChange(data, checked, node) {
  2116. if (checked) {
  2117. this.treedata = data;
  2118. } else {
  2119. if (this.checkedId == data.id) {
  2120. this.$refs.tree.setCheckedKeys([data.id]);
  2121. }
  2122. }
  2123. },
  2124. // 临时密码
  2125. getEmergence: function getEmergence(index, row) {
  2126. var _this19 = this;
  2127. var data = {
  2128. code: "zg/getEmergence",
  2129. data: {
  2130. lockerId: row.deviceNum
  2131. }
  2132. };
  2133. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  2134. if (res.success) {
  2135. _this19.$message.success("获取成功");
  2136. _this19.Emergence.password = res.data.data;
  2137. _this19.Emergence.device = row.deviceNum;
  2138. _this19.Emergence.name = row.roomName;
  2139. _this19.getEmergenceStatus = true;
  2140. } else {
  2141. _this19.$message.error("获取失败");
  2142. }
  2143. });
  2144. },
  2145. // input视图刷新
  2146. changesr: function changesr(e) {
  2147. this.$forceUpdate();
  2148. },
  2149. handleSelectionChange1: function handleSelectionChange1(val) {
  2150. this.multipleSelection1 = val;
  2151. },
  2152. BatchAdd: function BatchAdd() {
  2153. this.uploadkj = true;
  2154. },
  2155. //批量添加确认
  2156. batchUploadfun: function batchUploadfun() {
  2157. var _this20 = this;
  2158. if (this.batchAccess == "") {
  2159. this.$message.error("请选择运营商");
  2160. } else if (this.multipleSelection1.length == 0) {
  2161. this.$message.error("请勾选要批量添加的设备");
  2162. } else {
  2163. this.multipleSelection1.map(function (li, index) {
  2164. var str = {
  2165. deviceNum: li.deviceNum,
  2166. imei: li.imei,
  2167. imsi: li.imei, //row.imsi,
  2168. order: 5101,
  2169. platformId: _this20.batchAccess,
  2170. enterpriseId: _this20.userInfo.enterpriseId,
  2171. manufactureId: _this20.manufacturer
  2172. };
  2173. allFun["a" /* default */].RegisterDevice(str, function (callback) {
  2174. if (callback.success) {
  2175. _this20.$message.success("添加成功");
  2176. _this20.editVisible = false;
  2177. _this20.getdevice();
  2178. } else {
  2179. _this20.$message.error(callback.message);
  2180. }
  2181. });
  2182. });
  2183. }
  2184. },
  2185. //音量设置
  2186. stepFun: function stepFun(val) {
  2187. var _this21 = this;
  2188. var operate = "00";
  2189. if (val == '0') {
  2190. operate = "00";
  2191. } else if (val == 1) {
  2192. operate = "01";
  2193. } else if (val == 2) {
  2194. operate = "02";
  2195. }
  2196. var data = {
  2197. code: "isp/volumnSetting",
  2198. data: {
  2199. imei: this.formInline.imei,
  2200. deviceNum: this.formInline.deviceNum,
  2201. operate: operate,
  2202. order: 61001
  2203. }
  2204. };
  2205. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) {
  2206. if (res2.data.success) {
  2207. _this21.$message.success("设置成功");
  2208. } else {
  2209. _this21.$message.error(res.msg);
  2210. }
  2211. });
  2212. },
  2213. batchSetOpenMethods: function batchSetOpenMethods() {
  2214. this.setopenStatus = true;
  2215. },
  2216. // 取消常开设置
  2217. UnsetMethods: function UnsetMethods(e) {
  2218. var _this22 = this;
  2219. if (this.startHour > 24 || this.startHour < 0) {
  2220. this.$message.error('请选择正确的开始时间段');
  2221. return;
  2222. } else if (this.endHour > 24 || this.endHour < 0) {
  2223. this.$message.error('请选择正确的结束时间段');
  2224. return;
  2225. }
  2226. if (e == 1) {
  2227. var multipleSelection = [];
  2228. multipleSelection.push(this.formInline);
  2229. multipleSelection.map(function (li) {
  2230. var data = {
  2231. code: "zg/longopen/operation",
  2232. data: {
  2233. order: 61101,
  2234. roomName: li.roomName,
  2235. opendDoorType: 0,
  2236. lockerId: li.deviceNum,
  2237. lockerUserId: li.iotId,
  2238. startTime: moment_default()(_this22.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'),
  2239. endTime: moment_default()(_this22.opendTime[1]).format('YYYY-MM-DD HH:mm:ss'),
  2240. openDoorSegmentList: [{
  2241. startHour: _this22.startHour,
  2242. endHour: _this22.endHour
  2243. }]
  2244. }
  2245. };
  2246. Object(api["g" /* httpPost */])(data, _this22.$api.sendCommand).then(function (res2) {
  2247. if (res2.success) {
  2248. _this22.$message.success("取消设置成功");
  2249. } else {
  2250. _this22.$message.error(res2.msg);
  2251. }
  2252. });
  2253. });
  2254. } else if (e == 2) {
  2255. var multipleSelection = this.multipleSelection;
  2256. multipleSelection.map(function (li) {
  2257. var data = {
  2258. code: "zg/longopen/operation",
  2259. data: {
  2260. order: 61101,
  2261. roomName: li.roomName,
  2262. opendDoorType: 0,
  2263. lockerId: li.deviceNum,
  2264. lockerUserId: li.iotId,
  2265. startTime: moment_default()(_this22.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'),
  2266. endTime: moment_default()(_this22.opendTime[1]).format('YYYY-MM-DD HH:mm:ss'),
  2267. openDoorSegmentList: [{
  2268. startHour: _this22.startHour,
  2269. endHour: _this22.endHour
  2270. }]
  2271. }
  2272. };
  2273. Object(api["g" /* httpPost */])(data, _this22.$api.sendCommand).then(function (res2) {
  2274. if (res2.success) {
  2275. _this22.$message.success("取消设置成功");
  2276. } else {
  2277. _this22.$message.error(res2.msg);
  2278. }
  2279. });
  2280. });
  2281. }
  2282. },
  2283. setNormallyOpenMethodsAll: function setNormallyOpenMethodsAll() {
  2284. var _this23 = this;
  2285. if (this.startHour > 24 || this.startHour < 0) {
  2286. this.$message.error('请选择正确的开始时间段');
  2287. return;
  2288. } else if (this.endHour > 24 || this.endHour < 0) {
  2289. this.$message.error('请选择正确的结束时间段');
  2290. return;
  2291. }
  2292. if (this.opendTime[0] == '') {
  2293. this.$message.error('请选择开始日期');
  2294. return;
  2295. }
  2296. if (this.opendTime[1] == '') {
  2297. this.$message.error('请选择结束日期');
  2298. return;
  2299. }
  2300. if (this.startHour != '' && this.endHour == '') {
  2301. this.$message.error('请选择结束时间段');
  2302. return;
  2303. }
  2304. if (this.startHour == '' && this.endHour != '') {
  2305. this.$message.error('请选择开始时间段');
  2306. return;
  2307. }
  2308. this.multipleSelection.map(function (li) {
  2309. if (li.manufactureId == 201 || li.manufactureId == 221) {
  2310. var data = {
  2311. code: "zg/longopen/operation",
  2312. data: {
  2313. order: 61101,
  2314. roomName: li.roomName,
  2315. opendDoorType: 1,
  2316. lockerId: li.deviceNum,
  2317. lockerUserId: li.iotId,
  2318. startTime: moment_default()(_this23.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'),
  2319. endTime: moment_default()(_this23.opendTime[1]).format('YYYY-MM-DD HH:mm:ss'),
  2320. openDoorSegmentList: [{
  2321. startHour: _this23.startHour,
  2322. endHour: _this23.endHour
  2323. }]
  2324. }
  2325. };
  2326. if (_this23.startHour == '' && _this23.endHour == '') {
  2327. data.data.openDoorSegmentList = [];
  2328. }
  2329. Object(api["g" /* httpPost */])(data, _this23.$api.sendCommand).then(function (res2) {
  2330. if (res2.success) {
  2331. _this23.$message.success("设置成功");
  2332. _this23.getAlwaysOpens();
  2333. } else {
  2334. _this23.$message.error(res2.msg);
  2335. }
  2336. });
  2337. } else {
  2338. _this23.$message.error('该类型锁不支持此设置!');
  2339. }
  2340. });
  2341. setTimeout(function () {
  2342. _this23.setopenStatus = false;
  2343. }, 2000);
  2344. },
  2345. // ZH常开
  2346. setNormallyOpenMethods: function setNormallyOpenMethods() {
  2347. var _this24 = this;
  2348. if (this.startHour > 24 || this.startHour < 0) {
  2349. this.$message.error('请选择正确的开始时间段');
  2350. return;
  2351. } else if (this.endHour > 24 || this.endHour < 0) {
  2352. this.$message.error('请选择正确的结束时间段');
  2353. return;
  2354. }
  2355. if (this.formInline.manufactureId == 201 || this.formInline.manufactureId == 221) {
  2356. if (this.opendTime[0] == '') {
  2357. this.$message.error('请选择开始日期');
  2358. return;
  2359. }
  2360. if (this.opendTime[1] == '') {
  2361. this.$message.error('请选择结束日期');
  2362. return;
  2363. }
  2364. if (this.startHour != '' && this.endHour == '') {
  2365. this.$message.error('请选择结束时间段');
  2366. return;
  2367. }
  2368. if (this.startHour == '' && this.endHour != '') {
  2369. this.$message.error('请选择开始时间段');
  2370. return;
  2371. }
  2372. var data = {
  2373. code: "zg/longopen/operation",
  2374. data: {
  2375. order: 61101,
  2376. opendDoorType: 1,
  2377. roomName: this.formInline.roomName,
  2378. lockerUserId: this.formInline.iotId,
  2379. lockerId: this.formInline.deviceNum,
  2380. startTime: moment_default()(this.opendTime[0]).format('YYYY-MM-DD HH:mm:ss'),
  2381. endTime: moment_default()(this.opendTime[1]).format('YYYY-MM-DD HH:mm:ss'),
  2382. openDoorSegmentList: [{
  2383. startHour: this.startHour,
  2384. endHour: this.endHour
  2385. }]
  2386. }
  2387. };
  2388. console.log(data);
  2389. if (this.startHour == '' && this.endHour == '') {
  2390. data.data.openDoorSegmentList = [];
  2391. }
  2392. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) {
  2393. if (res2.success) {
  2394. _this24.$message.success("设置成功");
  2395. _this24.getAlwaysOpens();
  2396. } else {
  2397. _this24.$message.error(res2.msg);
  2398. }
  2399. });
  2400. } else {
  2401. this.$message.error('该类型锁不支持此设置!');
  2402. }
  2403. },
  2404. // 常开设置
  2405. switchFun: function switchFun(e) {
  2406. var _this25 = this;
  2407. if (this.formInline.manufactureId == 101) {
  2408. var data = {};
  2409. this.formInline.isAlwaysOpenStatus = e;
  2410. if (e) {
  2411. this.switchtext = "开";
  2412. data = {
  2413. code: "isp/alwaysOpenSetting",
  2414. data: {
  2415. imei: this.formInline.imei,
  2416. deviceNum: this.formInline.deviceNum,
  2417. operate: 1,
  2418. roomName: this.formInline.roomName,
  2419. order: 61101
  2420. }
  2421. };
  2422. } else {
  2423. this.switchtext = "关";
  2424. data = {
  2425. code: "isp/alwaysOpenSetting",
  2426. data: {
  2427. imei: this.formInline.imei,
  2428. deviceNum: this.formInline.deviceNum,
  2429. operate: 0,
  2430. roomName: this.formInline.roomName,
  2431. order: 61101
  2432. }
  2433. };
  2434. }
  2435. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) {
  2436. if (res2.success) {
  2437. _this25.$message.success("设置成功");
  2438. _this25.getAlwaysOpens();
  2439. } else {
  2440. _this25.$message.error(res2.msg);
  2441. }
  2442. });
  2443. } else if (this.formInline.manufactureId == 201 || this.formInline.manufactureId == 221) {
  2444. // this.$message.success("该类型锁请通过蓝牙设置声音");
  2445. }
  2446. },
  2447. // 关闭侧边栏
  2448. handleClose: function handleClose() {
  2449. this.drawer = false;
  2450. },
  2451. // tabs标签页切换
  2452. handleClick: function handleClick(tab, event) {
  2453. this.commpontentStatus = true;
  2454. },
  2455. //查看门锁详情
  2456. detailsFun: function detailsFun(index, row) {
  2457. this.drawer = true;
  2458. if (row.isAlwaysOpen == 0) {
  2459. row.isAlwaysOpenStatus = false;
  2460. } else if (row.isAlwaysOpen == 1) {
  2461. row.isAlwaysOpenStatus = true;
  2462. }
  2463. this.formInline = row;
  2464. this.sendStatus = false;
  2465. this.$nextTick(function () {
  2466. this.sendroomId = row.deviceNum;
  2467. this.senddeviceNum = row.deviceNum;
  2468. this.sendDevice = row;
  2469. this.sendStatus = true;
  2470. this.quantityFun();
  2471. this.quantityFunOne();
  2472. this.getAlwaysOpens();
  2473. // this.quantityFunThree()
  2474. });
  2475. },
  2476. Reset1: function Reset1(index, row) {
  2477. var data2 = {
  2478. code: "isp/restoreSetting",
  2479. data: {
  2480. order: 6501,
  2481. imei: row.imei,
  2482. deviceNum: row.deviceNum,
  2483. managerTelephone: "18270949468",
  2484. managerPassword: "202108"
  2485. }
  2486. };
  2487. Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) {
  2488. // if (res2.data.success) {
  2489. // this.$message.success("重置成功");
  2490. // } else {
  2491. // this.$message.error(res.msg);
  2492. // }
  2493. });
  2494. },
  2495. // 重置门锁
  2496. Reset: function Reset(index, row) {
  2497. var _this26 = this;
  2498. this.$confirm("是否确认重置门锁?", "提示", {
  2499. confirmButtonText: "确定",
  2500. cancelButtonText: "取消",
  2501. type: "warning"
  2502. }).then(function () {
  2503. if (row.manufactureId == 201 || row.manufactureId == 221) {
  2504. var data3 = {
  2505. code: "zg/deleteAllUsers",
  2506. data: {
  2507. lockerId: row.deviceNum,
  2508. imei: row.imei,
  2509. order: 6501,
  2510. cardName: _this26.userInfo.username,
  2511. roomName: row.roomName
  2512. }
  2513. };
  2514. Object(api["g" /* httpPost */])(data3, _this26.$api.sendCommand).then(function (res) {
  2515. if (res.success) {
  2516. _this26.$message.success("重置成功");
  2517. var q = {
  2518. id: row.roomId
  2519. };
  2520. var tenant = {
  2521. q: stringify_default()(q)
  2522. };
  2523. Object(api["d" /* httpGet */])(tenant, _this26.$api.getSiteTenant).then(function (res) {
  2524. promise_default.a.all(res.data.list.map(function (element) {
  2525. return new promise_default.a(function (resolve, reject) {
  2526. resolve(element.cardId);
  2527. });
  2528. })).then(function (allId) {
  2529. allId.map(function (li) {
  2530. var str = [{
  2531. siteId: row.roomId,
  2532. cardId: li
  2533. }];
  2534. Object(api["g" /* httpPost */])(str, _this26.$api.unbindCard).then(function (res) {});
  2535. });
  2536. });
  2537. });
  2538. } else {
  2539. _this26.$message.success(res.msg);
  2540. }
  2541. });
  2542. } else if (row.manufactureId == 101) {
  2543. var data2 = {
  2544. code: "isp/restoreSetting",
  2545. data: {
  2546. order: 6501,
  2547. imei: row.imei,
  2548. deviceNum: row.deviceNum,
  2549. managerTelephone: "18270949468",
  2550. managerPassword: "202108",
  2551. cardName: _this26.userInfo.username,
  2552. roomName: row.roomName
  2553. }
  2554. };
  2555. Object(api["g" /* httpPost */])(data2, _this26.$api.sendCommand).then(function (res2) {
  2556. if (res2.success) {
  2557. _this26.$message.success("重置成功");
  2558. var q = {
  2559. id: row.roomId
  2560. };
  2561. var tenant = {
  2562. q: stringify_default()(q)
  2563. };
  2564. Object(api["d" /* httpGet */])(tenant, _this26.$api.getSiteTenant).then(function (res) {
  2565. promise_default.a.all(res.data.list.map(function (element) {
  2566. return new promise_default.a(function (resolve, reject) {
  2567. resolve(element.cardId);
  2568. });
  2569. })).then(function (allId) {
  2570. allId.map(function (li) {
  2571. var str = [{
  2572. siteId: row.roomId,
  2573. cardId: li
  2574. }];
  2575. Object(api["g" /* httpPost */])(str, _this26.$api.unbindCard).then(function (res) {});
  2576. });
  2577. });
  2578. });
  2579. } else {
  2580. _this26.$message.error(res2.msg);
  2581. }
  2582. });
  2583. }
  2584. });
  2585. },
  2586. activeiconfun: function activeiconfun(t) {
  2587. this.activeiconfont = t;
  2588. },
  2589. // 查询设备电量和信号
  2590. getresult: function getresult() {
  2591. var data = {};
  2592. },
  2593. // 输入远程开锁密码确认
  2594. Unlockingsave: function Unlockingsave() {},
  2595. // 远程开锁
  2596. RemoteUnlocking: function RemoteUnlocking(index, row) {
  2597. var _this27 = this;
  2598. var str2 = {
  2599. imei: row.imei,
  2600. openLockType: 2,
  2601. is: true,
  2602. roomName: row.roomName,
  2603. roomId: row.roomId,
  2604. cardName: this.userInfo.username
  2605. };
  2606. Object(api["g" /* httpPost */])(str2, this.$api.openLock).then(function (res3) {
  2607. if (res3.success) {
  2608. _this27.$message.success("开锁成功!");
  2609. _this27.Unlocking = false;
  2610. } else {
  2611. _this27.$message.error("开锁失败!");
  2612. }
  2613. });
  2614. },
  2615. // 批量初始化
  2616. batchInit: function batchInit() {
  2617. var _this28 = this;
  2618. if (this.multipleSelection.length == 0) {
  2619. this.$message.error("请选择初始化设备");
  2620. return;
  2621. }
  2622. this.$confirm("确定要批量初始化吗?", "提示", {
  2623. type: "warning"
  2624. }).then(function () {
  2625. _this28.multipleSelection.map(function (row) {
  2626. if (row.manufactureId == 101) {
  2627. var str = {
  2628. deviceNum: row.deviceNum,
  2629. imei: row.imei,
  2630. order: 6101
  2631. };
  2632. Object(api["g" /* httpPost */])(str, _this28.$api.getDeviceRegisterManager).then(function (res1) {
  2633. if (res1.data.success) {
  2634. var str1 = {
  2635. imei: row.imei, //row.imsi,
  2636. deviceNum: row.deviceNum, //row.deviceNum,
  2637. operateMode: 7,
  2638. is: true,
  2639. order: 6207,
  2640. pass: false,
  2641. passwordStartTime: "20210813010101",
  2642. passwordEndTime: "20680813010101"
  2643. };
  2644. Object(api["g" /* httpPost */])(str1, _this28.$api.getDeviceOperateUserInfo).then(function (res2) {});
  2645. var str2 = {
  2646. imei: row.imei, //row.imsi,
  2647. deviceNum: row.deviceNum, //row.deviceNum,
  2648. operateMode: 4,
  2649. is: true,
  2650. order: 6204,
  2651. pass: false,
  2652. passwordStartTime: "20210813010101",
  2653. passwordEndTime: "20680813010101"
  2654. };
  2655. Object(api["g" /* httpPost */])(str2, _this28.$api.getDeviceOperateUserInfo).then(function (res3) {
  2656. if (res3.success) {
  2657. _this28.$message.success("初始化成功");
  2658. }
  2659. });
  2660. } else {
  2661. _this28.$message.error(res1.data.msg);
  2662. }
  2663. });
  2664. }
  2665. });
  2666. });
  2667. },
  2668. // 重置添加管理员
  2669. AddAdministrator: function AddAdministrator(index, row) {
  2670. var _this29 = this;
  2671. this.$confirm("确定要初始化吗?", "提示", {
  2672. type: "warning"
  2673. }).then(function () {
  2674. var str = {
  2675. deviceNum: row.deviceNum,
  2676. imei: row.imei,
  2677. order: 6101
  2678. };
  2679. Object(api["g" /* httpPost */])(str, _this29.$api.getDeviceRegisterManager).then(function (res1) {
  2680. if (res1.data.success) {
  2681. var str1 = {
  2682. imei: row.imei, //row.imsi,
  2683. deviceNum: row.deviceNum, //row.deviceNum,
  2684. operateMode: 7,
  2685. is: true,
  2686. order: 6207,
  2687. pass: false,
  2688. passwordStartTime: "20210813010101",
  2689. passwordEndTime: "20680813010101"
  2690. };
  2691. Object(api["g" /* httpPost */])(str1, _this29.$api.getDeviceOperateUserInfo).then(function (res2) {});
  2692. var str2 = {
  2693. imei: row.imei, //row.imsi,
  2694. deviceNum: row.deviceNum, //row.deviceNum,
  2695. operateMode: 4,
  2696. is: true,
  2697. order: 6204,
  2698. pass: false,
  2699. passwordStartTime: "20210813010101",
  2700. passwordEndTime: "20680813010101"
  2701. };
  2702. Object(api["g" /* httpPost */])(str2, _this29.$api.getDeviceOperateUserInfo).then(function (res3) {
  2703. if (res3.success) {
  2704. _this29.$message.success("初始化成功");
  2705. }
  2706. });
  2707. } else {
  2708. _this29.$message.error(res1.data.msg);
  2709. }
  2710. });
  2711. });
  2712. },
  2713. // 添加设备
  2714. initialization: function initialization() {
  2715. var _this30 = this;
  2716. if (this.checkNodeId1 == '') {
  2717. this.$message.error("请选择房间");
  2718. } else {
  2719. if (this.form.manufacturer == 101 || this.form.manufacturer == 1201) {
  2720. if (this.form.deviceNum == "" || this.form.v == "" || this.form.platformId == "") {
  2721. this.$message.error("请填写完整信息");
  2722. } else {
  2723. var data = {};
  2724. var data = {
  2725. deviceNum: this.form.deviceNum,
  2726. imei: this.form.imei,
  2727. imsi: this.form.imei, //row.imsi,
  2728. order: 5101,
  2729. enterpriseId: this.userInfo.enterpriseId,
  2730. platformId: this.form.platformId,
  2731. manufactureId: this.form.manufacturer
  2732. };
  2733. allFun["a" /* default */].RegisterDevice(data, function (callback) {
  2734. if (callback.data.success && callback.success) {
  2735. var data = [{
  2736. siteId: _this30.checkNodeId1,
  2737. deviceId: callback.data.id
  2738. }];
  2739. Object(api["g" /* httpPost */])(data, _this30.$api.bindDeviceSite).then(function (res) {
  2740. if (res.success) {
  2741. _this30.$message.success("绑定成功");
  2742. _this30.editVisible = false;
  2743. _this30.getdevice();
  2744. }
  2745. }).catch(function (error) {
  2746. _this30.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  2747. });
  2748. _this30.$message.success(res.data.msg);
  2749. _this30.editVisible = false;
  2750. _this30.getdevice();
  2751. } else {
  2752. _this30.$message.error(callback.data.msg);
  2753. }
  2754. });
  2755. }
  2756. } else if (this.form.manufacturer == 201 || this.form.manufacturer == 221) {
  2757. var data = {
  2758. lockerId: this.form.lockerId,
  2759. imei: this.form.imei,
  2760. customerCode: this.form.customerCode,
  2761. lockerSuperAdminId: this.form.lockerSuperAdminId,
  2762. authKey: this.form.authKey,
  2763. type: this.form.type,
  2764. manufactureId: this.form.manufacturer,
  2765. enterpriseId: this.userInfo.enterpriseId,
  2766. order: 5101
  2767. };
  2768. allFun["a" /* default */].RegisterDevice(data, function (callback) {
  2769. if (callback.data.success && callback.success) {
  2770. var data = [{
  2771. siteId: _this30.checkNodeId1,
  2772. deviceId: callback.data.id
  2773. }];
  2774. Object(api["g" /* httpPost */])(data, _this30.$api.bindDeviceSite).then(function (res) {
  2775. if (res.success) {
  2776. _this30.$message.success("绑定成功");
  2777. _this30.editVisible = falsethis.editVisible = false;
  2778. _this30.getdevice();
  2779. }
  2780. }).catch(function (error) {
  2781. _this30.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  2782. });
  2783. _this30.$message.success("添加成功");
  2784. _this30.editVisible = false;
  2785. _this30.getdevice();
  2786. } else {
  2787. _this30.$message.error(callback.data.msg);
  2788. }
  2789. });
  2790. } else if (this.form.manufacturer == 701) {
  2791. var data = {
  2792. deviceNum: this.form.deviceNum,
  2793. validateCode: this.form.validateCode,
  2794. manufactureId: this.form.manufacturer,
  2795. enterpriseId: this.userInfo.enterpriseId
  2796. };
  2797. allFun["a" /* default */].RegisterDevice(data, function (callback) {
  2798. if (callback.data.success && callback.success) {
  2799. var data = [{
  2800. siteId: _this30.checkNodeId1,
  2801. deviceId: callback.data.id
  2802. }];
  2803. Object(api["g" /* httpPost */])(data, _this30.$api.bindDeviceSite).then(function (res) {
  2804. if (res.success) {
  2805. _this30.$message.success("绑定成功");
  2806. _this30.editVisible = false;
  2807. _this30.getdevice();
  2808. }
  2809. }).catch(function (error) {
  2810. _this30.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  2811. });
  2812. _this30.$message.success("添加成功");
  2813. _this30.editVisible = false;
  2814. _this30.getdevice();
  2815. } else {
  2816. _this30.$message.error(callback.data.msg);
  2817. }
  2818. });
  2819. }
  2820. }
  2821. },
  2822. // 选择绑定房间
  2823. onClick: function onClick(evt, treeId, treeNode) {
  2824. // 点击事件
  2825. this.treedata = treeNode;
  2826. },
  2827. // 获取绑定所有房间
  2828. getalllist: function getalllist() {
  2829. var _this31 = this;
  2830. var data = {};
  2831. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  2832. var array = Object(utils["n" /* uniqueArray */])(res.data, "id");
  2833. _this31.zNodes = Object(utils["p" /* ztreeToElementTree */])(array, {});
  2834. });
  2835. },
  2836. // 获取设备
  2837. getdevice: function getdevice() {
  2838. var _this32 = this;
  2839. var q = {
  2840. isOnline: this.search.isOnline,
  2841. roomName: this.search.roomname,
  2842. roomIds: this.checkNodeId,
  2843. startBattery: this.search.startBattery,
  2844. endBattery: this.search.endBattery,
  2845. lockType: 1,
  2846. unBind: this.search.unBind,
  2847. firmwareVersion: this.search.firmwareVersion,
  2848. isUsed: this.search.isUsed,
  2849. iccid: this.search.iccid,
  2850. rssiStart: this.search.rssiStart,
  2851. rssiEnd: this.search.rssiEnd,
  2852. createStart: this.search.createStart,
  2853. createEnd: this.search.createEnd,
  2854. isAppBind: this.search.isAppBind
  2855. };
  2856. if (q.isOnline == 2) {
  2857. delete q.isOnline;
  2858. }
  2859. var qObject = util["a" /* default */].validObject(q);
  2860. var data = {
  2861. q: stringify_default()(qObject),
  2862. pageNum: 1,
  2863. pageSize: 10
  2864. };
  2865. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  2866. var online = 0,
  2867. unonline = 0,
  2868. devIds = "";
  2869. res.data.list.map(function (li) {
  2870. if (li.isOnline == 1) {
  2871. online++;
  2872. } else if (li.isOnline == 0) {
  2873. unonline++;
  2874. }
  2875. var accessPlatform = _this32.accessPlatform.show.filter(function (item) {
  2876. return item.code == li.accessPlatform;
  2877. })[0];
  2878. if (accessPlatform) {
  2879. li['accessPlatformText'] = accessPlatform.desc;
  2880. } else {
  2881. li['accessPlatformText'] = '';
  2882. }
  2883. var deviceType = _this32.accessPlatform.deviceType.filter(function (item) {
  2884. return item.code == li.manufactureId;
  2885. })[0];
  2886. if (deviceType) {
  2887. li['manufactureIdText'] = deviceType.desc;
  2888. } else {
  2889. li['manufactureIdText'] = '';
  2890. }
  2891. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  2892. if (li.lastReportAt) {
  2893. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  2894. } else {
  2895. li['lastReportAt'] = '';
  2896. }
  2897. devIds += li.deviceNum + ",";
  2898. });
  2899. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  2900. _this32.tableData = newArr;
  2901. _this32.currentPage4 = 1;
  2902. _this32.pageTotal = res.data.total;
  2903. });
  2904. },
  2905. timestampToTime: function timestampToTime(cjsj) {
  2906. var date = new Date(cjsj); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  2907. var Y = date.getFullYear() + "-";
  2908. var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
  2909. var D = date.getDate() + " ";
  2910. var h = date.getHours() + ":";
  2911. var m = date.getMinutes() + ":";
  2912. var s = date.getSeconds();
  2913. return Y + M + D + h + m + s;
  2914. },
  2915. handleChange: function handleChange(value) {
  2916. console.log(value);
  2917. },
  2918. restSearch: function restSearch() {
  2919. this.search = {
  2920. name: "",
  2921. deviceNum: "",
  2922. roomname: '',
  2923. imei: "",
  2924. isOnline: "",
  2925. unBind: '',
  2926. startBattery: '',
  2927. endBattery: '',
  2928. firmwareVersion: '',
  2929. operationStatus: ''
  2930. };
  2931. this.checkNodeId = '';
  2932. this.searchRoom = '';
  2933. this.handleSearch();
  2934. },
  2935. // 设备状态统计筛选
  2936. screenStatisticsItemsMethods: function screenStatisticsItemsMethods(data) {
  2937. var _this33 = this;
  2938. Object(api["g" /* httpPost */])(data, this.$api.screenStatisticsItems).then(function (res) {
  2939. if (res.code == 200) {
  2940. var sumpageTotal = 0,
  2941. online = 0,
  2942. unonline = 0,
  2943. abnormal = 0;
  2944. res.data.map(function (li) {
  2945. if (li.isAppBind == 1) {
  2946. abnormal++;
  2947. }
  2948. if (li.isOnline == '0') {
  2949. unonline++;
  2950. }
  2951. if (li.isOnline == '1') {
  2952. online++;
  2953. }
  2954. });
  2955. _this33.sumpageTotal = res.data.length;
  2956. _this33.online = online;
  2957. _this33.unonline = unonline;
  2958. _this33.abnormal = abnormal;
  2959. }
  2960. });
  2961. },
  2962. // 触发搜索按钮
  2963. handleSearch: function handleSearch() {
  2964. var _this34 = this;
  2965. var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
  2966. var imei = this.search.imei.replace(/\s*/g, "");
  2967. if (this.search.isOnline == 2) {
  2968. this.search.isAppBind = 1;
  2969. } else {
  2970. this.search.isAppBind = '';
  2971. }
  2972. var q = {
  2973. deviceNum: deviceNum,
  2974. imei: imei,
  2975. isOnline: this.search.isOnline,
  2976. roomName: this.search.roomname,
  2977. roomIds: this.checkNodeId,
  2978. startBattery: this.search.startBattery,
  2979. endBattery: this.search.endBattery,
  2980. lockType: 1,
  2981. unBind: this.search.unBind,
  2982. firmwareVersion: this.search.firmwareVersion,
  2983. isUsed: this.search.isUsed,
  2984. iccid: this.search.iccid,
  2985. rssiStart: this.search.rssiStart,
  2986. rssiEnd: this.search.rssiEnd,
  2987. createStart: this.search.createStart,
  2988. createEnd: this.search.createEnd,
  2989. isAppBind: this.search.isAppBind
  2990. };
  2991. if (q.isOnline == 2) {
  2992. delete q.isOnline;
  2993. }
  2994. var qObject = util["a" /* default */].validObject(q);
  2995. var data = {
  2996. q: stringify_default()(qObject),
  2997. pageNum: 1,
  2998. pageSize: this.pageSize
  2999. };
  3000. this.screenStatisticsItemsMethods(data);
  3001. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  3002. if (res.data.list.length > 0) {
  3003. res.data.list.map(function (li) {
  3004. var accessPlatform = _this34.accessPlatform.show.filter(function (item) {
  3005. return item.code == li.accessPlatform;
  3006. })[0];
  3007. if (accessPlatform) {
  3008. li['accessPlatformText'] = accessPlatform.desc;
  3009. } else {
  3010. li['accessPlatformText'] = '';
  3011. }
  3012. var deviceType = _this34.accessPlatform.deviceType.filter(function (item) {
  3013. return item.code == li.manufactureId;
  3014. })[0];
  3015. if (deviceType) {
  3016. li['manufactureIdText'] = deviceType.desc;
  3017. } else {
  3018. li['manufactureIdText'] = '';
  3019. }
  3020. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  3021. if (li.lastReportAt) {
  3022. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  3023. } else {
  3024. li['lastReportAt'] = '';
  3025. }
  3026. });
  3027. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  3028. _this34.pageTotal = res.data.total;
  3029. _this34.tableData = newArr;
  3030. } else {
  3031. _this34.tableData = [];
  3032. _this34.pageTotal = 0;
  3033. }
  3034. _this34.currentPage4 = 1;
  3035. _this34.$store.commit("increment", 1);
  3036. });
  3037. // this.$set(this.query, "pageIndex", 1);
  3038. },
  3039. // 删除操作
  3040. handleDelete: function handleDelete(index) {
  3041. var _this35 = this;
  3042. // 二次确认删除
  3043. this.$confirm("确定要删除吗?", "提示", {
  3044. type: "warning"
  3045. }).then(function () {
  3046. _this35.$message.success("删除成功");
  3047. _this35.tableData.splice(index, 1);
  3048. }).catch(function () {});
  3049. },
  3050. // 多选操作
  3051. handleSelectionChange: function handleSelectionChange(val) {
  3052. this.multipleSelection = val;
  3053. },
  3054. // 批量远程开锁
  3055. batchRemoteUnlocking: function batchRemoteUnlocking() {
  3056. var _this36 = this;
  3057. this.$confirm("确定要批量远程开锁吗?", "提示", {
  3058. type: "warning"
  3059. }).then(function () {
  3060. _this36.multipleSelection.map(function (li) {
  3061. if (li.manufactureId == 101) {
  3062. var str2 = {
  3063. imei: li.imei,
  3064. openLockType: 2,
  3065. is: true,
  3066. roomName: li.roomName,
  3067. roomId: li.roomId,
  3068. cardName: _this36.userInfo.username
  3069. };
  3070. Object(api["g" /* httpPost */])(str2, _this36.$api.openLock).then(function (res3) {
  3071. if (res3.success) {
  3072. _this36.$message.success("开锁成功!");
  3073. } else {
  3074. _this36.$message.error("开锁失败!");
  3075. }
  3076. });
  3077. }
  3078. });
  3079. });
  3080. },
  3081. delAllSelection: function delAllSelection() {
  3082. var length = this.multipleSelection.length;
  3083. var str = "";
  3084. this.delList = this.delList.concat(this.multipleSelection);
  3085. for (var i = 0; i < length; i++) {
  3086. str += this.multipleSelection[i].name + " ";
  3087. }
  3088. this.$message.error("\u5220\u9664\u4E86" + str);
  3089. this.multipleSelection = [];
  3090. },
  3091. // 删除设备
  3092. deleteLock: function deleteLock(index, row) {
  3093. var _this37 = this;
  3094. this.$confirm("确定要删除吗?", "提示", {
  3095. type: "warning"
  3096. }).then(function () {
  3097. // if (row.manufactureId == 101) {
  3098. if (row.roomId) {
  3099. var q = {
  3100. id: row.roomId
  3101. };
  3102. var tenant = {
  3103. q: stringify_default()(q)
  3104. };
  3105. Object(api["d" /* httpGet */])(tenant, _this37.$api.getSiteTenant).then(function (res) {
  3106. promise_default.a.all(res.data.list.map(function (element) {
  3107. return new promise_default.a(function (resolve, reject) {
  3108. resolve(element.cardId);
  3109. });
  3110. })).then(function (allId) {
  3111. var str = [];
  3112. allId.map(function (li) {
  3113. var obj = {
  3114. siteId: row.roomId,
  3115. cardId: li
  3116. };
  3117. str.push(obj);
  3118. });
  3119. if (str.length > 0) {
  3120. Object(api["g" /* httpPost */])(str, _this37.$api.unbindCard).then(function (res) {});
  3121. }
  3122. var data1 = [{
  3123. siteId: row.roomId,
  3124. deviceId: row.id
  3125. }];
  3126. Object(api["g" /* httpPost */])(data1, _this37.$api.unbindDeviceSite).then(function (res) {
  3127. if (res.success) {
  3128. _this37.$message.success("解绑成功");
  3129. var data = {
  3130. deviceNum: row.deviceNum,
  3131. imei: row.imei,
  3132. order: 5102
  3133. };
  3134. allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
  3135. if (callback.success) {
  3136. _this37.getdevice();
  3137. _this37.$message.success('删除成功');
  3138. } else {
  3139. _this37.getdevice();
  3140. _this37.$message.error(callback.msg);
  3141. }
  3142. });
  3143. } else {
  3144. _this37.getdevice();
  3145. _this37.$message.error("\u89E3\u7ED1\u5931\u8D25");
  3146. }
  3147. });
  3148. });
  3149. });
  3150. } else {
  3151. var data = {
  3152. deviceNum: row.deviceNum,
  3153. imei: row.imei,
  3154. order: 5102
  3155. };
  3156. allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
  3157. if (callback.success) {
  3158. _this37.$message.success("删除成功");
  3159. _this37.getdevice();
  3160. } else {
  3161. _this37.getdevice();
  3162. _this37.$message.error(callback.msg);
  3163. }
  3164. });
  3165. }
  3166. }).catch(function (err) {
  3167. _this37.getdevice();
  3168. _this37.$message.error(err.msg);
  3169. });
  3170. },
  3171. // 绑定房间
  3172. bindRoom: function bindRoom(index, row) {
  3173. this.bromm = row;
  3174. this.roomVisible = true;
  3175. this.$refs.tree.setCheckedKeys([]);
  3176. },
  3177. // 确定绑定
  3178. bindsave: function bindsave() {
  3179. var _this38 = this;
  3180. var treedata = this.treedata;
  3181. this.roomVisible = false;
  3182. var data = [{
  3183. siteId: treedata.id,
  3184. deviceId: this.bromm.id
  3185. }];
  3186. Object(api["g" /* httpPost */])(data, this.$api.bindDeviceSite).then(function (res) {
  3187. if (res.success) {
  3188. _this38.$message.success("绑定成功");
  3189. _this38.getdevice();
  3190. }
  3191. }).catch(function (error) {
  3192. _this38.$message.error("\u7ED1\u5B9A\u5931\u8D25");
  3193. });
  3194. },
  3195. unbindsave: function unbindsave(index, row) {
  3196. var _this39 = this;
  3197. var data = [{
  3198. siteId: row.roomId,
  3199. deviceId: row.id
  3200. }];
  3201. var q = {
  3202. id: row.roomId
  3203. };
  3204. var tenant = {
  3205. q: stringify_default()(q)
  3206. };
  3207. // 二次确认解绑
  3208. this.$confirm("确定要解绑吗?", "提示", {
  3209. type: "warning"
  3210. }).then(function () {
  3211. // this.Reset(index, row)
  3212. Object(api["d" /* httpGet */])(tenant, _this39.$api.getSiteTenant).then(function (res) {
  3213. promise_default.a.all(res.data.list.map(function (element) {
  3214. return new promise_default.a(function (resolve, reject) {
  3215. resolve(element.cardId);
  3216. });
  3217. })).then(function (allId) {
  3218. allId.map(function (li) {
  3219. var str = [{
  3220. siteId: row.roomId,
  3221. cardId: li
  3222. }];
  3223. Object(api["g" /* httpPost */])(str, _this39.$api.unbindCard).then(function (res) {});
  3224. });
  3225. Object(api["g" /* httpPost */])(data, _this39.$api.unbindDeviceSite).then(function (res) {
  3226. if (res.success) {
  3227. _this39.$message.success("解绑成功");
  3228. _this39.getdevice();
  3229. } else {
  3230. _this39.$message.error("\u89E3\u7ED1\u5931\u8D25");
  3231. }
  3232. });
  3233. });
  3234. });
  3235. }).catch(function () {});
  3236. },
  3237. addequipment: function addequipment() {
  3238. this.form.customerCode = this.$store.state.customerCode;
  3239. this.editVisible = true;
  3240. },
  3241. // 编辑操作
  3242. handleEdit: function handleEdit(index, row) {
  3243. this.idx = index;
  3244. this.form = row;
  3245. this.editVisible = true;
  3246. },
  3247. // 保存编辑
  3248. saveEdit: function saveEdit() {
  3249. this.editVisible = false;
  3250. },
  3251. handleSizeChange: function handleSizeChange(val) {
  3252. console.log("\u6BCF\u9875 " + val + " \u6761");
  3253. this.$router.replace({
  3254. path: this.$route.path,
  3255. query: {
  3256. page: this.$route.query.page ? this.$route.query.page : 1,
  3257. pageSize: val
  3258. }
  3259. });
  3260. this.pageSize = val;
  3261. this.getlistNum(0, val);
  3262. },
  3263. getlistNum: function getlistNum(val, size) {
  3264. var _this40 = this;
  3265. var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
  3266. var imei = this.search.imei.replace(/\s*/g, "");
  3267. var q = {
  3268. deviceNum: deviceNum,
  3269. imei: imei,
  3270. isOnline: this.search.isOnline,
  3271. roomName: this.search.roomname,
  3272. roomIds: this.checkNodeId,
  3273. startBattery: this.search.startBattery,
  3274. endBattery: this.search.endBattery,
  3275. lockType: 1,
  3276. unBind: this.search.unBind,
  3277. firmwareVersion: this.search.firmwareVersion,
  3278. isUsed: this.search.isUsed,
  3279. iccid: this.search.iccid,
  3280. rssiStart: this.search.rssiStart,
  3281. rssiEnd: this.search.rssiEnd,
  3282. createStart: this.search.createStart,
  3283. createEnd: this.search.createEnd,
  3284. isAppBind: this.search.isAppBind
  3285. };
  3286. if (q.isOnline == 2) {
  3287. delete q.isOnline;
  3288. }
  3289. var qObject = util["a" /* default */].validObject(q);
  3290. var data = {
  3291. q: stringify_default()(qObject),
  3292. pageNum: val,
  3293. pageSize: size
  3294. };
  3295. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  3296. res.data.list.map(function (li) {
  3297. var accessPlatform = _this40.accessPlatform.show.filter(function (item) {
  3298. return item.code == li.accessPlatform;
  3299. })[0];
  3300. if (accessPlatform) {
  3301. li['accessPlatformText'] = accessPlatform.desc;
  3302. } else {
  3303. li['accessPlatformText'] = '';
  3304. }
  3305. var deviceType = _this40.accessPlatform.deviceType.filter(function (item) {
  3306. return item.code == li.manufactureId;
  3307. })[0];
  3308. if (deviceType) {
  3309. li['manufactureIdText'] = deviceType.desc;
  3310. } else {
  3311. li['manufactureIdText'] = '';
  3312. }
  3313. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  3314. if (li.lastReportAt) {
  3315. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  3316. } else {
  3317. li['lastReportAt'] = '';
  3318. }
  3319. });
  3320. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  3321. _this40.tableData = newArr;
  3322. _this40.pageTotal = res.data.total;
  3323. });
  3324. },
  3325. // 分页导航
  3326. handlePageChange: function handlePageChange(val) {
  3327. var _this41 = this;
  3328. // this.$router.replace({
  3329. // path: this.$route.path,
  3330. // query: {
  3331. // page: this.$route.query.page ? this.$route.query.page : 1,
  3332. // pageSize: val,
  3333. // },
  3334. // });
  3335. this.pageNum = val;
  3336. this.$store.commit("increment", val);
  3337. var q = {
  3338. deviceNum: this.search.deviceNum,
  3339. imei: this.search.imei,
  3340. isOnline: this.search.isOnline,
  3341. roomName: this.search.roomname,
  3342. roomIds: this.checkNodeId,
  3343. startBattery: this.search.startBattery,
  3344. endBattery: this.search.endBattery,
  3345. lockType: 1,
  3346. unBind: this.search.unBind,
  3347. firmwareVersion: this.search.firmwareVersion,
  3348. isUsed: this.search.isUsed,
  3349. iccid: this.search.iccid,
  3350. rssiStart: this.search.rssiStart,
  3351. rssiEnd: this.search.rssiEnd,
  3352. createStart: this.search.createStart,
  3353. createEnd: this.search.createEnd,
  3354. isAppBind: this.search.isAppBind
  3355. };
  3356. if (q.isOnline == 2) {
  3357. delete q.isOnline;
  3358. }
  3359. var qObject = util["a" /* default */].validObject(q);
  3360. var data = {
  3361. q: stringify_default()(qObject),
  3362. pageNum: val,
  3363. pageSize: this.pageSize
  3364. };
  3365. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  3366. res.data.list.map(function (li) {
  3367. var accessPlatform = _this41.accessPlatform.show.filter(function (item) {
  3368. return item.code == li.accessPlatform;
  3369. })[0];
  3370. if (accessPlatform) {
  3371. li['accessPlatformText'] = accessPlatform.desc;
  3372. } else {
  3373. li['accessPlatformText'] = '';
  3374. }
  3375. var deviceType = _this41.accessPlatform.deviceType.filter(function (item) {
  3376. return item.code == li.manufactureId;
  3377. })[0];
  3378. if (deviceType) {
  3379. li['manufactureIdText'] = deviceType.desc;
  3380. } else {
  3381. li['manufactureIdText'] = '';
  3382. }
  3383. li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss");
  3384. if (li.createAt) {}
  3385. if (li.lastReportAt) {
  3386. li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
  3387. } else {
  3388. li['lastReportAt'] = '';
  3389. }
  3390. });
  3391. var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  3392. _this41.tableData = newArr;
  3393. _this41.pageTotal = res.data.total;
  3394. });
  3395. },
  3396. btnClick: function btnClick() {
  3397. document.querySelector(".input-file").click();
  3398. },
  3399. exportBtn: function exportBtn() {
  3400. this.exportExcel();
  3401. },
  3402. exportExcel: function exportExcel() {
  3403. var sheet1data = [['设备号', 'mac地址', 'sn', 'imei', 'app绑定号', '生产写入号']];
  3404. var sheet1 = xlsx_default.a.utils.json_to_sheet(sheet1data, {
  3405. skipHeader: true
  3406. });
  3407. // 创建一个新的空的workbook
  3408. var wb = xlsx_default.a.utils.book_new();
  3409. xlsx_default.a.utils.book_append_sheet(wb, sheet1, '设备导入模板');
  3410. // XLSX.utils.book_append_sheet(wb, sheet2, '行政部')
  3411. // XLSX.utils.book_append_sheet(wb, sheet3, '前端部')
  3412. var workbookBlob = this.workbook2blob(wb);
  3413. this.openDownloadDialog(workbookBlob, '设备导入模板.xlsx');
  3414. },
  3415. // 下载模板
  3416. workbook2blob: function workbook2blob(workbook) {
  3417. // 生成excel的配置项
  3418. var wopts = {
  3419. // 要生成的文件类型
  3420. bookType: 'xlsx',
  3421. // // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
  3422. bookSST: false,
  3423. type: 'binary'
  3424. };
  3425. var wbout = xlsx_default.a.write(workbook, wopts);
  3426. // 将字符串转ArrayBuffer
  3427. function s2ab(s) {
  3428. var buf = new ArrayBuffer(s.length);
  3429. var view = new Uint8Array(buf);
  3430. for (var i = 0; i !== s.length; ++i) {
  3431. view[i] = s.charCodeAt(i) & 0xff;
  3432. }return buf;
  3433. }
  3434. var buf = s2ab(wbout);
  3435. var blob = new Blob([buf], {
  3436. type: 'application/octet-stream'
  3437. });
  3438. return blob;
  3439. },
  3440. // 将blob对象 创建bloburl,然后用a标签实现弹出下载框
  3441. openDownloadDialog: function openDownloadDialog(blob, fileName) {
  3442. if ((typeof blob === "undefined" ? "undefined" : typeof_default()(blob)) === 'object' && blob instanceof Blob) {
  3443. blob = URL.createObjectURL(blob); // 创建blob地址
  3444. }
  3445. var aLink = document.createElement('a');
  3446. aLink.href = blob;
  3447. // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,有时候 file:///模式下不会生效
  3448. aLink.download = fileName || '';
  3449. var event;
  3450. if (window.MouseEvent) event = new MouseEvent('click');
  3451. // 移动端
  3452. else {
  3453. event = document.createEvent('MouseEvents');
  3454. event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  3455. }
  3456. aLink.dispatchEvent(event);
  3457. },
  3458. exportData: function exportData(event) {
  3459. if (!event.currentTarget.files.length) {
  3460. return;
  3461. }
  3462. var that = this;
  3463. // 拿取文件对象
  3464. var f = event.currentTarget.files[0];
  3465. // 用FileReader来读取
  3466. var reader = new FileReader();
  3467. // 重写FileReader上的readAsBinaryString方法
  3468. FileReader.prototype.readAsBinaryString = function (f) {
  3469. var binary = "";
  3470. var wb; // 读取完成的数据
  3471. var outdata; // 你需要的数据
  3472. var reader = new FileReader();
  3473. reader.onload = function (e) {
  3474. // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节)
  3475. var bytes = new Uint8Array(reader.result);
  3476. var length = bytes.byteLength;
  3477. for (var i = 0; i < length; i++) {
  3478. binary += String.fromCharCode(bytes[i]);
  3479. }
  3480. // 接下来就是xlsx了,具体可看api
  3481. wb = xlsx_default.a.read(binary, {
  3482. type: "binary"
  3483. });
  3484. outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  3485. // 自定义方法向父组件传递数据
  3486. var arr1 = [];
  3487. outdata.map(function (li, index) {
  3488. var str = {};
  3489. str.deviceNum = li["设备号"];
  3490. str.mac = li["mac地址"];
  3491. str.imei = li["imei"];
  3492. str.app = li["app绑定号"];
  3493. str.write = li["生产写入号"];
  3494. arr1.push(str);
  3495. });
  3496. // this.tableData=arr
  3497. that.userlist1statu = false;
  3498. that.$nextTick(function () {
  3499. that.userlist2 = arr1;
  3500. that.userlist1statu = true;
  3501. });
  3502. };
  3503. reader.readAsArrayBuffer(f);
  3504. };
  3505. reader.readAsBinaryString(f);
  3506. }
  3507. }
  3508. });
  3509. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-7e17d244","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/doorLock.vue
  3510. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{on:{"click":function($event){_vm.contentSearchShow=false}}},[_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":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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.analysisData.bingSite))])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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.analysisData.isAlwaysOpen))])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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("0")])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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("0")])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_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("0")])])])])]),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_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":_vm.colNum_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 },"clearable":true},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:fun
  3511. ? 'success'
  3512. : scope.row.isOnline == '0'
  3513. ? 'danger'
  3514. : ''}},[(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:{"prop":"lastReportAt","label":"上线时间","width":"160"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"500","align":"center"},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("门锁操作")]),_vm._v(" "),(scope.row.manufactureId==101 && _vm.userInfo.type == 0)?_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.AddAdministrator(scope.$index, scope.row)}}},[_vm._v("初始化\n ")]):_vm._e(),_vm._v(" "),_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.userInfo.type == 0),expression:"userInfo.type == 0"}],staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.deleteLock(scope.$index, scope.row)}}},[_vm._v("\n 删除")]),_vm._v(" "),_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.getEmergence(scope.$index, scope.row)}}},[_vm._v("临时密码\n ")]),_vm._v(" "),(scope.row.manufactureId==101)?_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.RemoteUnlocking(scope.$index, scope.row)}}},[_vm._v("远程开锁 ")]):_vm._e(),_vm._v(" "),_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.Reset(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":_vm.paginationConfig,"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',{attrs:{"size":"middle"},on:{"click":function($event){_vm.Unlocking = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"middle"},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-passwor
  3515. var staticRenderFns = []
  3516. var esExports = { render: render, staticRenderFns: staticRenderFns }
  3517. /* harmony default export */ var views_doorLock = (esExports);
  3518. // CONCATENATED MODULE: ./src/views/doorLock.vue
  3519. function injectStyle (ssrContext) {
  3520. __webpack_require__("xEQD")
  3521. }
  3522. var normalizeComponent = __webpack_require__("VU/8")
  3523. /* script */
  3524. /* template */
  3525. /* template functional */
  3526. var __vue_template_functional__ = false
  3527. /* styles */
  3528. var __vue_styles__ = injectStyle
  3529. /* scopeId */
  3530. var __vue_scopeId__ = "data-v-7e17d244"
  3531. /* moduleIdentifier (server only) */
  3532. var __vue_module_identifier__ = null
  3533. var Component = normalizeComponent(
  3534. doorLock,
  3535. views_doorLock,
  3536. __vue_template_functional__,
  3537. __vue_styles__,
  3538. __vue_scopeId__,
  3539. __vue_module_identifier__
  3540. )
  3541. /* harmony default export */ var src_views_doorLock = __webpack_exports__["default"] = (Component.exports);
  3542. /***/ }),
  3543. /***/ "nDyz":
  3544. /***/ (function(module, exports) {
  3545. module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjc3NzIyNjA2Mzk5IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjEwMzQxIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiPjxwYXRoIGQ9Ik01MTIuMyA5OC4yYy0yMjkuMiAwLTQxNSAxODUuOC00MTUgNDE1czE4NS44IDQxNSA0MTUgNDE1IDQxNS0xODUuOCA0MTUtNDE1LTE4NS44LTQxNS00MTUtNDE1eiBtMjI3LjEgNDMzLjVjLTUuOSA5LTE2LjEgMTQuOS0yNy43IDE0LjlIMzc5LjFsODYuNyA4Ni43YzEwLjkgMTAuOSAxMC45IDI4LjYgMCAzOS41LTEwLjkgMTAuOS0yOC42IDEwLjktMzkuNSAwTDI4Ni40IDUzM2MtMTAuOS0xMC45LTEwLjktMjguNiAwLTM5LjVsMTM5LjgtMTM5LjhjMTAuOS0xMC45IDI4LjYtMTAuOSAzOS41IDAgNS41IDUuNSA4LjIgMTIuNiA4LjIgMTkuOCAwIDcuMi0yLjcgMTQuMy04LjIgMTkuOEwzNzkgNDgwaDMzMi42YzExLjYgMCAyMS43IDUuOSAyNy43IDE0LjkgNC4zIDQuOSA3IDExLjQgNyAxOC41IDAgNy0yLjYgMTMuNC02LjkgMTguM3oiIGZpbGw9IiM1OWFkZjciIHAtaWQ9IjEwMzQyIj48L3BhdGg+PC9zdmc+"
  3546. /***/ }),
  3547. /***/ "xEQD":
  3548. /***/ (function(module, exports) {
  3549. // removed by extract-text-webpack-plugin
  3550. /***/ })
  3551. });