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

1221 lines
563 KiB

  1. webpackJsonp([13],{
  2. /***/ "5z6/":
  3. /***/ (function(module, exports) {
  4. module.exports = "(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map"
  5. /***/ }),
  6. /***/ "Ia/g":
  7. /***/ (function(module, exports, __webpack_require__) {
  8. __webpack_require__("P+fo")(__webpack_require__("pe0Z"))
  9. /***/ }),
  10. /***/ "P+fo":
  11. /***/ (function(module, exports) {
  12. /*
  13. MIT License http://www.opensource.org/licenses/mit-license.php
  14. Author Tobias Koppers @sokra
  15. */
  16. module.exports = function(src) {
  17. function log(error) {
  18. (typeof console !== "undefined")
  19. && (console.error || console.log)("[Script Loader]", error);
  20. }
  21. // Check for IE =< 8
  22. function isIE() {
  23. return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined";
  24. }
  25. try {
  26. if (typeof execScript !== "undefined" && isIE()) {
  27. execScript(src);
  28. } else if (typeof eval !== "undefined") {
  29. eval.call(null, src);
  30. } else {
  31. log("EvalError: No eval function available");
  32. }
  33. } catch (error) {
  34. log(error);
  35. }
  36. }
  37. /***/ }),
  38. /***/ "Xx+o":
  39. /***/ (function(module, exports) {
  40. // removed by extract-text-webpack-plugin
  41. /***/ }),
  42. /***/ "aOHy":
  43. /***/ (function(module, exports, __webpack_require__) {
  44. __webpack_require__("P+fo")(__webpack_require__("5z6/"))
  45. /***/ }),
  46. /***/ "mg21":
  47. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48. "use strict";
  49. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  50. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/keys.js
  51. var keys = __webpack_require__("fZjL");
  52. var keys_default = /*#__PURE__*/__webpack_require__.n(keys);
  53. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  54. var stringify = __webpack_require__("mvHQ");
  55. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  56. // CONCATENATED MODULE: ./src/vendor/Export2Excel.js
  57. /* eslint-disable */
  58. __webpack_require__("aOHy");
  59. __webpack_require__("wU/G");
  60. __webpack_require__("Ia/g");
  61. function generateArray(table) {
  62. var out = [];
  63. var rows = table.querySelectorAll('tr');
  64. var ranges = [];
  65. for (var R = 0; R < rows.length; ++R) {
  66. var outRow = [];
  67. var row = rows[R];
  68. var columns = row.querySelectorAll('td');
  69. for (var C = 0; C < columns.length; ++C) {
  70. var cell = columns[C];
  71. var colspan = cell.getAttribute('colspan');
  72. var rowspan = cell.getAttribute('rowspan');
  73. var cellValue = cell.innerText;
  74. if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
  75. //Skip ranges
  76. ranges.forEach(function (range) {
  77. if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
  78. for (var i = 0; i <= range.e.c - range.s.c; ++i) {
  79. outRow.push(null);
  80. }
  81. }
  82. });
  83. //Handle Row Span
  84. if (rowspan || colspan) {
  85. rowspan = rowspan || 1;
  86. colspan = colspan || 1;
  87. ranges.push({ s: { r: R, c: outRow.length }, e: { r: R + rowspan - 1, c: outRow.length + colspan - 1 } });
  88. }
  89. ;
  90. //Handle Value
  91. outRow.push(cellValue !== "" ? cellValue : null);
  92. //Handle Colspan
  93. if (colspan) for (var k = 0; k < colspan - 1; ++k) {
  94. outRow.push(null);
  95. }
  96. }
  97. out.push(outRow);
  98. }
  99. return [out, ranges];
  100. };
  101. function datenum(v, date1904) {
  102. if (date1904) v += 1462;
  103. var epoch = Date.parse(v);
  104. return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
  105. }
  106. function sheet_from_array_of_arrays(data, opts) {
  107. var ws = {};
  108. var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } };
  109. for (var R = 0; R != data.length; ++R) {
  110. for (var C = 0; C != data[R].length; ++C) {
  111. if (range.s.r > R) range.s.r = R;
  112. if (range.s.c > C) range.s.c = C;
  113. if (range.e.r < R) range.e.r = R;
  114. if (range.e.c < C) range.e.c = C;
  115. var cell = { v: data[R][C] };
  116. if (cell.v == null) continue;
  117. var cell_ref = XLSX.utils.encode_cell({ c: C, r: R });
  118. if (typeof cell.v === 'number') cell.t = 'n';else if (typeof cell.v === 'boolean') cell.t = 'b';else if (cell.v instanceof Date) {
  119. cell.t = 'n';
  120. cell.z = XLSX.SSF._table[14];
  121. cell.v = datenum(cell.v);
  122. } else cell.t = 's';
  123. ws[cell_ref] = cell;
  124. }
  125. }
  126. if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
  127. return ws;
  128. }
  129. function Workbook() {
  130. if (!(this instanceof Workbook)) return new Workbook();
  131. this.SheetNames = [];
  132. this.Sheets = {};
  133. }
  134. function s2ab(s) {
  135. var buf = new ArrayBuffer(s.length);
  136. var view = new Uint8Array(buf);
  137. for (var i = 0; i != s.length; ++i) {
  138. view[i] = s.charCodeAt(i) & 0xFF;
  139. }return buf;
  140. }
  141. function export_table_to_excel(id) {
  142. var theTable = document.getElementById(id);
  143. console.log('a');
  144. var oo = generateArray(theTable);
  145. var ranges = oo[1];
  146. /* original data */
  147. var data = oo[0];
  148. var ws_name = "SheetJS";
  149. console.log(data);
  150. var wb = new Workbook(),
  151. ws = sheet_from_array_of_arrays(data);
  152. /* add ranges to worksheet */
  153. // ws['!cols'] = ['apple', 'banan'];
  154. ws['!merges'] = ranges;
  155. /* add worksheet to workbook */
  156. wb.SheetNames.push(ws_name);
  157. wb.Sheets[ws_name] = ws;
  158. var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' });
  159. saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), "test.xlsx");
  160. }
  161. function formatJson(jsonData) {
  162. console.log(jsonData);
  163. }
  164. function export_json_to_excel(th, jsonData, defaultTitle) {
  165. /* original data */
  166. var data = jsonData;
  167. data.unshift(th);
  168. var ws_name = "SheetJS";
  169. var wb = new Workbook(),
  170. ws = sheet_from_array_of_arrays(data);
  171. /* add worksheet to workbook */
  172. wb.SheetNames.push(ws_name);
  173. wb.Sheets[ws_name] = ws;
  174. var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' });
  175. var title = defaultTitle || '列表';
  176. saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title + ".xlsx");
  177. }
  178. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  179. var api = __webpack_require__("gyMJ");
  180. // EXTERNAL MODULE: ./src/utils/index.js
  181. var utils = __webpack_require__("0xDb");
  182. // EXTERNAL MODULE: ./src/views/doorMagnetism/common/map.vue + 2 modules
  183. var map = __webpack_require__("xMD2");
  184. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  185. var moment = __webpack_require__("PJh5");
  186. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  187. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/Architecture.vue
  188. //
  189. //
  190. //
  191. //
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. //
  199. //
  200. //
  201. //
  202. //
  203. //
  204. //
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. //
  221. //
  222. //
  223. //
  224. //
  225. //
  226. //
  227. //
  228. //
  229. //
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. //
  244. //
  245. //
  246. //
  247. //
  248. //
  249. //
  250. //
  251. //
  252. //
  253. //
  254. //
  255. //
  256. //
  257. //
  258. //
  259. //
  260. //
  261. //
  262. //
  263. //
  264. //
  265. //
  266. //
  267. //
  268. //
  269. //
  270. //
  271. //
  272. //
  273. //
  274. //
  275. //
  276. //
  277. //
  278. //
  279. //
  280. //
  281. //
  282. //
  283. //
  284. //
  285. //
  286. //
  287. //
  288. //
  289. //
  290. //
  291. //
  292. //
  293. //
  294. //
  295. //
  296. //
  297. //
  298. //
  299. //
  300. //
  301. //
  302. //
  303. //
  304. //
  305. //
  306. //
  307. //
  308. //
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. //
  359. //
  360. //
  361. //
  362. //
  363. //
  364. //
  365. //
  366. //
  367. //
  368. //
  369. //
  370. //
  371. //
  372. //
  373. //
  374. //
  375. //
  376. //
  377. //
  378. /* harmony default export */ var Architecture = ({
  379. // inject: ['reload'],
  380. name: "alarmRecord",
  381. data: function data() {
  382. return {
  383. // selectoption:[],
  384. // selectoptionValue:'',
  385. pageTotal: 0,
  386. addtitle: "添加楼栋",
  387. rules: {
  388. region: [{
  389. required: true,
  390. message: '请选择所属单位',
  391. trigger: 'blur'
  392. }],
  393. address: [{
  394. required: true,
  395. message: '请输入地址',
  396. trigger: 'blur'
  397. }],
  398. name: [{
  399. required: true,
  400. message: '请输入名称',
  401. trigger: 'blur'
  402. }],
  403. floorNum: [{
  404. required: true,
  405. message: '请输入楼层',
  406. trigger: 'blur'
  407. }]
  408. },
  409. dialogVisible2: false,
  410. titleText: '设备未处理报警记录(IMEI:860709056256857)',
  411. textarea: '', //批量处理备注
  412. dialogVisible: false,
  413. dialogVisible1: false,
  414. input: '',
  415. content: '切换单个/多个查询模式',
  416. selected: true,
  417. advancedQueryStatus: false,
  418. advancedQueryText: '高级查询',
  419. formInline: {
  420. enterpriseId: '',
  421. name: ''
  422. },
  423. formInline3: {
  424. count: '',
  425. name: ''
  426. },
  427. tableData: [],
  428. rowStyle: {
  429. background: '#f8f9fa',
  430. fontSize: '12px'
  431. },
  432. multipleSelection: [],
  433. enterpriselist: [],
  434. formRoom: {
  435. name: '',
  436. address: '',
  437. floorNum: '',
  438. region: ''
  439. },
  440. form1: {
  441. address: '',
  442. province: '',
  443. city: '',
  444. latitude: 0, // 纬度
  445. longitude: 0, // 经度
  446. district: ''
  447. },
  448. currentPage: 1,
  449. currentPage1: 1,
  450. pageSize: 10,
  451. pageTotal1: 0,
  452. batch: true,
  453. zNodes: [],
  454. modifyRow: '',
  455. modifyStatus: false,
  456. deviceList: [],
  457. devicerow: '',
  458. pageSize1: 10,
  459. dialogVisible3: false,
  460. addselect: 0,
  461. userInfo: { type: '' }
  462. };
  463. },
  464. components: {
  465. Map: map["a" /* default */]
  466. },
  467. computed: {},
  468. created: function created() {
  469. // this.$store.commit('updateTenantId', 400)
  470. this.userInfo = JSON.parse(localStorage.getItem('info'));
  471. this.getEnterprise();
  472. this.getlist();
  473. // this.selectoption=JSON.parse(localStorage.getItem('selectoption'))
  474. // this.selectoptionValue=localStorage.getItem('tenantId')
  475. },
  476. methods: {
  477. // selectTenantId(e) {
  478. // localStorage.setItem('tenantId', e)
  479. // this.reload()
  480. // },
  481. addsaveEdit: function addsaveEdit() {
  482. var _this2 = this;
  483. var count = this.formInline3.count;
  484. var name = this.formInline3.name;
  485. var data = {
  486. ancestor: this.addrow.id,
  487. count: count,
  488. site: {
  489. address: this.addrow.address,
  490. name: name,
  491. type: 1,
  492. enterpriseId: this.addrow.enterpriseId
  493. }
  494. };
  495. if (this.addselect == 0) {
  496. data = {
  497. ancestor: this.addrow.id,
  498. count: count,
  499. site: {
  500. address: this.addrow.address,
  501. name: name,
  502. type: 1,
  503. enterpriseId: this.addrow.enterpriseId
  504. }
  505. };
  506. } else if (this.addselect == 1) {
  507. data = {
  508. ancestor: this.addrow.id,
  509. count: count,
  510. site: {
  511. address: this.addrow.address,
  512. name: name,
  513. type: 1,
  514. isRoom: 0,
  515. enterpriseId: this.addrow.enterpriseId
  516. }
  517. };
  518. }
  519. Object(api["g" /* httpPost */])(data, this.$api.addNodes).then(function (res) {
  520. if (res.success) {
  521. _this2.dialogVisible3 = false;
  522. _this2.getlist();
  523. _this2.$message.success("添加成功");
  524. } else {
  525. _this2.$message.error("添加失败");
  526. }
  527. }).error(function (er) {
  528. _this2.$message.error("添加失败");
  529. });
  530. },
  531. addRoom: function addRoom(index, row) {
  532. this.addselect = 0;
  533. this.addrow = row;
  534. this.dialogVisible3 = true;
  535. },
  536. addRoom1: function addRoom1(index, row) {
  537. this.addselect = 1;
  538. this.addrow = row;
  539. this.dialogVisible3 = true;
  540. },
  541. exportFun: function exportFun() {
  542. var _this3 = this;
  543. var data = {
  544. pageNum: 10,
  545. pageSize: 0,
  546. q: stringify_default()({
  547. enterpriseId: this.formInline.enterpriseId,
  548. name: this.formInline.name
  549. })
  550. };
  551. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  552. if (res.success) {
  553. res.data.list.list.map(function (li) {
  554. _this3.enterpriselist.find(function (item, index) {
  555. if (item.id == li.enterpriseId) {
  556. li['enterpriseName'] = item.name;
  557. }
  558. });
  559. });
  560. new Promise(function(resolve) { resolve(); }).then((function () {
  561. var tHeader = ['房源ID', '建筑物名称', '所属单位ID', '所属单位名称', '详细地址', '设备IMEI'];
  562. var filterVal = ['id', 'name', 'enterpriseId', 'enterpriseName', 'address', 'imei'];
  563. var data = _this3.formatJson(filterVal, res.data.list.list);
  564. export_json_to_excel(tHeader, data, '房源列表');
  565. }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
  566. } else {
  567. _this3.$message.error("导出失败");
  568. }
  569. });
  570. },
  571. formatJson: function formatJson(filterVal, jsonData) {
  572. return jsonData.map(function (v) {
  573. return filterVal.map(function (j) {
  574. return v[j];
  575. });
  576. });
  577. },
  578. // 批量删除
  579. deleteAllList: function deleteAllList() {
  580. var _this4 = this;
  581. var multipleSelection = this.multipleSelection;
  582. if (multipleSelection.length == 0) {
  583. this.$message.error("请选择要删除的房源");
  584. } else {
  585. var _this = this;
  586. this.$confirm("确定要删除吗?", "提示", {
  587. type: "warning"
  588. }).then(function () {
  589. _this4.currentPage = 1;
  590. var ids = [];
  591. multipleSelection.map(function (li) {
  592. ids.push(li.id);
  593. });
  594. var data = {
  595. ids: ids
  596. };
  597. Object(api["g" /* httpPost */])(data, _this.$api.deleteRoom).then(function (res) {
  598. if (res.success) {
  599. _this.getlist();
  600. _this.$message.success("删除成功");
  601. } else {
  602. _this.$message.error("删除失败");
  603. }
  604. });
  605. });
  606. }
  607. },
  608. // 删除建筑
  609. deleRoom: function deleRoom(index, row) {
  610. var _this = this;
  611. this.$confirm("确定要删除吗?", "提示", {
  612. type: "warning"
  613. }).then(function () {
  614. var data = {
  615. ids: [row.id]
  616. };
  617. Object(api["g" /* httpPost */])(data, _this.$api.deleteRoom).then(function (res) {
  618. if (res.success) {
  619. _this.getlist();
  620. _this.$message.success("删除成功");
  621. } else {
  622. _this.$message.error("删除失败");
  623. }
  624. });
  625. });
  626. },
  627. // 获取对应设备
  628. getdevicesstatu: function getdevicesstatu(index, row) {
  629. this.dialogVisible1 = true;
  630. this.devicerow = row;
  631. this.getDevice();
  632. },
  633. getDevice: function getDevice() {
  634. var _this5 = this;
  635. var data = {
  636. q: stringify_default()({
  637. roomId: this.devicerow.id
  638. }),
  639. pageSize: this.pageSize1,
  640. pageNum: this.currentPage1
  641. };
  642. Object(api["g" /* httpPost */])(data, this.$api.getList).then(function (res) {
  643. if (res.success) {
  644. res.data.list.map(function (li) {
  645. if (li.lastReportAt) {
  646. li.lastReportAt = moment_default()(li.lastReportAt).format('YYYY/MM/DD HH:mm:ss');
  647. }
  648. });
  649. _this5.deviceList = res.data.list;
  650. _this5.pageTotal1 = res.data.total;
  651. } else {
  652. _this5.$message.console.error("查询失败");
  653. }
  654. });
  655. },
  656. reset: function reset() {
  657. var formInline = {
  658. enterpriseId: '',
  659. name: ''
  660. };
  661. this.formInline = formInline;
  662. },
  663. // 修改房源
  664. modifyRoom: function modifyRoom(index, row) {
  665. var formRoom = {
  666. name: row.name,
  667. address: row.address,
  668. region: row.enterpriseId
  669. };
  670. this.formRoom = formRoom;
  671. this.modifyRow = row;
  672. this.dialogVisible = true;
  673. this.modifyStatus = true;
  674. },
  675. updateRoom: function updateRoom() {
  676. var _this6 = this;
  677. var info = localStorage.getItem("info");
  678. var formRoom = this.formRoom;
  679. var data = {
  680. list: [{
  681. id: this.modifyRow.id,
  682. address: formRoom.address,
  683. name: formRoom.name
  684. }]
  685. };
  686. if (formRoom.name == "") {
  687. this.$message.error("建筑名称不能为空");
  688. } else {
  689. Object(api["g" /* httpPost */])(data, this.$api.updatePlace).then(function (res) {
  690. if (res.success) {
  691. _this6.$message.success("修改成功");
  692. _this6.dialogVisible = false;
  693. _this6.getlist();
  694. } else {
  695. _this6.$message.error("修改失败");
  696. }
  697. });
  698. }
  699. },
  700. // 保存房源
  701. saveEdit: function saveEdit() {
  702. var _this7 = this;
  703. var info = localStorage.getItem("info");
  704. var formRoom = this.formRoom;
  705. if (formRoom.name == "") {
  706. this.$message.error("建筑名称不能为空");
  707. } else {
  708. var names = this.formRoom.name1.split('、');
  709. var counts = this.formRoom.floorNum.split('、');
  710. var data = {
  711. address: formRoom.address,
  712. counts: counts,
  713. enterpriseId: formRoom.region,
  714. names: names,
  715. rootName: formRoom.name
  716. };
  717. Object(api["g" /* httpPost */])(data, this.$api.createModPlace).then(function (res) {
  718. if (res.success) {
  719. _this7.dialogVisible = false;
  720. _this7.getlist();
  721. _this7.$message.success("创建成功");
  722. } else {
  723. _this7.$message.error("创建失败");
  724. }
  725. });
  726. }
  727. },
  728. yz: function yz(obj) {
  729. var str = {};
  730. keys_default()(obj).forEach(function (key) {
  731. if (obj[key] != '') {
  732. str[key] = obj[key];
  733. }
  734. });
  735. return str;
  736. },
  737. // 获取列表
  738. getlist: function getlist() {
  739. var _this8 = this;
  740. var q = this.yz(this.formInline);
  741. var data = {
  742. pageNum: 1,
  743. pageSize: this.pageSize,
  744. orderBy: "create_time desc",
  745. q: stringify_default()(q)
  746. };
  747. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  748. if (res.data.list.length > 0) {
  749. res.data.list.list.map(function (li) {
  750. _this8.enterpriselist.find(function (item, index) {
  751. if (item.id == li.enterpriseId) {
  752. li['enterpriseName'] = item.name;
  753. }
  754. });
  755. });
  756. var arrdata = Object(utils["n" /* uniqueArray */])(res.data.list.list, "id");
  757. _this8.tableData = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
  758. // this.tableData=res.data.list
  759. _this8.pageTotal = res.data.list.total;
  760. } else {
  761. _this8.tableData = [];
  762. _this8.pageTotal = 0;
  763. }
  764. });
  765. },
  766. getlist1: function getlist1() {
  767. var _this9 = this;
  768. var q = this.yz(this.formInline);
  769. var data = {
  770. pageNum: this.currentPage,
  771. pageSize: this.pageSize,
  772. orderBy: "create_time desc",
  773. q: stringify_default()(q)
  774. };
  775. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  776. if (res.data.list.list.length > 0) {
  777. res.data.list.list.map(function (li) {
  778. _this9.enterpriselist.find(function (item, index) {
  779. if (item.id == li.enterpriseId) {
  780. li['enterpriseName'] = item.name;
  781. }
  782. });
  783. });
  784. var arrdata = Object(utils["n" /* uniqueArray */])(res.data.list.list, "id");
  785. _this9.tableData = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
  786. // this.tableData=res.data.list
  787. _this9.pageTotal = res.data.list.total;
  788. } else {
  789. _this9.tableData = [];
  790. _this9.pageTotal = 0;
  791. }
  792. });
  793. },
  794. openMap: function openMap() {
  795. if (this.form.longitude == 'undefined' && this.form.latitude == 'undefined') {
  796. this.$refs.map.open();
  797. } else {
  798. this.$refs.map.open(this.form1);
  799. }
  800. },
  801. updateLocation: function updateLocation(orgAddr, lon, lat, province, city, district) {
  802. this.form1 = {
  803. address: orgAddr,
  804. province: province,
  805. city: city,
  806. latitude: lat, // 纬度
  807. longitude: lon, // 经度
  808. district: district
  809. };
  810. },
  811. // 获取单位
  812. getEnterprise: function getEnterprise() {
  813. var _this10 = this;
  814. var data = {
  815. q: stringify_default()({
  816. name: this.formInline.name
  817. })
  818. };
  819. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  820. if (res.success) {
  821. _this10.enterpriselist = res.data.list;
  822. _this10.zNodes = [];
  823. _this10.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {});
  824. } else {
  825. _this10.$message.error("获取失败");
  826. }
  827. });
  828. },
  829. // 未处理记录打开
  830. recordFun: function recordFun() {
  831. this.dialogVisible1 = true;
  832. },
  833. // 未处理记录处理关闭
  834. handleClose1: function handleClose1(done) {
  835. done();
  836. },
  837. handleClose3: function handleClose3(done) {
  838. this.dialogVisible3 = false;
  839. },
  840. // 批量处理关闭
  841. handleClose: function handleClose(done) {
  842. done();
  843. this.modifyStatus = false;
  844. },
  845. // 批量处理
  846. batchProcessing: function batchProcessing() {
  847. this.dialogVisible = true;
  848. this.formRoom = {
  849. name: '',
  850. address: '',
  851. floorNum: '',
  852. region: ''
  853. };
  854. this.modifyStatus = false;
  855. },
  856. // 分页
  857. handleSizeChange: function handleSizeChange(val) {
  858. this.pageSize = val;
  859. this.getlist1();
  860. console.log("\u6BCF\u9875 " + val + " \u6761");
  861. },
  862. handleCurrentChange: function handleCurrentChange(val) {
  863. this.currentPage = val;
  864. this.getlist1();
  865. console.log("\u5F53\u524D\u9875: " + val);
  866. },
  867. // 分页
  868. handleSizeChange1: function handleSizeChange1(val) {
  869. this.pageSize1 = val;
  870. this.getDevice();
  871. console.log("\u6BCF\u9875 " + val + " \u6761");
  872. },
  873. handleCurrentChange1: function handleCurrentChange1(val) {
  874. this.currentPage1 = val;
  875. this.getDevice();
  876. console.log("\u5F53\u524D\u9875: " + val);
  877. },
  878. // 表头样式
  879. rowClass: function rowClass(_ref) {
  880. var row = _ref.row,
  881. rowIndex = _ref.rowIndex;
  882. return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
  883. },
  884. // 表格勾选
  885. handleSelectionChange: function handleSelectionChange(val) {
  886. this.multipleSelection = val;
  887. if (val.length > 0) {
  888. this.batch = false;
  889. } else {
  890. this.batch = true;
  891. }
  892. },
  893. // 高级查询显示
  894. advancedQueryFun: function advancedQueryFun() {
  895. if (this.advancedQueryStatus) {
  896. this.advancedQueryText = "高级查询";
  897. this.advancedQueryStatus = false;
  898. } else {
  899. this.advancedQueryText = "同用查询";
  900. this.advancedQueryStatus = true;
  901. }
  902. },
  903. // 批量处理备注监控
  904. textareaFun: function textareaFun(e) {
  905. this.textarea = e;
  906. },
  907. // 输入监控
  908. InputFun: function InputFun(e) {
  909. console.log(e);
  910. },
  911. // 单个/多个查询切换
  912. switchFun: function switchFun() {
  913. this.selected = !this.selected;
  914. }
  915. },
  916. mounted: function mounted() {}
  917. });
  918. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-7c3a334c","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/doorMagnetism/Architecture.vue
  919. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"container"}},[_c('div',{staticClass:"alarmrecord"},[_c('el-card',{staticClass:"box-card"},[_c('el-row',{},[_c('div',{staticClass:"search"},[_c('el-form',{staticClass:"demo-form-inline",attrs:{"inline":true,"model":_vm.formInline}},[(_vm.userInfo.type==0)?_c('el-form-item',{attrs:{"label":""}},[_c('selectoption')],1):_vm._e(),_vm._v(" "),_c('el-form-item',{attrs:{"label":"单位名称:"}},[_c('el-select',{staticClass:"w200",attrs:{"size":"small","clearable":"","placeholder":"请选择所属单位"},model:{value:(_vm.formInline.enterpriseId),callback:function ($$v) {_vm.$set(_vm.formInline, "enterpriseId", $$v)},expression:"formInline.enterpriseId"}},_vm._l((_vm.enterpriselist),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.name,"value":item.id}})}),1)],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"建筑物:"}},[_c('el-input',{attrs:{"placeholder":"请输入建筑物名称","size":"small","clearable":true},model:{value:(_vm.formInline.name),callback:function ($$v) {_vm.$set(_vm.formInline, "name", $$v)},expression:"formInline.name"}})],1),_vm._v(" "),_c('el-form-item',[_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.reset}},[_vm._v("重置")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.getlist}},[_vm._v("查询")])],1)],1)],1)]),_vm._v(" "),_c('el-row',{staticClass:"marginTop"},[_c('div',{staticClass:"tablecell"},[_c('el-row',{staticClass:"floatRight"},[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.exportFun}},[_vm._v("导出")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.batchProcessing}},[_vm._v("新增")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","size":"mini","disabled":_vm.batch},on:{"click":_vm.deleteAllList}},[_vm._v("删除")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticStyle:{"width":"100%"},attrs:{"data":_vm.tableData,"border":true,"tooltip-effect":"dark","header-cell-style":_vm.rowClass,"row-key":"id","default-expand-all":true,"tree-props":{children: 'children', hasChildren: 'hasChildren'},"cell-style":{fontSize:'12px'},"stripe":"","height":"590"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"建筑物名称","width":"120"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"enterpriseName","label":"所属单位","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"address","label":"详细地址","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"快捷操作","width":"340"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.getdevicesstatu(scope.$index, scope.row)}}},[_vm._v("\n 设备")]),_vm._v(" "),(scope.row.type < 2)?_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.addRoom(scope.$index, scope.row)}}},[_vm._v("\n 添加楼栋\n ")]):_vm._e(),_vm._v(" "),(scope.row.type==2)?_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.addRoom1(scope.$index, scope.row)}}},[_vm._v("\n 添加房间\n ")]):_vm._e(),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.modifyRoom(scope.$index, scope.row)}}},[_vm._v("\n 编辑\n ")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","size":"mini"},on:{"click":function($event){return _vm.deleRoom(scope.$index, scope.row)}}},[_vm._v("删除\n ")])]}}])})],1)],1),_vm._v(" "),_c('div',{staticClass:"page"},[_c('el-pagination',{attrs:{"current-page":_vm.currentPage,"page-sizes":[10, 20, 30, 100],"page-size":_vm.pageSize,"layout":"to
  920. var staticRenderFns = []
  921. var esExports = { render: render, staticRenderFns: staticRenderFns }
  922. /* harmony default export */ var doorMagnetism_Architecture = (esExports);
  923. // CONCATENATED MODULE: ./src/views/doorMagnetism/Architecture.vue
  924. function injectStyle (ssrContext) {
  925. __webpack_require__("Xx+o")
  926. }
  927. var normalizeComponent = __webpack_require__("VU/8")
  928. /* script */
  929. /* template */
  930. /* template functional */
  931. var __vue_template_functional__ = false
  932. /* styles */
  933. var __vue_styles__ = injectStyle
  934. /* scopeId */
  935. var __vue_scopeId__ = "data-v-7c3a334c"
  936. /* moduleIdentifier (server only) */
  937. var __vue_module_identifier__ = null
  938. var Component = normalizeComponent(
  939. Architecture,
  940. doorMagnetism_Architecture,
  941. __vue_template_functional__,
  942. __vue_styles__,
  943. __vue_scopeId__,
  944. __vue_module_identifier__
  945. )
  946. /* harmony default export */ var views_doorMagnetism_Architecture = __webpack_exports__["default"] = (Component.exports);
  947. /***/ }),
  948. /***/ "pe0Z":
  949. /***/ (function(module, exports) {
  950. module.exports = "/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */\nvar DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;(function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module&&\"undefined\"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();else if(\"function\"==typeof define&&define.amd&&\"undefined\"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();define(\"j\",[],e)}else{var r;\"undefined\"!=typeof globalThis?r=globalThis:\"undefined\"!=typeof window?r=window:\"undefined\"!=typeof global?r=global:\"undefined\"!=typeof $&&$.global?r=$.global:\"undefined\"!=typeof self&&(r=self),r.JSZipSync=e()}})(function(){var e,r,t;return function a(e,r,t){function n(s,f){if(!r[s]){if(!e[s]){var l=typeof require==\"function\"&&require;if(!f&&l)return l(s,!0);if(i)return i(s,!0);throw new Error(\"Cannot find module '\"+s+\"'\")}var o=r[s]={exports:{}};e[s][0].call(o.exports,function(r){var t=e[s][1][r];return n(t?t:r)},o,o.exports,a,e,r,t)}return r[s].exports}var i=typeof require==\"function\"&&require;for(var s=0;s<t.length;s++)n(t[s]);return n}({1:[function(e,r,t){\"use strict\";var a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";t.encode=function(e,r){var t=\"\";var n,i,s,f,l,o,c;var u=0;while(u<e.length){n=e.charCodeAt(u++);i=e.charCodeAt(u++);s=e.charCodeAt(u++);f=n>>2;l=(n&3)<<4|i>>4;o=(i&15)<<2|s>>6;c=s&63;if(isNaN(i)){o=c=64}else if(isNaN(s)){c=64}t=t+a.charAt(f)+a.charAt(l)+a.charAt(o)+a.charAt(c)}return t};t.decode=function(e,r){var t=\"\";var n,i,s;var f,l,o,c;var u=0;e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");while(u<e.length){f=a.indexOf(e.charAt(u++));l=a.indexOf(e.charAt(u++));o=a.indexOf(e.charAt(u++));c=a.indexOf(e.charAt(u++));n=f<<2|l>>4;i=(l&15)<<4|o>>2;s=(o&3)<<6|c;t=t+String.fromCharCode(n);if(o!=64){t=t+String.fromCharCode(i)}if(c!=64){t=t+String.fromCharCode(s)}}return t}},{}],2:[function(e,r,t){\"use strict\";function a(){this.compressedSize=0;this.uncompressedSize=0;this.crc32=0;this.compressionMethod=null;this.compressedContent=null}a.prototype={getContent:function(){return null},getCompressedContent:function(){return null}};r.exports=a},{}],3:[function(e,r,t){\"use strict\";t.STORE={magic:\"\\0\\0\",compress:function(e){return e},uncompress:function(e){return e},compressInputType:null,uncompressInputType:null};t.DEFLATE=e(\"./flate\")},{\"./flate\":8}],4:[function(e,r,t){\"use strict\";var a=e(\"./utils\");var n=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189
  951. /***/ }),
  952. /***/ "wU/G":
  953. /***/ (function(module, exports) {
  954. /* eslint-disable */
  955. /* Blob.js
  956. * A Blob implementation.
  957. * 2014-05-27
  958. *
  959. * By Eli Grey, http://eligrey.com
  960. * By Devin Samarin, https://github.com/eboyjr
  961. * License: X11/MIT
  962. * See LICENSE.md
  963. */
  964. /*global self, unescape */
  965. /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
  966. plusplus: true */
  967. /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
  968. (function (view) {
  969. "use strict";
  970. view.URL = view.URL || view.webkitURL;
  971. if (view.Blob && view.URL) {
  972. try {
  973. new Blob();
  974. return;
  975. } catch (e) {}
  976. }
  977. // Internally we use a BlobBuilder implementation to base Blob off of
  978. // in order to support older browsers that only have BlobBuilder
  979. var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || function (view) {
  980. var get_class = function get_class(object) {
  981. return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
  982. },
  983. FakeBlobBuilder = function BlobBuilder() {
  984. this.data = [];
  985. },
  986. FakeBlob = function Blob(data, type, encoding) {
  987. this.data = data;
  988. this.size = data.length;
  989. this.type = type;
  990. this.encoding = encoding;
  991. },
  992. FBB_proto = FakeBlobBuilder.prototype,
  993. FB_proto = FakeBlob.prototype,
  994. FileReaderSync = view.FileReaderSync,
  995. FileException = function FileException(type) {
  996. this.code = this[this.name = type];
  997. },
  998. file_ex_codes = ("NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR").split(" "),
  999. file_ex_code = file_ex_codes.length,
  1000. real_URL = view.URL || view.webkitURL || view,
  1001. real_create_object_URL = real_URL.createObjectURL,
  1002. real_revoke_object_URL = real_URL.revokeObjectURL,
  1003. URL = real_URL,
  1004. btoa = view.btoa,
  1005. atob = view.atob,
  1006. ArrayBuffer = view.ArrayBuffer,
  1007. Uint8Array = view.Uint8Array;
  1008. FakeBlob.fake = FB_proto.fake = true;
  1009. while (file_ex_code--) {
  1010. FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
  1011. }
  1012. if (!real_URL.createObjectURL) {
  1013. URL = view.URL = {};
  1014. }
  1015. URL.createObjectURL = function (blob) {
  1016. var type = blob.type,
  1017. data_URI_header;
  1018. if (type === null) {
  1019. type = "application/octet-stream";
  1020. }
  1021. if (blob instanceof FakeBlob) {
  1022. data_URI_header = "data:" + type;
  1023. if (blob.encoding === "base64") {
  1024. return data_URI_header + ";base64," + blob.data;
  1025. } else if (blob.encoding === "URI") {
  1026. return data_URI_header + "," + decodeURIComponent(blob.data);
  1027. }if (btoa) {
  1028. return data_URI_header + ";base64," + btoa(blob.data);
  1029. } else {
  1030. return data_URI_header + "," + encodeURIComponent(blob.data);
  1031. }
  1032. } else if (real_create_object_URL) {
  1033. return real_create_object_URL.call(real_URL, blob);
  1034. }
  1035. };
  1036. URL.revokeObjectURL = function (object_URL) {
  1037. if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
  1038. real_revoke_object_URL.call(real_URL, object_URL);
  1039. }
  1040. };
  1041. FBB_proto.append = function (data /*, endings*/) {
  1042. var bb = this.data;
  1043. // decode data to a binary string
  1044. if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
  1045. var str = "",
  1046. buf = new Uint8Array(data),
  1047. i = 0,
  1048. buf_len = buf.length;
  1049. for (; i < buf_len; i++) {
  1050. str += String.fromCharCode(buf[i]);
  1051. }
  1052. bb.push(str);
  1053. } else if (get_class(data) === "Blob" || get_class(data) === "File") {
  1054. if (FileReaderSync) {
  1055. var fr = new FileReaderSync();
  1056. bb.push(fr.readAsBinaryString(data));
  1057. } else {
  1058. // async FileReader won't work as BlobBuilder is sync
  1059. throw new FileException("NOT_READABLE_ERR");
  1060. }
  1061. } else if (data instanceof FakeBlob) {
  1062. if (data.encoding === "base64" && atob) {
  1063. bb.push(atob(data.data));
  1064. } else if (data.encoding === "URI") {
  1065. bb.push(decodeURIComponent(data.data));
  1066. } else if (data.encoding === "raw") {
  1067. bb.push(data.data);
  1068. }
  1069. } else {
  1070. if (typeof data !== "string") {
  1071. data += ""; // convert unsupported types to strings
  1072. }
  1073. // decode UTF-16 to binary string
  1074. bb.push(unescape(encodeURIComponent(data)));
  1075. }
  1076. };
  1077. FBB_proto.getBlob = function (type) {
  1078. if (!arguments.length) {
  1079. type = null;
  1080. }
  1081. return new FakeBlob(this.data.join(""), type, "raw");
  1082. };
  1083. FBB_proto.toString = function () {
  1084. return "[object BlobBuilder]";
  1085. };
  1086. FB_proto.slice = function (start, end, type) {
  1087. var args = arguments.length;
  1088. if (args < 3) {
  1089. type = null;
  1090. }
  1091. return new FakeBlob(this.data.slice(start, args > 1 ? end : this.data.length), type, this.encoding);
  1092. };
  1093. FB_proto.toString = function () {
  1094. return "[object Blob]";
  1095. };
  1096. FB_proto.close = function () {
  1097. this.size = this.data.length = 0;
  1098. };
  1099. return FakeBlobBuilder;
  1100. }(view);
  1101. view.Blob = function Blob(blobParts, options) {
  1102. var type = options ? options.type || "" : "";
  1103. var builder = new BlobBuilder();
  1104. if (blobParts) {
  1105. for (var i = 0, len = blobParts.length; i < len; i++) {
  1106. builder.append(blobParts[i]);
  1107. }
  1108. }
  1109. return builder.getBlob(type);
  1110. };
  1111. })(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this);
  1112. /***/ })
  1113. });