2025-09-22 17:16:08 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="dialog" v-if="dialogVisible">
|
|
|
|
|
<div class="head_box">
|
|
|
|
|
<span class="title">{{ title }}</span>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- <el-button size="small" @click="save" type="primary" :loading="loading">保存</el-button> -->
|
|
|
|
|
<el-button size="small" @click="close">关闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cntinfo">
|
2025-09-22 19:00:51 +08:00
|
|
|
<el-descriptions column="2" border label-width="120px">
|
2025-09-23 18:03:42 +08:00
|
|
|
<el-descriptions-item label="培训项目名称">{{ formData.xmmc }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="培训地址">{{ formData.pxdz }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="详细地址">{{ formData.xxdz }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="培训开始时间">{{ formData.kssj }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="培训结束时间">{{ formData.jssj }}</el-descriptions-item>
|
2025-09-22 17:16:08 +08:00
|
|
|
</el-descriptions>
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
<template v-for="item in pageData.pxkcList" :key="item.id">
|
|
|
|
|
<el-descriptions column="2" border class="label" label-width="120px">
|
|
|
|
|
<el-descriptions-item label="培训日期">{{ item.pxrq }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="培训时间">{{ item.pxsj }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="课程名称">{{ item.kcmc }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="组织单位">{{ item.zzdw }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="授课教员">{{ item.skjy }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="培训内容">{{ item.pxnr }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="已培训人员" :span="2">{{ item.ypxry }}</el-descriptions-item>
|
2025-09-23 18:03:42 +08:00
|
|
|
<el-descriptions-item label="培训照片" :span="2">
|
|
|
|
|
<div class="imgWrapper">
|
2025-09-24 17:35:24 +08:00
|
|
|
<Upload v-model="item.pxzp" />
|
2025-09-23 18:03:42 +08:00
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
2025-09-22 17:16:08 +08:00
|
|
|
</el-descriptions>
|
2025-09-24 17:35:24 +08:00
|
|
|
</template>
|
2025-09-22 17:16:08 +08:00
|
|
|
|
2025-09-25 13:50:12 +08:00
|
|
|
<div class="label-title">培训保安人员</div>
|
2025-09-22 17:16:08 +08:00
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
|
|
|
|
>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
|
|
|
|
<el-link type="warning" @click="addEdit('updata', row)">删除</el-link>
|
|
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ref, computed, reactive, getCurrentInstance } from 'vue'
|
|
|
|
|
import { qcckPost } from "@/api/qcckApi.js";
|
|
|
|
|
import MyTable from '@/components/aboutTable/MyTable.vue';
|
2025-09-23 18:03:42 +08:00
|
|
|
import Upload from "@/components/MyComponents/Upload/index.vue"
|
2025-09-22 17:16:08 +08:00
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
|
|
const title = ref('保安培训项目详情')
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const disabled = ref(false)
|
|
|
|
|
const FormRef = ref(null)
|
|
|
|
|
const visible = ref(true)
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
modelValue: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
dic: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['update:modelValue'])
|
|
|
|
|
|
|
|
|
|
const dialogVisible = computed({
|
|
|
|
|
get() {
|
|
|
|
|
return props.modelValue
|
|
|
|
|
},
|
|
|
|
|
set(val) {
|
|
|
|
|
emits('update:modelValue', val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
2025-09-24 17:35:24 +08:00
|
|
|
tableData: [],
|
|
|
|
|
pxkcList: [],
|
2025-09-22 17:16:08 +08:00
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
haveControls: false,
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
|
|
|
|
controlsWidth: 180,
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ label: "姓名", prop: "xm" },
|
|
|
|
|
{ label: "证件号码", prop: "sfzh" },
|
|
|
|
|
{ label: "联系号码", prop: "lxdh" },
|
|
|
|
|
{ label: "线上培训时长", prop: "sfzh" },
|
|
|
|
|
{ label: "所属单位", prop: "lxdh" },
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const formData = ref({})
|
2025-09-23 18:03:42 +08:00
|
|
|
const courseInfo = ref({})
|
2025-09-22 17:16:08 +08:00
|
|
|
|
|
|
|
|
const close = () => {
|
|
|
|
|
dialogVisible.value = false
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
// 根据项目id获取培训课程
|
|
|
|
|
const getPxkcList = async ({ id }) => {
|
2025-09-26 12:56:52 +08:00
|
|
|
const res = await qcckPost({ pxxmid: id }, `/bagl/mosty-base/baxx/pxkc/list`)
|
2025-09-24 17:35:24 +08:00
|
|
|
if (res) {
|
|
|
|
|
pageData.pxkcList = res
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-23 18:03:42 +08:00
|
|
|
// 获取保安信息培训课程管理详情
|
2025-09-24 17:35:24 +08:00
|
|
|
const getbaInfo = async ({ id = '' }) => {
|
2025-09-26 12:56:52 +08:00
|
|
|
const res = await qcckPost({ id }, `/bagl/mosty-base/baxx/pxkc/getInfo/${id}`)
|
2025-09-23 18:03:42 +08:00
|
|
|
if (res) {
|
|
|
|
|
courseInfo.value = res
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-24 17:35:24 +08:00
|
|
|
// 根据项目id获取培训人员
|
|
|
|
|
const getList = async ({ id = "" }) => {
|
|
|
|
|
const res = await qcckPost({
|
|
|
|
|
pxxmid: id
|
2025-09-26 12:56:52 +08:00
|
|
|
}, `/bagl/mosty-base/baxx/pxkc/pxryList`)
|
2025-09-24 17:35:24 +08:00
|
|
|
if (res) {
|
2025-09-25 16:32:35 +08:00
|
|
|
pageData.tableData = res || [];
|
2025-09-24 17:35:24 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-22 17:16:08 +08:00
|
|
|
const open = (row = {}, type = 'view') => {
|
|
|
|
|
disabled.value = false
|
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
formData.value = { ...row }
|
|
|
|
|
if (type === 'view') {
|
2025-09-25 16:32:35 +08:00
|
|
|
title.value = '保安培训项目详情'
|
2025-09-22 17:16:08 +08:00
|
|
|
visible.value = true
|
2025-09-24 17:35:24 +08:00
|
|
|
getbaInfo(row)
|
|
|
|
|
getPxkcList(row)
|
|
|
|
|
getList(row)
|
2025-09-22 17:16:08 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const save = () => {
|
|
|
|
|
FormRef.value.submit(() => {
|
|
|
|
|
loading.value = true;
|
2025-09-26 12:56:52 +08:00
|
|
|
const url = !formData.value?.id ? `/bagl/mosty-base/baxx/cyry/add` : `/bagl/mosty-base/baxx/cyry/edit`;
|
2025-09-22 17:16:08 +08:00
|
|
|
qcckPost(formData.value, url).then(() => {
|
|
|
|
|
loading.value = false;
|
|
|
|
|
proxy.$message.success("保存成功");
|
|
|
|
|
emits("refresh");
|
|
|
|
|
close();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
loading.value = false;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({ open })
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import "@/assets/css/layout.scss";
|
|
|
|
|
|
2025-09-23 18:03:42 +08:00
|
|
|
.dialog {
|
|
|
|
|
::v-deep {
|
|
|
|
|
.imgWrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.el-upload-list__item {
|
|
|
|
|
height: 80px;
|
|
|
|
|
width: 90%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-item-box {
|
|
|
|
|
width: auto !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.el-upload--picture-card, .el-upload-list--picture-card .el-upload-list__item-actions span+span {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-25 13:50:12 +08:00
|
|
|
.label-title {
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-weight: bold;
|
2025-09-22 17:16:08 +08:00
|
|
|
margin-top: 20px;
|
|
|
|
|
color: #000;
|
2025-09-25 13:50:12 +08:00
|
|
|
background: #f5f5f5;
|
2025-09-22 17:16:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cntinfo {
|
|
|
|
|
padding: 2rem 12rem 0rem 12rem;
|
|
|
|
|
height: calc(100% - 70px);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mapBox {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 400px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
</style>
|