Commit 83c52e2b authored by xinzhedeai's avatar xinzhedeai

add:人员列表 api

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