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

418 lines
13 KiB

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