平台资源库-试卷管理、档案管理-一人一档

pull/1/head
duhang 2024-01-08 18:26:39 +08:00
parent 3ad49a0620
commit c9b83bc968
13 changed files with 1374 additions and 12 deletions

View File

@ -183,6 +183,60 @@ export default [
},
],
},
{
path: "/platform_resource_library/paper/list",
meta: { title: "试卷管理", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "platform_resource_library/paper/list",
},
{
path: "/platform_resource_library/paper/view",
meta: {
title: "试卷详情查看",
activeMenu: "/platform_resource_library/paper/list",
},
component: "platform_resource_library/paper/view",
},
],
},
],
},
{
path: "/archives",
redirect: "/archives/user",
meta: { title: "档案管理", model: MODEL["2"] },
component: "children",
children: [
{
path: "/archives/user",
meta: { title: "一人一档", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "archives/user/index",
},
{
path: "/archives/user/task_list",
meta: {
title: "任务详情",
activeMenu: "/archives/user",
},
component: "archives/user/task_list",
},
{
path: "/archives/user/detail",
meta: {
title: "任务详情",
activeMenu: "/archives/user",
},
component: "archives/user/detail",
},
],
},
],
},
{

View File

@ -13,6 +13,7 @@
:show-header="showHeader"
:show-summary="showSummary"
:summary-method="summaryMethod"
:span-method="spanMethod"
@row-click="rowClick"
@row-dblclick="rowDblclick"
>
@ -93,6 +94,9 @@ const props = defineProps({
summaryMethod: {
type: Function,
},
spanMethod: {
type: Function,
},
});
const emits = defineEmits([
"update:pagination",

21
src/request/archives.js Normal file
View File

@ -0,0 +1,21 @@
import { post } from "@/request/axios.js";
export const getUserList = (params) => post("/user/list", params); // 档案管理-一人一档-获取人员列表
export const getUserInfo = (params) => post("/user/goEditUser", params); // 档案管理-一人一档-获取人员详情
export const getTaskList = (params) => post("/studytask/userlist", params); // 档案管理-一人一档-获取任务详情列表
export const getStudyTaskInfo = (params) => post("/studytask/goEdit", params); // 档案管理-一人一档-档案详情-获取任务信息
export const getCurriculums = (params) =>
post("/studytask/getAllCourseware", params); // 档案管理-一人一档-档案详情-获取课程列表
export const getArchivesPaper = (params) =>
post("/studytask/getArchivesPaper", params); // 档案管理-一人一档-档案详情-获取试卷
export const getSignByStudyTask = (params) =>
post("/studytasksign/getListByStudytaskID", params); // 档案管理-一人一档-档案详情-任务人员的签字信息
export const getUserExamScoreByStudyTaskId = (params) =>
post("/stageexam/getUserExamScoreByStudystaskId", params); // 档案管理-一人一档-档案详情-???

View File

@ -22,4 +22,13 @@ export const joinMyCurriculum = (params) =>
post("/platform/curriculum/joinMyCurriculum", params); // 课件资源管理-资料课件-添加
export const getCurriculumInfo = (params) =>
post("platform/curriculum/goEdit", params); // 课件资源管理-获取课程详情信息
post("/platform/curriculum/goEdit", params); // 课件资源管理-获取课程详情信息
export const getPaperList = (params) =>
post("/platform/stageexampaperinput/list", params); // 试卷管理-获取课程列表
export const joinMyPaper = (params) =>
post("/platform/stageexampaperinput/joinMyPaper", params); // 试卷管理-添加
export const getPaperInfo = (params) =>
post("/platform/stageexampaperinput/goEdit", params); // 试卷管理-获取试卷详情信息

View File

@ -0,0 +1,163 @@
<template>
<el-dialog v-model="visible" title="人员登记表" :before-close="fnClose">
<el-button type="primary">打印</el-button>
<br /><br />
<el-descriptions title="生产经营单位新入职从业人员登记表" :column="2">
<el-descriptions-item label="生产经营单位名称(盖章):">
{{ CORP_NAME }}
</el-descriptions-item>
<el-descriptions-item label="档案编号:">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="2" border>
<el-descriptions-item label="姓名">
{{ data.userInfo.NAME }}
</el-descriptions-item>
<el-descriptions-item label="性别">
{{ data.userInfo.SEX_NAME }}
</el-descriptions-item>
<!-- <el-descriptions-item label="" :span="2">-->
<!-- <img-->
<!-- v-if="data.userInfo.USERAVATARURL_CONVERT"-->
<!-- :src="-->
<!-- data.userInfo.USERAVATARPREFIX + data.userInfo.USERAVATARURL_CONVERT-->
<!-- "-->
<!-- alt="头像"-->
<!-- />-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="民族">
{{ data.userInfo.NATION_NAME }}
</el-descriptions-item>
<el-descriptions-item label="政治面貌">
{{ data.userInfo.POLITICAL_OUTLOOK_NAME }}
</el-descriptions-item>
<el-descriptions-item label="文化程度">
{{ data.userInfo.DEGREE_OF_EDUCATION_NAME }}
</el-descriptions-item>
<el-descriptions-item label="健康状况">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item label="出生年月">
{{ data.userInfo.DATE_OF_BIRTH }}
</el-descriptions-item>
<el-descriptions-item label="身份证号">
{{ data.userInfo.USER_ID_CARD }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="2" border>
<el-descriptions-item label="毕业院校及专业">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item label="职务/职称">
{{ data.userInfo.DUTIES_NAME }}
</el-descriptions-item>
<el-descriptions-item label="户籍所在地">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item label="参加工作时间">
{{ data.userInfo.WORKING_DATE }}
</el-descriptions-item>
<el-descriptions-item label="进入本单位时间">
{{ data.userInfo.ENTRY_DATE }}
</el-descriptions-item>
<el-descriptions-item label="入职部门">
{{ data.userInfo.DEPARTMENT_NAME }}
</el-descriptions-item>
<el-descriptions-item label="岗位名称">
{{ data.userInfo.POST_NAME }}
</el-descriptions-item>
<el-descriptions-item label="之前从事本岗位时间">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="主要工作经历">
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item
label="入职前接受安全培训和考核以及取得安全培训有关的岗位证书等情况"
>
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item
label="入职前受过何种有关安全生产的处罚以及是否受到刑事处罚"
>
<!-- todo 原项目是空的 -->
</el-descriptions-item>
<el-descriptions-item label="入职统计表相关信息核定情况">
<div>
<p>
入职人承诺:以上信息已经本人核实信息真实有效完整如有虚假或欺骗等行为自愿承担相应的法律责任.
</p>
<div class="flex">
<p>入职人(签字并按指纹)</p>
<p>
承诺日期<span style="padding-left: 40px"></span
><span style="padding-left: 20px"></span
><span style="padding-left: 20px"></span>
</p>
</div>
</div>
<div>
<p>生产经营单位核查意见</p>
<div class="flex">
<p>核查人员(签字)</p>
<p>
核查日期<span style="padding-left: 40px"></span
><span style="padding-left: 20px"></span
><span style="padding-left: 20px"></span>
</p>
</div>
</div>
</el-descriptions-item>
</el-descriptions>
<template #footer>
<el-button @click="fnClose"></el-button>
</template>
</el-dialog>
</template>
<script setup>
// import LayoutPrintTablePackage from "@/components/print_table_package/index.vue";
import { useVModels } from "@vueuse/core";
import { getUserInfo } from "@/request/archives.js";
import { reactive } from "vue";
import { useUserStore } from "@/pinia/user";
const userStore = useUserStore();
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
userId: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible"]);
const { visible, userId } = useVModels(props, emits);
const CORP_NAME = userStore.getUserInfo.CORP_NAME;
const data = reactive({
userInfo: {},
});
const fnClose = () => {
data.userInfo = {};
emits("update:visible", false);
};
const fnGetUserInfo = async () => {
const respData = await getUserInfo({ USER_ID: userId.value });
if (respData && respData.pd) {
data.userInfo = respData.pd;
}
};
await fnGetUserInfo();
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,500 @@
<template>
<div>
<el-descriptions title="学时证明" :column="1">
<template #extra>
<el-button type="primary" size="small">打印</el-button>
</template>
<el-descriptions-item label="证书编号:"> </el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="姓名">
{{ data.userInfo.NAME }}
</el-descriptions-item>
<el-descriptions-item label="证件类型"> 身份证 </el-descriptions-item>
<el-descriptions-item label="证件编号">
{{ data.userInfo.USER_ID_CARD }}
</el-descriptions-item>
<el-descriptions-item label="培训单位名称">
{{ CORP_NAME }}
</el-descriptions-item>
<el-descriptions-item label="任务名称">
{{ data.studyTaskInfo.STUDY_NAME }}
</el-descriptions-item>
<el-descriptions-item label="培训日期">
{{ data.studyTaskInfo.PEIXUE_START_TIME }}
{{ data.studyTaskInfo.PEIXUE_END_TIME }}
</el-descriptions-item>
<el-descriptions-item label="培训类型">
{{ data.studyTaskInfo.train_type_name }}
</el-descriptions-item>
<el-descriptions-item label="视频学习时长">
{{ video_class_hours }}分钟(包含{{ video_count }}个视频)
</el-descriptions-item>
<el-descriptions-item label="资料学习时长">
{{ data_class_hours }}分钟(包含{{ data_count }}个资料)
</el-descriptions-item>
<el-descriptions-item label="合计学习时长">
{{ video_class_hours + data_class_hours }}分钟
</el-descriptions-item>
<el-descriptions-item>
<template #label>
培训单位:(盖章) 日期: {{ fnGetCurrentDay() }}
</template>
</el-descriptions-item>
</el-descriptions>
<br />
<el-descriptions title="课程资料" :column="2">
<el-descriptions-item label="姓名:">
{{ data.userInfo.NAME }}
</el-descriptions-item>
<el-descriptions-item label="身份证号:">
{{ data.userInfo.USER_ID_CARD }}
</el-descriptions-item>
</el-descriptions>
<layout-table :data="data.curriculumList" :show-pagination="false">
<el-table-column label="任务名称">
<el-table-column label="序号" width="70">
<template v-slot="{ $index }">
{{ serialNumber({ currentPage: 1, pageSize: 99999 }, $index) }}
</template>
</el-table-column>
</el-table-column>
<el-table-column :label="data.studyTaskInfo.STUDY_NAME">
<el-table-column prop="COURSEWARENAME" label="课程内容" />
<el-table-column prop="CLASSHOUR" label="课时">
<template v-slot="{ row }">
{{ (row.CLASSHOUR / 45).toFixed(2) }}
</template>
</el-table-column>
<el-table-column prop="SPEAKER" label="讲师" />
</el-table-column>
</layout-table>
<el-descriptions title="考卷详情" :column="2" />
<div style="text-align: center; color: white">
<h3>{{ data.paper.info.EXAMNAME }}</h3>
<span>(满分:{{ data.paper.info.EXAMSCORE || 0 }})</span>
</div>
<el-descriptions :column="2">
<el-descriptions-item label="任务名称:">
{{ data.studyTaskInfo.STUDY_NAME }}
</el-descriptions-item>
<el-descriptions-item label="姓名:">
{{ data.userInfo.NAME }}
</el-descriptions-item>
<el-descriptions-item label="考试时间:">
{{ data.paper.info.OPERATTIME }}
</el-descriptions-item>
<el-descriptions-item label="分数:">
{{ data.examScore.userSecond[0] }}
</el-descriptions-item>
</el-descriptions>
<div v-if="data.paper.selectList.length > 0" style="color: white">
<el-divider content-position="left">单选题</el-divider>
<template
v-for="(item, index) in data.paper.selectList"
:key="item.QUESTION_ID"
>
<el-row>
<el-col :span="24">
{{ index + 1 }}.{{ item.QUESTIONDRY }} 选择答案[{{
data.paper.isExam === "1" ? item.ANSWER : ""
}}]
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="4">A.{{ item.OPTIONA }}</el-col>
<el-col :span="4">B.{{ item.OPTIONB }}</el-col>
<el-col :span="4">C.{{ item.OPTIONC }}</el-col>
<el-col :span="4">D.{{ item.OPTIOND }}</el-col>
<el-col :span="4">
参考答案:{{
data.paper.isExam === "1" ? item.ANSWERRIGHT : item.ANSWER
}}
</el-col>
</el-row>
<el-divider border-style="dashed" />
</template>
</div>
<div v-if="data.paper.multiList.length > 0" style="color: white">
<el-divider content-position="left">多选题</el-divider>
<template
v-for="(item, index) in data.paper.multiList"
:key="item.QUESTION_ID"
>
<el-row>
<el-col :span="24">
{{ index + 1 }}.{{ item.QUESTIONDRY }} 选择答案[{{
data.paper.isExam === "1" ? item.ANSWER : ""
}}]
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="4">A.{{ item.OPTIONA }}</el-col>
<el-col :span="4">B.{{ item.OPTIONB }}</el-col>
<el-col :span="4">C.{{ item.OPTIONC }}</el-col>
<el-col :span="4">D.{{ item.OPTIOND }}</el-col>
<el-col :span="4">
参考答案:{{
data.paper.isExam === "1" ? item.ANSWERRIGHT : item.ANSWER
}}
</el-col>
</el-row>
<el-divider border-style="dashed" />
</template>
</div>
<div v-if="data.paper.judgeList.length > 0" style="color: white">
<el-divider content-position="left">判断题</el-divider>
<template
v-for="(item, index) in data.paper.judgeList"
:key="item.QUESTION_ID"
>
<el-row>
<el-col :span="24">
{{ index + 1 }}.{{ item.QUESTIONDRY }} 选择答案[{{
data.paper.isExam === "1" ? item.ANSWER : ""
}}]
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="4">A.{{ item.OPTIONA }}</el-col>
<el-col :span="4">B.{{ item.OPTIONB }}</el-col>
<el-col :span="4">
参考答案:{{
data.paper.isExam === "1" ? item.ANSWERRIGHT : item.ANSWER
}}
</el-col>
</el-row>
<el-divider border-style="dashed" />
</template>
</div>
<br />
<el-descriptions title="培训考核记录" :column="5" />
<div style="text-align: center; color: white">
<h4>
{{ data.studyTaskInfo.train_type_name }}生产经营单位{{
data.studyTaskInfo.post_type_name
}}安全培训考核记录
</h4>
</div>
<el-descriptions :column="2">
<el-descriptions-item label="生产经营单位或安全生产管理机构名称:(盖章)">
<!-- todo 原项目为空 -->
</el-descriptions-item>
<el-descriptions-item label="档案编号:">
<!-- todo 原项目为空 -->
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="5" border>
<el-descriptions-item label="姓名">
{{ data.userInfo.NAME }}
</el-descriptions-item>
<el-descriptions-item label="性别">
{{ data.userInfo.SEX_NAME }}
</el-descriptions-item>
<el-descriptions-item label="身份证">
{{ data.userInfo.USER_ID_CARD }}
</el-descriptions-item>
<el-descriptions-item label="学历">
{{ data.userInfo.DEGREE_OF_EDUCATION_NAME }}
</el-descriptions-item>
<el-descriptions-item label="专业">
<!-- todo 原项目为空 -->
</el-descriptions-item>
<el-descriptions-item label="职务">
{{ data.userInfo.DUTIES_NAME }}
</el-descriptions-item>
<el-descriptions-item label="部门">
{{ data.userInfo.DEPARTMENT_NAME }}
</el-descriptions-item>
<el-descriptions-item label="工种">
{{ data.userInfo.TYPE_OF_WORK_NAME }}
</el-descriptions-item>
<el-descriptions-item label="行业类别">
{{ data.studyTaskInfo.train_type_name }}
</el-descriptions-item>
<el-descriptions-item label="联系电话">
{{ data.userInfo.USERNAME }}
</el-descriptions-item>
<el-descriptions-item label="人员类型" :span="5">
<el-checkbox-group v-model="data.checkPerType" disabled>
<el-checkbox
v-for="(item, index) in data.personalTypeList"
:key="index"
:label="item.DICTIONARIES_ID"
>{{ item.NAME }}</el-checkbox
>
</el-checkbox-group>
</el-descriptions-item>
</el-descriptions>
<div style="text-align: center; color: white">
<span>安全培训及考核实施情况</span>
</div>
<layout-table
:data="data.curriculumList"
:show-pagination="false"
:span-method="fnMergeCells"
>
<el-table-column label="序号" width="70">
<template v-slot="{ $index }">
{{ serialNumber({ currentPage: 1, pageSize: 99999 }, $index) }}
</template>
</el-table-column>
<el-table-column label="培训时间">
<template v-slot>
{{ data.studyTaskInfo.PEIXUE_START_TIME }}
{{ data.studyTaskInfo.PEIXUE_END_TIME }}
</template>
</el-table-column>
<el-table-column label="培训地点">
<template v-slot></template>
</el-table-column>
<el-table-column prop="COURSEWARENAME" label="培训主要内容" />
<el-table-column label="学时">
<template v-slot="{ row }">
{{ (row.CLASSHOUR / 45).toFixed(2) }}
</template>
</el-table-column>
<el-table-column prop="SPEAKER" label="培训教师" />
<el-table-column label="考试成绩">
<template v-slot>{{ data.examScore.userSecond[0] }}</template>
</el-table-column>
<el-table-column label="补考成绩">
<template v-slot>{{ data.examScore.userSecond[1] }}</template>
</el-table-column>
<el-table-column label="本人签字">
<template v-slot>
<img
v-if="data.examScore.USER_SIGN_PATH"
:src="FILE_URL + data.examScore.USER_SIGN_PATH"
style="height: 50px; width: 50px"
alt="本人"
/>
</template>
</el-table-column>
</layout-table>
<el-descriptions :column="4">
<el-descriptions-item label="记录人员(签字):">
<div v-for="(item, index) in data.signList" :key="index">
<img
v-if="item.TYPE === 1 && item.USER_SIGN_FILE_PATH"
:src="FILE_URL + item.USER_SIGN_FILE_PATH"
style="height: 50px; width: 50px"
alt="记录人员"
/>
</div>
</el-descriptions-item>
<el-descriptions-item label="考核人员(签字):">
<div v-for="(item, index) in data.signList" :key="index">
<img
v-if="item.TYPE === 2 && item.USER_SIGN_FILE_PATH"
:src="FILE_URL + item.USER_SIGN_FILE_PATH"
style="height: 50px; width: 50px"
alt="考核人员"
/>
</div>
</el-descriptions-item>
<el-descriptions-item label="安全生产管理机构负责人(签章):">
</el-descriptions-item>
<el-descriptions-item label="归档日期:">
{{ fnGetCurrentDay() }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script setup>
import {
getStudyTaskInfo,
getUserInfo,
getCurriculums,
getArchivesPaper,
getSignByStudyTask,
getUserExamScoreByStudyTaskId,
} from "@/request/archives.js";
import { layoutFnGetPersonnelType } from "@/assets/js/data_dictionary.js";
import LayoutTable from "@/components/table/index.vue";
import { computed, reactive } from "vue";
import { useRoute } from "vue-router";
import { useUserStore } from "@/pinia/user";
import { serialNumber } from "@/assets/js/utils.js";
const FILE_URL = import.meta.env.VITE_FILE_URL;
const userStore = useUserStore();
const route = useRoute();
const { STUDYTASK_ID, USER_ID } = route.query;
const CORP_NAME = userStore.getUserInfo.CORP_NAME;
const data = reactive({
personalTypeList: [],
studyTaskInfo: {},
userInfo: {},
checkPerType: [],
curriculumList: [],
paper: {
isExam: "",
info: {},
questionList: [],
selectList: [],
multiList: [],
judgeList: [],
},
signList: [],
examScore: {
USER_SIGN_PATH: "",
userExamScore: {},
userSecond: [0, 0], // todo
},
});
const video_class_hours = computed(() => {
let result = 0;
if (data.curriculumList && data.curriculumList.length > 0) {
data.curriculumList.forEach((item) => {
if (item.COURSEWARENAME.indexOf("[视频课件]") > -1) {
result += item.CLASSHOUR;
}
});
}
return result;
});
const video_count = computed(() => {
let result = 0;
if (data.curriculumList && data.curriculumList.length > 0) {
data.curriculumList.forEach((item) => {
if (item.COURSEWARENAME.indexOf("[视频课件]") > -1) {
result += 1;
}
});
}
return result;
});
const data_class_hours = computed(() => {
let result = 0;
if (data.curriculumList && data.curriculumList.length > 0) {
data.curriculumList.forEach((item) => {
if (item.COURSEWARENAME.indexOf("[资料课件]") > -1) {
result += item.CLASSHOUR;
}
});
}
return result;
});
const data_count = computed(() => {
let result = 0;
if (data.curriculumList && data.curriculumList.length > 0) {
data.curriculumList.forEach((item) => {
if (item.COURSEWARENAME.indexOf("[资料课件]") > -1) {
result += 1;
}
});
}
return result;
});
const fnGetStudyTaskInfo = async () => {
const respData = await getStudyTaskInfo({ STUDYTASK_ID });
if (respData && respData.pd) {
data.studyTaskInfo = respData.pd;
}
};
await fnGetStudyTaskInfo();
const fnGetCurriculums = async () => {
const respData = await getCurriculums({ STUDYTASK_ID });
if (respData && respData.varList) {
data.curriculumList = respData.varList;
}
};
await fnGetCurriculums();
const fnGetUserInfo = async () => {
const respData = await getUserInfo({ USER_ID });
if (respData && respData.pd) {
data.userInfo = respData.pd;
data.checkPerType.push(data.userInfo.PERSONNEL_TYPE);
}
};
await fnGetUserInfo();
const fnGetPersonnelType = async () => {
const respData = await layoutFnGetPersonnelType();
if (respData) {
data.personalTypeList = respData;
}
};
await fnGetPersonnelType();
const fnGetArchivesPaper = async () => {
const respData = await getArchivesPaper({ STUDYTASK_ID, USER_ID });
if (respData) {
data.paper.isExam = respData.isExam;
data.paper.info = respData.paper;
data.paper.questionList = respData.questionList;
respData.questionList.forEach((question) => {
if (question.QUESTIONTYPE === "1") {
data.paper.selectList.push(question);
} else if (question.QUESTIONTYPE === "2") {
data.paper.multiList.push(question);
} else if (question.QUESTIONTYPE === "3") {
data.paper.judgeList.push(question);
}
});
}
};
await fnGetArchivesPaper();
const fnGetSignByStudyTask = async () => {
const respData = await getSignByStudyTask({ STUDYTASK_ID });
if (respData && respData.varList) {
data.signList = respData.varList;
}
};
await fnGetSignByStudyTask();
const fnGetUserExamScoreByStudyTaskId = async () => {
const respData = await getUserExamScoreByStudyTaskId({
STUDYTASK_ID,
USER_ID,
});
if (respData) {
data.examScore.USER_SIGN_PATH = respData.USER_SIGN_PATH;
data.examScore.userExamScore = respData.userExamScore;
}
};
await fnGetUserExamScoreByStudyTaskId();
const fnGetCurrentDay = () => {
const currentDatetime = new Date();
const year = currentDatetime.getFullYear();
const month = String(currentDatetime.getMonth() + 1).padStart(2, "0");
const day = String(currentDatetime.getDate()).padStart(2, "0");
return `${year}${month}${day}`;
};
const fnMergeCells = ({ rowIndex, columnIndex }) => {
if (columnIndex > 5) {
if (rowIndex < 1) {
return {
rowspan: data.curriculumList.length,
colspan: 1,
};
}
return {
rowspan: 0,
colspan: 0,
};
}
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,147 @@
<template>
<div>
<layout-card>
<el-row :gutter="12">
<el-col :span="5">
<layout-department-tree
:department-id="DEPARTMENT_ID"
@node-click="
router.push({
path: '/archives/user',
query: {
DEPARTMENT_ID: $event.id,
},
})
"
/>
</el-col>
<el-col :span="19">
<layout-table
:data="list"
v-model:pagination="pagination"
@get-data="fnGetDataTransfer"
>
<el-table-column label="序号" width="70">
<template v-slot="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="USERNAME"
label="用户名"
/>
<el-table-column show-overflow-tooltip prop="NAME" label="姓名" />
<el-table-column
show-overflow-tooltip
prop="DEPARTMENT_NAME"
label="部门"
/>
<el-table-column
show-overflow-tooltip
prop="TASK_COUNT"
label="任务数"
/>
<el-table-column
show-overflow-tooltip
prop="COMPLETE_COUNT"
label="完成任务数"
/>
<el-table-column label="操作" width="200">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
@click="fnChangePerson(row.USER_ID)"
>
人员登记表
</el-button>
<el-button
type="primary"
text
link
@click="
router.push({
path: '/archives/user/task_list',
query: {
USER_ID: row.USER_ID,
},
})
"
>
任务详情
</el-button>
</template>
</el-table-column>
</layout-table>
</el-col>
</el-row>
</layout-card>
<personal
v-if="data.personal.visible"
v-model:visible="data.personal.visible"
:user-id="data.personal.userId"
/>
</div>
</template>
<script setup>
import { reactive, ref } from "vue";
import LayoutDepartmentTree from "@/components/department_tree/index.vue";
import { useUserStore } from "@/pinia/user.js";
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
import { serialNumber } from "@/assets/js/utils.js";
import useListData from "@/assets/js/useListData.js";
import { getUserList } from "@/request/archives.js";
import Personal from "./components/personal.vue";
const userStore = useUserStore();
const router = useRouter();
const route = useRoute();
const departmentIdDefault = userStore.getUserInfo.DEPARTMENT_ID;
const DEPARTMENT_ID = ref(route.query.DEPARTMENT_ID || departmentIdDefault);
const { list, pagination, fnGetData, fnResetPagination } = useListData(
getUserList,
{
otherParams: {
IS_ARCHIVES: 1,
},
key: "userList",
}
);
const data = reactive({
personal: {
visible: false,
userId: "",
},
});
const fnGetDataTransfer = () => {
fnGetData({
DEPARTMENT_ID: DEPARTMENT_ID.value,
IS_ARCHIVES: 1,
});
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
DEPARTMENT_ID: DEPARTMENT_ID.value,
IS_ARCHIVES: 1,
});
};
const fnChangePerson = (userId) => {
if (userId) {
data.personal.visible = true;
data.personal.userId = userId;
}
};
onBeforeRouteUpdate((to) => {
DEPARTMENT_ID.value = to.query.DEPARTMENT_ID || departmentIdDefault;
fnResetPaginationTransfer();
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,205 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="80px"
@submit.prevent="fnResetPaginationTransfer"
>
<el-row>
<el-col :span="4">
<el-form-item label="任务名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="开始时间" prop="STARTTIME">
<el-date-picker
v-model="searchForm.STARTTIME"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="结束时间" prop="ENDTIME">
<el-date-picker
v-model="searchForm.ENDTIME"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态" prop="STATUS">
<el-select v-model="searchForm.STATUS" clearable>
<el-option
v-for="item in data.statusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetDataTransfer"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="STUDY_NAME"
label="任务名称"
/>
<el-table-column
show-overflow-tooltip
prop="CURRICULUMUSERS"
label="任务状态"
>
<template v-slot="{ row }">
{{ fnCompareDate(row) }}
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="post_type_name"
label="岗位培训类型"
/>
<el-table-column prop="SUM_CLASSHOUR" label="任务学时" />
<el-table-column prop="yixue" label="已学学时" />
<el-table-column prop="STAGEEXAMSCORE" label="考试结果">
<template v-slot="{ row }">
<template v-if="row.STAGEEXAMSCORE === '-1'"></template>
<template
v-else-if="Number(row.STAGEEXAMSCORE) >= Number(row.PASSSCORE)"
>
已通过
</template>
<template
v-else-if="Number(row.STAGEEXAMSCORE) < Number(row.PASSSCORE)"
>
未通过
</template>
</template>
</el-table-column>
<el-table-column prop="PEIXUE_START_TIME" label="开始时间" />
<el-table-column prop="PEIXUE_END_TIME" label="结束时间" />
<el-table-column label="操作" align="center" width="200">
<template v-slot="{ row }">
<el-button
v-if="fnCompareDate(row) === '已结束'"
type="primary"
text
link
@click="
router.push({
path: '/archives/user/detail',
query: {
STUDYTASK_ID: row.STUDYTASK_ID,
USER_ID: USER_ID,
},
})
"
>
档案详情
</el-button>
<el-button
v-else
type="primary"
text
link
disabled
@click="ElMessage.warning('任务未完成,无法生成档案')"
>
档案详情
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutTable from "@/components/table/index.vue";
import LayoutCard from "@/components/card/index.vue";
import { getTaskList } from "@/request/archives.js";
import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue";
import { useRoute, useRouter } from "vue-router";
import { serialNumber } from "@/assets/js/utils.js";
import { ElMessage } from "element-plus";
const router = useRouter();
const route = useRoute();
const { USER_ID } = route.query;
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getTaskList, {
otherParams: {
STUDY_USER_ID: USER_ID,
},
});
const data = reactive({
statusList: [
{ value: 1, label: "未开始" },
{ value: 2, label: "进行中" },
{ value: 3, label: "已结束" },
],
});
const fnGetDataTransfer = async () => {
await fnGetData({
STUDY_USER_ID: USER_ID,
});
};
const fnResetPaginationTransfer = async () => {
await fnResetPagination({
STUDY_USER_ID: USER_ID,
});
};
const fnCompareDate = (row) => {
const currentDatetime = new Date();
const year = currentDatetime.getFullYear();
const month = String(currentDatetime.getMonth() + 1).padStart(2, "0");
const day = String(currentDatetime.getDate()).padStart(2, "0");
const dateNow = new Date(`${year}-${month}-${day}`).getTime();
if (new Date(row.PEIXUE_START_TIME).getTime() > dateNow) {
return "未开始";
} else if (
new Date(row.PEIXUE_START_TIME).getTime() <= dateNow &&
new Date(row.PEIXUE_END_TIME).getTime() >= dateNow
) {
return "进行中";
} else if (new Date(row.PEIXUE_END_TIME).getTime() <= dateNow) {
return "已结束";
}
};
</script>
<style scoped lang="scss"></style>

View File

@ -87,8 +87,10 @@
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<el-table-column label="操作" width="200">
<template v-slot="{ row }">
<el-button type="primary" text link>课件文件</el-button>
<!-- todo 查看课件 -->
<el-button
type="primary"
text

View File

@ -98,8 +98,10 @@
</template>
</el-table-column>
<el-table-column prop="NUMEXAMPLE" label="习题数" />
<el-table-column label="操作" width="130">
<el-table-column label="操作" width="200">
<template v-slot="{ row }">
<el-button type="primary" text link>课件文件</el-button>
<!-- todo 查看课件 -->
<el-button
type="primary"
text

View File

@ -62,7 +62,7 @@
<el-table-column
show-overflow-tooltip
prop="COURSEWARENAME"
label="视频课件名称"
label="资料课件名称"
/>
<el-table-column
show-overflow-tooltip
@ -109,14 +109,8 @@ const data = reactive({
const fnGetCurriculumInfo = async () => {
const respData = await getCurriculumInfo({ CURRICULUM_ID });
if (respData) {
const curriculumInfo = respData.pd;
if (curriculumInfo) {
data.curriculumInfo = curriculumInfo;
}
const chapterList = respData.chapterList;
if (chapterList) {
data.chapterList = chapterList;
}
data.curriculumInfo = respData.pd;
data.chapterList = respData.chapterList;
}
};
await fnGetCurriculumInfo();

View File

@ -0,0 +1,135 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="130px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="试卷名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="岗位培训类型" prop="POSTTYPE">
<layout-learning-train-type
v-model="searchForm.POSTTYPE"
type="post"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
prop="EXAMNAME"
label="试卷名称"
show-overflow-tooltip
/>
<el-table-column
show-overflow-tooltip
prop="post_type_name"
label="培训行业类型"
/>
<el-table-column
prop="train_type_name"
label="岗位培训类型"
show-overflow-tooltip
/>
<el-table-column label="试题数">
<template v-slot="{ row }">
{{
Number(row.DUOXUANTICOUNT) +
Number(row.DANYUANTICOUNT) +
Number(row.PANDUITICOUNT)
}}
</template>
</el-table-column>
<el-table-column prop="EXAMSCORE" label="总分数" />
<el-table-column prop="PASSSCORE" label="及格分数" />
<el-table-column prop="STATE" label="试卷状态">
<template v-slot="{ row }">
<template v-if="row.STATE === 0"></template>
<template v-if="row.STATE === 1"></template>
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
:disabled="row.recordID !== '--'"
@click="fnAdd(row.STAGEEXAMPAPERINPUT_ID)"
>
添加
</el-button>
<el-button
type="primary"
text
link
@click="
router.push({
path: '/platform_resource_library/paper/view',
query: {
STAGEEXAMPAPERINPUT_ID: row.STAGEEXAMPAPERINPUT_ID, // ID
},
})
"
>
查看
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutCard from "@/components/card/index.vue";
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
import {
getPaperList,
joinMyPaper,
} from "@/request/platform_resource_library.js";
import useListData from "@/assets/js/useListData.js";
import { serialNumber } from "@/assets/js/utils.js";
import LayoutTable from "@/components/table/index.vue";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getPaperList);
const fnAdd = debounce(1000, async (STAGEEXAMPAPERINPUT_ID) => {
await ElMessageBox.confirm("确定要添加吗?", { type: "warning" });
await joinMyPaper({ STAGEEXAMPAPERINPUT_ID });
ElMessage.success("添加成功");
fnResetPagination();
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,126 @@
<template>
<layout-card>
<el-descriptions :column="2" border>
<el-descriptions-item label="试卷名称">
{{ data.paperInfo.EXAMNAME }}
</el-descriptions-item>
<el-descriptions-item label="" />
<el-descriptions-item label="试卷总分">
{{ data.paperInfo.EXAMSCORE }}
</el-descriptions-item>
<el-descriptions-item label="合格分数">
{{ data.paperInfo.PASSSCORE }}
</el-descriptions-item>
<el-descriptions-item label="岗位培训类型">
{{ data.paperInfo.post_type_name }}
</el-descriptions-item>
<el-descriptions-item label="行业培训类型">
{{ data.paperInfo.train_type_name }}
</el-descriptions-item>
<el-descriptions-item label="多选题数">
{{ data.paperInfo.DUOXUANTICOUNT }}
</el-descriptions-item>
<el-descriptions-item label="多选分数">
{{ data.paperInfo.DUOXUANTINUMBER }}
</el-descriptions-item>
<el-descriptions-item label="单选题数">
{{ data.paperInfo.DANYUANTICOUNT }}
</el-descriptions-item>
<el-descriptions-item label="单选分数">
{{ data.paperInfo.DANXUANTINUMBER }}
</el-descriptions-item>
<el-descriptions-item label="判断题数">
{{ data.paperInfo.PANDUITICOUNT }}
</el-descriptions-item>
<el-descriptions-item label="判断分数">
{{ data.paperInfo.PANDUITINUMBER }}
</el-descriptions-item>
</el-descriptions>
<div class="study-papg">
<dl v-for="(row, i) in data.questionList" :key="row.QUESTION_ID">
<dt>
{{ i + 1 }}.<span v-if="row.QUESTIONTYPE === '1'" class="mark"
>(单选题)</span
>
<span v-if="row.QUESTIONTYPE === '2'" class="mark">()</span>
<span v-if="row.QUESTIONTYPE === '3'" class="mark">()</span>
{{ row.QUESTIONDRY }}
</dt>
<el-radio-group
v-if="row.QUESTIONTYPE === '1'"
:disabled="true"
v-model="row.ANSWER"
>
<dd>
<el-radio label="A">A.{{ row.OPTIONA }}</el-radio>
</dd>
<dd>
<el-radio label="B">B.{{ row.OPTIONB }}</el-radio>
</dd>
<dd>
<el-radio label="C">C.{{ row.OPTIONC }}</el-radio>
</dd>
<dd>
<el-radio label="D">D.{{ row.OPTIOND }}</el-radio>
</dd>
</el-radio-group>
<el-checkbox-group
v-if="row.QUESTIONTYPE === '2'"
:disabled="true"
v-model="row.checkList"
>
<dd>
<el-checkbox label="A">A.{{ row.OPTIONA }}</el-checkbox>
</dd>
<dd>
<el-checkbox label="B">B.{{ row.OPTIONB }}</el-checkbox>
</dd>
<dd>
<el-checkbox label="C">C.{{ row.OPTIONC }}</el-checkbox>
</dd>
<dd>
<el-checkbox label="D">D.{{ row.OPTIOND }}</el-checkbox>
</dd>
</el-checkbox-group>
<el-radio-group
v-if="row.QUESTIONTYPE === '3'"
:disabled="true"
v-model="row.ANSWER"
>
<dd>
<el-radio label="A">A.{{ row.OPTIONA }}</el-radio>
</dd>
<dd>
<el-radio label="B">B.{{ row.OPTIONB }}</el-radio>
</dd>
</el-radio-group>
<div class="proper">答案{{ row.ANSWER }}</div>
</dl>
</div>
</layout-card>
</template>
<script setup>
import { reactive } from "vue";
import { useRoute } from "vue-router";
import { getPaperInfo } from "@/request/platform_resource_library.js";
const route = useRoute();
const { STAGEEXAMPAPERINPUT_ID } = route.query;
const data = reactive({
paperInfo: {},
questionList: [],
});
const fnGetPaperInfo = async () => {
const respData = await getPaperInfo({ STAGEEXAMPAPERINPUT_ID });
if (respData) {
data.paperInfo = respData.pd;
data.questionList = respData.inputQue;
}
};
await fnGetPaperInfo();
</script>
<style scoped lang="scss"></style>