1 line
18 KiB
JSON
1 line
18 KiB
JSON
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\layout\\components\\Navbar.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\layout\\components\\Navbar.vue","mtime":1718940800586},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1718764959024},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KDQppbXBvcnQgeyBtYXBHZXR0ZXJzIH0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ICB9KS5jYXRjaChlcnIgPT4gew0KICAgICAgICBjb25zb2xlLmxvZyhlcnIpDQogICAgICB9KQ0KICAgIH0sDQogICAgYmVmb3JlQXZhdGFyVXBsb2FkKGZpbGUpIHsNCiAgICAgIGNvbnN0IGlzSlBHID0gZmlsZS50eXBlID09PSAnaW1hZ2UvanBlZycNCiAgICAgIGNvbnN0IGlzTHQyTSA9IGZpbGUuc2l6ZSAvIDEwMjQgLyAxMDI0IDwgMg0KDQogICAgICBpZiAoIWlzSlBHKSB7DQogICAgICAgIHRoaXMuJG1lc3NhZ2UuZXJyb3IoJ+S4iuS8oOWktOWDj+WbvueJh+WPquiDveaYryBKUEcg5qC85byPIScpDQogICAgICB9DQogICAgICBpZiAoIWlzTHQyTSkgew0KICAgICAgICB0aGlzLiRtZXNzYWdlLmVycm9yKCfkuIrkvKDlpLTlg4/lm77niYflpKflsI/kuI3og73otoXov4cgMk1CIScpDQogICAgICB9DQogICAgICByZXR1cm4gaXNKUEcgJiYgaXNMdDJNDQogICAgfQ0KICB9DQp9DQo="},{"version":3,"sources":["Navbar.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"Navbar.vue","sourceRoot":"src/layout/components","sourcesContent":["<template>\r\n <div class=\"navbar\">\r\n <hamburger id=\"hamburger-container\" :is-active=\"sidebar.opened\" class=\"hamburger-container\" @toggleClick=\"toggleSideBar\" />\r\n\r\n <breadcrumb id=\"breadcrumb-container\" class=\"breadcrumb-container\" />\r\n\r\n <div class=\"right-menu\">\r\n <template v-if=\"device!=='mobile'\">\r\n <!-- <search id=\"header-search\" class=\"right-menu-item\" /> -->\r\n\r\n <screenfull id=\"screenfull\" class=\"right-menu-item hover-effect\" />\r\n\r\n <el-tooltip content=\"Global Size\" effect=\"dark\" placement=\"bottom\">\r\n <size-select id=\"size-select\" class=\"right-menu-item hover-effect\" />\r\n </el-tooltip>\r\n\r\n </template>\r\n\r\n <div v-if=\"$store.getters.is_anchor\" class=\"right-menu-item hover-effect\">\r\n <el-button @click=\"dialogWorks = true\">排班{{ $store.getters.name }}</el-button>\r\n </div>\r\n <div class=\"right-menu-item hover-effect\">\r\n <el-button :style=\"{backgroundColor:!workstatus?'#409EFF':'#fff',color:workstatus?'#979797':'#fff'}\" @click=\"startWorks\">{{ workstatus?'上班':'上班中' }}</el-button>\r\n <el-button :style=\"{backgroundColor:workstatus?'#409EFF':'#fff',color:workstatus?'#fff':'#979797'}\" @click=\"endWorks\">{{ workstatus?'下班中':'下班' }}</el-button>\r\n </div>\r\n\r\n <el-dropdown class=\"avatar-container right-menu-item hover-effect\" trigger=\"click\">\r\n <div class=\"avatar-wrapper\">\r\n <img :src=\"avatar+'?imageView2/1/w/80/h/80'\" class=\"user-avatar\" alt=\"\">\r\n <i class=\"el-icon-camera\" style=\"position: absolute;\" @click.stop=\"showAvatar = true\" />\r\n <i class=\"el-icon-caret-bottom\" />\r\n </div>\r\n <el-dropdown-menu slot=\"dropdown\">\r\n <!-- <router-link to=\"/profile/index\">\r\n <el-dropdown-item>Profile</el-dropdown-item>\r\n </router-link> -->\r\n <router-link to=\"/\">\r\n <el-dropdown-item>系统面板</el-dropdown-item>\r\n </router-link>\r\n <div @click=\"dialogPWD = true\">\r\n <el-dropdown-item>修改密码</el-dropdown-item>\r\n </div>\r\n <el-dropdown-item divided @click.native=\"logout\">\r\n <span style=\"display:block;\">退出登录</span>\r\n </el-dropdown-item>\r\n </el-dropdown-menu>\r\n </el-dropdown>\r\n </div>\r\n <el-dialog\r\n title=\"提示\"\r\n :visible.sync=\"showAvatar\"\r\n width=\"30%\"\r\n center\r\n >\r\n\r\n <el-upload\r\n class=\"avatar-uploader\"\r\n action=\"/admin/index/avatar\"\r\n :show-file-list=\"false\"\r\n :on-success=\"handleAvatarSuccess\"\r\n :before-upload=\"beforeAvatarUpload\"\r\n >\r\n <img v-if=\"imageUrl\" :src=\"imageUrl\" class=\"avatar\" alt=\"\">\r\n <i v-else class=\"el-icon-plus avatar-uploader-icon\" />\r\n </el-upload>\r\n\r\n </el-dialog>\r\n\r\n <el-dialog title=\"修改密码\" :visible.sync=\"dialogPWD\">\r\n <el-form :rules=\"rules\" :model=\"form\">\r\n <el-form-item label=\"旧密码\" prop=\"oldpwd\">\r\n <el-input v-model=\"form.oldpwd\" autocomplete=\"off\" />\r\n </el-form-item>\r\n <el-form-item label=\"新密码\" prop=\"pwd\">\r\n <el-input v-model=\"form.pwd\" autocomplete=\"off\" />\r\n </el-form-item>\r\n </el-form>\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <el-button @click=\"dialogPWD = false\">取 消</el-button>\r\n <el-button type=\"primary\" @click=\"pwd\">确 定</el-button>\r\n </div>\r\n </el-dialog>\r\n\r\n <el-dialog title=\"排班\" width=\"90%\" :visible.sync=\"dialogWorks\">\r\n <el-form :rules=\"rules\">\r\n <el-row style=\"margin-bottom: 10px;\">\r\n <el-col :span=\"24\">\r\n <el-date-picker\r\n v-model=\"times[0]\"\r\n placeholder=\"选择开始时间\"\r\n default-time=\"07:00:00\"\r\n type=\"datetime\"\r\n />\r\n </el-col>\r\n </el-row>\r\n <el-row style=\"margin-bottom: 10px;\">\r\n <el-col :span=\"24\">\r\n <el-date-picker\r\n v-model=\"times[1]\"\r\n placeholder=\"选择结束时间\"\r\n default-time=\"07:59:59\"\r\n type=\"datetime\"\r\n />\r\n </el-col>\r\n </el-row>\r\n <el-row style=\"margin-bottom: 10px;\">\r\n <el-col :span=\"24\">\r\n <el-checkbox-group v-model=\"os\">\r\n <el-checkbox v-for=\"(v,i,k) in $store.getters.oss\" :key=\"k\" :label=\"i\">{{ v }}</el-checkbox>\r\n </el-checkbox-group>\r\n </el-col>\r\n </el-row>\r\n </el-form>\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <el-button @click=\"dialogWorks = false\">取 消</el-button>\r\n <el-button type=\"primary\" @click=\"saveWork\">确 定</el-button>\r\n </div>\r\n </el-dialog>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters } from 'vuex'\r\nimport Breadcrumb from '@/components/Breadcrumb'\r\nimport Hamburger from '@/components/Hamburger'\r\nimport Screenfull from '@/components/Screenfull'\r\nimport SizeSelect from '@/components/SizeSelect'\r\nimport Search from '@/components/HeaderSearch'\r\nimport { color } from 'echarts/lib/export'\r\nimport sidebar from '@/layout/components/Sidebar/index.vue'\r\nimport avatar from 'element-ui/packages/avatar'\r\n\r\nexport default {\r\n components: {\r\n Breadcrumb,\r\n Hamburger,\r\n Screenfull,\r\n SizeSelect,\r\n // eslint-disable-next-line vue/no-unused-components\r\n Search\r\n },\r\n computed: {\r\n avatar() {\r\n return avatar\r\n },\r\n sidebar() {\r\n return sidebar\r\n },\r\n ...mapGetters([\r\n 'sidebar',\r\n 'avatar',\r\n 'device'\r\n ])\r\n },\r\n // eslint-disable-next-line vue/order-in-components\r\n data() {\r\n return {\r\n workstatus: false,\r\n showAvatar: false,\r\n dialogPWD: false,\r\n dialogWorks: false,\r\n centerDialogVisible: false,\r\n imageUrl: false,\r\n os: [],\r\n times: [],\r\n form: {\r\n oldpwd: '',\r\n pwd: ''\r\n },\r\n rules: {\r\n oldpwd: [\r\n { required: true, message: '请输入旧密码', trigger: 'blur' },\r\n { min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }\r\n ],\r\n pwd: [\r\n { required: true, message: '请输入密码', trigger: 'blur' },\r\n { min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n created() {\r\n this.getworkstatus()\r\n },\r\n methods: {\r\n color,\r\n toggleSideBar() {\r\n this.$store.dispatch('app/toggleSideBar')\r\n },\r\n async logout() {\r\n await this.$store.dispatch('user/logout')\r\n this.$router.push(`/login?redirect=${this.$route.fullPath}`)\r\n },\r\n handleAvatarSuccess(res, file) {\r\n this.imageUrl = URL.createObjectURL(file.raw)\r\n },\r\n pwd() {\r\n this.$axios.post('/admin/admin/pwd', this.form).then(res => {\r\n this.dialogPWD = false\r\n this.form = {}\r\n }).catch(err => {\r\n console.log(err)\r\n })\r\n },\r\n saveWork() {\r\n this.$axios.post('/admin/work/save2', { times: this.times, os: this.os }).then(res => {\r\n console.log(res)\r\n this.$message({\r\n showClose: true,\r\n message: '添加成功'\r\n })\r\n this.dialogWorks = false\r\n }).catch(err => {\r\n console.log(err)\r\n })\r\n },\r\n startWorks() {\r\n this.$axios.post('/admin/work/startworks', { id: this.id }).then(res => {\r\n console.log(res)\r\n this.$message({\r\n showClose: true,\r\n message: '上班成功'\r\n })\r\n this.getworkstatus()\r\n }).catch(err => {\r\n console.log(err)\r\n })\r\n },\r\n endWorks() {\r\n this.$axios.post('/admin/work/endworks', { id: this.id }).then(res => {\r\n console.log(res)\r\n this.$message({\r\n showClose: true,\r\n message: '下班成功'\r\n })\r\n this.getworkstatus()\r\n }).catch(err => {\r\n console.log(err)\r\n })\r\n },\r\n getworkstatus() {\r\n this.$axios.post('/admin/work/getworkstatus', { id: this.id }).then(res => {\r\n console.log(res)\r\n this.workstatus = res.data\r\n }).catch(err => {\r\n console.log(err)\r\n })\r\n },\r\n beforeAvatarUpload(file) {\r\n const isJPG = file.type === 'image/jpeg'\r\n const isLt2M = file.size / 1024 / 1024 < 2\r\n\r\n if (!isJPG) {\r\n this.$message.error('上传头像图片只能是 JPG 格式!')\r\n }\r\n if (!isLt2M) {\r\n this.$message.error('上传头像图片大小不能超过 2MB!')\r\n }\r\n return isJPG && isLt2M\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.navbar {\r\n height: 50px;\r\n overflow: hidden;\r\n position: relative;\r\n background: #fff;\r\n box-shadow: 0 1px 4px rgba(0,21,41,.08);\r\n\r\n .hamburger-container {\r\n line-height: 46px;\r\n height: 100%;\r\n float: left;\r\n cursor: pointer;\r\n transition: background .3s;\r\n -webkit-tap-highlight-color:transparent;\r\n\r\n &:hover {\r\n background: rgba(0, 0, 0, .025)\r\n }\r\n }\r\n\r\n .breadcrumb-container {\r\n float: left;\r\n }\r\n\r\n .errLog-container {\r\n display: inline-block;\r\n vertical-align: top;\r\n }\r\n\r\n .right-menu {\r\n float: right;\r\n height: 100%;\r\n line-height: 50px;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n .right-menu-item {\r\n display: inline-block;\r\n padding: 0 8px;\r\n height: 100%;\r\n font-size: 18px;\r\n color: #5a5e66;\r\n vertical-align: text-bottom;\r\n\r\n &.hover-effect {\r\n cursor: pointer;\r\n transition: background .3s;\r\n\r\n &:hover {\r\n background: rgba(0, 0, 0, .025)\r\n }\r\n }\r\n }\r\n\r\n .avatar-container {\r\n margin-right: 30px;\r\n\r\n .avatar-wrapper {\r\n margin-top: 5px;\r\n position: relative;\r\n\r\n .user-avatar {\r\n cursor: pointer;\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 10px;\r\n }\r\n\r\n .el-icon-caret-bottom {\r\n cursor: pointer;\r\n position: absolute;\r\n right: -20px;\r\n top: 25px;\r\n font-size: 12px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.avatar-uploader .el-upload {\r\n border: 1px solid #131313;\r\n border-radius: 6px;\r\n cursor: pointer;\r\n position: relative;\r\n overflow: hidden;\r\n}\r\n.avatar-uploader .el-upload:hover {\r\n border-color: #409EFF;\r\n}\r\n.avatar-uploader-icon {\r\n border: 1px solid #979797;\r\n border-radius: 15px;\r\n font-size: 28px;\r\n color: #8c939d;\r\n width: 100px;\r\n height: 100px;\r\n line-height: 100px;\r\n text-align: center;\r\n}\r\n.avatar {\r\n width: 100px;\r\n height: 100px;\r\n display: block;\r\n border: 1px solid #979797;\r\n border-radius: 15px;\r\n}\r\n</style>\r\n"]}]} |