|
|
|
|
@ -62,28 +62,33 @@
|
|
|
|
|
<pagination v-show="workingCapitalTotal > 0" :total="workingCapitalTotal" v-model:page="scoreParams.index" v-model:limit="scoreParams.size" @pagination="getList" />
|
|
|
|
|
<el-dialog v-model="WeightStart" title="权重设置" width="500" class="F_dialog teacher-dialog">
|
|
|
|
|
<el-form ref="ruleFormRef" :model="scoreWeightObj" class="demo-form" :rules="rules">
|
|
|
|
|
<el-form-item label="市场需求挖掘:" prop="marketResearchWeight" label-width="150">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.marketResearchWeight" placeholder="" clearable>
|
|
|
|
|
<el-form-item label="互联网产品开发基础认知:" prop="foundationWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.foundationWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品规划:" prop="productPlanningWeight" label-width="150">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.productPlanningWeight" placeholder="" clearable>
|
|
|
|
|
<el-form-item label="市场洞察与需求分析:" prop="marketInsightWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.marketInsightWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品投放测试:" prop="productLaunchTestWeight" label-width="150">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.productLaunchTestWeight" placeholder="" clearable>
|
|
|
|
|
<el-form-item label="产品规划与设计:" prop="planningDesignWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.planningDesignWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="供应渠道管理:" prop="supplyChannelWeight" label-width="150">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.supplyChannelWeight" placeholder="" clearable>
|
|
|
|
|
<el-form-item label="产品开发与测试验证:" prop="developmentValidationWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.developmentValidationWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品评估与考核:" prop="productEvaluationWeight" label-width="150">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.productEvaluationWeight" placeholder="" clearable>
|
|
|
|
|
<el-form-item label="产品上线与运营推广:" prop="launchOperationWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.launchOperationWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="综合实训:" prop="comprehensiveTrainingWeight" label-width="200">
|
|
|
|
|
<el-input v-model.number="scoreWeightObj.comprehensiveTrainingWeight" placeholder="" clearable>
|
|
|
|
|
<template #suffix>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -147,28 +152,11 @@ const trainingProgressTitle = (row) => {
|
|
|
|
|
if (row.trainingProgress === null || row.trainingProgress === undefined) return "";
|
|
|
|
|
return `已完成 ${row.completedTaskCount || 0}/${row.totalTaskCount || 0} 项`;
|
|
|
|
|
};
|
|
|
|
|
const rules = {
|
|
|
|
|
marketResearchWeight: [
|
|
|
|
|
{ required: true, message: "请输入市场需求挖掘权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
],
|
|
|
|
|
productEvaluationWeight: [
|
|
|
|
|
{ required: true, message: "请输入产品评估与考核权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
],
|
|
|
|
|
productLaunchTestWeight: [
|
|
|
|
|
{ required: true, message: "请输入产品投放测试权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
],
|
|
|
|
|
productPlanningWeight: [
|
|
|
|
|
{ required: true, message: "请输入产品规划权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
],
|
|
|
|
|
supplyChannelWeight: [
|
|
|
|
|
{ required: true, message: "请输入供应渠道管理权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
const weightFields = ["foundationWeight", "marketInsightWeight", "planningDesignWeight", "developmentValidationWeight", "launchOperationWeight", "comprehensiveTrainingWeight"];
|
|
|
|
|
const rules = Object.fromEntries(weightFields.map((field) => [field, [
|
|
|
|
|
{ required: true, message: "请输入权重", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "权重必须为数字值" },
|
|
|
|
|
]]));
|
|
|
|
|
const buildScoreQuery = () => {
|
|
|
|
|
const { studentId, ...query } = scoreParams.value;
|
|
|
|
|
return {
|
|
|
|
|
@ -185,14 +173,14 @@ const getList = () => {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const scoreweight = () => {
|
|
|
|
|
if (!scoreParams.value.classId) {
|
|
|
|
|
proxy.$modal.msgWarning("请选择自己的教学班后再设置权重");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
WeightStart.value = true;
|
|
|
|
|
indexApi.getWeightList({ schoolId: userStore.userInfo.schoolId }).then((res) => {
|
|
|
|
|
indexApi.getTeachingClassWeight(scoreParams.value.classId).then((res) => {
|
|
|
|
|
scoreWeightObj.value = res.data;
|
|
|
|
|
for (const key in scoreWeightObj.value) {
|
|
|
|
|
if (key !== "schoolId") {
|
|
|
|
|
scoreWeightObj.value[key] = scoreWeightObj.value[key] * 100;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
weightFields.forEach((key) => (scoreWeightObj.value[key] = Number(scoreWeightObj.value[key]) * 100));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const workingCapitalWeightHandle = () => {
|
|
|
|
|
@ -200,18 +188,15 @@ const workingCapitalWeightHandle = () => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
let params = {};
|
|
|
|
|
let sum = 0;
|
|
|
|
|
for (const key in scoreWeightObj.value) {
|
|
|
|
|
if (key !== "schoolId") {
|
|
|
|
|
params[key] = scoreWeightObj.value[key] / 100;
|
|
|
|
|
sum += scoreWeightObj.value[key] / 100;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (sum !== 1) {
|
|
|
|
|
weightFields.forEach((key) => {
|
|
|
|
|
params[key] = Number(scoreWeightObj.value[key]) / 100;
|
|
|
|
|
sum += params[key];
|
|
|
|
|
});
|
|
|
|
|
if (Math.abs(sum - 1) > 0.000001) {
|
|
|
|
|
proxy.$message.error("权重合计为100%");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
params.schoolId = userStore.userInfo.schoolId;
|
|
|
|
|
indexApi.updateWeight(params).then((res) => {
|
|
|
|
|
indexApi.updateTeachingClassWeight(scoreParams.value.classId, params).then((res) => {
|
|
|
|
|
proxy.$message.success("权重设置成功");
|
|
|
|
|
WeightStart.value = false;
|
|
|
|
|
});
|
|
|
|
|
@ -221,7 +206,7 @@ const workingCapitalWeightHandle = () => {
|
|
|
|
|
const classList = ref([]);
|
|
|
|
|
const teachingClassList = computed(() => classList.value.filter((item) => item.classType === "TEACHING"));
|
|
|
|
|
const getClassList = () => {
|
|
|
|
|
indexApi.getClassListBySchoolId({ schoolId: userStore.userInfo.schoolId }).then((res) => {
|
|
|
|
|
indexApi.getOwnedTeachingClasses().then((res) => {
|
|
|
|
|
classList.value = res.data;
|
|
|
|
|
if (scoreParams.value.classId && !teachingClassList.value.some((item) => item.schoolClassId === scoreParams.value.classId)) {
|
|
|
|
|
scoreParams.value.classId = "";
|
|
|
|
|
@ -242,6 +227,10 @@ const exportExcel = () => {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const getClassScoreDetail = (row) => {
|
|
|
|
|
if (!scoreParams.value.classId) {
|
|
|
|
|
proxy.$modal.msgWarning("请选择自己的教学班后再查看成绩详情");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
indexApi.getScoreDetail({ userId: row.userId, classId: scoreParams.value.classId }).then((res) => {
|
|
|
|
|
tableData.value = res.data;
|
|
|
|
|
scoreDetailsStart.value = true;
|
|
|
|
|
@ -249,6 +238,10 @@ const getClassScoreDetail = (row) => {
|
|
|
|
|
};
|
|
|
|
|
// 更新成绩
|
|
|
|
|
const updateScore = () => {
|
|
|
|
|
if (!scoreParams.value.classId) {
|
|
|
|
|
proxy.$modal.msgWarning("请选择自己的教学班后再更新成绩");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
|
|
const params = { schoolId: userStore.userInfo.schoolId };
|
|
|
|
|
|