This commit is contained in:
2025-09-26 16:08:38 +08:00
parent 5208ce4fde
commit 39177fbd7d
10 changed files with 220 additions and 373 deletions

View File

@ -13,10 +13,7 @@
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #gw="{ row }">
<DictTag :value="row.gw" :options="D_BAXX_GWLX" />
</template>
<template #ssbags="{ row }">
<DictTag :value="row.ssbags" :options="D_BAXX_DWLX" />
<DictTag :value="row.gw" :tag="false" :options="D_BAXX_GWLX" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
@ -91,14 +88,13 @@ const pageData = reactive({
{ label: "证件号码", prop: "sfzh" },
{ label: "联系方式", prop: "lxdh" },
{ label: "岗位", prop: "gw", showSolt: true },
{ label: "所属保安公司", prop: "ssbags", showSolt: true },
{ label: "所属保安公司", prop: "pxgs" },
]
});
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
@ -115,52 +111,28 @@ const onSearch = (value) => {
}
const getList = async () => {
try {
pageData.tableConfiger.loading = true;
const res = await qcckPost({
...pageData.pageConfiger,
...queryFrom.value,
sfxxpx: '01'
}, `/mosty-base/baxx/pxry/page`)
if(res) {
pageData.tableData = res.records || [];
pageData.total = res.total;
}
} finally {
pageData.tableConfiger.loading = false;
}
pageData.tableConfiger.loading = true;
let params = { ...pageData.pageConfiger, ...queryFrom.value, sfxxpx: '01' }
const res = await qcckPost(params, `/mosty-base/baxx/pxry/page`)
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}
// 提交培训
const handleSubmitTraining = async (row) => {
await proxy.$modal.confirm("是否确认提交该人员进行待培训?")
try {
await qcckPost({
...row,
sfxxpx: '02'
}, "/mosty-base/baxx/pxry/edit")
proxy.$modal.msgSuccess("提交培训成功");
await getList();
} catch (error) {
proxy.$modal.msgError("提交培训失败");
console.log(error)
}
await qcckPost({ ...row, sfxxpx: '02' }, "/mosty-base/baxx/pxry/edit")
proxy.$modal.msgSuccess("提交培训成功");
await getList();
};
// 删除
const handleDelete = async (ids) => {
await proxy.$modal.confirm("是否确认删除该培训人员?")
try {
await qcckPost({ idList: ids }, "/mosty-base/baxx/pxry/remove")
proxy.$modal.msgSuccess("删除成功");
await getList();
} catch (error) {
proxy.$modal.msgError("删除失败");
console.log(error)
}
await qcckPost({ idList: ids }, "/mosty-base/baxx/pxry/remove")
proxy.$modal.msgSuccess("删除成功");
await getList();
};
const changeNo = (val) => {