Commit cd184045 authored by xinzhedeai's avatar xinzhedeai

ADD:员工 条件搜索过滤 staff

parent eac70df0
...@@ -39,7 +39,7 @@ export function updateInfo(data) { ...@@ -39,7 +39,7 @@ export function updateInfo(data) {
// 删除人员信息 // 删除人员信息
export function delInfo(data) { export function delInfo(data) {
return request({ return request({
url: '/person/info/deleteRemoteVisitorInfo', url: '/person/info/deleteRemotePersonInfo',
method: 'delete', method: 'delete',
data: data data: data
}) })
......
...@@ -150,16 +150,16 @@ export const constantRoutes = [ ...@@ -150,16 +150,16 @@ export const constantRoutes = [
} }
] ]
}, },
// 人员列表 // 员工列表
{ {
path: '/person', path: '/person',
component: EmptyLayout, component: EmptyLayout,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: 'renyuan', path: 'yuangong',
component: () => import('@/views/person/renyuan'), component: () => import('@/views/person/yuangong'),
name: 'renyuan', name: 'yuangong',
meta: { title: '人员列表', icon: 'dashboard', } meta: { title: '人员列表', icon: 'dashboard', }
} }
] ]
......
...@@ -357,19 +357,11 @@ ...@@ -357,19 +357,11 @@
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
<el-form-item label="人员类型名称" prop="personType"> <el-form-item label="人员类型名称" prop="personTypeName">
<el-select <el-input
v-model="form.personType" v-model="form.personTypeName"
placeholder="请选择人员类型" placeholder="请输入人员类型名称"
clearable />
>
<el-option
v-for="item in personTypeOptions"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="员工类型名称" prop="staffTypeName"> <el-form-item label="员工类型名称" prop="staffTypeName">
<el-input <el-input
...@@ -686,15 +678,17 @@ ...@@ -686,15 +678,17 @@
</template> </template>
<script> <script>
import { listInfo, delInfo, addInfo, updateInfo } from "@/api/jinrun/renyuan"; import {
import { getDict } from "@/api/jinrun/common"; listInfo,
getInfo,
delInfo,
addInfo,
updateInfo,
} from "@/api/jinrun/renyuan";
export default { export default {
name: "Info", name: "Info",
data() { data() {
return { return {
// 人员类型下拉列表数据
personTypeOptions: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -802,22 +796,8 @@ export default { ...@@ -802,22 +796,8 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getPersonTypeOptions();
}, },
methods: { methods: {
/** 获取人员类型下拉列表数据 */
getPersonTypeOptions() {
// 调用数据字典接口
getDict({ dictType: "person_type" })
.then((response) => {
this.personTypeOptions = response.data;
})
.catch((error) => {
this.$modal.msgError("获取人员类型数据失败");
console.error("获取人员类型数据失败:", error);
});
},
/** 查询人员信息列表 */ /** 查询人员信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -969,7 +949,7 @@ export default { ...@@ -969,7 +949,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm('是否确认删除人员信息编号为"' + row.personIds + '"的数据项?') .confirm('是否确认删除人员信息编号为"' + personIds + '"的数据项?')
.then(function () { .then(function () {
return delInfo(row); return delInfo(row);
}) })
......
...@@ -357,11 +357,19 @@ ...@@ -357,11 +357,19 @@
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
<el-form-item label="人员类型名称" prop="personTypeName"> <el-form-item label="人员类型名称" prop="personType">
<el-input <el-select
v-model="form.personTypeName" v-model="form.personType"
placeholder="请输入人员类型名称" placeholder="请选择人员类型"
/> clearable
>
<el-option
v-for="item in personTypeOptions"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="员工类型名称" prop="staffTypeName"> <el-form-item label="员工类型名称" prop="staffTypeName">
<el-input <el-input
...@@ -678,17 +686,15 @@ ...@@ -678,17 +686,15 @@
</template> </template>
<script> <script>
import { import { listInfo, delInfo, addInfo, updateInfo } from "@/api/jinrun/renyuan";
listInfo, import { getDict } from "@/api/jinrun/common";
getInfo,
delInfo,
addInfo,
updateInfo,
} from "@/api/jinrun/renyuan";
export default { export default {
name: "Info", name: "Info",
data() { data() {
return { return {
// 人员类型下拉列表数据
personTypeOptions: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -711,7 +717,7 @@ export default { ...@@ -711,7 +717,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
personType: null, personType: "staff",
personTypeName: null, personTypeName: null,
staffType: null, staffType: null,
staffTypeName: null, staffTypeName: null,
...@@ -796,8 +802,22 @@ export default { ...@@ -796,8 +802,22 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getPersonTypeOptions();
}, },
methods: { methods: {
/** 获取人员类型下拉列表数据 */
getPersonTypeOptions() {
// 调用数据字典接口
getDict({ dictType: "person_type" })
.then((response) => {
this.personTypeOptions = response.data;
})
.catch((error) => {
this.$modal.msgError("获取人员类型数据失败");
console.error("获取人员类型数据失败:", error);
});
},
/** 查询人员信息列表 */ /** 查询人员信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -949,9 +969,12 @@ export default { ...@@ -949,9 +969,12 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm('是否确认删除人员信息编号为"' + personIds + '"的数据项?') .confirm('是否确认删除人员信息编号为"' + row.personIds + '"的数据项?')
.then(function () { .then(function () {
return delInfo(row); return delInfo({
personIds: [row.personId],
personType: row.personType,
});
}) })
.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