| | |
| | | <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> |
| | |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/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 { |
| | |
| | | }, |
| | | getParkList(){ |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/park/findAll',null,res => { |
| | | this.parkList = res.obj |
| | | this.parkList = res.data.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.$message({message: '删除成功', type: 'success'}); |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </style> |