text: webpackJsonp([2], { TDRo: function (t, e) { }, YKpY: function (t, e) { }, YZO3: function (t, e) { }, "sRz/": function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var s = i("mvHQ"), a = i.n(s), o = i("aozt"), n = i.n(o), l = (i("gAs1"), i("UzK0")), r = { data: function () { return { dialogVisible: !1, infoDialogVisible: !1, dialogTitle: "", oldPassword: "", newPassword: "", newPasswordAG: "", userInfo: {}, regMethods: l.a } }, props: {}, methods: { quit: function () { var t = this; this.$http.post(this.$api.logout, this.$qs.stringify({})).then(function (e) { 200 == e.data.code && (localStorage.removeItem("userInfo"), t.$router.push("login")) }) }, changePWD: function () { this.dialogVisible = !0, this.dialogTitle = "修改密码" }, updateInfo: function () { var t = this; this.regMethods.checkPhone(this.userInfo.phone) && this.regMethods.checkName(this.userInfo.nickName) && this.regMethods.checkEmail(this.userInfo.email) ? this.$http.post(this.$api.accountUpdate, this.$qs.stringify({ id: JSON.parse(localStorage.getItem("userInfo")).userId, nickName: this.userInfo.nickName, phone: this.userInfo.phone, email: this.userInfo.email })).then(function (e) { 200 == e.data.code && (t.infoDialogVisible = !1, t.$message.success(e.data.data), localStorage.setItem("userInfo", a()(t.userInfo))) }) : this.$message.error("请输入正确格式的信息，并填写完整") }, confirm: function () { var t = this; this.regMethods.checkPwd(this.newPassword) && (this.newPassword != this.newPasswordAG ? this.$message.error("密码两次输入不一致") : this.$http.post(this.$api.changePWD, this.$qs.stringify({ id: JSON.parse(localStorage.getItem("userInfo")).userId, oldpwd: this.oldPassword, newpwd: this.newPasswordAG })).then(function (e) { 200 == e.data.code && (t.$message.success("修改成功"), localStorage.removeItem("userInfo"), n.a.defaults.headers.token = "", t.dialogVisible = !1, t.$router.push("login")) })) } }, mounted: function () { this.userInfo = JSON.parse(localStorage.getItem("userInfo")) } }, c = { render: function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div", [i("el-dropdown", { staticClass: "fr", attrs: { trigger: "click" } }, [i("div", { staticClass: "user-action", attrs: { trigger: "click" } }, [t._v("\n            " + t._s(t.userInfo.nickName)), i("i", { staticClass: "el-icon-arrow-down el-icon--right" })]), t._v(" "), i("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, [i("el-dropdown-item", [i("el-button", { staticClass: "fl", attrs: { type: "success", icon: "el-icon-edit", size: "small" }, on: { click: function (e) { t.changePWD() } } }, [t._v("修改密码")])], 1), t._v(" "), i("el-dropdown-item", [i("el-button", { staticClass: "fl", attrs: { type: "primary", icon: "el-icon-info", size: "small" }, on: { click: function (e) { t.infoDialogVisible = !0 } } }, [t._v("个人资料")])], 1), t._v(" "), i("el-dropdown-item", [i("el-button", { staticClass: "fl", attrs: { type: "danger", icon: "el-icon-setting", size: "small" }, on: { click: function (e) { t.quit() } } }, [t._v("退出系统")])], 1)], 1)], 1), t._v(" "), i("el-dialog", { attrs: { title: t.dialogTitle, visible: t.dialogVisible, width: "500px" }, on: { "update:visible": function (e) { t.dialogVisible = e } } }, [i("div", { staticClass: "content-pwd" }, [i("el-input", { attrs: { type: "password", placeholder: "请输入原密码" }, model: { value: t.oldPassword, callback: function (e) { t.oldPassword = e }, expression: "oldPassword" } }), t._v(" "), i("el-input", { attrs: { type: "password", placeholder: "请输入新密码" }, on: { blur: function (e) { t.regMethods.checkPwd(t.newPassword) } }, model: { value: t.newPassword, callback: function (e) { t.newPassword = e }, expression: "newPassword" } }), t._v(" "), i("el-input", { attrs: { type: "password", placeholder: "请再次输入新密码" }, model: { value: t.newPasswordAG, callback: function (e) { t.newPasswordAG = e }, expression: "newPasswordAG" } })], 1), t._v(" "), i("span", { staticClass: "dialog-footer", attrs: { slot: "footer" }, slot: "footer" }, [i("el-button", { on: { click: function (e) { t.dialogVisible = !1 } } }, [t._v("取 消")]), t._v(" "), i("el-button", { attrs: { type: "primary" }, on: { click: function (e) { t.confirm() } } }, [t._v("确 定")])], 1)]), t._v(" "), i("el-dialog", { attrs: { title: "个人资料", visible: t.infoDialogVisible, width: "500px" }, on: { "update:visible": function (e) { t.infoDialogVisible = e } } }, [i("p", { staticClass: "info-title" }, [t._v("登录账号：" + t._s(t.userInfo.name))]), t._v(" "), i("p", { staticClass: "info-title" }, [t._v("账号角色：" + t._s(t.userInfo.role))]), t._v(" "), i("p", { staticClass: "info-title" }, [t._v("用户姓名：" + t._s(t.userInfo.nickName))]), t._v(" "), i("p", { staticClass: "info-title" }, [t._v("手机号码：" + t._s(t.userInfo.phone))]), t._v(" "), i("p", { staticClass: "info-title" }, [t._v("常用邮箱：" + t._s(t.userInfo.email))]), t._v(" "), i("p", { staticClass: "info-title" }, [t._v("部门：" + t._s(t.userInfo.deptName))]), t._v(" "), i("span", { staticClass: "dialog-footer", attrs: { slot: "footer" }, slot: "footer" }, [i("el-button", { attrs: { type: "primary" }, on: { click: function (e) { t.infoDialogVisible = !1 } } }, [t._v("确 定")])], 1)])], 1) }, staticRenderFns: [] }; var d = { render: function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div", { staticClass: "side-bar", attrs: { id: "side-bar" } }, [i("el-col", { staticStyle: { width: "100% !important" } }, [i("el-menu", { staticClass: "el-menu-vertical-demo", attrs: { "default-active": t.index, "background-color": "#222631", "text-color": "#fff", "active-text-color": "#ffd04b", "unique-opened": !0 } }, [i("el-menu-item", { attrs: { index: "0" }, on: { click: function (e) { t.goPage("homePage") } } }, [i("span", { attrs: { slot: "title" }, slot: "title" }, [t._v("首页")])]), t._v(" "), t._l(t.tabList, function (e) { return i("el-submenu", { key: e.key, attrs: { index: e.index } }, [i("template", { slot: "title" }, [i("span", [t._v(t._s(e.name))])]), t._v(" "), t._l(e.next, function (e) { return i("el-menu-item", { key: e.key, attrs: { index: e.index }, on: { click: function (i) { t.goPage(e.url) } } }, [t._v(t._s(e.name))]) })], 2) })], 2)], 1)], 1) }, staticRenderFns: [] }; var u = { data: function () { return { userInfo: {}, levelList: [], activeName: "", lastActiveName: "", shopName: "" } }, components: { DropDown: i("VU/8")(r, c, !1, function (t) { i("YZO3") }, "data-v-0d912ea1", null).exports, SideBar: i("VU/8")({ data: function () { return { tabList: [], index: "" } }, methods: {}, mounted: function () { var t = this, e = this.$route.path.slice(1, this.$route.length); this.$http.get(this.$api.sidebar, { params: {} }).then(function (i) { t.tabList = i.data.data; for (var s = 0; s < i.data.data.length; s++) for (var a = i.data.data[s], o = 0; o < a.next.length; o++) { var n = a.next[o]; n.url == e && (t.index = n.index) } }) } }, d, !1, function (t) { i("YKpY") }, "data-v-ded2f0b2", null).exports }, methods: { handleClick: function (t, e) { this.$router.push(t.name) }, removeTab: function (t) { var e = this, i = this.levelList; this.activeName === t && i.forEach(function (s, a) { if (s.name === t) { var o = i[a + 1] || i[a - 1]; o && (e.activeName = o.name) } }), this.lastActiveName = this.activeName, this.levelList = i.filter(function (e) { return e.name !== t }), this.$router.push(this.activeName) }, getBread: function () { for (var t = this.$route.matched[1], e = !0, i = 0; i < this.levelList.length; i++) t.meta.title == this.levelList[i].meta.title && (e = !1); e && this.levelList.push(t), this.activeName = this.$route.path.slice(1) } }, watch: { $route: function () { this.getBread() } }, created: function () { this.getBread() }, mounted: function () { this.$nextTick(function () { document.getElementById("side-bar").style.height = document.body.clientHeight - 50 + "px", document.getElementById("content").style.height = document.body.clientHeight - 90 + "px", document.getElementById("content").style.width = document.body.clientWidth - 210 + "px" }), this.shopName = localStorage.getItem("shopName"), document.title = this.shopName + "后台管理系统" } }, h = { render: function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div", { staticStyle: { position: "relative" } }, [i("div", { staticClass: "header", attrs: { id: "header" } }, [i("div", { staticClass: "logo" }, [t._v(t._s(t.shopName) + "后台管理系统")]), t._v(" "), i("DropDown")], 1), t._v(" "), i("SideBar"), t._v(" "), i("div", { staticClass: "content", attrs: { id: "content" } }, [i("div", { staticClass: "tab-bar" }, [i("el-tabs", { attrs: { type: "card", closable: "" }, on: { "tab-click": t.handleClick, "tab-remove": t.removeTab }, model: { value: t.activeName, callback: function (e) { t.activeName = e }, expression: "activeName" } }, t._l(t.levelList, function (e) { return i("el-tab-pane", { key: e.key, attrs: { label: e.meta.title, name: e.name }, on: { click: function (i) { t.goPage(e.name) } } }) }))], 1), t._v(" "), i("router-view")], 1)], 1) }, staticRenderFns: [] }; var f = i("VU/8")(u, h, !1, function (t) { i("TDRo") }, "data-v-153e8baf", null); e.default = f.exports } });
  //# sourceMappingURL=2.7e0165b13d1a25c6e8cf.js.map