| | |
| | | <!--<span><i class="el-icon-user"></i>{{this.userNames}}</span>--> |
| | | <!--</el-tooltip>--> |
| | | <!--</div>--> |
| | | <div class="btn-fullscreen" @click="dialogFormVisible = true"> |
| | | <el-tooltip effect="dark" :content="`修改密码`" placement="bottom"> |
| | | <i class="el-icon-setting"></i> |
| | | </el-tooltip> |
| | | </div> |
| | | <!-- <div class="btn-fullscreen" @click="dialogFormVisible = true">--> |
| | | <!-- <el-tooltip effect="dark" :content="`修改密码`" placement="bottom">--> |
| | | <!-- <i class="el-icon-setting"></i>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- </div>--> |
| | | <el-dialog title="修改密码" :visible.sync="dialogFormVisible"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="原始密码" :label-width="formLabelWidth"> |
| | |
| | | <!-- 用户名下拉菜单 --> |
| | | <el-dropdown class="user-name" trigger="click" @command="handleCommand"> |
| | | <span class="el-dropdown-link"> |
| | | 退出登录 <i class="el-icon-caret-bottom"></i> |
| | | {{loginName}} <i class="el-icon-caret-bottom"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item divided command="editPassword">修改密码</el-dropdown-item> |
| | | <el-dropdown-item divided command="loginout">退出登录</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | |
| | | }, |
| | | computed:{ |
| | | |
| | | username(){ |
| | | let username = this.$byutil.getUser(); |
| | | return username ? username.realName : this.name; |
| | | } |
| | | }, |
| | | created() { |
| | | let username = localStorage.getItem('name') |
| | | this.loginName = username |
| | | }, |
| | | |
| | | methods:{ |
| | | methods:{ |
| | | // 用户名下拉菜单选择事件 |
| | | handleCommand(command) { |
| | | if(command == 'loginout'){ |
| | |
| | | sessionStorage.userRoleNames = '' |
| | | sessionStorage.userGuid = '' |
| | | sessionStorage.userName = '' |
| | | console.log(111); |
| | | this.$router.push('/login'); |
| | | // this.$confirm("是否退出登录?", "提示", { |
| | | // confirmButtonText: "确定", |
| | |
| | | // }); |
| | | // localStorage.removeItem('ms_username') |
| | | // this.$router.push('/login'); |
| | | }else if(command == 'editPassword'){ |
| | | this.dialogFormVisible = true |
| | | } |
| | | }, |
| | | // 侧边栏折叠 |
| | |
| | | items: [ |
| | | { |
| | | id:1, |
| | | icon: 'el-icon-document', |
| | | icon: 'el-icon-user-solid', |
| | | name: '人员管理', |
| | | indexUrl: 'user' |
| | | }, |
| | | { |
| | | id:2, |
| | | icon: 'el-icon-document', |
| | | icon: 'el-icon-place', |
| | | name: '停车场管理', |
| | | indexUrl: 'park' |
| | | }, |
| | |
| | | // }, |
| | | { |
| | | id:6, |
| | | icon: 'el-icon-document', |
| | | icon: 'el-icon-document-checked', |
| | | name: '白名单', |
| | | indexUrl: 'whiteList' |
| | | }, |
| | | { |
| | | id:7, |
| | | icon: 'el-icon-document', |
| | | icon: 'el-icon-s-fold', |
| | | name: '街道管理', |
| | | indexUrl: 'street' |
| | | }, |
| | |
| | | <el-form-item label="姓名" prop="name" :rules="[{required: true, message: '请输入姓名', trigger: 'blur'}]"> |
| | | <el-input v-model="formData.name" auto-complete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号" prop="phone" :rules="[{ required: true, message: '手机号不能为空', trigger: 'blur'}]"> |
| | | <el-form-item label="手机号" prop="phone"> |
| | | <el-input v-model="formData.phone" auto-complete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="人员类型" prop="type" :rules="[{required: true, message: '请选择人员类型', trigger: 'change'}]"> |
| | |
| | | <el-option label="执法人员" :value=1></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管理停车场" prop="parkIds"> |
| | | <el-select multiple filterable v-model="parkIds" clearable> |
| | | <el-option |
| | | v-for="item in parkList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="flag = false">取 消</el-button> |
| | |
| | | searchForm: { |
| | | name: '' |
| | | }, |
| | | parkList:[], |
| | | parkIds:[], |
| | | pageData: this.$byutil.defaultPageData(), |
| | | formData: { |
| | | name: '', |
| | | loginName: '', |
| | | phone: '', |
| | | type: '', |
| | | parkIds:'', |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.loadData(); |
| | | this.getParkList(); |
| | | }, |
| | | methods: { |
| | | onSave(){ |
| | | this.formData.parkIds = this.parkIds.toString() |
| | | this.$refs['formData'].validate((valid) => { |
| | | if (valid) { |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/user/save', this.formData, res => { |
| | |
| | | loadData() { |
| | | this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/user/findPage', this.searchForm); |
| | | }, |
| | | getParkList(){ |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/park/findAll',null,res => { |
| | | this.parkList = res.obj |
| | | }); |
| | | }, |
| | | onSearch() { |
| | | this.pageData = this.$byutil.defaultPageData(); |
| | | this.loadData(); |
| | |
| | | onAdd() { |
| | | this.flag=true; |
| | | this.$refs['formData'].resetFields(); |
| | | this.parkIds = []; |
| | | this.formData = { |
| | | name: '', |
| | | loginName: '', |
| | | phone: '', |
| | | type: '', |
| | | parkIds:'', |
| | | } |
| | | }, |
| | | onEdit(index, row) { |
| | | this.flag=true; |
| | | this.formData = row; |
| | | this.getParkList() |
| | | this.flag=true; |
| | | this.formData = row; |
| | | let ids = this.formData.parkIds.split(",") |
| | | let resList = []; |
| | | ids.forEach(item => { |
| | | resList.push(Number(item)) |
| | | }) |
| | | this.parkIds = resList; |
| | | console.log(this.parkIds) |
| | | }, |
| | | onDelete(index, row) { |
| | | this.$byutil.deleteData(this,this.$systemconfig.basePath+"/user/delete",{id:row.id}, res => { |