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

397 lines
14 KiB

  1. webpackJsonp([48],{
  2. /***/ "AxG5":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "vWK8":
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  10. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  11. var stringify = __webpack_require__("mvHQ");
  12. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  13. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  14. var api = __webpack_require__("gyMJ");
  15. // EXTERNAL MODULE: ./src/utils/index.js
  16. var utils = __webpack_require__("0xDb");
  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/warningLog.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. /* harmony default export */ var warningLog = ({
  64. // inject: ['reload'],
  65. name: "warningLog",
  66. data: function data() {
  67. return {
  68. // selectoption:[],
  69. // selectoptionValue:'',
  70. query: {
  71. operType: "",
  72. operateName: "",
  73. operModul: "",
  74. pageSize: 10,
  75. pageNum: 1,
  76. startTime: '',
  77. endTime: ''
  78. },
  79. query1: {
  80. operType: "",
  81. operateName: "",
  82. operModul: ""
  83. },
  84. activeName: "first",
  85. tableData: [],
  86. tableData1: [],
  87. multipleSelection: [],
  88. delList: [],
  89. editVisible: false,
  90. pageTotal: 0,
  91. pageTotal1: 0,
  92. form: {},
  93. idx: -1,
  94. id: -1,
  95. AboutDevice: [],
  96. userInfo: {
  97. type: ''
  98. },
  99. alertTypeList: []
  100. };
  101. },
  102. beforeCreate: function beforeCreate() {},
  103. created: function created() {
  104. this.alertTypeList = this.$MANUFACTURER.alertType.lockLog;
  105. this.userInfo = JSON.parse(localStorage.getItem('info'));
  106. if (this.$route.params.alertType) {
  107. this.query.alertType = this.$route.params.alertType;
  108. }
  109. this.getAboutDevice();
  110. },
  111. mounted: function mounted() {},
  112. methods: {
  113. selectTenantId: function selectTenantId(e) {
  114. localStorage.setItem('tenantId', e);
  115. this.reload();
  116. },
  117. restFun: function restFun() {
  118. var _this = this;
  119. this.query = {
  120. operType: "",
  121. operateName: "",
  122. operModul: "",
  123. pageSize: 10,
  124. pageNum: 1,
  125. startTime: '',
  126. endTime: ''
  127. };
  128. var q = {
  129. alertType: this.query.alertType,
  130. deviceNum: this.query.deviceName,
  131. startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"),
  132. endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"),
  133. deviceType: 1
  134. };
  135. var data = {
  136. pageNum: 1,
  137. pageSize: this.query.pageSize,
  138. q: this.searchParaProcess(q),
  139. orderBy: "alert_time desc"
  140. };
  141. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  142. var AboutDevice = _this.AboutDevice;
  143. res.data.list.map(function (li) {
  144. li.createAt = _this.time(+new Date(li.createAt));
  145. li.alertTime = _this.time(+new Date(li.alertTime * 1000));
  146. var resultArr = AboutDevice.filter(function (_item) {
  147. return _item.deviceNum == li.deviceNum;
  148. })[0];
  149. if (resultArr) {
  150. li.roomId = resultArr.id;
  151. li.roomName = resultArr.roomName;
  152. }
  153. li['alertTypeDesc'] = '';
  154. var alertTypeDesc = _this.alertTypeList.filter(function (item) {
  155. return item.code == li.alertType;
  156. })[0];
  157. if (alertTypeDesc) {
  158. li['alertTypeDesc'] = alertTypeDesc.desc;
  159. }
  160. });
  161. // this.$store.commit('increment', 1)
  162. _this.tableData = res.data.list;
  163. _this.pageTotal = res.data.total;
  164. });
  165. },
  166. // 查询和房间相关的设备
  167. getAboutDevice: function getAboutDevice() {
  168. var _this2 = this;
  169. var data = {
  170. pageNum: 0,
  171. pageSize: 0,
  172. q: stringify_default()({
  173. lockType: 1
  174. })
  175. };
  176. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  177. _this2.AboutDevice = res.data.list;
  178. _this2.getOperates();
  179. });
  180. },
  181. time: function time() {
  182. var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date();
  183. var date = new Date(time + 8 * 3600 * 1000); // 增加8小时
  184. return date.toJSON().substr(0, 19).replace("T", " ");
  185. },
  186. // 获取操作日志
  187. getOperates: function getOperates() {
  188. var _this3 = this;
  189. var data = {
  190. pageNum: 1,
  191. pageSize: this.query.pageSize,
  192. orderBy: "alert_time desc",
  193. q: stringify_default()({
  194. deviceType: 1,
  195. alertType: this.query.alertType
  196. })
  197. // orderType:"desc"
  198. };
  199. console.log(data);
  200. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  201. var AboutDevice = _this3.AboutDevice;
  202. res.data.list.map(function (li) {
  203. li.createAt = _this3.time(+new Date(li.createAt));
  204. li.alertTime = _this3.time(+new Date(li.alertTime * 1000));
  205. var resultArr = AboutDevice.filter(function (_item) {
  206. return _item.deviceNum == li.deviceNum;
  207. })[0];
  208. if (resultArr) {
  209. li.roomId = resultArr.id;
  210. li.roomName = resultArr.roomName;
  211. }
  212. li['alertTypeDesc'] = '';
  213. var alertTypeDesc = _this3.alertTypeList.filter(function (item) {
  214. return item.code == li.alertType;
  215. })[0];
  216. if (alertTypeDesc) {
  217. li['alertTypeDesc'] = alertTypeDesc.desc;
  218. }
  219. });
  220. _this3.tableData = res.data.list;
  221. _this3.pageTotal = res.data.total;
  222. });
  223. },
  224. //门锁报警同步刷新
  225. getlockAlert: function getlockAlert() {
  226. Object(api["d" /* httpGet */])("", this.$api.getLockAlert1).then(function (res) {});
  227. },
  228. searchParaProcess: function searchParaProcess(obj) {
  229. var myObj = obj;
  230. for (var i in myObj) {
  231. if (myObj[i] == '' || myObj[i] == null || myObj[i] == undefined || myObj[i] == 'Invalid date') {
  232. delete myObj[i];
  233. }
  234. }
  235. return stringify_default()(myObj);
  236. },
  237. // 触发搜索按钮
  238. handleSearch: function handleSearch() {
  239. var _this4 = this;
  240. // this.getlockAlert()
  241. this.query.pageNum = 1;
  242. var q = {
  243. alertType: this.query.alertType,
  244. deviceNum: this.query.deviceName,
  245. startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"),
  246. endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"),
  247. deviceType: 1
  248. };
  249. console.log(q);
  250. var data = {
  251. pageNum: this.query.pageNum,
  252. pageSize: this.query.pageSize,
  253. q: this.searchParaProcess(q),
  254. orderBy: "alert_time desc"
  255. };
  256. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  257. var AboutDevice = _this4.AboutDevice;
  258. res.data.list.map(function (li) {
  259. li.createAt = _this4.time(+new Date(li.createAt));
  260. li.alertTime = _this4.time(+new Date(li.alertTime * 1000));
  261. var resultArr = AboutDevice.filter(function (_item) {
  262. return _item.deviceNum == li.deviceNum;
  263. })[0];
  264. if (resultArr) {
  265. li.roomId = resultArr.id;
  266. li.roomName = resultArr.roomName;
  267. }
  268. li['alertTypeDesc'] = '';
  269. var alertTypeDesc = _this4.alertTypeList.filter(function (item) {
  270. return item.code == li.alertType;
  271. })[0];
  272. if (alertTypeDesc) {
  273. li['alertTypeDesc'] = alertTypeDesc.desc;
  274. }
  275. });
  276. // this.$store.commit('increment', 1)
  277. _this4.tableData = res.data.list;
  278. _this4.pageTotal = res.data.total;
  279. });
  280. // this.$set(this.query, "pageIndex", 1);
  281. },
  282. getSearchList: function getSearchList() {
  283. var _this5 = this;
  284. var q = {
  285. alertType: this.query.alertType,
  286. deviceNum: this.query.deviceName,
  287. startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"),
  288. endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"),
  289. deviceType: 1
  290. };
  291. var data = {
  292. pageNum: this.query.pageNum,
  293. pageSize: this.query.pageSize,
  294. q: this.searchParaProcess(q),
  295. orderBy: "alert_time desc"
  296. };
  297. Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) {
  298. var AboutDevice = _this5.AboutDevice;
  299. res.data.list.map(function (li) {
  300. li.createAt = _this5.time(+new Date(li.createAt));
  301. li.alertTime = _this5.time(+new Date(li.alertTime * 1000));
  302. var resultArr = AboutDevice.filter(function (_item) {
  303. return _item.deviceNum == li.deviceNum;
  304. })[0];
  305. if (resultArr) {
  306. li.roomId = resultArr.id;
  307. li.roomName = resultArr.roomName;
  308. }
  309. li['alertTypeDesc'] = '';
  310. var alertTypeDesc = _this5.alertTypeList.filter(function (item) {
  311. return item.code == li.alertType;
  312. })[0];
  313. if (alertTypeDesc) {
  314. li['alertTypeDesc'] = alertTypeDesc.desc;
  315. }
  316. });
  317. _this5.tableData = res.data.list;
  318. _this5.pageTotal = res.data.total;
  319. });
  320. },
  321. // 分页导航
  322. handlePageChange: function handlePageChange(val) {
  323. this.query.pageNum = val;
  324. this.getSearchList();
  325. },
  326. handleSizeChange: function handleSizeChange(val) {
  327. this.query.pageNum = 1;
  328. this.query.pageSize = val;
  329. this.getSearchList();
  330. }
  331. }
  332. });
  333. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-802dfa0a","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/warningLog.vue
  334. 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-date-picker',{staticClass:"handle-input mr10",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",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 mr10",attrs:{"size":"small","placeholder":"设备号","clearable":true},model:{value:(_vm.query.deviceName),callback:function ($$v) {_vm.$set(_vm.query, "deviceName", $$v)},expression:"query.deviceName"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","clearable":true,"placeholder":"报警类型"},model:{value:(_vm.query.alertType),callback:function ($$v) {_vm.$set(_vm.query, "alertType", $$v)},expression:"query.alertType"}},_vm._l((_vm.alertTypeList),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1),_vm._v(" "),_c('el-button',{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',{staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.restFun}},[_vm._v("重置")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header","height":"650"}},[_c('el-table-column',{attrs:{"label":"序号","type":"index","width":"80"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(_vm.pageTotal - ((_vm.query.pageNum-1)*_vm.query.pageSize) - scope.$index)+"\n ")]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"roomName","label":"房间名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"alertTime","label":"报警时间"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"报警类型"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.alertTypeDesc))])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, sizes, prev, pager, next, jumper","current-page":_vm.query.pageNum,"page-size":_vm.query.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange,"size-change":_vm.handleSizeChange}})],1)],1)])}
  335. var staticRenderFns = []
  336. var esExports = { render: render, staticRenderFns: staticRenderFns }
  337. /* harmony default export */ var views_warningLog = (esExports);
  338. // CONCATENATED MODULE: ./src/views/warningLog.vue
  339. function injectStyle (ssrContext) {
  340. __webpack_require__("AxG5")
  341. }
  342. var normalizeComponent = __webpack_require__("VU/8")
  343. /* script */
  344. /* template */
  345. /* template functional */
  346. var __vue_template_functional__ = false
  347. /* styles */
  348. var __vue_styles__ = injectStyle
  349. /* scopeId */
  350. var __vue_scopeId__ = "data-v-802dfa0a"
  351. /* moduleIdentifier (server only) */
  352. var __vue_module_identifier__ = null
  353. var Component = normalizeComponent(
  354. warningLog,
  355. views_warningLog,
  356. __vue_template_functional__,
  357. __vue_styles__,
  358. __vue_scopeId__,
  359. __vue_module_identifier__
  360. )
  361. /* harmony default export */ var src_views_warningLog = __webpack_exports__["default"] = (Component.exports);
  362. /***/ })
  363. });