2025-09-22 09:01:41 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="titleBox">
|
2025-09-22 14:21:17 +08:00
|
|
|
<page-title title="保安待培训人员管理" />
|
2025-09-22 09:01:41 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
<div ref="searchBox">
|
|
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch"></Search>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 表格 -->
|
|
|
|
|
<div class="tabBox">
|
|
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
|
|
|
|
<template #bxxLx="{ row }">
|
|
|
|
|
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
|
|
|
|
|
</template>
|
2025-09-24 17:35:24 +08:00
|
|
|
|
|
|
|
|
<template #pxsc="{ row }">
|
|
|
|
|
<span>{{ row.pxsc }}小时</span>
|
|
|
|
|
</template>
|
2025-09-22 09:01:41 +08:00
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
|
|
|
|
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link>
|
|
|
|
|
<el-link type="warning" @click="addEdit('view', row)">详情</el-link>
|
|
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
|
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
total: pageData.total
|
|
|
|
|
}"></Pages>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-09-22 14:21:17 +08:00
|
|
|
<view-info-dialog ref="trainerRef" v-model="isVisible" />
|
2025-09-22 09:01:41 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-09-24 21:43:12 +08:00
|
|
|
import { onMounted, reactive, ref, getCurrentInstance } from "vue";
|
2025-09-22 09:01:41 +08:00
|
|
|
import MyTable from '@/components/aboutTable/MyTable.vue';
|
|
|
|
|
import Pages from '@/components/aboutTable/Pages.vue';
|
|
|
|
|
import Search from '@/components/aboutTable/Search.vue';
|
|
|
|
|
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
2025-09-22 14:21:17 +08:00
|
|
|
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
|
|
|
|
import viewInfoDialog from "./components/viewInfoDialog.vue";
|
2025-09-22 09:01:41 +08:00
|
|
|
|
2025-09-24 21:43:12 +08:00
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const { D_BAXX_DWLX } = proxy.$dict("D_BAXX_DWLX")
|
2025-09-22 09:01:41 +08:00
|
|
|
const trainerRef = ref(null);
|
|
|
|
|
const queryFrom = ref({});
|
|
|
|
|
const isVisible = ref(false);
|
|
|
|
|
const searchBox = ref(null);
|
|
|
|
|
const D_BZ_BXDLX = ref([]);
|
|
|
|
|
const searchConfiger = ref([
|
|
|
|
|
{
|
2025-09-22 14:21:17 +08:00
|
|
|
label: "姓名",
|
2025-09-22 09:01:41 +08:00
|
|
|
prop: "xm",
|
|
|
|
|
placeholder: "请输入人员姓名",
|
|
|
|
|
showType: "input"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "联系电话",
|
|
|
|
|
prop: "lxdh",
|
|
|
|
|
placeholder: "请输入联系电话",
|
|
|
|
|
showType: "input"
|
|
|
|
|
},
|
2025-09-22 14:21:17 +08:00
|
|
|
{
|
|
|
|
|
label: "所属保安公司",
|
2025-09-24 21:43:12 +08:00
|
|
|
prop: "ssbags",
|
2025-09-22 14:21:17 +08:00
|
|
|
placeholder: "请选择所属保安公司",
|
2025-09-24 21:43:12 +08:00
|
|
|
showType: "select",
|
|
|
|
|
options: D_BAXX_DWLX
|
2025-09-22 14:21:17 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "提交日期",
|
2025-09-24 21:43:12 +08:00
|
|
|
prop: "tjrq",
|
2025-09-22 14:21:17 +08:00
|
|
|
placeholder: "请选择提交日期",
|
|
|
|
|
showType: "date"
|
|
|
|
|
}
|
2025-09-22 09:01:41 +08:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
2025-09-24 21:43:12 +08:00
|
|
|
tableData: [],
|
2025-09-22 09:01:41 +08:00
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
2025-09-23 18:03:42 +08:00
|
|
|
sfcjpx: 0, // 是否参加培训
|
2025-09-22 09:01:41 +08:00
|
|
|
pageSize: 10,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
|
|
|
|
controlsWidth: 180,
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ label: "姓名", prop: "xm" },
|
2025-09-22 14:21:17 +08:00
|
|
|
{ label: "身份证号", prop: "sfzh" },
|
2025-09-22 09:01:41 +08:00
|
|
|
{ label: "联系方式", prop: "lxdh" },
|
2025-09-24 21:43:12 +08:00
|
|
|
{ label: "所属保安公司", prop: "ssbags" },
|
2025-09-23 18:03:42 +08:00
|
|
|
{ label: "线上培训时长", prop: "pxsc" },
|
|
|
|
|
{ label: "提交日期", prop: "" },
|
2025-09-22 09:01:41 +08:00
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 表格高度计算
|
|
|
|
|
const tabHeightFn = () => {
|
|
|
|
|
pageData.tableHeight =
|
|
|
|
|
window.innerHeight - searchBox.value.offsetHeight - 250;
|
|
|
|
|
window.onresize = function () {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const addEdit = (type, row) => {
|
|
|
|
|
trainerRef.value.open(row, type);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onSearch = (value) => {
|
|
|
|
|
queryFrom.value = value
|
|
|
|
|
pageData.pageConfiger.pageCurrent = 1;
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-23 18:03:42 +08:00
|
|
|
// 删除
|
|
|
|
|
const handleDelete = async (ids) => {
|
|
|
|
|
await proxy.$modal.confirm("是否确认删除该培训人员?")
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await qcckPost({ ids }, "/mosty-base/baxx/pxry/remove")
|
|
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
|
|
await getList();
|
|
|
|
|
} catch (error) {
|
|
|
|
|
proxy.$modal.msgError("删除失败");
|
|
|
|
|
console.log(error)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-22 09:01:41 +08:00
|
|
|
const getList = async () => {
|
|
|
|
|
try {
|
|
|
|
|
pageData.tableConfiger.loading = true;
|
|
|
|
|
const res = await qcckPost({
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
...queryFrom.value
|
|
|
|
|
}, `/mosty-base/baxx/pxry/page`)
|
|
|
|
|
|
|
|
|
|
if(res) {
|
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|