This commit is contained in:
lmj
2022-06-14 11:23:00 +08:00
parent 4fb5e32401
commit 787a75031a

View File

@@ -11,7 +11,7 @@
</el-form> </el-form>
<p class="basicInformation">人员信息</p> <p class="basicInformation">人员信息</p>
<div class="action"> <div class="action">
<el-input style="width: 20%" placeholder="请输入姓名或工号" v-model="searchValue"></el-input> <el-input style="width: 20%" clearable placeholder="请输入姓名或工号" v-model="searchValue"></el-input>
<el-button type="primary" class="findBtn" size="medium" @click="queryTableData">搜索</el-button> <el-button type="primary" class="findBtn" size="medium" @click="queryTableData">搜索</el-button>
<el-button type="primary" size="medium" @click="tableDataReset">重置</el-button> <el-button type="primary" size="medium" @click="tableDataReset">重置</el-button>
<el-button type="primary" size="medium" @click="openDialog">添加</el-button> <el-button type="primary" size="medium" @click="openDialog">添加</el-button>
@@ -168,7 +168,7 @@
usergroupApi.detail(that.$route.query.id).then((res) => { usergroupApi.detail(that.$route.query.id).then((res) => {
if (res.status == 200) { if (res.status == 200) {
that.form = res.result; that.form = res.result;
that.oldUserGroupItems = JSON.parse(JSON.stringify( res.result.userGroupItems )); // that.oldUserGroupItems = JSON.parse(JSON.stringify( res.result.userGroupItems ));
that.tableData = res.result.userGroupItems; that.tableData = res.result.userGroupItems;
that.queryTableData(); that.queryTableData();
} }
@@ -275,8 +275,10 @@
this.addUserShow = false; this.addUserShow = false;
}, },
tableDataReset(){ tableDataReset(){
this.tableData = JSON.parse(JSON.stringify( this.oldUserGroupItems )); this.searchValue = '';
this.queryTableData(); this.queryTableData();
// this.tableData = JSON.parse(JSON.stringify( this.oldUserGroupItems ));
// this.queryTableData();
}, },
queryTableData(){ queryTableData(){
if(this.searchValue){ if(this.searchValue){