191 lines
12 KiB
JavaScript
191 lines
12 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-2397fff0"], { "12b8": function(t, e, n) {
|
|
"use strict";
|
|
n.r(e);
|
|
var i = function() {
|
|
var t2 = this, e2 = t2.$createElement, n2 = t2._self._c || e2;
|
|
return n2("div", [n2("div", { staticClass: "app-container bgHeight" }, [n2("div", { ref: "box", staticClass: "searchStys transition_dom" }, [n2("el-form", { ref: "query", attrs: { model: t2.query } }, [n2("div", { ref: "form_box", staticClass: "searchBar" }, [n2("div", { staticClass: "searchInput" }, [n2("el-row", { attrs: { gutter: 20 } }, [n2("el-col", { attrs: { span: 6 } }, [n2("el-form-item", [n2("el-input", { attrs: { clearable: "", placeholder: "电表编号" }, model: { value: t2.query.deviceNo, callback: function(e3) {
|
|
t2.$set(t2.query, "deviceNo", e3);
|
|
}, expression: "query.deviceNo" } })], 1)], 1), t2._v(" "), n2("el-col", { attrs: { span: 6 } }, [n2("el-form-item", [n2("el-input", { attrs: { clearable: "", placeholder: "绑定房间" }, model: { value: t2.query.roomNum, callback: function(e3) {
|
|
t2.$set(t2.query, "roomNum", e3);
|
|
}, expression: "query.roomNum" } })], 1)], 1)], 1)], 1), t2._v(" "), n2("div", { staticClass: "searchBtn" }, [n2("el-form-item", [n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(e3) {
|
|
return t2.resetForm("query");
|
|
} } }, [t2._v("重置")]), t2._v(" "), n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: t2.onSearch } }, [t2._v("查询")]), t2._v(" "), t2.is_show || "80px" == t2.height ? t2._e() : n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "text" }, on: { click: t2.upAndDown } }, [t2._v("展开"), n2("i", { staticClass: "el-icon-arrow-down" })]), t2._v(" "), t2.is_show && "80px" != t2.height ? n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "text" }, on: { click: t2.upAndDown } }, [t2._v("收起"), n2("i", { staticClass: "el-icon-arrow-up" })]) : t2._e()], 1)], 1)])])], 1), t2._v(" "), n2("el-card", { staticClass: "box-card" }, [n2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [n2("span", { staticClass: "planTitle" }, [t2._v("电表列表")]), t2._v(" "), n2("div", [n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary", icon: "el-icon-plus" }, on: { click: t2.addNewItem } }, [t2._v("添加")])], 1)]), t2._v(" "), n2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: t2.listLoading, expression: "listLoading" }], ref: "multipleTable", attrs: { border: "", data: t2.listData } }, [n2("el-table-column", { attrs: { label: "#", type: "index", align: "center", width: "50", fixed: "" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [n2("span", [t2._v(t2._s(e3.$index + (t2.query.pageNumber - 1) * t2.query.pageSize + 1) + "\n ")])];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "电表编号" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [n2("span", [t2._v(t2._s(e3.row.deviceNo))])];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "管理区名称" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [n2("span", [t2._v(t2._s(e3.row.precinct))])];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "楼栋" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [n2("span", [t2._v(t2._s(e3.row.building))])];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "单元号" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [t2._v("\n " + t2._s(e3.row.unit) + "\n ")];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "绑定房间号" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [t2._v("\n " + t2._s(e3.row.roomNum) + "\n ")];
|
|
} }]) }), t2._v(" "), n2("el-table-column", { attrs: { align: "center", label: "操作", fixed: "right" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { size: "mini", type: "text" }, on: { click: function(n3) {
|
|
return t2.seeDetail(e3.row);
|
|
} } }, [t2._v("查看")]), t2._v(" "), n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { size: "mini", type: "text" }, on: { click: function(n3) {
|
|
return t2.editItem(e3.row);
|
|
} } }, [t2._v("编辑")]), t2._v(" "), n2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { size: "mini", type: "text" }, on: { click: function(n3) {
|
|
return t2.delItem(e3.row);
|
|
} } }, [t2._v("删除")])];
|
|
} }]) })], 1), t2._v(" "), n2("div", { staticClass: "pagination-container", staticStyle: { "margin-top": "10px", "text-align": "right" } }, [n2("el-pagination", { attrs: { background: "", "current-page": t2.query.pageNumber, "page-sizes": [10, 30, 50, 100, 200], "page-size": t2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", total: t2.total }, on: { "update:currentPage": function(e3) {
|
|
return t2.$set(t2.query, "pageNumber", e3);
|
|
}, "update:current-page": function(e3) {
|
|
return t2.$set(t2.query, "pageNumber", e3);
|
|
}, "size-change": t2.handleSizeChange, "current-change": t2.handleCurrentChange } })], 1)], 1)], 1)]);
|
|
}, r = [], o = n("90ed");
|
|
function a(t2) {
|
|
return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) {
|
|
return typeof t3;
|
|
} : function(t3) {
|
|
return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
|
|
}, a(t2);
|
|
}
|
|
var s = { data: function() {
|
|
return { is_show: false, height: "", listData: [], listLoading: false, total: 0, showSee: false, direction: "rtl", info: {}, query: { pageNumber: 1, pageSize: 10, deviceNo: "", roomNum: "", projectCode: "" }, uuid: "", statusArr: [{ label: "已绑定", value: "1" }, { label: "未绑定", value: "0" }], multipleSelection: [] };
|
|
}, created: function() {
|
|
this.uuid = this.$store.state.community_uuid, this.query.projectCode = this.uuid, this.getList();
|
|
}, mounted: function() {
|
|
this.getRealHeight();
|
|
}, methods: { removeEmpty: (function(t2) {
|
|
function e2(e3) {
|
|
return t2.apply(this, arguments);
|
|
}
|
|
return e2.toString = function() {
|
|
return t2.toString();
|
|
}, e2;
|
|
})((function(t2) {
|
|
return Object.keys(t2).forEach((function(e2) {
|
|
t2[e2] && "object" === a(t2[e2]) ? removeEmpty(t2[e2]) : null !== t2[e2] && "" !== t2[e2] || delete t2[e2];
|
|
})), t2;
|
|
})), getList: function() {
|
|
var t2 = this;
|
|
Object(o["d"])(this.removeEmpty(this.query)).then((function(e2) {
|
|
e2 && e2.data && (t2.listData = e2.data.records, t2.total = e2.data.rowsCount);
|
|
})), this.listLoading = false;
|
|
}, onSearch: function() {
|
|
this.query.pageNumber = 1, this.getList();
|
|
}, resetForm: function() {
|
|
this.query.pageNumber = 1, this.query.deviceNo = "", this.query.roomNum = "", this.getList();
|
|
}, addNewItem: function() {
|
|
this.$router.push({ path: "/viewInfo/addEnery" });
|
|
}, seeDetail: function(t2) {
|
|
console.log("data", t2), this.$router.push({ path: "/viewInfo/eneryManage", query: { IDS: t2.id } });
|
|
}, editItem: function(t2) {
|
|
this.$router.push({ path: "/viewInfo/addEnery", query: { IDS: t2.id } });
|
|
}, handleSizeChange: function(t2) {
|
|
this.query.pageSize = t2, this.getList();
|
|
}, handleCurrentChange: function(t2) {
|
|
this.query.pageNumber = t2, this.getList();
|
|
}, delItem: function(t2) {
|
|
var e2 = this;
|
|
this.$confirm("此操作将删除该电表设备, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
|
|
e2.del(t2);
|
|
})).catch((function() {
|
|
}));
|
|
}, disableItem: function(t2) {
|
|
var e2 = this;
|
|
this.$confirm("此操作将禁用该电表设备, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
|
|
e2.disable(t2, 1);
|
|
})).catch((function() {
|
|
}));
|
|
}, recoveryItem: function(t2) {
|
|
var e2 = this;
|
|
this.$confirm("确定将该禁用的电表设备恢复吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
|
|
e2.disable(t2, 0);
|
|
})).catch((function() {
|
|
}));
|
|
}, disable: function(t2) {
|
|
var e2 = this, n2 = { id: t2.id };
|
|
Object(o["i"])(n2).then((function(t3) {
|
|
0 === t3.code && null != t3.data ? (e2.$message({ type: "success", message: "操作成功!" }), e2.getList()) : (e2.$message({ type: "success", message: "操作失败!" }), e2.getList());
|
|
}));
|
|
}, del: function(t2) {
|
|
var e2 = this, n2 = { id: t2.id };
|
|
Object(o["c"])(n2).then((function(t3) {
|
|
e2.$message({ type: "success", message: "删除成功!" }), e2.getList();
|
|
}));
|
|
}, upAndDown: function() {
|
|
this.is_show ? this.$refs.box.style.height = "80px" : this.$refs.box.style.height = this.height, this.is_show = !this.is_show;
|
|
}, getRealHeight: function() {
|
|
this.$nextTick((function() {
|
|
this.height = this.$refs.form_box.offsetHeight + "px";
|
|
}));
|
|
}, getArByKey: function(t2, e2, n2, i2) {
|
|
if (0 === n2) return t2.map((function(t3) {
|
|
return t3[e2];
|
|
}));
|
|
var r2 = void 0 === i2 ? "," : i2;
|
|
return t2.map((function(t3) {
|
|
return t3[e2];
|
|
})).join(r2);
|
|
}, memoryChecked: function() {
|
|
var t2 = this, e2 = [];
|
|
this.multipleSelection.forEach((function(t3) {
|
|
e2.push(t3.deviceStandardUuid);
|
|
})), e2.length && this.$nextTick((function() {
|
|
t2.listData.forEach((function(n2, i2) {
|
|
console.log(n2), e2.indexOf(n2.deviceStandardUuid) >= 0 && t2.$refs.multipleTable.toggleRowSelection(n2, true);
|
|
}));
|
|
}));
|
|
}, handleSelectionChange: function(t2) {
|
|
this.multipleSelection = t2;
|
|
} } }, u = s, c = n("829d"), l = Object(c["a"])(u, i, r, false, null, null, null);
|
|
e["default"] = l.exports;
|
|
}, "90ed": function(t, e, n) {
|
|
"use strict";
|
|
n.d(e, "a", (function() {
|
|
return r;
|
|
})), n.d(e, "b", (function() {
|
|
return o;
|
|
})), n.d(e, "i", (function() {
|
|
return a;
|
|
})), n.d(e, "c", (function() {
|
|
return s;
|
|
})), n.d(e, "d", (function() {
|
|
return u;
|
|
})), n.d(e, "f", (function() {
|
|
return c;
|
|
})), n.d(e, "h", (function() {
|
|
return l;
|
|
})), n.d(e, "g", (function() {
|
|
return p;
|
|
})), n.d(e, "e", (function() {
|
|
return d;
|
|
})), n.d(e, "j", (function() {
|
|
return f;
|
|
}));
|
|
var i = n("b775");
|
|
function r(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/create", method: "post", data: t2 });
|
|
}
|
|
function o(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/checkMetersNoIsExist", method: "post", data: t2 });
|
|
}
|
|
function a(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/update", method: "post", data: t2 });
|
|
}
|
|
function s(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/delete", method: "post", data: t2 });
|
|
}
|
|
function u(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/pageList", method: "post", data: t2 });
|
|
}
|
|
function c(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/findById", method: "post", data: t2 });
|
|
}
|
|
function l(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersOrder/pageList", method: "post", data: t2 });
|
|
}
|
|
function p(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/getMeterkWh", method: "post", data: t2 });
|
|
}
|
|
function d(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/getMeterBalance", method: "post", data: t2 });
|
|
}
|
|
function f(t2) {
|
|
return Object(i["a"])({ url: "/appproject/MetersInfo/setMeterSwitchStatus", method: "post", data: t2 });
|
|
}
|
|
} }]);
|