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

8855 lines
375 KiB

  1. webpackJsonp([9,56],{
  2. /***/ "+8yl":
  3. /***/ (function(module, exports) {
  4. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAgAElEQVR4Xu1dB3hcxbX+5967fVe72qZmYYNcwQaMgVBNTUhieih+vBDaA0JISMhLKB81PAdTEhI6IZRASIAYeDxjOrGx6WAcmg3Y4IJtaYvaavveMu87syvFlotW0jaHjL/9VrLmTjn/nDOnzVyGf4HS3t4+VlGUsZzzcYyxZs75ZM65nzFmA+DknDsAOBhjbpou5zwGIMkYSwJIMMZSnPNOxthnnPMOXdfXGIaxZsyYMRt2dPKwHW0CoVDIIcsyAXgA5/w7jLFxnPNmAAK8EpZuACEA6wC8pSjK25zzFX6/f2MJ+yh7UzsEwOFwuI1zPosxNgPA/gAmlJ0yeU4HY5uRqJcx9iLn/FVFURb4fL6a5/CaBTgajU40m83fTafTxwH4RkHcVgLXYvtIcs4XAZgvy/KCQCDQUeyDlaxXcwBHo9GjOefncc6PMAzDLklSJekx0r6iAF7SNO3ulpaWN0baSDmeqwmAV61aZXG73edyzk8HsG85JlqJNkmkK4ryiiRJD3q93r9Wos+h+qgqwJxz1tnZ+V+GYfwUwG5DDXZH+LthGGKYsiwvYYzdHAgEFlRz3FUDuK+v7/hkMjlHkqR/CWC3A+Irdrt9jsvlWlwNoCsOcEdHx66SJM0BcEI1JlzpPklsU2GMPSHL8lV+v/+zSo6hYgBzzpWenp5fZLPZqyRJsldykjXUF5lZ/x0MBh+o1JgqAnA0Gt1L1/V7OeczdhCtuKz0Z4w9brFYfuR2u8mZUtZSdoDb29t/LsvyDQBMZZ3Jjtf4Bl3Xf9rc3PxUOYdeNoB7e3vrNU37o6Zp3xvkDSrnfHaotknjtlqtt3k8nl8wxtRyDL4sAG/cuHGSoijPcM4n/Bvc7cNGIDPG3pFl+YRyeMNKDnBvb++30un0XyRJ8pdjRf4Lt7nOMIyTm5qa3ivlHEsKcCQSOZlz/hiAHcK/WEpClqItwzB6rFbr8fX19UtK0Z4wz0rVUCQSOYdzft9WIjCl6uJr047NZjuurq5ufikmXBKAQ6HQzxhjvyvFgL7ubRCDaJpmOJ3OUz0ezxOjpceoAY5Go+eSjVttZYrsa8VkImc/ZFkB/c6k/PSIaKTM0IcXvlVVha5po6Vf2Z6nMTudzm87nc4XR9PJqADu6uo6VVXVx6oBrqwoMJvNsFitMCsKcpqGvt4YEn0xpJJJ5HI5aGre8iCwzRZL/kPP2Gyo83jgsNmgcw4Cm+rqui4+Bn0KQYPREHc0zxLA9DGbzfv7fL63R9rWiAGOx+MzU6nUIs65VCmAxYQtFrjcbmRSKXRs2IAvPv0U69euQay7B7GeHvR2dyHR14dMJgM1lxsA2GqzwWq3wWKxwuZwoN7nRb3PD39DAwKNTWhoaoLb64XNZoPD5RKLgtqhhVKtUgC5yzCMA1taWj4fyThGBPCaNWsazWbzB4qiNIyk0+E+QxMlgJx1degMhfDR+0ux7M03sXLFCgFqKpEgb77gTpPZDOJuWYjogjLPOXQSzQXO1HUNuWxOcCtJAJvdDovFAnd9PZrGtKJhTAvGtbVh4m5TUe/3C7AFsQtcTRyfy2YFl1dicRuGsVLTtP1bW1uH7docEcDt7e3LJEmaXu7JEVGJuETkVDyOhc89j0XPPYsvPvtUENzpcuX3XEUZ7poZqC/25gLwmqYJUZ1Jp8WCat15F7Ts1Iq2KVMwdfpeYvFwbsDj9cEXCAiAk4lEnssJ/M3zt0Y8psEPFjj5taamppnDbXTYAHd1dT2gqupZlQDXZDIJrlr65pt44qE/YfmyZYLIxMmyLAuQy1FobgR2OpkEcTtjkhiH2WoVdiUtuDFjx2G3PffEbtOnw+v3o6+vTyht5aILzdVkMv3e5/NdPJw5Dwvg9vb28xlj95Q7ItS/1xKQCx5/HI/cfZfgEo/XO5y5lbQuAU6cTiWbyYjxWK1WtIwbh1knnYzDZ80SnE8KXrnoQ1uKJEnHNjY2PlPs5IoGOBwO7845/7BcK7R/wGKlms1Cy338gfvx0O23C6XK4XSWjWOLJdbgekTwZDwuwD765JNx5k8uEmKbQC4XnShB32w2j/d6vZS8P2QpCmBKinO5XB8wxiYP2eIoK4g91+fHk39+GA/dfpvQaGk/LJc4HuVwBZDZbBZdkQhO/P7pOPOiiwqiPc/tpS4FveSJYDB4cjFtFwVwJBK5knP+P8U0OJo6NHjaz0hLnvvLXwotmDTcWgW3f64EMmnViXgcF115FY485hhEw+GycTH1yzk/vrGx8f+GoveQAEcikfGcc7LByh5AIBuXFJU5v/hvrFq+HN5AoObB3RTknq4utE2ejGt/fxskWRJ7crkKnaGSZXlSIBCIb6+PIQHu6Oh4QZKko8o10E3bJe59dt483HXjXPiDDWVTVso5l77eHpz/y0txxDHHINY9bLN1WENjjN0VDAYvHDHAnZ2dx+m6/vSweh1hZXJSkAPhxssvw6oVK4RZUuuieWtT7e3qwjcOOQQ//9V1SJADpkym3CaSY3owGPxgW2TfJgdTFmQ4HF7LGGsZIWbFP8Y5PD4f3l2yBLde9ysoZrNwYOyIhbTqQGMjLr/xJnj8fuQymbJOQ9O0hS0tLUcMG+CKRokYgz8QwD033YgF8+YJL9GOWkiHIK36p1dfjf0OORS9ZRbTZKp5PJ6D7Hb7Vs9EbZWDiXsjkQglaLdVgtDkDybnwc1XXIFVK5YLu3dHLpFQBy645HIcO/tUdEYiZZ8KY2xBMBg8ZmsdbRXgrq6uc1RVva9cxvrggZBTg6JCcy/5Jcj5SG7IHbl0hsM47bzzcMrZ56AvFhsIUpRrToV4997Nzc3vD+5jC4A553IkEvmIc75rpQAmheq1l17CHXOvh6uurlx0qFi7PZ2dOGb2bHz/hxcIU4nEaAXKUw0NDd8bEuDOzs4TNU17slLg0oBIJD/z2KN49L77hEuykn2Xg/AUkz7q+BNxxo9/jFwuC12rCMDUyaSGhoYvN53TFhzc3d29OJvNziyXw3yLFcaYAPWRe+7Bc0/M2+H3X5ofKVbfPPZY4ZuuVGoQ+cAtFssNXq/38m0CHAqFpgGggMKQDpBSrXzqyu5w4J6bb8KSF18UQYYdpRCVdJ0jl1NhsZggSUyYveTR+s6J38MPLrxQBCIqkftF+7Asy+1+v39i4fYgQcbNgAyHw9cBuKqSBCaAKYXmrrlz8cbfX9mhAE4kslBkhuYWH2J9acGtEmPo7uzE8aedhtPO/6FILarQHtyfR3Z0U1PTs/0YDgZ4OYBdqwHwndf/Gm8uXFjTABPHGgZHJqOiL55BQ7AOZ599MFw2G35724tCWzaZZBFoOP2HF+CkM89CX6y37Fr0ILz+2NDQcN4WAIdCIbrJZsTZeyNdFP0cfPucOXjr1YVwe+pH2lRZnzM4R7wvA003MKa5HgfstwuOPHxXjNltDD5c8hnm3PisCDCYTTIiHR244NLLcOzs2RWxgwdNPKrr+rjm5ubUZiI6Fov9TzKZvLLSNmit7sFkj2ezKrIZDRwcVosJ43cJYsZe47DP3uMwttWHXE4TIbYVn3fg5t+/iGxOg0lm+bDh1VfjkG8dJcR1JUtB2Zrl9Xqf2wzgaDT6mq7rB1VQv8orAQUt+uG77sQLTz1VFS06n3GZz7zUNAPZjCpEsT/gQmuLB1MmNWPari2YOLERDo8d2XgG6UIdu92Mje09uPGW59HVnYQiiVxm/OzaazFljz1F6m0lC+33DofjDrfb/ZMBgOmuR0mSVjLGzJUczADALhfm/elBPP3IIyKDo1yLjDTcvOZrCO7LZjUBqNVmgs1qgs1mRjDgwridfBjb6sVOO/mwU6sPDrtZeNjSaVVw9abjoz2XwP71jQuwdl0XJKahobkZl14/VyTnkQu2CuXjYDC4F2NME0pWJBI5hXP+eBUGIrokR8fzT87Dn+++Gw5n6QBWVR3iQ44GDkgyA/2z2UwIBFwI+Fziu6GhDk0NbvFxuaxwOiww2cxQMypSKcp/3nb2JoFttSp
  5. /***/ }),
  6. /***/ "/xI2":
  7. /***/ (function(module, exports) {
  8. // removed by extract-text-webpack-plugin
  9. /***/ }),
  10. /***/ "36ME":
  11. /***/ (function(module, exports) {
  12. // removed by extract-text-webpack-plugin
  13. /***/ }),
  14. /***/ "7HYI":
  15. /***/ (function(module, exports) {
  16. // removed by extract-text-webpack-plugin
  17. /***/ }),
  18. /***/ "7qU6":
  19. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  20. "use strict";
  21. var validateIdent = {
  22. aIdentityCode_City: { // 城市代码列表
  23. 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林",
  24. 23: "黑龙江 ", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西",
  25. 37: "山东", 41: "河南", 42: "湖北 ", 43: "湖南", 44: "广东", 45: "广西", 46: "海南",
  26. 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏 ", 61: "陕西", 62: "甘肃",
  27. 63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外 "
  28. },
  29. IdentityCode_isCardNo: function IdentityCode_isCardNo(card) {
  30. //检查号码是否符合规范,包括长度,类型
  31. var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  32. if (reg.test(card) === false) {
  33. return false;
  34. }
  35. return true;
  36. },
  37. IdentityCode_checkProvince: function IdentityCode_checkProvince(card) {
  38. //取身份证前两位,校验省份
  39. var province = card.substr(0, 2);
  40. if (validateIdent.aIdentityCode_City[province] == undefined) {
  41. return false;
  42. }
  43. return true;
  44. },
  45. IdentityCode_checkBirthday: function IdentityCode_checkBirthday(card) {
  46. //检查生日是否正确,15位以'19'年份来进行补齐。
  47. var len = card.length;
  48. //身份证15位时,次序为省(3位)市(3位)年(2位)月(2位)日(2位)校验位(3位),皆为数字
  49. if (len == '15') {
  50. var re_fifteen = /^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/;
  51. var arr_data = card.match(re_fifteen); // 正则取号码内所含出年月日数据
  52. var year = arr_data[2];
  53. var month = arr_data[3];
  54. var day = arr_data[4];
  55. var birthday = new Date('19' + year + '/' + month + '/' + day);
  56. return validateIdent.IdentityCode_verifyBirthday('19' + year, month, day, birthday);
  57. }
  58. //身份证18位时,次序为省(3位)市(3位)年(4位)月(2位)日(2位)校验位(4位),校验位末尾可能为X
  59. if (len == '18') {
  60. var re_eighteen = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/;
  61. var arr_data = card.match(re_eighteen); // 正则取号码内所含出年月日数据
  62. var year = arr_data[2];
  63. var month = arr_data[3];
  64. var day = arr_data[4];
  65. var birthday = new Date(year + '/' + month + '/' + day);
  66. return validateIdent.IdentityCode_verifyBirthday(year, month, day, birthday);
  67. }
  68. return false;
  69. },
  70. IdentityCode_verifyBirthday: function IdentityCode_verifyBirthday(year, month, day, birthday) {
  71. //校验日期 ,15位以'19'年份来进行补齐。
  72. var now = new Date();
  73. var now_year = now.getFullYear();
  74. //年月日是否合理
  75. if (birthday.getFullYear() == year && birthday.getMonth() + 1 == month && birthday.getDate() == day) {
  76. //判断年份的范围(3岁到150岁之间)
  77. var time = now_year - year;
  78. if (time >= 3 && time <= 150) {
  79. return true;
  80. }
  81. return false;
  82. }
  83. return false;
  84. },
  85. IdentityCode_checkParity: function IdentityCode_checkParity(card) {
  86. //校验位的检测
  87. card = validateIdent.IdentityCode_changeFivteenToEighteen(card); // 15位转18位
  88. var len = card.length;
  89. if (len == '18') {
  90. var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
  91. var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
  92. var cardTemp = 0,
  93. i,
  94. valnum;
  95. for (i = 0; i < 17; i++) {
  96. cardTemp += card.substr(i, 1) * arrInt[i];
  97. }
  98. valnum = arrCh[cardTemp % 11];
  99. if (valnum == card.substr(17, 1)) {
  100. return true;
  101. }
  102. return false;
  103. }
  104. return false;
  105. },
  106. IdentityCode_changeFivteenToEighteen: function IdentityCode_changeFivteenToEighteen(card) {
  107. //15位转18位身份证号
  108. if (card.length == '15') {
  109. var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
  110. var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
  111. var cardTemp = 0,
  112. i;
  113. card = card.substr(0, 6) + '19' + card.substr(6, card.length - 6);
  114. for (i = 0; i < 17; i++) {
  115. cardTemp += card.substr(i, 1) * arrInt[i];
  116. }
  117. card += arrCh[cardTemp % 11];
  118. return card;
  119. }
  120. return card;
  121. },
  122. IdentityCodeValid: function IdentityCodeValid(card) {
  123. // 身份证号码检验主入口
  124. var pass = true;
  125. var sex = '';
  126. //是否为空
  127. if (pass && card === '') pass = false;
  128. //校验长度,类型
  129. if (pass && validateIdent.IdentityCode_isCardNo(card) === false) pass = false;
  130. //检查省份
  131. if (pass && validateIdent.IdentityCode_checkProvince(card) === false) pass = false;
  132. //校验生日
  133. if (pass && validateIdent.IdentityCode_checkBirthday(card) === false) pass = false;
  134. //检验位的检测
  135. if (pass && validateIdent.IdentityCode_checkParity(card) === false) pass = false;
  136. if (pass) {
  137. var iCard = validateIdent.IdentityCode_changeFivteenToEighteen(card);
  138. if (parseInt(iCard.charAt(16)) % 2 == 0) {
  139. sex = "0"; // 女生
  140. } else {
  141. sex = "1"; // 男生
  142. }
  143. return true;
  144. } else {
  145. return false;
  146. }
  147. }
  148. };
  149. /* harmony default export */ __webpack_exports__["a"] = (validateIdent.IdentityCodeValid); //导出
  150. /***/ }),
  151. /***/ "BXO0":
  152. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  153. "use strict";
  154. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  155. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  156. var stringify = __webpack_require__("mvHQ");
  157. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  158. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  159. var api = __webpack_require__("gyMJ");
  160. // EXTERNAL MODULE: ./src/utils/resetMessage.js
  161. var resetMessage = __webpack_require__("46Yo");
  162. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/getFinger.vue
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. var Ip;
  179. var getFinger_select = 0; //第几枚指纹
  180. var contectStatus; //判断设备是否连接,0表示已连接
  181. var fingerStatus; //判断手指是否按下,0表示未按下
  182. var index; //手指序号
  183. var strBmp; //bmp图像
  184. var strFTP; //模板 一般存于数据库
  185. var strFTR1; //特征1
  186. var strFTR2; //特征1
  187. var strFTR3; //特征3
  188. var fingerData = void 0;
  189. var WS_RET_ERR_OK = "0"; //操作成功
  190. var WS_RET_ERR_PARAM = "-1"; //参数错误
  191. var WS_RET_ERR_MEMORY = "-2"; //内存分配失败,没有分配到足够的内存
  192. var WS_RET_ERR_FUN = "-3"; //功能未实现
  193. var WS_RET_ERR_DEVICE = "-4"; //设备不存在
  194. var WS_RET_ERR_INIT = "-5"; //设备未初始化
  195. var WS_RET_ERR_UNKOWN = "-6"; //非法错误号
  196. var WS_RET_ERR_EXTRACT = "-7"; //提取特征失败或合成模板失败
  197. var WS_RET_ERR_ELSE = "-9"; //其它错误
  198. var WS_FM_Init = "FM_Init";
  199. //{"reqcode":"FM_Init"}
  200. //{"repcode":"FM_Init","result":"xx"}
  201. var WS_FM_Deinit = "FM_Deinit";
  202. //{"reqcode":"FM_Deinit"}
  203. //{"repcode":"FM_Deinit","result":"xx"}
  204. var WS_FM_GetDevVerison = "FM_GetDevVerison";
  205. //{"reqcode":"FM_GetDevVerison"}
  206. //{"reqcode":"FM_GetDevVerison","result":"xx":"version":"string"}
  207. var WS_FM_GetSdkVerison = "FM_GetSdkVerison";
  208. //{"reqcode":"FM_GetSdkVerison"}
  209. //{"reqcode":"FM_GetSdkVerison","result":"xx":"version":"string"}
  210. var WS_FM_DetectFinger = "FM_DetectFinger";
  211. //{"reqcode":"FM_DetectFinger"}
  212. //{"reqcode":"FM_DetectFinger","result":"xx"}
  213. var WS_FM_Extract = "FM_Extract";
  214. //{"reqcode":"FM_Extract","index":"(1~6)"}
  215. //{"reqcode":"FM_Extract","result":"xx","feature":"base64"}
  216. var WS_FM_Enroll = "FM_Enroll";
  217. var WS_FPM_FeatureMatch = "FM_DetectFinger";
  218. //{"reqcode":"FM_Enroll"}
  219. //{"reqcode":"FM_Extract","result":"xx","feature":"base64"}
  220. //--------------------------------------------------------------//
  221. // 清空显示页面
  222. //--------------------------------------------------------------//
  223. function ClearPage_OnClick() {}
  224. // document.getElementById('mb').value = "";;
  225. // document.getElementById("output").textContent ="";
  226. //--------------------------------------------------------------//
  227. // FPM_Init
  228. //--------------------------------------------------------------//
  229. function FM_Init_OnClick() {
  230. ClearPage_OnClick();
  231. var obj = {
  232. "reqcode": WS_FM_Init
  233. };
  234. var str = stringify_default()(obj);
  235. plguin_send(str);
  236. }
  237. //--------------------------------------------------------------//
  238. // FM_Deinit
  239. //--------------------------------------------------------------//
  240. function FM_Deinit_OnClick() {
  241. ClearPage_OnClick();
  242. var obj = {
  243. "reqcode": WS_FM_Deinit
  244. };
  245. var str = stringify_default()(obj);
  246. plguin_send(str);
  247. }
  248. //--------------------------------------------------------------//
  249. // FM_GetSdkVerison
  250. //--------------------------------------------------------------//
  251. function FM_GetSdkVerison_OnClick() {
  252. ClearPage_OnClick();
  253. var obj = {
  254. "reqcode": WS_FM_GetSdkVerison
  255. };
  256. var str = stringify_default()(obj);
  257. plguin_send(str);
  258. }
  259. //--------------------------------------------------------------//
  260. // FM_GetDevVerison
  261. //--------------------------------------------------------------//
  262. function FM_GetDevVerison_OnClick() {
  263. ClearPage_OnClick();
  264. var obj = {
  265. "reqcode": WS_FM_GetDevVerison
  266. };
  267. var str = stringify_default()(obj);
  268. plguin_send(str);
  269. }
  270. //--------------------------------------------------------------//
  271. // FPM_FeatureExtract
  272. //--------------------------------------------------------------//
  273. function FM_Extract_OnClick() {
  274. // ClearPage_OnClick();
  275. var obj = {
  276. "reqcode": WS_FM_Extract,
  277. "index": getFinger_select + 1 + ""
  278. };
  279. var str = stringify_default()(obj);
  280. plguin_send(str);
  281. }
  282. //--------------------------------------------------------------//
  283. // FM_Enroll
  284. //--------------------------------------------------------------//
  285. function FM_Enroll_OnClick() {
  286. var obj = {
  287. "reqcode": WS_FM_Enroll
  288. };
  289. var str = stringify_default()(obj);
  290. plguin_send(str);
  291. }
  292. //--------------------------------------------------------------//
  293. // FPM_FeatureMatch
  294. //--------------------------------------------------------------//
  295. function FM_DetectFinger_OnClick() {
  296. var obj = {
  297. "reqcode": WS_FM_DetectFinger
  298. };
  299. var str = stringify_default()(obj);
  300. plguin_send(str);
  301. }
  302. function errAlert(iret) {
  303. if (iret === WS_RET_ERR_OK) {
  304. resetMessage["a" /* message */].success("操作成功");
  305. } else if (iret === WS_RET_ERR_PARAM) {
  306. resetMessage["a" /* message */].success("参数错误");
  307. } else if (iret === WS_RET_ERR_MEMORY) {
  308. resetMessage["a" /* message */].success("内存分配失败,没有分配到足够的内存");
  309. } else if (iret === WS_RET_ERR_FUN) {
  310. resetMessage["a" /* message */].success("功能未实现");
  311. } else if (iret === WS_RET_ERR_DEVICE) {
  312. resetMessage["a" /* message */].success("设备不存在");
  313. } else if (iret === WS_RET_ERR_EXTRACT) {
  314. resetMessage["a" /* message */].success("提取特征失败或合成模板失败");
  315. } else if (iret === WS_RET_ERR_INIT) {
  316. resetMessage["a" /* message */].success("设备未初始化");
  317. } else if (iret === WS_RET_ERR_UNKOWN) {
  318. resetMessage["a" /* message */].success("非法错误号");
  319. } else if (iret === WS_RET_ERR_ELSE) {
  320. resetMessage["a" /* message */].success("其它错误");
  321. }
  322. }
  323. var mb = null;
  324. //显示信息
  325. var log = function log(s) {
  326. if (document.readyState !== "complete") {
  327. log.buffer.push(s);
  328. } else {
  329. // document.getElementById("output").textContent += (s + "\n");
  330. // document.getElementById("outputdiv").scrollTop = document.getElementById("outputdiv").scrollHeight;
  331. }
  332. };
  333. log.buffer = [];
  334. //显示连接状态
  335. function setConnected(status) {
  336. // document.getElementById("socketstatus").innerHTML = status;
  337. }
  338. var ws = null;
  339. //连接
  340. function plguin_connect() {
  341. if (ws != null) {
  342. console.log("现已连接");
  343. return;
  344. }
  345. var url = Ip;
  346. if ('WebSocket' in window) {
  347. ws = new WebSocket(url);
  348. console.log(ws);
  349. } else if ('MozWebSocket' in window) {
  350. ws = new MozWebSocket(url);
  351. } else {
  352. log("unsupported WebSocket");
  353. return;
  354. }
  355. ws.onopen = function () {
  356. log("open");
  357. setConnected("已连接");
  358. //设置发信息送类型为:ArrayBuffer
  359. ws.binaryType = "arraybuffer";
  360. };
  361. ws.onmessage = function (e) {
  362. log("[recv]:" + e.data.toString());
  363. var s = e.data.toString();
  364. var obj = JSON.parse(s);
  365. //检测设备
  366. if (obj.repcode == WS_FM_Init) {
  367. console.log(obj);
  368. contectStatus = obj.result;
  369. }
  370. //关闭设备
  371. else if (obj.repcode == WS_FM_Deinit) {
  372. // console.log(222)
  373. errAlert(obj.result);
  374. }
  375. //插件版本
  376. else if (obj.repcode == WS_FM_GetDevVerison) {
  377. //
  378. var info = "Ver:" + obj.version;
  379. resetMessage["a" /* message */].success(info);
  380. }
  381. //设备版本
  382. else if (obj.repcode == WS_FM_GetSdkVerison) {
  383. //
  384. resetMessage["a" /* message */].success(obj.version);
  385. }
  386. //提取手指特征
  387. else if (obj.repcode == WS_FM_Extract) {
  388. if (obj.result == WS_RET_ERR_OK) {
  389. if (0 == getFinger_select) {
  390. console.log(obj);
  391. // alert("指纹采集成功,请松开手指后在按下")
  392. resetMessage["a" /* message */].success("指纹采集成功,请松开手指后在按下");
  393. // this.DetectFinger()
  394. }
  395. if (1 == getFinger_select) {
  396. console.log(obj);
  397. console.log("第二次数据");
  398. // alert("指纹采集成功,请松开手指后在按下")
  399. resetMessage["a" /* message */].success("指纹采集成功,请松开手指后在按下");
  400. }
  401. if (2 == getFinger_select) {
  402. console.log(obj);
  403. fingerData = obj;
  404. console.log("第三次数据");
  405. // alert("指纹采集成功")
  406. resetMessage["a" /* message */].success("指纹采集成功");
  407. }
  408. getFinger_select++;
  409. } else errAlert(obj.result);
  410. } else if (obj.repcode == WS_FM_Enroll) {
  411. strFTP = obj.template;
  412. errAlert(obj.result);
  413. if (obj.result == WS_RET_ERR_OK) {
  414. console.log(obj);
  415. }
  416. } else if (obj.repcode == WS_FPM_FeatureMatch) {
  417. console.log(obj);
  418. fingerStatus = obj.result;
  419. console.log(fingerStatus);
  420. // errAlert(obj.result);
  421. } else {
  422. log("Unkown");
  423. }
  424. };
  425. ws.onclose = function (e) {
  426. log("closed");
  427. ws = null;
  428. };
  429. ws.onerror = function (e) {
  430. log("error");
  431. ws = null;
  432. };
  433. }
  434. //断开连接
  435. function plguin_close() {
  436. if (ws != null) {
  437. ws.close();
  438. ws = null;
  439. setConnected("已断开");
  440. }
  441. }
  442. function plguin_send(s) {
  443. log("[send]:" + s);
  444. if (ws != null) {
  445. ws.send(s);
  446. } else {
  447. log("[send]: ws null");
  448. }
  449. }
  450. function getLocalIp(cb) {
  451. if (window.navigator.userAgent.indexOf("MSIE") == -1 && window.navigator.userAgent.indexOf("Edge") == -1 && window.navigator.userAgent.indexOf("Trident") == -1) {
  452. var conn = new RTCPeerConnection({
  453. iceServers: []
  454. });
  455. var noop = function noop() {};
  456. conn.onicecandidate = function (ice) {
  457. if (ice.candidate) {
  458. //使用正则获取ip
  459. var arr = ice.candidate.candidate.split(' ');
  460. var ip_addr = null;
  461. for (var i in arr) {
  462. if (arr[i].indexOf('.local') != -1) {
  463. ip_addr = arr[i];
  464. }
  465. }
  466. cb(ip_addr);
  467. conn.onicecandidate = noop;
  468. }
  469. };
  470. conn.createDataChannel('dataChannel');
  471. conn.createOffer(conn.setLocalDescription.bind(conn), noop);
  472. } else {
  473. try {
  474. var locator = new ActiveXObject("WbemScripting.SWbemLocator");
  475. var service = locator.ConnectServer("."); //连接本机服务器
  476. var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPEnabled=TRUE");
  477. //查询使用SQL标准
  478. var e = new Enumerator(properties);
  479. for (; !e.atEnd(); e.moveNext()) {
  480. var p = e.item();
  481. var desc = "Caption:" + p.Caption + " "; //网卡描述,也可以使用Description
  482. var ip = "IP:" + p.IPAddress(0) + " "; //IP地址为数组类型,子网俺码及默认网关亦同
  483. var mac = "MAC:" + p.MACAddress + " "; //网卡物理地址
  484. var ipSplit = ip.split(':');
  485. ip = ipSplit[1] ? ipSplit[1] : ipSplit[0];
  486. cb(ip);
  487. }
  488. } catch (e) {
  489. //IE获取失败可提示用户,设置相关信任
  490. }
  491. }
  492. }
  493. /* harmony default export */ var getFinger = ({
  494. data: function data() {
  495. return {
  496. ipAddress: '',
  497. text: '',
  498. loading: '',
  499. list: [],
  500. isdiable: true, //是否重新采集
  501. fingerStatus: fingerStatus //判断手指是否按下,0表示未按下
  502. };
  503. },
  504. mounted: function mounted() {},
  505. methods: {
  506. getFingerData: function getFingerData(value, callback) {
  507. console.log(fingerData, 'fingerData');
  508. callback(fingerData);
  509. },
  510. //连接
  511. contect: function contect() {
  512. plguin_connect();
  513. },
  514. //检测设备
  515. Init: function Init() {
  516. FM_Init_OnClick();
  517. },
  518. //检测手指
  519. DetectFinger: function DetectFinger() {
  520. var _this = this;
  521. if (contectStatus == '0') {
  522. FM_DetectFinger_OnClick();
  523. setTimeout(function () {
  524. _this.fingerStatus = fingerStatus;
  525. }, 1000);
  526. console.log("finger", this.fingerStatus);
  527. } else {
  528. this.Init();
  529. this.$message("设备未连接,请重新尝试");
  530. }
  531. },
  532. //提取特征
  533. Extract: function Extract() {
  534. FM_Extract_OnClick();
  535. },
  536. //合成模板
  537. Enroll: function Enroll() {
  538. FM_Enroll_OnClick();
  539. },
  540. //获取本机IP地址
  541. getIp: function getIp() {
  542. getLocalIp(function (ip) {
  543. console.log(ip);
  544. });
  545. var str = window.location.host.split(':');
  546. console.log(window.location.host, str);
  547. Ip = "ws://" + '127.0.0.1' + ":9618";
  548. // httpGet(data,'').then(res => {
  549. // let str = res.data
  550. // let targetStr = str.substring(str.indexOf('{'), str.lastIndexOf('}') + 1);
  551. // Ip = "ws://" + JSON.stringify(targetStr) + ":9618"
  552. // // Ip = "ws://" + '192.168.1.111' + ":9618"
  553. // console.log(Ip)
  554. // })
  555. },
  556. //重新采集
  557. onload: function onload() {
  558. getFinger_select = 0;
  559. this.isdiable = true;
  560. },
  561. //loading
  562. openFullScreen: function openFullScreen() {
  563. this.loading = this.$loading({
  564. lock: true,
  565. text: this.text,
  566. spinner: 'el-icon-loading',
  567. background: 'rgba(0, 0, 0, 0.7)'
  568. });
  569. }
  570. },
  571. created: function created() {
  572. var _this2 = this;
  573. this.getIp();
  574. this.text = '设备连接中';
  575. this.openFullScreen();
  576. setTimeout(function () {
  577. _this2.contect();
  578. setTimeout(function () {
  579. _this2.Init();
  580. _this2.loading.close();
  581. }, 500);
  582. }, 500);
  583. },
  584. watch: {
  585. //监听手指是否按下
  586. fingerStatus: function fingerStatus(news, olds) {
  587. var _this3 = this;
  588. console.log("watch", news);
  589. if (this.fingerStatus == 1 && news == 1) {
  590. this.Extract();
  591. this.fingerStatus = 2;
  592. if (getFinger_select == 2) {
  593. this.Enroll();
  594. setTimeout(function () {
  595. _this3.list.push(strFTP);
  596. _this3.isdiable = false;
  597. }, 500);
  598. console.log(this.list);
  599. }
  600. return;
  601. }
  602. if (news == 0) {
  603. this.$message("请按压手指");
  604. this.fingerStatus = 2;
  605. }
  606. }
  607. }
  608. });
  609. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-6f9da94a","hasScoped":false,"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/getFinger.vue
  610. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{on:{"click":function($event){return _vm.DetectFinger()}}}),_vm._v(" "),_c('div',{on:{"click":function($event){return _vm.getFingerData()}}}),_vm._v(" "),_c('div',{attrs:{"id":"my-button"},on:{"click":function($event){return _vm.onload()}}})])}
  611. var staticRenderFns = []
  612. var esExports = { render: render, staticRenderFns: staticRenderFns }
  613. /* harmony default export */ var views_getFinger = (esExports);
  614. // CONCATENATED MODULE: ./src/views/getFinger.vue
  615. function injectStyle (ssrContext) {
  616. __webpack_require__("/xI2")
  617. }
  618. var normalizeComponent = __webpack_require__("VU/8")
  619. /* script */
  620. /* template */
  621. /* template functional */
  622. var __vue_template_functional__ = false
  623. /* styles */
  624. var __vue_styles__ = injectStyle
  625. /* scopeId */
  626. var __vue_scopeId__ = null
  627. /* moduleIdentifier (server only) */
  628. var __vue_module_identifier__ = null
  629. var Component = normalizeComponent(
  630. getFinger,
  631. views_getFinger,
  632. __vue_template_functional__,
  633. __vue_styles__,
  634. __vue_scopeId__,
  635. __vue_module_identifier__
  636. )
  637. /* harmony default export */ var src_views_getFinger = __webpack_exports__["default"] = (Component.exports);
  638. /***/ }),
  639. /***/ "I0e3":
  640. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  641. "use strict";
  642. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  643. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
  644. var helpers_typeof = __webpack_require__("pFYg");
  645. var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
  646. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js
  647. var object_assign = __webpack_require__("woOf");
  648. var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);
  649. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js
  650. var toConsumableArray = __webpack_require__("Gu7T");
  651. var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
  652. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/promise.js
  653. var promise = __webpack_require__("//Fk");
  654. var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
  655. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  656. var stringify = __webpack_require__("mvHQ");
  657. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  658. // EXTERNAL MODULE: ./node_modules/babel-runtime/regenerator/index.js
  659. var regenerator = __webpack_require__("Xxa5");
  660. var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
  661. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
  662. var asyncToGenerator = __webpack_require__("exGp");
  663. var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
  664. // EXTERNAL MODULE: ./node_modules/vue-schart/src/vue-schart.vue + 2 modules
  665. var vue_schart = __webpack_require__("S4mo");
  666. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  667. var api = __webpack_require__("gyMJ");
  668. // EXTERNAL MODULE: ./src/components/zTree1.vue + 2 modules
  669. var zTree1 = __webpack_require__("6Ljo");
  670. // EXTERNAL MODULE: ./src/components/usercontent.vue + 2 modules
  671. var usercontent = __webpack_require__("iPDe");
  672. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/personLi.vue
  673. //
  674. //
  675. //
  676. //
  677. //
  678. //
  679. //
  680. //
  681. //
  682. //
  683. //
  684. //
  685. //
  686. //
  687. //
  688. //
  689. //
  690. //
  691. //
  692. //
  693. //
  694. //
  695. //
  696. //
  697. //
  698. //
  699. //
  700. //
  701. /* harmony default export */ var personLi = ({
  702. name: "personLi",
  703. props: ['data'],
  704. methods: {}
  705. });
  706. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-2620c9c1","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/components/personLi.vue
  707. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"person-item"},[_c('div',{staticClass:"item-content"},[(_vm.data.sex == 1)?_c('img',{staticClass:"avator",attrs:{"src":__webpack_require__("+8yl"),"alt":""}}):_vm._e(),_vm._v(" "),(_vm.data.sex == 2)?_c('img',{staticClass:"avator",attrs:{"src":__webpack_require__("an/0"),"alt":""}}):_vm._e(),_vm._v(" "),_c('div',[_c('div',{staticClass:"person-content"},[_c('div',[_vm._v("姓名:")]),_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.data.name))])]),_vm._v(" "),_c('div',{staticClass:"person-content"},[_c('div',[_vm._v("身份证号:")]),_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.data.number))])]),_vm._v(" "),_c('div',{staticClass:"person-content"},[_c('div',[_vm._v("手机号:")]),_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.data.phone))])])])]),_vm._v(" "),(_vm.data.rommNameText)?_c('div',{staticClass:"person-bottom"},[_c('span',[_vm._v(_vm._s(_vm.data.rommNameText))])]):_c('div',{staticClass:"person-bottom"},[_vm._v("未入住")]),_vm._v(" "),(_vm.data.cardState == 1)?_c('div',{staticClass:"person-normal normal"},[_vm._v("正常")]):(_vm.data.type==12)?_c('div',{staticClass:"person-normal normal"},[_vm._v("企业")]):_c('div',{staticClass:"person-normal abnormal"},[_vm._v("异常")])])}
  708. var staticRenderFns = []
  709. var esExports = { render: render, staticRenderFns: staticRenderFns }
  710. /* harmony default export */ var components_personLi = (esExports);
  711. // CONCATENATED MODULE: ./src/components/personLi.vue
  712. function injectStyle (ssrContext) {
  713. __webpack_require__("36ME")
  714. }
  715. var normalizeComponent = __webpack_require__("VU/8")
  716. /* script */
  717. /* template */
  718. /* template functional */
  719. var __vue_template_functional__ = false
  720. /* styles */
  721. var __vue_styles__ = injectStyle
  722. /* scopeId */
  723. var __vue_scopeId__ = "data-v-2620c9c1"
  724. /* moduleIdentifier (server only) */
  725. var __vue_module_identifier__ = null
  726. var Component = normalizeComponent(
  727. personLi,
  728. components_personLi,
  729. __vue_template_functional__,
  730. __vue_styles__,
  731. __vue_scopeId__,
  732. __vue_module_identifier__
  733. )
  734. /* harmony default export */ var src_components_personLi = (Component.exports);
  735. // EXTERNAL MODULE: ./src/api/allFun.js
  736. var allFun = __webpack_require__("mprh");
  737. // EXTERNAL MODULE: ./src/utils/equipment.js
  738. var equipment = __webpack_require__("ObZk");
  739. // EXTERNAL MODULE: ./node_modules/xlsx/xlsx.js
  740. var xlsx = __webpack_require__("uXZL");
  741. var xlsx_default = /*#__PURE__*/__webpack_require__.n(xlsx);
  742. // EXTERNAL MODULE: ./src/utils/index.js
  743. var utils = __webpack_require__("0xDb");
  744. // EXTERNAL MODULE: ./src/utils/util.js
  745. var util = __webpack_require__("oFuF");
  746. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  747. var moment = __webpack_require__("PJh5");
  748. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  749. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/contrast/contrast.vue
  750. //
  751. //
  752. //
  753. //
  754. //
  755. //
  756. //
  757. //
  758. //
  759. //
  760. //
  761. //
  762. //
  763. //
  764. //
  765. //
  766. //
  767. //
  768. //
  769. //
  770. //
  771. //
  772. //
  773. //
  774. //
  775. //
  776. //
  777. //
  778. //
  779. //
  780. //
  781. //
  782. //
  783. //
  784. //
  785. //
  786. //
  787. //
  788. //
  789. //
  790. //
  791. //
  792. //
  793. //
  794. //
  795. //
  796. //
  797. //
  798. //
  799. //
  800. //
  801. //
  802. //
  803. //
  804. //
  805. //
  806. //
  807. //
  808. //
  809. //
  810. //
  811. //
  812. //
  813. //
  814. //
  815. //
  816. //
  817. //
  818. //
  819. //
  820. //
  821. //
  822. //
  823. //
  824. //
  825. //
  826. //
  827. //
  828. //
  829. //
  830. //
  831. //
  832. //
  833. //
  834. //
  835. //
  836. //
  837. //
  838. //
  839. //
  840. //
  841. //
  842. //
  843. //
  844. //
  845. //
  846. //
  847. //
  848. //
  849. //
  850. //
  851. //
  852. //
  853. //
  854. //
  855. //
  856. //
  857. //
  858. //
  859. //
  860. //
  861. //
  862. //
  863. //
  864. //
  865. //
  866. //
  867. //
  868. //
  869. //
  870. //
  871. //
  872. //
  873. //
  874. //
  875. //
  876. //
  877. //
  878. //
  879. //
  880. //
  881. //
  882. //
  883. var nowDate = new Date();
  884. var currentTime = nowDate;
  885. var endcurrentTime = Object(utils["g" /* getcurrentTime1 */])(6);
  886. /* harmony default export */ var contrast = ({
  887. name: "contrast",
  888. data: function data() {
  889. return {
  890. dateTime: [currentTime, endcurrentTime],
  891. batchOperation: false,
  892. userlist: [],
  893. userlistOne: [],
  894. userlistTwo: [],
  895. multipleSelection: [],
  896. multipleSelectionOne: [],
  897. multipleSelectionTwo: [],
  898. filterFields: [],
  899. filterFieldsList: [{
  900. value: 'name',
  901. label: '名称'
  902. }, {
  903. value: 'number',
  904. label: '学号'
  905. }, {
  906. value: 'cardId',
  907. label: '卡号'
  908. }, {
  909. value: 'phone',
  910. label: '手机号'
  911. }, {
  912. value: 'sex',
  913. label: '性别'
  914. }, {
  915. value: 'cardState',
  916. label: '门卡状态'
  917. }],
  918. deviceList: [],
  919. allCertificates: []
  920. };
  921. },
  922. created: function created() {
  923. this.getDevice();
  924. this.getCertificatesSort();
  925. },
  926. methods: {
  927. checkboxInit: function checkboxInit(row, index) {
  928. if (row.color == 'bgred') {
  929. return 0;
  930. } else if (row.color == '') {
  931. return 1;
  932. }
  933. },
  934. tableRowClassName: function tableRowClassName(_ref) {
  935. var row = _ref.row,
  936. rowIndex = _ref.rowIndex;
  937. if (row.color == 'bgred') {
  938. return 'warning-row';
  939. } else if (row.color == '') {
  940. return 'success-row';
  941. }
  942. return '';
  943. },
  944. getDevice: function getDevice() {
  945. var _this2 = this;
  946. var data = {
  947. q: stringify_default()({
  948. lockType: 1
  949. }),
  950. pageNum: 0,
  951. pageSize: 0
  952. };
  953. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  954. if (res.code == 200) {
  955. _this2.deviceList = res.data.list;
  956. }
  957. });
  958. },
  959. // 批量删除
  960. deleteSelect: function deleteSelect() {
  961. // this.
  962. },
  963. // 获取凭证名称
  964. getCertificatesSort: function getCertificatesSort() {
  965. var _this3 = this;
  966. var dataall = {
  967. pageNum: 0,
  968. pageSize: 0,
  969. orderBy: "create_at desc",
  970. q: {
  971. inStatus: "0,1",
  972. types: "13"
  973. }
  974. };
  975. Object(api["d" /* httpGet */])(dataall, this.$api.getCertificates).then(function (resall) {
  976. if (resall.code == 200) {
  977. var sendOn = util["a" /* default */].zlib_unzip(resall.data);
  978. _this3.allCertificates = sendOn;
  979. }
  980. });
  981. },
  982. // 上传对比结果
  983. batchUploadfun: function batchUploadfun() {
  984. var _this4 = this;
  985. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
  986. var _this;
  987. return regenerator_default.a.wrap(function _callee$(_context) {
  988. while (1) {
  989. switch (_context.prev = _context.next) {
  990. case 0:
  991. _this = _this4;
  992. if (!(_this4.dateTime[0] == '' || _this4.dateTime[1] == '')) {
  993. _context.next = 4;
  994. break;
  995. }
  996. _this4.$message.error("请选择开始结束时间");
  997. return _context.abrupt("return", false);
  998. case 4:
  999. if (_this4.multipleSelectionTwo.length > 0) {
  1000. _this4.multipleSelectionTwo.map(function (li) {
  1001. var fjid = [];
  1002. var str = {
  1003. cardId: li.id,
  1004. siteId: li.roomId,
  1005. startTime: _this4.dateTime[0],
  1006. endTime: _this4.dateTime[1]
  1007. };
  1008. fjid.push(str);
  1009. var infostr = JSON.parse(li.info);
  1010. if (li.manufactureId == 201 || li.manufactureId == 221) {
  1011. var data = {
  1012. lockerId: li.deviceNum,
  1013. imei: li.imei,
  1014. lockerUserId: infostr.userPassword,
  1015. keyId: infostr.userPassword,
  1016. role: 0,
  1017. action: 1,
  1018. order: 6226,
  1019. cardName: li.name,
  1020. roomName: li.siteName,
  1021. pzname: 'NFC' + li.num
  1022. };
  1023. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) {
  1024. if (callback.success) {
  1025. var locakUserdata = {
  1026. deviceNum: li.deviceNum,
  1027. imei: li.imei,
  1028. cardId: li.id,
  1029. content: stringify_default()(data), //operateMode:NFC-10、把人员添加到凭证-1
  1030. type: 26,
  1031. serial: callback.data.serialNumber,
  1032. startTime: parseInt(_this.dateTime[0].getTime() / 1000),
  1033. endTime: parseInt(_this.dateTime[1].getTime() / 1000)
  1034. };
  1035. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  1036. if (li.nfc.length == 8) {
  1037. li.nfc = util["a" /* default */].cardFormatConversion(li.nfc);
  1038. li.nfc = li.nfc + '00000000';
  1039. } else if (li.nfc.length == 16) {
  1040. password = li.nfc;
  1041. }
  1042. console.log(li.nfc);
  1043. Object(api["g" /* httpPost */])(fjid, _this4.$api.bindCard).then(function (res) {
  1044. if (res.success) {
  1045. _this4.$message.success("添加成功");
  1046. } else {
  1047. _this4.$message.error("添加失败");
  1048. }
  1049. });
  1050. equipment["a" /* default */].RfCardRegister(data.lockerId, data.imei, data.lockerUserId, 1, 1, li.nfc.toUpperCase(), 50, locakUserdata.startTime, locakUserdata.endTime, 6210, data.cardName, data.roomName, function (callbackTwo) {
  1051. var str = {
  1052. imei: data.imei,
  1053. userTelephone: infostr.userTelephone,
  1054. cardId: li.id,
  1055. userPassword: infostr.userPassword,
  1056. password: li.nfc.toUpperCase(),
  1057. operateMode: 10,
  1058. order: 6210,
  1059. type: 2,
  1060. passwordStartTime: locakUserdata.passwordStartTime,
  1061. passwordEndTime: locakUserdata.passwordEndTime,
  1062. pzname: data.pzname,
  1063. is: false,
  1064. cardName: data.cardName,
  1065. roomName: data.roomName
  1066. };
  1067. var dataCertifi = {
  1068. cardId: li.id,
  1069. imei: data.imei,
  1070. deviceNum: data.deviceNum,
  1071. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  1072. type: 13,
  1073. startTime: locakUserdata.startTime,
  1074. endTime: locakUserdata.endTime
  1075. };
  1076. Object(api["g" /* httpPost */])(dataCertifi, _this4.$api.addCertificates).then(function (res) {
  1077. var dataCertifiTwo = dataCertifi;
  1078. dataCertifiTwo.type = 3;
  1079. dataCertifiTwo.serial = callbackTwo.data.serialNumber;
  1080. Object(api["g" /* httpPost */])(dataCertifiTwo, _this4.$api.addCertificates).then(function (res) {
  1081. _this4.$emit('getAboutRoom');
  1082. });
  1083. });
  1084. });
  1085. } else {
  1086. _this4.$message.error(callback.msg);
  1087. if (callback.code == 201016) {
  1088. Object(api["g" /* httpPost */])(fjid, _this4.$api.bindCard).then(function (res) {
  1089. if (res.success) {
  1090. _this4.$message.success("该用户门锁已存在");
  1091. } else {
  1092. _this4.$message.error("添加失败");
  1093. }
  1094. });
  1095. }
  1096. }
  1097. });
  1098. } else if (li.manufactureId == 101) {
  1099. var userstr = {
  1100. imei: li.imei,
  1101. deviceNum: li.deviceNum,
  1102. userTelephone: infostr.userTelephone,
  1103. userPassword: infostr.userPassword,
  1104. password: infostr.userPassword,
  1105. operateMode: 26,
  1106. order: 6226,
  1107. passwordStartTime: moment_default()(_this4.dateTime[0]).format("YYYYMMDDHHmmss"),
  1108. passwordEndTime: moment_default()(_this4.dateTime[1]).format("YYYYMMDDHHmmss"),
  1109. is: false,
  1110. cardName: li.name,
  1111. pzname: 'NFC' + li.num,
  1112. roomName: li.siteName
  1113. };
  1114. equipment["a" /* default */].LDAddUser(userstr.deviceNum, userstr.imei, userstr.userTelephone, userstr.userPassword, userstr.password, userstr.passwordStartTime, userstr.passwordEndTime, userstr.operateMode, userstr.order, userstr.cardName, userstr.roomName, false, function (callback) {
  1115. if (callback.success) {
  1116. var locakUserdata = {
  1117. deviceNum: li.deviceNum,
  1118. imei: li.imei,
  1119. cardId: li.id,
  1120. content: stringify_default()(userstr), //operateMode:NFC-10、把人员添加到凭证-1
  1121. type: 26,
  1122. serial: callback.data.serialNumber,
  1123. startTime: parseInt(_this.dateTime[0].getTime() / 1000),
  1124. endTime: parseInt(_this.dateTime[1].getTime() / 1000)
  1125. };
  1126. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  1127. Object(api["g" /* httpPost */])(fjid, _this4.$api.bindCard).then(function (res) {
  1128. if (res.success) {
  1129. equipment["a" /* default */].LDRfCardRegister(userstr.deviceNum, userstr.imei, userstr.userTelephone, userstr.userPassword, li.nfc, userstr.passwordStartTime, userstr.passwordEndTime, 10, 6210, userstr.cardName, userstr.roomName, false, function (callbackTwo) {
  1130. var str = {
  1131. imei: userstr.imei,
  1132. userTelephone: userstr.userTelephone,
  1133. cardId: li.id,
  1134. userPassword: userstr.userPassword,
  1135. password: li.nfc,
  1136. operateMode: 10,
  1137. order: 6210,
  1138. type: 2,
  1139. passwordStartTime: userstr.passwordStartTime,
  1140. passwordEndTime: userstr.passwordEndTime,
  1141. pzname: userstr.pzname,
  1142. is: false,
  1143. cardName: userstr.cardName,
  1144. roomName: userstr.roomName
  1145. };
  1146. var dataCertifi = {
  1147. cardId: li.id,
  1148. imei: userstr.imei,
  1149. deviceNum: userstr.deviceNum,
  1150. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  1151. type: 13,
  1152. startTime: locakUserdata.startTime,
  1153. endTime: locakUserdata.endTime
  1154. };
  1155. Object(api["g" /* httpPost */])(dataCertifi, _this4.$api.addCertificates).then(function (res) {
  1156. var dataCertifiTwo = dataCertifi;
  1157. dataCertifiTwo.type = 3;
  1158. dataCertifiTwo.serial = callbackTwo.data.serialNumber;
  1159. Object(api["g" /* httpPost */])(dataCertifiTwo, _this4.$api.addCertificates).then(function (res) {
  1160. _this4.$emit('getAboutRoom');
  1161. });
  1162. });
  1163. });
  1164. _this4.$message.success("添加成功");
  1165. } else {
  1166. _this4.$message.error("添加失败");
  1167. }
  1168. });
  1169. } else {
  1170. _this4.$message.error(callback.msg);
  1171. }
  1172. });
  1173. }
  1174. });
  1175. } else {
  1176. _this4.$message.error("请选择人员");
  1177. }
  1178. case 5:
  1179. case "end":
  1180. return _context.stop();
  1181. }
  1182. }
  1183. }, _callee, _this4);
  1184. }))();
  1185. },
  1186. //查询人员
  1187. getperson: function getperson(li, callback) {
  1188. var data = {
  1189. orderBy: "create_time desc",
  1190. q: stringify_default()({
  1191. cardId: li.cardId
  1192. })
  1193. };
  1194. var roomAbout = this.$store.state.roomAbout;
  1195. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res) {
  1196. callback(res.data.list[0]);
  1197. });
  1198. },
  1199. // 清空表格
  1200. clearAll: function clearAll() {
  1201. this.userlist = [];
  1202. },
  1203. clearAllOne: function clearAllOne() {
  1204. this.userlistOne = [];
  1205. },
  1206. clearAllTwo: function clearAllTwo() {
  1207. this.userlistTwo = [];
  1208. },
  1209. mapTwoDimension: function mapTwoDimension(arr) {
  1210. var dataArr = [];
  1211. if (arr.length === 0) {
  1212. console.log(arr, arr.length);
  1213. return dataArr;
  1214. }
  1215. arr.map(function (oneDim) {
  1216. if (dataArr.length == 0) {
  1217. dataArr.push({
  1218. cardId: oneDim.cardId,
  1219. cardState: oneDim.cardState,
  1220. enterpriseId: oneDim.enterpriseId,
  1221. id: oneDim.id,
  1222. info: oneDim.info,
  1223. name: oneDim.name,
  1224. phone: oneDim.phone,
  1225. sex: oneDim.sex,
  1226. siteId: oneDim.siteId,
  1227. siteName: oneDim.siteName,
  1228. type: oneDim.type,
  1229. list: [oneDim]
  1230. });
  1231. } else {
  1232. var res = dataArr.some(function (item) {
  1233. // 判断相同,有就添加到当前项
  1234. if (item.cardId == oneDim.cardId && item.id == oneDim.id) {
  1235. item.list.push(oneDim);
  1236. return true;
  1237. }
  1238. });
  1239. if (!res) {
  1240. // 如果没找相同添加一个新对象
  1241. dataArr.push({
  1242. cardId: oneDim.cardId,
  1243. cardState: oneDim.cardState,
  1244. enterpriseId: oneDim.enterpriseId,
  1245. id: oneDim.id,
  1246. info: oneDim.info,
  1247. name: oneDim.name,
  1248. phone: oneDim.phone,
  1249. sex: oneDim.sex,
  1250. siteId: oneDim.siteId,
  1251. siteName: oneDim.siteName,
  1252. type: oneDim.type,
  1253. list: [oneDim]
  1254. });
  1255. }
  1256. }
  1257. });
  1258. return dataArr;
  1259. },
  1260. // 筛选现有人员
  1261. contrastDeDuplication: function contrastDeDuplication(arr) {
  1262. var _this5 = this;
  1263. var _this = this;
  1264. var p = new promise_default.a(function (resolve, reject) {
  1265. var list = [];
  1266. arr.map(function (li) {
  1267. _this5.getperson(li, function (data) {
  1268. if (data) {
  1269. li.id = data.id;
  1270. li.info = data.info;
  1271. list.push(li);
  1272. }
  1273. });
  1274. });
  1275. setTimeout(function () {
  1276. resolve(list);
  1277. // reject("筛选错误");
  1278. }, 1000);
  1279. });
  1280. p.then(function (list) {
  1281. // let result = _this.mapTwoDimension(list)
  1282. _this.getRoomIdMethods(list);
  1283. }).catch(function (error) {
  1284. _this.$message.error("请求错误");
  1285. });
  1286. },
  1287. // 获取房间id
  1288. getRoomIdMethods: function getRoomIdMethods(result) {
  1289. var _this6 = this;
  1290. result.map(function (lt) {
  1291. var id = _this6.deviceList.filter(function (item) {
  1292. return item.roomName == lt.siteName;
  1293. })[0];
  1294. if (id) {
  1295. lt.manufactureId = id.manufactureId;
  1296. lt.deviceNum = id.deviceNum;
  1297. lt.imei = id.imei;
  1298. lt.roomId = id.roomId;
  1299. lt.color = '';
  1300. if (lt.cardId.length == 8) {
  1301. lt.nfc = lt.cardId;
  1302. } else if (lt.cardId.length == 0) {
  1303. lt.nfc = "";
  1304. } else {
  1305. var nfc = '';
  1306. var array3 = Object(utils["d" /* dec2hex */])(lt.cardId);
  1307. var arr4 = Object(utils["h" /* group */])(array3, 2);
  1308. arr4.map(function (li) {
  1309. nfc += li;
  1310. });
  1311. lt.nfc = nfc;
  1312. }
  1313. var num = _this6.allCertificates.filter(function (item) {
  1314. return item.cardId == lt.id;
  1315. });
  1316. lt.num = num.length + 1;
  1317. } else {
  1318. lt.color = 'bgred';
  1319. }
  1320. });
  1321. this.userlistTwo = result;
  1322. },
  1323. // 比对表格
  1324. comparisonMethods: function comparisonMethods() {
  1325. var _this7 = this;
  1326. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
  1327. var arr, result;
  1328. return regenerator_default.a.wrap(function _callee2$(_context2) {
  1329. while (1) {
  1330. switch (_context2.prev = _context2.next) {
  1331. case 0:
  1332. _context2.next = 2;
  1333. return _this7.screenMethods(_this7.userlist, _this7.userlistOne, _this7.filterFields);
  1334. case 2:
  1335. arr = _context2.sent;
  1336. console.log(arr);
  1337. _context2.next = 6;
  1338. return _this7.contrastDeDuplication(arr);
  1339. case 6:
  1340. result = _context2.sent;
  1341. case 7:
  1342. case "end":
  1343. return _context2.stop();
  1344. }
  1345. }
  1346. }, _callee2, _this7);
  1347. }))();
  1348. },
  1349. screenMethods: function screenMethods(arr1, arr2, KeyName) {
  1350. var KeyNameData = KeyName;
  1351. var sum = 0,
  1352. products = [];
  1353. if (KeyNameData.length === 0) {
  1354. this.$message.error("请选择筛选条件");
  1355. } else {
  1356. var _loop = function _loop(i) {
  1357. products = arr1.filter(function (item) {
  1358. return arr2.some(function (val) {
  1359. return item[KeyNameData[i]] == val[KeyNameData[i]];
  1360. });
  1361. });
  1362. };
  1363. for (var i = 0; i < KeyNameData.length; i++) {
  1364. _loop(i);
  1365. }
  1366. return products;
  1367. }
  1368. },
  1369. // 多选操作
  1370. handleSelectionChange: function handleSelectionChange(val) {
  1371. this.multipleSelection = val;
  1372. },
  1373. handleSelectionChangeOne: function handleSelectionChangeOne(val) {
  1374. this.multipleSelectionOne = val;
  1375. },
  1376. handleSelectionChangeTwo: function handleSelectionChangeTwo(val) {
  1377. this.multipleSelectionTwo = val;
  1378. },
  1379. // 导入
  1380. exportData: function exportData(event) {
  1381. var _this8 = this;
  1382. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
  1383. var that, f, reader;
  1384. return regenerator_default.a.wrap(function _callee3$(_context3) {
  1385. while (1) {
  1386. switch (_context3.prev = _context3.next) {
  1387. case 0:
  1388. if (event.currentTarget.files.length) {
  1389. _context3.next = 2;
  1390. break;
  1391. }
  1392. return _context3.abrupt("return");
  1393. case 2:
  1394. that = _this8;
  1395. // 拿取文件对象
  1396. f = event.currentTarget.files[0];
  1397. // 用FileReader来读取
  1398. reader = new FileReader();
  1399. // 重写FileReader上的readAsBinaryString方法
  1400. FileReader.prototype.readAsBinaryString = function (f) {
  1401. var binary = "";
  1402. var wb; // 读取完成的数据
  1403. var outdata; // 你需要的数据
  1404. var reader = new FileReader();
  1405. reader.onload = function (e) {
  1406. // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节)
  1407. var bytes = new Uint8Array(reader.result);
  1408. var length = bytes.byteLength;
  1409. for (var i = 0; i < length; i++) {
  1410. binary += String.fromCharCode(bytes[i]);
  1411. }
  1412. // 接下来就是xlsx了,具体可看api
  1413. wb = xlsx_default.a.read(binary, {
  1414. type: "binary"
  1415. });
  1416. outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  1417. // 自定义方法向父组件传递数据
  1418. var userInfo = localStorage.getItem('info');
  1419. var arr = [];
  1420. outdata.map(function (li, index) {
  1421. var obj = {};
  1422. obj.name = li["名称"];
  1423. obj.siteId = li["房间ID"];
  1424. obj.siteName = li["绑定房间"];
  1425. obj.number = li["编号/证件号/学工号"];
  1426. obj.cardId = li["卡号"];
  1427. obj.phone = li["电话"];
  1428. obj.sex = li["性别"];
  1429. obj.id = li["id"];
  1430. obj.cardState = '1';
  1431. obj.enterpriseId = JSON.parse(userInfo).enterpriseId;
  1432. obj.type = 0;
  1433. var phone = obj.phone.toString();
  1434. obj.siteId = stringify_default()(obj.siteId);
  1435. var str = {
  1436. userPassword: phone.substring(phone.length - 6, phone.length - 1),
  1437. userTelephone: phone
  1438. };
  1439. obj.info = stringify_default()(str);
  1440. if (obj.sex == "男") {
  1441. obj.sex = 1;
  1442. } else if (obj.sex == "女") {
  1443. obj.sex = 2;
  1444. }
  1445. arr.push(obj);
  1446. });
  1447. var map = {},
  1448. dest = [];
  1449. for (var i = 0; i < arr.length; i++) {
  1450. var ai = arr[i];
  1451. if (!map[ai.phone]) {
  1452. dest.push({
  1453. name: ai.name,
  1454. siteId: ai.siteId,
  1455. siteName: ai.siteName,
  1456. number: ai.number,
  1457. cardId: ai.cardId,
  1458. phone: ai.phone,
  1459. sex: ai.sex,
  1460. id: ai.id,
  1461. cardState: ai.cardState,
  1462. enterpriseId: ai.enterpriseId,
  1463. type: ai.type,
  1464. info: ai.info
  1465. });
  1466. map[ai.phone] = ai;
  1467. }
  1468. }
  1469. that.$nextTick(function () {
  1470. that.userlist = arr;
  1471. });
  1472. };
  1473. reader.readAsArrayBuffer(f);
  1474. };
  1475. reader.readAsBinaryString(f);
  1476. case 7:
  1477. case "end":
  1478. return _context3.stop();
  1479. }
  1480. }
  1481. }, _callee3, _this8);
  1482. }))();
  1483. },
  1484. exportDataOne: function exportDataOne(event) {
  1485. if (!event.currentTarget.files.length) {
  1486. return;
  1487. }
  1488. var that = this;
  1489. // 拿取文件对象
  1490. var f = event.currentTarget.files[0];
  1491. // 用FileReader来读取
  1492. var reader = new FileReader();
  1493. // 重写FileReader上的readAsBinaryString方法
  1494. FileReader.prototype.readAsBinaryString = function (f) {
  1495. var binary = "";
  1496. var wb; // 读取完成的数据
  1497. var outdata; // 你需要的数据
  1498. var reader = new FileReader();
  1499. reader.onload = function (e) {
  1500. // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节)
  1501. var bytes = new Uint8Array(reader.result);
  1502. var length = bytes.byteLength;
  1503. for (var i = 0; i < length; i++) {
  1504. binary += String.fromCharCode(bytes[i]);
  1505. }
  1506. // 接下来就是xlsx了,具体可看api
  1507. wb = xlsx_default.a.read(binary, {
  1508. type: "binary"
  1509. });
  1510. outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  1511. // 自定义方法向父组件传递数据
  1512. var userInfo = localStorage.getItem('info');
  1513. var arr = [];
  1514. outdata.map(function (li, index) {
  1515. var obj = {};
  1516. obj.name = li["名称"];
  1517. obj.siteId = li["房间ID"];
  1518. obj.siteName = li["绑定房间"];
  1519. obj.number = li["编号/证件号/学工号"];
  1520. obj.cardId = li["卡号"];
  1521. obj.phone = li["电话"];
  1522. obj.sex = li["性别"];
  1523. obj.id = li["id"];
  1524. obj.cardState = '1';
  1525. obj.enterpriseId = JSON.parse(userInfo).enterpriseId;
  1526. obj.type = 0;
  1527. var phone = obj.phone.toString();
  1528. var str = {
  1529. userPassword: phone.substring(phone.length - 6, phone.length - 1),
  1530. userTelephone: phone
  1531. };
  1532. obj.info = stringify_default()(str);
  1533. if (obj.sex == "男") {
  1534. obj.sex = 1;
  1535. } else if (obj.sex == "女") {
  1536. obj.sex = 2;
  1537. }
  1538. arr.push(obj);
  1539. });
  1540. that.$nextTick(function () {
  1541. that.userlistOne = arr;
  1542. });
  1543. };
  1544. reader.readAsArrayBuffer(f);
  1545. };
  1546. reader.readAsBinaryString(f);
  1547. },
  1548. btnClick: function btnClick() {
  1549. document.querySelector(".input-file").click();
  1550. },
  1551. btnClickOne: function btnClickOne() {
  1552. document.querySelector(".input-fileOne").click();
  1553. },
  1554. exportBtn: function exportBtn() {
  1555. this.exportExcel();
  1556. },
  1557. exportExcel: function exportExcel() {
  1558. var sheet1data = [['名称', '卡号', '状态', '电话', '绑定房间', '性别']];
  1559. var sheet1 = xlsx_default.a.utils.json_to_sheet(sheet1data, {
  1560. skipHeader: true
  1561. });
  1562. // 创建一个新的空的workbook
  1563. var wb = xlsx_default.a.utils.book_new();
  1564. xlsx_default.a.utils.book_append_sheet(wb, sheet1, '人员导入模板');
  1565. // XLSX.utils.book_append_sheet(wb, sheet2, '行政部')
  1566. // XLSX.utils.book_append_sheet(wb, sheet3, '前端部')
  1567. var workbookBlob = this.workbook2blob(wb);
  1568. this.openDownloadDialog(workbookBlob, '人员导入模板.xlsx');
  1569. },
  1570. // 将blob对象 创建bloburl,然后用a标签实现弹出下载框
  1571. openDownloadDialog: function openDownloadDialog(blob, fileName) {
  1572. if ((typeof blob === "undefined" ? "undefined" : typeof_default()(blob)) === 'object' && blob instanceof Blob) {
  1573. blob = URL.createObjectURL(blob); // 创建blob地址
  1574. }
  1575. var aLink = document.createElement('a');
  1576. aLink.href = blob;
  1577. // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,有时候 file:///模式下不会生效
  1578. aLink.download = fileName || '';
  1579. var event;
  1580. if (window.MouseEvent) event = new MouseEvent('click');
  1581. // 移动端
  1582. else {
  1583. event = document.createEvent('MouseEvents');
  1584. event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  1585. }
  1586. aLink.dispatchEvent(event);
  1587. },
  1588. // 下载模板
  1589. workbook2blob: function workbook2blob(workbook) {
  1590. // 生成excel的配置项
  1591. var wopts = {
  1592. // 要生成的文件类型
  1593. bookType: 'xlsx',
  1594. // // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
  1595. bookSST: false,
  1596. type: 'binary'
  1597. };
  1598. var wbout = xlsx_default.a.write(workbook, wopts);
  1599. // 将字符串转ArrayBuffer
  1600. function s2ab(s) {
  1601. var buf = new ArrayBuffer(s.length);
  1602. var view = new Uint8Array(buf);
  1603. for (var i = 0; i !== s.length; ++i) {
  1604. view[i] = s.charCodeAt(i) & 0xff;
  1605. }return buf;
  1606. }
  1607. var buf = s2ab(wbout);
  1608. var blob = new Blob([buf], {
  1609. type: 'application/octet-stream'
  1610. });
  1611. return blob;
  1612. }
  1613. }
  1614. });
  1615. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-226ecd6d","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/components/contrast/contrast.vue
  1616. var contrast_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"pa-2"},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('div',{staticClass:"d-flex justify-space-between"},[_c('div',[_c('el-button',{staticClass:"importBtn",attrs:{"type":"primary","size":"mini"},on:{"click":_vm.comparisonMethods}},[_vm._v("比对表格")]),_vm._v(" "),_c('el-select',{attrs:{"size":"mini","collapse-tags":"","multiple":"","placeholder":"请选择对比条件"},model:{value:(_vm.filterFields),callback:function ($$v) {_vm.filterFields=$$v},expression:"filterFields"}},_vm._l((_vm.filterFieldsList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1),_vm._v(" "),_c('div',[_c('el-switch',{attrs:{"active-text":"批量操作"},model:{value:(_vm.batchOperation),callback:function ($$v) {_vm.batchOperation=$$v},expression:"batchOperation"}})],1)])])],1),_vm._v(" "),_c('el-divider'),_vm._v(" "),_c('el-row',{attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":12}},[_c('el-divider',[_vm._v("需要上传人员表")]),_vm._v(" "),_c('el-col',{staticClass:"mb-5",attrs:{"span":24}},[_c('input',{staticClass:"input-file",attrs:{"type":"file","accept":".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},on:{"change":_vm.exportData}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.btnClick}},[_vm._v("导入EXCEL")]),_vm._v(" "),_c('el-button',{staticClass:"importBtn",attrs:{"size":"mini"},on:{"click":_vm.exportBtn}},[_vm._v("下载模板")]),_vm._v(" "),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.deleteSelect}},[_vm._v("批量移除")]),_vm._v(" "),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.clearAll}},[_vm._v("清空")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.userlist,"border":"","stripe":"","header-cell-class-name":"table-header","height":"400"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"number","label":"学号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"cardId","label":"卡号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"手机号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"siteName","label":"绑定房间"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"性别","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(scope.row.sex == 1 ? "男" : "女")+"\n ")]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"门卡状态","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.cardState == 1)?_c('span',[_vm._v("正常")]):_vm._e(),_vm._v(" "),(scope.row.cardState == 2)?_c('span',[_vm._v("挂失")]):_vm._e(),_vm._v(" "),(scope.row.cardState == 3)?_c('span',[_vm._v("挂失冻结")]):_vm._e(),_vm._v(" "),(scope.row.cardState == 4)?_c('span',[_vm._v("冻结")]):_vm._e(),_vm._v(" "),(scope.row.cardState == 5)?_c('span',[_vm._v("预开户")]):_vm._e(),_vm._v(" "),(scope.row.cardState == 6)?_c('span',[_vm._v("过期")]):_vm._e()]}}])})],1)],1),_vm._v(" "),_c('el-col',{attrs:{"span":12}},[_c('el-divider',[_vm._v("现有人员表")]),_vm._v(" "),_c('el-col',{staticClass:"mb-5",attrs:{"span":24}},[_c('input',{staticClass:"input-file input-fileOne",attrs:{"type":"file","accept":".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},on:{"change":_vm.exportDataOne}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.btnClickOne}},[_vm._v("导入EXCEL")]),_vm._v(" "),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.clearAllOne}},[_vm._v("清空")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.userlistOne,"border":"","stripe":"","header-
  1617. var contrast_staticRenderFns = []
  1618. var contrast_esExports = { render: contrast_render, staticRenderFns: contrast_staticRenderFns }
  1619. /* harmony default export */ var contrast_contrast = (contrast_esExports);
  1620. // CONCATENATED MODULE: ./src/components/contrast/contrast.vue
  1621. function contrast_injectStyle (ssrContext) {
  1622. __webpack_require__("XbTi")
  1623. }
  1624. var contrast_normalizeComponent = __webpack_require__("VU/8")
  1625. /* script */
  1626. /* template */
  1627. /* template functional */
  1628. var contrast___vue_template_functional__ = false
  1629. /* styles */
  1630. var contrast___vue_styles__ = contrast_injectStyle
  1631. /* scopeId */
  1632. var contrast___vue_scopeId__ = "data-v-226ecd6d"
  1633. /* moduleIdentifier (server only) */
  1634. var contrast___vue_module_identifier__ = null
  1635. var contrast_Component = contrast_normalizeComponent(
  1636. contrast,
  1637. contrast_contrast,
  1638. contrast___vue_template_functional__,
  1639. contrast___vue_styles__,
  1640. contrast___vue_scopeId__,
  1641. contrast___vue_module_identifier__
  1642. )
  1643. /* harmony default export */ var components_contrast_contrast = (contrast_Component.exports);
  1644. // EXTERNAL MODULE: ./src/views/zw.vue + 1 modules
  1645. var zw = __webpack_require__("RMlb");
  1646. // EXTERNAL MODULE: ./src/views/getFinger.vue + 2 modules
  1647. var getFinger = __webpack_require__("BXO0");
  1648. // EXTERNAL MODULE: ./node_modules/js-md5/src/md5.js
  1649. var md5 = __webpack_require__("NC6I");
  1650. var md5_default = /*#__PURE__*/__webpack_require__.n(md5);
  1651. // EXTERNAL MODULE: ./node_modules/axios/index.js
  1652. var axios = __webpack_require__("mtWM");
  1653. var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
  1654. // EXTERNAL MODULE: ./src/utils/verification.js
  1655. var verification = __webpack_require__("7qU6");
  1656. // EXTERNAL MODULE: ./src/components/visualizcomponent/NumberGrow.vue + 2 modules
  1657. var NumberGrow = __webpack_require__("eVaK");
  1658. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/userManagement.vue
  1659. //
  1660. //
  1661. //
  1662. //
  1663. //
  1664. //
  1665. //
  1666. //
  1667. //
  1668. //
  1669. //
  1670. //
  1671. //
  1672. //
  1673. //
  1674. //
  1675. //
  1676. //
  1677. //
  1678. //
  1679. //
  1680. //
  1681. //
  1682. //
  1683. //
  1684. //
  1685. //
  1686. //
  1687. //
  1688. //
  1689. //
  1690. //
  1691. //
  1692. //
  1693. //
  1694. //
  1695. //
  1696. //
  1697. //
  1698. //
  1699. //
  1700. //
  1701. //
  1702. //
  1703. //
  1704. //
  1705. //
  1706. //
  1707. //
  1708. //
  1709. //
  1710. //
  1711. //
  1712. //
  1713. //
  1714. //
  1715. //
  1716. //
  1717. //
  1718. //
  1719. //
  1720. //
  1721. //
  1722. //
  1723. //
  1724. //
  1725. //
  1726. //
  1727. //
  1728. //
  1729. //
  1730. //
  1731. //
  1732. //
  1733. //
  1734. //
  1735. //
  1736. //
  1737. //
  1738. //
  1739. //
  1740. //
  1741. //
  1742. //
  1743. //
  1744. //
  1745. //
  1746. //
  1747. //
  1748. //
  1749. //
  1750. //
  1751. //
  1752. //
  1753. //
  1754. //
  1755. //
  1756. //
  1757. //
  1758. //
  1759. //
  1760. //
  1761. //
  1762. //
  1763. //
  1764. //
  1765. //
  1766. //
  1767. //
  1768. //
  1769. //
  1770. //
  1771. //
  1772. //
  1773. //
  1774. //
  1775. //
  1776. //
  1777. //
  1778. //
  1779. //
  1780. //
  1781. //
  1782. //
  1783. //
  1784. //
  1785. //
  1786. //
  1787. //
  1788. //
  1789. //
  1790. //
  1791. //
  1792. //
  1793. //
  1794. //
  1795. //
  1796. //
  1797. //
  1798. //
  1799. //
  1800. //
  1801. //
  1802. //
  1803. //
  1804. //
  1805. //
  1806. //
  1807. //
  1808. //
  1809. //
  1810. //
  1811. //
  1812. //
  1813. //
  1814. //
  1815. //
  1816. //
  1817. //
  1818. //
  1819. //
  1820. //
  1821. //
  1822. //
  1823. //
  1824. //
  1825. //
  1826. //
  1827. //
  1828. //
  1829. //
  1830. //
  1831. //
  1832. //
  1833. //
  1834. //
  1835. //
  1836. //
  1837. //
  1838. //
  1839. //
  1840. //
  1841. //
  1842. //
  1843. //
  1844. //
  1845. //
  1846. //
  1847. //
  1848. //
  1849. //
  1850. //
  1851. //
  1852. //
  1853. //
  1854. //
  1855. //
  1856. //
  1857. //
  1858. //
  1859. //
  1860. //
  1861. //
  1862. //
  1863. //
  1864. //
  1865. //
  1866. //
  1867. //
  1868. //
  1869. //
  1870. //
  1871. //
  1872. //
  1873. //
  1874. //
  1875. //
  1876. //
  1877. //
  1878. //
  1879. //
  1880. //
  1881. //
  1882. //
  1883. //
  1884. //
  1885. //
  1886. //
  1887. //
  1888. //
  1889. //
  1890. //
  1891. //
  1892. //
  1893. //
  1894. //
  1895. //
  1896. //
  1897. //
  1898. //
  1899. //
  1900. //
  1901. //
  1902. //
  1903. //
  1904. //
  1905. //
  1906. //
  1907. //
  1908. //
  1909. //
  1910. //
  1911. //
  1912. //
  1913. //
  1914. //
  1915. //
  1916. //
  1917. //
  1918. //
  1919. //
  1920. //
  1921. //
  1922. //
  1923. //
  1924. //
  1925. //
  1926. //
  1927. //
  1928. //
  1929. //
  1930. //
  1931. //
  1932. //
  1933. //
  1934. //
  1935. //
  1936. //
  1937. //
  1938. //
  1939. //
  1940. //
  1941. //
  1942. //
  1943. //
  1944. //
  1945. //
  1946. //
  1947. //
  1948. //
  1949. //
  1950. //
  1951. //
  1952. //
  1953. //
  1954. //
  1955. //
  1956. //
  1957. //
  1958. //
  1959. //
  1960. //
  1961. //
  1962. //
  1963. //
  1964. //
  1965. //
  1966. //
  1967. //
  1968. //
  1969. //
  1970. //
  1971. //
  1972. //
  1973. //
  1974. //
  1975. //
  1976. //
  1977. //
  1978. //
  1979. //
  1980. //
  1981. //
  1982. //
  1983. //
  1984. //
  1985. //
  1986. //
  1987. //
  1988. //
  1989. //
  1990. //
  1991. //
  1992. //
  1993. //
  1994. //
  1995. //
  1996. //
  1997. //
  1998. //
  1999. //
  2000. //
  2001. //
  2002. //
  2003. //
  2004. //
  2005. //
  2006. //
  2007. //
  2008. //
  2009. //
  2010. //
  2011. //
  2012. //
  2013. //
  2014. //
  2015. //
  2016. //
  2017. //
  2018. //
  2019. //
  2020. //
  2021. //
  2022. //
  2023. //
  2024. //
  2025. //
  2026. //
  2027. //
  2028. //
  2029. //
  2030. //
  2031. //
  2032. //
  2033. //
  2034. //
  2035. //
  2036. //
  2037. //
  2038. //
  2039. //
  2040. //
  2041. //
  2042. //
  2043. //
  2044. //
  2045. //
  2046. //
  2047. //
  2048. //
  2049. //
  2050. //
  2051. //
  2052. //
  2053. //
  2054. //
  2055. //
  2056. //
  2057. //
  2058. //
  2059. //
  2060. //
  2061. //
  2062. //
  2063. //
  2064. //
  2065. //
  2066. //
  2067. //
  2068. //
  2069. //
  2070. //
  2071. //
  2072. //
  2073. //
  2074. //
  2075. //
  2076. //
  2077. //
  2078. //
  2079. //
  2080. //
  2081. //
  2082. //
  2083. //
  2084. //
  2085. //
  2086. //
  2087. //
  2088. //
  2089. //
  2090. //
  2091. //
  2092. //
  2093. //
  2094. //
  2095. //
  2096. //
  2097. //
  2098. //
  2099. //
  2100. //
  2101. //
  2102. //
  2103. //
  2104. //
  2105. //
  2106. //
  2107. //
  2108. //
  2109. //
  2110. //
  2111. //
  2112. //
  2113. //
  2114. //
  2115. //
  2116. //
  2117. //
  2118. //
  2119. //
  2120. //
  2121. //
  2122. //
  2123. //
  2124. //
  2125. //
  2126. //
  2127. //
  2128. //
  2129. //
  2130. //
  2131. //
  2132. //
  2133. //
  2134. //
  2135. //
  2136. //
  2137. //
  2138. //
  2139. //
  2140. //
  2141. //
  2142. //
  2143. //
  2144. //
  2145. //
  2146. //
  2147. //
  2148. //
  2149. //
  2150. //
  2151. //
  2152. //
  2153. //
  2154. //
  2155. //
  2156. //
  2157. //
  2158. //
  2159. //
  2160. //
  2161. //
  2162. //
  2163. //
  2164. //
  2165. //
  2166. //
  2167. //
  2168. //
  2169. //
  2170. //
  2171. //
  2172. //
  2173. //
  2174. //
  2175. //
  2176. //
  2177. //
  2178. //
  2179. //
  2180. //
  2181. //
  2182. //
  2183. //
  2184. //
  2185. //
  2186. //
  2187. //
  2188. //
  2189. //
  2190. //
  2191. //
  2192. //
  2193. //
  2194. //
  2195. //
  2196. //
  2197. //
  2198. //
  2199. //
  2200. //
  2201. //
  2202. //
  2203. //
  2204. //
  2205. //
  2206. //
  2207. //
  2208. //
  2209. //
  2210. //
  2211. //
  2212. //
  2213. //
  2214. //
  2215. //
  2216. //
  2217. //
  2218. //
  2219. //
  2220. //
  2221. //
  2222. //
  2223. //
  2224. //
  2225. //
  2226. //
  2227. //
  2228. //
  2229. //
  2230. //
  2231. //
  2232. //
  2233. //
  2234. //
  2235. //
  2236. //
  2237. //
  2238. //
  2239. //
  2240. //
  2241. //
  2242. //
  2243. //
  2244. //
  2245. //
  2246. //
  2247. //
  2248. //
  2249. //
  2250. //
  2251. //
  2252. //
  2253. //
  2254. //
  2255. //
  2256. //
  2257. //
  2258. //
  2259. //
  2260. //
  2261. //
  2262. //
  2263. //
  2264. //
  2265. //
  2266. //
  2267. //
  2268. //
  2269. //
  2270. //
  2271. //
  2272. //
  2273. //
  2274. //
  2275. //
  2276. //
  2277. //
  2278. //
  2279. //
  2280. //
  2281. //
  2282. //
  2283. //
  2284. //
  2285. //
  2286. //
  2287. //
  2288. //
  2289. //
  2290. //
  2291. //
  2292. //
  2293. //
  2294. //
  2295. //
  2296. //
  2297. //
  2298. //
  2299. //
  2300. //
  2301. //
  2302. //
  2303. //
  2304. //
  2305. //
  2306. //
  2307. //
  2308. //
  2309. //
  2310. //
  2311. //
  2312. //
  2313. //
  2314. //
  2315. //
  2316. //
  2317. //
  2318. //
  2319. //
  2320. //
  2321. //
  2322. //
  2323. //
  2324. //
  2325. //
  2326. //
  2327. //
  2328. //
  2329. //
  2330. //
  2331. //
  2332. //
  2333. //
  2334. //
  2335. //
  2336. //
  2337. //
  2338. //
  2339. //
  2340. //
  2341. //
  2342. //
  2343. //
  2344. //
  2345. //
  2346. //
  2347. //
  2348. //
  2349. //
  2350. //
  2351. //
  2352. //
  2353. //
  2354. //
  2355. //
  2356. //
  2357. //
  2358. //
  2359. //
  2360. //
  2361. //
  2362. //
  2363. //
  2364. var userManagement_nowDate = new Date();
  2365. var userManagement_currentTime = userManagement_nowDate;
  2366. var userManagement_endcurrentTime = Object(utils["g" /* getcurrentTime1 */])(6);
  2367. /* harmony default export */ var userManagement = ({
  2368. inject: ['reload'],
  2369. name: "campus",
  2370. data: function data() {
  2371. var _this2 = this;
  2372. return {
  2373. frozenDialog: false, //冻结用户选择时间
  2374. frozenDataSelect: { time: '', timeOne: '' },
  2375. roomScreen: [], //筛选只展示房间,不展示层级
  2376. paginationConfig: 'total, sizes, prev, pager, next, jumper',
  2377. pickerOptionsBegin: {
  2378. disabledDate: function disabledDate(time) {
  2379. // time为形参,实参就是自动获取到的beginTime元素可以选的值
  2380. var maxDateTimeOne = new Date(_this2.maxDateTime).getTime();
  2381. var minDateTimeOne = new Date(_this2.minDateTime).getTime();
  2382. return time.getTime() > maxDateTimeOne || time.getTime() < minDateTimeOne;
  2383. }
  2384. },
  2385. pickerOptionsEnd: {
  2386. disabledDate: function disabledDate(time) {
  2387. var maxDateTimeOne = new Date(_this2.value2[0]).getTime();
  2388. return time.getTime() < maxDateTimeOne; /*今天及之前*/
  2389. }
  2390. },
  2391. regularCard: false,
  2392. drawerVisible: false,
  2393. props: {
  2394. multiple: true,
  2395. emitPath: false
  2396. },
  2397. defaultEnterpriseId: [],
  2398. defaultEnterpriseIdBack: [],
  2399. checkEnterpriseNode: [],
  2400. enterpriseListOption: [],
  2401. WhetherToGreatAnAccount: false,
  2402. dateRange: [],
  2403. batchCredentialList: [],
  2404. multipleSelection4: [],
  2405. // 记录筛选条件
  2406. recordFilterCondition: {
  2407. imei: '',
  2408. deviceNum: '',
  2409. status: '',
  2410. type: '',
  2411. roomId: ''
  2412. },
  2413. sendListRecords: [],
  2414. bindSelectedList: [], //选定绑定房间列表
  2415. bindRoomlist: [], //房源列表
  2416. rulesAdd: {
  2417. username: [{
  2418. required: true,
  2419. message: '请输入姓名',
  2420. trigger: 'blur'
  2421. }],
  2422. documentType: [{
  2423. required: true,
  2424. message: '请选择凭证类型',
  2425. trigger: 'blur'
  2426. }],
  2427. pzname: [{
  2428. required: true,
  2429. message: '请输入凭证名称',
  2430. trigger: 'blur'
  2431. }],
  2432. nfc: [{
  2433. required: true,
  2434. message: '请输入NFC',
  2435. trigger: 'blur'
  2436. }],
  2437. idcard: [{
  2438. required: true,
  2439. message: '请输入卡号',
  2440. trigger: 'blur'
  2441. }],
  2442. password: [{
  2443. required: true,
  2444. message: '请输入密码',
  2445. trigger: 'blur'
  2446. }]
  2447. },
  2448. rules: {
  2449. roomlistVoucher: [],
  2450. SelectedListVoucher: [],
  2451. name: [{
  2452. required: true,
  2453. message: '请输入姓名',
  2454. trigger: 'blur'
  2455. }],
  2456. cardId: [{
  2457. required: true,
  2458. message: '请输入卡号',
  2459. trigger: 'blur'
  2460. }],
  2461. number: [{
  2462. required: true,
  2463. message: '请输入身份证号',
  2464. trigger: 'blur'
  2465. }],
  2466. phone: [{
  2467. required: true,
  2468. message: '请输入电话',
  2469. trigger: 'blur'
  2470. }],
  2471. enterpriseId: [{
  2472. required: true,
  2473. message: '请选择所属部门',
  2474. trigger: 'blur'
  2475. }],
  2476. type: [{
  2477. required: true,
  2478. message: '请选择身份角色',
  2479. trigger: 'blur'
  2480. }]
  2481. },
  2482. tableheight: 0,
  2483. credentialSearch: {
  2484. deviceNum: '',
  2485. imei: '',
  2486. status: '',
  2487. roomId: '',
  2488. type: ''
  2489. },
  2490. selectoption: [],
  2491. selectoptionValue: '',
  2492. enterpriselist: [],
  2493. continuationManagementDate: {
  2494. time: ''
  2495. },
  2496. continuationManagementStatus: false,
  2497. Reissueform: {},
  2498. Reissue: '',
  2499. bindRoomStatus: false,
  2500. bindRoomStatus1: false,
  2501. drawer: false,
  2502. zNodes: [],
  2503. allroomlist: [],
  2504. selectRow: [],
  2505. bindRoomForm: {},
  2506. modify: true,
  2507. roomlistZNodes: [],
  2508. roonNameTop: '',
  2509. lsmm: {},
  2510. roomtablestatus1: true,
  2511. SelectedList: [],
  2512. documentType1: "请选择",
  2513. certificatestatus: false,
  2514. dialogImageUrl: "",
  2515. dialogVisible: false,
  2516. pageSize1: 10,
  2517. disabled1: false,
  2518. setting: {
  2519. edit: {
  2520. enable: true,
  2521. drag: {
  2522. isMove: true
  2523. },
  2524. showRemoveBtn: false,
  2525. showRenameBtn: false
  2526. },
  2527. check: {
  2528. enable: false
  2529. },
  2530. data: {
  2531. simpleData: {
  2532. enable: true,
  2533. pIdKey: "pid"
  2534. }
  2535. },
  2536. view: {
  2537. showIcon: true,
  2538. addHoverDom: this.addHoverDom,
  2539. removeHoverDom: this.removeHoverDom
  2540. }
  2541. },
  2542. value2: ['', ''],
  2543. value3: ['', ''],
  2544. userliststatu: true,
  2545. roomstatus: true,
  2546. roomstatus1: true,
  2547. roomtable: [],
  2548. roomtable1: [],
  2549. roomtable2: [],
  2550. roomtableStatus: true,
  2551. activeName: "0",
  2552. limitUpload: 1000,
  2553. arr: [],
  2554. cardstatus: [{
  2555. value: 1,
  2556. label: "正常"
  2557. }, {
  2558. value: 4,
  2559. label: "冻结"
  2560. }],
  2561. currentPage4: 1,
  2562. currentPage1: 1,
  2563. currentPage2: 1,
  2564. editVisiblelist: false,
  2565. userlist: [],
  2566. userlist1: [],
  2567. userlist1statu: true,
  2568. modifyStatus: true,
  2569. options: {
  2570. type: "pie",
  2571. xRorate: 25,
  2572. legend: {
  2573. position: "left"
  2574. },
  2575. showValue: false,
  2576. bgColor: "rgba(255,255,255,0)",
  2577. labels: ["密码凭证", "身份凭证", "其他"],
  2578. datasets: [{
  2579. data: [28, 10, 2]
  2580. }]
  2581. },
  2582. query: {
  2583. cardId: "",
  2584. number: "",
  2585. name: "",
  2586. type: 0,
  2587. pzname: ""
  2588. },
  2589. tableData: [],
  2590. total1: 0,
  2591. total2: 0,
  2592. multipleSelection: [],
  2593. multipleSelection1: [],
  2594. multipleSelection2: [],
  2595. multipleSelection3: [],
  2596. delList: [],
  2597. editVisible: false,
  2598. pageTotal: 0,
  2599. form: {
  2600. sex: 1,
  2601. cardState: 1,
  2602. name: "",
  2603. number: "",
  2604. cardId: "",
  2605. phone: "",
  2606. enterpriseId: '',
  2607. type: '',
  2608. fingerprintAlias: ''
  2609. },
  2610. idx: -1,
  2611. id: -1,
  2612. activeiconfont: true,
  2613. normal: 0,
  2614. total: 0,
  2615. frozen: 0,
  2616. lose: 0,
  2617. uploadkj: false,
  2618. file: "",
  2619. fileTemp: "",
  2620. files: "",
  2621. treedata: {},
  2622. drawerRow: {},
  2623. deviceList: [],
  2624. userlistquery: [],
  2625. userlistquery1: [],
  2626. temporaryPassword: '',
  2627. documentType: "请选择",
  2628. voucher: {
  2629. username: "",
  2630. pzname: "",
  2631. nfc: "",
  2632. idcard: "",
  2633. password: "123456",
  2634. fingerprintAlias: ""
  2635. },
  2636. bindroomstatus: true,
  2637. fingerprintTransfer: 0,
  2638. fingerprintId: 0,
  2639. checkList: "",
  2640. margkli: "",
  2641. roomlist: [],
  2642. roomlist2: [],
  2643. defaultProps: {
  2644. children: "children",
  2645. label: "name",
  2646. disabled: this.disabledFn
  2647. },
  2648. selectkey: [],
  2649. certificatesContent: {
  2650. pzname: ""
  2651. },
  2652. certificatesRow: {},
  2653. selectkey1: "",
  2654. addroomstatus: true,
  2655. selectkeyadd: [],
  2656. selectRoomdeletelist: [], //多选删除房间数据
  2657. roomlist1: [],
  2658. AboutDevice: [],
  2659. reissue: {
  2660. voucher: ""
  2661. },
  2662. modifyrow: {},
  2663. modifyvalue2: [userManagement_currentTime, userManagement_endcurrentTime],
  2664. allAboutDevice: [],
  2665. localFingerprint: {},
  2666. selectRoom: true,
  2667. personname: '操作',
  2668. pageNum: 1,
  2669. pageSize: 10,
  2670. userInfo: {
  2671. type: ''
  2672. },
  2673. viewRecordSelected: {
  2674. password: ''
  2675. },
  2676. batchRenewalList: [],
  2677. batchRenewalShow: false,
  2678. batchRenewalFrom: {
  2679. startTime: '',
  2680. endTime: ''
  2681. },
  2682. checkInListing: [],
  2683. freeUserManageRow: [],
  2684. freeUserDate: [],
  2685. freeUserDialog: false,
  2686. batchFreeShow: true,
  2687. freeUserTitle: '冻结用户',
  2688. userTypeList: [],
  2689. maxDateTime: '',
  2690. minDateTime: ''
  2691. };
  2692. },
  2693. computed: {},
  2694. created: function created() {
  2695. this.userTypeList = this.$MANUFACTURER.userType;
  2696. this.$store.commit('getTree');
  2697. this.tableheight = document.documentElement.clientHeight - 240;
  2698. this.userInfo = JSON.parse(localStorage.getItem('info'));
  2699. this.form.enterpriseId = this.userInfo.enterpriseId;
  2700. this.getAboutRoom();
  2701. this.getEnterprise();
  2702. this.getalllist();
  2703. // this.getcardstatus();
  2704. this.getAboutDevice(); //获取和房间相关的设备
  2705. this.getlockUser();
  2706. this.selectoption = JSON.parse(localStorage.getItem('selectoption'));
  2707. this.selectoptionValue = localStorage.getItem('tenantId');
  2708. if (document.documentElement.clientWidth < 1080) {
  2709. this.paginationConfig = 'total, prev, pager, next';
  2710. } else {
  2711. this.paginationConfig = 'total, sizes, prev, pager, next, jumper';
  2712. }
  2713. },
  2714. components: {
  2715. Schart: vue_schart["a" /* default */],
  2716. userContent: usercontent["a" /* default */],
  2717. zTree: zTree1["a" /* default */],
  2718. personLi: src_components_personLi,
  2719. zw: zw["a" /* default */], getFinger: getFinger["default"],
  2720. contrast: components_contrast_contrast,
  2721. NumberGrow: NumberGrow["a" /* default */]
  2722. },
  2723. mounted: function mounted() {
  2724. document.addEventListener('keydown', this.keyDown);
  2725. },
  2726. beforeDestroy: function beforeDestroy() {
  2727. this.$store.commit("increment", 1);
  2728. },
  2729. methods: {
  2730. // 限时密码
  2731. limitedTimePassword: function limitedTimePassword(index, row) {
  2732. var _this3 = this;
  2733. var startTime = moment_default()(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss");
  2734. var endTime = moment_default()(new Date().getTime() + 4 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss");
  2735. var data3 = {
  2736. code: "/zg/offlinepassword/limit",
  2737. data: {
  2738. userName: JSON.parse(this.drawerRow.info).userId,
  2739. lockId: row.deviceNum,
  2740. startTime: startTime,
  2741. endTime: endTime
  2742. }
  2743. };
  2744. this.$confirm('此操作将获取限时密码, 是否继续?', '提示', {
  2745. confirmButtonText: '确定',
  2746. cancelButtonText: '取消',
  2747. type: 'warning'
  2748. }).then(function () {
  2749. Object(api["g" /* httpPost */])(data3, _this3.$api.sendCommand).then(function (res4) {
  2750. if (res4.success) {
  2751. _this3.$alert("" + res4.data, '限时密码', {
  2752. confirmButtonText: "确定",
  2753. callback: function callback(action) {}
  2754. });
  2755. }
  2756. });
  2757. });
  2758. },
  2759. // 对时密码
  2760. timingPassword: function timingPassword(index, row) {
  2761. var _this4 = this;
  2762. var startTime = moment_default()(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss");
  2763. var endTime = moment_default()(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss");
  2764. var data3 = {
  2765. code: "/zg/offlinepassword/correctTime",
  2766. data: {
  2767. userName: JSON.parse(this.drawerRow.info).userId,
  2768. lockId: row.deviceNum
  2769. }
  2770. };
  2771. this.$confirm('此操作将获取对时密码, 是否继续?', '提示', {
  2772. confirmButtonText: '确定',
  2773. cancelButtonText: '取消',
  2774. type: 'warning'
  2775. }).then(function () {
  2776. Object(api["g" /* httpPost */])(data3, _this4.$api.sendCommand).then(function (res4) {
  2777. if (res4.success) {
  2778. _this4.$alert("" + res4.data, '对时密码', {
  2779. confirmButtonText: "确定",
  2780. callback: function callback(action) {}
  2781. });
  2782. }
  2783. });
  2784. });
  2785. },
  2786. // 清空所有密码
  2787. clearAllPassWord: function clearAllPassWord(index, row) {
  2788. var _this5 = this;
  2789. var startTime = moment_default()(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss");
  2790. var endTime = moment_default()(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss");
  2791. var data3 = {
  2792. code: "/zg/offlinepassword/clear",
  2793. data: {
  2794. userName: JSON.parse(this.drawerRow.info).userId,
  2795. lockId: row.deviceNum,
  2796. startTime: startTime
  2797. // endTime:endTime,
  2798. }
  2799. };
  2800. this.$confirm('此操作将获取清空密码, 是否继续?', '提示', {
  2801. confirmButtonText: '确定',
  2802. cancelButtonText: '取消',
  2803. type: 'warning'
  2804. }).then(function () {
  2805. Object(api["g" /* httpPost */])(data3, _this5.$api.sendCommand).then(function (res4) {
  2806. if (res4.success) {
  2807. _this5.$alert("" + res4.data, '清空密码', {
  2808. confirmButtonText: "确定",
  2809. callback: function callback(action) {}
  2810. });
  2811. }
  2812. });
  2813. });
  2814. },
  2815. /*获取临时离线密码*/
  2816. getLimitMethods: function getLimitMethods(index, row) {
  2817. var _this6 = this;
  2818. var startTime = moment_default()(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss");
  2819. var endTime = moment_default()(new Date().getTime() + 24 * 60 * 60 * 1000).format("YYYY-MM-DD HH:mm:ss");
  2820. var data3 = {
  2821. code: "/zg/offlinepassword/forever",
  2822. data: {
  2823. userName: JSON.parse(this.drawerRow.info).userId,
  2824. lockId: row.deviceNum,
  2825. startTime: startTime
  2826. // endTime:endTime,
  2827. }
  2828. };
  2829. Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res4) {
  2830. if (res4.success) {
  2831. _this6.$alert("" + res4.data, '离线密码', {
  2832. confirmButtonText: "确定",
  2833. callback: function callback(action) {}
  2834. });
  2835. }
  2836. });
  2837. },
  2838. // 对比结果
  2839. backTableMethods: function backTableMethods(data) {
  2840. console.log(data);
  2841. },
  2842. tableRowClassName: function tableRowClassName(_ref) {
  2843. var row = _ref.row,
  2844. rowIndex = _ref.rowIndex;
  2845. if (row.color == '0') {
  2846. return "wait-row";
  2847. } else if (row.color == '1') {
  2848. return "success-row";
  2849. } else if (row.color == '702') {
  2850. return "wait-row";
  2851. } else if (row.color == '999') {
  2852. return 'warning-row';
  2853. }
  2854. },
  2855. keyDown: function keyDown(e) {
  2856. //如果是回车则执行登录方法
  2857. if (e.keyCode == 13) {
  2858. if (this.$route.name == 'userManagement') {
  2859. if (!this.drawer) {
  2860. this.handleSearch();
  2861. }
  2862. }
  2863. }
  2864. },
  2865. handleDate: function handleDate(e) {
  2866. var _this7 = this;
  2867. this.$nextTick(function () {
  2868. if (e == null) {
  2869. _this7.value2 = [];
  2870. _this7.value3 = [];
  2871. _this7.freeUserDate = [];
  2872. }
  2873. });
  2874. },
  2875. freeUserConfirm: function freeUserConfirm() {
  2876. var _this8 = this;
  2877. this.$confirm('是否冻结该锁用户?', '提示', {
  2878. confirmButtonText: '确定',
  2879. cancelButtonText: '取消',
  2880. type: 'warning'
  2881. }).then(function () {
  2882. var row = _this8.freeUserManageRow[0];
  2883. // row.frozenStartTime = moment(this.freeUserDate[0]).format("X")
  2884. // row.frozenEndTime = moment(this.freeUserDate[1]).format("X")
  2885. allFun["a" /* default */].freeUserManage(1, row, function (callback) {
  2886. if (callback.code == 200) {
  2887. _this8.$message.success("冻结指令下发成功");
  2888. _this8.freeUserDialog = false;
  2889. } else {
  2890. _this8.$message.error("冻结指令下发失败");
  2891. }
  2892. });
  2893. });
  2894. return;
  2895. if (this.freeUserDate.length != 2) {
  2896. this.$confirm('是否冻结该锁用户?', '提示', {
  2897. confirmButtonText: '确定',
  2898. cancelButtonText: '取消',
  2899. type: 'warning'
  2900. }).then(function () {
  2901. var row = _this8.freeUserManageRow[0];
  2902. row.frozenStartTime = 1676603379; //moment(this.freeUserDate[0]).format("X")
  2903. row.frozenEndTime = 1895132615; //moment(this.freeUserDate[1]).format("X")
  2904. allFun["a" /* default */].freeUserManage(1, row, function (callback) {
  2905. if (callback.code == 200) {
  2906. _this8.$message.success("冻结指令下发成功");
  2907. _this8.freeUserDialog = false;
  2908. } else {
  2909. _this8.$message.error("冻结指令下发失败");
  2910. }
  2911. });
  2912. });
  2913. } else {
  2914. this.$message.error("请选择开始结束时间");
  2915. }
  2916. },
  2917. // 冻结锁用户
  2918. frozenMethods: function frozenMethods(index, row) {
  2919. var userRow = row;
  2920. var drawerRow = this.drawerRow;
  2921. userRow['userId'] = JSON.parse(drawerRow.info).userId || JSON.parse(drawerRow.info).userPassword;
  2922. userRow['keyId'] = JSON.parse(drawerRow.info).keyId || JSON.parse(drawerRow.info).userPassword;
  2923. userRow['frozenStartTime'] = moment_default()(row.startTime).format("X");
  2924. userRow['frozenEndTime'] = moment_default()(row.endTime).format("X");
  2925. this.freeUserDate = [row.startTime, row.endTime];
  2926. this.freeUserManageRow = [userRow];
  2927. this.freeUserTitle = '冻结锁用户';
  2928. this.frozenDialog = true;
  2929. // this.freeUserConfirm()
  2930. // this.batchFreeShow = true
  2931. // this.freeUserDialog = true
  2932. },
  2933. // 冻结用户选择完时间后
  2934. frozenTimeSureMethods: function frozenTimeSureMethods() {
  2935. var _this9 = this;
  2936. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
  2937. return regenerator_default.a.wrap(function _callee$(_context) {
  2938. while (1) {
  2939. switch (_context.prev = _context.next) {
  2940. case 0:
  2941. _this9.freeUserManageRow.map(function (li) {
  2942. li.frozenStartTime = moment_default()(_this9.value2[0]).valueOf() / 1000;
  2943. li.frozenEndTime = moment_default()(_this9.value2[1]).valueOf() / 1000;
  2944. });
  2945. _context.next = 3;
  2946. return _this9.freeUserConfirm();
  2947. case 3:
  2948. case "end":
  2949. return _context.stop();
  2950. }
  2951. }
  2952. }, _callee, _this9);
  2953. }))();
  2954. },
  2955. // 解冻锁用户
  2956. thawMethods: function thawMethods(index, row) {
  2957. var _this10 = this;
  2958. var userRow = row;
  2959. var drawerRow = this.drawerRow;
  2960. userRow['userId'] = JSON.parse(drawerRow.info).userId || JSON.parse(drawerRow.info).userPassword;
  2961. userRow['keyId'] = JSON.parse(drawerRow.info).keyId || JSON.parse(drawerRow.info).userPassword;
  2962. userRow['frozenStartTime'] = 1676603379; //moment(row.startTime).format("X")
  2963. userRow['frozenEndTime'] = 1895132615; //moment(row.endTime).format("X")
  2964. this.$confirm('是否解冻该锁用户?', '提示', {
  2965. confirmButtonText: '确定',
  2966. cancelButtonText: '取消',
  2967. type: 'warning'
  2968. }).then(function () {
  2969. allFun["a" /* default */].freeUserManage(0, userRow, function (callback) {
  2970. if (callback.code == 200) {
  2971. _this10.$message.success("解冻指令下发成功");
  2972. } else {
  2973. _this10.$message.error("解冻指令下发失败");
  2974. }
  2975. });
  2976. });
  2977. },
  2978. // 批量冻结用户
  2979. batchfrozenMethods: function batchfrozenMethods() {
  2980. this.freeUserTitle = '批量冻结锁用户';
  2981. this.freeUserDate = [];
  2982. this.batchFreeUserConfirm();
  2983. // this.batchFreeShow = false
  2984. // this.freeUserDialog = true
  2985. },
  2986. batchFreeUserConfirm: function batchFreeUserConfirm() {
  2987. var _this11 = this;
  2988. var userRow = this.batchRenewalList;
  2989. var drawerRow = this.drawerRow;
  2990. this.$confirm('是否冻结这些锁用户?', '提示', {
  2991. confirmButtonText: '确定',
  2992. cancelButtonText: '取消',
  2993. type: 'warning'
  2994. }).then(function () {
  2995. userRow.map(function (li) {
  2996. li['userId'] = JSON.parse(drawerRow.info).userId || JSON.parse(drawerRow.info).userPassword;
  2997. li['keyId'] = JSON.parse(drawerRow.info).keyId || JSON.parse(drawerRow.info).userPassword;
  2998. li['frozenStartTime'] = 1676603379; //moment(this.freeUserDate[0]).format("X")
  2999. li['frozenEndTime'] = 1895132615; //moment(this.freeUserDate[1]).format("X")
  3000. allFun["a" /* default */].freeUserManage(1, li, function (callback) {
  3001. if (callback.code == 200) {
  3002. _this11.$message.success("冻结指令下发成功");
  3003. _this11.batchRenewalList = [];
  3004. _this11.freeUserDialog = false;
  3005. } else {
  3006. _this11.$message.error("冻结指令下发失败");
  3007. }
  3008. });
  3009. });
  3010. });
  3011. },
  3012. // 批量解锁用户
  3013. batchthawMethods: function batchthawMethods() {
  3014. var _this12 = this;
  3015. var userRow = this.batchRenewalList;
  3016. var drawerRow = this.drawerRow;
  3017. this.$confirm('是否解冻这些锁用户?', '提示', {
  3018. confirmButtonText: '确定',
  3019. cancelButtonText: '取消',
  3020. type: 'warning'
  3021. }).then(function () {
  3022. userRow.map(function (li) {
  3023. li['userId'] = JSON.parse(drawerRow.info).userId || JSON.parse(drawerRow.info).userPassword;
  3024. li['keyId'] = JSON.parse(drawerRow.info).keyId || JSON.parse(drawerRow.info).userPassword;
  3025. li['frozenStartTime'] = 1676603379; //moment(li.startTime).format("X")
  3026. li['frozenEndTime'] = 1895132615; //moment(li.endTime).format("X")
  3027. allFun["a" /* default */].freeUserManage(0, li, function (callback) {
  3028. if (callback.code == 200) {
  3029. _this12.$message.success("解冻指令下发成功");
  3030. _this12.batchRenewalList = [];
  3031. _this12.freeUserDialog = false;
  3032. } else {
  3033. _this12.$message.error("解冻指令下发失败");
  3034. }
  3035. });
  3036. });
  3037. });
  3038. },
  3039. // 获取锁用户总数
  3040. getlockUser: function getlockUser() {
  3041. var data = {
  3042. pageNum: 0,
  3043. pageSize: 0,
  3044. q: stringify_default()({
  3045. type: 26,
  3046. status: 1,
  3047. types: "26"
  3048. }),
  3049. orderBy: "create_at desc"
  3050. };
  3051. Object(api["d" /* httpGet */])(data, this.$api.getCertificates).then(function (res) {
  3052. if (res.code == 200) {
  3053. var _data = util["a" /* default */].zlib_unzip(res.data);
  3054. // this.total = res.data.total
  3055. }
  3056. });
  3057. },
  3058. // 批量退租
  3059. batchLeaseback: function batchLeaseback() {
  3060. var _this13 = this;
  3061. this.$confirm('是否退租?', '提示', {
  3062. confirmButtonText: '确定',
  3063. cancelButtonText: '取消',
  3064. type: 'warning'
  3065. }).then(function () {
  3066. _this13.batchRenewalList.map(function (li, index) {
  3067. _this13.deleteRoomfun(index, li);
  3068. });
  3069. });
  3070. },
  3071. // 单个续租
  3072. singleRenewalMethods: function singleRenewalMethods(index, row) {
  3073. this.batchRenewalList = [row];
  3074. this.batchRenewalShow = true;
  3075. },
  3076. // 批量续租确认
  3077. batchRenewalMethods: function batchRenewalMethods() {
  3078. var _this14 = this;
  3079. this.$confirm('此操作将延长入住时间, 是否继续?', '提示', {
  3080. confirmButtonText: '确定',
  3081. cancelButtonText: '取消',
  3082. type: 'warning'
  3083. }).then(function () {
  3084. if (_this14.batchRenewalFrom.endTime == '' || _this14.batchRenewalFrom.startTime == '') {
  3085. _this14.$message.error("请选择时间范围");
  3086. return;
  3087. }
  3088. var drawerRow = _this14.drawerRow;
  3089. _this14.batchRenewalList.map(function (li) {
  3090. if (li.manufactureId == 101) {
  3091. var userTelephone = JSON.parse(drawerRow.info).userTelephone;
  3092. var userPassword = JSON.parse(drawerRow.info).userPassword;
  3093. var endTime = new Date(_this14.batchRenewalFrom.endTime).getTime();
  3094. var startTime = new Date(_this14.batchRenewalFrom.startTime).getTime();
  3095. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  3096. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  3097. var data = {
  3098. deviceNum: li.deviceNum,
  3099. imei: li.imei,
  3100. userTelephone: userTelephone,
  3101. userPassword: userPassword,
  3102. password: userPassword,
  3103. operateMode: 2,
  3104. order: 6202,
  3105. passwordStartTime: passwordStartTime,
  3106. passwordEndTime: passwordEndTime,
  3107. cardName: drawerRow.name,
  3108. roomName: li.roomName
  3109. };
  3110. 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) {
  3111. if (callback.success) {
  3112. var data = {
  3113. pageNum: 0,
  3114. pageSize: 0,
  3115. orderBy: "create_at desc",
  3116. q: {
  3117. cardId: drawerRow.id,
  3118. deviceNum: li.deviceNum,
  3119. types: "0,1,2,3,4",
  3120. inStatus: "0,1"
  3121. }
  3122. };
  3123. var unbind = {
  3124. id: li.id,
  3125. startTime: _this14.batchRenewalFrom.startTime,
  3126. endTime: _this14.batchRenewalFrom.endTime
  3127. };
  3128. Object(api["g" /* httpPost */])(unbind, _this14.$api.setTenant).then(function (res) {});
  3129. Object(api["d" /* httpGet */])(data, _this14.$api.getCertificates).then(function (res) {
  3130. var data = util["a" /* default */].zlib_unzip(res.data);
  3131. data.map(function (lt) {
  3132. util["a" /* default */].modifyPutCarfid(li, lt, startTime, endTime);
  3133. });
  3134. });
  3135. _this14.batchRenewalShow = false;
  3136. } else {
  3137. _this14.$message.error("修改失败");
  3138. }
  3139. });
  3140. } else if (li.manufactureId == 201 || li.manufactureId == 221) {
  3141. var endTime = new Date(_this14.batchRenewalFrom.endTime).getTime();
  3142. var startTime = new Date(_this14.batchRenewalFrom.startTime).getTime();
  3143. var unbind = [{
  3144. cardId: drawerRow.id,
  3145. siteId: li.roomId
  3146. }];
  3147. Object(api["g" /* httpPost */])(unbind, _this14.$api.unbindCard).then(function (res) {
  3148. var data1 = [{
  3149. cardId: drawerRow.id,
  3150. siteId: li.roomId,
  3151. startTime: _this14.batchRenewalFrom.startTime,
  3152. endTime: _this14.batchRenewalFrom.endTime
  3153. }];
  3154. Object(api["g" /* httpPost */])(data1, _this14.$api.bindCard).then(function (res) {
  3155. _this14.operation(0, _this14.drawerRow);
  3156. });
  3157. });
  3158. var data = {
  3159. pageNum: 0,
  3160. pageSize: 0,
  3161. orderBy: "create_at desc",
  3162. q: {
  3163. cardId: drawerRow.id,
  3164. deviceNum: li.deviceNum,
  3165. types: "0,1,2,3,4",
  3166. inStatus: "0,1"
  3167. }
  3168. };
  3169. Object(api["d" /* httpGet */])(data, _this14.$api.getCertificates).then(function (res) {
  3170. var data = util["a" /* default */].zlib_unzip(res.data);
  3171. data.map(function (lt) {
  3172. util["a" /* default */].modifyPutCarfidzg(li, lt, startTime, endTime);
  3173. });
  3174. });
  3175. _this14.batchRenewalShow = false;
  3176. } else {
  3177. _this14.$message.error("暂未发现对应设备");
  3178. }
  3179. });
  3180. });
  3181. },
  3182. batchRenewal: function batchRenewal() {
  3183. this.batchRenewalShow = true;
  3184. },
  3185. // 批量选择续租
  3186. renewalOption: function renewalOption(val) {
  3187. this.batchRenewalList = val;
  3188. },
  3189. batchProcessingData: function batchProcessingData() {
  3190. var _this15 = this;
  3191. var data = {
  3192. pageNum: 0,
  3193. pageSize: 0,
  3194. orderBy: "create_time desc"
  3195. };
  3196. // httpPost(data, this.$api.getlistNum).then((res1) => {
  3197. this.multipleSelection.map(function (li) {
  3198. _this15.GetCredentialList(li);
  3199. });
  3200. // })
  3201. },
  3202. GetCredentialList: function GetCredentialList(item) {
  3203. allFun["a" /* default */].GetCredentialList(item, 1, function (callback) {
  3204. var dataOne = util["a" /* default */].zlib_unzip(callback.data);
  3205. if (dataOne.length > 0) {
  3206. dataOne.map(function (li) {
  3207. li['fingerprint'] = JSON.parse(li.content).fingerprint;
  3208. });
  3209. var arr = util["a" /* default */].uniqueArray(dataOne, "fingerprint");
  3210. arr.map(function (li, index) {
  3211. allFun["a" /* default */].completePersonnelVouchers(li, index, 1);
  3212. });
  3213. }
  3214. });
  3215. allFun["a" /* default */].GetCredentialList(item, 2, function (callback) {
  3216. var dataOne = util["a" /* default */].zlib_unzip(callback.data);
  3217. if (dataOne.length > 0) {
  3218. dataOne.map(function (li) {
  3219. li['password'] = JSON.parse(li.content).password;
  3220. });
  3221. var arr = util["a" /* default */].uniqueArray(dataOne, "password");
  3222. arr.map(function (li, index) {
  3223. allFun["a" /* default */].completePersonnelVouchers(li, index, 2);
  3224. });
  3225. }
  3226. });
  3227. allFun["a" /* default */].GetCredentialList(item, 3, function (callback) {
  3228. var dataOne = util["a" /* default */].zlib_unzip(callback.data);
  3229. if (dataOne.length > 0) {
  3230. dataOne.map(function (li) {
  3231. li['password'] = JSON.parse(li.content).password;
  3232. });
  3233. var arr = util["a" /* default */].uniqueArray(dataOne, "password");
  3234. arr.map(function (li, index) {
  3235. allFun["a" /* default */].completePersonnelVouchers(li, index, 3);
  3236. });
  3237. }
  3238. });
  3239. allFun["a" /* default */].GetCredentialList(item, 4, function (callback) {
  3240. var dataOne = util["a" /* default */].zlib_unzip(callback.data);
  3241. if (dataOne.length > 0) {
  3242. dataOne.map(function (li) {
  3243. li['password'] = JSON.parse(li.content).password;
  3244. });
  3245. var arr = util["a" /* default */].uniqueArray(dataOne, "password");
  3246. arr.map(function (li, index) {
  3247. allFun["a" /* default */].completePersonnelVouchers(li, index, 4);
  3248. });
  3249. }
  3250. });
  3251. },
  3252. // 凭证避免重复
  3253. avoidRepetition: function avoidRepetition(e, type) {
  3254. var _this16 = this;
  3255. var person = this.drawerRow;
  3256. if (type == 12) {
  3257. this.roomtable1.map(function (li) {
  3258. var content = JSON.parse(li.content);
  3259. if (li.cardId == person.id && content.password == e && li.type == 12) {
  3260. _this16.$message.error("该身份证已存在");
  3261. _this16.voucher.idcard = '';
  3262. }
  3263. });
  3264. } else if (type == 13) {
  3265. this.roomtable1.map(function (li) {
  3266. var content = JSON.parse(li.content);
  3267. if (li.cardId == person.id && content.password == e && li.type == 13) {
  3268. _this16.$message.error("该NFC已存在");
  3269. _this16.voucher.nfc = '';
  3270. }
  3271. });
  3272. } else if (type == 14) {
  3273. this.roomtable1.map(function (li) {
  3274. var content = JSON.parse(li.content);
  3275. if (li.cardId == person.id && content.password == e && li.type == 14) {
  3276. _this16.$message.error("该密码已存在");
  3277. _this16.voucher.password = '';
  3278. }
  3279. });
  3280. }
  3281. },
  3282. // 指纹别名
  3283. fingerprintAliasMethod: function fingerprintAliasMethod(e) {
  3284. var _this17 = this;
  3285. var person = this.drawerRow;
  3286. this.roomtable1.map(function (li) {
  3287. var content = JSON.parse(li.content);
  3288. if (li.cardId == person.id && content.fingerprintAlias == e && li.type == 11) {
  3289. _this17.$message.error("该指纹已存在");
  3290. _this17.voucher.fingerprintAlias = '';
  3291. }
  3292. });
  3293. },
  3294. // 删除平台记录
  3295. deleteCertificatesMethod: function deleteCertificatesMethod(index, row) {
  3296. var _this18 = this;
  3297. this.$confirm("确定要删除平台记录吗?", "提示", {
  3298. type: "warning"
  3299. }).then(function () {
  3300. var data = {
  3301. ids: [row.id]
  3302. };
  3303. Object(api["g" /* httpPost */])(data, _this18.$api.deleteCertificates).then(function (res) {
  3304. if (res.success) {
  3305. _this18.$message.success("删除成功!");
  3306. _this18.getcertificate();
  3307. _this18.obtainVoucherIssuanceRecord();
  3308. }
  3309. });
  3310. });
  3311. },
  3312. // 记录筛选条件重置
  3313. recordFilterConditionReset: function recordFilterConditionReset() {
  3314. this.recordFilterCondition = {
  3315. imei: '',
  3316. deviceNum: '',
  3317. status: '',
  3318. type: '',
  3319. roomId: ''
  3320. };
  3321. },
  3322. // 查看下发记录
  3323. viewDistributionRecord: function viewDistributionRecord(index, row) {
  3324. this.activeName = 2;
  3325. this.viewRecordSelected = row;
  3326. this.obtainVoucherIssuanceRecord();
  3327. },
  3328. deleteCertificateMethod: function deleteCertificateMethod(index, row) {
  3329. var _this19 = this;
  3330. this.$confirm("此操作将删除锁上凭证,请确认!", "提示", {
  3331. type: "warning"
  3332. }).then(function () {
  3333. _this19.deleteLockedCredential(index, row);
  3334. }).catch(function () {});
  3335. },
  3336. // 删除锁上凭证
  3337. deleteLockedCredential: function deleteLockedCredential(index, row) {
  3338. var _this20 = this;
  3339. var ids = this.roomtable;
  3340. var that = this;
  3341. var str = {};
  3342. var q = {
  3343. deviceNum: row.deviceNum,
  3344. imei: row.imei,
  3345. lockType: 1
  3346. };
  3347. var data = {
  3348. q: stringify_default()(q),
  3349. pageNum: 1,
  3350. pageSize: 10
  3351. };
  3352. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  3353. if (res.data.list.length > 0) {
  3354. var cardName = row.name + '-' + JSON.parse(row.content).pzname;
  3355. if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
  3356. if (row.type == 1) {
  3357. _this20.getfiId1(row, function (data) {
  3358. if (data.length > 0) {
  3359. equipment["a" /* default */].delFingerPrints(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, data[0].face, 0, row.startTime, row.endTime, cardName, res.data.list[0].roomName, function (callback) {
  3360. if (callback.success) {
  3361. var content = JSON.parse(row.content);
  3362. content.operateMode = 18;
  3363. var updatedata = {
  3364. id: row.id,
  3365. status: 0,
  3366. content: stringify_default()(content),
  3367. serial: callback.data.serialNumber
  3368. };
  3369. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3370. that.$message.success("下发成功");
  3371. that.obtainVoucherIssuanceRecord();
  3372. } else {
  3373. that.$message.error(callback.msg);
  3374. }
  3375. });
  3376. } else {
  3377. that.$message.error("删除失败!");
  3378. }
  3379. });
  3380. } else if (row.type == 2) {
  3381. _this20.getfiId1(row, function (data) {
  3382. if (data.length > 0) {
  3383. equipment["a" /* default */].delCardRegister(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, 1, JSON.parse(row.content).password, 36, row.startTime, row.endTime, 6215, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  3384. if (callback.success) {
  3385. var content = JSON.parse(row.content);
  3386. content.operateMode = 15;
  3387. var updatedata = {
  3388. id: row.id,
  3389. status: 0,
  3390. content: stringify_default()(content),
  3391. serial: callback.data.serialNumber
  3392. };
  3393. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3394. that.$message.success("下发成功");
  3395. that.obtainVoucherIssuanceRecord();
  3396. } else {
  3397. that.$message.error(callback.msg);
  3398. }
  3399. });
  3400. } else {
  3401. that.$message.error("删除失败!");
  3402. }
  3403. });
  3404. } else if (row.type == 3) {
  3405. _this20.getfiId1(row, function (data) {
  3406. if (data.length > 0) {
  3407. equipment["a" /* default */].delCardRegister(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, 1, JSON.parse(row.content).password, 50, row.startTime, row.endTime, 6212, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  3408. if (callback.success) {
  3409. var content = JSON.parse(row.content);
  3410. content.operateMode = 12;
  3411. var updatedata = {
  3412. id: row.id,
  3413. status: 0,
  3414. content: stringify_default()(content),
  3415. serial: callback.data.serialNumber
  3416. };
  3417. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3418. that.$message.success("下发成功");
  3419. that.obtainVoucherIssuanceRecord();
  3420. } else {
  3421. that.$message.error(callback.msg);
  3422. }
  3423. });
  3424. } else {
  3425. that.$message.error("删除失败!");
  3426. }
  3427. });
  3428. } else if (row.type == 4) {
  3429. _this20.getfiId1(row, function (data) {
  3430. if (data.length > 0) {
  3431. equipment["a" /* default */].delForeverPassword(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, JSON.parse(row.content).password, 255, row.startTime, row.endTime, 6209, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  3432. if (callback.success) {
  3433. var content = JSON.parse(row.content);
  3434. content.operateMode = 9;
  3435. var updatedata = {
  3436. id: row.id,
  3437. status: 0,
  3438. content: stringify_default()(content),
  3439. serial: callback.data.serialNumber
  3440. };
  3441. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3442. that.$message.success("下发成功");
  3443. that.obtainVoucherIssuanceRecord();
  3444. } else {
  3445. that.$message.error(callback.msg);
  3446. }
  3447. });
  3448. } else {
  3449. that.$message.error("删除失败");
  3450. }
  3451. });
  3452. }
  3453. } else if (res.data.list[0].manufactureId == 101) {
  3454. if (row.type == 1) {
  3455. _this20.getfiId(row, function (data) {
  3456. if (data.length > 0) {
  3457. var fpid = "";
  3458. if (data[0].face) {
  3459. fpid = data[0].face.toString(16);
  3460. if (fpid.length != 2) {
  3461. fpid = "0" + fpid;
  3462. }
  3463. } else {
  3464. if (data[0].face == 0) {
  3465. fpid = data[0].face.toString(16);
  3466. fpid = "0" + fpid;
  3467. }
  3468. }
  3469. str = {
  3470. imei: row.imei,
  3471. deviceNum: row.deviceNum,
  3472. userTelephone: JSON.parse(row.content).userTelephone,
  3473. operateMode: 18,
  3474. order: 6218,
  3475. password: fpid,
  3476. userPassword: JSON.parse(row.content).userPassword,
  3477. is: false,
  3478. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  3479. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  3480. cardName: cardName,
  3481. roomName: res.data.list[0].roomName
  3482. };
  3483. if (JSON.parse(row.content).pass) {
  3484. str['pass'] = true;
  3485. } else {
  3486. str['pass'] = false;
  3487. }
  3488. Object(api["g" /* httpPost */])(str, that.$api.getDeviceOperateUserInfo).then(function (res1) {
  3489. if (res1.success) {
  3490. var content = JSON.parse(row.content);
  3491. content.operateMode = 18;
  3492. var updatedata = {
  3493. id: row.id,
  3494. status: 0,
  3495. content: stringify_default()(content),
  3496. serial: res1.data.serialNumber
  3497. };
  3498. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3499. that.$message.success("下发成功");
  3500. that.obtainVoucherIssuanceRecord();
  3501. } else {
  3502. that.$message.error("删除失败!");
  3503. }
  3504. });
  3505. } else {
  3506. that.$message.error("删除失败!");
  3507. }
  3508. });
  3509. return false;
  3510. } else if (row.type == 2) {
  3511. str = {
  3512. imei: row.imei,
  3513. deviceNum: row.deviceNum,
  3514. userTelephone: JSON.parse(row.content).userTelephone,
  3515. operateMode: 15,
  3516. order: 6215,
  3517. password: JSON.parse(row.content).password,
  3518. userPassword: JSON.parse(row.content).userPassword,
  3519. is: false,
  3520. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  3521. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  3522. cardName: cardName,
  3523. roomName: res.data.list[0].roomName
  3524. };
  3525. } else if (row.type == 3) {
  3526. str = {
  3527. imei: row.imei,
  3528. deviceNum: row.deviceNum,
  3529. userTelephone: JSON.parse(row.content).userTelephone,
  3530. operateMode: 12,
  3531. order: 6212,
  3532. password: JSON.parse(row.content).password,
  3533. userPassword: JSON.parse(row.content).userPassword,
  3534. is: false,
  3535. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  3536. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  3537. cardName: cardName,
  3538. roomName: res.data.list[0].roomName
  3539. };
  3540. } else if (row.type == 4) {
  3541. str = {
  3542. imei: row.imei,
  3543. deviceNum: row.deviceNum,
  3544. userTelephone: JSON.parse(row.content).userTelephone,
  3545. operateMode: 9,
  3546. order: 6209,
  3547. userPassword: JSON.parse(row.content).userPassword,
  3548. password: JSON.parse(row.content).password,
  3549. is: false,
  3550. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  3551. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  3552. cardName: cardName,
  3553. roomName: res.data.list[0].roomName
  3554. };
  3555. }
  3556. if (JSON.parse(row.content).pass) {
  3557. str['pass'] = true;
  3558. } else {
  3559. str['pass'] = false;
  3560. }
  3561. Object(api["g" /* httpPost */])(str, _this20.$api.getDeviceOperateUserInfo).then(function (res1) {
  3562. if (res1.success) {
  3563. var content = JSON.parse(row.content);
  3564. content.operateMode = str.operateMode;
  3565. var updatedata = {
  3566. id: row.id,
  3567. status: 0,
  3568. content: stringify_default()(content),
  3569. serial: res1.data.serialNumber
  3570. };
  3571. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3572. that.$message.success("下发成功");
  3573. that.obtainVoucherIssuanceRecord();
  3574. } else {
  3575. that.$message.error("删除失败!");
  3576. }
  3577. });
  3578. } else if (res.data.list[0].manufactureId == 1201) {
  3579. if (row.type == 1) {} else if (row.type == 4) {
  3580. var _data2 = {
  3581. code: "lwj/passwordOperate",
  3582. data: {
  3583. lockerId: row.deviceNum,
  3584. lockerUserId: JSON.parse(row.content).userPassword,
  3585. action: 2,
  3586. password: JSON.parse(row.content).password,
  3587. startTime: row.startTime,
  3588. endTime: row.endTime,
  3589. operateMode: 9,
  3590. order: 6209,
  3591. cardName: cardName,
  3592. roomName: res.data.list[0].roomName
  3593. }
  3594. };
  3595. Object(api["g" /* httpPost */])(_data2, _this20.$api.sendCommand).then(function (res) {
  3596. if (res.success) {
  3597. var content = JSON.parse(row.content);
  3598. content.operateMode = 9;
  3599. var updatedata = {
  3600. id: row.id,
  3601. status: 0,
  3602. content: stringify_default()(content),
  3603. serial: res.data.serialNumber
  3604. };
  3605. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  3606. } else {
  3607. _this20.$message.error(res.msg);
  3608. }
  3609. });
  3610. }
  3611. }
  3612. } else {
  3613. _this20.$message.error("未找到对应设备");
  3614. }
  3615. });
  3616. },
  3617. // 获取凭证下发记录
  3618. obtainVoucherIssuanceRecord: function obtainVoucherIssuanceRecord() {
  3619. var _this21 = this;
  3620. var AboutDevice = this.$store.state.roomAbout;
  3621. var password = JSON.parse(this.viewRecordSelected.content).password || '';
  3622. var type = '';
  3623. if (this.viewRecordSelected.type == 11) {
  3624. type = 1;
  3625. } else if (this.viewRecordSelected.type == 12) {
  3626. type = 2;
  3627. } else if (this.viewRecordSelected.type == 13) {
  3628. type = 3;
  3629. } else if (this.viewRecordSelected.type == 14) {
  3630. type = 4;
  3631. }
  3632. if (this.recordFilterCondition.roomId) {
  3633. var t = {
  3634. roomIds: [this.recordFilterCondition.roomId],
  3635. lockType: 1
  3636. };
  3637. var data = {
  3638. q: stringify_default()(t)
  3639. };
  3640. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  3641. if (res.success) {
  3642. var status = '';
  3643. if (_this21.recordFilterCondition.status == '') {
  3644. status = "0,1,702";
  3645. } else {
  3646. status = _this21.recordFilterCondition.status;
  3647. }
  3648. if (res.data.list.length > 0) {
  3649. if (_this21.viewRecordSelected.type == 13 && (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221)) {
  3650. password = util["a" /* default */].cardFormatConversion(password);
  3651. }
  3652. }
  3653. var data6 = {
  3654. pageNum: _this21.currentPage1,
  3655. pageSize: _this21.pageSize1,
  3656. orderBy: "create_at desc",
  3657. q: stringify_default()({
  3658. info: {
  3659. password: password
  3660. },
  3661. cardId: _this21.drawerRow.id,
  3662. deviceNum: res.data.list[0].deviceNum,
  3663. imei: _this21.recordFilterCondition.imei,
  3664. types: type || '0,1,2,3,4',
  3665. inStatus: status
  3666. })
  3667. };
  3668. Object(api["d" /* httpGet */])(data6, _this21.$api.getCertificates).then(function (res) {
  3669. if (res.success) {
  3670. var certiflist = util["a" /* default */].zlib_unzip(res.data);
  3671. console.log(certiflist);
  3672. certiflist.map(function (li) {
  3673. li.createAt = _this21.time(+new Date(li.createAt));
  3674. li['userTelephone'] = JSON.parse(li.content).userTelephone;
  3675. li['operateMode'] = JSON.parse(li.content).operateMode;
  3676. if (JSON.parse(li.content).fingerprintAlias) {
  3677. li.pzname = JSON.parse(li.content).pzname + "-" + JSON.parse(li.content).fingerprintAlias;
  3678. } else {
  3679. li.pzname = JSON.parse(li.content).pzname;
  3680. }
  3681. li['statusText'] = util["a" /* default */].statusCode(li.status);
  3682. var operateMode = JSON.parse(li.content).operateMode;
  3683. if (li.status == 0) {
  3684. if (operateMode == 18 || operateMode == 15 || operateMode == 12 || operateMode == 9) {
  3685. li['statusText'] = '删除中';
  3686. } else if (operateMode == 17 || operateMode == 14 || operateMode == 11 || operateMode == 8) {
  3687. li['statusText'] = '修改中';
  3688. }
  3689. } else if (li.status == 702) {
  3690. if (operateMode == 18 || operateMode == 15 || operateMode == 12 || operateMode == 9) {
  3691. li['statusText'] = '删除失败';
  3692. } else if (operateMode == 17 || operateMode == 14 || operateMode == 11 || operateMode == 8) {
  3693. li['statusText'] = '修改失败';
  3694. }
  3695. }
  3696. li.password = JSON.parse(li.content).password;
  3697. li['startTimeText'] = util["a" /* default */].formatTime(li.startTime);
  3698. li['endTimeText'] = util["a" /* default */].formatTime(li.endTime);
  3699. li['data'] = JSON.parse(li.content).password;
  3700. if (li.type == 1) {
  3701. li['data'] = li.id;
  3702. }
  3703. var resultArr = AboutDevice.filter(function (_item) {
  3704. return _item.imei == li.imei;
  3705. })[0];
  3706. if (resultArr) {
  3707. li.roomId = resultArr.id;
  3708. li.roomName = resultArr.roomName;
  3709. } else {
  3710. li.roomId = "";
  3711. li.roomName = JSON.parse(li.content).roomName || "";
  3712. }
  3713. });
  3714. _this21.sendListRecords = certiflist;
  3715. _this21.total1 = res.data.total;
  3716. } else {
  3717. _this21.$message.error("获取失败");
  3718. }
  3719. });
  3720. } else {
  3721. _this21.$message.error("获取房间对应门锁信息失败");
  3722. }
  3723. });
  3724. } else {
  3725. var status = '';
  3726. if (this.recordFilterCondition.status == '') {
  3727. status = "0,1,702";
  3728. } else {
  3729. status = this.recordFilterCondition.status;
  3730. }
  3731. var data6 = {};
  3732. if (this.viewRecordSelected.type == 11) {
  3733. password = util["a" /* default */].cardFormatConversion(password);
  3734. data6 = {
  3735. pageNum: this.currentPage1,
  3736. pageSize: this.pageSize1,
  3737. orderBy: "create_at desc",
  3738. q: stringify_default()({
  3739. cardId: this.drawerRow.id,
  3740. info: {
  3741. pzname: JSON.parse(this.viewRecordSelected.content).pzname
  3742. },
  3743. deviceNum: this.recordFilterCondition.deviceNum,
  3744. types: '0,1,2,3,4',
  3745. imei: this.recordFilterCondition.imei,
  3746. inStatus: status,
  3747. type: type
  3748. })
  3749. };
  3750. } else if (this.viewRecordSelected.type == 13) {
  3751. password = util["a" /* default */].cardFormatConversion(password);
  3752. data6 = {
  3753. pageNum: this.currentPage1,
  3754. pageSize: this.pageSize1,
  3755. orderBy: "create_at desc",
  3756. q: stringify_default()({
  3757. cardId: this.drawerRow.id,
  3758. info: {
  3759. pzname: JSON.parse(this.viewRecordSelected.content).pzname
  3760. },
  3761. deviceNum: this.recordFilterCondition.deviceNum,
  3762. types: type || '0,1,2,3,4',
  3763. imei: this.recordFilterCondition.imei,
  3764. inStatus: status
  3765. })
  3766. };
  3767. } else {
  3768. data6 = {
  3769. pageNum: this.currentPage1,
  3770. pageSize: this.pageSize1,
  3771. orderBy: "create_at desc",
  3772. q: stringify_default()({
  3773. cardId: this.drawerRow.id,
  3774. info: {
  3775. password: password
  3776. },
  3777. deviceNum: this.recordFilterCondition.deviceNum,
  3778. types: type || '0,1,2,3,4',
  3779. imei: this.recordFilterCondition.imei,
  3780. inStatus: status
  3781. })
  3782. };
  3783. }
  3784. Object(api["d" /* httpGet */])(data6, this.$api.getCertificates).then(function (res) {
  3785. if (res.success) {
  3786. var certiflist = util["a" /* default */].zlib_unzip(res.data);
  3787. certiflist.map(function (li) {
  3788. li.createAt = _this21.time(+new Date(li.createAt));
  3789. li['userTelephone'] = JSON.parse(li.content).userTelephone;
  3790. li['operateMode'] = JSON.parse(li.content).operateMode;
  3791. var operateMode = JSON.parse(li.content).operateMode;
  3792. li['statusText'] = util["a" /* default */].statusCode(li.status);
  3793. if (li.status == 0) {
  3794. if (operateMode == 18 || operateMode == 15 || operateMode == 12 || operateMode == 9) {
  3795. li['statusText'] = '删除中';
  3796. } else if (operateMode == 17 || operateMode == 14 || operateMode == 11 || operateMode == 8) {
  3797. li['statusText'] = '修改中';
  3798. }
  3799. } else if (li.status == 702) {
  3800. if (operateMode == 18 || operateMode == 15 || operateMode == 12 || operateMode == 9) {
  3801. li['statusText'] = '删除失败';
  3802. } else if (operateMode == 17 || operateMode == 14 || operateMode == 11 || operateMode == 8) {
  3803. li['statusText'] = '修改失败';
  3804. }
  3805. } else if (li.status == 1) {
  3806. if (operateMode == 18 || operateMode == 15 || operateMode == 12 || operateMode == 9) {
  3807. li['statusText'] = '删除成功';
  3808. } else if (operateMode == 17 || operateMode == 14 || operateMode == 11 || operateMode == 8) {
  3809. li['statusText'] = '修改成功';
  3810. }
  3811. }
  3812. if (JSON.parse(li.content).fingerprintAlias) {
  3813. li.pzname = JSON.parse(li.content).pzname + "-" + JSON.parse(li.content).fingerprintAlias;
  3814. } else {
  3815. li.pzname = JSON.parse(li.content).pzname;
  3816. }
  3817. li.password = JSON.parse(li.content).password;
  3818. li['startTimeText'] = util["a" /* default */].formatTime(li.startTime);
  3819. li['endTimeText'] = util["a" /* default */].formatTime(li.endTime);
  3820. li['data'] = JSON.parse(li.content).password;
  3821. if (li.type == 1) {
  3822. li['data'] = li.id;
  3823. }
  3824. var resultArr = AboutDevice.filter(function (_item) {
  3825. return _item.imei == li.imei;
  3826. })[0];
  3827. if (resultArr) {
  3828. li.roomId = resultArr.id;
  3829. li.roomName = resultArr.roomName;
  3830. } else {
  3831. li.roomId = "";
  3832. li.roomName = JSON.parse(li.content).roomName || "";
  3833. }
  3834. });
  3835. _this21.sendListRecords = certiflist;
  3836. _this21.total1 = res.data.total;
  3837. } else {
  3838. _this21.$message.error("获取失败");
  3839. }
  3840. });
  3841. }
  3842. },
  3843. // 导出
  3844. exportfun: function exportfun() {
  3845. var q = {
  3846. type: "0"
  3847. };
  3848. var data = {
  3849. q: stringify_default()(q),
  3850. fileName: "租客信息"
  3851. };
  3852. Object(api["a" /* download */])(data, this.$api.exportCard).then(function (res) {
  3853. var link = document.createElement("a");
  3854. var blob = new Blob([res], {
  3855. type: "application/vnd.ms-excel"
  3856. });
  3857. var objectUrl = URL.createObjectURL(blob);
  3858. link.href = objectUrl;
  3859. link.download = "租客信息.xlsx";
  3860. link.click();
  3861. URL.revokeObjectURL(objectUrl);
  3862. });
  3863. },
  3864. // 删除所有对应人员凭证
  3865. dellAllCertificate: function dellAllCertificate(row) {
  3866. var _this22 = this;
  3867. var data6 = {
  3868. pageNum: 0,
  3869. pageSize: 0,
  3870. orderBy: "create_at desc",
  3871. q: {
  3872. cardId: row.id
  3873. }
  3874. };
  3875. Object(api["d" /* httpGet */])(data6, this.$api.getCertificates).then(function (res6) {
  3876. if (res6.success) {
  3877. var ids = [];
  3878. var data = util["a" /* default */].zlib_unzip(res6.data);
  3879. data.map(function (li) {
  3880. ids.push(li.id);
  3881. });
  3882. if (ids.length > 0) {
  3883. var data7 = {
  3884. ids: ids
  3885. };
  3886. Object(api["g" /* httpPost */])(data7, _this22.$api.deleteCertificates).then(function (res7) {
  3887. if (res7.success) {
  3888. _this22.$message.success("成功删除人员对应凭证");
  3889. } else {
  3890. _this22.$message.error("删除人员对应凭证失败");
  3891. }
  3892. });
  3893. }
  3894. } else {
  3895. _this22.$message.error("删除人员对应凭证失败");
  3896. }
  3897. });
  3898. },
  3899. // 删除用户
  3900. deleteUser: function deleteUser(row, roomtable) {
  3901. var _this23 = this;
  3902. var selectkey = roomtable;
  3903. console.log();
  3904. if (selectkey.length > 0) {
  3905. selectkey.forEach(function (li, index) {
  3906. var resultArr = _this23.AboutDevice.filter(function (_item) {
  3907. return _item.roomId == li;
  3908. })[0];
  3909. if (resultArr) {
  3910. if (resultArr.imei) {
  3911. var roomName = _this23.zNodes.filter(function (item) {
  3912. return li === item.id;
  3913. });
  3914. if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
  3915. var data = {
  3916. lockerId: resultArr.deviceNum,
  3917. imei: resultArr.imei,
  3918. lockerUserId: JSON.parse(row.info).userPassword,
  3919. keyId: JSON.parse(row.info).userPassword,
  3920. role: 0,
  3921. action: 2, //1--添加、2--删除、3--修改
  3922. order: 6203,
  3923. cardName: row.name,
  3924. roomName: roomName[0].name
  3925. };
  3926. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) {
  3927. if (callback.success) {
  3928. _this23.$message.success('下发成功');
  3929. _this23.dellAllCertificate(row);
  3930. } else {
  3931. _this23.$message.error(callback.msg);
  3932. }
  3933. });
  3934. } else if (resultArr.manufactureId == 101) {
  3935. var str1 = {
  3936. imei: resultArr.imei,
  3937. deviceNum: resultArr.deviceNum,
  3938. userTelephone: JSON.parse(row.info).userTelephone,
  3939. userPassword: JSON.parse(row.info).userPassword,
  3940. cardName: row.name,
  3941. roomName: roomName[0].name
  3942. };
  3943. equipment["a" /* default */].LDDeleteUser(str1.deviceNum, str1.imei, str1.userTelephone, str1.userPassword, str1.cardName, str1.roomName, function (callback) {
  3944. if (callback.success) {
  3945. _this23.$message.success('下发成功');
  3946. _this23.dellAllCertificate(row);
  3947. } else {
  3948. _this23.$message.error(callback.msg);
  3949. }
  3950. });
  3951. }
  3952. }
  3953. } else {
  3954. _this23.dellAllCertificate(row);
  3955. }
  3956. });
  3957. } else {
  3958. this.dellAllCertificate(row);
  3959. }
  3960. },
  3961. // 多个删除
  3962. selectmoredel: function selectmoredel() {
  3963. var _this24 = this;
  3964. var list = this.multipleSelection;
  3965. var idlist = [];
  3966. var that = this;
  3967. if (list.length == 0) {
  3968. this.$message.error("请勾选需要删除的数据");
  3969. } else {
  3970. this.$confirm("确定要删除吗?", "提示", {
  3971. type: "warning"
  3972. }).then(function () {
  3973. list.map(function (row) {
  3974. var unbindCarddata = [];
  3975. _this24.screenRoom1(row.id, function (roomtable) {
  3976. var arr = [];
  3977. roomtable.map(function (li) {
  3978. var data = {
  3979. siteId: li.roomId,
  3980. cardId: row.id
  3981. };
  3982. arr.push(li.roomId);
  3983. unbindCarddata.push(data);
  3984. });
  3985. Object(api["g" /* httpPost */])(unbindCarddata, that.$api.unbindCard).then(function (res) {
  3986. var data = {
  3987. ids: [row.id]
  3988. };
  3989. Object(api["g" /* httpPost */])(data, that.$api.deleteCard).then(function (res) {
  3990. if (res.success) {
  3991. that.$message.success("删除成功");
  3992. that.deleteUser(row, arr);
  3993. that.getlist();
  3994. } else {
  3995. that.$message.error("删除失败");
  3996. }
  3997. });
  3998. });
  3999. });
  4000. });
  4001. });
  4002. }
  4003. },
  4004. // 触发搜索按钮
  4005. handleSearch: function handleSearch() {
  4006. var _this25 = this;
  4007. var q = {
  4008. // type: 0,
  4009. name: this.query.name,
  4010. number: this.query.number,
  4011. phone: this.query.phone
  4012. };
  4013. var data = {
  4014. pageNum: 1,
  4015. pageSize: 10,
  4016. orderBy: "create_time desc",
  4017. q: stringify_default()(q)
  4018. };
  4019. this.currentPage4 = 1;
  4020. var roomAbout = this.$store.state.roomAbout;
  4021. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res1) {
  4022. var para = [];
  4023. res1.data.list.map(function (li, index) {
  4024. var userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : '';
  4025. var str = {
  4026. imei: li.imei,
  4027. userTelephone: userTelephone,
  4028. password: "",
  4029. operateMode: 1
  4030. };
  4031. para.push(str);
  4032. _this25.$store.commit("increment", 1);
  4033. li.status = 3;
  4034. li['rommNameText'] = _this25.screenRoomName(li.id);
  4035. });
  4036. // this.getallstatus(para);
  4037. _this25.userlist = res1.data.list;
  4038. _this25.total = res1.data.total;
  4039. });
  4040. },
  4041. // 获取人员列表
  4042. getlist: function getlist() {
  4043. var _this26 = this;
  4044. var q = {
  4045. // type: 0,
  4046. };
  4047. var data = {
  4048. pageNum: this.currentPage4,
  4049. pageSize: this.pageSize,
  4050. orderBy: "create_time desc",
  4051. q: stringify_default()(q)
  4052. };
  4053. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res1) {
  4054. res1.data.list.map(function (li, index) {
  4055. li['rommNameText'] = _this26.screenRoomName(li.id);
  4056. });
  4057. _this26.userlist = res1.data.list;
  4058. _this26.total = res1.data.total;
  4059. });
  4060. },
  4061. screenRoomName: function screenRoomName(id) {
  4062. var _this27 = this;
  4063. var roomAbout = this.$store.state.roomAbout;
  4064. var arr = '';
  4065. roomAbout.map(function (lt) {
  4066. if (id == lt.cardId) {
  4067. var name = util["a" /* default */].findIndexArray(_this27.roomlistZNodes, lt.roomId, []);
  4068. if (name) {
  4069. var path = name.join('/');
  4070. arr += path + '、';
  4071. }
  4072. }
  4073. });
  4074. return arr;
  4075. },
  4076. // 查询和人员相关的房间
  4077. getAboutRoom: function getAboutRoom() {
  4078. var _this28 = this;
  4079. Object(api["d" /* httpGet */])("", this.$api.onlyTenant).then(function (res) {
  4080. _this28.$store.commit("getAboutRoom", res.data.list);
  4081. _this28.getlist();
  4082. });
  4083. },
  4084. getEnterprise: function getEnterprise() {
  4085. var _this29 = this;
  4086. Object(api["d" /* httpGet */])("", this.$api.getEnterprise).then(function (res) {
  4087. res.data.list.map(function (li) {
  4088. li['pid'] = li.parentId;
  4089. li['label'] = li.name;
  4090. li['value'] = li.id;
  4091. });
  4092. var array = util["a" /* default */].uniqueArray(res.data.list, "id");
  4093. var roomlistZNodes = Object(utils["q" /* ztreeToElementTree2 */])(array, []);
  4094. _this29.enterpriseListOption = roomlistZNodes;
  4095. _this29.enterpriselist = res.data.list;
  4096. });
  4097. },
  4098. // 获取绑定所有房间
  4099. getalllist: function getalllist() {
  4100. var _this30 = this;
  4101. var data = {};
  4102. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  4103. _this30.zNodes = JSON.parse(stringify_default()(res.data.list.list));
  4104. var zNodes = JSON.parse(stringify_default()(res.data.list.list));
  4105. var array = util["a" /* default */].uniqueArray(zNodes, "id");
  4106. _this30.roomlistZNodes = Object(utils["q" /* ztreeToElementTree2 */])(array, []);
  4107. });
  4108. },
  4109. // 获取卡统计
  4110. getcardstatus: function getcardstatus() {
  4111. var _this31 = this;
  4112. var data = {
  4113. cardState: 0
  4114. };
  4115. Object(api["g" /* httpPost */])(data, this.$api.countStatus).then(function (res) {
  4116. res.data.map(function (li) {
  4117. if (li.value == 1) {
  4118. _this31.normal = li.total;
  4119. } else if (li.value == 2) {
  4120. _this31.lose = li.total;
  4121. } else if (li.value == 3) {
  4122. _this31.frozen = li.total;
  4123. }
  4124. });
  4125. });
  4126. },
  4127. // 查询和房间相关的设备
  4128. getAboutDevice: function getAboutDevice() {
  4129. var _this32 = this;
  4130. Object(api["d" /* httpGet */])("", this.$api.onlySiteDevice).then(function (res) {
  4131. _this32.AboutDevice = res.data.list;
  4132. _this32.$store.commit("getAboutDevice", res.data.list);
  4133. });
  4134. },
  4135. credentialSearchReset: function credentialSearchReset() {
  4136. this.credentialSearch = {
  4137. deviceNum: '',
  4138. imei: '',
  4139. status: '',
  4140. roomId: '',
  4141. type: ''
  4142. };
  4143. },
  4144. selectTenantId: function selectTenantId(e) {
  4145. localStorage.setItem('tenantId', e);
  4146. this.reload();
  4147. },
  4148. // 续住保存
  4149. continuationManagementSave: function continuationManagementSave() {
  4150. var _this33 = this;
  4151. console.log(this.roomtable, this.drawerRow);
  4152. this.$confirm("是否续住", "提示", {
  4153. type: "warning"
  4154. }).then(function () {
  4155. if (_this33.continuationManagementDate.time == '') {
  4156. _this33.$message.error("请选择时间范围");
  4157. return;
  4158. }
  4159. var endTime = new Date(_this33.continuationManagementDate.time[1]).getTime();
  4160. var startTime = new Date(_this33.continuationManagementDate.time[0]).getTime();
  4161. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  4162. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  4163. _this33.roomtable.map(function (li) {
  4164. var resultArr = _this33.AboutDevice.filter(function (_item) {
  4165. return _item.roomId == li.roomId;
  4166. })[0];
  4167. var roomName = _this33.zNodes.filter(function (item) {
  4168. return li.roomId === item.id;
  4169. });
  4170. if (resultArr) {
  4171. if (resultArr.manufactureId == 101) {
  4172. var userTelephone = JSON.parse(_this33.drawerRow.info).userTelephone;
  4173. var userPassword = JSON.parse(_this33.drawerRow.info).userPassword;
  4174. resultArr.roomName = roomName[0].name;
  4175. var data = {
  4176. deviceNum: resultArr.deviceNum,
  4177. imei: resultArr.imei,
  4178. userTelephone: userTelephone,
  4179. userPassword: userPassword,
  4180. password: userPassword,
  4181. operateMode: 2,
  4182. order: 6202,
  4183. passwordStartTime: passwordStartTime,
  4184. passwordEndTime: passwordEndTime,
  4185. cardName: _this33.drawerRow.name,
  4186. roomName: resultArr.roomName
  4187. };
  4188. 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) {
  4189. if (callback.success) {
  4190. var data = {
  4191. pageNum: 0,
  4192. pageSize: 0,
  4193. orderBy: "create_at desc",
  4194. q: {
  4195. cardId: _this33.drawerRow.id,
  4196. deviceNum: resultArr.deviceNum
  4197. }
  4198. };
  4199. var unbind = [{
  4200. siteId: _this33.drawerRow.id,
  4201. cardId: resultArr.roomId
  4202. }];
  4203. Object(api["g" /* httpPost */])(unbind, _this33.$api.unbindCard).then(function (res) {
  4204. var data1 = [{
  4205. cardId: _this33.drawerRow.id,
  4206. siteId: resultArr.roomId,
  4207. startTime: _this33.continuationManagementDate.time[0],
  4208. endTime: _this33.continuationManagementDate.time[1]
  4209. }];
  4210. Object(api["g" /* httpPost */])(data1, _this33.$api.bindCard).then(function (res) {});
  4211. });
  4212. Object(api["d" /* httpGet */])(data, _this33.$api.getCertificates).then(function (res) {
  4213. var data = util["a" /* default */].zlib_unzip(res.data);
  4214. data.map(function (lt) {
  4215. util["a" /* default */].putCarfid(resultArr, lt, endTime, startTime);
  4216. });
  4217. });
  4218. } else {
  4219. _this33.$message.error("修改失败");
  4220. }
  4221. });
  4222. } else if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
  4223. resultArr.roomName = roomName[0].name;
  4224. var unbind = [{
  4225. siteId: _this33.drawerRow.id,
  4226. cardId: resultArr.roomId
  4227. }];
  4228. Object(api["g" /* httpPost */])(unbind, _this33.$api.unbindCard).then(function (res) {
  4229. var data1 = [{
  4230. cardId: _this33.drawerRow.id,
  4231. siteId: resultArr.roomId,
  4232. startTime: _this33.continuationManagementDate.time[0],
  4233. endTime: _this33.continuationManagementDate.time[1]
  4234. }];
  4235. Object(api["g" /* httpPost */])(data1, _this33.$api.bindCard).then(function (res) {});
  4236. });
  4237. var data = {
  4238. pageNum: 0,
  4239. pageSize: 0,
  4240. orderBy: "create_at desc",
  4241. q: {
  4242. cardId: _this33.drawerRow.id,
  4243. deviceNum: resultArr.deviceNum
  4244. }
  4245. };
  4246. Object(api["d" /* httpGet */])(data, _this33.$api.getCertificates).then(function (res) {
  4247. var data = util["a" /* default */].zlib_unzip(res.data);
  4248. data.map(function (lt) {
  4249. util["a" /* default */].putCarfidzg(resultArr, lt, endTime, startTime);
  4250. });
  4251. });
  4252. }
  4253. }
  4254. });
  4255. });
  4256. },
  4257. // 续住返回
  4258. continuationManagementBack: function continuationManagementBack() {
  4259. this.activeName = 1;
  4260. this.roomstatus1 = true;
  4261. },
  4262. // 续住管理
  4263. continuationManagement: function continuationManagement(index, row) {
  4264. this.activeName = index;
  4265. this.drawerRow = row;
  4266. this.voucher.username = row.name;
  4267. this.personname = row.name;
  4268. this.getAboutDevice1();
  4269. this.screenRoom(row.id); //根据id筛选有关房源
  4270. this.getItems(row.siteId);
  4271. // this.getOperates(row.id);
  4272. this.getcertificate();
  4273. this.drawer = true;
  4274. this.activeName = 2;
  4275. },
  4276. // 选择房间跳转下发凭证
  4277. issueVoucher: function issueVoucher() {
  4278. this.activeName = 1;
  4279. },
  4280. addBindRoom: function addBindRoom() {
  4281. this.activeName = 0;
  4282. },
  4283. // 房源搜索
  4284. searchTable: function searchTable() {
  4285. this.roomtable.map(function (li) {});
  4286. },
  4287. // 选择房源,下发凭证
  4288. sendVoucher: function sendVoucher() {
  4289. var _this34 = this;
  4290. var SelectedListbind = this.SelectedList;
  4291. var roomAbout = this.$store.state.roomAbout;
  4292. var infostr = JSON.parse(this.drawerRow.info);
  4293. var fjid = [];
  4294. if (this.value2[0] == '' || this.value2[1] == '') {
  4295. this.$message.error("请选择开始结束时间");
  4296. return false;
  4297. }
  4298. if (SelectedListbind.length != 0) {
  4299. SelectedListbind.forEach(function (li) {
  4300. var resultArr = _this34.AboutDevice.filter(function (_item) {
  4301. return _item.roomId == li;
  4302. })[0];
  4303. if (resultArr) {
  4304. if (resultArr.imei) {
  4305. if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
  4306. var room = roomAbout.filter(function (item) {
  4307. return item.roomId == resultArr.roomId;
  4308. })[0];
  4309. resultArr.roomName = room.roomName;
  4310. _this34.putCarfidzg(resultArr, _this34.multipleSelection2);
  4311. } else if (resultArr.manufactureId == 101) {
  4312. var room = roomAbout.filter(function (item) {
  4313. return item.roomId == resultArr.roomId;
  4314. })[0];
  4315. resultArr.roomName = room.roomName;
  4316. _this34.putCarfid(resultArr, _this34.multipleSelection2);
  4317. } else if (resultArr.manufactureId == 1201) {
  4318. var room = roomAbout.filter(function (item) {
  4319. return item.roomId == resultArr.roomId;
  4320. })[0];
  4321. resultArr.roomName = room.roomName;
  4322. _this34.putCarfidLwj(resultArr, _this34.multipleSelection2);
  4323. }
  4324. }
  4325. } else {
  4326. _this34.$message.error("该房间未绑定门锁");
  4327. }
  4328. });
  4329. } else {
  4330. this.$message.error("请选择要添加的房间");
  4331. }
  4332. },
  4333. getTypeSort: function getTypeSort(data, type) {
  4334. var num = 1;
  4335. data.map(function (li) {
  4336. if (li.type == type) {
  4337. num++;
  4338. }
  4339. });
  4340. return num;
  4341. },
  4342. // 点击查看已绑房间
  4343. backTop: function backTop() {
  4344. this.drawer = false;
  4345. },
  4346. // 选择绑定房间弹窗
  4347. bindRoomTop: function bindRoomTop() {
  4348. this.bindRoomStatus = true;
  4349. },
  4350. getSelectedTab: function getSelectedTab(ids) {
  4351. var _this35 = this;
  4352. return new promise_default.a(function (resolve, reject) {
  4353. var selected_tab = [];
  4354. var selected = [];
  4355. var zNodes = _this35.zNodes;
  4356. ids.map(function (item) {
  4357. selected_tab = zNodes.filter(function (obj) {
  4358. return obj.id == item;
  4359. });
  4360. selected.push(assign_default.a.apply(Object, [{}].concat(toConsumableArray_default()(selected_tab))));
  4361. });
  4362. resolve(selected);
  4363. });
  4364. },
  4365. bindRoomTop1: function bindRoomTop1(index, row) {
  4366. var _this36 = this;
  4367. this.multipleSelection2 = row;
  4368. this.bindRoomStatus1 = true;
  4369. var startTime = '';
  4370. var endTime = '';
  4371. if (stringify_default()(row.startTime).length == 10) {
  4372. startTime = new Date(row.startTime * 1000);
  4373. } else {
  4374. startTime = new Date(row.startTime);
  4375. }
  4376. if (stringify_default()(row.endTime).length == 10) {
  4377. endTime = new Date(row.endTime * 1000);
  4378. } else {
  4379. endTime = new Date(row.endTime);
  4380. }
  4381. this.value2 = [startTime, endTime];
  4382. this.dateRange = [startTime, endTime];
  4383. var ids = [];
  4384. this.roomtable.map(function (li) {
  4385. ids.push(li.roomId);
  4386. });
  4387. this.getSelectedTab(ids).then(function (res) {
  4388. if (res.length > 0) {
  4389. _this36.roomlist = [];
  4390. var array = util["a" /* default */].uniqueArray(res, "id");
  4391. _this36.roomlist = _this36.ztreeToElementTree(array, []);
  4392. } else {
  4393. _this36.roomlist = [];
  4394. }
  4395. });
  4396. },
  4397. getallselectRoom: function getallselectRoom() {
  4398. var ids = [];
  4399. this.roomtable.map(function (li) {
  4400. ids.push(li.roomId);
  4401. });
  4402. var selected_tab = [];
  4403. var selected = [];
  4404. var zNodes = this.zNodes;
  4405. ids.map(function (item) {
  4406. selected_tab = zNodes.filter(function (obj) {
  4407. return obj.id == item;
  4408. });
  4409. selected.push(assign_default.a.apply(Object, [{}].concat(toConsumableArray_default()(selected_tab))));
  4410. });
  4411. if (selected.length > 0) {
  4412. var array = util["a" /* default */].uniqueArray(selected, "id");
  4413. this.roomlistVoucher = [];
  4414. this.roomlistVoucher = this.ztreeToElementTree(array, []);
  4415. } else {
  4416. this.roomlistVoucher = [];
  4417. }
  4418. },
  4419. checkNodeSearch: function checkNodeSearch(e) {
  4420. var selectRow = [];
  4421. console.log(e);
  4422. e.map(function (li) {
  4423. selectRow.push.apply(selectRow, toConsumableArray_default()(li));
  4424. });
  4425. console.log(selectRow);
  4426. // this.bindSelectedList = selectRow
  4427. },
  4428. // 选择绑定房间返回的子级id
  4429. checkNode: function checkNode(e) {
  4430. var selectRow = [];
  4431. e.map(function (li) {
  4432. selectRow.push.apply(selectRow, toConsumableArray_default()(li));
  4433. });
  4434. // e.map(li => {
  4435. // selectRow.push(li[li.length - 1])
  4436. // })
  4437. console.log(selectRow);
  4438. this.bindSelectedList = selectRow;
  4439. },
  4440. checkNode1: function checkNode1(e) {
  4441. var selectRow = [];
  4442. console.log(e);
  4443. e.map(function (li) {
  4444. selectRow.push(li[li.length - 1]);
  4445. });
  4446. this.SelectedList = selectRow;
  4447. console.log(this.SelectedList);
  4448. },
  4449. // 选择绑定房间返回的子级id
  4450. checkNode2: function checkNode2(e) {
  4451. this.credentialSearch.roomId = e[e.length - 1];
  4452. },
  4453. checkEnterpriseList: function checkEnterpriseList(e) {
  4454. var _this37 = this;
  4455. this.$nextTick(function () {
  4456. var list = _this37.$refs['cascader'].getCheckedNodes();
  4457. _this37.checkEnterpriseNode = list;
  4458. });
  4459. },
  4460. checkNodeRecord: function checkNodeRecord(e) {
  4461. this.recordFilterCondition.roomId = e[e.length - 1];
  4462. },
  4463. childNodesDeep: function childNodesDeep(nodes, arr) {
  4464. var _this38 = this;
  4465. if (nodes) nodes.forEach(function (ele) {
  4466. arr.push(ele.id);
  4467. if (ele.children) {
  4468. _this38.childNodesDeep(ele.children, arr);
  4469. }
  4470. });
  4471. },
  4472. checkNode3: function checkNode3(e) {
  4473. var selectRow = [];
  4474. e.map(function (li) {
  4475. selectRow.push(li[li.length - 1]);
  4476. });
  4477. // var roomlist=this.roomlist
  4478. // selectRow = this.getChild(roomlist, e[e.length - 1], [])
  4479. this.SelectedListVoucher = selectRow;
  4480. },
  4481. // 绑定房间
  4482. bindsave: function bindsave() {
  4483. var _this39 = this;
  4484. var SelectedListbind = this.bindSelectedList;
  4485. var infostr = JSON.parse(this.drawerRow.info);
  4486. var fjid = [];
  4487. var _this = this;
  4488. if (this.value2[0] == '' || this.value2[1] == '') {
  4489. this.$message.error("请选择开始结束时间");
  4490. return false;
  4491. }
  4492. if (SelectedListbind.length != 0) {
  4493. SelectedListbind.forEach(function (li) {
  4494. var str = {
  4495. cardId: _this39.drawerRow.id,
  4496. siteId: li,
  4497. startTime: _this39.value2[0],
  4498. endTime: _this39.value2[1]
  4499. };
  4500. var resultArr = _this39.AboutDevice.filter(function (_item) {
  4501. return _item.roomId == li;
  4502. })[0];
  4503. var roomName = _this39.zNodes.filter(function (item) {
  4504. return li === item.id;
  4505. });
  4506. if (resultArr) {
  4507. // console.log(roomName,resultArr, this.drawerRow)
  4508. // return
  4509. if (resultArr.imei) {
  4510. fjid = [str];
  4511. if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
  4512. var data = {
  4513. lockerId: resultArr.deviceNum,
  4514. imei: resultArr.imei,
  4515. lockerUserId: infostr.userPassword,
  4516. keyId: infostr.userPassword,
  4517. role: 0,
  4518. action: 1,
  4519. order: 6226,
  4520. cardName: _this39.drawerRow.name,
  4521. roomName: roomName[0].name
  4522. };
  4523. equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) {
  4524. if (callback.success) {
  4525. var locakUserdata = {
  4526. deviceNum: resultArr.deviceNum,
  4527. imei: resultArr.imei,
  4528. cardId: _this39.drawerRow.id,
  4529. content: stringify_default()(data), //operateMode:NFC-10、把人员添加到凭证-1
  4530. type: 26,
  4531. serial: callback.data.serialNumber,
  4532. startTime: moment_default()(_this39.value2[0]).valueOf() / 1000,
  4533. endTime: moment_default()(_this39.value2[1]).valueOf() / 1000
  4534. };
  4535. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  4536. } else {
  4537. _this39.$message.error(callback.msg);
  4538. if (callback.code == 201016) {
  4539. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4540. if (res.success) {
  4541. _this39.bindRoomStatus = false;
  4542. _this39.getcheckInList();
  4543. _this39.getAboutRoom();
  4544. setTimeout(function () {
  4545. _this39.updateRoom();
  4546. }, 500);
  4547. _this39.$message.success("用户门锁已存在");
  4548. } else {
  4549. _this39.$message.error("添加失败");
  4550. }
  4551. });
  4552. }
  4553. }
  4554. });
  4555. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4556. if (res.success) {
  4557. _this39.bindRoomStatus = false;
  4558. _this39.getAboutRoom();
  4559. _this39.getcheckInList();
  4560. setTimeout(function () {
  4561. _this39.updateRoom();
  4562. }, 500);
  4563. } else {
  4564. _this39.$message.error("添加失败");
  4565. }
  4566. });
  4567. } else if (resultArr.manufactureId == 101) {
  4568. var userstr = {
  4569. imei: resultArr.imei,
  4570. deviceNum: resultArr.deviceNum,
  4571. userTelephone: infostr.userTelephone,
  4572. userPassword: infostr.userPassword,
  4573. password: infostr.userPassword,
  4574. operateMode: 26,
  4575. order: 6226,
  4576. passwordStartTime: _this39.moment(_this39.value2[0]).format("YYYYMMDDHHmmss"),
  4577. passwordEndTime: _this39.moment(_this39.value2[1]).format("YYYYMMDDHHmmss"),
  4578. is: false,
  4579. cardName: _this39.drawerRow.name,
  4580. roomName: roomName[0].name
  4581. };
  4582. equipment["a" /* default */].LDAddUser(userstr.deviceNum, userstr.imei, userstr.userTelephone, userstr.userPassword, userstr.password, userstr.passwordStartTime, userstr.passwordEndTime, userstr.operateMode, userstr.order, userstr.cardName, userstr.roomName, false, function (callback) {
  4583. if (callback.success) {
  4584. console.log(_this.value2);
  4585. var locakUserdata = {
  4586. deviceNum: resultArr.deviceNum,
  4587. imei: resultArr.imei,
  4588. cardId: _this39.drawerRow.id,
  4589. content: stringify_default()(userstr), //operateMode:NFC-10、把人员添加到凭证-1
  4590. type: 26,
  4591. serial: callback.data.serialNumber,
  4592. startTime: moment_default()(_this.value2[0]).valueOf() / 1000,
  4593. endTime: moment_default()(_this.value2[1]).valueOf() / 1000
  4594. };
  4595. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  4596. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4597. if (res.success) {
  4598. _this39.bindRoomStatus = false;
  4599. _this39.getAboutRoom();
  4600. _this39.getcheckInList();
  4601. setTimeout(function () {
  4602. _this39.updateRoom();
  4603. }, 500);
  4604. } else {
  4605. _this39.$message.error("添加失败");
  4606. }
  4607. });
  4608. } else {
  4609. _this39.$message.error(callback.msg);
  4610. }
  4611. });
  4612. } else if (resultArr.manufactureId == 1201) {
  4613. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4614. if (res.success) {
  4615. _this39.bindRoomStatus = false;
  4616. _this39.getAboutRoom();
  4617. _this39.getcheckInList();
  4618. setTimeout(function () {
  4619. _this39.updateRoom();
  4620. }, 500);
  4621. } else {
  4622. _this39.$message.error("添加失败");
  4623. }
  4624. });
  4625. }
  4626. } else {
  4627. fjid.push(str);
  4628. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4629. if (res.success) {
  4630. _this39.bindRoomStatus = false;
  4631. _this39.getAboutRoom();
  4632. _this39.getcheckInList();
  4633. setTimeout(function () {
  4634. _this39.updateRoom();
  4635. }, 500);
  4636. } else {
  4637. _this39.$message.error("添加失败");
  4638. }
  4639. });
  4640. }
  4641. } else {
  4642. fjid.push(str);
  4643. Object(api["g" /* httpPost */])(fjid, _this39.$api.bindCard).then(function (res) {
  4644. if (res.success) {
  4645. _this39.bindRoomStatus = false;
  4646. _this39.getAboutRoom();
  4647. _this39.getcheckInList();
  4648. setTimeout(function () {
  4649. _this39.updateRoom();
  4650. }, 500);
  4651. } else {
  4652. _this39.$message.error("添加失败");
  4653. }
  4654. });
  4655. _this39.$message.error("该房间未绑定门锁");
  4656. }
  4657. });
  4658. } else {
  4659. this.$message.error("请选择要添加的房间");
  4660. }
  4661. },
  4662. // 下发凭证
  4663. putCarfidzg: function putCarfidzg(resultArr, row) {
  4664. var _this40 = this;
  4665. var data = {};
  4666. var userTelephone = JSON.parse(row.content).userTelephone;
  4667. var userPassword = JSON.parse(row.content).userPassword;
  4668. var startTime = new Date(this.value2[0]).getTime() / 1000;
  4669. var endTime = new Date(this.value2[1]).getTime() / 1000;
  4670. var passwordStartTime = new Date(this.value2[0]).getTime() / 1000;
  4671. var passwordEndTime = new Date(this.value2[1]).getTime() / 1000;
  4672. // var passwordStartTime = JSON.stringify(row.startTime)
  4673. // var passwordEndTime = JSON.stringify(row.endTime)
  4674. // var sort=this.getTypeSort(this.roomtable1,row.type)
  4675. var pzname = JSON.parse(row.content).pzname || '';
  4676. if (passwordStartTime.length == 13) {
  4677. passwordStartTime = startTime / 1000;
  4678. }
  4679. if (passwordEndTime.length == 13) {
  4680. passwordEndTime = endTime / 1000;
  4681. }
  4682. if (row.type == 11) {
  4683. // if(pzname==''){
  4684. // pzname='指纹'+sort
  4685. // }
  4686. var fpId = new Date();
  4687. var fingerprint1 = JSON.parse(row.content).fingerprint;
  4688. var str = {
  4689. imei: resultArr.imei,
  4690. deviceNum: resultArr.deviceNum,
  4691. fingerprintAlias: JSON.parse(row.content).fingerprintAlias,
  4692. userTelephone: userTelephone,
  4693. userPassword: userPassword,
  4694. password: JSON.parse(row.content).password,
  4695. length: fingerprint1.length / 2,
  4696. fpTimeId: fpId.getTime(),
  4697. operateMode: 16,
  4698. type: 1,
  4699. order: 6216,
  4700. fingerprint: fingerprint1,
  4701. passwordStartTime: passwordStartTime,
  4702. passwordEndTime: passwordEndTime,
  4703. pzname: pzname ? pzname : '',
  4704. cardName: row.name + '-' + (pzname ? pzname : ''),
  4705. roomName: resultArr.roomName
  4706. };
  4707. var data3 = {
  4708. lockerId: resultArr.deviceNum,
  4709. imei: resultArr.imei,
  4710. order: 6216,
  4711. lockerUserId: JSON.parse(this.drawerRow.info).userPassword,
  4712. keyId: JSON.parse(this.drawerRow.info).userPassword,
  4713. fingerType: 0,
  4714. file: fingerprint1,
  4715. cardName: row.name + '-' + (pzname ? pzname : ''),
  4716. roomName: resultArr.roomName,
  4717. startTime: passwordStartTime,
  4718. endTime: passwordEndTime
  4719. };
  4720. equipment["a" /* default */].addFingerPrints(data3.lockerId, data3.imei, data3.lockerUserId, data3.fingerType, data3.file, data3.startTime, data3.endTime, data3.cardName, data3.roomName, function (callback) {
  4721. if (callback.success) {
  4722. var data = {
  4723. cardId: _this40.drawerRow.id,
  4724. deviceNum: resultArr.deviceNum,
  4725. imei: resultArr.imei,
  4726. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  4727. type: str.type,
  4728. serial: callback.data.serialNumber,
  4729. startTime: startTime,
  4730. endTime: endTime,
  4731. order: 6216
  4732. };
  4733. Object(api["g" /* httpPost */])(data, _this40.$api.addCertificates).then(function (res) {
  4734. _this40.bindRoomStatus1 = false;
  4735. _this40.getcertificate(); //获取凭证
  4736. });
  4737. } else {
  4738. _this40.$message.error(callback.msg);
  4739. }
  4740. });
  4741. } else if (row.type == 12) {
  4742. if (JSON.parse(row.content).password.length != 16) {
  4743. this.$message.error("卡格式错误,请重新录入");
  4744. return;
  4745. }
  4746. // if(pzname==''){
  4747. // pzname='身份证'+sort
  4748. // }
  4749. var str = {
  4750. imei: resultArr.imei,
  4751. userTelephone: userTelephone,
  4752. cardId: row.cardId,
  4753. userPassword: userPassword,
  4754. password: JSON.parse(row.content).password,
  4755. operateMode: 13,
  4756. order: 6213,
  4757. type: 2,
  4758. passwordStartTime: passwordStartTime,
  4759. passwordEndTime: passwordEndTime,
  4760. pzname: pzname,
  4761. is: false,
  4762. cardName: row.name + '-' + (pzname ? pzname : ''),
  4763. roomName: resultArr.roomName
  4764. };
  4765. var data3 = {
  4766. lockerId: resultArr.deviceNum,
  4767. imei: resultArr.imei,
  4768. lockerUserId: userPassword,
  4769. keyId: userPassword,
  4770. action: 1,
  4771. taskStatus: 1,
  4772. order: 6213,
  4773. startTime: passwordStartTime,
  4774. endTime: passwordEndTime,
  4775. cardType: 36,
  4776. cardName: row.name + '-' + (pzname ? pzname : ''),
  4777. roomName: resultArr.roomName,
  4778. cardNo: JSON.parse(row.content).password
  4779. };
  4780. 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 (callback) {
  4781. if (callback.success) {
  4782. var data = {
  4783. cardId: _this40.drawerRow.id,
  4784. imei: resultArr.imei,
  4785. deviceNum: resultArr.deviceNum,
  4786. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  4787. type: str.type,
  4788. serial: callback.data.serialNumber,
  4789. startTime: startTime,
  4790. endTime: endTime
  4791. };
  4792. Object(api["g" /* httpPost */])(data, _this40.$api.addCertificates).then(function (res) {
  4793. _this40.bindRoomStatus1 = false;
  4794. _this40.getcertificate(); //获取凭证
  4795. });
  4796. } else {
  4797. _this40.$message.error(callback.msg);
  4798. }
  4799. });
  4800. } else if (row.type == 13) {
  4801. var password = "";
  4802. if (JSON.parse(row.content).password.length == 8) {
  4803. password = util["a" /* default */].cardFormatConversion(JSON.parse(row.content).password);
  4804. password = password + '00000000';
  4805. } else if (JSON.parse(row.content).password.length == 16) {
  4806. password = JSON.parse(row.content).password;
  4807. } else {
  4808. this.$message.error("卡格式错误,请重新录入");
  4809. return;
  4810. }
  4811. // if(pzname==''){
  4812. // pzname='NFC'+sort
  4813. // }
  4814. var str = {
  4815. imei: resultArr.imei,
  4816. userTelephone: userTelephone,
  4817. cardId: row.cardId,
  4818. userPassword: userPassword,
  4819. password: password,
  4820. operateMode: 10,
  4821. type: 3,
  4822. order: 6210,
  4823. passwordStartTime: passwordStartTime,
  4824. passwordEndTime: passwordEndTime,
  4825. pzname: pzname,
  4826. is: false,
  4827. cardName: row.name + '-' + (pzname ? pzname : ''),
  4828. roomName: resultArr.roomName
  4829. };
  4830. var data3 = {
  4831. lockerId: resultArr.deviceNum,
  4832. lockerUserId: userPassword,
  4833. keyId: userPassword,
  4834. imei: resultArr.imei,
  4835. action: 1,
  4836. taskStatus: 1,
  4837. order: 6210,
  4838. startTime: passwordStartTime,
  4839. endTime: passwordEndTime,
  4840. cardType: 50,
  4841. cardName: row.name + '-' + (pzname ? pzname : ''),
  4842. roomName: resultArr.roomName,
  4843. cardNo: password
  4844. };
  4845. 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 (callback) {
  4846. if (callback.success) {
  4847. var data = {
  4848. cardId: _this40.drawerRow.id,
  4849. imei: resultArr.imei,
  4850. deviceNum: resultArr.deviceNum,
  4851. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  4852. type: str.type,
  4853. serial: callback.data.serialNumber,
  4854. startTime: startTime,
  4855. endTime: endTime
  4856. };
  4857. Object(api["g" /* httpPost */])(data, _this40.$api.addCertificates).then(function (res) {
  4858. _this40.bindRoomStatus1 = false;
  4859. _this40.getcertificate(); //获取凭证
  4860. });
  4861. } else {
  4862. _this40.$message.error(callback.msg);
  4863. }
  4864. });
  4865. } else if (row.type == 14) {
  4866. // if(pzname==''){
  4867. // pzname='密码'+sort
  4868. // }
  4869. str = {
  4870. imei: resultArr.imei,
  4871. userTelephone: userTelephone,
  4872. cardId: row.cardId,
  4873. userPassword: userPassword,
  4874. password: JSON.parse(row.content).password,
  4875. operateMode: 7,
  4876. order: 6207,
  4877. type: 4,
  4878. passwordStartTime: passwordStartTime,
  4879. passwordEndTime: passwordEndTime,
  4880. pzname: pzname,
  4881. is: false,
  4882. cardName: row.name + '-' + (pzname ? pzname : ''),
  4883. roomName: resultArr.roomName
  4884. };
  4885. var data3 = {
  4886. lockerId: resultArr.deviceNum,
  4887. imei: resultArr.imei,
  4888. order: 6207,
  4889. passwordCount: 255,
  4890. lockerUserId: userPassword,
  4891. keyId: userPassword,
  4892. startTime: passwordStartTime,
  4893. endTime: passwordEndTime,
  4894. action: 1,
  4895. password: JSON.parse(row.content).password,
  4896. cardName: row.name + '-' + (pzname ? pzname : ''),
  4897. roomName: resultArr.roomName
  4898. };
  4899. equipment["a" /* default */].addForeverPassword(data3.lockerId, data3.imei, data3.keyId, data3.action, data3.password, data3.passwordCount, data3.startTime, data3.endTime, data3.order, data3.cardName, data3.roomName, function (callback) {
  4900. if (callback.success) {
  4901. var data = {
  4902. cardId: _this40.drawerRow.id,
  4903. imei: resultArr.imei,
  4904. deviceNum: resultArr.deviceNum,
  4905. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  4906. type: str.type,
  4907. serial: callback.data.serialNumber,
  4908. startTime: startTime,
  4909. endTime: endTime
  4910. };
  4911. Object(api["g" /* httpPost */])(data, _this40.$api.addCertificates).then(function (res) {
  4912. _this40.bindRoomStatus1 = false;
  4913. _this40.getcertificate(); //获取凭证
  4914. });
  4915. } else {
  4916. _this40.$message.error(callback.msg);
  4917. }
  4918. });
  4919. }
  4920. },
  4921. putCarfidLwj: function putCarfidLwj(resultArr, row) {
  4922. var _this41 = this;
  4923. var userTelephone = JSON.parse(row.content).userTelephone;
  4924. var userPassword = JSON.parse(row.content).userPassword;
  4925. var startTime = new Date(this.value2[0]).getTime() / 1000;
  4926. var endTime = new Date(this.value2[1]).getTime() / 1000;
  4927. var passwordStartTime = new Date(this.value2[0]).getTime() / 1000;
  4928. var passwordEndTime = new Date(this.value2[1]).getTime() / 1000;
  4929. var pzname = JSON.parse(row.content).pzname || '';
  4930. if (passwordStartTime.length == 13) {
  4931. passwordStartTime = startTime / 1000;
  4932. }
  4933. if (passwordEndTime.length == 13) {
  4934. passwordEndTime = endTime / 1000;
  4935. }
  4936. if (row.type == 11) {
  4937. var fpId = new Date();
  4938. var fingerprint1 = JSON.parse(row.content).fingerprint;
  4939. var str = {
  4940. imei: resultArr.imei,
  4941. deviceNum: resultArr.deviceNum,
  4942. fingerprintAlias: JSON.parse(row.content).fingerprintAlias,
  4943. userTelephone: userTelephone,
  4944. userPassword: userPassword,
  4945. password: JSON.parse(row.content).password,
  4946. length: fingerprint1.length / 2,
  4947. fpTimeId: fpId.getTime(),
  4948. operateMode: 16,
  4949. type: 1,
  4950. order: 6216,
  4951. fingerprint: fingerprint1,
  4952. passwordStartTime: passwordStartTime,
  4953. passwordEndTime: passwordEndTime,
  4954. pzname: pzname ? pzname : '',
  4955. cardName: row.name + '-' + (pzname ? pzname : ''),
  4956. roomName: resultArr.roomName
  4957. };
  4958. var data = {
  4959. code: "lwj/fpOperate",
  4960. data: {
  4961. lockerId: resultArr.deviceNum,
  4962. lockerUserId: JSON.parse(row.content).userPassword,
  4963. action: 1,
  4964. fpData: fingerprint1,
  4965. startTime: startTime,
  4966. endTime: endTime,
  4967. operateMode: 16,
  4968. order: 6216,
  4969. cardName: row.name + '-' + (pzname ? pzname : ''),
  4970. roomName: resultArr.roomName
  4971. }
  4972. };
  4973. Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
  4974. if (res.success) {
  4975. var data = {
  4976. cardId: _this41.drawerRow.id,
  4977. deviceNum: resultArr.deviceNum,
  4978. imei: resultArr.imei,
  4979. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  4980. type: str.type,
  4981. serial: res.data.serialNumber,
  4982. startTime: startTime,
  4983. endTime: endTime,
  4984. order: 6216
  4985. };
  4986. Object(api["g" /* httpPost */])(data, _this41.$api.addCertificates).then(function (res) {
  4987. _this41.bindRoomStatus1 = false;
  4988. _this41.getcertificate(); //获取凭证
  4989. });
  4990. } else {
  4991. _this41.$message.error(res.msg);
  4992. }
  4993. });
  4994. }if (row.type == 13) {
  4995. var password = "";
  4996. if (JSON.parse(row.content).password.length == 8) {
  4997. password = util["a" /* default */].cardFormatConversion(JSON.parse(row.content).password);
  4998. password = password + '00000000';
  4999. } else if (JSON.parse(row.content).password.length == 16) {
  5000. password = JSON.parse(row.content).password;
  5001. } else {
  5002. this.$message.error("卡格式错误,请重新录入");
  5003. return;
  5004. }
  5005. var _startTime = new Date(this.value2[0]).getTime() / 1000;
  5006. var _endTime = new Date(this.value2[1]).getTime() / 1000;
  5007. var _data3 = {
  5008. code: "lwj/cardOperate",
  5009. data: {
  5010. lockerId: resultArr.deviceNum,
  5011. lockerUserId: JSON.parse(row.content).userPassword,
  5012. action: 1,
  5013. cardNo: JSON.parse(row.content).password,
  5014. startTime: _startTime,
  5015. endTime: _endTime,
  5016. operateMode: 10,
  5017. order: 6210,
  5018. cardName: row.name + '-' + (pzname ? pzname : ''),
  5019. roomName: resultArr.roomName
  5020. }
  5021. };
  5022. var _str = {
  5023. imei: resultArr.imei,
  5024. userTelephone: userTelephone,
  5025. cardId: row.cardId,
  5026. userPassword: userPassword,
  5027. password: JSON.parse(row.content).password,
  5028. operateMode: 10,
  5029. order: 6210,
  5030. type: 3,
  5031. passwordStartTime: passwordStartTime,
  5032. passwordEndTime: passwordEndTime,
  5033. pzname: pzname,
  5034. is: false,
  5035. cardName: row.name + '-' + (pzname ? pzname : ''),
  5036. roomName: resultArr.roomName
  5037. };
  5038. Object(api["g" /* httpPost */])(_data3, this.$api.sendCommand).then(function (res) {
  5039. if (res.success) {
  5040. var data = {
  5041. cardId: _this41.drawerRow.id,
  5042. imei: resultArr.imei,
  5043. deviceNum: resultArr.deviceNum,
  5044. content: stringify_default()(_str), //operateMode:NFC-10、把人员添加到凭证-1
  5045. type: _str.type,
  5046. serial: res.data.serialNumber,
  5047. startTime: _startTime,
  5048. endTime: _endTime
  5049. };
  5050. Object(api["g" /* httpPost */])(data, _this41.$api.addCertificates).then(function (res) {
  5051. _this41.bindRoomStatus1 = false;
  5052. _this41.getcertificate(); //获取凭证
  5053. });
  5054. } else {
  5055. _this41.$message.error(callback.msg);
  5056. }
  5057. });
  5058. } else if (row.type == 14) {
  5059. if (JSON.parse(row.content).password == '') {
  5060. this.$message.error('密码不能为空');
  5061. } else {
  5062. var _startTime2 = new Date(this.value2[0]).getTime() / 1000;
  5063. var _endTime2 = new Date(this.value2[1]).getTime() / 1000;
  5064. var _data4 = {
  5065. code: "lwj/passwordOperate",
  5066. data: {
  5067. lockerId: resultArr.deviceNum,
  5068. lockerUserId: JSON.parse(row.content).userPassword,
  5069. action: 1,
  5070. password: JSON.parse(row.content).password,
  5071. startTime: _startTime2,
  5072. endTime: _endTime2,
  5073. operateMode: 7,
  5074. order: 6207,
  5075. cardName: row.name + '-' + (pzname ? pzname : ''),
  5076. roomName: resultArr.roomName
  5077. }
  5078. };
  5079. var _str2 = {
  5080. imei: resultArr.imei,
  5081. userTelephone: userTelephone,
  5082. cardId: row.cardId,
  5083. userPassword: userPassword,
  5084. password: JSON.parse(row.content).password,
  5085. operateMode: 7,
  5086. order: 6207,
  5087. type: 4,
  5088. passwordStartTime: passwordStartTime,
  5089. passwordEndTime: passwordEndTime,
  5090. pzname: pzname,
  5091. is: false,
  5092. cardName: row.name + '-' + (pzname ? pzname : ''),
  5093. roomName: resultArr.roomName
  5094. };
  5095. Object(api["g" /* httpPost */])(_data4, this.$api.sendCommand).then(function (res) {
  5096. if (res.success) {
  5097. var data = {
  5098. cardId: _this41.drawerRow.id,
  5099. imei: resultArr.imei,
  5100. deviceNum: resultArr.deviceNum,
  5101. content: stringify_default()(_str2), //operateMode:NFC-10、把人员添加到凭证-1
  5102. type: _str2.type,
  5103. serial: res.data.serialNumber,
  5104. startTime: _startTime2,
  5105. endTime: _endTime2
  5106. };
  5107. Object(api["g" /* httpPost */])(data, _this41.$api.addCertificates).then(function (res) {
  5108. _this41.bindRoomStatus1 = false;
  5109. _this41.getcertificate(); //获取凭证
  5110. });
  5111. } else {
  5112. _this41.$message.error(callback.msg);
  5113. }
  5114. });
  5115. }
  5116. }
  5117. },
  5118. // 下发凭证
  5119. putCarfid: function putCarfid(resultArr, row) {
  5120. var _this42 = this;
  5121. var data = {};
  5122. var userTelephone = JSON.parse(row.content).userTelephone;
  5123. var userPassword = JSON.parse(row.content).userPassword;
  5124. var startTime = new Date(this.value2[0]).getTime();
  5125. var endTime = new Date(this.value2[1]).getTime();
  5126. var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss");
  5127. var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss");
  5128. // var sort=this.getTypeSort(this.roomtable1,row.type)
  5129. var pzname = JSON.parse(row.content).pzname || '';
  5130. if (row.type == 11) {
  5131. // if(pzname==''){
  5132. // pzname='指纹'+sort
  5133. // }
  5134. var fpId = new Date();
  5135. var fingerprint = JSON.parse(row.content).fingerprint;
  5136. // var array = fingerprint.split(",");
  5137. // var num = this.Bytes2Str(array);
  5138. // return
  5139. var str = {
  5140. imei: resultArr.imei,
  5141. deviceNum: resultArr.deviceNum,
  5142. fingerprintAlias: JSON.parse(row.content).fingerprintAlias,
  5143. userTelephone: userTelephone,
  5144. userPassword: userPassword,
  5145. password: JSON.parse(row.content).password,
  5146. length: fingerprint.length / 2,
  5147. fpTimeId: fpId.getTime(),
  5148. operateMode: 16,
  5149. type: 1,
  5150. order: 6216,
  5151. fingerprint: fingerprint,
  5152. passwordStartTime: passwordStartTime,
  5153. passwordEndTime: passwordEndTime,
  5154. cardName: row.name + '-' + pzname,
  5155. roomName: resultArr.roomName,
  5156. pzname: pzname,
  5157. pass: false
  5158. };
  5159. equipment["a" /* default */].LDAddFingerPrints(str.deviceNum, str.imei, str.userTelephone, str.userPassword, str.password, str.passwordStartTime, str.passwordEndTime, str.operateMode, str.order, str.length, str.fpTimeId, str.fingerprint, str.cardName, str.roomName, str.pass, function (callback) {
  5160. if (callback.success) {
  5161. var datafid = {
  5162. deviceNum: resultArr.deviceNum,
  5163. imei: resultArr.imei,
  5164. cardId: _this42.drawerRow.id,
  5165. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  5166. type: str.type,
  5167. serial: callback.data.serialNumber,
  5168. startTime: startTime / 1000,
  5169. endTime: endTime / 1000
  5170. };
  5171. Object(api["g" /* httpPost */])(datafid, _this42.$api.addCertificates).then(function (res) {
  5172. if (res.success) {
  5173. _this42.bindRoomStatus1 = false;
  5174. _this42.$message.success("下发成功");
  5175. _this42.getcertificate(); //获取凭证
  5176. } else {
  5177. _this42.$message.error("下发失败");
  5178. }
  5179. });
  5180. } else {
  5181. _this42.$message.error(callback.msg);
  5182. }
  5183. });
  5184. return false;
  5185. } else if (row.type == 12) {
  5186. // if(pzname==''){
  5187. // pzname='身份证'+sort
  5188. // }
  5189. data = {
  5190. imei: resultArr.imei,
  5191. deviceNum: resultArr.deviceNum,
  5192. userTelephone: userTelephone,
  5193. cardId: row.cardId,
  5194. userPassword: userPassword,
  5195. password: JSON.parse(row.content).password,
  5196. operateMode: 13,
  5197. order: 6213,
  5198. type: 2,
  5199. passwordStartTime: passwordStartTime,
  5200. passwordEndTime: passwordEndTime,
  5201. is: false,
  5202. cardName: row.name + '-' + pzname,
  5203. roomName: resultArr.roomName,
  5204. pzname: pzname
  5205. };
  5206. } else if (row.type == 13) {
  5207. // if(pzname==''){
  5208. // pzname='NFC'+sort
  5209. // }
  5210. data = {
  5211. imei: resultArr.imei,
  5212. deviceNum: resultArr.deviceNum,
  5213. userTelephone: userTelephone,
  5214. cardId: row.cardId,
  5215. userPassword: userPassword,
  5216. password: JSON.parse(row.content).password,
  5217. operateMode: 10,
  5218. order: 6210,
  5219. passwordStartTime: passwordStartTime,
  5220. passwordEndTime: passwordEndTime,
  5221. is: false,
  5222. type: 3,
  5223. cardName: row.name + '-' + pzname,
  5224. roomName: resultArr.roomName,
  5225. pzname: pzname
  5226. };
  5227. } else if (row.type == 14) {
  5228. // if(pzname==''){
  5229. // pzname='密码'+sort
  5230. // }
  5231. data = {
  5232. imei: resultArr.imei,
  5233. deviceNum: resultArr.deviceNum,
  5234. userTelephone: userTelephone,
  5235. cardId: row.cardId,
  5236. userPassword: userPassword,
  5237. password: JSON.parse(row.content).password,
  5238. operateMode: 7,
  5239. order: 6207,
  5240. type: 4,
  5241. passwordStartTime: passwordStartTime,
  5242. passwordEndTime: passwordEndTime,
  5243. is: false,
  5244. cardName: row.name + '-' + pzname,
  5245. roomName: resultArr.roomName,
  5246. pzname: pzname,
  5247. pass: false
  5248. };
  5249. }
  5250. equipment["a" /* default */].LDRfCardRegister(data.deviceNum, data.imei, data.userTelephone, data.userPassword, data.password, data.passwordStartTime, data.passwordEndTime, data.operateMode, data.order, data.cardName, data.roomName, data.pass, function (callback) {
  5251. if (callback.success) {
  5252. var datafid = {
  5253. deviceNum: resultArr.deviceNum,
  5254. imei: resultArr.imei,
  5255. cardId: _this42.drawerRow.id,
  5256. content: stringify_default()(data), //operateMode:NFC-10、把人员添加到凭证-1
  5257. type: data.type,
  5258. serial: callback.data.serialNumber,
  5259. startTime: startTime / 1000,
  5260. endTime: endTime / 1000
  5261. };
  5262. Object(api["g" /* httpPost */])(datafid, _this42.$api.addCertificates).then(function (res) {
  5263. if (res.success) {
  5264. _this42.bindRoomStatus1 = false;
  5265. _this42.$message.success("下发成功");
  5266. _this42.getcertificate(); //获取凭证
  5267. } else {
  5268. _this42.$message.error("下发失败");
  5269. }
  5270. });
  5271. } else {
  5272. _this42.$message.error(callback.msg);
  5273. }
  5274. });
  5275. },
  5276. // 添加房源后更新人员和房间关系
  5277. updateRoom: function updateRoom() {
  5278. var _this43 = this;
  5279. var array = this.returnScreenRoom(this.drawerRow.id);
  5280. var SelectedList = [],
  5281. roomtable = [],
  5282. roomScreen = [];
  5283. array.map(function (li) {
  5284. SelectedList.push(li.roomId);
  5285. var name = util["a" /* default */].findIndexArray(_this43.$store.state.zNodes, li.roomId, []);
  5286. var path = '';
  5287. if (name) {
  5288. path = name.join('/');
  5289. }
  5290. li.roomName = path;
  5291. var result = _this43.checkInListing.filter(function (item) {
  5292. return item.siteId == li.roomId;
  5293. })[0];
  5294. var deviceResult = _this43.allAboutDevice.filter(function (it) {
  5295. return it.roomId == li.roomId;
  5296. })[0];
  5297. if (result) {
  5298. li['endTime'] = moment_default()(result.endTime).format("YYYY-MM-DD HH:mm:ss") || '';
  5299. li['startTime'] = moment_default()(result.startTime).format("YYYY-MM-DD HH:mm:ss") || '';
  5300. li['name'] = result.name;
  5301. li.card = li.cardId;
  5302. }
  5303. if (deviceResult) {
  5304. li['deviceNum'] = deviceResult.deviceNum;
  5305. li['imei'] = deviceResult.imei;
  5306. li['manufactureId'] = deviceResult.manufactureId;
  5307. }
  5308. if (li.isRoom == 1) {
  5309. roomScreen.push(li);
  5310. }
  5311. roomtable.push(li);
  5312. });
  5313. this.roomScreen = roomScreen;
  5314. this.SelectedList = SelectedList;
  5315. this.selectkeyadd = SelectedList;
  5316. var list = roomtable.sort(function (pre, cur) {
  5317. return pre.siteId - cur.siteId;
  5318. });
  5319. this.roomtable = list;
  5320. this.roomstatus = !this.roomstatus;
  5321. this.addroomstatus = !this.addroomstatus;
  5322. this.$message.success("操作成功");
  5323. },
  5324. // 打开侧边栏
  5325. operation: function operation(index, row) {
  5326. var _this44 = this;
  5327. this.activeName = index;
  5328. this.drawerRow = row;
  5329. this.bindroomstatus = true;
  5330. this.voucher.username = row.name;
  5331. this.drawer = true;
  5332. this.personname = row.name;
  5333. this.getAboutDevice1();
  5334. var data = {
  5335. ids: [row.id]
  5336. };
  5337. Object(api["g" /* httpPost */])(data, this.$api.getTenant).then(function (res) {
  5338. if (res.code == 200) {
  5339. _this44.checkInListing = res.data;
  5340. if (res.data.length > 0) {
  5341. _this44.maxDateTime = res.data[0].endTime;
  5342. _this44.minDateTime = res.data[0].startTime;
  5343. _this44.value2 = [_this44.minDateTime, _this44.maxDateTime];
  5344. } else {
  5345. _this44.maxDateTime = '';
  5346. _this44.minDateTime = '';
  5347. _this44.value2 = ['', ''];
  5348. }
  5349. setTimeout(function () {
  5350. _this44.screenRoom(row.id);
  5351. }, 500);
  5352. } else {
  5353. _this44.checkInListing = [];
  5354. }
  5355. });
  5356. this.getItems(row.siteId);
  5357. // this.getOperates(row.id);
  5358. this.getcertificate();
  5359. },
  5360. getcheckInList: function getcheckInList() {
  5361. var _this45 = this;
  5362. var data = {
  5363. ids: [this.drawerRow.id]
  5364. };
  5365. Object(api["g" /* httpPost */])(data, this.$api.getTenant).then(function (res) {
  5366. if (res.code == 200) {
  5367. _this45.checkInListing = res.data;
  5368. } else {
  5369. _this45.checkInListing = [];
  5370. }
  5371. });
  5372. },
  5373. getSearchRoomList: function getSearchRoomList() {
  5374. var ids = [];
  5375. this.roomtable.map(function (li) {
  5376. ids.push(li.roomId);
  5377. });
  5378. var selected_tab = [];
  5379. var selected = [];
  5380. var zNodes = this.zNodes;
  5381. ids.map(function (item) {
  5382. selected_tab = zNodes.filter(function (obj) {
  5383. return obj.id == item;
  5384. });
  5385. selected.push(assign_default.a.apply(Object, [{}].concat(toConsumableArray_default()(selected_tab))));
  5386. });
  5387. if (selected.length > 0) {
  5388. var array = util["a" /* default */].uniqueArray(selected, "id");
  5389. this.roomlist2 = [];
  5390. this.roomlist2 = this.ztreeToElementTree(array, []);
  5391. } else {
  5392. this.roomlis2 = [];
  5393. }
  5394. },
  5395. // 凭证列表获取
  5396. getcertificate: function getcertificate() {
  5397. var _this46 = this;
  5398. if (this.credentialSearch.roomId) {
  5399. var t = {
  5400. roomIds: [this.credentialSearch.roomId],
  5401. lockType: 1
  5402. };
  5403. var data = {
  5404. q: stringify_default()(t)
  5405. };
  5406. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  5407. if (res.success) {
  5408. var data = {
  5409. pageNum: 0,
  5410. pageSize: 0,
  5411. orderBy: "create_at desc",
  5412. q: {
  5413. cardId: _this46.drawerRow.id,
  5414. deviceNum: res.data.list[0].deviceNum,
  5415. imei: _this46.credentialSearch.imei,
  5416. status: _this46.credentialSearch.status,
  5417. type: _this46.credentialSearch.type,
  5418. types: "10,11,12,13,14"
  5419. }
  5420. };
  5421. _this46.getfilterAcquisition(data);
  5422. } else {
  5423. _this46.$message.error("获取房间对应门锁信息失败");
  5424. }
  5425. });
  5426. } else {
  5427. var data = {
  5428. pageNum: 0,
  5429. pageSize: 0,
  5430. orderBy: "create_at desc",
  5431. q: {
  5432. cardId: this.drawerRow.id,
  5433. deviceNum: this.credentialSearch.deviceNum,
  5434. imei: this.credentialSearch.imei,
  5435. status: this.credentialSearch.status,
  5436. // type: this.credentialSearch.type,
  5437. types: this.credentialSearch.type || "10,11,12,13,14"
  5438. }
  5439. };
  5440. this.getfilterAcquisition(data);
  5441. }
  5442. },
  5443. getfilterAcquisition: function getfilterAcquisition(data) {
  5444. var _this47 = this;
  5445. var dataall = {
  5446. pageNum: 0,
  5447. pageSize: 0,
  5448. orderBy: "create_at desc",
  5449. q: {
  5450. cardId: this.drawerRow.id,
  5451. deviceNum: this.credentialSearch.deviceNum,
  5452. imei: this.credentialSearch.imei,
  5453. inStatus: "0,1,702",
  5454. types: "0,1,2,3,4"
  5455. }
  5456. };
  5457. Object(api["d" /* httpGet */])(dataall, this.$api.getCertificates).then(function (resall) {
  5458. if (resall.code == 200) {
  5459. var sendOn = util["a" /* default */].zlib_unzip(resall.data);
  5460. console.log(sendOn);
  5461. var sendstatus = true;
  5462. if (resall.data.total == 0) {
  5463. sendstatus = false;
  5464. }
  5465. Object(api["d" /* httpGet */])(data, _this47.$api.getCertificates).then(function (res) {
  5466. var certiflist = util["a" /* default */].zlib_unzip(res.data);
  5467. var AboutDevice = _this47.allAboutDevice;
  5468. console.log(certiflist);
  5469. certiflist.map(function (li) {
  5470. li['color'] = '1';
  5471. var licontent = '';
  5472. var filterResult = '';
  5473. if (li.type == 11) {
  5474. licontent = JSON.parse(li.content).pzname;
  5475. filterResult = sendOn.filter(function (item) {
  5476. return JSON.parse(item.content).pzname == licontent;
  5477. });
  5478. } else if (li.type == 13) {
  5479. // licontent=utils.cardFormatConversion(JSON.parse(li.content).password)
  5480. licontent = JSON.parse(li.content).pzname;
  5481. filterResult = sendOn.filter(function (item) {
  5482. return JSON.parse(item.content).pzname == licontent;
  5483. });
  5484. } else {
  5485. licontent = JSON.parse(li.content).password;
  5486. filterResult = sendOn.filter(function (item) {
  5487. return JSON.parse(item.content).password == licontent;
  5488. });
  5489. }
  5490. if (sendstatus && filterResult && filterResult.length > 0) {
  5491. var statusOne = filterResult.some(function (item) {
  5492. return item.status == 0;
  5493. });
  5494. var statusTwo = filterResult.some(function (item) {
  5495. return item.status == 1;
  5496. });
  5497. var statusThree = filterResult.some(function (item) {
  5498. return item.status == 702;
  5499. });
  5500. if (statusOne) {
  5501. li['color'] = '0';
  5502. } else if (!statusOne && !statusThree && statusTwo) {
  5503. li['color'] = '1';
  5504. } else if (!statusOne && statusThree) {
  5505. li['color'] = '702';
  5506. } else {
  5507. li['color'] = '999';
  5508. }
  5509. }
  5510. li.createAt = _this47.time(+new Date(li.createAt));
  5511. li['userTelephone'] = JSON.parse(li.content).userTelephone;
  5512. li.pzname = JSON.parse(li.content).pzname;
  5513. li.password = JSON.parse(li.content).password;
  5514. li['startTimeText'] = util["a" /* default */].formatTime(li.startTime);
  5515. li['fingerprintAlias'] = JSON.parse(li.content).fingerprintAlias || '';
  5516. li['endTimeText'] = util["a" /* default */].formatTime(li.endTime);
  5517. li['data'] = JSON.parse(li.content).password;
  5518. if (li.type == 1) {
  5519. li['data'] = li.id;
  5520. }
  5521. if (li.pzname) {
  5522. var statusif = li.pzname.indexOf('蓝牙');
  5523. if (statusif) {
  5524. li['DeletePermissions'] = true;
  5525. } else {
  5526. if (li.type != 11) {
  5527. li['DeletePermissions'] = true;
  5528. } else {
  5529. li['DeletePermissions'] = false;
  5530. }
  5531. }
  5532. } else {
  5533. li['DeletePermissions'] = true;
  5534. }
  5535. });
  5536. _this47.roomtable1 = certiflist;
  5537. _this47.total1 = res.data.total;
  5538. });
  5539. }
  5540. });
  5541. },
  5542. // 筛选和这个人员有关的房源
  5543. screenRoom: function screenRoom(id) {
  5544. var _this48 = this;
  5545. var roomAbout = this.$store.state.roomAbout;
  5546. var SelectedList = [],
  5547. roomtable = [],
  5548. roomScreen = [];
  5549. roomAbout.map(function (li) {
  5550. var name = util["a" /* default */].findIndexArray(_this48.$store.state.zNodes, li.roomId, []);
  5551. var path = '';
  5552. if (name) {
  5553. path = name.join('/');
  5554. }
  5555. li.roomName = path;
  5556. if (li.cardId == id) {
  5557. if (li.layout != null) {
  5558. SelectedList.push(li.roomId);
  5559. }
  5560. var result = _this48.checkInListing.filter(function (item) {
  5561. return item.siteId == li.roomId;
  5562. })[0];
  5563. var deviceResult = _this48.allAboutDevice.filter(function (it) {
  5564. return it.roomId == li.roomId;
  5565. })[0];
  5566. if (result) {
  5567. li['endTime'] = moment_default()(result.endTime).format("YYYY-MM-DD HH:mm:ss") || '';
  5568. li['startTime'] = moment_default()(result.startTime).format("YYYY-MM-DD HH:mm:ss") || '';
  5569. li['name'] = result.name;
  5570. li['id'] = result.id;
  5571. li.card = li.cardId;
  5572. }
  5573. if (deviceResult) {
  5574. li['deviceNum'] = deviceResult.deviceNum;
  5575. li['imei'] = deviceResult.imei;
  5576. li['manufactureId'] = deviceResult.manufactureId;
  5577. }
  5578. if (li.isRoom == 1) {
  5579. roomScreen.push(li);
  5580. }
  5581. console.log(li);
  5582. roomtable.push(li);
  5583. }
  5584. });
  5585. console.log(roomtable);
  5586. this.roomtablestatus = false;
  5587. if (this.activeName == 0) {
  5588. var data = JSON.parse(stringify_default()(this.zNodes));
  5589. var zNodes = util["a" /* default */].filterObj(data, SelectedList);
  5590. var array = util["a" /* default */].uniqueArray(zNodes, "id");
  5591. var bindRoomlist = this.ztreeToElementTree(array, []);
  5592. this.bindRoomlist = bindRoomlist;
  5593. } else if (this.activeName == 1) {
  5594. var data = JSON.parse(stringify_default()(this.zNodes));
  5595. var array = util["a" /* default */].uniqueArray(data, "id");
  5596. this.bindRoomlist = this.ztreeToElementTree(array, []);
  5597. // this.bindRoomlist = this.roomlist
  5598. }
  5599. var list = roomtable.sort(function (pre, cur) {
  5600. return pre.siteId - cur.siteId;
  5601. });
  5602. this.getSearchRoomList();
  5603. this.$nextTick(function () {
  5604. this.roomtable = list;
  5605. this.SelectedList = SelectedList;
  5606. this.roomtablestatus = true;
  5607. this.roomScreen = roomScreen;
  5608. });
  5609. },
  5610. ztreeToElementTree: function ztreeToElementTree(data, config) {
  5611. var id = 'id'; // 定义ztree数据存储id(自身的id)的key值,可以自定义但一般都是id、pid这种
  5612. var pid = 'pid'; // 定义ztree数据存储pid(父id)的key值
  5613. var children = 'children'; // 定义生成的element tree存储子节点的key,可以在element中规定defaultProps: {children: 'children'}
  5614. var idMap = {}; // 将原始数据转化为以id为key的map
  5615. var elementTree = []; // 输出的element tree数据
  5616. data.forEach(function (item) {
  5617. item['value'] = item.id;
  5618. item['label'] = item.name;
  5619. idMap[item.id] = item;
  5620. });
  5621. data.forEach(function (item) {
  5622. // debugger
  5623. if (idMap[item.pid] != idMap[item.id] && idMap[item.pid]) {
  5624. // 该item项有爸爸,放到对应的父节点下
  5625. !idMap[item.pid].hasOwnProperty(children) && (idMap[item.pid][children] = []);
  5626. idMap[item.pid][children].push(item);
  5627. } else {
  5628. // 根节点
  5629. elementTree.push(item);
  5630. }
  5631. });
  5632. return elementTree;
  5633. },
  5634. // 删除操作
  5635. handleDelete: function handleDelete(index, row) {
  5636. var _this49 = this;
  5637. this.drawerRow = row;
  5638. var that = this;
  5639. // 二次确认删除
  5640. this.$confirm("确定要删除吗?", "提示", {
  5641. type: "warning"
  5642. }).then(function () {
  5643. var unbindCarddata = [];
  5644. _this49.screenRoom1(row.id, function (roomtable) {
  5645. var arr = [];
  5646. roomtable.map(function (li) {
  5647. var data = {
  5648. siteId: li.roomId,
  5649. cardId: row.id
  5650. };
  5651. arr.push(li.roomId);
  5652. unbindCarddata.push(data);
  5653. });
  5654. if (roomtable.length > 0) {
  5655. that.$confirm("是否先退租已入住房间?", "提示", {
  5656. type: "warning"
  5657. }).then(function () {
  5658. console.log(roomtable);
  5659. roomtable.map(function (li, index) {
  5660. that.deleteRoomfun(index, li);
  5661. });
  5662. });
  5663. } else {
  5664. Object(api["g" /* httpPost */])(unbindCarddata, that.$api.unbindCard).then(function (res) {
  5665. var data = {
  5666. ids: [row.id]
  5667. };
  5668. Object(api["g" /* httpPost */])(data, that.$api.deleteCard).then(function (res) {
  5669. if (res.success) {
  5670. that.$message.success("删除成功");
  5671. that.deleteUser(row, arr);
  5672. that.getlist();
  5673. } else {
  5674. that.$message.error("删除失败");
  5675. }
  5676. });
  5677. });
  5678. }
  5679. });
  5680. });
  5681. },
  5682. //添加
  5683. handleSearch1: function handleSearch1() {
  5684. this.modify = true;
  5685. this.editVisiblelist = true;
  5686. },
  5687. // 保存编辑
  5688. saveEdit: function saveEdit() {
  5689. var _this50 = this;
  5690. // 添加人员的凭证保存
  5691. var documentType = this.documentType;
  5692. var str = {};
  5693. console.log(this.form);
  5694. if (this.form.name == "" || this.form.enterpriseId === "" || this.form.number == "" || this.form.type === "") {
  5695. this.$message.error("请填写完整信息");
  5696. } else if (Object(verification["a" /* default */])(this.form.number)) {
  5697. this.$message.error("请填写正确身份证号");
  5698. } else if (!util["a" /* default */].verificationPhone(this.form.phone)) {
  5699. this.$message.error("请填写正确手机号");
  5700. } else {
  5701. var phone = this.form.phone;
  5702. var infostr = {
  5703. userTelephone: phone,
  5704. userPassword: phone.substring(phone.length - 6, phone.length),
  5705. userId: phone.substring(phone.length - 6, phone.length),
  5706. keyId: phone.substring(phone.length - 6, phone.length)
  5707. };
  5708. var data = {
  5709. cardId: this.form.cardId,
  5710. cardState: 1,
  5711. info: stringify_default()(infostr),
  5712. name: this.form.name,
  5713. number: this.form.number,
  5714. phone: this.form.phone,
  5715. sex: parseInt(this.form.sex),
  5716. enterpriseId: this.form.enterpriseId,
  5717. type: this.form.type
  5718. };
  5719. var drawerRowid = '';
  5720. allFun["a" /* default */].addPeople(data, function (callback) {
  5721. if (callback.success) {
  5722. _this50.editVisiblelist = false;
  5723. var dataprise = [];
  5724. _this50.checkEnterpriseNode.map(function (li) {
  5725. var obj = {
  5726. itemId: callback.data,
  5727. orderId: li.value
  5728. };
  5729. dataprise.push(obj);
  5730. });
  5731. if (dataprise.length > 0) {
  5732. Object(api["g" /* httpPost */])(dataprise, _this50.$api.personBindEnterprise).then(function (res) {});
  5733. }
  5734. var ids = {
  5735. ids: [callback.data]
  5736. };
  5737. Object(api["g" /* httpPost */])(ids, _this50.$api.createkeyCard).then(function (res) {});
  5738. _this50.getAboutRoom();
  5739. _this50.getlist();
  5740. } else {
  5741. _this50.getlist();
  5742. }
  5743. });
  5744. if (this.WhetherToGreatAnAccount) {
  5745. var enterpriseName = this.enterpriselist.filter(function (item) {
  5746. return item.id == _this50.form.enterpriseId;
  5747. })[0];
  5748. if (enterpriseName) {
  5749. var addform = {
  5750. username: this.form.number,
  5751. phone: this.form.phone,
  5752. password: '123456',
  5753. userType: 3,
  5754. identity: 3,
  5755. tenantId: this.$store.state.tenantId,
  5756. enterpriseName: enterpriseName.name,
  5757. enterpriseId: this.form.enterpriseId
  5758. };
  5759. Object(api["g" /* httpPost */])(addform, this.$api.addUser).then(function (res3) {
  5760. if (res3.success) {
  5761. _this50.$message.success("创建账号成功");
  5762. } else {
  5763. _this50.$message.error("创建账号失败");
  5764. }
  5765. });
  5766. } else {
  5767. this.$message.error("请选择所属部门");
  5768. }
  5769. }
  5770. }
  5771. },
  5772. bindsave1: function bindsave1() {
  5773. var _this51 = this;
  5774. var documentType = this.documentType;
  5775. var str = {};
  5776. var cardName = this.drawerRow.name,
  5777. pzname = '';
  5778. if (documentType == '请选择') {
  5779. this.$message.error("请选择凭证类型");
  5780. return false;
  5781. }
  5782. if (this.value2[0] == '' || this.value2[1] == '') {
  5783. this.$message.error("请选择开始结束时间");
  5784. return false;
  5785. }
  5786. console.log(this.value2);
  5787. var sort = this.getTypeSort(this.roomtable1, documentType);
  5788. pzname = this.voucher.pzname || '';
  5789. if (documentType == 11 && this.voucher.fingerprintAlias == '') {
  5790. this.$message.error("请选择指纹别名");
  5791. return false;
  5792. }
  5793. if (documentType == 10) {
  5794. this.$message.error("人脸暂未开放");
  5795. return;
  5796. } else if (documentType == 11) {
  5797. var fingerprint = localStorage.getItem("fingerprint");
  5798. var indexofstr = fingerprint.indexOf(',');
  5799. if (indexofstr != -1) {
  5800. var array = fingerprint.split(",");
  5801. var num = this.Bytes2Str(array);
  5802. fingerprint = num;
  5803. }
  5804. if (pzname == '') {
  5805. pzname = '指纹' + sort;
  5806. }
  5807. str = {
  5808. username: this.voucher.username,
  5809. pzname: pzname,
  5810. userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
  5811. userPassword: JSON.parse(this.drawerRow.info).userPassword,
  5812. keyId: JSON.parse(this.drawerRow.info).keyId || '',
  5813. userId: JSON.parse(this.drawerRow.info).userId || '',
  5814. fingerprintAlias: this.voucher.fingerprintAlias,
  5815. password: "",
  5816. passwordStartTime: moment_default()(this.value2[0]).format('YYYYMMDDHHmmss'),
  5817. passwordEndTime: moment_default()(this.value2[1]).format('YYYYMMDDHHmmss'),
  5818. operateMode: 16,
  5819. order: 6216,
  5820. fingerprint: fingerprint
  5821. };
  5822. var _data5 = {
  5823. cardId: this.drawerRow.id,
  5824. content: stringify_default()(str),
  5825. type: documentType,
  5826. startTime: parseInt(moment_default()(this.value2[0]).valueOf() / 1000),
  5827. endTime: parseInt(moment_default()(this.value2[1]).valueOf() / 1000)
  5828. };
  5829. Object(api["g" /* httpPost */])(_data5, this.$api.addCertificates).then(function (res) {
  5830. _this51.$message.success('下发成功');
  5831. _this51.roomstatus1 = true;
  5832. _this51.getcertificate(); //获取凭证
  5833. });
  5834. return false;
  5835. } else if (documentType == 12) {
  5836. var arr2 = '';
  5837. if (this.voucher.idcard.length == 16) {
  5838. arr2 = this.voucher.idcard;
  5839. } else if (this.voucher.idcard.length == 0) {
  5840. this.$message.error("请输入身份证");
  5841. return false;
  5842. } else {
  5843. arr2 = Object(utils["d" /* dec2hex */])(this.voucher.idcard);
  5844. }
  5845. if (pzname == '') {
  5846. pzname = '身份证' + sort;
  5847. }
  5848. str = {
  5849. username: this.voucher.username,
  5850. pzname: pzname,
  5851. userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
  5852. userPassword: JSON.parse(this.drawerRow.info).userPassword,
  5853. keyId: JSON.parse(this.drawerRow.info).keyId || '',
  5854. userId: JSON.parse(this.drawerRow.info).userId || '',
  5855. operateMode: 13,
  5856. order: 6213,
  5857. password: arr2.toUpperCase(), //this.voucher.idcard,
  5858. passwordStartTime: moment_default()(this.value2[0]).format('YYYYMMDDHHmmss'),
  5859. passwordEndTime: moment_default()(this.value2[1]).format('YYYYMMDDHHmmss'),
  5860. is: false
  5861. };
  5862. } else if (documentType == 13) {
  5863. var nfc = "";
  5864. if (this.voucher.nfc.length == 8) {
  5865. nfc = this.voucher.nfc;
  5866. } else if (this.voucher.nfc.length == 0) {
  5867. this.$message.error("请输入NFC");
  5868. return false;
  5869. } else {
  5870. var array3 = Object(utils["d" /* dec2hex */])(this.voucher.nfc);
  5871. var arr4 = Object(utils["h" /* group */])(array3, 2);
  5872. arr4.map(function (li) {
  5873. nfc += li;
  5874. });
  5875. }
  5876. if (pzname == '') {
  5877. pzname = 'NFC' + sort;
  5878. }
  5879. if (this.regularCard) {
  5880. nfc = nfc + 'AA55';
  5881. }
  5882. str = {
  5883. username: this.voucher.username,
  5884. pzname: pzname,
  5885. operateMode: 10,
  5886. order: 6210,
  5887. userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
  5888. userPassword: JSON.parse(this.drawerRow.info).userPassword,
  5889. keyId: JSON.parse(this.drawerRow.info).keyId || '',
  5890. userId: JSON.parse(this.drawerRow.info).userId || '',
  5891. password: nfc.toUpperCase(), //this.voucher.nfc,
  5892. passwordStartTime: moment_default()(this.value2[0]).format('YYYYMMDDHHmmss'),
  5893. passwordEndTime: moment_default()(this.value2[1]).format('YYYYMMDDHHmmss'),
  5894. is: false
  5895. };
  5896. } else if (documentType == 14) {
  5897. if (this.voucher.password.length != 6) {
  5898. this.$message.error("密码长度为6位");
  5899. return false;
  5900. } else if (this.voucher.password.length == 0) {
  5901. this.$message.error("请输入密码");
  5902. return false;
  5903. }
  5904. if (pzname == '') {
  5905. pzname = '密码' + sort;
  5906. }
  5907. str = {
  5908. username: this.voucher.username,
  5909. pzname: pzname,
  5910. // imei: this.deviceList[0].imei,
  5911. password: this.voucher.password,
  5912. userTelephone: JSON.parse(this.drawerRow.info).userTelephone,
  5913. userPassword: JSON.parse(this.drawerRow.info).userPassword,
  5914. keyId: JSON.parse(this.drawerRow.info).keyId || '',
  5915. userId: JSON.parse(this.drawerRow.info).userId || '',
  5916. operateMode: 7,
  5917. order: 6207,
  5918. passwordStartTime: moment_default()(this.value2[0]).format('YYYYMMDDHHmmss'),
  5919. passwordEndTime: moment_default()(this.value2[1]).format('YYYYMMDDHHmmss'),
  5920. is: false
  5921. };
  5922. }
  5923. var data = {
  5924. cardId: this.drawerRow.id,
  5925. content: stringify_default()(str),
  5926. type: documentType,
  5927. startTime: moment_default()(this.value2[0]).valueOf() / 1000,
  5928. endTime: moment_default()(this.value2[1]).valueOf() / 1000
  5929. };
  5930. Object(api["g" /* httpPost */])(data, this.$api.addCertificates).then(function (res) {
  5931. _this51.$message.success('添加成功');
  5932. _this51.roomstatus1 = true;
  5933. _this51.getcertificate();
  5934. });
  5935. },
  5936. // 重新下发凭证
  5937. Issue: function Issue(index, row) {
  5938. var _this52 = this;
  5939. var data = {};
  5940. var userTelephone = JSON.parse(row.content).userTelephone;
  5941. var userPassword = JSON.parse(row.content).userPassword;
  5942. var passwordEndTime = JSON.parse(row.content).passwordEndTime;
  5943. var passwordStartTime = JSON.parse(row.content).passwordStartTime;
  5944. var q = {
  5945. deviceNum: row.deviceNum,
  5946. lockType: 1
  5947. // imei: row.imei
  5948. };
  5949. var data = {
  5950. q: stringify_default()(q),
  5951. pageNum: 1,
  5952. pageSize: 10
  5953. };
  5954. this.$confirm("确定要重新下发吗?", "提示", {
  5955. type: "warning"
  5956. }).then(function () {
  5957. Object(api["g" /* httpPost */])(data, _this52.$api.getDeviceItems).then(function (res) {
  5958. if (res.data.list.length > 0) {
  5959. if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
  5960. if (row.type == 1) {
  5961. var fpId = new Date();
  5962. var fingerprint = JSON.parse(row.content).fingerprint;
  5963. var pwd = JSON.parse(row.content).userPassword;
  5964. var startTime = stringify_default()(row.startTime);
  5965. var endTime = stringify_default()(row.endTime);
  5966. if (startTime.length == 13) {
  5967. startTime = Number(row.startTime / 1000);
  5968. }
  5969. if (endTime.length == 13) {
  5970. endTime = Number(row.endTime / 1000);
  5971. }
  5972. equipment["a" /* default */].addFingerPrints(row.deviceNum, row.imei, pwd, 0, fingerprint, startTime, endTime, function (callback) {
  5973. if (callback.success) {
  5974. var str1 = JSON.parse(row.content);
  5975. str1.fpTimeId = callback.serialNumber;
  5976. var updatedata = {
  5977. id: row.id,
  5978. content: stringify_default()(str1),
  5979. serial: callback.serialNumber
  5980. };
  5981. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res2) {});
  5982. _this52.obtainVoucherIssuanceRecord();
  5983. _this52.$message.success(callback.msg);
  5984. } else {
  5985. _this52.$message.error(callback.msg);
  5986. }
  5987. });
  5988. } else if (row.type == 2) {
  5989. var pwd = JSON.parse(row.content).password;
  5990. var userid = JSON.parse(row.content).userPassword;
  5991. if (pwd.length != 16) {
  5992. _this52.$message.error("卡格式错误,请重新录入");
  5993. return;
  5994. }
  5995. var startTime = stringify_default()(row.startTime);
  5996. var endTime = stringify_default()(row.endTime);
  5997. if (startTime.length == 13) {
  5998. startTime = Number(row.startTime / 1000);
  5999. }
  6000. if (endTime.length == 13) {
  6001. endTime = Number(row.endTime / 1000);
  6002. }
  6003. equipment["a" /* default */].RfCardRegister(row.deviceNum, row.imei, userid, 1, 1, pwd, 36, startTime, endTime, 6210, function (callback) {
  6004. if (callback.success) {
  6005. var updatedata = {
  6006. id: row.id,
  6007. serial: callback.serialNumber
  6008. };
  6009. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res) {});
  6010. _this52.$message.success(callback.msg);
  6011. _this52.obtainVoucherIssuanceRecord();
  6012. } else {
  6013. _this52.$message.error(callback.msg);
  6014. _this52.obtainVoucherIssuanceRecord();
  6015. }
  6016. });
  6017. } else if (row.type == 3) {
  6018. var pwd = JSON.parse(row.content).password;
  6019. var userid = JSON.parse(row.content).userPassword;
  6020. if (pwd.length != 8) {
  6021. _this52.$message.error("卡格式错误,请重新录入");
  6022. return;
  6023. }
  6024. pwd = pwd + '00000000';
  6025. var startTime = stringify_default()(row.startTime);
  6026. var endTime = stringify_default()(row.endTime);
  6027. if (startTime.length == 13) {
  6028. startTime = Number(row.startTime / 1000);
  6029. }
  6030. if (endTime.length == 13) {
  6031. endTime = Number(row.endTime / 1000);
  6032. }
  6033. equipment["a" /* default */].RfCardRegister(row.deviceNum, row.imei, userid, 1, 1, pwd, 50, startTime, endTime, 6210, function (callback) {
  6034. if (callback.success) {
  6035. var updatedata = {
  6036. id: row.id,
  6037. serial: callback.serialNumber
  6038. };
  6039. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res) {});
  6040. _this52.$message.success(callback.msg);
  6041. _this52.obtainVoucherIssuanceRecord();
  6042. } else {
  6043. _this52.$message.error(callback.msg);
  6044. _this52.obtainVoucherIssuanceRecord();
  6045. }
  6046. });
  6047. } else if (row.type == 4) {
  6048. var pwd = JSON.parse(row.content).password;
  6049. var userid = JSON.parse(row.content).userPassword;
  6050. var startTime = stringify_default()(row.startTime);
  6051. var endTime = stringify_default()(row.endTime);
  6052. if (startTime.length == 13) {
  6053. startTime = Number(row.startTime / 1000);
  6054. }
  6055. if (endTime.length == 13) {
  6056. endTime = Number(row.endTime / 1000);
  6057. }
  6058. equipment["a" /* default */].addForeverPassword(row.deviceNum, row.imei, userid, 1, pwd, 255, startTime, endTime, 6207, function (callback) {
  6059. if (callback.success) {
  6060. var updatedata = {
  6061. id: row.id,
  6062. serial: callback.serialNumber
  6063. };
  6064. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res) {});
  6065. _this52.$message.success(callback.msg);
  6066. _this52.obtainVoucherIssuanceRecord();
  6067. } else {
  6068. _this52.$message.error(callback.msg);
  6069. _this52.obtainVoucherIssuanceRecord();
  6070. }
  6071. });
  6072. }
  6073. } else if (res.data.list[0].manufactureId == 101) {
  6074. if (row.type == 1) {
  6075. var fpId = new Date();
  6076. var fingerprint = JSON.parse(row.content).fingerprint;
  6077. var str = {
  6078. imei: row.imei,
  6079. deviceNum: row.deviceNum,
  6080. userTelephone: userTelephone,
  6081. userPassword: userPassword,
  6082. password: JSON.parse(row.content).password,
  6083. length: fingerprint.length / 2,
  6084. fpTimeId: fpId.getTime(),
  6085. operateMode: 16,
  6086. order: 6216,
  6087. fingerprint: fingerprint,
  6088. fingerprintStartTime: passwordStartTime,
  6089. fingerprintEndTime: passwordEndTime
  6090. };
  6091. Object(api["g" /* httpPost */])(str, _this52.$api.fingerprintTransfer).then(function (res1) {
  6092. if (res1.success) {
  6093. var str1 = JSON.parse(row.content);
  6094. str1.fpTimeId = str.fpTimeId;
  6095. var updatedata = {
  6096. id: row.id,
  6097. content: stringify_default()(str1),
  6098. serial: res1.data.serialNumber
  6099. };
  6100. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res2) {});
  6101. _this52.$message.success("下发成功");
  6102. _this52.obtainVoucherIssuanceRecord();
  6103. } else {
  6104. _this52.$message.error("下发失败");
  6105. _this52.obtainVoucherIssuanceRecord();
  6106. }
  6107. });
  6108. _this52.$message.success("操作成功");
  6109. return false;
  6110. } else if (row.type == 2) {
  6111. data = {
  6112. imei: row.imei,
  6113. deviceNum: row.deviceNum,
  6114. userTelephone: userTelephone,
  6115. cardId: row.cardId,
  6116. userPassword: userPassword,
  6117. password: JSON.parse(row.content).password,
  6118. operateMode: 13,
  6119. order: 6213,
  6120. passwordStartTime: passwordStartTime,
  6121. passwordEndTime: passwordEndTime,
  6122. is: false
  6123. };
  6124. } else if (row.type == 3) {
  6125. data = {
  6126. imei: row.imei,
  6127. deviceNum: row.deviceNum,
  6128. userTelephone: userTelephone,
  6129. cardId: row.cardId,
  6130. userPassword: userPassword,
  6131. password: JSON.parse(row.content).password,
  6132. operateMode: 10,
  6133. order: 6210,
  6134. passwordStartTime: passwordStartTime,
  6135. passwordEndTime: passwordEndTime,
  6136. is: false
  6137. };
  6138. } else if (row.type == 4) {
  6139. data = {
  6140. imei: row.imei,
  6141. deviceNum: row.deviceNum,
  6142. userTelephone: userTelephone,
  6143. cardId: row.cardId,
  6144. userPassword: userPassword,
  6145. password: JSON.parse(row.content).password,
  6146. operateMode: 7,
  6147. order: 6207,
  6148. passwordStartTime: passwordStartTime,
  6149. passwordEndTime: passwordEndTime,
  6150. is: false
  6151. };
  6152. }
  6153. Object(api["g" /* httpPost */])(data, _this52.$api.getDeviceOperateUserInfo).then(function (res) {
  6154. if (res.success) {
  6155. var updatedata = {
  6156. id: row.id,
  6157. serial: res.data.serialNumber
  6158. };
  6159. Object(api["g" /* httpPost */])(updatedata, _this52.$api.updateCertificates).then(function (res) {});
  6160. _this52.$message.success("下发成功");
  6161. _this52.obtainVoucherIssuanceRecord();
  6162. } else {
  6163. _this52.$message.error("下发失败");
  6164. _this52.obtainVoucherIssuanceRecord();
  6165. }
  6166. });
  6167. }
  6168. } else {
  6169. _this52.$message.error("未发现这个设备");
  6170. }
  6171. });
  6172. });
  6173. },
  6174. // 解除绑定
  6175. UnbindFun: function UnbindFun(index, row) {
  6176. var _this53 = this;
  6177. this.$confirm('是否只解除平台关系', {
  6178. confirmButtonText: '确定',
  6179. cancelButtonText: '取消',
  6180. type: 'warning'
  6181. }).then(function () {
  6182. var data = [{
  6183. siteId: row.roomId,
  6184. cardId: _this53.drawerRow.id
  6185. }];
  6186. Object(api["g" /* httpPost */])(data, _this53.$api.unbindCard).then(function (res) {
  6187. if (res.success) {
  6188. _this53.getAboutRoom();
  6189. setTimeout(function () {
  6190. _this53.updateRoom();
  6191. }, 500);
  6192. _this53.screenRoom(_this53.drawerRow.id);
  6193. _this53.$message.success("解绑成功");
  6194. } else {
  6195. _this53.$message.error("解绑失败");
  6196. }
  6197. });
  6198. });
  6199. },
  6200. // 下载模板
  6201. workbook2blob: function workbook2blob(workbook) {
  6202. // 生成excel的配置项
  6203. var wopts = {
  6204. // 要生成的文件类型
  6205. bookType: 'xlsx',
  6206. // // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
  6207. bookSST: false,
  6208. type: 'binary'
  6209. };
  6210. var wbout = xlsx_default.a.write(workbook, wopts);
  6211. // 将字符串转ArrayBuffer
  6212. function s2ab(s) {
  6213. var buf = new ArrayBuffer(s.length);
  6214. var view = new Uint8Array(buf);
  6215. for (var i = 0; i !== s.length; ++i) {
  6216. view[i] = s.charCodeAt(i) & 0xff;
  6217. }return buf;
  6218. }
  6219. var buf = s2ab(wbout);
  6220. var blob = new Blob([buf], {
  6221. type: 'application/octet-stream'
  6222. });
  6223. return blob;
  6224. },
  6225. // 将blob对象 创建bloburl,然后用a标签实现弹出下载框
  6226. openDownloadDialog: function openDownloadDialog(blob, fileName) {
  6227. if ((typeof blob === "undefined" ? "undefined" : typeof_default()(blob)) === 'object' && blob instanceof Blob) {
  6228. blob = URL.createObjectURL(blob); // 创建blob地址
  6229. }
  6230. var aLink = document.createElement('a');
  6231. aLink.href = blob;
  6232. // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,有时候 file:///模式下不会生效
  6233. aLink.download = fileName || '';
  6234. var event;
  6235. if (window.MouseEvent) event = new MouseEvent('click');
  6236. // 移动端
  6237. else {
  6238. event = document.createEvent('MouseEvents');
  6239. event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  6240. }
  6241. aLink.dispatchEvent(event);
  6242. },
  6243. exportBtn: function exportBtn() {
  6244. this.exportExcel();
  6245. },
  6246. exportExcel: function exportExcel() {
  6247. var sheet1data = [['人员名称', '房间ID', '房间名称', '学工号', '卡号', '电话(为11位手机号码)', '性别(1为男,2为女)', '开锁方式(3为NFC,4为密码)', '内容(NFC为8位16进制物理卡号、密码为6位数字密码)']];
  6248. var sheet1 = xlsx_default.a.utils.json_to_sheet(sheet1data, {
  6249. skipHeader: true
  6250. });
  6251. // 创建一个新的空的workbook
  6252. var wb = xlsx_default.a.utils.book_new();
  6253. xlsx_default.a.utils.book_append_sheet(wb, sheet1, '人员导入模板');
  6254. // XLSX.utils.book_append_sheet(wb, sheet2, '行政部')
  6255. // XLSX.utils.book_append_sheet(wb, sheet3, '前端部')
  6256. var workbookBlob = this.workbook2blob(wb);
  6257. this.openDownloadDialog(workbookBlob, '人员导入模板.xlsx');
  6258. },
  6259. hexStringToBuffer: function hexStringToBuffer(hex) {
  6260. var buffer = new ArrayBuffer(hex.length / 2);
  6261. var byteStream = new Uint8Array(buffer);
  6262. var i = 0;
  6263. while (hex.length >= 2) {
  6264. var x = parseInt(hex.substring(0, 2), 16);
  6265. hex = hex.substring(2, hex.length);
  6266. byteStream[i++] = x;
  6267. }
  6268. return byteStream;
  6269. },
  6270. // 采集指纹
  6271. addfir: function addfir() {
  6272. var _this = this;
  6273. this.$refs.myChild.addFingerprintFun(0x8014, function (data) {
  6274. localStorage.setItem('fingerprint', data);
  6275. _this.localFingerprint = data;
  6276. });
  6277. },
  6278. getFingerData: function getFingerData() {
  6279. var _this54 = this;
  6280. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
  6281. var _this;
  6282. return regenerator_default.a.wrap(function _callee2$(_context2) {
  6283. while (1) {
  6284. switch (_context2.prev = _context2.next) {
  6285. case 0:
  6286. _this = _this54;
  6287. _context2.next = 3;
  6288. return _this54.$refs.myGetFinger.DetectFinger();
  6289. case 3:
  6290. _context2.next = 5;
  6291. return _this54.$refs.myGetFinger.getFingerData('', function (data) {
  6292. console.log(data);
  6293. localStorage.setItem('fingerprint', data.template);
  6294. _this.localFingerprint = data.template;
  6295. });
  6296. case 5:
  6297. case "end":
  6298. return _context2.stop();
  6299. }
  6300. }
  6301. }, _callee2, _this54);
  6302. }))();
  6303. },
  6304. setVoucherNfc: function setVoucherNfc(data) {
  6305. if (data.cardType == 50) {
  6306. var nfc = "";
  6307. var str = data.cardNo.substr(0, 8);
  6308. var arr4 = Object(utils["h" /* group */])(str, 2).reverse();
  6309. arr4.map(function (li) {
  6310. nfc += li;
  6311. });
  6312. this.voucher.nfc = nfc.toUpperCase();
  6313. console.log(this.voucher.nfc);
  6314. } else if (data.cardType == 36) {
  6315. this.voucher.idcard = data.cardNo.toUpperCase();
  6316. }
  6317. },
  6318. writeNfc: function writeNfc() {
  6319. var _this = this;
  6320. this.$refs.myChild.writeCard(0x8011, function (data) {
  6321. if (data.status == 0) {
  6322. console.log(data);
  6323. } else {
  6324. console.log(data);
  6325. _this.$message.error("写卡错误,请检查读卡器是否正常!");
  6326. }
  6327. });
  6328. },
  6329. addNfc: function addNfc() {
  6330. var _this = this;
  6331. this.$refs.myChild.cardFun(0x8010, function (data) {
  6332. if (data.status == 0) {
  6333. console.log(data);
  6334. _this.setVoucherNfc(data);
  6335. } else {
  6336. _this.$message.error("读卡错误,请检查读卡器是否正常!");
  6337. }
  6338. });
  6339. },
  6340. // input视图刷新
  6341. changesr: function changesr(e) {
  6342. this.$forceUpdate();
  6343. },
  6344. // 加入信息库
  6345. addInformationBase: function addInformationBase(index, row) {
  6346. var _this55 = this;
  6347. var info = JSON.parse(row.content);
  6348. var obj = {},
  6349. content = {},
  6350. arr = [];
  6351. content["type"] = row.type;
  6352. content["order"] = info.order;
  6353. content["cardId"] = info.cardId;
  6354. content["pzname"] = info.pzname;
  6355. if (row.type == 1) {
  6356. content["content"] = info.fingerprint;
  6357. } else {
  6358. content["content"] = info.password;
  6359. }
  6360. content["operateMode"] = info.operateMode;
  6361. content["userPassword"] = info.userPassword;
  6362. content["userTelephone"] = info.userTelephone;
  6363. content["length"] = info.length;
  6364. obj.cardId = this.drawerRow.id;
  6365. obj.content = stringify_default()(content);
  6366. arr.push(obj);
  6367. var data = {
  6368. list: arr
  6369. };
  6370. Object(api["g" /* httpPost */])(data, this.$api.addMark).then(function (res) {
  6371. if (res.success) {
  6372. _this55.$message.success("操作成功");
  6373. }
  6374. });
  6375. },
  6376. //多选删除房间数据
  6377. selectRoomdelete: function selectRoomdelete(val) {
  6378. this.selectRoomdeletelist = val;
  6379. },
  6380. // 清理房间
  6381. qlfj: function qlfj() {
  6382. var info = JSON.parse(this.drawerRow.info);
  6383. var info1 = {
  6384. roomIds: [],
  6385. userPassword: info.userPassword,
  6386. userTelephone: info.userTelephone
  6387. };
  6388. var data1 = {
  6389. id: this.drawerRow.id,
  6390. info: stringify_default()(info1)
  6391. };
  6392. Object(api["g" /* httpPost */])(data1, this.$api.updateCard).then(function (res) {});
  6393. },
  6394. // 退租
  6395. rentWithdrawal: function rentWithdrawal(index, row) {
  6396. this.batchRenewalList = [row];
  6397. this.batchLeaseback();
  6398. },
  6399. // 删除房间
  6400. deleteRoomfun: function deleteRoomfun(index, row) {
  6401. var that = this;
  6402. var resultArr = this.AboutDevice.filter(function (_item) {
  6403. return _item.roomId == row.roomId;
  6404. })[0];
  6405. console.log(resultArr, this.drawerRow.id);
  6406. if (resultArr) {
  6407. allFun["a" /* default */].unbindPeopleAndRooms(this.drawerRow.id, resultArr.imei, function (callback) {
  6408. if (callback.success) {
  6409. var dataOne = util["a" /* default */].zlib_unzip(callback.data);
  6410. if (dataOne.length > 0) {
  6411. var data = dataOne[0];
  6412. if (data.status == 0) {
  6413. that.$message.error("该房间正在下发此用户,不能删除!");
  6414. } else if (data.status == 1) {
  6415. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6416. that.getcheckInList();
  6417. that.updateRoom();
  6418. } else if (data.status == 703) {
  6419. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6420. that.getcheckInList();
  6421. } else {
  6422. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6423. that.updateRoom();
  6424. }
  6425. } else {
  6426. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6427. that.getcheckInList();
  6428. that.updateRoom();
  6429. }
  6430. } else {
  6431. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6432. that.getcheckInList();
  6433. that.updateRoom();
  6434. }
  6435. });
  6436. } else {
  6437. that.deleteRelationshipBetweenPersonnelAndRoom(index, row);
  6438. that.getcheckInList();
  6439. that.updateRoom();
  6440. }
  6441. },
  6442. deleteRelationshipBetweenPersonnelAndRoom: function deleteRelationshipBetweenPersonnelAndRoom(index, row) {
  6443. var _this56 = this;
  6444. var info = JSON.parse(this.drawerRow.info);
  6445. var data = [{
  6446. siteId: row.roomId,
  6447. cardId: this.drawerRow.id
  6448. }];
  6449. Object(api["g" /* httpPost */])(data, this.$api.unbindCard).then(function (res) {
  6450. if (res.success) {
  6451. var array = _this56.roomtable,
  6452. SelectedList = [],
  6453. roomtable = [];
  6454. _this56.roomtable.map(function (item, Index) {
  6455. if (item.roomId == row.roomId) {
  6456. array.splice(Index, 1);
  6457. }
  6458. });
  6459. array.map(function (li) {
  6460. SelectedList.push(li.roomId);
  6461. });
  6462. _this56.getcheckInList();
  6463. _this56.getAboutRoom();
  6464. setTimeout(function () {
  6465. _this56.updateRoom();
  6466. }, 500);
  6467. // this.roomtablestatus = false
  6468. _this56.selectRoom = false;
  6469. _this56.$nextTick(function () {
  6470. this.SelectedList = SelectedList;
  6471. this.roomtable = roomtable;
  6472. this.selectRoom = true;
  6473. // this.roomtablestatus = true
  6474. });
  6475. var resultArr = _this56.AboutDevice.filter(function (_item) {
  6476. return _item.roomId == row.roomId;
  6477. })[0];
  6478. if (resultArr) {
  6479. if (resultArr.imei) {
  6480. if (resultArr.manufactureId == 201 || resultArr.manufactureId == 221) {
  6481. var data = {
  6482. lockerId: resultArr.deviceNum,
  6483. imei: resultArr.imei,
  6484. lockerUserId: info.userPassword,
  6485. keyId: info.userPassword,
  6486. role: 0,
  6487. action: 2, //1--添加、2--删除、3--修改
  6488. order: 6203,
  6489. cardName: _this56.drawerRow.name,
  6490. roomName: resultArr.roomName
  6491. };
  6492. Object(api["g" /* httpPost */])(data, _this56.$api.ZGduserOperation).then(function (res) {
  6493. if (res.success) {
  6494. _this56.$message.success('删除用户成功');
  6495. } else {
  6496. _this56.$message.error(res.msg);
  6497. }
  6498. });
  6499. } else if (resultArr.manufactureId == 101) {
  6500. var str = {
  6501. imei: resultArr.imei,
  6502. deviceNum: resultArr.deviceNum,
  6503. userTelephone: info.userTelephone,
  6504. userPassword: info.userPassword,
  6505. operateMode: 3,
  6506. order: 6203,
  6507. password: "20210816",
  6508. cardName: _this56.drawerRow.name,
  6509. roomName: resultArr.roomName,
  6510. is: false
  6511. };
  6512. Object(api["g" /* httpPost */])(str, _this56.$api.getDeviceOperateUserInfo).then(function (res1) {
  6513. if (res1.success) {
  6514. _this56.$message.success("删除用户成功");
  6515. } else {
  6516. _this56.$message.error(res1.msg);
  6517. }
  6518. });
  6519. }
  6520. }
  6521. }
  6522. _this56.screenRoom(_this56.drawerRow.id);
  6523. _this56.$message.success("解绑房间成功");
  6524. }
  6525. });
  6526. },
  6527. getRandomNumber: function getRandomNumber(n) {
  6528. var arr = new Array(n); //用于存放随机数
  6529. var randomNumber = ""; //存放随机数
  6530. for (i = 0; i < arr.length; i++) {
  6531. arr[i] = parseInt(Math.random() * 10);
  6532. }var flag = 0;
  6533. for (i = 0; i < arr.length - 1; i++) {
  6534. for (j = i + 1; j < arr.length; j++) {
  6535. if (arr[i] == arr[j]) {
  6536. flag = 1;
  6537. break;
  6538. }
  6539. }
  6540. if (flag) break;
  6541. }
  6542. for (var i = 0; i < arr.length; i++) {
  6543. randomNumber += arr[i];
  6544. }
  6545. return randomNumber;
  6546. },
  6547. // 修改凭证
  6548. modifyCraiFun: function modifyCraiFun() {
  6549. var that = this;
  6550. var row = this.modifyrow;
  6551. var content = JSON.parse(row.content);
  6552. var passwordStartTime = moment_default()(this.value2[0].getTime()).format('YYYYMMDDHHmmss');
  6553. var passwordEndTime = moment_default()(this.value2[1].getTime()).format('YYYYMMDDHHmmss');
  6554. content.pzname = that.certificatesContent.pzname;
  6555. content.passwordStartTime = passwordStartTime;
  6556. content.passwordEndTime = passwordEndTime;
  6557. var updatedata = {
  6558. id: row.id,
  6559. content: stringify_default()(content),
  6560. startTime: this.value2[0].getTime() / 1000,
  6561. endTime: this.value2[1].getTime() / 1000
  6562. };
  6563. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res2) {
  6564. that.getcertificate();
  6565. that.certificatestatus = false;
  6566. });
  6567. },
  6568. modifyCrai: function modifyCrai(index, row) {
  6569. this.modifyrow = row;
  6570. var content = JSON.parse(row.content);
  6571. this.documentType1 = row.type;
  6572. this.certificatesContent.username = content.username;
  6573. this.certificatesContent.pzname = content.pzname;
  6574. this.certificatesContent.password = content.password;
  6575. var passwordStartTime = '',
  6576. passwordEndTime = '';
  6577. if (row.startTime && row.endTime) {
  6578. var str1 = stringify_default()(row.startTime);
  6579. var str2 = stringify_default()(row.endTime);
  6580. if (str1.length == 13 && str2.length == 13) {
  6581. passwordStartTime = moment_default()(row.startTime).format('YYYY-MM-DD HH:mm:ss');
  6582. passwordEndTime = moment_default()(row.endTime).format('YYYY-MM-DD HH:mm:ss');
  6583. } else if (str1.length == 10 && str2.length == 10) {
  6584. passwordStartTime = moment_default()(row.startTime * 1000).format('YYYY-MM-DD HH:mm:ss');
  6585. passwordEndTime = moment_default()(row.endTime * 1000).format('YYYY-MM-DD HH:mm:ss');
  6586. }
  6587. } else if (!row.deviceNum.indexOf('yxwl')) {
  6588. passwordStartTime = this.insertStr(content.endTime, "-");
  6589. passwordEndTime = this.insertStr(content.passwordEndTime, "-");
  6590. }
  6591. this.modifyStatus = false;
  6592. this.$nextTick(function () {
  6593. this.modifyvalue2[0] = passwordStartTime;
  6594. this.modifyvalue2[1] = passwordEndTime;
  6595. this.modifyStatus = true;
  6596. });
  6597. this.certificatestatus = true;
  6598. },
  6599. insertStr: function insertStr(soure, newStr) {
  6600. return soure.slice(0, 4) + newStr + soure.slice(4, 6) + newStr + soure.slice(6, 8) + " " + soure.slice(8, 10) + ":" + soure.slice(10, 12) + ":" + soure.slice(12, 14);
  6601. },
  6602. //所选房源
  6603. handleCheckChange: function handleCheckChange() {
  6604. this.selectkey = this.$refs.tree.getCheckedKeys();
  6605. },
  6606. // 房源添加
  6607. handleCheckChangeadd: function handleCheckChangeadd() {
  6608. this.selectkeyadd = this.$refs.tree2.getCheckedKeys();
  6609. },
  6610. //所选房源
  6611. handleCheckChange1: function handleCheckChange1() {
  6612. this.selectkey1 = this.$refs.tree1.getCheckedKeys();
  6613. },
  6614. markFun: function markFun(e) {
  6615. var info = this.tableData[e];
  6616. this.documentType = info.type;
  6617. if (info.type == 1) {
  6618. localStorage.setItem("fingerprint", info.content);
  6619. } else if (info.type == 2) {
  6620. this.voucher.idcard = info.content;
  6621. } else if (info.type == 3) {
  6622. this.voucher.nfc = info.content;
  6623. } else if (info.type == 4) {
  6624. this.voucher.password = info.content;
  6625. }
  6626. },
  6627. // 获取信息库
  6628. getOperates: function getOperates(id) {
  6629. // var data = {
  6630. // q: JSON.stringify({
  6631. // cardId: id,
  6632. // }),
  6633. // };
  6634. // httpGet(data, this.$api.getMark).then((res) => {
  6635. // var array = [];
  6636. // res.data.map((li) => {
  6637. // var str = JSON.parse(li.content);
  6638. // str.id = li.id;
  6639. // str.cardId = li.cardId;
  6640. // array.push(str);
  6641. // });
  6642. // this.tableData = array;
  6643. // });
  6644. },
  6645. // 人脸图片上传功能
  6646. handleRemove: function handleRemove(file) {
  6647. console.log(file);
  6648. },
  6649. handlePictureCardPreview: function handlePictureCardPreview(file) {
  6650. this.dialogImageUrl = file.url;
  6651. this.dialogVisible1 = true;
  6652. },
  6653. handleDownload: function handleDownload(file) {
  6654. console.log(file);
  6655. },
  6656. selectCheck: function selectCheck(e) {
  6657. if (e == "左手大拇指") {
  6658. this.fingerprintId = 0;
  6659. } else if (e == "左手食指") {
  6660. this.fingerprintId = 1;
  6661. } else if (e == "右手大拇指") {
  6662. this.fingerprintId = 2;
  6663. } else if (e == "右手食指") {
  6664. this.fingerprintId = 3;
  6665. }
  6666. },
  6667. // 分页
  6668. handleSizeChange1: function handleSizeChange1(val) {
  6669. this.pageSize1 = val;
  6670. this.obtainVoucherIssuanceRecord();
  6671. },
  6672. handleCurrentChange1: function handleCurrentChange1(val) {
  6673. this.currentPage1 = val;
  6674. this.obtainVoucherIssuanceRecord();
  6675. },
  6676. getlistNum1: function getlistNum1(val, size) {
  6677. var _this57 = this;
  6678. var dataall = {
  6679. pageNum: 0,
  6680. pageSize: 0,
  6681. orderBy: "create_at desc",
  6682. q: {
  6683. cardId: this.drawerRow.id,
  6684. deviceNum: this.credentialSearch.deviceNum,
  6685. imei: this.credentialSearch.imei,
  6686. inStatus: "0,1,702",
  6687. types: "0,1,2,3,4"
  6688. }
  6689. };
  6690. Object(api["d" /* httpGet */])(dataall, this.$api.getCertificates).then(function (resall) {
  6691. if (resall.code == 200) {
  6692. var sendOn = util["a" /* default */].zlib_unzip(resall.data);
  6693. var sendstatus = true;
  6694. if (resall.data.total == 0) {
  6695. sendstatus = false;
  6696. }
  6697. var data = {
  6698. pageNum: _this57.currentPage1,
  6699. pageSize: _this57.pageSize1,
  6700. orderBy: "create_at desc",
  6701. q: {
  6702. cardId: _this57.drawerRow.id,
  6703. type: '1,2,3,4'
  6704. }
  6705. };
  6706. Object(api["d" /* httpGet */])(data, _this57.$api.getCertificates).then(function (res) {
  6707. var certiflist = util["a" /* default */].zlib_unzip(res.data);
  6708. var AboutDevice = _this57.allAboutDevice;
  6709. certiflist.map(function (li) {
  6710. li['color'] = '1';
  6711. var licontent = JSON.parse(li.content).password;
  6712. var filterResult = sendOn.filter(function (item) {
  6713. return JSON.parse(item.content).password == licontent;
  6714. });
  6715. if (sendstatus && filterResult && filterResult.length > 0) {
  6716. var statusOne = filterResult.some(function (item) {
  6717. return item.status == 0;
  6718. });
  6719. var statusTwo = filterResult.some(function (item) {
  6720. return item.status == 1;
  6721. });
  6722. var statusThree = filterResult.some(function (item) {
  6723. return item.status == 702;
  6724. });
  6725. if (statusOne) {
  6726. li['color'] = '0';
  6727. } else if (!statusOne && !statusThree && statusTwo) {
  6728. li['color'] = '1';
  6729. } else if (!statusOne && statusThree) {
  6730. li['color'] = '702';
  6731. } else {
  6732. li['color'] = '999';
  6733. }
  6734. }
  6735. li.createAt = _this57.time(+new Date(li.createAt));
  6736. li.userTelephone = JSON.parse(li.content).userTelephone;
  6737. li.pzname = JSON.parse(li.content).pzname;
  6738. li['startTimeText'] = util["a" /* default */].formatTime(li.startTime);
  6739. li['endTimeText'] = util["a" /* default */].formatTime(li.endTime);
  6740. li['data'] = JSON.parse(li.content).password;
  6741. if (li.type == 1) {
  6742. li['data'] = li.id;
  6743. }
  6744. if (li.pzname) {
  6745. var statusif = li.pzname.indexOf('蓝牙') || -1;
  6746. if (statusif) {
  6747. li['DeletePermissions'] = true;
  6748. } else {
  6749. if (li.type != 11) {
  6750. li['DeletePermissions'] = true;
  6751. } else {
  6752. li['DeletePermissions'] = false;
  6753. }
  6754. }
  6755. } else {
  6756. li['DeletePermissions'] = false;
  6757. }
  6758. });
  6759. var array = util["a" /* default */].uniqueArray(certiflist, "data");
  6760. _this57.roomtable1 = certiflist;
  6761. _this57.total1 = res.data.total;
  6762. });
  6763. }
  6764. });
  6765. },
  6766. // 获取指纹id
  6767. getfiId: function getfiId(row, callback) {
  6768. var content = JSON.parse(row.content);
  6769. var data = {
  6770. q: stringify_default()({
  6771. serial: row.serial
  6772. }),
  6773. pageNum: 1,
  6774. pageSize: 10
  6775. };
  6776. Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) {
  6777. var datalist = util["a" /* default */].zlib_unzip(res.data);
  6778. callback(datalist);
  6779. });
  6780. },
  6781. // 获取指纹id
  6782. getfiId1: function getfiId1(row, callback) {
  6783. var data = {
  6784. q: stringify_default()({
  6785. serial: row.serial
  6786. }),
  6787. pageNum: 1,
  6788. pageSize: 10
  6789. };
  6790. Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) {
  6791. var datalist = util["a" /* default */].zlib_unzip(res.data);
  6792. callback(datalist);
  6793. });
  6794. },
  6795. // 批量删除凭证
  6796. deleAll: function deleAll() {
  6797. var _this58 = this;
  6798. // console.log(this.multipleSelection4)
  6799. // return
  6800. var multipleSelection4 = this.multipleSelection4;
  6801. this.$confirm("确定要删除吗?", "提示", {
  6802. type: "warning"
  6803. }).then(function () {
  6804. multipleSelection4.map(function (li, index) {
  6805. _this58.deletefun2(index, li);
  6806. });
  6807. });
  6808. },
  6809. // 删除凭证操作
  6810. deletefun2: function deletefun2(index, row) {
  6811. var _this59 = this;
  6812. // 二次确认删除
  6813. var ids = this.roomtable;
  6814. var that = this;
  6815. var str = {};
  6816. var q = {
  6817. deviceNum: row.deviceNum,
  6818. imei: row.imei,
  6819. lockType: 1
  6820. };
  6821. var data = {
  6822. q: stringify_default()(q),
  6823. pageNum: 1,
  6824. pageSize: 10
  6825. };
  6826. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  6827. if (res.data.list.length > 0) {
  6828. var cardName = row.name + '-' + JSON.parse(row.content).pzname;
  6829. if (res.data.list[0].manufactureId == 201 || res.data.list[0].manufactureId == 221) {
  6830. if (row.type == 1) {
  6831. _this59.getfiId1(row, function (data) {
  6832. if (data.length > 0) {
  6833. equipment["a" /* default */].delFingerPrints(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, data[0].face, 0, row.startTime, row.endTime, cardName, res.data.list[0].roomName, function (callback) {
  6834. if (callback.success) {
  6835. var content = JSON.parse(row.content);
  6836. content.operateMode = 18;
  6837. var updatedata = {
  6838. id: row.id,
  6839. status: 0,
  6840. content: stringify_default()(content)
  6841. // serial: callback.data.serialNumber,
  6842. };
  6843. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  6844. that.$message.success("删除成功!");
  6845. } else {
  6846. that.$message.error(callback.msg);
  6847. }
  6848. });
  6849. } else {
  6850. that.$message.success("未找到对应锁上凭证记录");
  6851. }
  6852. });
  6853. } else if (row.type == 2) {
  6854. _this59.getfiId1(row, function (data) {
  6855. if (data.length > 0) {
  6856. if (JSON.parse(row.content).password.length != 16) {
  6857. this.$confirm("卡格式错误,请重新录入", "提示", {
  6858. type: "warning"
  6859. }).then(function () {});
  6860. } else {
  6861. equipment["a" /* default */].delCardRegister(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, 1, JSON.parse(row.content).password, 36, row.startTime, row.endTime, 6212, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  6862. if (callback.success) {
  6863. var content = JSON.parse(row.content);
  6864. content.operateMode = 15;
  6865. var updatedata = {
  6866. id: row.id,
  6867. status: 0,
  6868. content: stringify_default()(content)
  6869. // serial: callback.data.serialNumber,
  6870. };
  6871. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  6872. that.$message.success("删除成功!");
  6873. } else {
  6874. that.$message.error(callback.msg);
  6875. }
  6876. });
  6877. }
  6878. } else {
  6879. that.$message.success("未找到对应锁上凭证记录");
  6880. }
  6881. });
  6882. } else if (row.type == 3) {
  6883. _this59.getfiId1(row, function (data) {
  6884. console.log(data);
  6885. if (data.length > 0) {
  6886. if (JSON.parse(row.content).password.length != 8) {
  6887. this.$confirm("卡格式错误,是否删除重新录入", "提示", {
  6888. type: "warning"
  6889. }).then(function () {
  6890. var data = {
  6891. ids: [row.id]
  6892. };
  6893. Object(api["g" /* httpPost */])(data, that.$api.deleteCertificates).then(function (res) {
  6894. if (res.success) {
  6895. that.$message.success("删除成功!");
  6896. that.getcertificate();
  6897. }
  6898. });
  6899. });
  6900. } else {
  6901. equipment["a" /* default */].delCardRegister(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, 1, JSON.parse(row.content).password, 50, row.startTime, row.endTime, 6212, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  6902. if (callback.success) {
  6903. var content = JSON.parse(row.content);
  6904. content.operateMode = 12;
  6905. var updatedata = {
  6906. id: row.id,
  6907. status: 0,
  6908. content: stringify_default()(content)
  6909. // serial: callback.data.serialNumber,
  6910. };
  6911. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  6912. that.$message.success("删除成功!");
  6913. } else {
  6914. that.$message.error(callback.msg);
  6915. }
  6916. });
  6917. }
  6918. } else {
  6919. that.$message.success("未找到对应锁上凭证记录");
  6920. }
  6921. });
  6922. } else if (row.type == 4) {
  6923. _this59.getfiId1(row, function (data) {
  6924. if (data.length > 0) {
  6925. equipment["a" /* default */].delForeverPassword(row.deviceNum, row.imei, JSON.parse(row.content).userPassword, 2, JSON.parse(row.content).password, 255, row.startTime, row.endTime, 6209, data[0].face, cardName, res.data.list[0].roomName, function (callback) {
  6926. if (callback.success) {
  6927. var content = JSON.parse(row.content);
  6928. content.operateMode = 9;
  6929. var updatedata = {
  6930. id: row.id,
  6931. status: 0,
  6932. content: stringify_default()(content)
  6933. // serial: callback.data.serialNumber,
  6934. };
  6935. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  6936. that.$message.success("删除成功!");
  6937. } else {
  6938. that.$message.error(callback.msg);
  6939. }
  6940. });
  6941. } else {
  6942. that.$message.success("未找到对应锁上凭证记录");
  6943. }
  6944. });
  6945. }
  6946. } else if (res.data.list[0].manufactureId == 101) {
  6947. if (row.type == 1) {
  6948. _this59.getfiId(row, function (data) {
  6949. if (data.length > 0) {
  6950. var fpid = "";
  6951. if (data[0].face) {
  6952. fpid = data[0].face.toString(16);
  6953. if (fpid.length != 2) {
  6954. fpid = "0" + fpid;
  6955. }
  6956. } else {
  6957. if (data[0].face == 0) {
  6958. fpid = data[0].face.toString(16);
  6959. fpid = "0" + fpid;
  6960. }
  6961. }
  6962. str = {
  6963. imei: row.imei,
  6964. deviceNum: row.deviceNum,
  6965. userTelephone: JSON.parse(row.content).userTelephone,
  6966. operateMode: 18,
  6967. order: 6218,
  6968. password: fpid,
  6969. userPassword: JSON.parse(row.content).userPassword,
  6970. is: false,
  6971. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  6972. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  6973. cardName: cardName,
  6974. roomName: res.data.list[0].roomName
  6975. };
  6976. if (JSON.parse(row.content).pass) {
  6977. str['pass'] = true;
  6978. } else {
  6979. str['pass'] = false;
  6980. }
  6981. Object(api["g" /* httpPost */])(str, that.$api.getDeviceOperateUserInfo).then(function (res1) {
  6982. if (res1.success) {
  6983. var content = JSON.parse(row.content);
  6984. content.operateMode = str.operateMode;
  6985. var updatedata = {
  6986. id: row.id,
  6987. status: 0,
  6988. content: stringify_default()(content)
  6989. // serial: res1.data.serialNumber,
  6990. };
  6991. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  6992. that.$message.success("删除成功!");
  6993. }
  6994. });
  6995. } else {
  6996. that.$message.success("未找到对应锁上凭证记录");
  6997. }
  6998. });
  6999. return false;
  7000. } else if (row.type == 2) {
  7001. str = {
  7002. imei: row.imei,
  7003. deviceNum: row.deviceNum,
  7004. userTelephone: JSON.parse(row.content).userTelephone,
  7005. operateMode: 15,
  7006. order: 6215,
  7007. password: JSON.parse(row.content).password,
  7008. userPassword: JSON.parse(row.content).userPassword,
  7009. is: false,
  7010. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  7011. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  7012. cardName: cardName,
  7013. roomName: res.data.list[0].roomName
  7014. };
  7015. } else if (row.type == 3) {
  7016. str = {
  7017. imei: row.imei,
  7018. deviceNum: row.deviceNum,
  7019. userTelephone: JSON.parse(row.content).userTelephone,
  7020. operateMode: 12,
  7021. order: 6212,
  7022. password: JSON.parse(row.content).password,
  7023. userPassword: JSON.parse(row.content).userPassword,
  7024. is: false,
  7025. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  7026. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  7027. cardName: cardName,
  7028. roomName: res.data.list[0].roomName
  7029. };
  7030. } else if (row.type == 4) {
  7031. str = {
  7032. imei: row.imei,
  7033. deviceNum: row.deviceNum,
  7034. userTelephone: JSON.parse(row.content).userTelephone,
  7035. operateMode: 9,
  7036. order: 6209,
  7037. userPassword: JSON.parse(row.content).userPassword,
  7038. password: JSON.parse(row.content).password,
  7039. is: false,
  7040. passwordStartTime: JSON.parse(row.content).passwordStartTime,
  7041. passwordEndTime: JSON.parse(row.content).passwordEndTime,
  7042. cardName: cardName,
  7043. roomName: res.data.list[0].roomName
  7044. };
  7045. }
  7046. if (JSON.parse(row.content).pass) {
  7047. str['pass'] = true;
  7048. } else {
  7049. str['pass'] = false;
  7050. }
  7051. Object(api["g" /* httpPost */])(str, that.$api.getDeviceOperateUserInfo).then(function (res1) {
  7052. if (res1.success) {
  7053. var content = JSON.parse(row.content);
  7054. content.operateMode = str.operateMode;
  7055. var updatedata = {
  7056. id: row.id,
  7057. status: 0,
  7058. content: stringify_default()(content)
  7059. // serial: res1.data.serialNumber,
  7060. };
  7061. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res) {});
  7062. that.$message.success("删除成功!");
  7063. }
  7064. });
  7065. }
  7066. } else {
  7067. // var data = {
  7068. // ids: [row.id],
  7069. // };
  7070. // httpPost(data, that.$api.deleteCertificates).then((
  7071. // res) => {
  7072. // if (res.success) {
  7073. // that.$message.success("删除成功!");
  7074. // that.getcertificate();
  7075. // }
  7076. // });
  7077. that.$message.error("未找到锁上对应凭证ID");
  7078. }
  7079. });
  7080. },
  7081. deletefun1: function deletefun1(index, row) {
  7082. var _this60 = this;
  7083. var that = this;
  7084. this.$confirm("此操作将删除凭证记录,请确认!", "提示", {
  7085. type: "warning"
  7086. }).then(function () {
  7087. var pzid = [];
  7088. pzid.push(row.id);
  7089. if (row.type == 11) {
  7090. var pzname = JSON.parse(row.content).pzname;
  7091. var data6 = {
  7092. pageNum: 1,
  7093. pageSize: 10,
  7094. orderBy: "create_at desc",
  7095. q: stringify_default()({
  7096. info: {
  7097. pzname: pzname
  7098. },
  7099. cardId: _this60.drawerRow.id,
  7100. inStatus: "0,1,702",
  7101. type: 1
  7102. })
  7103. };
  7104. Object(api["d" /* httpGet */])(data6, _this60.$api.getCertificates).then(function (res) {
  7105. var dataOne = util["a" /* default */].zlib_unzip(res.data);
  7106. if (dataOne.length > 0) {
  7107. _this60.$message.error("请先删除锁上凭证");
  7108. } else {
  7109. var data = {
  7110. ids: pzid
  7111. };
  7112. Object(api["g" /* httpPost */])(data, that.$api.deleteCertificates).then(function (res) {
  7113. if (res.success) {
  7114. that.$message.success("删除成功!");
  7115. that.getcertificate();
  7116. }
  7117. });
  7118. }
  7119. });
  7120. } else {
  7121. var password = JSON.parse(row.content).password;
  7122. var data6 = {
  7123. pageNum: 1,
  7124. pageSize: 10,
  7125. orderBy: "create_at desc",
  7126. q: stringify_default()({
  7127. info: {
  7128. password: password
  7129. },
  7130. cardId: _this60.drawerRow.id,
  7131. inStatus: "0,1,702",
  7132. types: "0,1,2,3,4"
  7133. })
  7134. };
  7135. Object(api["d" /* httpGet */])(data6, _this60.$api.getCertificates).then(function (res) {
  7136. var dataOne = util["a" /* default */].zlib_unzip(res.data);
  7137. if (dataOne.length > 0) {
  7138. _this60.$message.error("请先删除锁上凭证");
  7139. } else {
  7140. var data = {
  7141. ids: pzid
  7142. };
  7143. Object(api["g" /* httpPost */])(data, that.$api.deleteCertificates).then(function (res) {
  7144. if (res.success) {
  7145. that.$message.success("删除成功!");
  7146. that.getcertificate();
  7147. }
  7148. });
  7149. }
  7150. });
  7151. }
  7152. });
  7153. },
  7154. getArrDifference: function getArrDifference(arr1, arr2) {
  7155. return arr1.concat(arr2).filter(function (v, i, arr) {
  7156. return arr.indexOf(v) === arr.lastIndexOf(v);
  7157. });
  7158. },
  7159. bindsave2: function bindsave2() {
  7160. var SelectedList = [];
  7161. this.roomtable.map(function (li) {
  7162. SelectedList.push(li.roomId);
  7163. });
  7164. this.SelectedList = SelectedList;
  7165. this.addroomstatus = !this.addroomstatus;
  7166. },
  7167. putCarfid1: function putCarfid1(resultArr, row) {
  7168. var data = {};
  7169. var userTelephone = JSON.parse(row.content).userTelephone;
  7170. var userPassword = JSON.parse(row.content).userPassword;
  7171. var passwordEndTime = JSON.parse(row.content).passwordEndTime;
  7172. var passwordStartTime = JSON.parse(row.content).passwordStartTime;
  7173. if (row.type == 1) {
  7174. var fpId = new Date();
  7175. var fingerprint = JSON.parse(row.content).fingerprint;
  7176. var str = {
  7177. imei: resultArr.imei,
  7178. deviceNum: resultArr.deviceNum,
  7179. userTelephone: userTelephone,
  7180. userPassword: userPassword,
  7181. password: JSON.parse(row.content).password,
  7182. length: fingerprint.length / 2,
  7183. fpTimeId: fpId.getTime(),
  7184. operateMode: 16,
  7185. order: 6216,
  7186. fingerprint: fingerprint,
  7187. fingerprintStartTime: passwordStartTime,
  7188. fingerprintEndTime: passwordEndTime
  7189. };
  7190. Object(api["g" /* httpPost */])(str, this.$api.fingerprintTransfer).then(function (res1) {
  7191. var updatedata = {
  7192. id: row.id,
  7193. serial: res1.data.serialNumber
  7194. };
  7195. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res2) {});
  7196. });
  7197. return false;
  7198. } else if (row.type == 2) {
  7199. data = {
  7200. imei: resultArr.imei,
  7201. deviceNum: resultArr.deviceNum,
  7202. userTelephone: userTelephone,
  7203. cardId: row.cardId,
  7204. userPassword: userPassword,
  7205. password: JSON.parse(row.content).password,
  7206. operateMode: 13,
  7207. order: 6213,
  7208. passwordStartTime: passwordStartTime,
  7209. passwordEndTime: passwordEndTime,
  7210. is: false
  7211. };
  7212. } else if (row.type == 3) {
  7213. data = {
  7214. imei: resultArr.imei,
  7215. deviceNum: resultArr.deviceNum,
  7216. userTelephone: userTelephone,
  7217. cardId: row.cardId,
  7218. userPassword: userPassword,
  7219. password: JSON.parse(row.content).password,
  7220. operateMode: 10,
  7221. order: 6210,
  7222. passwordStartTime: passwordStartTime,
  7223. passwordEndTime: passwordEndTime,
  7224. is: false
  7225. };
  7226. } else if (row.type == 4) {
  7227. data = {
  7228. imei: resultArr.imei,
  7229. deviceNum: resultArr.deviceNum,
  7230. userTelephone: userTelephone,
  7231. cardId: row.cardId,
  7232. userPassword: userPassword,
  7233. password: JSON.parse(row.content).password,
  7234. operateMode: 7,
  7235. order: 6207,
  7236. passwordStartTime: passwordStartTime,
  7237. passwordEndTime: passwordEndTime,
  7238. is: false
  7239. };
  7240. }
  7241. Object(api["g" /* httpPost */])(data, this.$api.getDeviceOperateUserInfo).then(function (res1) {
  7242. if (res1.success) {
  7243. var updatedata = {
  7244. id: row.id,
  7245. serial: res1.data.serialNumber
  7246. };
  7247. Object(api["g" /* httpPost */])(updatedata, that.$api.updateCertificates).then(function (res2) {});
  7248. }
  7249. });
  7250. },
  7251. // 转换标准时间
  7252. getbztime: function getbztime(time) {
  7253. var d = new Date(time);
  7254. var mon = d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1;
  7255. var day = d.getDate() < 10 ? "0" + d.getDate() : d.getDate();
  7256. var hour = d.getDate() < 10 ? "0" + d.getDate() : d.getDate();
  7257. var min = d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes();
  7258. var secon = d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds();
  7259. var datetime = d.getFullYear() + "" + mon + "" + day + "" + hour + "" + min + "" + secon;
  7260. return datetime;
  7261. },
  7262. time: function time() {
  7263. var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date();
  7264. var date = new Date(time + 8 * 3600 * 1000); // 增加8小时
  7265. return date.toJSON().substr(0, 19).replace("T", " ");
  7266. },
  7267. Bytes2Str: function Bytes2Str(arrBytes) {
  7268. var str = "";
  7269. for (var i = 0; i < arrBytes.length; i++) {
  7270. var tmp;
  7271. var num = parseInt(arrBytes[i]);
  7272. if (num < 0) {
  7273. //此处填坑,当byte因为符合位导致数值为负时候,需要对数据进行处理
  7274. tmp = (255 + num + 1).toString(16);
  7275. } else {
  7276. tmp = num.toString(16);
  7277. }
  7278. if (tmp.length == 1) {
  7279. tmp = "0" + tmp;
  7280. }
  7281. if (i > 0) {
  7282. str += "" + tmp;
  7283. } else {
  7284. str += tmp;
  7285. }
  7286. }
  7287. return str;
  7288. },
  7289. // 选择绑定房间
  7290. onClick: function onClick(evt, treeId, treeNode) {
  7291. // 点击事件
  7292. this.treedata = treeNode;
  7293. this.getItems(treeNode.id);
  7294. this.getlist();
  7295. },
  7296. getItems: function getItems(id) {
  7297. var _this61 = this;
  7298. if (id) {
  7299. var t = {
  7300. roomIds: [id],
  7301. lockType: 1
  7302. };
  7303. var data = {
  7304. q: stringify_default()(t)
  7305. };
  7306. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  7307. if (res.data.list.length == 0) {
  7308. // this.$message.error("该房间还未绑定门锁");
  7309. // this.bindroomstatus = false;
  7310. } else {
  7311. _this61.deviceList = res.data.list;
  7312. }
  7313. });
  7314. } else {
  7315. this.bindroomstatus = false;
  7316. // this.$message({
  7317. // message: "该人员还未绑定房间",
  7318. // type: "error",
  7319. // customClass: "zZindex",
  7320. // });
  7321. }
  7322. },
  7323. // tabs标签页切换
  7324. handleClick: function handleClick(tab, event) {},
  7325. // 侧边栏添加绑定房间
  7326. bindroom: function bindroom() {
  7327. this.roomstatus = !this.roomstatus;
  7328. this.addroomstatus = true;
  7329. },
  7330. addroom: function addroom() {
  7331. var array = this.roomtable,
  7332. SelectedList = [];
  7333. array.map(function (li) {
  7334. SelectedList.push(li.roomId);
  7335. });
  7336. console.log(SelectedList);
  7337. this.SelectedList = SelectedList;
  7338. this.roomstatus = !this.roomstatus;
  7339. this.addroomstatus = false;
  7340. },
  7341. bindroom1: function bindroom1() {
  7342. this.roomstatus1 = !this.roomstatus1;
  7343. var nfc = '';
  7344. var arr2 = Object(utils["d" /* dec2hex */])(this.drawerRow.cardId);
  7345. var arr4 = Object(utils["h" /* group */])(arr2, 2).reverse();
  7346. arr4.map(function (li) {
  7347. nfc += li;
  7348. });
  7349. if (nfc.length != 8) {
  7350. this.voucher.nfc = "";
  7351. } else {
  7352. this.voucher.nfc = nfc.toUpperCase();
  7353. }
  7354. },
  7355. // 关闭侧边栏
  7356. handleClose: function handleClose() {
  7357. this.drawer = false;
  7358. this.drawerVisible = false;
  7359. this.personname = '';
  7360. },
  7361. screenRoom1: function screenRoom1(id, callback) {
  7362. var _this62 = this;
  7363. // httpGet("", this.$api.onlyTenant).then((res) => {
  7364. // var roomAbout = res.data.list;
  7365. // var roomtable = [];
  7366. // roomAbout.map((li) => {
  7367. // if (li.cardId == id) {
  7368. // roomtable.push(li);
  7369. // }
  7370. // });
  7371. // callback(roomtable)
  7372. // });
  7373. var roomAbout = this.$store.state.roomAbout;
  7374. var roomtable = [];
  7375. roomAbout.map(function (li) {
  7376. var name = util["a" /* default */].findIndexArray(_this62.$store.state.zNodes, li.roomId, []);
  7377. var path = '';
  7378. if (name) {
  7379. path = name.join('/');
  7380. }
  7381. li.roomName = path;
  7382. if (li.cardId == id) {
  7383. roomtable.push(li);
  7384. }
  7385. });
  7386. console.log(roomtable);
  7387. callback(roomtable);
  7388. },
  7389. returnScreenRoom: function returnScreenRoom(id) {
  7390. var _this63 = this;
  7391. var roomAbout = this.$store.state.roomAbout;
  7392. var SelectedList = [],
  7393. roomtable = [];
  7394. roomAbout.map(function (li) {
  7395. var name = util["a" /* default */].findIndexArray(_this63.$store.state.zNodes, li.roomId, []);
  7396. var path = '';
  7397. if (name) {
  7398. path = name.join('/');
  7399. }
  7400. li.roomName = path;
  7401. if (li.cardId == id) {
  7402. if (li.layout) {
  7403. SelectedList.push(li.roomId);
  7404. }
  7405. var result = _this63.checkInListing.filter(function (item) {
  7406. return item.siteId == li.roomId;
  7407. })[0];
  7408. var deviceResult = _this63.allAboutDevice.filter(function (it) {
  7409. return it.roomId == li.roomId;
  7410. })[0];
  7411. if (result) {
  7412. li['endTime'] = moment_default()(result.endTime).format("YYYY-MM-DD HH:mm:ss") || '';
  7413. li['startTime'] = moment_default()(result.startTime).format("YYYY-MM-DD HH:mm:ss") || '';
  7414. li['name'] = result.name;
  7415. li.card = li.cardId;
  7416. }
  7417. if (deviceResult) {
  7418. li['deviceNum'] = deviceResult.deviceNum;
  7419. li['imei'] = deviceResult.imei;
  7420. li['manufactureId'] = deviceResult.manufactureId;
  7421. }
  7422. roomtable.push(li);
  7423. }
  7424. });
  7425. return roomtable;
  7426. // this.roomtable=roomtable
  7427. },
  7428. getAboutDevice1: function getAboutDevice1() {
  7429. var _this64 = this;
  7430. var data = {
  7431. pageNum: 0,
  7432. pageSize: 0,
  7433. q: stringify_default()({
  7434. lockType: 1
  7435. })
  7436. };
  7437. Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
  7438. _this64.allAboutDevice = res.data.list;
  7439. });
  7440. },
  7441. oninput: function oninput(e) {
  7442. var str = Number(e).toString(2);
  7443. var str1 = Number(str);
  7444. var str3 = Number(str1).toString(16);
  7445. },
  7446. downloadItem: function downloadItem(url) {
  7447. axios_default.a.get(url, {
  7448. responseType: "blob"
  7449. }).then(function (_ref2) {
  7450. var data = _ref2.data;
  7451. var blob = new Blob([data], {
  7452. type: "application/vnd.ms-excel"
  7453. });
  7454. var link = document.createElement("a");
  7455. link.href = window.URL.createObjectURL(blob);
  7456. link.download = url.split("/").pop();
  7457. // for IE
  7458. if (navigator.msSaveBlob) {
  7459. navigator.msSaveBlob(blob, "SPU_templateV1.1.xlsx");
  7460. }
  7461. link.click().catch(function (error) {
  7462. console.error(error);
  7463. });
  7464. });
  7465. },
  7466. getallstatus: function getallstatus(para) {
  7467. var _this65 = this;
  7468. var data3 = {
  7469. code: "operateUserInfo/status",
  7470. data: {
  7471. para: para
  7472. }
  7473. };
  7474. var userlistquery = this.userlistquery;
  7475. Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res4) {
  7476. _this65.userlistquery1 = res4.data;
  7477. });
  7478. },
  7479. activeiconfun: function activeiconfun(t) {
  7480. this.activeiconfont = t;
  7481. },
  7482. handleSizeChange: function handleSizeChange(val) {
  7483. // console.log(`每页 ${val} 条`);
  7484. this.getlistNum(0, val);
  7485. },
  7486. handleCurrentChange: function handleCurrentChange(val) {
  7487. // console.log(`当前页: ${val}`);
  7488. this.getlistNum(val, 10);
  7489. this.$store.commit("increment", val);
  7490. },
  7491. // 分页
  7492. handleSizeChange2: function handleSizeChange2(val) {
  7493. this.pageSize2 = val;
  7494. this.getlistNum2(0, val);
  7495. },
  7496. handleCurrentChange2: function handleCurrentChange2(val) {
  7497. this.currentPage2 = val;
  7498. // console.log(`当前页: ${val}`);
  7499. this.getlistNum2(val, 10);
  7500. },
  7501. getlistNum2: function getlistNum2(val, size) {
  7502. var _this66 = this;
  7503. var data = {
  7504. pageNum: this.currentPage2,
  7505. pageSize: this.pageSize2,
  7506. orderBy: "create_at desc",
  7507. q: {
  7508. cardId: this.drawerRow.id
  7509. }
  7510. };
  7511. Object(api["d" /* httpGet */])(data, this.$api.getCertificates).then(function (res) {
  7512. var certiflist = util["a" /* default */].zlib_unzip(res.data);
  7513. var AboutDevice = _this66.allAboutDevice;
  7514. certiflist.map(function (li) {
  7515. li.createAt = _this66.time(+new Date(li.createAt));
  7516. li.userTelephone = JSON.parse(li.content).userTelephone;
  7517. li.pzname = JSON.parse(li.content).pzname;
  7518. li['statusText'] = util["a" /* default */].statusCode(li.status);
  7519. li['startTimeText'] = util["a" /* default */].formatTime(li.startTime);
  7520. li['endTimeText'] = util["a" /* default */].formatTime(li.endTime);
  7521. var resultArr = AboutDevice.filter(function (_item) {
  7522. return _item.imei == li.imei;
  7523. })[0];
  7524. if (resultArr) {
  7525. li.roomId = resultArr.id;
  7526. li.roomName = resultArr.roomName;
  7527. } else {
  7528. li.roomId = "";
  7529. li.roomName = "";
  7530. }
  7531. });
  7532. _this66.roomtable2 = certiflist;
  7533. _this66.total2 = res.data.total;
  7534. });
  7535. },
  7536. getlistNum: function getlistNum(val, size) {
  7537. var _this67 = this;
  7538. var q = {
  7539. // type: 0,
  7540. name: this.query.name
  7541. };
  7542. var data = {
  7543. pageNum: val,
  7544. pageSize: size,
  7545. orderBy: "create_time desc",
  7546. q: stringify_default()(q)
  7547. };
  7548. var roomAbout = this.$store.state.roomAbout;
  7549. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res1) {
  7550. if (res1.success) {
  7551. var para = [];
  7552. res1.data.list.map(function (li, index) {
  7553. var userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : '';
  7554. var str = {
  7555. imei: li.imei,
  7556. userTelephone: userTelephone,
  7557. password: "",
  7558. operateMode: 1
  7559. };
  7560. para.push(str);
  7561. li.status = 3;
  7562. li['rommNameText'] = _this67.screenRoomName(li.id);
  7563. });
  7564. // this.getallstatus(para);
  7565. _this67.userlist = res1.data.list;
  7566. _this67.total = res1.data.total;
  7567. _this67.currentPage4 = val;
  7568. _this67.pageSize = size;
  7569. } else {
  7570. _this67.$message.error(res1.message);
  7571. }
  7572. });
  7573. },
  7574. handleChange: function handleChange(value) {
  7575. console.log(value);
  7576. },
  7577. //批量上传
  7578. batchUpload: function batchUpload() {
  7579. this.uploadkj = true;
  7580. },
  7581. batchUploadpl: function batchUploadpl() {
  7582. var data = [];
  7583. this.userlist.map(function (li) {
  7584. data.push(li.id);
  7585. });
  7586. console.log(data);
  7587. var ids = {
  7588. ids: data
  7589. };
  7590. Object(api["g" /* httpPost */])(ids, this.$api.createkeyCard).then(function (res) {});
  7591. },
  7592. checkSameData: function checkSameData(arr, str) {
  7593. var _arr = [],
  7594. _t = [],
  7595. // 临时的变量
  7596. _tmp;
  7597. // 按照特定的参数将数组排序将具有相同值得排在一起
  7598. arr = arr.sort(function (a, b) {
  7599. var s = a[str],
  7600. t = b[str];
  7601. return s < t ? -1 : 1;
  7602. });
  7603. if (arr.length) {
  7604. _tmp = arr[0][str];
  7605. }
  7606. // console.log( arr );
  7607. // 将相同类别的对象添加到统一个数组
  7608. for (var i in arr) {
  7609. if (arr[i][str] === _tmp) {
  7610. _t.push(arr[i]);
  7611. } else {
  7612. _tmp = arr[i][str];
  7613. _arr.push(_t);
  7614. _t = [arr[i]];
  7615. }
  7616. }
  7617. // 将最后的内容推出新数组
  7618. _arr.push(_t);
  7619. return _arr;
  7620. },
  7621. //批量上传确认
  7622. batchUploadfun: function batchUploadfun() {
  7623. var _this68 = this;
  7624. var that = this;
  7625. var array = this.checkSameData(this.userlist1, "phone");
  7626. var arrlist = [];
  7627. this.batchCredentialList = [];
  7628. array.map(function (li) {
  7629. arrlist.push(li[0]);
  7630. });
  7631. if (this.value3) {
  7632. var data = {
  7633. list: arrlist
  7634. };
  7635. Object(api["g" /* httpPost */])(data, this.$api.infoImport).then(function (res) {
  7636. if (res.success) {
  7637. arrlist.map(function (li, index) {
  7638. _this68.getperson(li, function (data) {
  7639. li.id = data.id;
  7640. array[index].map(function (lt) {
  7641. lt['personId'] = data.id;
  7642. });
  7643. var screeningList = allFun["a" /* default */].deWeight(array[index], 'type', 'modeContent');
  7644. var passwordSum = 0,
  7645. nfcSum = 0;
  7646. screeningList.map(function (li) {
  7647. var operateMode = '',
  7648. order = '',
  7649. pzname = '',
  7650. type = '';
  7651. if (li.mode == 4) {
  7652. operateMode = 7;
  7653. order = 6207;
  7654. type = 14;
  7655. var num = allFun["a" /* default */].getCertificatesNum(data.id, 14, 1, '') || 0;
  7656. pzname = '密码' + (num + passwordSum);
  7657. passwordSum++;
  7658. } else if (li.mode == 3) {
  7659. operateMode = 10;
  7660. order = 6210;
  7661. type = 13;
  7662. var num = allFun["a" /* default */].getCertificatesNum(data.id, 13, 1, '') || 0;
  7663. pzname = 'NFC' + (num + nfcSum);
  7664. nfcSum++;
  7665. }
  7666. var str = {
  7667. userTelephone: JSON.parse(li.info).userTelephone,
  7668. userPassword: JSON.parse(li.info).userPassword,
  7669. password: li.modeContent,
  7670. operateMode: operateMode,
  7671. order: order,
  7672. passwordStartTime: moment_default()(that.value3[0].getTime()).format('YYYYMMDDHHmmss'),
  7673. passwordEndTime: moment_default()(that.value3[1].getTime()).format('YYYYMMDDHHmmss'),
  7674. cardName: data.name,
  7675. pzname: pzname,
  7676. pass: false
  7677. };
  7678. var datafidOne = {
  7679. cardId: data.id,
  7680. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  7681. type: type,
  7682. startTime: that.value3[0].getTime() / 1000,
  7683. endTime: that.value3[1].getTime() / 1000
  7684. };
  7685. that.batchCredentialList.push(datafidOne);
  7686. Object(api["g" /* httpPost */])(datafidOne, that.$api.addCertificates).then(function (res) {
  7687. if (res.success) {
  7688. that.$message.success("添加成功");
  7689. } else {
  7690. that.$message.error("添加失败");
  7691. }
  7692. });
  7693. });
  7694. setTimeout(function () {
  7695. that.bindsaveFun(array[index]);
  7696. }, 500);
  7697. });
  7698. });
  7699. _this68.getlist();
  7700. _this68.uploadkj = false;
  7701. } else {
  7702. _this68.$message.error('导入失败');
  7703. }
  7704. });
  7705. } else {
  7706. this.$message.error("请选择开始结束时间");
  7707. }
  7708. },
  7709. //查询人员
  7710. getperson: function getperson(li, callback) {
  7711. var data = {
  7712. orderBy: "create_time desc",
  7713. q: stringify_default()({
  7714. cardId: li.cardId
  7715. })
  7716. };
  7717. var roomAbout = this.$store.state.roomAbout;
  7718. Object(api["g" /* httpPost */])(data, this.$api.getlistNum).then(function (res) {
  7719. callback(res.data.list[0]);
  7720. });
  7721. },
  7722. // 绑定房间
  7723. bindsaveFun: function bindsaveFun(list) {
  7724. var _this69 = this;
  7725. var array = this.checkSameData(list, "siteId");
  7726. array.map(function (drawerRow, index) {
  7727. _this69.sendUserlock(drawerRow[0]);
  7728. setTimeout(_this69.sendUservoucher(drawerRow), 1000);
  7729. });
  7730. },
  7731. getCertificatesName: function getCertificatesName(id, type, content, callback) {
  7732. this.batchCredentialList.map(function (li) {
  7733. var info = JSON.parse(li.content);
  7734. if (li.cardId == id && li.type == type && info.password == content) {
  7735. var pzname = info.pzname;
  7736. callback(pzname);
  7737. }
  7738. });
  7739. },
  7740. sendUservoucher: function sendUservoucher(voucherlist) {
  7741. var _this70 = this;
  7742. voucherlist.map(function (drawerRow) {
  7743. setTimeout(function () {
  7744. var credentialName = '';
  7745. if (drawerRow.mode == 2) {
  7746. _this70.getCertificatesName(drawerRow.personId, 12, drawerRow.modeContent, function (callback) {
  7747. credentialName = callback;
  7748. console.log(credentialName);
  7749. _this70.sendVoucherMethods(drawerRow, credentialName);
  7750. });
  7751. } else if (drawerRow.mode == 3) {
  7752. _this70.getCertificatesName(drawerRow.personId, 13, drawerRow.modeContent, function (callback) {
  7753. credentialName = callback;
  7754. console.log(credentialName);
  7755. _this70.sendVoucherMethods(drawerRow, credentialName);
  7756. });
  7757. } else if (drawerRow.mode == 4) {
  7758. _this70.getCertificatesName(drawerRow.personId, 14, drawerRow.modeContent, function (callback) {
  7759. credentialName = callback;
  7760. _this70.sendVoucherMethods(drawerRow, credentialName);
  7761. });
  7762. }
  7763. }, 1000);
  7764. });
  7765. },
  7766. sendVoucherMethods: function sendVoucherMethods(drawerRow, credentialName) {
  7767. var _this71 = this;
  7768. var info = JSON.parse(drawerRow.info);
  7769. var data = [{
  7770. cardId: drawerRow.personId,
  7771. siteId: drawerRow.siteId,
  7772. startTime: this.value3[0],
  7773. endTime: this.value3[1]
  7774. }];
  7775. var setid = {
  7776. pageNum: 1,
  7777. pageSize: 10,
  7778. q: stringify_default()({
  7779. roomIds: [drawerRow.siteId],
  7780. lockType: 1
  7781. })
  7782. };
  7783. Object(api["g" /* httpPost */])(setid, this.$api.getDeviceItems).then(function (res) {
  7784. var timeMantissa = moment_default()().format('xx');
  7785. var mantissa = timeMantissa.substr(timeMantissa.length - 4, timeMantissa.length - 1);
  7786. if (res.data.list.length > 0) {
  7787. var IMEI = res.data.list[0].imei;
  7788. var DeviceNumRow = res.data.list[0];
  7789. if (DeviceNumRow.manufactureId == 201 || DeviceNumRow.manufactureId == 221) {
  7790. var startTime = _this71.value3[0].getTime() / 1000;
  7791. var endTime = _this71.value3[1].getTime() / 1000;
  7792. if (drawerRow.mode == 4) {
  7793. var pwd = drawerRow.modeContent;
  7794. var userid = info.userPassword;
  7795. var str = {
  7796. username: drawerRow.name,
  7797. pzname: credentialName,
  7798. imei: IMEI,
  7799. userTelephone: info.userTelephone,
  7800. userPassword: info.userPassword,
  7801. operateMode: 7,
  7802. order: 6207,
  7803. password: stringify_default()(pwd),
  7804. passwordStartTime: startTime,
  7805. passwordEndTime: endTime,
  7806. is: false
  7807. };
  7808. if (stringify_default()(pwd).length != 6) {
  7809. _this71.$message.error("密码格式错误");
  7810. return;
  7811. }
  7812. var cardName = drawerRow.name + '-' + credentialName;
  7813. equipment["a" /* default */].addForeverPassword(DeviceNumRow.deviceNum, IMEI, userid, 1, pwd, 255, startTime, endTime, 6207, cardName, DeviceNumRow.roomName, function (callback1) {
  7814. if (callback1.success) {
  7815. var data = {
  7816. deviceNum: DeviceNumRow.deviceNum,
  7817. imei: IMEI,
  7818. cardId: drawerRow.personId,
  7819. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  7820. type: drawerRow.mode,
  7821. serial: callback1.data.serialNumber,
  7822. startTime: _this71.value3[0].getTime() / 1000,
  7823. endTime: _this71.value3[1].getTime() / 1000
  7824. };
  7825. Object(api["g" /* httpPost */])(data, _this71.$api.addCertificates).then(function (res) {});
  7826. _this71.$message.success("下发成功");
  7827. } else {
  7828. _this71.$message.error(callback1.msg);
  7829. }
  7830. });
  7831. } else if (drawerRow.mode == 3) {
  7832. var userid = info.userPassword;
  7833. var cardNo = util["a" /* default */].cardFormatConversion(drawerRow.modeContent.toUpperCase());
  7834. if (cardNo.length == 8) {
  7835. cardNo = cardNo + '00000000';
  7836. } else if (cardNo.length != 16) {
  7837. cardNo = cardNo.padEnd(16, '0');
  7838. }
  7839. var str = {
  7840. username: drawerRow.name,
  7841. pzname: credentialName,
  7842. imei: IMEI,
  7843. userTelephone: info.userTelephone,
  7844. userPassword: info.userPassword,
  7845. operateMode: 10,
  7846. order: 6210,
  7847. password: cardNo,
  7848. passwordStartTime: startTime,
  7849. passwordEndTime: endTime,
  7850. is: false
  7851. };
  7852. if (cardNo.length != 8) {
  7853. _this71.$message.error("NFC格式错误");
  7854. return;
  7855. }
  7856. var cardName = drawerRow.name + '-' + credentialName;
  7857. equipment["a" /* default */].RfCardRegister(DeviceNumRow.deviceNum, IMEI, userid, 1, 1, cardNo, 50, startTime, endTime, 6210, cardName, DeviceNumRow.roomName, function (callback1) {
  7858. if (callback1.success) {
  7859. var data = {
  7860. deviceNum: DeviceNumRow.deviceNum,
  7861. imei: IMEI,
  7862. cardId: drawerRow.personId,
  7863. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  7864. type: drawerRow.mode,
  7865. serial: callback1.data.serialNumber,
  7866. startTime: _this71.value3[0].getTime() / 1000,
  7867. endTime: _this71.value3[1].getTime() / 1000
  7868. };
  7869. Object(api["g" /* httpPost */])(data, _this71.$api.addCertificates).then(function (res) {});
  7870. _this71.$message.success("下发成功");
  7871. } else {
  7872. _this71.$message.error(callback1.msg);
  7873. }
  7874. });
  7875. } else if (drawerRow.mode == 2) {
  7876. var userid = info.userPassword;
  7877. var cardNo = Object(utils["k" /* reverse */])(drawerRow.modeContent).toUpperCase();
  7878. var str = {
  7879. username: drawerRow.name,
  7880. pzname: credentialName,
  7881. imei: DeviceNumRow.imei,
  7882. userTelephone: info.userTelephone,
  7883. userPassword: info.userPassword,
  7884. operateMode: 13,
  7885. order: 6213,
  7886. password: cardNo,
  7887. passwordStartTime: startTime,
  7888. passwordEndTime: endTime,
  7889. is: false
  7890. };
  7891. if (cardNo.length != 16) {
  7892. _this71.$message.error("身份证格式错误");
  7893. return;
  7894. }
  7895. var cardName = drawerRow.name + '-' + credentialName;
  7896. equipment["a" /* default */].RfCardRegister(DeviceNumRow.deviceNum, IMEI, userid, 1, 1, cardNo, 36, startTime, endTime, 6213, cardName, DeviceNumRow.roomName, function (callback1) {
  7897. if (callback1.success) {
  7898. var data = {
  7899. deviceNum: DeviceNumRow.deviceNum,
  7900. imei: IMEI,
  7901. cardId: drawerRow.personId,
  7902. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  7903. type: drawerRow.mode,
  7904. serial: callback1.data.serialNumber,
  7905. startTime: _this71.value3[0].getTime() / 1000,
  7906. endTime: _this71.value3[1].getTime() / 1000
  7907. };
  7908. Object(api["g" /* httpPost */])(data, _this71.$api.addCertificates).then(function (res) {});
  7909. _this71.$message.success("下发成功");
  7910. } else {
  7911. _this71.$message.error(callback1.msg);
  7912. }
  7913. });
  7914. } else {
  7915. _this71.$message.error("批量不支持指纹");
  7916. }
  7917. } else if (DeviceNumRow.manufactureId == 101) {
  7918. var passwordStartTime = moment_default()(_this71.value3[0].getTime()).format('YYYYMMDDHHmmss');
  7919. var passwordEndTime = moment_default()(_this71.value3[1].getTime()).format('YYYYMMDDHHmmss');
  7920. var str = {};
  7921. if (drawerRow.mode == 2) {
  7922. var arr2 = drawerRow.modeContent;
  7923. str = {
  7924. username: drawerRow.name,
  7925. imei: IMEI,
  7926. pzname: credentialName,
  7927. userTelephone: info.userTelephone,
  7928. userPassword: info.userPassword,
  7929. operateMode: 13,
  7930. order: 6213,
  7931. password: arr2.toUpperCase(),
  7932. passwordStartTime: moment_default()(_this71.value3[0].getTime()).format('YYYYMMDDHHmmss'),
  7933. passwordEndTime: moment_default()(_this71.value3[1].getTime()).format('YYYYMMDDHHmmss'),
  7934. is: false
  7935. };
  7936. if (arr2.length != 16) {
  7937. _this71.$message.error("身份证格式错误");
  7938. return false;
  7939. }
  7940. } else if (drawerRow.mode == 3) {
  7941. var array3 = drawerRow.modeContent;
  7942. str = {
  7943. username: drawerRow.name,
  7944. imei: IMEI,
  7945. pzname: credentialName,
  7946. operateMode: 10,
  7947. order: 6210,
  7948. userTelephone: info.userTelephone,
  7949. userPassword: info.userPassword,
  7950. password: array3.toUpperCase(),
  7951. passwordStartTime: moment_default()(_this71.value3[0].getTime()).format('YYYYMMDDHHmmss'),
  7952. passwordEndTime: moment_default()(_this71.value3[1].getTime()).format('YYYYMMDDHHmmss'),
  7953. is: false
  7954. };
  7955. if (array3.length != 8) {
  7956. _this71.$message.error("NFC格式错误");
  7957. return false;
  7958. }
  7959. } else if (drawerRow.mode == 4) {
  7960. var password = stringify_default()(drawerRow.modeContent);
  7961. str = {
  7962. username: drawerRow.name,
  7963. imei: IMEI,
  7964. password: password,
  7965. pzname: credentialName,
  7966. userTelephone: info.userTelephone,
  7967. userPassword: info.userPassword,
  7968. operateMode: 7,
  7969. order: 6207,
  7970. passwordStartTime: moment_default()(_this71.value3[0].getTime()).format('YYYYMMDDHHmmss'),
  7971. passwordEndTime: moment_default()(_this71.value3[1].getTime()).format('YYYYMMDDHHmmss'),
  7972. is: false
  7973. };
  7974. if (password.length != 6) {
  7975. _this71.$message.error("密码格式错误");
  7976. return false;
  7977. }
  7978. }
  7979. str['cardName'] = drawerRow.name + '-' + str.pzname, str['roomName'] = DeviceNumRow.roomName, Object(api["g" /* httpPost */])(str, _this71.$api.getDeviceOperateUserInfo).then(function (res1) {
  7980. if (res1.success) {
  7981. var data = {
  7982. deviceNum: DeviceNumRow.deviceNum,
  7983. imei: IMEI,
  7984. cardId: drawerRow.personId,
  7985. content: stringify_default()(str), //operateMode:NFC-10、把人员添加到凭证-1
  7986. type: drawerRow.mode,
  7987. serial: res1.data.serialNumber,
  7988. startTime: _this71.value3[0].getTime() / 1000,
  7989. endTime: _this71.value3[1].getTime() / 1000
  7990. };
  7991. Object(api["g" /* httpPost */])(data, _this71.$api.addCertificates).then(function (res) {});
  7992. } else {
  7993. _this71.$message.error(res1.msg);
  7994. }
  7995. });
  7996. }
  7997. } else {
  7998. _this71.$message.error(drawerRow.siteName + "该房间未找到对应门锁");
  7999. }
  8000. });
  8001. },
  8002. sendUserlock: function sendUserlock(drawerRow) {
  8003. var _this72 = this;
  8004. var info = JSON.parse(drawerRow.info);
  8005. var data = [{
  8006. cardId: drawerRow.personId,
  8007. siteId: drawerRow.siteId,
  8008. startTime: this.value3[0],
  8009. endTime: this.value3[1]
  8010. }];
  8011. var setid = {
  8012. pageNum: 1,
  8013. pageSize: 10,
  8014. q: stringify_default()({
  8015. roomIds: [drawerRow.siteId],
  8016. lockType: 1
  8017. })
  8018. };
  8019. Object(api["g" /* httpPost */])(setid, this.$api.getDeviceItems).then(function (res) {
  8020. if (res.data.list.length > 0) {
  8021. var timeMantissa = moment_default()().format('xx');
  8022. var mantissa = timeMantissa.substr(timeMantissa.length - 4, timeMantissa.length - 1);
  8023. var IMEI = res.data.list[0].imei;
  8024. var DeviceNumRow = res.data.list[0];
  8025. if (DeviceNumRow.manufactureId == 201 || DeviceNumRow.manufactureId == 221) {
  8026. equipment["a" /* default */].addUserToLock(DeviceNumRow.deviceNum, IMEI, info.userPassword, 0, 1, 6226, drawerRow.name, DeviceNumRow.roomName, function (callback) {
  8027. if (callback.success) {
  8028. var userstr = {
  8029. lockerId: DeviceNumRow.deviceNum,
  8030. imei: IMEI,
  8031. lockerUserId: info.userPassword,
  8032. keyId: info.userPassword,
  8033. role: 0,
  8034. action: 1,
  8035. order: 6226,
  8036. cardName: drawerRow.name,
  8037. roomName: DeviceNumRow.roomName
  8038. };
  8039. var locakUserdata = {
  8040. deviceNum: DeviceNumRow.deviceNum,
  8041. imei: IMEI,
  8042. cardId: drawerRow.personId,
  8043. content: stringify_default()(userstr), //operateMode:NFC-10、把人员添加到凭证-1
  8044. type: 26,
  8045. serial: callback.data.serialNumber,
  8046. startTime: _this72.value3[0].getTime() / 1000,
  8047. endTime: _this72.value3[1].getTime() / 1000
  8048. };
  8049. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  8050. Object(api["g" /* httpPost */])(data, _this72.$api.bindCard).then(function (res1) {
  8051. if (res1.success) {
  8052. _this72.$message.success("绑定成功");
  8053. _this72.getAboutRoom();
  8054. } else {
  8055. _this72.$message.error(res2.message);
  8056. }
  8057. });
  8058. } else {
  8059. _this72.$message.error(callback.msg);
  8060. }
  8061. });
  8062. } else if (DeviceNumRow.manufactureId == 101) {
  8063. var passwordStartTime = moment_default()(_this72.value3[0].getTime()).format('YYYYMMDDHHmmss');
  8064. var passwordEndTime = moment_default()(_this72.value3[1].getTime()).format('YYYYMMDDHHmmss');
  8065. var str1 = {
  8066. imei: IMEI,
  8067. deviceNum: DeviceNumRow.deviceNum,
  8068. userTelephone: info.userTelephone,
  8069. // cardId:this.personInfo.cardId,
  8070. userPassword: info.userPassword,
  8071. password: info.userPassword,
  8072. operateMode: 26,
  8073. order: 6226,
  8074. passwordStartTime: passwordStartTime,
  8075. passwordEndTime: passwordEndTime,
  8076. is: false,
  8077. cardName: drawerRow.name,
  8078. roomName: DeviceNumRow.roomName
  8079. };
  8080. Object(api["g" /* httpPost */])(str1, _this72.$api.getDeviceOperateUserInfo).then(function (res2) {
  8081. if (res2.success) {
  8082. var userstr = {
  8083. lockerId: DeviceNumRow.deviceNum,
  8084. imei: IMEI,
  8085. lockerUserId: info.userPassword,
  8086. keyId: info.userPassword,
  8087. role: 0,
  8088. action: 1,
  8089. order: 6226,
  8090. cardName: drawerRow.name,
  8091. roomName: DeviceNumRow.roomName
  8092. };
  8093. var locakUserdata = {
  8094. deviceNum: DeviceNumRow.deviceNum,
  8095. imei: IMEI,
  8096. cardId: drawerRow.personId,
  8097. content: stringify_default()(userstr), //operateMode:NFC-10、把人员添加到凭证-1
  8098. type: 26,
  8099. serial: res2.data.serialNumber,
  8100. startTime: _this72.value3[0].getTime() / 1000,
  8101. endTime: _this72.value3[1].getTime() / 1000
  8102. };
  8103. util["a" /* default */].sendLockUser(locakUserdata, function (callbackLOCK) {});
  8104. Object(api["g" /* httpPost */])(data, _this72.$api.bindCard).then(function (res1) {
  8105. if (res1.success) {
  8106. _this72.$message.success("绑定成功");
  8107. _this72.getAboutRoom();
  8108. } else {
  8109. _this72.$message.error(res2.message);
  8110. }
  8111. });
  8112. } else {
  8113. _this72.$message.error(res2.message);
  8114. }
  8115. });
  8116. }
  8117. } else {
  8118. _this72.$message.error(drawerRow.siteName + "该房间未找到对应门锁");
  8119. }
  8120. });
  8121. },
  8122. // 多选操作
  8123. handleSelectionChange: function handleSelectionChange(val) {
  8124. this.multipleSelection = val;
  8125. },
  8126. // 新增房源,选择凭证
  8127. handleSelectionChange2: function handleSelectionChange2(val) {
  8128. this.multipleSelection2 = val;
  8129. },
  8130. handleSelectionChange3: function handleSelectionChange3(val) {
  8131. this.multipleSelection3 = val;
  8132. },
  8133. handleSelectionChange4: function handleSelectionChange4(val) {
  8134. this.multipleSelection4 = val;
  8135. },
  8136. handleSelectionChange1: function handleSelectionChange1(val) {
  8137. this.multipleSelection1 = val;
  8138. },
  8139. delAllSelection: function delAllSelection() {
  8140. var length = this.multipleSelection.length;
  8141. var str = "";
  8142. this.delList = this.delList.concat(this.multipleSelection);
  8143. for (var _i = 0; _i < length; _i++) {
  8144. str += this.multipleSelection[_i].name + " ";
  8145. }
  8146. this.$message.error("\u5220\u9664\u4E86" + str);
  8147. this.multipleSelection = [];
  8148. },
  8149. // 编辑操作
  8150. handleEdit: function handleEdit(index, row) {
  8151. var _this73 = this;
  8152. this.modify = false;
  8153. this.idx = index;
  8154. this.form = row;
  8155. this.editVisiblelist = true;
  8156. var data = [{
  8157. itemId: row.id
  8158. }];
  8159. Object(api["g" /* httpPost */])(data, this.$api.getPersonBindEnterprise).then(function (res) {
  8160. if (res.code == 200) {
  8161. var list = [];
  8162. res.data.map(function (li) {
  8163. list.push(li.enterpriseId);
  8164. });
  8165. _this73.defaultEnterpriseId = list;
  8166. _this73.defaultEnterpriseIdBack = res.data;
  8167. }
  8168. });
  8169. },
  8170. // 子组件触发修改
  8171. handleEdit1: function handleEdit1(row) {
  8172. this.modify = false;
  8173. this.form = row;
  8174. this.editVisiblelist = true;
  8175. },
  8176. // 重置from
  8177. resetFrom: function resetFrom() {
  8178. this.form = {
  8179. sex: 1,
  8180. number: "",
  8181. name: "",
  8182. phone: "",
  8183. cardId: "",
  8184. cardState: 1
  8185. };
  8186. },
  8187. modifyEdit: function modifyEdit() {
  8188. var _this74 = this;
  8189. var data = {
  8190. id: this.form.id,
  8191. cardId: this.form.cardId,
  8192. cardState: this.form.cardState,
  8193. name: this.form.name,
  8194. number: this.form.number,
  8195. phone: this.form.phone,
  8196. sex: parseInt(this.form.sex),
  8197. enterpriseId: this.form.enterpriseId,
  8198. type: this.form.type
  8199. };
  8200. if (this.form.key) {
  8201. var rowInfo = JSON.parse(this.form.info);
  8202. var rqTime = moment_default()().format("X");
  8203. rowInfo.loginKey = Object(api["j" /* setCode */])("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXKHkNKieiGOTjXZJ0lFBjhRCa\nZTaAebTIfB9nnnVmNVIp//yCfyFXSlxbAj58CQwCVhwy109ROYf3BcsQNMZz7Djo\n8a5V0JThNye4ihxLiYLawLRjb2y2/IhzV0/JZiFtaM83xUt0tbqTKxD00Up7dy8c\n9OXc0h//0uQSraf6JwIDAQAB", this.form.key);
  8204. data.info = stringify_default()(rowInfo);
  8205. }
  8206. Object(api["g" /* httpPost */])(data, this.$api.updateCard).then(function (res) {
  8207. if (_this74.defaultEnterpriseIdBack.length > 0) {
  8208. var arr = [];
  8209. _this74.defaultEnterpriseIdBack.map(function (li) {
  8210. var obj = {
  8211. itemId: li.cardId,
  8212. orderId: li.enterpriseId
  8213. };
  8214. arr.push(obj);
  8215. });
  8216. Object(api["g" /* httpPost */])(arr, _this74.$api.personUnBindEnterprise).then(function (res) {
  8217. if (res.code == 200) {
  8218. var dataprise = [];
  8219. _this74.checkEnterpriseNode.map(function (li) {
  8220. var obj = {
  8221. itemId: _this74.form.id,
  8222. orderId: li.value
  8223. };
  8224. dataprise.push(obj);
  8225. });
  8226. Object(api["g" /* httpPost */])(dataprise, _this74.$api.personBindEnterprise).then(function (res) {});
  8227. }
  8228. });
  8229. } else {
  8230. if (_this74.checkEnterpriseNode.length > 0) {
  8231. var dataprise = [];
  8232. _this74.checkEnterpriseNode.map(function (li) {
  8233. var obj = {
  8234. itemId: _this74.form.id,
  8235. orderId: li.value
  8236. };
  8237. dataprise.push(obj);
  8238. });
  8239. Object(api["g" /* httpPost */])(dataprise, _this74.$api.personBindEnterprise).then(function (res) {});
  8240. }
  8241. }
  8242. _this74.editVisiblelist = false;
  8243. _this74.getlist();
  8244. _this74.$store.commit("increment", 1);
  8245. });
  8246. },
  8247. // 分页导航
  8248. handlePageChange: function handlePageChange(val) {
  8249. this.$set(this.query, "pageIndex", val);
  8250. this.getData();
  8251. },
  8252. btnClick: function btnClick() {
  8253. document.querySelector(".input-file").click();
  8254. },
  8255. exportData: function exportData(event) {
  8256. if (!event.currentTarget.files.length) {
  8257. return;
  8258. }
  8259. var that = this;
  8260. // 拿取文件对象
  8261. var f = event.currentTarget.files[0];
  8262. // 用FileReader来读取
  8263. var reader = new FileReader();
  8264. // 重写FileReader上的readAsBinaryString方法
  8265. FileReader.prototype.readAsBinaryString = function (f) {
  8266. var binary = "";
  8267. var wb; // 读取完成的数据
  8268. var outdata; // 你需要的数据
  8269. var reader = new FileReader();
  8270. reader.onload = function (e) {
  8271. // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节)
  8272. var bytes = new Uint8Array(reader.result);
  8273. var length = bytes.byteLength;
  8274. for (var i = 0; i < length; i++) {
  8275. binary += String.fromCharCode(bytes[i]);
  8276. }
  8277. // 接下来就是xlsx了,具体可看api
  8278. wb = xlsx_default.a.read(binary, {
  8279. type: "binary"
  8280. });
  8281. outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  8282. // 自定义方法向父组件传递数据
  8283. console.log(outdata);
  8284. var userInfo = localStorage.getItem('info');
  8285. var arr = [];
  8286. outdata.map(function (li, index) {
  8287. var obj = {};
  8288. obj.name = li["人员名称"];
  8289. obj.siteId = li["房间ID"];
  8290. obj.siteName = li["房间名称"];
  8291. obj.number = li["学工号"];
  8292. obj.cardId = li["卡号"];
  8293. obj.phone = li["电话(为11位手机号码)"];
  8294. obj.sex = li["性别(1为男,2为女)"];
  8295. obj.mode = li["开锁方式(3为NFC,4为密码)"];
  8296. obj.modeContent = li["内容(NFC为8位16进制物理卡号、密码为6位数字密码)"];
  8297. obj.id = li["id"];
  8298. obj.cardState = '1';
  8299. obj.enterpriseId = JSON.parse(userInfo).enterpriseId;
  8300. obj.type = 0;
  8301. var phone = stringify_default()(obj.phone);
  8302. obj.phone = phone;
  8303. obj.siteId = stringify_default()(obj.siteId);
  8304. var str = {
  8305. userPassword: phone.substr(phone.length - 6, phone.length - 1),
  8306. userTelephone: phone
  8307. };
  8308. obj.info = stringify_default()(str);
  8309. if (obj.sex == "男") {
  8310. obj.sex = 1;
  8311. } else if (obj.sex == "女") {
  8312. obj.sex = 2;
  8313. }
  8314. if (obj.mode == "密码") {
  8315. obj.mode = 4;
  8316. } else if (obj.mode == "NFC") {
  8317. obj.mode = 3;
  8318. } else if (obj.mode == "身份证") {
  8319. obj.mode = 2;
  8320. }
  8321. if (obj.cardState == "正常") {
  8322. obj.cardState = 1;
  8323. } else if (obj.cardState == "挂失") {
  8324. obj.cardState = 2;
  8325. } else if (obj.cardState == "挂失冻结") {
  8326. obj.cardState = 3;
  8327. } else if (obj.cardState == "冻结") {
  8328. obj.cardState = 4;
  8329. } else if (obj.cardState == "预开户") {
  8330. obj.cardState = 5;
  8331. } else if (obj.cardState == "过期") {
  8332. obj.cardState = 6;
  8333. }
  8334. arr.push(obj);
  8335. });
  8336. console.log(arr);
  8337. that.userlist1statu = false;
  8338. that.$nextTick(function () {
  8339. that.userlist1 = arr;
  8340. that.userlist1statu = true;
  8341. });
  8342. };
  8343. reader.readAsArrayBuffer(f);
  8344. };
  8345. reader.readAsBinaryString(f);
  8346. }
  8347. }
  8348. });
  8349. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-028b07c1","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/userManagement.vue
  8350. var userManagement_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('zw',{ref:"myChild"}),_vm._v(" "),_c('getFinger',{ref:"myGetFinger"}),_vm._v(" "),(!_vm.drawer)?_c('div',[_c('el-row',{staticClass:"mb-2",attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":24}},[_c('el-card',{attrs:{"shadow":"never"}},[_c('div',{staticClass:"d-flex flex-wrap align-center justify-space-around font-style"},[_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-zhanghao font-size-40 color-03A9F4"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("总住户")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":_vm.total}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-tubiaozhizuomoban-101 font-size-40 color-03A9F4"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("已入住")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-chazhaofangyuan font-size-40 color-03A9F4"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("未入住")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-shebei font-size-40 color-03A9F4"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("已签约人数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-chaxun font-size-40 color-03A9F4"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-03A9F4"},[_vm._v("待签约人数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-03A9F4",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-renyuanguanli font-size-40 color-F56C6C"})]),_vm._v(" "),_c('div',[_c('div',{staticClass:"color-00000073 font-size-16 font-weight-700 color-F56C6C"},[_vm._v("已欠费人数")]),_vm._v(" "),_c('div',{staticClass:"font-size-24 mt-2"},[_c('NumberGrow',{staticClass:"color-F56C6C",attrs:{"value":0}}),_c('span',{staticClass:"font-size-16 color-00000073 ml-1"},[_vm._v("人")])],1)])]),_vm._v(" "),_c('div',{staticClass:"flexLi my-3 d-flex flex-nowrap align-center d-inlie-block text-center hand-type"},[_c('div',{staticClass:"mr-2"},[_c('i',{staticClass:"iconfont httpicon-gongdanguanli font-size-40 color-ff9900"})]),_vm._v(" "),_c('div',[
  8351. var file = ref.file;
  8352. return _c('div',{},[_c('img',{staticClass:"el-upload-list__item-thumbnail",attrs:{"src":file.url,"alt":""}}),_vm._v(" "),_c('span',{staticClass:"el-upload-list__item-actions"},[_c('span',{staticClass:"el-upload-list__item-preview",on:{"click":function($event){return _vm.handlePictureCardPreview(file)}}},[_c('i',{staticClass:"el-icon-zoom-in"})]),_vm._v(" "),(!_vm.disabled1)?_c('span',{staticClass:"el-upload-list__item-delete",on:{"click":function($event){return _vm.handleDownload(file)}}},[_c('i',{staticClass:"el-icon-download"})]):_vm._e(),_vm._v(" "),(!_vm.disabled1)?_c('span',{staticClass:"el-upload-list__item-delete",on:{"click":function($event){return _vm.handleRemove(file)}}},[_c('i',{staticClass:"el-icon-delete"})]):_vm._e()])])}}],null,false,1205945247)},[_c('i',{staticClass:"el-icon-plus",attrs:{"slot":"default"},slot:"default"})]),_vm._v(" "),_c('el-dialog',{attrs:{"visible":_vm.dialogVisible,"modal-append-to-body":false},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('img',{attrs:{"width":"100%","src":_vm.dialogImageUrl,"alt":""}})])],1):_vm._e()]):_vm._e(),_vm._v(" "),(_vm.documentType == 11)?_c('el-form-item',{attrs:{"label":"指纹"}},[_c('el-radio-group',{attrs:{"size":"small"},model:{value:(_vm.voucher.fingerprintAlias),callback:function ($$v) {_vm.$set(_vm.voucher, "fingerprintAlias", $$v)},expression:"voucher.fingerprintAlias"}},[_c('el-radio-button',{attrs:{"label":"左手大拇指"}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"左手食指"}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"右手大拇指"}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"右手食指"}})],1),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.addfir}},[_vm._v("GX1000-zh采集指纹")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.getFingerData}},[_vm._v("LWJ采集指纹")]),_vm._v(" "),_c('iframe',{staticStyle:{"width":"100%","height":"350px"},attrs:{"src":"static/equipment/mafp_serial/index.html","frameborder":"0","id":"iframeBox"}})],1):_vm._e(),_vm._v(" "),(_vm.documentType == 12)?_c('el-form-item',{attrs:{"label":"身份证","prop":"idcard"}},[_c('el-input',{staticClass:"widthRem5",attrs:{"placeholder":"请输入内容","size":"middle","clearable":true},on:{"change":function($event){return _vm.avoidRepetition($event,12)}},model:{value:(_vm.voucher.idcard),callback:function ($$v) {_vm.$set(_vm.voucher, "idcard", (typeof $$v === 'string'? $$v.trim(): $$v))},expression:"voucher.idcard"}},[_c('el-button',{attrs:{"slot":"append"},nativeOn:{"click":function($event){return _vm.addNfc.apply(null, arguments)}},slot:"append"},[_vm._v("GX1000-zh采集卡")])],1)],1):_vm._e(),_vm._v(" "),(_vm.documentType == 13)?_c('el-form-item',{attrs:{"label":"NFC卡号","prop":"nfc"}},[_c('el-input',{staticClass:"widthRem5",attrs:{"placeholder":"请输入内容","size":"middle","clearable":true},on:{"change":function($event){return _vm.avoidRepetition($event,13)}},model:{value:(_vm.voucher.nfc),callback:function ($$v) {_vm.$set(_vm.voucher, "nfc", (typeof $$v === 'string'? $$v.trim(): $$v))},expression:"voucher.nfc"}},[_c('el-button',{attrs:{"slot":"append"},nativeOn:{"click":function($event){return _vm.addNfc.apply(null, arguments)}},slot:"append"},[_vm._v("GX1000-zh采集卡")])],1),_vm._v(" "),_c('el-switch',{attrs:{"active-text":"是否是常开卡","active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:(_vm.regularCard),callback:function ($$v) {_vm.regularCard=$$v},expression:"regularCard"}})],1):_vm._e(),_vm._v(" "),(_vm.documentType == 14)?_c('el-form-item',{attrs:{"label":"密码","prop":"password"}},[_c('el-input',{staticClass:"widthRem5",attrs:{"type":"number","size":"middle","maxlength":"6","clearable":true,"show-password":""},on:{"change":function($event){return _vm.avoidRepetition($event,14)}},model:{value:(_vm.voucher.password),callback:function ($$v) {_vm.$set(_vm.voucher, "password", (typeof $$v === 'string'? $$v.trim(): $$v))},expression:"voucher.password"}})],1):_vm._e(),_vm._v(" "),_c('el-form-item',{a
  8353. var userManagement_staticRenderFns = []
  8354. var userManagement_esExports = { render: userManagement_render, staticRenderFns: userManagement_staticRenderFns }
  8355. /* harmony default export */ var views_userManagement = (userManagement_esExports);
  8356. // CONCATENATED MODULE: ./src/views/userManagement.vue
  8357. function userManagement_injectStyle (ssrContext) {
  8358. __webpack_require__("7HYI")
  8359. }
  8360. var userManagement_normalizeComponent = __webpack_require__("VU/8")
  8361. /* script */
  8362. /* template */
  8363. /* template functional */
  8364. var userManagement___vue_template_functional__ = false
  8365. /* styles */
  8366. var userManagement___vue_styles__ = userManagement_injectStyle
  8367. /* scopeId */
  8368. var userManagement___vue_scopeId__ = "data-v-028b07c1"
  8369. /* moduleIdentifier (server only) */
  8370. var userManagement___vue_module_identifier__ = null
  8371. var userManagement_Component = userManagement_normalizeComponent(
  8372. userManagement,
  8373. views_userManagement,
  8374. userManagement___vue_template_functional__,
  8375. userManagement___vue_styles__,
  8376. userManagement___vue_scopeId__,
  8377. userManagement___vue_module_identifier__
  8378. )
  8379. /* harmony default export */ var src_views_userManagement = __webpack_exports__["default"] = (userManagement_Component.exports);
  8380. /***/ }),
  8381. /***/ "J1Rt":
  8382. /***/ (function(module, exports) {
  8383. // removed by extract-text-webpack-plugin
  8384. /***/ }),
  8385. /***/ "XbTi":
  8386. /***/ (function(module, exports) {
  8387. // removed by extract-text-webpack-plugin
  8388. /***/ }),
  8389. /***/ "an/0":
  8390. /***/ (function(module, exports) {
  8391. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAepElEQVR4Xu1dB5hURfL/Vb83szlHgkgOgggCYgIFRe8MCKYzwIF4JwKnqCiCCIiKgAiogApiREkqJ4ighwk4JSlIEFQQQf6wOeed193/r2dnVnbZMOG92UWvPvbbXba7uqt/093V1dVVhEZOUko9IyMjOCiozG5zhIRITSRyyLMhZScJ2UKCkiHRTArESyAChGApyQ5ITQLk/AeQlE5Bnb8AkFTxk1T/yPmdOJEsh0QpAQXEkA5CCiNkSiFPaMQOcykP28BPOHRRFFmklaJJk1IiEo15CN0CN8o+SilZSVZWE6mXJ0uuJ4BkvCS0EkJ2FsA5kNRcQoYCsEkJpvBz4uiEreLrdxirilgBe8X/qW/u3924E0EB5yCgBJDpjNgRycQPOrAPxFIgKR02mRIenpTWKAfP1alGC3B+/sl44jhHCNYDQG8hZXeAEtUslZLU7KwE0vVjld99HfSqQFcDnqRUs5sRThLJHQxsK9PEd6WG/ae4uLh8X9u0sl6jAVjK/fb8/MSzNSlaCClbCNDFTFIvQ8jWAMKlJBJqZrpmp5WDUhdvRoD6IifYlEuQh4iwVWP0nQQ/pgPHgqObHG8sS3ejAFiBW5gbd4kQuEyCrhUSHaVEmHMPlRXLbkMDeyroziXdtbtX7OVSMEIBAd8zJtdLSZsjY5N2NAaQGwxgtb/m52e00Qy0EcTPE5JukxIdhKQQNVPV15lEFTNbgjFSS/g+BrEMhAOaEIdD45odbyhZGgRgBW5BTsbFUvKrJOgWIdFGSrI5l2DXbG2oAfGnXfesVkAToYQR7WPAKsbo8/CYxO/94e1r3YACLE+eDC0Oo86Cs/M5cIcQsreUFMRde6uvQjTGepUzmlDAGLaQxAcaY7tDoxP2EZERqD4HDOCsrKxIncr7SIkRUtIAISmiMShNVg60mtHMuV9LpZjlMYYNjOTiiJgmX1rZbnV9wdK2nMDCcQ4R+gtgKBfoIESFRvxnIk2BzZzK2C6NaAkBW8NiMn4k6lJu5ThYOoPVklwYRNdwsBFCyiuEhF0dLv5s4LoBdB+xGMl8jWEFkVwRHp28xcol2zKA8zNPdiSmXc6FvF9IdDLUcedPNmtrm5kKaI1Jg0huszG22CB8Ex2d9IsVM9kSgPPy0tsxQ4wxQMOFkFH8f+Cehp1bCdMYpRLEYjuTr4fEND1mNsimAqwMFgU5iRcIKe4SEkOFJBtv1KZ4s4fTe34ak9AIxYywWNflsrCoJju951J7DVMBLshJ6cclTRUCfbgg9mfda70BSAHgnM1qyQY+seviibDopt95w6OusqYArDTlIM3ozTmmcCkvNcT/9ltvAXLty0Jj9BEjPjc8OnubGRq2KQDn56QNEkI+xQW6NJb9Ni09Bz/8dAxHjqbg2PF0qN+zcwpQVFwK6dL2dF1DVGQYEuOj0bxpPNq1aYZOHVqgbaumINeFsbdA+VPeBTI0Rt8wEo+bcV72C2B1DMoPpn5C0gwh6Fy13zaUosy5wJ79R/DNjgPYsetHpGfk+jzWCvSLLzgH/ft2Q5dOLQMKtvpcaSShadjEwB6PiEnY5s8xyi+AC7PS/8IhnzOE7NxQM/dEShbWb9yOLzZ/j5zcQp9Bra1ii+aJuOWGvk6wNU3ZpawnN8g2jbZAYkJkXNI3vrbqE8BubVlKOcMQFXtuoGnfgV/x3prN2Lnr58ol18o+NEmOxYg7r0afi861splK3pUgM1qt6WJmaGTybl9msk/I5GWlXgjQ04aUV/AAK1QK2LdXfAb1vSHo/PPaYuzIwUhKjLG8ebfixUj+26bJGb5o114BrBzgCrNT2wtiow0uR3FJLFDWqazsfLzyxsfYsnWf5QNbXwMhIUG4/55B6NfnvPqK+v13t9VL1+QL4HJJRFyTw97MZK8AVuZHMDbMEHiACwoO1DlXKU7zXvoABYUlfg+YmQwG/vUi3DP8GuiaZibb03i5LiqKNJLPkU1fFhmZ8LOnDXoMcF7e8VgybDdy0EwuZJxQS7OnrfhYTh1n3n3vC7yz6nMfOVhfrUe3dnh83B1Qs9oqchpDmITOKFUn+VBYXsm/qVWrUk/a8wjgnJycaA3l6uJAWam6OfddT7j7UUaBu+DVtfj4P9v94BKYqh3aNsczU0YgLDTYsgYVUE6zJsPnjNgTETHpOzwxhHgEcGFOejcuxTQuMFCBG4il+eXXP8Ka9VstGzCzGXdsdxZmPfEPBAXZzGZdyc+1H3Mbw0s6iTmeXE7UC7DTOS47bSyXmMVFhd+U1fT+mi1YsnSD1c2Yzr9n9/Z44tGhUBYyq0iBrDOZb2O4Nzw2eXl97dQJcHp6enioXV7k4GIBF6x9IG6Gdu89jMeeeiMgZ9v6BseXv1/dvwceHH2TL1U9rqMzQNPkVzqxB8NKjJ+padPi2irXCXBeXmpvyTFBCAwyuPX7bl5+EUY++AJy88y3SHk8eiYUvO+eG3DtVb1N4FQzC2UE0ZnkGqNFGtGrdXls1gqw/PXX4MKo0GEOIedyQaGBWJqnz1mGLVv3WzYwgWKslug5T4+EUr6sImU11SAzbRrur2uprhFgZdAozk/tzg020yHQ3wjApf23u3/G49PftGo8As63aXIcXp5zv2VKl1ur1gnv2HVMCYlOrtG0VyPAxZmZzbjG73ZwOZkL0q2eveom6J4H5kFdHPyRaNC1F+Peu66zTCSXASRPJzzEWdDqmJiY067QagRY3RIZJOYbHG3VschqWr9xB15c9KHVzQScv7pTfn7GKMuW6sqzsUabGWhSZGzif6sLeRp6SnMO1vkYQ9B0g7ueaVo4NAbnuGvMc8jIzLOwlYZj3al9C8ydPtKyO2XXsalYIzwQEZv0WvUHb1UA/t1pTs4xhLwgELP38027MXv+e6YhEBZiR1GJpb7kXvd1wgN/w+WXWncxoTvNmFgpNZpU3f22CsDFWSfO4kwf7uByEhcUZPXeq0bqX+MX4PCRk14PWm0VrujVGpm5xdhzKNU0nv4yUnfJS154yDKHAbUXa6Q0anrQQfZ1p+7FVQAuzE0bYHD5HBfoGgh786EjJ3Df+IX+jl+V+o/d1Rf9erTC8GmrcSKjwFTe/jAbP/ZW9O/TzR8WtdZ1novV+ycNH9o0+cyprreVACuTZGFO+j1cYF65UIFMLOlLFaYvvfYR1m4wz96sBN3w/FAkxIThWEouhj/5b+QXlVkviActtDo72Xlssoqcs1hDug55f0Rc8kp3O5UAF2VkNDE0Y5bBaWggXHCEELjznpmm+lH16NgUix8bWDmG+39Jx+hn1zWaPXn+s2PQrnUzSzBWQOqaFDaNnoyISZpWCbCauUhJCS4K1S4xOBYYAgGxOe8/eBQPT15sqrDTR12Jv1zUtgrPvYfTMGrmRygtD9iT3Fpluv4vF2LMP37/AJoqvOs6UYf8JMhGo4OjklScEIOUSTIvJrSZJjHEweXEQClX6rZI3RqZRfHRoVg3dwhsyhJfjRrLTI6LjcS7iyeYJfJpfFzLdIqN5MPShs/Cw5OyyXnu1WRXQfJpzqGengTkFeDoh+c7ndLNonF3Xow7ru5aK7tDx7Ocy3V2XsO6/SyaNxZnn5VklthV+LjvizXCQpLi5YiCsqNUEY9K68sFFhocySqcgtWkfKtuvetp064ElVK1ZvbtCLLrdXb9ZGYB7pv9MY6m+O4U7+/Y3DP8Wtx43SX+sqmxvtvVVmf4ljE53kDwbsrNTWujCQxwCPm8ISgoENrzzl0/YfIzb5km5JR/XI4b+nb0iF9BcRkeXbAR2/f/n0flzS50ce/OmPLInWazreSnZrFNQ5YGOQZ2fEkFOSmXCcluMbgcbYjAPMhZsforvLnsP6YI2bl1It6cOhjMi64LITF/1Xa8vT7wgW8S4qOw9JVHTZG9JiYubdrQCOPJpn1M+VmpIwRoGBfoG4hrQdWp6XOWm+LfrJ6SLJ12Izq0iPdpwL7adRTTXv0y4Gflla9Pcj56s4qU6dJuo1cgxQrKz06ZzSXdzgU1C4R
  8392. /***/ }),
  8393. /***/ "iPDe":
  8394. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8395. "use strict";
  8396. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/usercontent.vue
  8397. //
  8398. //
  8399. //
  8400. //
  8401. //
  8402. //
  8403. //
  8404. //
  8405. //
  8406. //
  8407. //
  8408. //
  8409. //
  8410. //
  8411. //
  8412. //
  8413. //
  8414. //
  8415. /* harmony default export */ var usercontent = ({
  8416. props: ['userInfo'],
  8417. methods: {
  8418. modify: function modify() {
  8419. this.$emit('func', this.userInfo);
  8420. }
  8421. }
  8422. });
  8423. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-77e208de","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/components/usercontent.vue
  8424. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"usercontent"},[_c('div',{staticClass:"contentuser"},[_vm._m(0),_vm._v(" "),_c('div',{staticClass:"name"},[_vm._v(_vm._s(_vm.userInfo.name))]),_vm._v(" "),_c('div',{staticClass:"address"},[_vm._v(_vm._s(_vm.userInfo.address))]),_vm._v(" "),_c('div',{staticClass:"studentNumber"},[_vm._v("学号:"+_vm._s(_vm.userInfo.number))]),_vm._v(" "),_c('div',{staticClass:"cardNumber"},[_vm._v("卡号:"+_vm._s(_vm.userInfo.cardId))])]),_vm._v(" "),_c('div',{staticClass:"icon"},[_vm._m(1),_vm._v(" "),_c('div',[_c('i',{staticClass:"iconfont httpicon-bianji",on:{"click":_vm.modify}})]),_vm._v(" "),_vm._m(2),_vm._v(" "),_vm._m(3)])])}
  8425. var staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"img"},[_c('img',{attrs:{"src":__webpack_require__("Tp5f"),"alt":""}})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('i',{staticClass:"iconfont httpicon-chaxun"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('i',{staticClass:"iconfont httpicon-shouye"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('i',{staticClass:"iconfont httpicon-pingzhengguanli"})])}]
  8426. var esExports = { render: render, staticRenderFns: staticRenderFns }
  8427. /* harmony default export */ var components_usercontent = (esExports);
  8428. // CONCATENATED MODULE: ./src/components/usercontent.vue
  8429. function injectStyle (ssrContext) {
  8430. __webpack_require__("J1Rt")
  8431. }
  8432. var normalizeComponent = __webpack_require__("VU/8")
  8433. /* script */
  8434. /* template */
  8435. /* template functional */
  8436. var __vue_template_functional__ = false
  8437. /* styles */
  8438. var __vue_styles__ = injectStyle
  8439. /* scopeId */
  8440. var __vue_scopeId__ = "data-v-77e208de"
  8441. /* moduleIdentifier (server only) */
  8442. var __vue_module_identifier__ = null
  8443. var Component = normalizeComponent(
  8444. usercontent,
  8445. components_usercontent,
  8446. __vue_template_functional__,
  8447. __vue_styles__,
  8448. __vue_scopeId__,
  8449. __vue_module_identifier__
  8450. )
  8451. /* harmony default export */ var src_components_usercontent = __webpack_exports__["a"] = (Component.exports);
  8452. /***/ }),
  8453. /***/ "pmPM":
  8454. /***/ (function(module, exports) {
  8455. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG4AAABeCAYAAADCISFWAAAMkklEQVR4Xu2dTW/juBmAX1ISJX8kztdsmjTFpNstUCSnAv0B8yey556ypxbYopf2MppDe2yB7mnnJ2z+wh76Hwoveth2doGpg2w+ndiWSIpk8dKyJ8nMZjyW5FiJBPhkSZTehy9Fvl8kcMdhQqAAoXvU6HlMOS41hBIekLuumff/jB8bwwOjzaleabkS/t1P4MuXCSFg5v3Zrz/fj0IwYUgB2u5R46nn9xPPYTWHAIIs/2GEbwyAToxJVlqXEi5bEp6Hqkzw3gnOGCDfvfit3wrWfa9LGWkSCpIR4olSa9u4y/UBDJMGhGe0MUns+/xJp8PJy5eyLN3yLRAIDT7bd0+WloKgrmvUYw4I72EAewcVQ4hWAOKy2422Wi1OwlCXAd7b4OwQCewCIPA84RPhOWV4kSzPqH0h4wsVr/3iIob9cnzv3gHumQvwjF0CBA4AI8Y8iO/aXWA1IYkMIt6Nj/g2bIsyaN0NcAaAwP6+e/TLRVaXXuD0CAPv4Q6TI5gILgEQSwAxtNuSHByoLBo8i2vvBEdF4hFTfxQaV2pw2FNMaNdtfq3f9B3os8cCDofK5bjGS6lxFbgK3CyG+dzaGE1OKo3LTaSzuVEFbjZyzr2VClzuIp3NDStws5Fz7q1U4HIX6WxuWIGbjZxzb6UCd5dI0Y2S95GT16ICdxsMk8ZIZkAIoxlTwLkxvj8GSDj/IHfR6Fp7ne8TdOwS6FOC9tQMECtwt8AZMtAaGomCi0SCSHjXV1s/T6y/67uzVbL9ARr4HQBsr5xa6K9fudRzHMrWHBcdvZQQN4sx/AY4gPJ5B/I2eaFAhDHxyuoZh7N/KYB/aghziO0IgcDOHoFvdj3rNwQIsrifxuDqgxjOvpAkhLl3pr7LkZqbkVkRIhYABgAQF+HjQoP4mTmt+2yhlsXhe0PjdtoSPj14A+72lzmVGIEcOuAHjDi3Ty0UHHqWI9GNnuwcR+TT/H1cZn/fO19errNFJ8gKDt06vNGTUf9Eba8sGByOt1otctTrkfX1odiOjgB089JswCaC1dDpGNjcVEV0yvcxLRScYVIlV1rESSLWm99L2AEF3+ze7MM77ckmKLev2+g4cLjpXUI3cKCVyVNvpFSKMamCyDpQSVwj1E580l8aJIUTLYwOwx+em8RXyn63f9VP4HBTQRiaWWlioeBASjubNIwrJSKljdIrZFWfDAaTwbrV7dbqdQv9pDYgjiHU7VKX+L5DPZEpoAkDhhAGMG5ASEIEI8DSqLbbs1U7U5bGQMNeY6CrVcBUEtfUE4AEOh01izjNYsGhlHH9ZsPhmAFP5LeWw3BBIQg0ALIsBcZ94/o6c5Klxej89N0M9LTyXSl4ILunp/KT1VVZ5BBaPLj3DdYP5X/URACtJVO4/FmCJQEbHVlU1FgFLu+OMwLYSwNtoS3g+YHMO0q6Apc3uPR++N3UcJXwmsPXojoHgCTPobMCVxA4a8yw8CCRxogVQmIIQ5nXrLMCVyA4e2spjWJcDhokWu83OYShygNeBa5ocKnmJX7MWzzAIRNtoUnWZitwWSU4yfXphCWhWrR4EEEYolsk09KoAjeJ4HM6R5N+EkFz8KTdjrKGuVfgcoIyyW3QBCguVbxc+2+UdYlQgZtE4jmdg/7JxHd4y+cxbL0WWQzvxYO7ZhrK6f3f3AbNXXhMYqLKvfEpbpjOMPnA4Wv1VxzCg6mXB8WCu2YGQmOshpYGuJjijd++hPgBoVw61POHuellgMekQZNYAhdiCZZigFBM67QtFByO6UpGchFaAi0HsNFRcLhpYKMzlXfgBj7u0+OzVS/g3Ke+72XxgOfSkya8CQ6XChqiDxBvZHAwFwoOHalN4UfQ6fC8XR02V/3FnncefVxjNV0rTTqYHS6ZXGj0Iug3o2nNYIWCexO6EMbTDgl3deS8QhcmVJZ8TsPhkpik6ckBPP0+nnaCUig4mxTvqHht6SJGD/G0vetdEhtqXOidB1GNxSXSuDKAs+F53JWS9SRW8fn2VaI/WV3NZDFAiN+enpLAdWnwE8/1I+U7wveyhOflo0oT3qUMQyV6v62bn7nKuvlFnBnaSDxYmoosACVYpqpEs0qUx9xPTm70wSJC0Mu0hsNnLctyYMLB4/GcVpoF+ONBMtGblsvkNdErPY6Txkbmj88H8NnLJItrp9DlwOPAMflbYqh7E0Pyd9qZI7srcJPLPduZTBolmbS5FM/DKGvUVwUuG47Jrk6XRbgMsOUV//b3uAI3meju96zxMgDEBUC8XYUu3C+PiVvHHIqmSSTVYhlz8H7/BZbazWSMqIbKiaWf4cQKXAbh3eelpQQ3SuD3xDCRP8uBaVDWzOUPC3uPCnzft/d7lJHUAI3viM9G+kDHhu/SgUvz4zR0k8QsJooca90b5rhNc6w3m8NrGz1y1ms4TsAdhwceFcLJ5B0Y2VGn6QBoRG9glg5XClSiTUvjc7masnGWbNnAYaanZIwvLXa53Zhh86UaJ+9Pg2/0RcZrXzxzYPHXXpf7gcsDP0vowjix0RqCMbkx1eg7epcdPTg32vcVZqeKE5WsN5u2/P0x/MBqrFWjnHn2FmUDh47UvicH6xk8vXdp5tADbuo+k5mS90epxKI2kGsU8zQATo4pdQihpFaz3YX4MRnuEGK0jiKjtNZyU+ktN9Hgcw1fn2s4ONCwt0ePnj4NGitevbTgMHRh0OtF683pYytmAW5UTDuCjtiA8wRgVwO0KcAuPYQOBdgE2uuRG4n7mHq80zZvctrD4aNu7Dsn/8E9G+o1aow71jhjEsEYx6wdEoYYPJXpKHQ5MCpD0T8SYquPQ+WmguehgReQMcrLConCYjefoZJJhXEgkvckJzzhw6oKsL3YJYeXfYLghkcHNhYbBi5bxhbMwWI53S7Z+tk1Bsqh3VOXuZQy4qV7NuBQWSZwo7FdXZpELutkLaorWOxO83W70TtRmC5sUg/AdRn3aC9bZSF8Tuuhx2HQ95VGbXrPgUOnHULRE8+Gpa1wzx4sV2U98yJxxpFn1ywn9nufMYrZtnv7+XKtgn5rmmwrG+R0oLBs2AJOu/NI4B8tW7DSgOfduXQZFw2QGIiMxyikup++XQPscmU0S70WwmGtJ0wIuxFThly5YsHlBOmh3MbOXrF0yKVJRBDIPkCyjYHCAPpDI+AqcLPuFem6z0hhNDSTxJwmK2RVwE5bfkiMZQVu1uCut5eu7xLhSyxHtd7/XgLsTpTkX4G7T3DY9jgxhitpmpjkP5H2VeDuG9yo/evWFdwq5j1DZwVuXsCl2qelUDJwhvv83AGvAjdP4PBZrn337LZoP1KxtgI3b+DGmseU3WHLVq19u6DbO8A9cw/hGWvYHRsfxzZk88jOhqujGY5qcfq/QfzJFzfDHd4G99WeA6+32NBdovzSJAzOpfQzPpQ1lQkVD2i09ptXg+vrvBvg0pwz3Mw23SO10riMos98OVpb0qpEEU5WsF40BhoRgxqGx9fLFHyfHq5yJ4iWPbdW8yiAm8VBmfmpqxsMM3xwyOxqsfzTN1XayQ9h2HSMoehut5ZtFgw3YihT3tkDB4zJIoa7qun7qHUR7B1ocvXXPz0ZQ0IBTBN38cAFNw+vh0OmBIiXoD2wZrH+X/68UcGaBzTveQYmTSIjvgitARbsJlfhHz8iHhuGk43cSvfxHiNX1vW28/Cz3ce7FNFmmjQSww8xlswn52G4hN5crNIDsADooERPbhFtT3rP4aZHWMaYZN7waNI25/68dGmA5jB1ZjR5FYaB2+0Sb9OhtN/MGAsy/es/afRsZznuNwlOllxCXAo9l3os054C0z/R/F05qtSE+xwQEwIdPmIIMOmuG0W+0ze75HW36zXWGfM0ZdQQt/oGDwVuy48wV2picC03X4fBOJh//I6dD+pBBe4mm1Flde17WNd5vg603rz+w+fBwkd+YMO4y1LDZAZiHFVVx6Cr+QMXhjh0B1eM16hIvMpWeq1HpPGZZmHuwZWnnOEMFG5s/iqBxlXgbnS
  8456. /***/ })
  8457. });