| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">课程编号:</span> |
| | | <el-input v-model="searchForm.courseCode" |
| | | style="width: 240px" |
| | | placeholder="请输入培训编号搜索" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" /> |
| | | <span class="search_title ml10">培训方式:</span> |
| | | <el-select v-model="searchForm.trainingMode" |
| | | clearable |
| | | @change="handleQuery" |
| | | style="width: 240px"> |
| | | <el-option v-for="item in trainingModeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | <span class="search_title">培训日期:</span> |
| | | <el-date-picker v-model="searchForm.trainingDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | @change="handleQuery" |
| | | type="date" |
| | | placeholder="请选择" |
| | | clearable /> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px"> |
| | |
| | | <el-form ref="formRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="120px"> |
| | | label-position="top" |
| | | label-width="150px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="培训日期" |
| | |
| | | prop="openingTime"> |
| | | <el-time-picker v-model="form.openingTime" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | value-format="HH:mm:ss" |
| | | format="HH:mm:ss" |
| | | clearable /> |
| | |
| | | prop="endTime"> |
| | | <el-time-picker v-model="form.endTime" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | value-format="HH:mm:ss" |
| | | format="HH:mm:ss" |
| | | clearable /> |
| | |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | <el-button type="primary" |
| | | @click="submitForm">确定</el-button> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | width="900px" |
| | | :close-on-click-modal="false"> |
| | | <div class="knowledge-detail"> |
| | | <div class="classtitle">课程详情</div> |
| | | <el-descriptions size="mini" |
| | | style="margin-left: 60px;" |
| | | border |
| | | :column="3"> |
| | | <el-descriptions-item label="课程编号:">{{ currentKnowledge.courseCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="培训内容:">{{ currentKnowledge.trainingContent }}</el-descriptions-item> |
| | |
| | | @click="downLoadFile(endform)">附件列表</el-button> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-divider style="margin: 20px 0;" /> |
| | | <!-- <el-divider style="margin: 20px 0;" /> --> |
| | | <div class="classtitle" |
| | | style="margin-top: 40px;margin-bottom: 30px;">课程评价</div> |
| | | <el-form ref="formRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="130px"> |
| | | label-position="top" |
| | | label-width="150px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="评价人:" |
| | |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-form> |
| | | <div class="classtitle" |
| | | style="margin-top: 40px;">考核列表</div> |
| | | <el-table style="margin-top: 20px;" |
| | | :data="endform.safeTrainingDetailsDtoList" |
| | | border |
| | | fit |
| | | stripe |
| | | highlight-current-row> |
| | | <el-table-column prop="nickName" |
| | | label="姓名" /> |
| | |
| | | v-model="fileListDialogVisible" |
| | | :show-upload-button="true" |
| | | :show-delete-button="true" |
| | | :is-show-pagination="true" |
| | | :page="filePagination" |
| | | :upload-method="handleUpload" |
| | | :delete-method="handleFileDelete" |
| | | @pagination="paginationSearch" |
| | | title="附件列表" /> |
| | | </div> |
| | | </template> |
| | |
| | | // 响应式数据 |
| | | const data = reactive({ |
| | | searchForm: { |
| | | courseCode: "", |
| | | trainingMode: "", |
| | | trainingDate: "", |
| | | state: 0, |
| | | }, |
| | | tableLoading: false, |
| | |
| | | { |
| | | name: "结果明细", |
| | | type: "text", |
| | | // disabled: row => row.state !== 2, |
| | | disabled: row => row.state == 0, |
| | | clickFun: row => { |
| | | viewResultDetail(row); |
| | | }, |
| | |
| | | const currentFileRow = ref(null); |
| | | const downLoadFile = row => { |
| | | currentFileRow.value = row; |
| | | safeTrainingFileListPage({ safeTrainingId: row.id }).then(res => { |
| | | safeTrainingFileListPage({ |
| | | safeTrainingId: row.id, |
| | | current: filePagination.value.current, |
| | | size: filePagination.value.size, |
| | | }).then(res => { |
| | | if (fileListRef.value) { |
| | | fileListRef.value.open(res.data.records); |
| | | filePagination.value.total = res.data?.total || 0; |
| | | } |
| | | }); |
| | | }; |
| | |
| | | // 重新加载文件列表 |
| | | const listRes = await safeTrainingFileListPage({ |
| | | safeTrainingId: currentFileRow.value.id, |
| | | current: filePagination.value.current, |
| | | size: filePagination.value.size, |
| | | }); |
| | | if (listRes.code === 200 && fileListRef.value) { |
| | | const fileList = (listRes.data?.records || []).map(item => ({ |
| | |
| | | ...item, |
| | | })); |
| | | fileListRef.value.setList(fileList); |
| | | filePagination.value.total = listRes.data?.total || 0; |
| | | } |
| | | // 返回新文件信息 |
| | | resolve({ |
| | |
| | | input.click(); |
| | | }); |
| | | }; |
| | | const filePagination = ref({ |
| | | current: 1, |
| | | size: 10, |
| | | total: 0, |
| | | }); |
| | | const paginationSearch = async (page, size) => { |
| | | filePagination.value.current = page; |
| | | filePagination.value.size = size; |
| | | const listRes = await safeTrainingFileListPage({ |
| | | safeTrainingId: currentFileRow.value.id, |
| | | current: filePagination.value.current, |
| | | size: filePagination.value.size, |
| | | }); |
| | | if (listRes.code === 200) { |
| | | const fileList = (listRes.data?.records || []).map(item => ({ |
| | | name: item.name, |
| | | url: item.url, |
| | | id: item.id, |
| | | ...item, |
| | | })); |
| | | |
| | | fileListRef.value.setList(fileList); |
| | | filePagination.value.total = listRes.data?.total || 0; |
| | | } |
| | | }; |
| | | // 删除附件 |
| | | const handleFileDelete = async row => { |
| | | try { |
| | |
| | | if (currentFileRow.value && fileListRef.value) { |
| | | const listRes = await safeTrainingFileListPage({ |
| | | safeTrainingId: currentFileRow.value.id, |
| | | current: filePagination.value.current, |
| | | size: filePagination.value.size, |
| | | }); |
| | | if (listRes.code === 200) { |
| | | const fileList = (listRes.data?.records || []).map(item => ({ |
| | |
| | | ...item, |
| | | })); |
| | | fileListRef.value.setList(fileList); |
| | | filePagination.value.total = listRes.data?.total || 0; |
| | | } |
| | | } |
| | | return true; // 返回 true 表示删除成功,组件会更新列表 |
| | |
| | | const pagination = obj => { |
| | | page.value.current = obj.page; |
| | | page.value.size = obj.limit; |
| | | handleQuery(); |
| | | getList(); |
| | | }; |
| | | |
| | | // 选择变化处理 |
| | |
| | | :deep(.danger-row td) { |
| | | color: #e95a66 !important; |
| | | } |
| | | .classtitle { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | border-left: 4px solid #409eff; |
| | | padding-left: 12px; |
| | | margin-bottom: 12px; |
| | | } |
| | | </style> |