(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-3eed9936"], { "872b": function(e, t, a) { }, a9db: function(e, t, a) { "use strict"; a("872b"); }, abf9: function(e, t, a) { "use strict"; a.r(t); var r = function() { var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2; return a2("div", { staticClass: "app-container" }, [a2("div", { staticClass: "bgHeight" }, [a2("div", { ref: "box", staticClass: "searchStys transition_dom" }, [a2("el-form", { ref: "queryInfo", attrs: { model: e2.queryInfo } }, [a2("div", { ref: "form_box", staticClass: "searchBar" }, [a2("div", { staticClass: "searchInput" }, [a2("el-row", { attrs: { gutter: 20 } }, [a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { prop: "name" } }, [a2("el-input", { attrs: { clearable: "", placeholder: "边设备名称" }, model: { value: e2.queryInfo.name, callback: function(t3) { e2.$set(e2.queryInfo, "name", t3); }, expression: "queryInfo.name" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { prop: "deviceTypeId" } }, [a2("el-select", { attrs: { placeholder: "请选择边设备类型", clearable: "" }, model: { value: e2.queryInfo.deviceTypeId, callback: function(t3) { e2.$set(e2.queryInfo, "deviceTypeId", t3); }, expression: "queryInfo.deviceTypeId" } }, e2._l(e2.deviceTypeIdList, (function(e3, t3) { return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } }); })), 1)], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { prop: "status" } }, [a2("el-select", { attrs: { placeholder: "请选择状态", clearable: "" }, model: { value: e2.queryInfo.status, callback: function(t3) { e2.$set(e2.queryInfo, "status", t3); }, expression: "queryInfo.status" } }, e2._l(e2.deviceStatus, (function(e3, t3) { return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } }); })), 1)], 1)], 1)], 1)], 1), e2._v(" "), a2("div", { staticClass: "searchBtn" }, [a2("el-form-item", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) { return e2.resetForm("queryInfo"); } } }, [e2._v("重置")]), e2._v(" "), a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.getList } }, [e2._v("查询")])], 1)], 1)])])], 1), e2._v(" "), a2("el-card", { staticClass: "box-card", attrs: { shadow: "never" } }, [a2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [a2("span", { staticClass: "planTitle" }, [e2._v("边缘设备列表")]), e2._v(" "), a2("div", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary", icon: "el-icon-plus" }, on: { click: e2.addItem } }, [e2._v("新增")])], 1)]), e2._v(" "), a2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: e2.listLoading, expression: "listLoading" }], attrs: { border: "", data: e2.listData, "header-cell-style": e2.headClass } }, [a2("el-table-column", { attrs: { type: "index", label: "#", align: "center", "min-width": "50", fixed: "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [a2("span", [e2._v(e2._s(t3.$index + (e2.queryInfo.pageNumber - 1) * e2.queryInfo.pageSize + 1))])]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "150", label: "\n 边设备名称", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(t3.row.name || "-"))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "150", label: "边设备类型", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(e2._f("getItemType")(t3.row.deviceTypeId, e2.deviceTypeIdList)))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "80", label: "边设备厂家", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(e2._f("getItemType")(t3.row.manufacturerId, e2.deviceManufacturers)))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "120", label: "边设备ID", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(t3.row.deviceId))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "120", label: "自动发送工单", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(1 == t3.row.autoCreateOrder ? "是" : "否"))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "100", label: "状态", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(e2._f("getItemType")(t3.row.status, e2.deviceStatus)))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "100", label: "操作人", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(t3.row.opUserName || "-"))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "170", label: "心跳时间", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(t3.row.heartbeatTime || "-"))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "min-width": "170", label: "操作时间", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [e2._v(e2._s(t3.row.updateTime || "-"))]; } }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "操作", "min-width": "80", fixed: "right" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) { return [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { size: "mini", type: "text" }, on: { click: function(a3) { return e2.editItem(t3.row); } } }, [e2._v("编辑")])]; } }]) })], 1), e2._v(" "), a2("div", { staticClass: "pagination-container", staticStyle: { "margin-top": "10px", "text-align": "right" } }, [a2("el-pagination", { attrs: { background: "", "page-sizes": [10, 30, 50, 100, 200], "page-size": 1, layout: "total, sizes, prev, pager, next, jumper", total: e2.total }, on: { "size-change": e2.handleSizeChange, "current-change": e2.handleCurrentChange } })], 1)], 1)], 1), e2._v(" "), a2("el-dialog", { staticClass: "dialogHead", attrs: { title: e2.title, "show-close": false, "close-on-click-modal": false, "close-on-press-escape": false, visible: e2.addDialog, width: "30%", height: "300px" }, on: { closed: function(t3) { return e2.closeDialog("categoryFrom"); }, "update:visible": function(t3) { e2.addDialog = t3; } } }, [a2("el-form", { ref: "categoryFrom", attrs: { model: e2.addForm, rules: e2.addRules, "label-width": "120px" } }, [a2("el-form-item", { attrs: { label: "边设备名称:", prop: "name" } }, [a2("el-input", { attrs: { placeholder: "请输入边设备名称" }, model: { value: e2.addForm.name, callback: function(t3) { e2.$set(e2.addForm, "name", "string" === typeof t3 ? t3.trim() : t3); }, expression: "addForm.name" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "边设备类型:", prop: "deviceTypeId" } }, [a2("el-select", { attrs: { placeholder: "请选择边设备类型", clearable: "" }, model: { value: e2.addForm.deviceTypeId, callback: function(t3) { e2.$set(e2.addForm, "deviceTypeId", t3); }, expression: "addForm.deviceTypeId" } }, e2._l(e2.deviceTypeIdList, (function(e3, t3) { return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } }); })), 1)], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "边设备厂家:", prop: "manufacturerId" } }, [a2("el-select", { attrs: { placeholder: "请选择边设备厂家", clearable: "" }, model: { value: e2.addForm.manufacturerId, callback: function(t3) { e2.$set(e2.addForm, "manufacturerId", t3); }, expression: "addForm.manufacturerId" } }, e2._l(e2.deviceManufacturers, (function(e3, t3) { return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } }); })), 1)], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "边设备ID:", prop: "deviceId" } }, [a2("el-input", { attrs: { placeholder: "请输入边设备ID", onkeyup: "value=value.replace(/[^\\w\\.\\/]/ig,'')" }, model: { value: e2.addForm.deviceId, callback: function(t3) { e2.$set(e2.addForm, "deviceId", "string" === typeof t3 ? t3.trim() : t3); }, expression: "addForm.deviceId" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "自动发送工单:", prop: "autoCreateOrder" } }, [a2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0, "active-text": "是", "inactive-text": "否" }, model: { value: e2.addForm.autoCreateOrder, callback: function(t3) { e2.$set(e2.addForm, "autoCreateOrder", t3); }, expression: "addForm.autoCreateOrder" } })], 1), e2._v(" "), a2("div", { staticClass: "btnBox" }, [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) { return e2.cancelFrom("categoryFrom"); } } }, [e2._v("关闭")]), e2._v(" "), a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: function(t3) { return e2.saveInfoList("categoryFrom"); } } }, [e2._v("提交")])], 1)], 1)], 1)], 1); }, o = [], s = a("f564"), i = a("dce5"), n = { components: {}, data: function() { return { listData: [], listLoading: false, total: 0, addDialog: false, title: "", deviceTypeIdList: i["P"], deviceStatus: i["O"], deviceManufacturers: i["N"], queryInfo: { name: "", deviceTypeId: "", status: "", pageNumber: 1, pageSize: 10, projectUuid: "", autoCreateOrder: "" }, projectId: "", addForm: { name: "", deviceTypeId: "", manufacturerId: "", deviceId: "", autoCreateOrder: 0 }, editForm: {}, addRules: { name: [{ required: true, message: "请输入边设备名称", trigger: "blur" }], deviceTypeId: [{ required: true, message: "请选择边设备类型", trigger: "change" }], manufacturerId: [{ required: true, message: "请选择边设备厂家", trigger: "change" }], deviceId: [{ required: true, message: "请输入边设备ID", trigger: "blur" }] } }; }, created: function() { this.projectId = this.$store.state.community_uuid, this.headClass(), this.getList(); }, mounted: function() { }, methods: { getList: function() { var e2 = this; this.queryInfo.projectUuid = this.projectId, Object(s["a"])(this.queryInfo).then((function(t2) { 0 == t2.code ? (e2.listData = t2.data.records, e2.total = t2.data.rowsCount) : e2.$message.error(t2.message), sessionStorage.setItem(e2.$route.name, JSON.stringify(e2.queryInfo)); })); }, resetForm: function(e2) { this.$refs[e2].resetFields(), this.getList(); }, addItem: function() { var e2 = this; this.addDialog = true, this.title = "边缘设备", this.$nextTick((function() { e2.$refs.categoryFrom.resetFields(); })); }, editItem: function(e2) { var t2 = this; this.title = "编辑边缘设备", this.addDialog = true, this.$nextTick((function() { t2.addForm = JSON.parse(JSON.stringify(e2)), console.log(t2.addForm), t2.addForm.opUserId = t2.$store.state.user.userInfo.memberId, t2.addForm.opUserName = t2.$store.state.user.userInfo.memberName; })); }, cancelFrom: function(e2) { this.$refs[e2].resetFields(), this.addDialog = false; }, closeDialog: function(e2) { this.$refs[e2].resetFields(), this.addDialog = false; }, addInvoice: function() { var e2 = this; this.addForm.opUserId = this.$store.state.user.userInfo.memberId, this.addForm.opUserName = this.$store.state.user.userInfo.memberName, this.addForm.projectName = this.$store.state.community_name, this.addForm.projectUuid = this.$store.state.community_uuid, this.addForm.companyId = this.$store.state.companyId, this.addForm.companyName = localStorage.getItem("companyName"), Object(s["b"])(this.addForm).then((function(t2) { 0 === t2.code && (e2.$message({ message: "添加成功", type: "success" }), e2.getList(), e2.$refs["categoryFrom"].resetFields(), e2.addDialog = false); })); }, editInvoice: function() { var e2 = this; Object(s["c"])(this.addForm).then((function(t2) { 0 === t2.code && (e2.$message({ message: "编辑成功", type: "success" }), e2.getList(), e2.$refs["categoryFrom"].resetFields(), e2.addDialog = false); })); }, saveInfoList: function(e2) { var t2 = this; this.$refs[e2].validate((function(e3) { if (!e3) return false; "边缘设备" == t2.title ? t2.addInvoice() : t2.editInvoice(); })); }, headClass: function() { return "text-align:center;background:#FAFAFA;"; }, handleSizeChange: function(e2) { this.queryInfo.pageSize = e2, this.getList(); }, handleCurrentChange: function(e2) { this.queryInfo.pageNumber = e2, this.getList(); } } }, l = n, d = (a("a9db"), a("829d")), c = Object(d["a"])(l, r, o, false, null, null, null); t["default"] = c.exports; }, f564: function(e, t, a) { "use strict"; a.d(t, "a", (function() { return o; })), a.d(t, "b", (function() { return s; })), a.d(t, "c", (function() { return i; })); var r = a("b775"); function o(e2) { return Object(r["a"])({ url: "/appproject/EdgeDevice/pageList", method: "post", data: e2 }); } function s(e2) { return Object(r["a"])({ url: "/appproject/EdgeDevice/create", method: "post", data: e2 }); } function i(e2) { return Object(r["a"])({ url: "/appproject/EdgeDevice/update", method: "post", data: e2 }); } } }]);