| | |
| | | <div style="padding: 10px 10px 0px 10px;"> |
| | | <el-form :inline="true" :model="searchForm"> |
| | | <el-form-item label="名称"> |
| | | <el-input v-model="searchForm.name"></el-input> |
| | | <el-input v-model="searchForm.name" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">查询</el-button> |
| | |
| | | <el-form-item label="登录名" prop="loginName" :rules="[{required: true, message: '请输入登录名', trigger: 'blur'}]"> |
| | | <el-input v-model="formData.loginName" auto-complete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="密码" prop="password" :rules="[{required: true, message: '请输入密码', trigger: 'blur'}]"> |
| | | <el-input v-model="formData.password" auto-complete="off"></el-input> |
| | | </el-form-item> |
| | | <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> |
| | |
| | | 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 => { |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/user/save', this.formData, res => { |
| | | this.$refs['formData'].resetFields(); |
| | | this.flag=false; |
| | | this.$message({message: res.message, type: 'success'}); |
| | | this.$message({message: '保存成功', type: 'success'}); |
| | | this.loadData(); |
| | | }) |
| | | } else { |
| | |
| | | }); |
| | | }, |
| | | loadData() { |
| | | this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/user/findPage', this.searchForm); |
| | | this.$byutil.loadPageData(this, this.$systemconfig.basePath + '/ffzf/user/findPage', this.searchForm); |
| | | }, |
| | | getParkList(){ |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/park/findAll',null,res => { |
| | | this.parkList = res.obj |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/park/findAll',null,res => { |
| | | this.parkList = res.data |
| | | }); |
| | | }, |
| | | onSearch() { |
| | |
| | | } |
| | | }, |
| | | onEdit(index, row) { |
| | | this.parkIds = [] |
| | | 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; |
| | | let ids = null |
| | | if(this.formData.parkIds){ |
| | | 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 => { |
| | | this.$message({message: res.message, type: 'success'}); |
| | | this.$byutil.deleteData(this,this.$systemconfig.basePath+"/ffzf/user/delete",{id:row.id}, res => { |
| | | this.$message({message: '删除成功', type: 'success'}); |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </style> |