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

934 lines
37 KiB

  1. webpackJsonp([46],{
  2. /***/ "mavR":
  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/core-js/json/stringify.js
  7. var stringify = __webpack_require__("mvHQ");
  8. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  9. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  10. var api = __webpack_require__("gyMJ");
  11. // EXTERNAL MODULE: ./src/utils/util.js
  12. var util = __webpack_require__("oFuF");
  13. // EXTERNAL MODULE: ./src/utils/index.js
  14. var utils = __webpack_require__("0xDb");
  15. // EXTERNAL MODULE: ./src/utils/equipment.js
  16. var equipment = __webpack_require__("ObZk");
  17. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  18. var moment = __webpack_require__("PJh5");
  19. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  20. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/DeviceFeedbackLog.vue
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  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. /* harmony default export */ var DeviceFeedbackLog = ({
  85. inject: ['reload'],
  86. name: "warningLog",
  87. data: function data() {
  88. return {
  89. selectoption: [],
  90. selectoptionValue: '',
  91. query: {
  92. command: "",
  93. deviceNum: "",
  94. operModul: "",
  95. result: '',
  96. cardName: '',
  97. operateName: '',
  98. roomId: '',
  99. roomName: '',
  100. roomIds: '',
  101. startTime: '',
  102. endTime: ''
  103. },
  104. pageNum: 1,
  105. pageSize: 10,
  106. pageIndex: 1,
  107. query1: {
  108. command: "",
  109. deviceNum: "",
  110. status: ""
  111. },
  112. activeName: "first",
  113. tableData: [],
  114. tableData1: [],
  115. multipleSelection: [],
  116. delList: [],
  117. editVisible: false,
  118. pageTotal: 0,
  119. pageTotal1: 0,
  120. form: {},
  121. idx: -1,
  122. id: -1,
  123. AboutDevice: [],
  124. userInfo: {
  125. type: ''
  126. },
  127. DeviceFeedbackLog: [],
  128. options: [],
  129. checkNodeId: []
  130. };
  131. },
  132. beforeCreate: function beforeCreate() {
  133. // var tenantId = JSON.parse(localStorage.getItem('tenantId'))
  134. // if (tenantId == 400) {
  135. // this.$store.commit('defaultsettenantid')
  136. // }
  137. },
  138. created: function created() {
  139. this.getalllist();
  140. this.DeviceFeedbackLog = this.$MANUFACTURER.DeviceFeedbackLog;
  141. this.userInfo = JSON.parse(localStorage.getItem('info'));
  142. this.getAboutDevice();
  143. this.selectoption = JSON.parse(localStorage.getItem('selectoption'));
  144. this.selectoptionValue = localStorage.getItem('tenantId');
  145. },
  146. mounted: function mounted() {
  147. document.addEventListener('keydown', this.keyDown);
  148. this.getOperates();
  149. },
  150. methods: {
  151. //获取房源筛选列表
  152. getalllist: function getalllist() {
  153. var _this = this;
  154. var data = {};
  155. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  156. var list = res.data.sort(function (pre, cur) {
  157. return pre.id - cur.id;
  158. });
  159. var array = Object(utils["n" /* uniqueArray */])(list, "id");
  160. _this.options = Object(utils["p" /* ztreeToElementTree */])(array, {});
  161. });
  162. },
  163. // 选择房源
  164. checkNode: function checkNode(e) {
  165. console.log(e);
  166. // this.checkNodeId = e[e.length-1]
  167. var options = this.options;
  168. if (e) {
  169. var arr = this.getId(options, e[e.length - 1]);
  170. var listarr = [arr[0]];
  171. var obj = this.getNodeId(listarr);
  172. console.log(obj);
  173. this.checkNodeId = obj;
  174. this.query.roomIds = obj;
  175. }
  176. },
  177. getParentId: function getParentId(list, id) {
  178. for (var i in list) {
  179. if (list[i].id == id) {
  180. return [list[i]];
  181. }
  182. if (list[i].children) {
  183. var node = this.getParentId(list[i].children, id);
  184. if (node !== undefined) {
  185. return node.concat(list[i]);
  186. }
  187. }
  188. }
  189. },
  190. getId: function getId(list, id) {
  191. for (var i in list) {
  192. if (list[i].id == id) {
  193. return [list[i]];
  194. }
  195. if (list[i].children) {
  196. var node = this.getParentId(list[i].children, id);
  197. if (node !== undefined) {
  198. return node;
  199. }
  200. }
  201. }
  202. },
  203. getNodeId: function getNodeId(list) {
  204. var newNodeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  205. for (var i in list) {
  206. newNodeId.push(list[i].id);
  207. if (list[i].children) {
  208. this.getNodeId(list[i].children, newNodeId);
  209. }
  210. }
  211. return newNodeId;
  212. },
  213. keyDown: function keyDown(e) {
  214. //如果是回车则执行登录方法
  215. if (e.keyCode == 13) {
  216. if (this.$route.name == 'DeviceFeedbackLog') {
  217. if (!this.drawer) {
  218. this.handleSearch();
  219. }
  220. }
  221. }
  222. },
  223. selectTenantId: function selectTenantId(e) {
  224. localStorage.setItem('tenantId', e);
  225. this.reload();
  226. },
  227. // 取消下发
  228. cancelDistribution: function cancelDistribution(index, row) {
  229. var _this2 = this;
  230. // var data = [row.id]
  231. // httpPost(data, this.$api.cancelDistribution).then(res => {
  232. // if (res.success) {
  233. // this.$message.success("取消成功")
  234. // } else {
  235. // this.$message.error("取消失败")
  236. // }
  237. // })
  238. Object(api["d" /* httpGet */])("", "/v1/device/editStatus/bySerial/" + 703 + "/" + row.serial).then(function (res) {
  239. if (res.code == 200) {
  240. _this2.$message.success("操作成功");
  241. } else {
  242. _this2.$message.error("操作失败");
  243. }
  244. });
  245. },
  246. // 重新下发
  247. reissueMethods: function reissueMethods(index, row) {
  248. var _this3 = this;
  249. var data = {
  250. pageNum: 0,
  251. pageSize: 0,
  252. orderBy: "create_at desc",
  253. q: {
  254. serial: row.serial
  255. }
  256. };
  257. Object(api["d" /* httpGet */])(data, this.$api.getCertificates).then(function (res) {
  258. if (res.code == 200) {
  259. var dataresult = util["a" /* default */].zlib_unzip(res.data);
  260. if (res.data.total > 0) {
  261. var dataOne = {
  262. pageNum: 0,
  263. pageSize: 0,
  264. q: stringify_default()({
  265. deviceNum: dataresult[0].deviceNum
  266. })
  267. };
  268. Object(api["g" /* httpPost */])(dataOne, _this3.$api.getDeviceItems).then(function (resOne) {
  269. if (resOne.code == 200) {
  270. if (resOne.data.total > 0) {
  271. _this3.sendAginMethods(resOne.data.list[0], dataresult[0], row);
  272. } else {
  273. _this3.$message.error("未发现对应门锁,操作失败");
  274. }
  275. } else {
  276. _this3.$message.error("操作失败");
  277. }
  278. });
  279. } else {
  280. _this3.$message.error("未发现对应凭证记录,操作失败");
  281. }
  282. } else {
  283. _this3.$message.error("操作失败");
  284. }
  285. });
  286. },
  287. sendAginMethods: function sendAginMethods(deviceData, certificates, row) {
  288. var _this4 = this;
  289. this.$confirm("是否重新下发!", "提示", {
  290. type: "warning"
  291. }).then(function () {
  292. if (deviceData.manufactureId == 101) {
  293. var content = JSON.parse(certificates.content);
  294. if (row.command == 6226) {
  295. var str1 = {
  296. imei: certificates.imei,
  297. deviceNum: certificates.deviceNum,
  298. userTelephone: content.userTelephone,
  299. userPassword: content.userPassword,
  300. password: content.password,
  301. operateMode: 26,
  302. order: 6226,
  303. passwordStartTime: content.passwordStartTime,
  304. passwordEndTime: content.passwordEndTime,
  305. is: false,
  306. cardName: row.cardName,
  307. roomName: row.roomName
  308. };
  309. Object(api["g" /* httpPost */])(str1, _this4.$api.getDeviceOperateUserInfo).then(function (res2) {
  310. if (res2.code == 200) {
  311. _this4.$message.success("发送成功");
  312. var datafidOne = {
  313. cardId: certificates.cardId,
  314. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  315. type: certificates.type,
  316. startTime: certificates.startTime,
  317. endTime: certificates.endTime,
  318. serial: res2.data.serialNumber
  319. };
  320. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  321. if (resThree.code == 200) {
  322. _this4.$message.success("重新下发成功");
  323. _this4.handleSearch();
  324. }
  325. });
  326. }
  327. });
  328. } else if (row.command == 6207) {
  329. var str1 = {
  330. imei: certificates.imei,
  331. deviceNum: certificates.deviceNum,
  332. userTelephone: content.userTelephone,
  333. userPassword: content.userPassword,
  334. password: content.password,
  335. operateMode: 7,
  336. order: 6207,
  337. passwordStartTime: content.passwordStartTime,
  338. passwordEndTime: content.passwordEndTime,
  339. is: false,
  340. cardName: row.cardName,
  341. roomName: row.roomName
  342. };
  343. Object(api["g" /* httpPost */])(str1, _this4.$api.getDeviceOperateUserInfo).then(function (res2) {
  344. if (res2.code == 200) {
  345. _this4.$message.success("发送成功");
  346. var datafidOne = {
  347. cardId: certificates.cardId,
  348. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  349. type: certificates.type,
  350. startTime: certificates.startTime,
  351. endTime: certificates.endTime,
  352. serial: res2.data.serialNumber
  353. };
  354. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  355. if (resThree.code == 200) {
  356. _this4.$message.success("重新下发成功");
  357. _this4.handleSearch();
  358. }
  359. });
  360. }
  361. });
  362. } else if (row.command == 6216) {
  363. var fpId = new Date();
  364. var str1 = {
  365. imei: certificates.imei,
  366. deviceNum: certificates.deviceNum,
  367. fingerprintAlias: content.fingerprintAlias,
  368. length: content.fingerprint.length / 2,
  369. fpTimeId: fpId.getTime(),
  370. fingerprint: content.fingerprint,
  371. userTelephone: content.userTelephone,
  372. userPassword: content.userPassword,
  373. password: content.password,
  374. operateMode: 16,
  375. order: 6216,
  376. type: 1,
  377. fingerprintStartTime: content.passwordStartTime,
  378. fingerprintEndTime: content.passwordEndTime,
  379. is: false,
  380. cardName: row.cardName,
  381. roomName: row.roomName
  382. };
  383. Object(api["g" /* httpPost */])(str1, _this4.$api.fingerprintTransfer).then(function (res2) {
  384. if (res2.code == 200) {
  385. _this4.$message.success("发送成功");
  386. var datafidOne = {
  387. cardId: certificates.cardId,
  388. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  389. type: certificates.type,
  390. startTime: certificates.startTime,
  391. endTime: certificates.endTime,
  392. serial: res2.data.serialNumber
  393. };
  394. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  395. if (resThree.code == 200) {
  396. _this4.$message.success("重新下发成功");
  397. _this4.handleSearch();
  398. }
  399. });
  400. }
  401. });
  402. } else if (row.command == 6213) {
  403. var str1 = {
  404. imei: certificates.imei,
  405. deviceNum: certificates.deviceNum,
  406. userTelephone: content.userTelephone,
  407. userPassword: content.userPassword,
  408. password: content.password,
  409. operateMode: 13,
  410. order: 6213,
  411. type: 2,
  412. passwordStartTime: content.passwordStartTime,
  413. passwordEndTime: content.passwordEndTime,
  414. is: false,
  415. cardName: row.cardName,
  416. roomName: row.roomName
  417. };
  418. Object(api["g" /* httpPost */])(str1, _this4.$api.getDeviceOperateUserInfo).then(function (res2) {
  419. if (res2.code == 200) {
  420. _this4.$message.success("发送成功");
  421. var datafidOne = {
  422. cardId: certificates.cardId,
  423. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  424. type: certificates.type,
  425. startTime: certificates.startTime,
  426. endTime: certificates.endTime,
  427. serial: res2.data.serialNumber
  428. };
  429. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  430. if (resThree.code == 200) {
  431. _this4.$message.success("重新下发成功");
  432. _this4.handleSearch();
  433. }
  434. });
  435. }
  436. });
  437. } else if (row.command == 6210) {
  438. var str1 = {
  439. imei: certificates.imei,
  440. deviceNum: certificates.deviceNum,
  441. userTelephone: content.userTelephone,
  442. userPassword: content.userPassword,
  443. password: content.password,
  444. operateMode: 10,
  445. order: 6210,
  446. type: 3,
  447. passwordStartTime: content.passwordStartTime,
  448. passwordEndTime: content.passwordEndTime,
  449. is: false,
  450. cardName: row.cardName,
  451. roomName: row.roomName
  452. };
  453. Object(api["g" /* httpPost */])(str1, _this4.$api.getDeviceOperateUserInfo).then(function (res2) {
  454. if (res2.code == 200) {
  455. _this4.$message.success("发送成功");
  456. var datafidOne = {
  457. cardId: certificates.cardId,
  458. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  459. type: certificates.type,
  460. startTime: certificates.startTime,
  461. endTime: certificates.endTime,
  462. serial: res2.data.serialNumber
  463. };
  464. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  465. if (resThree.code == 200) {
  466. _this4.$message.success("重新下发成功");
  467. _this4.handleSearch();
  468. }
  469. });
  470. }
  471. });
  472. }
  473. } else if (deviceData.manufactureId == 201 || deviceData.manufactureId == 221) {
  474. var content = JSON.parse(certificates.content);
  475. if (row.command == 6226) {
  476. var data = {
  477. lockerId: certificates.deviceNum,
  478. imei: certificates.imei,
  479. lockerUserId: content.userPassword,
  480. keyId: content.userPassword,
  481. role: 0,
  482. action: 1,
  483. order: 6226,
  484. cardName: row.cardName,
  485. roomName: row.roomName
  486. };
  487. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback1) {
  488. if (callback1.code == 200) {
  489. var datafidOne = {
  490. cardId: certificates.cardId,
  491. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  492. type: certificates.type,
  493. startTime: certificates.startTime,
  494. endTime: certificates.endTime,
  495. serial: callback1.data.serialNumber
  496. };
  497. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  498. if (resThree.code == 200) {
  499. _this4.$message.success("重新下发成功");
  500. _this4.handleSearch();
  501. }
  502. });
  503. }
  504. });
  505. } else if (row.command == 6207) {
  506. var str = {
  507. lockerId: certificates.deviceNum,
  508. imei: certificates.imei,
  509. order: 6207,
  510. passwordCount: 255,
  511. lockerUserId: content.userPassword,
  512. keyId: content.userPassword,
  513. startTime: content.passwordStartTime,
  514. endTime: content.passwordEndTime,
  515. action: 1,
  516. password: content.password,
  517. cardName: row.cardName,
  518. roomName: row.roomName
  519. };
  520. equipment["a" /* default */].addForeverPassword(str.lockerId, str.imei, str.lockerUserId, 1, str.password, 255, str.startTime, str.endTime, 6207, str.cardName, str.roomName, function (callback1) {
  521. if (callback1.success) {
  522. var datafidOne = {
  523. cardId: certificates.cardId,
  524. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  525. type: certificates.type,
  526. startTime: certificates.startTime,
  527. endTime: certificates.endTime,
  528. serial: callback1.data.serialNumber
  529. };
  530. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  531. if (resThree.code == 200) {
  532. _this4.$message.success("重新下发成功");
  533. _this4.handleSearch();
  534. }
  535. });
  536. }
  537. });
  538. } else if (row.command == 6216) {
  539. var str = {
  540. lockerId: certificates.deviceNum,
  541. imei: certificates.imei,
  542. order: 6216,
  543. lockerUserId: content.userPassword,
  544. keyId: content.userPassword,
  545. fingerType: 0,
  546. file: content.fingerprint,
  547. startTime: content.passwordStartTime,
  548. endTime: content.passwordEndTime,
  549. cardName: row.cardName,
  550. roomName: row.roomName
  551. };lockId, _imei, _userId, _fingerType, _file, _startTime, _endTime, _cardName, _roomName, callback;
  552. equipment["a" /* default */].addFingerPrints(str.lockerId, str.imei, str.lockerUserId, str.fingerType, str.file, str.startTime, str.endTime, str.cardName, str.roomName, function (callback1) {
  553. if (callback1.success) {
  554. var datafidOne = {
  555. cardId: certificates.cardId,
  556. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  557. type: certificates.type,
  558. startTime: certificates.startTime,
  559. endTime: certificates.endTime,
  560. serial: callback1.data.serialNumber
  561. };
  562. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  563. if (resThree.code == 200) {
  564. _this4.$message.success("重新下发成功");
  565. _this4.handleSearch();
  566. }
  567. });
  568. }
  569. });
  570. } else if (row.command == 6213) {
  571. var data3 = {
  572. lockerId: certificates.deviceNum,
  573. imei: certificates.imei,
  574. lockerUserId: content.userPassword,
  575. keyId: content.userPassword,
  576. action: 1,
  577. taskStatus: 1,
  578. order: 6213,
  579. startTime: content.passwordStartTime,
  580. endTime: content.passwordEndTime,
  581. cardType: 36,
  582. cardName: row.cardName,
  583. roomName: row.roomName,
  584. cardNo: content.password
  585. };
  586. equipment["a" /* default */].RfCardRegister(data3.lockerId, data3.imei, data3.keyId, data3.action, data3.taskStatus, data3.cardNo, data3.cardType, data3.startTime, data3.endTime, data3.order, data3.cardName, data3.roomName, function (callback1) {
  587. if (callback1.success) {
  588. var datafidOne = {
  589. cardId: certificates.cardId,
  590. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  591. type: certificates.type,
  592. startTime: certificates.startTime,
  593. endTime: certificates.endTime,
  594. serial: callback1.data.serialNumber
  595. };
  596. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  597. if (resThree.code == 200) {
  598. _this4.$message.success("重新下发成功");
  599. _this4.handleSearch();
  600. }
  601. });
  602. }
  603. });
  604. } else if (row.command == 6210) {
  605. var data3 = {
  606. lockerId: certificates.deviceNum,
  607. imei: certificates.imei,
  608. lockerUserId: content.userPassword,
  609. keyId: content.userPassword,
  610. action: 1,
  611. taskStatus: 1,
  612. order: 6210,
  613. startTime: content.passwordStartTime,
  614. endTime: content.passwordEndTime,
  615. cardType: 50,
  616. cardName: row.cardName,
  617. roomName: row.roomName,
  618. cardNo: content.password
  619. };
  620. equipment["a" /* default */].RfCardRegister(data3.lockerId, data3.imei, data3.keyId, data3.action, data3.taskStatus, data3.cardNo, data3.cardType, data3.startTime, data3.endTime, data3.order, data3.cardName, data3.roomName, function (callback1) {
  621. if (callback1.success) {
  622. var datafidOne = {
  623. cardId: certificates.cardId,
  624. content: certificates.content, //operateMode:NFC-10、把人员添加到凭证-1
  625. type: certificates.type,
  626. startTime: certificates.startTime,
  627. endTime: certificates.endTime,
  628. serial: callback1.data.serialNumber
  629. };
  630. Object(api["g" /* httpPost */])(datafidOne, _this4.$api.addCertificates).then(function (resThree) {
  631. if (resThree.code == 200) {
  632. _this4.$message.success("重新下发成功");
  633. _this4.handleSearch();
  634. }
  635. });
  636. }
  637. });
  638. }
  639. }
  640. });
  641. },
  642. // 重置
  643. resting: function resting() {
  644. this.query = {
  645. command: "",
  646. deviceNum: "",
  647. result: "",
  648. cardName: '',
  649. operateName: '',
  650. roomName: '',
  651. roomId: '',
  652. roomIds: '',
  653. startTime: '',
  654. endTime: ''
  655. };
  656. this.handleSearch();
  657. },
  658. // 查询和房间相关的设备
  659. getAboutDevice: function getAboutDevice() {
  660. var _this5 = this;
  661. var data = {
  662. pageNum: 0,
  663. pageSize: 0,
  664. q: stringify_default()({
  665. lockType: 1
  666. })
  667. };
  668. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  669. _this5.AboutDevice = res.data.list;
  670. });
  671. },
  672. time: function time() {
  673. var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date();
  674. var date = new Date(time + 8 * 3600 * 1000); // 增加8小时
  675. return date.toJSON().substr(0, 19).replace("T", " ");
  676. },
  677. searchParaProcess: function searchParaProcess(obj) {
  678. var myObj = obj;
  679. for (var i in myObj) {
  680. if (myObj[i] == '' || myObj[i] == null || myObj[i] == undefined || myObj[i] == 'Invalid date' || i == 'roomId') {
  681. delete myObj[i];
  682. }
  683. }
  684. return stringify_default()(myObj);
  685. },
  686. // 获取操作日志
  687. getOperates: function getOperates() {
  688. var _this6 = this;
  689. var data = {
  690. pageNum: 1,
  691. pageSize: this.pageSize,
  692. orderType: "desc",
  693. orderBy: "createTime"
  694. };
  695. Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) {
  696. var AboutDevice = _this6.AboutDevice;
  697. var datalist = util["a" /* default */].zlib_unzip(res.data);
  698. datalist.map(function (li) {
  699. if ((li.command == 6204 || li.command == 6207 || li.command == 6210 || li.command == 6213) && li.result == 702) {
  700. li['reStatus'] = true;
  701. } else {
  702. li['reStatus'] = false;
  703. }
  704. li.createTime = _this6.time(+new Date(li.createTime));
  705. var resultArr = AboutDevice.filter(function (_item) {
  706. return _item.imei == li.imei;
  707. })[0];
  708. li['operationType'] = '';
  709. var operationType = _this6.DeviceFeedbackLog.filter(function (item) {
  710. return item.code == li.command;
  711. })[0];
  712. if (operationType) {
  713. li['operationType'] = operationType.desc;
  714. }
  715. li['statusText'] = util["a" /* default */].statusCode(li.result);
  716. if (resultArr) {
  717. li.roomId = resultArr.id;
  718. li.roomName = resultArr.roomName;
  719. }
  720. if (li.command == 61101) {
  721. var commandContent = JSON.parse(li.content);
  722. if (commandContent.opendDoorType == 1) {
  723. li.operationType = li.operationType + '-开启';
  724. } else if (commandContent.opendDoorType == 0) {
  725. li.operationType = li.operationType + '-关闭';
  726. }
  727. }
  728. });
  729. console.log(datalist);
  730. _this6.tableData = datalist;
  731. _this6.pageTotal = res.data.total;
  732. });
  733. },
  734. // 触发搜索按钮
  735. handleSearch: function handleSearch() {
  736. var _this7 = this;
  737. var q = JSON.parse(stringify_default()(this.query));
  738. q.startTime = moment_default()(q.startTime).format("YYYY-MM-DD HH:mm:ss");
  739. q.endTime = moment_default()(q.endTime).format("YYYY-MM-DD HH:mm:ss");
  740. var data = {
  741. pageNum: 1,
  742. pageSize: this.pageSize,
  743. q: this.searchParaProcess(q),
  744. orderType: "desc",
  745. orderBy: "createTime"
  746. };
  747. this.pageNum = 1;
  748. Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) {
  749. var AboutDevice = _this7.AboutDevice;
  750. var dataOne = util["a" /* default */].zlib_unzip(res.data);
  751. console.log(dataOne);
  752. dataOne.map(function (li) {
  753. if ((li.command == 6204 || li.command == 6207 || li.command == 6210 || li.command == 6213) && li.result == 702) {
  754. li['reStatus'] = true;
  755. } else {
  756. li['reStatus'] = false;
  757. }
  758. li['operationType'] = '';
  759. var operationType = _this7.DeviceFeedbackLog.filter(function (item) {
  760. return item.code == li.command;
  761. })[0];
  762. if (operationType) {
  763. li['operationType'] = operationType.desc;
  764. }
  765. if (li.command == 61101) {
  766. var commandContent = JSON.parse(li.content);
  767. if (commandContent.opendDoorType == 1) {
  768. li.operationType = li.operationType + '-开启';
  769. } else if (commandContent.opendDoorType == 0) {
  770. li.operationType = li.operationType + '-关闭';
  771. }
  772. }
  773. li['statusText'] = util["a" /* default */].statusCode(li.result);
  774. li.createTime = _this7.time(+new Date(li.createTime));
  775. var resultArr = AboutDevice.filter(function (_item) {
  776. return _item.imei == li.imei;
  777. })[0];
  778. if (resultArr) {
  779. li.roomId = resultArr.id;
  780. li.roomName = resultArr.roomName;
  781. }
  782. });
  783. _this7.tableData = dataOne;
  784. _this7.pageTotal = res.data.total;
  785. // this.$store.commit('increment', 1)
  786. });
  787. // this.$set(this.query, "pageIndex", 1);
  788. },
  789. getSearchList: function getSearchList() {
  790. var _this8 = this;
  791. var q = JSON.parse(stringify_default()(this.query));
  792. // var q = {
  793. // command: this.query.command,
  794. // deviceNum: this.query.deviceNum,
  795. // result: this.query.result
  796. // };
  797. q.startTime = moment_default()(q.startTime).format("YYYY-MM-DD HH:mm:ss");
  798. q.endTime = moment_default()(q.endTime).format("YYYY-MM-DD HH:mm:ss");
  799. var data = {
  800. pageNum: this.pageNum,
  801. pageSize: this.pageSize,
  802. q: this.searchParaProcess(q),
  803. orderType: "desc",
  804. orderBy: "createTime"
  805. };
  806. Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) {
  807. var AboutDevice = _this8.AboutDevice;
  808. var dataOne = util["a" /* default */].zlib_unzip(res.data);
  809. dataOne.map(function (li) {
  810. li['statusText'] = util["a" /* default */].statusCode(li.result);
  811. var resultArr = AboutDevice.filter(function (_item) {
  812. return _item.imei == li.imei;
  813. })[0];
  814. li.createTime = _this8.time(+new Date(li.createTime));
  815. if ((li.command == 6204 || li.command == 6207 || li.command == 6210 || li.command == 6213) && li.result == 702) {
  816. li['reStatus'] = true;
  817. } else {
  818. li['reStatus'] = false;
  819. }
  820. if (resultArr) {
  821. li.roomId = resultArr.id;
  822. li.roomName = resultArr.roomName;
  823. }
  824. li['operationType'] = '';
  825. var operationType = _this8.DeviceFeedbackLog.filter(function (item) {
  826. return item.code == li.command;
  827. })[0];
  828. if (operationType) {
  829. li['operationType'] = operationType.desc;
  830. }
  831. if (li.command == 61101) {
  832. var commandContent = JSON.parse(li.content);
  833. if (commandContent.opendDoorType == 1) {
  834. li.operationType = li.operationType + '-开启';
  835. } else if (commandContent.opendDoorType == 0) {
  836. li.operationType = li.operationType + '-关闭';
  837. }
  838. }
  839. });
  840. _this8.tableData = dataOne;
  841. _this8.pageTotal = res.data.total;
  842. });
  843. },
  844. // 分页导航
  845. handlePageChange: function handlePageChange(val) {
  846. this.pageNum = val;
  847. this.getSearchList();
  848. },
  849. handleSizeChange: function handleSizeChange(val) {
  850. this.pageNum = 1;
  851. this.pageSize = val;
  852. this.getSearchList();
  853. }
  854. }
  855. });
  856. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-84c1bc0e","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/DeviceFeedbackLog.vue
  857. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-cascader',{staticClass:"handle-input mb-1",attrs:{"options":_vm.options,"size":"small","props":{ checkStrictly: true },"clearable":true},on:{"change":_vm.checkNode},model:{value:(_vm.query.roomId),callback:function ($$v) {_vm.$set(_vm.query, "roomId", $$v)},expression:"query.roomId"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 mb-1",attrs:{"size":"small","placeholder":"房间名称","clearable":true},model:{value:(_vm.query.roomName),callback:function ($$v) {_vm.$set(_vm.query, "roomName", $$v)},expression:"query.roomName"}}),_vm._v(" "),_c('el-date-picker',{staticClass:"handle-input mr10 mb-1",attrs:{"size":"small","type":"datetime","clearable":"","placeholder":"选择开始日期时间","default-time":"00:00:00"},model:{value:(_vm.query.startTime),callback:function ($$v) {_vm.$set(_vm.query, "startTime", $$v)},expression:"query.startTime"}}),_vm._v(" "),_c('el-date-picker',{staticClass:"handle-input mr10 mb-1",attrs:{"size":"small","type":"datetime","clearable":"","placeholder":"选择结束日期时间","default-time":"00:00:00"},model:{value:(_vm.query.endTime),callback:function ($$v) {_vm.$set(_vm.query, "endTime", $$v)},expression:"query.endTime"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mb-1 mr10",attrs:{"size":"small","placeholder":"设备号","clearable":true},model:{value:(_vm.query.deviceNum),callback:function ($$v) {_vm.$set(_vm.query, "deviceNum", $$v)},expression:"query.deviceNum"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mb-1 mr10",attrs:{"size":"small","placeholder":"租客","clearable":true},model:{value:(_vm.query.cardName),callback:function ($$v) {_vm.$set(_vm.query, "cardName", $$v)},expression:"query.cardName"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mb-1 mr10",attrs:{"size":"small","placeholder":"操作员","clearable":true},model:{value:(_vm.query.operateName),callback:function ($$v) {_vm.$set(_vm.query, "operateName", $$v)},expression:"query.operateName"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mb-1 mr10",attrs:{"size":"small","placeholder":"操作类型","clearable":true},model:{value:(_vm.query.command),callback:function ($$v) {_vm.$set(_vm.query, "command", $$v)},expression:"query.command"}},_vm._l((_vm.DeviceFeedbackLog),function(item,index){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10 mb-1",attrs:{"size":"small","placeholder":"状态","clearable":true},model:{value:(_vm.query.result),callback:function ($$v) {_vm.$set(_vm.query, "result", $$v)},expression:"query.result"}},[_c('el-option',{key:"0",attrs:{"label":"下发中","value":"0"}}),_vm._v(" "),_c('el-option',{key:"1",attrs:{"label":"下发成功","value":"1"}}),_vm._v(" "),_c('el-option',{key:"702",attrs:{"label":"下发失败","value":"702"}}),_vm._v(" "),_c('el-option',{key:"704",attrs:{"label":"下发超时","value":"704"}})],1),_vm._v(" "),_c('el-button',{staticClass:"mb-1",staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{staticClass:"mb-1",staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small"},on:{"click":_vm.resting}},[_vm._v("重置")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header","height":"600"}},[_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"roomName","label":"房间名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"operationType","label":"操作类型"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"statusText","label":"命令状态"}}),_vm._v(" "),_c('el-table-column
  858. var staticRenderFns = []
  859. var esExports = { render: render, staticRenderFns: staticRenderFns }
  860. /* harmony default export */ var views_DeviceFeedbackLog = (esExports);
  861. // CONCATENATED MODULE: ./src/views/DeviceFeedbackLog.vue
  862. function injectStyle (ssrContext) {
  863. __webpack_require__("tcpz")
  864. }
  865. var normalizeComponent = __webpack_require__("VU/8")
  866. /* script */
  867. /* template */
  868. /* template functional */
  869. var __vue_template_functional__ = false
  870. /* styles */
  871. var __vue_styles__ = injectStyle
  872. /* scopeId */
  873. var __vue_scopeId__ = "data-v-84c1bc0e"
  874. /* moduleIdentifier (server only) */
  875. var __vue_module_identifier__ = null
  876. var Component = normalizeComponent(
  877. DeviceFeedbackLog,
  878. views_DeviceFeedbackLog,
  879. __vue_template_functional__,
  880. __vue_styles__,
  881. __vue_scopeId__,
  882. __vue_module_identifier__
  883. )
  884. /* harmony default export */ var src_views_DeviceFeedbackLog = __webpack_exports__["default"] = (Component.exports);
  885. /***/ }),
  886. /***/ "tcpz":
  887. /***/ (function(module, exports) {
  888. // removed by extract-text-webpack-plugin
  889. /***/ })
  890. });