Merge branch 'compulsory_professional_skills' into 250213-prod-master_1202-gx-copy

This commit is contained in:
gengxin
2025-02-25 13:49:32 +08:00
12 changed files with 155 additions and 121 deletions

View File

@@ -18,8 +18,8 @@ import { boeRequest } from "@/api/request";
// "application/x-www-form-urlencoded";
axios.defaults.withCredentials = true;
const http = axios.create({
// baseURL: '/growth',
baseURL: process.env.VUE_APP_BASE_API_GROWTH,
baseURL: '/growth',
// baseURL: process.env.VUE_APP_BASE_API_GROWTH,
timeout: 1000 * 15,
// headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "application/json" },

View File

@@ -195,6 +195,6 @@
const fetch = () => nextTick(onFetch);
defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove , params });
defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove , params,data });
</script>

View File

@@ -24,9 +24,7 @@
datasource.info.liveStartTime || datasource.info.activityStartTime
}}
{{
datasource.info.liveStartTime || datasource.info.activityEndTime
}}
{{ datasource.info.liveEndTime || datasource.info.activityEndTime }}
</div>
<div class="endtime" style="margin-left: 64px">
@@ -76,11 +74,7 @@
</div>
</div>
</div>
<div
class="btnss"
style="margin-top: 20px"
v-if="checkPer(permissions, createId)"
>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn1" @click="signQR">
<div class="wz">签到二维码</div>
</div>
@@ -381,17 +375,25 @@ export default {
let startTime =
props.datasource.info.liveStartTime ||
props.datasource.info.activityStartTime;
// 开始时间
let endTime =
props.datasource.info.liveEndTime ||
props.datasource.info.activityEndTime;
// 开始前签到时间
let afterSignIn = props.datasource.info.afterSignIn;
// 结束后签到时间
let beforeSignIn = props.datasource.info.beforeSignIn;
state.beginTime = dayjs(startTime)
.subtract(afterSignIn, "minute")
.format("YYYY-MM-DD HH:mm:ss");
state.endTime = dayjs(startTime)
.add(beforeSignIn, "minute")
.format("YYYY-MM-DD HH:mm:ss");
state.beginTime = afterSignIn
? dayjs(startTime)
.subtract(afterSignIn, "minute")
.format("YYYY-MM-DD HH:mm:ss")
: startTime;
state.endTime = beforeSignIn
? dayjs(startTime)
.add(beforeSignIn, "minute")
.format("YYYY-MM-DD HH:mm:ss")
: endTime;
};
const afterVisibleChange = (bol) => {
@@ -645,7 +647,7 @@ export default {
width: 100,
align: "center",
customRender: (value) => {
return checkPer(props.permissions, props.createId) ? (
return (
<div
class="opa"
style="display:flex;justify-content:center;align-items:center;"
@@ -724,8 +726,6 @@ export default {
<div>请假</div>
</div>
</div>
) : (
""
);
},
},
@@ -810,15 +810,18 @@ export default {
props.datasource
);
console.log("props.datasource", props.datasource);
if (props.types == 2) {
window.open(
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
window.open(
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
);
} else {
window.open(
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
);
}
// if (props.types == 2) {
// window.open(
// `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
// );
// } else {
// window.open(
// `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=1&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
// );
// }
// api
// .exportTaskStudent({

View File

@@ -190,8 +190,6 @@ const rulesRef = ref({
],
});
let validate = Form.useForm(formData.value.info, rulesRef).validate;
const closeDrawer = () => {
if (step.value > 1) {
step.value = step.value - 1;
@@ -230,7 +228,8 @@ function delTag() {
formData.value.info.evaluationTypeId = "";
formData.value.info.evaluationTypeName = "";
}
// 验证方法
let validate = null;
async function confirm() {
await validate().catch(({ errorFields }) => {
message.warning(errorFields[0].errors.join());
@@ -262,12 +261,14 @@ async function confirm() {
function openDrawer(row) {
row && (formData.value = row);
row &&
(dateTime.value = [
if (row && row.info.evaluationEndTime) {
dateTime.value = [
dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"),
dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm"),
]);
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
];
}
validate = Form.useForm(formData.value.info, rulesRef).validate;
visible.value = true;
}

View File

@@ -310,7 +310,7 @@ const props = defineProps({
},
},
});
const params = ref({ pid: 0, type: 18 });
const params = ref({ pid: 0, type: 3 });
const courseSelectRows = ref([]);
const infoId = computed(() => props.datasource.growthId);
@@ -328,7 +328,7 @@ const addUserConfirm = (stuSelectRows, projectSelectRows) => {
}
saveStu({
targetId: data.value[coursePlanIndex.value]?.id,
type: data.value[coursePlanIndex.value].type,
type: 3,
studentList: stuSelectRows,
projectList: projectSelectRows,
}).then(() => {
@@ -341,7 +341,8 @@ const planParams = computed(() => ({
type: props.type,
offcourseId: props.datasource?.taskId,
}));
const columns = ref([
const columns2 = [
{
title: "工号",
dataIndex: "studentUserNo",
@@ -450,6 +451,9 @@ const columns = ref([
</span>
),
},
];
const columns = ref();
const columns1 = [
{
title: "考勤情况",
ellipsis: true,
@@ -497,7 +501,7 @@ const columns = ref([
</div>
),
},
]);
];
const {
data = [],
loading,
@@ -509,7 +513,13 @@ watch(
() => {
coursePlanIndex.value = 0;
params.value.pid = data.value[coursePlanIndex.value]?.id || 0;
if (data.value[coursePlanIndex.value].type !== 4) {
columns.value = [...columns2];
} else {
columns.value = [...columns2, ...columns1];
}
tableRef.value.fetch();
console.log(1111111);
}
);
@@ -517,6 +527,11 @@ watch(
const openCourseName = ref("");
const ChoiceCourse = (n) => {
openCourseName.value = data.value[n].name;
if (data.value[n].type !== 4) {
columns.value = [...columns2];
} else {
columns.value = [...columns2, ...columns1];
}
coursePlanIndex.value = n;
params.value.pid = data.value[n].id;
tableRef.value.fetch();
@@ -571,6 +586,10 @@ const batchSign = () => {
});
};
const batchSignAll = () => {
if (!tableRef.value.data || !tableRef.value.data.length) {
message.warning("当前课程没有分配学员,请先分配学员");
return;
}
dialog({
content: "确定全部签到吗?",
ok: () => {
@@ -599,7 +618,7 @@ function stuSign(text) {
courseId: offcoursePlanId.value,
ids: [text.record.studentId],
studentName: text.record.studentName,
taskId: props.datasource.id,
// taskId: props.datasource.id,
taskType: props.datasource.taskType,
type: 3,
});
@@ -608,7 +627,7 @@ function stuSign(text) {
courseId: offcoursePlanId.value,
ids: [text.record.studentId],
studentName: text.record.studentName,
taskId: props.datasource.id,
// taskId: props.datasource.id,
taskType: props.datasource.taskType,
type: 3,
});
@@ -629,7 +648,7 @@ function submitCall(flag) {
// 导出数据
function exportTaskStu() {
window.open(
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=4&pid=${offcoursePlanId.value}&thirdType=2`
`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2`
);
}

View File

@@ -122,13 +122,13 @@
<div class="btn btn1" style="margin-right: 20px" @click="hasten()">
<div class="wz">催促学习</div>
</div>
<div
<!-- <div
class="btn btn1"
@click="batchFinish"
style="margin-right: 20px"
>
<div class="wz">批量标注完成</div>
</div>
</div> -->
<div
class="btn btn1"
@@ -270,7 +270,7 @@ const changeStatus = (e) => {
delete params.value.status;
}
};
const params = ref({ pid: 0, type: 4 });
const params = ref({ pid: 0, type: 3 });
const courseSelectRows = ref([]);
const planParams = computed(() => ({
type: props.type,
@@ -406,59 +406,59 @@ const columns = ref([
</span>
),
},
{
title: "操作",
ellipsis: true,
className: "h",
dataIndex: "opacation",
key: "opacation",
width: 100,
align: "center",
customRender: ({
record: {
workStatus,
answerId,
examinationScore,
studentId,
finishStatus,
},
}) => (
<div style="display:flex;justify-content:center;">
{examinationScore ? (
<a
className="opa"
style={{
color: examinationScore ? "" : "#666",
marginRight: "12px",
}}
onClick={() => examinationScore && showExamAnswer(answerId)}
>
查看答卷
</a>
) : (
""
)}
{workStatus ? (
<a
class="opa"
style={{ color: workStatus ? "" : "#666" }}
onClick={() => workStatus && showCWvisible(studentId)}
>
查看作业
</a>
) : (
""
)}
{finishStatus != 1 ? (
<a className="opa" onClick={() => finishTask(studentId)}>
标记为完成
</a>
) : (
""
)}
</div>
),
},
// {
// title: "操作",
// ellipsis: true,
// className: "h",
// dataIndex: "opacation",
// key: "opacation",
// width: 100,
// align: "center",
// customRender: ({
// record: {
// workStatus,
// answerId,
// examinationScore,
// studentId,
// finishStatus,
// },
// }) => (
// <div style="display:flex;justify-content:center;">
// {examinationScore ? (
// <a
// className="opa"
// style={{
// color: examinationScore ? "" : "#666",
// marginRight: "12px",
// }}
// onClick={() => examinationScore && showExamAnswer(answerId)}
// >
// 查看答卷
// </a>
// ) : (
// ""
// )}
// {workStatus ? (
// <a
// class="opa"
// style={{ color: workStatus ? "" : "#666" }}
// onClick={() => workStatus && showCWvisible(studentId)}
// >
// 查看作业
// </a>
// ) : (
// ""
// )}
// {finishStatus != 1 ? (
// <a className="opa" onClick={() => finishTask(studentId)}>
// 标记为完成
// </a>
// ) : (
// ""
// )}
// </div>
// ),
// },
]);
watch(
() => data.value,
@@ -556,17 +556,18 @@ function exportTaskStu() {
}
const hasten = () => {
message.success("催促成功");
console.log(data.value[coursePlanIndex.value]);
if(!tableRef.value.data || !tableRef.value.data.length){
message.warning("当前课程没有可催促的学员");
return
}
batchSendMessage({
// courseId: props.datasource.courseId,//任务的Id
courseId: data.value[coursePlanIndex.value].id, //任务的Id
courseName: props.datasource.name, //任务的名称
logo: props.type, //项目或径的标识 1-项目 2-路径图 3面授课
targetId: infoId.value, //路径图的就是routerId,项目的是projectId;根据这张图来看的话
courseName: props.datasource.taskName, //任务的名称
logo: 3, //项目或径的标识 1-项目 2-路径图 3面授课
taskType: props.datasource.taskType, //催促的任务的类型
chapterId: props.datasource.stageId, //阶段或关卡Id
});
message.success("催促成功");
};
function afterVisibleChange(bool) {

View File

@@ -91,7 +91,7 @@
<div class="wz">导出数据</div>
</div>
<template v-if="datasource.taskType == 4">
<!-- <template v-if="datasource.taskType == 4">
<div
class="btn btn2"
@click="exportHomeWorkShow"
@@ -102,7 +102,7 @@
<div class="btn btn2" style="margin-left: 20px">
<div class="wz" @click="showEntryScore">导入成绩</div>
</div>
</template>
</template> -->
</div>
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
<a-table
@@ -447,6 +447,10 @@ export default {
};
//催促
const godie = () => {
if(!state.tableData.length){
message.warning("当前学习任务没有可催促的学员");
return
}
var obj = {
courseId: props.datasource.taskId
? props.datasource.taskId

View File

@@ -127,7 +127,7 @@ const closeDrawer = () => {
visible.value = false;
dateTime.value = [];
formData.reset();
formData.info = {};
formData.value.info = {};
};
async function confirm() {

View File

@@ -581,19 +581,22 @@ export default {
key: "learnNum",
align: "center",
ellipsis: true,
width: 150,
},
{
title: "完成人数",
title: "完成人数",
dataIndex: "comLearnNum",
key: "comLearnNum",
align: "center",
ellipsis: true,
width: 150,
},
{
title: "完成比例",
dataIndex: "ratio",
key: "ratio",
align: "center",
width: 150,
ellipsis: true,
customRender: ({ record }) => {
return `${record.ratio * 100}%`;
@@ -650,10 +653,10 @@ export default {
let params = {
pageNum: state.pageNum,
pageSize: state.pageSize,
stdPosition: state.statusPost,
stdPositionDesr: state.statusPost,
isPublished: state.statusValue,
bandIdList: state.statusRank, //职级
qualsLevelCode: state.statusOffice,
qualsLevelDesr: state.statusOffice,
dataSource: state.dataSourceValue,
};
console.log(store);

View File

@@ -569,19 +569,22 @@ export default {
key: "learnNum",
align: "center",
ellipsis: true,
width: 150,
},
{
title: "完成人数",
title: "完成人数",
dataIndex: "comLearnNum",
key: "comLearnNum",
align: "center",
ellipsis: true,
width: 150,
},
{
title: "完成比例",
dataIndex: "ratio",
key: "ratio",
align: "center",
width: 150,
ellipsis: true,
customRender: ({ record }) => {
return `${record.ratio * 100}%`;

View File

@@ -528,7 +528,7 @@
<template
v-if="
element.taskType != 2 && checkMenu('growthQRCode')
element.taskType != 3 && element.taskType != 2 && checkMenu('growthQRCode')
"
>
<div

View File

@@ -18,16 +18,16 @@ module.exports = defineConfig({
overlay: false,// 解决代码抛出异常
},
proxy: {
"/professional": {
target: 'http://192.168.38.211:32002',
// target: 'http://192.168.50.195:32002',
// target: 'http://192.168.86.195:32002',
changeOrigin: true,
},
// "/growth": {
// target: 'https:' + process.env.VUE_APP_BOE_API_URL,
// "/professional": {
// target: 'http://192.168.38.211:32002',
// // target: 'http://192.168.50.195:32002',
// // target: 'http://192.168.86.195:32002',
// changeOrigin: true,
// },
"/growth": {
target: 'https:' + process.env.VUE_APP_BOE_API_URL,
changeOrigin: true,
},
"/manageApi": {
target: 'https:' + process.env.VUE_APP_PROXY_URL,
changeOrigin: true, //表示是否改变原域名