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
|
|
|
<el-button type="primary" @click="addEdit('add', row)">新增</el-button>
|
|
|
|
|
</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>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
2025-09-22 14:21:17 +08:00
|
|
|
<el-link type="primary" @click="addEdit('view', row)">详情</el-link>
|
|
|
|
|
<el-link type="primary" @click="addEdit('edit', row)">考试申请</el-link>
|
2025-09-22 09:01:41 +08:00
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
|
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
total: pageData.total
|
|
|
|
|
}"></Pages>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-09-22 17:16:08 +08:00
|
|
|
<view-project-details-dialog ref="viewProjectDetailsRef" v-model="isVisible" />
|
|
|
|
|
<preject-details-dialog ref="prejectDetailsRef" v-model="dialogVisible" />
|
2025-09-22 18:09:44 +08:00
|
|
|
<!-- 新增 -->
|
|
|
|
|
<AddPxxm ref="addPxxmRef" v-model="dialogVisible" />
|
2025-09-22 09:01:41 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { onMounted, reactive, ref } from "vue";
|
|
|
|
|
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";
|
2025-09-22 17:16:08 +08:00
|
|
|
import ViewProjectDetailsDialog from "./components/viewProjectDetailsDialog.vue";
|
2025-09-22 18:09:44 +08:00
|
|
|
import AddPxxm from './components/addPxxm.vue'
|
2025-09-22 17:16:08 +08:00
|
|
|
import PrejectDetailsDialog from "./components/prejectDetailsDialog.vue";
|
2025-09-22 18:09:44 +08:00
|
|
|
const addPxxmRef = ref()
|
2025-09-22 17:16:08 +08:00
|
|
|
const prejectDetailsRef = ref(null);
|
|
|
|
|
const viewProjectDetailsRef = ref(null)
|
2025-09-22 09:01:41 +08:00
|
|
|
const queryFrom = ref({});
|
|
|
|
|
const isVisible = ref(false);
|
2025-09-22 17:16:08 +08:00
|
|
|
const dialogVisible = ref(false)
|
2025-09-22 09:01:41 +08:00
|
|
|
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",
|
2025-09-22 14:21:17 +08:00
|
|
|
placeholder: "请输入培训项目名称",
|
2025-09-22 09:01:41 +08:00
|
|
|
showType: "input"
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-09-22 14:21:17 +08:00
|
|
|
label: "培训开始时间",
|
2025-09-22 09:01:41 +08:00
|
|
|
prop: "sfzh",
|
2025-09-22 14:21:17 +08:00
|
|
|
placeholder: "请选择培训开始时间",
|
|
|
|
|
showType: "date"
|
2025-09-22 09:01:41 +08:00
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
2025-09-22 17:16:08 +08:00
|
|
|
tableData: [{}],
|
2025-09-22 09:01:41 +08:00
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
|
|
|
|
controlsWidth: 180,
|
|
|
|
|
tableColumn: [
|
2025-09-22 14:21:17 +08:00
|
|
|
{ label: "培训项目名称", prop: "xm" },
|
|
|
|
|
{ label: "培训开始时间", prop: "sfzh" },
|
|
|
|
|
{ label: "培训结束时间", prop: "sfzh" },
|
|
|
|
|
{ label: "培训公司", prop: "sfzh" },
|
|
|
|
|
{ label: "培训地址", prop: "lxdh" },
|
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) => {
|
2025-09-22 17:16:08 +08:00
|
|
|
if (type === 'view') {
|
|
|
|
|
prejectDetailsRef.value.open(row, type);
|
2025-09-22 18:09:44 +08:00
|
|
|
}else if (type === 'add') {
|
|
|
|
|
addPxxmRef.value.init()
|
|
|
|
|
}else{
|
|
|
|
|
viewProjectDetailsRef.value.open(row, type);
|
2025-09-22 17:16:08 +08:00
|
|
|
}
|
2025-09-22 09:01:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onSearch = (value) => {
|
|
|
|
|
queryFrom.value = value
|
|
|
|
|
pageData.pageConfiger.pageCurrent = 1;
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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>
|