From ee54740c2c085b5c17d1f31ae3546d25b872ff37 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 23 十一月 2022 15:16:20 +0800
Subject: [PATCH] 修改前端页面
---
src/components/page/user/index.vue | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/components/page/user/index.vue b/src/components/page/user/index.vue
index ad5645d..55bbea8 100644
--- a/src/components/page/user/index.vue
+++ b/src/components/page/user/index.vue
@@ -3,7 +3,7 @@
<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>
@@ -102,7 +102,7 @@
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 {
@@ -115,7 +115,7 @@
},
getParkList(){
this.$byutil.postData(this, this.$systemconfig.basePath + '/park/findAll',null,res => {
- this.parkList = res.obj
+ this.parkList = res.data.data
});
},
onSearch() {
@@ -135,20 +135,24 @@
}
},
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();
})
},
@@ -166,4 +170,4 @@
<style scoped>
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.1