1 |
- {"remainingRequest":"D:\\cloud\\template\\demo-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\cloud\\template\\demo-ui\\src\\views\\admin\\user\\info.vue?vue&type=style&index=0&lang=css&","dependencies":[{"path":"D:\\cloud\\template\\demo-ui\\src\\views\\admin\\user\\info.vue","mtime":1619070292891},{"path":"D:\\cloud\\template\\demo-ui\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"D:\\cloud\\template\\demo-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"D:\\cloud\\template\\demo-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"D:\\cloud\\template\\demo-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\cloud\\template\\demo-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.avatar-uploader .el-upload {\n border: 1px dashed #d9d9d9;\n border-radius: 6px;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n\n.avatar-uploader .el-upload:hover {\n border-color: #409EFF;\n}\n\n.avatar-uploader-icon {\n font-size: 28px!important;\n color: #8c939d!important;\n width: 178px!important;\n height: 178px!important;\n line-height: 178px!important;\n text-align: center!important;\n}\n\n.avatar {\n width: 178px;\n height: 178px;\n display: block;\n}\n",{"version":3,"sources":["info.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkMA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"info.vue","sourceRoot":"src/views/admin/user","sourcesContent":["<!--\r\n - Copyright (c) 2018-2025, lengleng All rights reserved.\r\n -\r\n - Redistribution and use in source and binary forms, with or without\r\n - modification, are permitted provided that the following conditions are met:\r\n -\r\n - Redistributions of source code must retain the above copyright notice,\r\n - this list of conditions and the following disclaimer.\r\n - Redistributions in binary form must reproduce the above copyright\r\n - notice, this list of conditions and the following disclaimer in the\r\n - documentation and/or other materials provided with the distribution.\r\n - Neither the name of the pig4cloud.com developer nor the names of its\r\n - contributors may be used to endorse or promote products derived from\r\n - this software without specific prior written permission.\r\n - Author: lengleng (wangiegie@gmail.com)\r\n -->\r\n\r\n<template>\r\n <div class=\"app-container calendar-list-container\">\r\n <basic-container>\r\n <template>\r\n <el-tabs @tab-click=\"switchTab\">\r\n <el-tab-pane label='信息管理' name='userManager'/>\r\n <el-tab-pane label='密码管理' name='passwordManager'/>\r\n </el-tabs>\r\n </template>\r\n <el-row>\r\n <el-col :span=\"12\">\r\n <div class=\"grid-content bg-purple\">\r\n <el-form :model=\"ruleForm2\"\r\n :rules=\"rules2\"\r\n ref=\"ruleForm2\"\r\n label-width=\"100px\"\r\n v-if=\"switchStatus==='userManager'\"\r\n class=\"demo-ruleForm\">\r\n <el-form-item label=\"用户名\"\r\n prop=\"username\">\r\n <el-input type=\"text\"\r\n v-model=\"ruleForm2.username\"\r\n disabled></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"手机号\" prop=\"phone\">\r\n <el-input v-model=\"ruleForm2.phone\" placeholder=\"验证码登录使用\"></el-input>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\"\r\n @click=\"submitForm('ruleForm2')\">提交\r\n </el-button>\r\n <el-button @click=\"resetForm('ruleForm2')\">重置</el-button>\r\n </el-form-item>\r\n </el-form>\r\n <el-form :model=\"ruleForm2\"\r\n :rules=\"rules2\"\r\n ref=\"ruleForm2\"\r\n label-width=\"100px\"\r\n v-if=\"switchStatus==='passwordManager'\"\r\n class=\"demo-ruleForm\">\r\n <el-form-item label=\"原密码\"\r\n prop=\"password\">\r\n <el-input type=\"password\"\r\n v-model=\"ruleForm2.password\"\r\n auto-complete=\"off\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"密码\"\r\n prop=\"newpassword1\">\r\n <el-input type=\"password\"\r\n v-model=\"ruleForm2.newpassword1\"\r\n auto-complete=\"off\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"确认密码\"\r\n prop=\"newpassword2\">\r\n <el-input type=\"password\"\r\n v-model=\"ruleForm2.newpassword2\"\r\n auto-complete=\"off\"></el-input>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\"\r\n @click=\"submitForm('ruleForm2')\">提交\r\n </el-button>\r\n <el-button @click=\"resetForm('ruleForm2')\">重置</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-col>\r\n </el-row>\r\n </basic-container>\r\n </div>\r\n</template>\r\n\r\n\r\n<script>\r\n import {handleDown} from \"@/api/admin/user\";\r\n import {mapState} from 'vuex'\r\n import store from \"@/store\";\r\n import request from '@/router/axios'\r\n\r\n export default {\r\n data() {\r\n var validatePass = (rule, value, callback) => {\r\n if (this.ruleForm2.password !== '') {\r\n if (value !== this.ruleForm2.newpassword1) {\r\n callback(new Error('两次输入密码不一致!'))\r\n } else {\r\n callback()\r\n }\r\n } else {\r\n callback()\r\n }\r\n }\r\n return {\r\n switchStatus: '',\r\n avatarUrl: '',\r\n show: false,\r\n headers: {\r\n Authorization: 'Bearer ' + store.getters.access_token\r\n },\r\n ruleForm2: {\r\n username: '',\r\n password: '',\r\n newpassword1: '',\r\n newpassword2: '',\r\n avatar: '',\r\n phone: ''\r\n },\r\n rules2: {\r\n password: [{required: true, min: 6, message: '原密码不能为空且不少于6位', trigger: 'change'}],\r\n newpassword1: [{required: false, min: 6, message: '不少于6位', trigger: 'change'}],\r\n newpassword2: [{required: false, validator: validatePass, trigger: 'blur'}]\r\n }\r\n }\r\n },\r\n created() {\r\n this.ruleForm2.username = this.userInfo.username\r\n this.ruleForm2.phone = this.userInfo.phone\r\n this.switchStatus = 'userManager'\r\n },\r\n computed: {\r\n ...mapState({\r\n userInfo: state => state.user.userInfo\r\n }),\r\n },\r\n methods: {\r\n switchTab(tab, event) {\r\n this.switchStatus = tab.name\r\n },\r\n submitForm(formName) {\r\n this.$refs[formName].validate(valid => {\r\n if (valid) {\r\n request({\r\n url: '/admin/user/edit',\r\n method: 'put',\r\n data: this.ruleForm2\r\n }).then(response => {\r\n if (response.data.data) {\r\n this.$notify({\r\n title: '成功',\r\n message: '修改成功',\r\n type: 'success',\r\n duration: 2000\r\n })\r\n // 修改密码之后强制重新登录\r\n if (this.switchStatus === 'passwordManager') {\r\n this.$store.dispatch('LogOut').then(() => {\r\n location.reload() // 为了重新实例化vue-router对象 避免bug\r\n })\r\n }\r\n } else {\r\n this.$notify({\r\n title: '失败',\r\n message: response.data.msg,\r\n type: 'error',\r\n duration: 2000\r\n })\r\n }\r\n }).catch(() => {\r\n this.$notify({\r\n title: '失败',\r\n message: '修改失败',\r\n type: 'error',\r\n duration: 2000\r\n })\r\n })\r\n } else {\r\n return false\r\n }\r\n })\r\n },\r\n resetForm(formName) {\r\n this.$refs[formName].resetFields()\r\n }\r\n }\r\n }\r\n</script>\r\n<style>\r\n .avatar-uploader .el-upload {\r\n border: 1px dashed #d9d9d9;\r\n border-radius: 6px;\r\n cursor: pointer;\r\n position: relative;\r\n overflow: hidden;\r\n }\r\n\r\n .avatar-uploader .el-upload:hover {\r\n border-color: #409EFF;\r\n }\r\n\r\n .avatar-uploader-icon {\r\n font-size: 28px!important;\r\n color: #8c939d!important;\r\n width: 178px!important;\r\n height: 178px!important;\r\n line-height: 178px!important;\r\n text-align: center!important;\r\n }\r\n\r\n .avatar {\r\n width: 178px;\r\n height: 178px;\r\n display: block;\r\n }\r\n</style>\r\n"]}]}
|