Commit 83c52e2b authored by xinzhedeai's avatar xinzhedeai

add:人员列表 api

parent a4120669
...@@ -3,24 +3,25 @@ import request from '@/utils/request' ...@@ -3,24 +3,25 @@ import request from '@/utils/request'
// 查询人员信息列表 // 查询人员信息列表
export function listInfo(query) { export function listInfo(query) {
return request({ return request({
url: '/person/info/getRemotePersonInfoListt', url: '/person/info/getRemotePersonInfoList',
method: 'get', method: 'post',
params: query params: query
}) })
} }
// 查询人员信息详细 // 查询人员信息详细
export function getInfo(personId) { export function getInfo(data) {
return request({ return request({
url: '/person/info/' + personId, url: '/person/info/getRemotePersonInfoById',
method: 'get' method: 'post',
data: data
}) })
} }
// 新增人员信息 // 新增人员信息
export function addInfo(data) { export function addInfo(data) {
return request({ return request({
url: '/person/info', url: '/person/info/addRemotePersonInfo',
method: 'post', method: 'post',
data: data data: data
}) })
...@@ -29,16 +30,17 @@ export function addInfo(data) { ...@@ -29,16 +30,17 @@ export function addInfo(data) {
// 修改人员信息 // 修改人员信息
export function updateInfo(data) { export function updateInfo(data) {
return request({ return request({
url: '/person/info', url: '/person/info/updateRemotePersonInfo',
method: 'put', method: 'post',
data: data data: data
}) })
} }
// 删除人员信息 // 删除人员信息
export function delInfo(personId) { export function delInfo(data) {
return request({ return request({
url: '/person/info/' + personId, url: '/person/info/deleteRemoteVisitorInfo',
method: 'delete' method: 'post',
data: data
}) })
} }
...@@ -47,11 +47,10 @@ ...@@ -47,11 +47,10 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:info:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
...@@ -74,7 +73,7 @@ ...@@ -74,7 +73,7 @@
v-hasPermi="['system:info:remove']" v-hasPermi="['system:info:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -98,8 +97,7 @@ ...@@ -98,8 +97,7 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="备注" align="center" prop="remark" /> <!-- <el-table-column label="人员ID" align="center" prop="personId" /> -->
<el-table-column label="人员ID" align="center" prop="personId" />
<el-table-column label="人员类型" align="center" prop="personType" /> <el-table-column label="人员类型" align="center" prop="personType" />
<el-table-column <el-table-column
label="人员类型名称" label="人员类型名称"
...@@ -315,6 +313,8 @@ ...@@ -315,6 +313,8 @@
prop="curUserName" prop="curUserName"
/> />
<el-table-column label="访客id" align="center" prop="visitorId" /> <el-table-column label="访客id" align="center" prop="visitorId" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
...@@ -326,7 +326,6 @@ ...@@ -326,7 +326,6 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:info:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
...@@ -334,7 +333,6 @@ ...@@ -334,7 +333,6 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:info:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
...@@ -804,7 +802,7 @@ export default { ...@@ -804,7 +802,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listInfo(this.queryParams).then((response) => { listInfo(this.queryParams).then((response) => {
this.infoList = response.rows; this.infoList = response.data;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -922,8 +920,7 @@ export default { ...@@ -922,8 +920,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const personId = row.personId || this.ids; getInfo(row).then((response) => {
getInfo(personId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改人员信息"; this.title = "修改人员信息";
...@@ -951,11 +948,10 @@ export default { ...@@ -951,11 +948,10 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const personIds = row.personId || this.ids;
this.$modal this.$modal
.confirm('是否确认删除人员信息编号为"' + personIds + '"的数据项?') .confirm('是否确认删除人员信息编号为"' + personIds + '"的数据项?')
.then(function () { .then(function () {
return delInfo(personIds); return delInfo(row);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment