From 7e460156de73171f9660ce48f80703e79f8b478d Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期六, 14 六月 2025 11:48:26 +0800 Subject: [PATCH] 初始化提交 --- src/views/system/user/index.vue | 854 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 849 insertions(+), 5 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 5f04e63..1eb5ef4 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,15 +1,414 @@ <template> <div class="system-user"> - <SettingTitle left="浣犵殑鐢ㄦ埛閰嶇疆" right="灏忓浘鏍�"></SettingTitle> - <div class="user-info"></div> + <SettingTitle v-if="authority" left="浣犵殑鐢ㄦ埛閰嶇疆" :click-fun="showAdd" right="鏂板鐢ㄦ埛" icon="el-icon-plus" /> + <SettingTitle v-else left="浣犵殑鐢ㄦ埛閰嶇疆" /> + <div class="user-info"> + <div class="info-avatar"> + <el-upload + :headers="{'X-Token':token}" + class="avatar-uploader" + :action="baseUrl+'/user/update'" + :show-file-list="false" + :on-success="handleAvatarSuccess" + > + <img v-if="avatar" :src="baseUrl+'/img'+avatar" class="avatar"> + <i v-else class="el-icon-plus avatar-uploader-icon" /> + </el-upload> + </div> + <div class="info-msg"> + <div>{{ msgInfo.name }}</div> + <div>璐﹀彿锛歿{ msgInfo.account }}</div> + </div> + <div class="info-logout"> + <el-button type="primary" plain @click="logout">閫�鍑虹櫥褰�</el-button> + </div> + </div> + <div class="setting-list"> + <div v-for="(item,index) in serviceArr" :key="index" class="setting-item"> + <div class="item-icon iconfont" :class="item.icon" /> + <div class="item-msg">{{ item.name }}</div> + <div class="item-right" :class="item.right" @click="showDialog(item.name)" /> + </div> + </div> + <!-- 鍚屾椂鐢ㄦ埛鍒楄〃涓�0涔熶笉灞曠ず --> + <template v-if="userList.length>1"> + <SettingTitle left="鐢ㄦ埛鍒楄〃" /> + <div class="setting-list"> + <div v-for="item in userList" v-if="name !== item.username" :key="item.id" class="setting-item"> + <div class="item-icon"> + <el-avatar :size="40" :src="baseUrl+'/img'+item.avatar" /> + </div> + <div class="item-msg">{{ item.username }}</div> + <div class="item-right"> + <el-button v-if="authority" type="text" :style="{color:'red'}" @click="clear(item)">鍒犻櫎</el-button> + </div> + </div> + </div> + </template> + <template> + <SettingTitle left="琛ㄦ牸" /> + <div class="setting-list"> + <div class="setting-item"> + <div class="item-icon iconfont icon-biaogeziduan" /> + <div class="item-msg">淇敼鏌ョ湅琛ㄥご</div> + <el-dropdown trigger="click" @command="showTableDialog($event)"> + <span class="el-dropdown-link"> + <i class="el-icon-arrow-down el-icon--right" /> + </span> + <el-dropdown-menu slot="dropdown"> + + <el-dropdown-item v-for="(item ,index) in allTab" :key="index" :command="item">{{ item.name }}</el-dropdown-item> + </el-dropdown-menu> + </el-dropdown> + <!-- <div class="item-right el-icon-arrow-down" @click="showDialog('淇敼琛ㄥ崟')"></div> --> + </div> + </div> + </template> + <SettingTitle left="娣诲姞鍨嬪彿" /> + + <div class="setting-model"> + <el-row :gutter="20"> + <el-col :span="4"> + <div :style="{display:'flex'}"> + <el-input + v-model="filterText" + placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" + /> + <!-- <el-button>娣诲姞鍚嶇О</el-button> --> + </div> + <el-tree + ref="tree" + :style="{marginTop:'20px'}" + class="filter-tree" + :data="treeData" + :props="defaultProps" + default-expand-all + :filter-node-method="filterNode" + > + <span slot-scope="{ node, data }" class="custom-tree-node"> + <div :style="{height:'100%', display:'flex',alignItems: 'center'}"> + <div :style="{marginRight: '8px',display:'flex',alignItem: 'center'}"> + <span>{{ node.label }}</span> + <span :style="{marginLeft: '20px',fontSize: '10px'}" class="edit el-icon-edit" @click="changeName(node,data)">淇敼</span> + <span :style="{marginLeft: '20px',fontSize: '10px'}" class="edit el-icon-delete" @click="deleteName(node,data)" /> + </div> + <!-- 绮惧害涓嶉珮 瀵艰嚧鐨勯棶棰�--> + </div> + </span> + </el-tree> + </el-col> + <el-col :span="20"> + <div class="addName"> + <el-row :gutter="20"> + <el-col :span="8"> + <div :style="{display: 'flex'}"> + <el-input v-model="newName" :style="{marginRight: '8px'}" /> + <el-button @click="addNewName">娣诲姞鍚嶇О</el-button> + </div> + + </el-col> + <el-col :span="14"> + <el-row :gutter="20"> + <el-col :span="4"> + + <el-select v-model="checkNameId" clearable placeholder="璇烽�夋嫨"> + <el-option + v-for="item in nameOptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> + </el-col> + <el-col :span="10"> + <el-input v-model="newModel" :style="{marginLeft: '8px'}" placeholder="璇疯緭鍏ュ瀷鍙峰悕绉�" /> + </el-col> + <el-col :span="10"> + <el-input v-model="newProductCode" :style="{marginLeft: '8px'}" placeholder="璇疯緭鍏ヤ骇鍝佺紪鐮�" /> + </el-col> + </el-row> + + </el-col> + <el-col :span="2"> + <el-button @click="addNewModel">娣诲姞鍨嬪彿</el-button> + </el-col> + </el-row> + </div> + <el-table + class="tableData" + :height="450" + :max-height="450" + :row-class-name="onTableRowClassName" + :row-style="{height:0+'px'}" + :cell-style="{padding:8+'px',textAlign: 'center'}" + :header-cell-style="{borderRight:'0px',textAlign: 'center',background:'#52626F',color:'#fff', height:'10px', padding:'0px'}" + :stripe="true" + :data="tableData" + :border="true" + header-row-class-name="table-header" + > + <el-table-column + type="index" + label="搴忓彿" + /> + <el-table-column + prop="productCode" + label="浜у搧缂栫爜" + /> + <el-table-column + prop="productModel" + label="鍨嬪彿鍚嶇О" + /> + <el-table-column + prop="productName" + label="浜у搧鍚嶇О" + /> + <el-table-column + label="鏇村鎿嶄綔" + > + <template slot-scope="scope"> + <el-button type="text" @click="changeModel(scope.row)">淇敼</el-button> + <el-button type="text danger" @click="deleteModel(scope.row)">鍒犻櫎</el-button> + </template> + + </el-table-column> + </el-table> + </el-col> + </el-row> + </div> + <el-dialog class="changePassword" :visible.sync="passwordFormVisible" @close="handleClose('passwordParams')"> + <div slot="title" class="title"> + <span /> + <span>淇敼瀵嗙爜</span> + </div> + <el-form ref="passwordParams" :model="passwordParams" :rules="passwordRules"> + <el-row> + <el-col> + <el-form-item prop="oldPassword"> + <el-input v-model="passwordParams.oldPassword" :validate-event="false" show-password type="password" placeholder="璇疯緭鍏ユ棫瀵嗙爜" autocomplete="off" /> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col> + <el-form-item prop="newPassword"> + <el-input v-model="passwordParams.newPassword" :validate-event="false" show-password type="password" placeholder="璇疯緭鍏ユ柊瀵嗙爜" autocomplete="off" /> + </el-form-item> + </el-col> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="changePwd">纭� 瀹�</el-button> + </div> + </el-dialog> + <el-dialog class="tableHead" :visible.sync="tableFormVisible" @close="handleClose('userParams')"> + <div slot="title" class="title"> + <span /> + <span>淇敼琛ㄥ崟</span> + </div> + <el-form ref="userParams" :model="userParams"> + <el-row> + <el-col> + <el-checkbox-group v-model="checkList"> + <el-checkbox v-for="(item, index) in commandList" :key="index" :label="item" :checked="item.show" @change="changeCheck(!item.show,item)">{{ item.name }}</el-checkbox> + </el-checkbox-group> + </el-col> + </el-row> + + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="changeTable">纭� 瀹�</el-button> + <!-- <el-button @click="tableFormVisible = false" >鍙� 娑�</el-button> --> + </div> + </el-dialog> + <el-dialog class="userInfo" title="涓汉璧勬枡" :visible.sync="infoFormVisible" @close="handleClose('addUserForm')"> + <div slot="title" class="title"> + <span /> + <span>涓汉璧勬枡</span> + </div> + <el-form ref="addUserForm" :model="infoParams" :rules="addUserRules"> + <el-row> + <el-col> + <el-form-item prop="username"> + <el-input v-model="infoParams.username" placeholder="鐢ㄦ埛鍚�" autocomplete="off" /> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col> + <el-form-item prop="account"> + <el-input v-model="infoParams.account" placeholder="璐﹀彿" autocomplete="off" /> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col /> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="changeInfo">纭� 瀹�</el-button> + <!-- <el-button @click="infoFormVisible = false" >鍙� 娑�</el-button> --> + </div> + </el-dialog> + <el-dialog class="addUser" :visible.sync="addVisible" @close="handleClose('addParams')"> + <div slot="title" class="title"> + <span /> + <span>鏂板鐢ㄦ埛</span> + </div> + <el-form ref="addParams" label-position="left" label-width="80px" :model="addParams" :rules="addUserRules"> + + <el-form-item prop="username" label="鐢ㄦ埛鍚嶏細"> + <el-input v-model="addParams.username" placeholder="鐢ㄦ埛鍚�" autocomplete="off" /> + </el-form-item> + + <el-form-item prop="account" label="璐﹀彿"> + <el-input v-model="addParams.account" placeholder="璐﹀彿" autocomplete="off" /> + </el-form-item> + + <el-form-item prop="password" label="瀵嗙爜锛�"> + + <el-input v-model="addParams.password" placeholder="瀵嗙爜" show-password type="password" autocomplete="off" /> + </el-form-item> + + <el-form-item prop="authority" label="韬唤锛�"> + <el-select v-model="addParams.authority" placeholder="璇烽�夋嫨韬唤"> + <el-option + v-for="item in powerOptions" + :key="item.value" + :label="item.label" + :value="item.value" + /> + </el-select> + </el-form-item> + + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="addNewUser">纭� 瀹�</el-button> + <!-- <el-button @click="infoFormVisible = false" >鍙� 娑�</el-button> --> + </div> + </el-dialog> + + <el-dialog width="30%" handle-close-change-name-params- class="changeName" :visible.sync="changeNameVisible"> + + <div slot="title" class="title"> + <span /> + <span>淇敼鍚嶇О</span> + </div> + <el-form> + <el-form-item ref="changeNameParams" :model="changeNameParams"> + <el-input v-model="changeNameParams.productName" /> + </el-form-item> + <div :style="{display: 'flex'}"> + <el-button type="primary" :style="{flex:'1'}" @click="ConfirmChange">纭畾淇敼</el-button> + </div> + </el-form> + </el-dialog> + <el-dialog handle-close-change-model-params- width="30%" class="changeModel" :visible.sync="changeModelVisible"> + <div slot="title" class="title"> + <span /> + <span>淇敼鍨嬪彿</span> + </div> + <el-form> + <el-form-item ref="changeModelParams" :model="changeModelParams"> + <el-input v-model="changeModelParams.productModel" placeholder="璇疯緭鍏ユ柊鍨嬪彿" /> + </el-form-item> + <el-form-item :model="changeModelParams"> + <el-input v-model="changeModelParams.productCode" placeholder="璇疯緭鍏ョ紪鐮�" /> + </el-form-item> + <div :style="{display: 'flex'}"> + <el-button type="primary" :style="{flex:'1'}" @click="confirmChangeModel">纭畾淇敼</el-button> + </div> + </el-form> + </el-dialog> </div> </template> <script> +import { mapGetters } from 'vuex' +import { getInfo, addUser, getUserList, updateUserPwd, delUser, updateUserProfile } from '@/api/user' +import { selectAllName, addName, updateName, delName } from '@/api/productName' +import { selectAllModel, addModel, updateModel, delModel } from '@/api/productModel' +import { getToken } from '@/utils/auth' import SettingTitle from '@/components/SettingTitle' export default { data() { + const validateAccount = (rule, value, callback) => { + const reg = /^(?=.*\d).{6,11}$/ + if (!reg.test(value)) { + callback(new Error('璐﹀彿鐢�6-10浣嶆暟瀛楃粍鎴愶紝璇疯緭鍏ユ纭殑璐﹀彿锛�')) + } else { + callback() + } + } + const validatePassword = (rule, value, callback) => { + // console.log(value) + const reg = /^(?=.*[A-Z])(?=.*[a-z])(?=.*\d).{6,12}$/ + // console.log(!reg.test(value)) + if (!reg.test(value)) { + callback(new Error('瀵嗙爜蹇呴』鏄敱6-12浣嶅寘鍚ぇ灏忓啓瀛楁瘝锛屾暟瀛楃粍鍚�')) + } else { + callback() + } + } return { + changeNameVisible: false, + changeModelVisible: false, + changeNameParams: { + id: '', + productName: '' + }, + changeModelParams: { + }, + newModel: '', + newProductCode: '', + newName: '', + checkNameId: '', + nameOptions: [ + { + label: 'abc', + value: '1' + } + ], + tableData: [], + treeData: [], + defaultProps: { + children: 'children', + label: 'label' + }, + filterText: '', + addModelFormVisible: false, + addVisible: false, + powerOptions: [ + { + value: '1', + label: '绠$悊鍛�' + }, + { + value: '0', + label: '鏅�氱敤鎴�' + } + ], + addParams: { + account: '', + authority: '', + password: '', + username: '' + }, + checkList: [], + tableSelectVisible: false, + baseUrl: process.env.VUE_APP_BASE_API, + msgInfo: {}, + infoParams: { + + }, + infoFormVisible: false, + userParams: { + user: '', + power: '' + }, + tableFormVisible: false, + passwordParams: {}, + passwordFormVisible: false, deptName: '', queryParams: { pageNum: 1, @@ -20,26 +419,471 @@ deptId: undefined }, dateRange: [], - userList: null + serviceArr: [ + { name: '淇敼瀵嗙爜', icon: 'icon-mima', right: 'el-icon-arrow-right' }, + { name: '涓汉璧勬枡', icon: 'icon-gerenziliao', right: 'el-icon-arrow-right' } + ], + formLabelWidth: '120px', + userList: [], + commandList: [], + tableName: '', + addUserRules: { + account: [{ required: true, trigger: 'blur', validator: validateAccount }], + password: [{ required: true, trigger: 'blur', validator: validatePassword }] + }, + passwordRules: { + oldPassword: [{ required: true, validator: validatePassword }], + newPassword: [{ required: true, validator: validatePassword }] + }, + addNameParams: {} } + }, + watch: { + filterText(val) { + this.$refs.tree.filter(val) + } + }, + computed: { + ...mapGetters([ + 'sidebar', + 'avatar', + 'name', + 'allTab', + 'authority', + 'token' + ]) + }, + created() { + this.getUserInfo() + this.getAllUser() + this.setOptions() }, components: { SettingTitle + }, + mounted() { + }, + methods: { + handleClose(refName) { + // console.log(refName) + this.$refs[refName]?.resetFields() + }, + ConfirmChange() { + console.log(this.changeNameParams) + if (!this.changeNameParams.productName) return this.$message.error('璇疯鐪熷~鍐欎笉鍙负绌�') + + updateName(this.changeNameParams).then((res) => { + this.changeNameParams.id = '' + this.changeNameParams.productName = '' + console.log('娓呯┖淇敼鍚嶇О杈撳叆妗嗗唴瀹�') + this.changeNameVisible = false + this.$message.success(res) + this.setOptions() + }) + }, + confirmChangeModel() { + console.log('淇敼鍨嬪彿鍙傛暟', this.changeModelParams) + updateModel(this.changeModelParams).then((res) => { + this.changeModelVisible = false + this.changeModelParams = {} + this.$message.success(res) + this.setOptions() + }) + }, + addNewName() { + console.log(this.newName) + if (!this.newName) return this.$message.error('娣诲姞鍚嶇О涓嶈兘涓虹┖') + addName({ productName: this.newName }).then((res) => { + this.newName = '' + this.$message.success(res) + this.setOptions() + }, () => { + // this.$message.error('娣诲姞澶辫触璇烽噸鏂板皾璇�') + + }) + }, + changeName(node, data) { + // console.log(node, data) + this.changeNameParams.id = data.value + this.changeNameParams.productName = data.label + console.log(this.changeNameParams) + this.changeNameVisible = true + }, + deleteName(node, data) { + console.log(data) + this.$alert('纭畾鍒犻櫎', '鍒犻櫎鍚嶇О', { + confirmButtonText: '纭畾', + callback: action => { + delName({ id: data.value, productName: data.label }).then((res) => { + this.$message.success(res) + this.setOptions() + }) + } + }) + }, + addNewModel() { + addModel({ productNameId: this.checkNameId, productModel: this.newModel, productCode: this.newProductCode }).then((res) => { + this.checkNameId = '' + this.newModel = '' + this.newProductCode = '' + this.$message.success(res) + this.setOptions() + }) + }, + deleteModel(row) { + delModel({ id: row.id, productModel: row.productModel }).then((res) => { + this.$message.success(res) + this.setOptions() + }) + }, + changeModel(row) { + this.changeModelVisible = true + const params = { ...row } + delete params.productName + this.changeModelParams = { ... params } + }, + async setOptions() { + this.tableData = [] + this.treeData = [] + const { data: nameRes } = await selectAllName() + // console.log(nameRes) + const nameArr = nameRes.productNames.map(item => { + return { value: item.id, label: item.productName } + }) + this.nameOptions = nameArr + // console.log(nameArr) + for (const nameItem of nameArr) { + const { data } = await selectAllModel({ productNameId: nameItem.value }) + + data.models = data.models.map(item => { + item.productNameId = nameItem.value + item.productName = nameItem.label + return item + }) + this.tableData = [...this.tableData, ...data.models] + const children = data.models.map(item => { + return { id: item.id, label: item.productModel } + }) + this.treeData.push({ ...nameItem, children }) + } + this.tableData = this.tableData.map(item => { + return { id: item.id, productModel: item.productModel, productCode: item.productCode, productName: item.productName } + }) + // console.log(this.tableData) + }, + onTableRowClassName({ row, rowIndex }) { + if (rowIndex % 2 != 0) { + return 'onAcitve' + } else { + return '' + } + }, + async logout() { + console.log(1) + await this.$store.dispatch('user/logout') + this.$router.push(`/login?redirect=/home`) + }, + filterNode(value, data) { + if (!value) return true + return data.label.indexOf(value) !== -1 + }, + changeCheck(newShow, item) { + item.show = newShow + }, + changeUser(item) { + + }, + clear(item) { + // console.log() + delUser(item).then(res => { + this.$message.success('鍒犻櫎鎴愬姛') + // this.logout() + this.getAllUser() + }, () => { + this.$message.error('鍒犻櫎澶辫触') + }) + }, + handleAvatarSuccess(res, file) { + this.$message.success('涓婁紶鎴愬姛') + // this.$router.go(0) + }, + async getAllUser() { + const { data } = await getUserList() + this.userList = data.user + console.log(this.userList) + }, + addNewUser() { + // 娣诲姞鏍¢獙瑙勫垯 + this.$refs.addParams.validate(valid => { + if (valid) { + addUser(this.addParams).then(res => { + this.addParams.account = '' + this.addParams.authority = '' + this.addParams.password = '' + this.addParams.username = '' + this.addVisible = false + this.getAllUser() + this.$message({ + message: '鎭枩浣狅紝娣诲姞鎴愬姛', + type: 'success' + }) + }, () => { + this.$message.error({ + message: '娣诲姞鐢ㄦ埛澶辫触璇烽噸鏂板皾璇�' + }) + }) + } else { + this.$message.error('閿欒鎻愪氦锛岃〃鏍兼牎楠屽嚭閿�') + } + }) + console.log(this.addParams) + }, + showAdd() { + this.addVisible = true + }, + showTableDialog(command) { + this.commandList = command.keys + this.tableName = command.name + this.tableFormVisible = true + }, + getUserInfo() { + getInfo(getToken()).then(res => { + this.msgInfo = res.data + // console.log(鐢ㄦ埛淇℃伅锛歳es) + }) + }, + showDialog(name) { + if (name == '淇敼瀵嗙爜') { + this.passwordFormVisible = true + } else if (name == '淇敼琛ㄥ崟') { + this.tableSelectVisible = true + } else if (name == '涓汉璧勬枡') { + this.infoFormVisible = true + } + }, + async changePwd() { + // 淇敼瀵嗙爜鍙傛暟 + // this.logout() + + this.$refs.passwordParams.validate(valid => { + if (valid) { + updateUserPwd(this.passwordParams).then(async res => { + this.passwordFormVisible = false + await this.logout() + this.$message({ + message: '鎭枩浣狅紝淇敼鎴愬姛', + type: 'success' + }) + }, () => { + // this.$message.error({ + // message: '娣诲姞鐢ㄦ埛澶辫触璇烽噸鏂板皾璇�' + // }) + }) + } else { + this.$message.error('閿欒鎻愪氦锛岃妫�鏌ュ瘑鐮佹牸寮�') + } + }) + }, + changeTable() { + console.log(this.commandList) + this.$store.commit('CHANGE_TAB_KEY', { name: this.tableName, keys: this.commandList }) + this.tableFormVisible = false + console.log(this.$store.state) + }, + async changeInfo() { + console.log(this.infoParams) + const res = await updateUserProfile(this.infoParams) + console.log(res) + // this.$refs + this.infoFormVisible = false + this.getUserInfo() + this.getAllUser() + this.setOptions() + } } } </script> -<style lang="scss" > +<style lang="scss" scoped> @import '../../../styles/variables.scss'; +// ::v-deep .el-tree-node__content{ +// height: 70px; +// } +.changeName{ + .el-dialog{ + width: 30% !important; + } + +} +.el-tree-node__children{ + .edit{ + display: none; + } +} + ::v-deep .el-dropdown-menu__item { + + padding: 0 40px; + font-size: 16px; + border-bottom: 1px solid #efeeee; + } +.el-icon-plus,.el-icon-arrow-down,.el-icon-arrow-right,.el-icon-arrow-left,.el-icon-arrow-up{ + color: #409EFF; +} .system-user{ min-height: calc(100vh - 50px); padding: 40px; background: $mainBg; + .changePassword,.tableHead,.userInfo{ + .title{ + display: flex; + align-items: center; + span:nth-child(1){ + margin-right: 8px; + display: inline-block; + width: 4px; + height: 18px; + background: #409EFF; + } + } + ::v-deep >div{ + width: 600px; + border-radius: 10px; + } + ::v-deep .el-dialog__body{ + padding: 30px 100px; + input{ + border: 0px; + background: #f3f4f5; + } + } + ::v-deep .el-dialog__footer{ + padding: 10px 100px 30px 100px; + // margin-right: ; + .dialog-footer{ + display: flex; + button{ + flex: 1; + } + } + } + } + .tableHead{ + ::v-deep >div{ + width: 300px; + + } + ::v-deep .el-dialog__body{ + padding: 30px 50px; + } + ::v-deep .el-checkbox{ + margin-right: 0; + display: flex; + justify-content: center; + align-items: center; + } + ::v-deep .el-checkbox__label{ + width: 140px; + margin: 5px 10px; + padding: 10px 40px; + background: #f3f4f5; + border-radius: 6px; + + } + } } .user-info{ width: 100%; height: 125px; border-radius: 10px; background: #fff; + padding: 25px; + display: flex; + align-items: center; + .info-avatar{ + + .avatar-uploader .el-upload { + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; + } + .avatar-uploader .el-upload:hover { + border-color: #409EFF; + } + .avatar-uploader-icon { + font-size: 28px; + color: #8c939d; + width: 75px; + height: 75px; + line-height: 75px; + text-align: center; + } + .avatar { + width: 75px; + height: 75px; + display: block; + border-radius: 50%; + } + } + .info-logout{ + // width: 100px; + .el-button--primary.is-plain{ + background: #fff; + color: #409EFF; + border-color: #b3d8ff; + } + } + .info-msg{ + flex: 1; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + padding-left: 25px; + >div:nth-child(1){ + font-weight: 700; + font-size: 24px; + + } + } } -</style> \ No newline at end of file + +.setting-model{ + margin-top: 24px; + border-radius: 10px; + background: #fff; + border: 1px solid #ddd; + padding: 15px; + .addName{ + // display: flex; + margin-bottom: 20px; + } +} +.setting-list{ + margin-top: 24px; + border-radius: 10px; + background: #fff; + border: 1px solid #ddd; + .setting-item{ + height: 70px; + padding: 15px; + width: 100%; + display: flex; + align-items: center; + .item-icon{ + // width: 40px; + // height: 40px; + } + .item-msg{ + flex: 1; + padding-left: 15px; + } + + } + .setting-item{ + // border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + } +} +</style> -- Gitblit v1.9.3