|
|
- webpackJsonp([13],{
-
- /***/ "5z6/":
- /***/ (function(module, exports) {
-
- 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"
-
- /***/ }),
-
- /***/ "Ia/g":
- /***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__("P+fo")(__webpack_require__("pe0Z"))
-
- /***/ }),
-
- /***/ "P+fo":
- /***/ (function(module, exports) {
-
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- module.exports = function(src) {
- function log(error) {
- (typeof console !== "undefined")
- && (console.error || console.log)("[Script Loader]", error);
- }
-
- // Check for IE =< 8
- function isIE() {
- return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined";
- }
-
- try {
- if (typeof execScript !== "undefined" && isIE()) {
- execScript(src);
- } else if (typeof eval !== "undefined") {
- eval.call(null, src);
- } else {
- log("EvalError: No eval function available");
- }
- } catch (error) {
- log(error);
- }
- }
-
-
- /***/ }),
-
- /***/ "Xx+o":
- /***/ (function(module, exports) {
-
- // removed by extract-text-webpack-plugin
-
- /***/ }),
-
- /***/ "aOHy":
- /***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__("P+fo")(__webpack_require__("5z6/"))
-
- /***/ }),
-
- /***/ "mg21":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/keys.js
- var keys = __webpack_require__("fZjL");
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
- var stringify = __webpack_require__("mvHQ");
- var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
-
- // CONCATENATED MODULE: ./src/vendor/Export2Excel.js
- /* eslint-disable */
- __webpack_require__("aOHy");
- __webpack_require__("wU/G");
- __webpack_require__("Ia/g");
- function generateArray(table) {
- var out = [];
- var rows = table.querySelectorAll('tr');
- var ranges = [];
- for (var R = 0; R < rows.length; ++R) {
- var outRow = [];
- var row = rows[R];
- var columns = row.querySelectorAll('td');
- for (var C = 0; C < columns.length; ++C) {
- var cell = columns[C];
- var colspan = cell.getAttribute('colspan');
- var rowspan = cell.getAttribute('rowspan');
- var cellValue = cell.innerText;
- if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
-
- //Skip ranges
- ranges.forEach(function (range) {
- if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
- for (var i = 0; i <= range.e.c - range.s.c; ++i) {
- outRow.push(null);
- }
- }
- });
-
- //Handle Row Span
- if (rowspan || colspan) {
- rowspan = rowspan || 1;
- colspan = colspan || 1;
- ranges.push({ s: { r: R, c: outRow.length }, e: { r: R + rowspan - 1, c: outRow.length + colspan - 1 } });
- }
- ;
-
- //Handle Value
- outRow.push(cellValue !== "" ? cellValue : null);
-
- //Handle Colspan
- if (colspan) for (var k = 0; k < colspan - 1; ++k) {
- outRow.push(null);
- }
- }
- out.push(outRow);
- }
- return [out, ranges];
- };
-
- function datenum(v, date1904) {
- if (date1904) v += 1462;
- var epoch = Date.parse(v);
- return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
- }
-
- function sheet_from_array_of_arrays(data, opts) {
- var ws = {};
- var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } };
- for (var R = 0; R != data.length; ++R) {
- for (var C = 0; C != data[R].length; ++C) {
- if (range.s.r > R) range.s.r = R;
- if (range.s.c > C) range.s.c = C;
- if (range.e.r < R) range.e.r = R;
- if (range.e.c < C) range.e.c = C;
- var cell = { v: data[R][C] };
- if (cell.v == null) continue;
- var cell_ref = XLSX.utils.encode_cell({ c: C, r: R });
-
- if (typeof cell.v === 'number') cell.t = 'n';else if (typeof cell.v === 'boolean') cell.t = 'b';else if (cell.v instanceof Date) {
- cell.t = 'n';
- cell.z = XLSX.SSF._table[14];
- cell.v = datenum(cell.v);
- } else cell.t = 's';
-
- ws[cell_ref] = cell;
- }
- }
- if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
- return ws;
- }
-
- function Workbook() {
- if (!(this instanceof Workbook)) return new Workbook();
- this.SheetNames = [];
- this.Sheets = {};
- }
-
- function s2ab(s) {
- var buf = new ArrayBuffer(s.length);
- var view = new Uint8Array(buf);
- for (var i = 0; i != s.length; ++i) {
- view[i] = s.charCodeAt(i) & 0xFF;
- }return buf;
- }
-
- function export_table_to_excel(id) {
- var theTable = document.getElementById(id);
- console.log('a');
- var oo = generateArray(theTable);
- var ranges = oo[1];
-
- /* original data */
- var data = oo[0];
- var ws_name = "SheetJS";
- console.log(data);
-
- var wb = new Workbook(),
- ws = sheet_from_array_of_arrays(data);
-
- /* add ranges to worksheet */
- // ws['!cols'] = ['apple', 'banan'];
- ws['!merges'] = ranges;
-
- /* add worksheet to workbook */
- wb.SheetNames.push(ws_name);
- wb.Sheets[ws_name] = ws;
-
- var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' });
-
- saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), "test.xlsx");
- }
-
- function formatJson(jsonData) {
- console.log(jsonData);
- }
- function export_json_to_excel(th, jsonData, defaultTitle) {
-
- /* original data */
-
- var data = jsonData;
- data.unshift(th);
- var ws_name = "SheetJS";
-
- var wb = new Workbook(),
- ws = sheet_from_array_of_arrays(data);
-
- /* add worksheet to workbook */
- wb.SheetNames.push(ws_name);
- wb.Sheets[ws_name] = ws;
-
- var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' });
- var title = defaultTitle || '列表';
- saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title + ".xlsx");
- }
- // EXTERNAL MODULE: ./src/api/index.js + 5 modules
- var api = __webpack_require__("gyMJ");
-
- // EXTERNAL MODULE: ./src/utils/index.js
- var utils = __webpack_require__("0xDb");
-
- // EXTERNAL MODULE: ./src/views/doorMagnetism/common/map.vue + 2 modules
- var map = __webpack_require__("xMD2");
-
- // EXTERNAL MODULE: ./node_modules/moment/moment.js
- var moment = __webpack_require__("PJh5");
- var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
-
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/Architecture.vue
-
-
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
-
-
-
-
-
- /* harmony default export */ var Architecture = ({
- // inject: ['reload'],
- name: "alarmRecord",
- data: function data() {
- return {
- // selectoption:[],
- // selectoptionValue:'',
- pageTotal: 0,
- addtitle: "添加楼栋",
- rules: {
- region: [{
- required: true,
- message: '请选择所属单位',
- trigger: 'blur'
- }],
- address: [{
- required: true,
- message: '请输入地址',
- trigger: 'blur'
- }],
- name: [{
- required: true,
- message: '请输入名称',
- trigger: 'blur'
- }],
- floorNum: [{
- required: true,
- message: '请输入楼层',
- trigger: 'blur'
- }]
- },
- dialogVisible2: false,
- titleText: '设备未处理报警记录(IMEI:860709056256857)',
- textarea: '', //批量处理备注
- dialogVisible: false,
- dialogVisible1: false,
- input: '',
- content: '切换单个/多个查询模式',
- selected: true,
- advancedQueryStatus: false,
- advancedQueryText: '高级查询',
- formInline: {
- enterpriseId: '',
- name: ''
- },
- formInline3: {
- count: '',
- name: ''
- },
- tableData: [],
- rowStyle: {
- background: '#f8f9fa',
- fontSize: '12px'
- },
- multipleSelection: [],
- enterpriselist: [],
- formRoom: {
- name: '',
- address: '',
- floorNum: '',
- region: ''
- },
- form1: {
- address: '',
- province: '',
- city: '',
- latitude: 0, // 纬度
- longitude: 0, // 经度
- district: ''
- },
- currentPage: 1,
- currentPage1: 1,
- pageSize: 10,
- pageTotal1: 0,
- batch: true,
- zNodes: [],
- modifyRow: '',
- modifyStatus: false,
- deviceList: [],
- devicerow: '',
- pageSize1: 10,
- dialogVisible3: false,
- addselect: 0,
- userInfo: { type: '' }
- };
- },
-
- components: {
- Map: map["a" /* default */]
- },
- computed: {},
- created: function created() {
- // this.$store.commit('updateTenantId', 400)
- this.userInfo = JSON.parse(localStorage.getItem('info'));
- this.getEnterprise();
- this.getlist();
- // this.selectoption=JSON.parse(localStorage.getItem('selectoption'))
- // this.selectoptionValue=localStorage.getItem('tenantId')
- },
-
- methods: {
- // selectTenantId(e) {
- // localStorage.setItem('tenantId', e)
- // this.reload()
- // },
- addsaveEdit: function addsaveEdit() {
- var _this2 = this;
-
- var count = this.formInline3.count;
- var name = this.formInline3.name;
- var data = {
- ancestor: this.addrow.id,
- count: count,
- site: {
- address: this.addrow.address,
- name: name,
- type: 1,
- enterpriseId: this.addrow.enterpriseId
- }
- };
- if (this.addselect == 0) {
- data = {
- ancestor: this.addrow.id,
- count: count,
- site: {
- address: this.addrow.address,
- name: name,
- type: 1,
- enterpriseId: this.addrow.enterpriseId
- }
- };
- } else if (this.addselect == 1) {
- data = {
- ancestor: this.addrow.id,
- count: count,
- site: {
- address: this.addrow.address,
- name: name,
- type: 1,
- isRoom: 0,
- enterpriseId: this.addrow.enterpriseId
- }
- };
- }
- Object(api["g" /* httpPost */])(data, this.$api.addNodes).then(function (res) {
- if (res.success) {
- _this2.dialogVisible3 = false;
- _this2.getlist();
- _this2.$message.success("添加成功");
- } else {
- _this2.$message.error("添加失败");
- }
- }).error(function (er) {
- _this2.$message.error("添加失败");
- });
- },
- addRoom: function addRoom(index, row) {
- this.addselect = 0;
- this.addrow = row;
- this.dialogVisible3 = true;
- },
- addRoom1: function addRoom1(index, row) {
- this.addselect = 1;
- this.addrow = row;
- this.dialogVisible3 = true;
- },
- exportFun: function exportFun() {
- var _this3 = this;
-
- var data = {
- pageNum: 10,
- pageSize: 0,
- q: stringify_default()({
- enterpriseId: this.formInline.enterpriseId,
- name: this.formInline.name
- })
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- if (res.success) {
- res.data.list.list.map(function (li) {
- _this3.enterpriselist.find(function (item, index) {
- if (item.id == li.enterpriseId) {
- li['enterpriseName'] = item.name;
- }
- });
- });
- new Promise(function(resolve) { resolve(); }).then((function () {
- var tHeader = ['房源ID', '建筑物名称', '所属单位ID', '所属单位名称', '详细地址', '设备IMEI'];
- var filterVal = ['id', 'name', 'enterpriseId', 'enterpriseName', 'address', 'imei'];
- var data = _this3.formatJson(filterVal, res.data.list.list);
- export_json_to_excel(tHeader, data, '房源列表');
- }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
- } else {
- _this3.$message.error("导出失败");
- }
- });
- },
- formatJson: function formatJson(filterVal, jsonData) {
- return jsonData.map(function (v) {
- return filterVal.map(function (j) {
- return v[j];
- });
- });
- },
-
- // 批量删除
- deleteAllList: function deleteAllList() {
- var _this4 = this;
-
- var multipleSelection = this.multipleSelection;
- if (multipleSelection.length == 0) {
- this.$message.error("请选择要删除的房源");
- } else {
- var _this = this;
- this.$confirm("确定要删除吗?", "提示", {
- type: "warning"
- }).then(function () {
- _this4.currentPage = 1;
- var ids = [];
- multipleSelection.map(function (li) {
- ids.push(li.id);
- });
- var data = {
- ids: ids
- };
- Object(api["g" /* httpPost */])(data, _this.$api.deleteRoom).then(function (res) {
- if (res.success) {
- _this.getlist();
- _this.$message.success("删除成功");
- } else {
- _this.$message.error("删除失败");
- }
- });
- });
- }
- },
-
- // 删除建筑
- deleRoom: function deleRoom(index, row) {
- var _this = this;
- this.$confirm("确定要删除吗?", "提示", {
- type: "warning"
- }).then(function () {
- var data = {
- ids: [row.id]
- };
- Object(api["g" /* httpPost */])(data, _this.$api.deleteRoom).then(function (res) {
- if (res.success) {
- _this.getlist();
- _this.$message.success("删除成功");
- } else {
- _this.$message.error("删除失败");
- }
- });
- });
- },
-
- // 获取对应设备
- getdevicesstatu: function getdevicesstatu(index, row) {
- this.dialogVisible1 = true;
- this.devicerow = row;
- this.getDevice();
- },
- getDevice: function getDevice() {
- var _this5 = this;
-
- var data = {
- q: stringify_default()({
- roomId: this.devicerow.id
- }),
- pageSize: this.pageSize1,
- pageNum: this.currentPage1
- };
- Object(api["g" /* httpPost */])(data, this.$api.getList).then(function (res) {
- if (res.success) {
- res.data.list.map(function (li) {
- if (li.lastReportAt) {
- li.lastReportAt = moment_default()(li.lastReportAt).format('YYYY/MM/DD HH:mm:ss');
- }
- });
- _this5.deviceList = res.data.list;
- _this5.pageTotal1 = res.data.total;
- } else {
- _this5.$message.console.error("查询失败");
- }
- });
- },
- reset: function reset() {
- var formInline = {
- enterpriseId: '',
- name: ''
- };
- this.formInline = formInline;
- },
-
- // 修改房源
- modifyRoom: function modifyRoom(index, row) {
- var formRoom = {
- name: row.name,
- address: row.address,
- region: row.enterpriseId
- };
- this.formRoom = formRoom;
- this.modifyRow = row;
- this.dialogVisible = true;
- this.modifyStatus = true;
- },
- updateRoom: function updateRoom() {
- var _this6 = this;
-
- var info = localStorage.getItem("info");
- var formRoom = this.formRoom;
- var data = {
- list: [{
- id: this.modifyRow.id,
- address: formRoom.address,
- name: formRoom.name
- }]
- };
- if (formRoom.name == "") {
- this.$message.error("建筑名称不能为空");
- } else {
- Object(api["g" /* httpPost */])(data, this.$api.updatePlace).then(function (res) {
- if (res.success) {
- _this6.$message.success("修改成功");
- _this6.dialogVisible = false;
- _this6.getlist();
- } else {
- _this6.$message.error("修改失败");
- }
- });
- }
- },
-
- // 保存房源
- saveEdit: function saveEdit() {
- var _this7 = this;
-
- var info = localStorage.getItem("info");
- var formRoom = this.formRoom;
- if (formRoom.name == "") {
- this.$message.error("建筑名称不能为空");
- } else {
- var names = this.formRoom.name1.split('、');
- var counts = this.formRoom.floorNum.split('、');
- var data = {
- address: formRoom.address,
- counts: counts,
- enterpriseId: formRoom.region,
- names: names,
- rootName: formRoom.name
- };
- Object(api["g" /* httpPost */])(data, this.$api.createModPlace).then(function (res) {
- if (res.success) {
- _this7.dialogVisible = false;
- _this7.getlist();
- _this7.$message.success("创建成功");
- } else {
- _this7.$message.error("创建失败");
- }
- });
- }
- },
- yz: function yz(obj) {
- var str = {};
- keys_default()(obj).forEach(function (key) {
- if (obj[key] != '') {
- str[key] = obj[key];
- }
- });
- return str;
- },
-
- // 获取列表
- getlist: function getlist() {
- var _this8 = this;
-
- var q = this.yz(this.formInline);
- var data = {
- pageNum: 1,
- pageSize: this.pageSize,
- orderBy: "create_time desc",
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- if (res.data.list.length > 0) {
- res.data.list.list.map(function (li) {
- _this8.enterpriselist.find(function (item, index) {
- if (item.id == li.enterpriseId) {
- li['enterpriseName'] = item.name;
- }
- });
- });
- var arrdata = Object(utils["n" /* uniqueArray */])(res.data.list.list, "id");
- _this8.tableData = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
- // this.tableData=res.data.list
- _this8.pageTotal = res.data.list.total;
- } else {
- _this8.tableData = [];
- _this8.pageTotal = 0;
- }
- });
- },
- getlist1: function getlist1() {
- var _this9 = this;
-
- var q = this.yz(this.formInline);
- var data = {
- pageNum: this.currentPage,
- pageSize: this.pageSize,
- orderBy: "create_time desc",
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- if (res.data.list.list.length > 0) {
- res.data.list.list.map(function (li) {
- _this9.enterpriselist.find(function (item, index) {
- if (item.id == li.enterpriseId) {
- li['enterpriseName'] = item.name;
- }
- });
- });
- var arrdata = Object(utils["n" /* uniqueArray */])(res.data.list.list, "id");
- _this9.tableData = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
- // this.tableData=res.data.list
- _this9.pageTotal = res.data.list.total;
- } else {
- _this9.tableData = [];
- _this9.pageTotal = 0;
- }
- });
- },
- openMap: function openMap() {
- if (this.form.longitude == 'undefined' && this.form.latitude == 'undefined') {
- this.$refs.map.open();
- } else {
- this.$refs.map.open(this.form1);
- }
- },
- updateLocation: function updateLocation(orgAddr, lon, lat, province, city, district) {
- this.form1 = {
- address: orgAddr,
- province: province,
- city: city,
- latitude: lat, // 纬度
- longitude: lon, // 经度
- district: district
- };
- },
-
- // 获取单位
- getEnterprise: function getEnterprise() {
- var _this10 = this;
-
- var data = {
- q: stringify_default()({
- name: this.formInline.name
- })
- };
- Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
- if (res.success) {
- _this10.enterpriselist = res.data.list;
- _this10.zNodes = [];
- _this10.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {});
- } else {
- _this10.$message.error("获取失败");
- }
- });
- },
-
- // 未处理记录打开
- recordFun: function recordFun() {
- this.dialogVisible1 = true;
- },
-
- // 未处理记录处理关闭
- handleClose1: function handleClose1(done) {
- done();
- },
- handleClose3: function handleClose3(done) {
- this.dialogVisible3 = false;
- },
-
- // 批量处理关闭
- handleClose: function handleClose(done) {
- done();
- this.modifyStatus = false;
- },
-
- // 批量处理
- batchProcessing: function batchProcessing() {
- this.dialogVisible = true;
- this.formRoom = {
- name: '',
- address: '',
- floorNum: '',
- region: ''
- };
- this.modifyStatus = false;
- },
-
- // 分页
- handleSizeChange: function handleSizeChange(val) {
- this.pageSize = val;
- this.getlist1();
- console.log("\u6BCF\u9875 " + val + " \u6761");
- },
- handleCurrentChange: function handleCurrentChange(val) {
- this.currentPage = val;
- this.getlist1();
- console.log("\u5F53\u524D\u9875: " + val);
- },
-
- // 分页
- handleSizeChange1: function handleSizeChange1(val) {
- this.pageSize1 = val;
- this.getDevice();
- console.log("\u6BCF\u9875 " + val + " \u6761");
- },
- handleCurrentChange1: function handleCurrentChange1(val) {
- this.currentPage1 = val;
- this.getDevice();
- console.log("\u5F53\u524D\u9875: " + val);
- },
-
- // 表头样式
- rowClass: function rowClass(_ref) {
- var row = _ref.row,
- rowIndex = _ref.rowIndex;
-
- return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
- },
-
- // 表格勾选
- handleSelectionChange: function handleSelectionChange(val) {
- this.multipleSelection = val;
- if (val.length > 0) {
- this.batch = false;
- } else {
- this.batch = true;
- }
- },
-
- // 高级查询显示
- advancedQueryFun: function advancedQueryFun() {
- if (this.advancedQueryStatus) {
- this.advancedQueryText = "高级查询";
- this.advancedQueryStatus = false;
- } else {
- this.advancedQueryText = "同用查询";
- this.advancedQueryStatus = true;
- }
- },
-
- // 批量处理备注监控
- textareaFun: function textareaFun(e) {
- this.textarea = e;
- },
-
- // 输入监控
- InputFun: function InputFun(e) {
- console.log(e);
- },
-
- // 单个/多个查询切换
- switchFun: function switchFun() {
- this.selected = !this.selected;
- }
- },
- mounted: function mounted() {}
- });
- // 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
- 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
- var staticRenderFns = []
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ var doorMagnetism_Architecture = (esExports);
- // CONCATENATED MODULE: ./src/views/doorMagnetism/Architecture.vue
- function injectStyle (ssrContext) {
- __webpack_require__("Xx+o")
- }
- var normalizeComponent = __webpack_require__("VU/8")
- /* script */
-
-
- /* template */
-
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = "data-v-7c3a334c"
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- Architecture,
- doorMagnetism_Architecture,
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
-
- /* harmony default export */ var views_doorMagnetism_Architecture = __webpack_exports__["default"] = (Component.exports);
-
-
- /***/ }),
-
- /***/ "pe0Z":
- /***/ (function(module, exports) {
-
- 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
-
- /***/ }),
-
- /***/ "wU/G":
- /***/ (function(module, exports) {
-
- /* eslint-disable */
- /* Blob.js
- * A Blob implementation.
- * 2014-05-27
- *
- * By Eli Grey, http://eligrey.com
- * By Devin Samarin, https://github.com/eboyjr
- * License: X11/MIT
- * See LICENSE.md
- */
-
- /*global self, unescape */
- /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
- plusplus: true */
-
- /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
-
- (function (view) {
- "use strict";
-
- view.URL = view.URL || view.webkitURL;
-
- if (view.Blob && view.URL) {
- try {
- new Blob();
- return;
- } catch (e) {}
- }
-
- // Internally we use a BlobBuilder implementation to base Blob off of
- // in order to support older browsers that only have BlobBuilder
- var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || function (view) {
- var get_class = function get_class(object) {
- return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
- },
- FakeBlobBuilder = function BlobBuilder() {
- this.data = [];
- },
- FakeBlob = function Blob(data, type, encoding) {
- this.data = data;
- this.size = data.length;
- this.type = type;
- this.encoding = encoding;
- },
- FBB_proto = FakeBlobBuilder.prototype,
- FB_proto = FakeBlob.prototype,
- FileReaderSync = view.FileReaderSync,
- FileException = function FileException(type) {
- this.code = this[this.name = type];
- },
- 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(" "),
- file_ex_code = file_ex_codes.length,
- real_URL = view.URL || view.webkitURL || view,
- real_create_object_URL = real_URL.createObjectURL,
- real_revoke_object_URL = real_URL.revokeObjectURL,
- URL = real_URL,
- btoa = view.btoa,
- atob = view.atob,
- ArrayBuffer = view.ArrayBuffer,
- Uint8Array = view.Uint8Array;
- FakeBlob.fake = FB_proto.fake = true;
- while (file_ex_code--) {
- FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
- }
- if (!real_URL.createObjectURL) {
- URL = view.URL = {};
- }
- URL.createObjectURL = function (blob) {
- var type = blob.type,
- data_URI_header;
- if (type === null) {
- type = "application/octet-stream";
- }
- if (blob instanceof FakeBlob) {
- data_URI_header = "data:" + type;
- if (blob.encoding === "base64") {
- return data_URI_header + ";base64," + blob.data;
- } else if (blob.encoding === "URI") {
- return data_URI_header + "," + decodeURIComponent(blob.data);
- }if (btoa) {
- return data_URI_header + ";base64," + btoa(blob.data);
- } else {
- return data_URI_header + "," + encodeURIComponent(blob.data);
- }
- } else if (real_create_object_URL) {
- return real_create_object_URL.call(real_URL, blob);
- }
- };
- URL.revokeObjectURL = function (object_URL) {
- if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
- real_revoke_object_URL.call(real_URL, object_URL);
- }
- };
- FBB_proto.append = function (data /*, endings*/) {
- var bb = this.data;
- // decode data to a binary string
- if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
- var str = "",
- buf = new Uint8Array(data),
- i = 0,
- buf_len = buf.length;
- for (; i < buf_len; i++) {
- str += String.fromCharCode(buf[i]);
- }
- bb.push(str);
- } else if (get_class(data) === "Blob" || get_class(data) === "File") {
- if (FileReaderSync) {
- var fr = new FileReaderSync();
- bb.push(fr.readAsBinaryString(data));
- } else {
- // async FileReader won't work as BlobBuilder is sync
- throw new FileException("NOT_READABLE_ERR");
- }
- } else if (data instanceof FakeBlob) {
- if (data.encoding === "base64" && atob) {
- bb.push(atob(data.data));
- } else if (data.encoding === "URI") {
- bb.push(decodeURIComponent(data.data));
- } else if (data.encoding === "raw") {
- bb.push(data.data);
- }
- } else {
- if (typeof data !== "string") {
- data += ""; // convert unsupported types to strings
- }
- // decode UTF-16 to binary string
- bb.push(unescape(encodeURIComponent(data)));
- }
- };
- FBB_proto.getBlob = function (type) {
- if (!arguments.length) {
- type = null;
- }
- return new FakeBlob(this.data.join(""), type, "raw");
- };
- FBB_proto.toString = function () {
- return "[object BlobBuilder]";
- };
- FB_proto.slice = function (start, end, type) {
- var args = arguments.length;
- if (args < 3) {
- type = null;
- }
- return new FakeBlob(this.data.slice(start, args > 1 ? end : this.data.length), type, this.encoding);
- };
- FB_proto.toString = function () {
- return "[object Blob]";
- };
- FB_proto.close = function () {
- this.size = this.data.length = 0;
- };
- return FakeBlobBuilder;
- }(view);
-
- view.Blob = function Blob(blobParts, options) {
- var type = options ? options.type || "" : "";
- var builder = new BlobBuilder();
- if (blobParts) {
- for (var i = 0, len = blobParts.length; i < len; i++) {
- builder.append(blobParts[i]);
- }
- }
- return builder.getBlob(type);
- };
- })(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this);
-
- /***/ })
-
- });
|