mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
提交
This commit is contained in:
@@ -18,8 +18,8 @@ import { boeRequest } from "@/api/request";
|
|||||||
// "application/x-www-form-urlencoded";
|
// "application/x-www-form-urlencoded";
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
// baseURL: '/growth',
|
baseURL: '/growth',
|
||||||
baseURL: process.env.VUE_APP_BASE_API_GROWTH,
|
// baseURL: process.env.VUE_APP_BASE_API_GROWTH,
|
||||||
timeout: 1000 * 15,
|
timeout: 1000 * 15,
|
||||||
// headers: { "Content-Type": "multipart/form-data" },
|
// headers: { "Content-Type": "multipart/form-data" },
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
title="添加活动"
|
title="添加活动"
|
||||||
placement="right"
|
placement="right"
|
||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain" v-if="visible">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">{{ formData.id ? "编辑" : "添加" }}活动</div>
|
<div class="headerTitle">{{ formData.id ? "编辑" : "添加" }}活动</div>
|
||||||
<img
|
<img
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, defineEmits, defineProps, ref } from "vue";
|
import { computed, defineEmits, defineProps, ref, reactive } from "vue";
|
||||||
import { Form, message } from "ant-design-vue";
|
import { Form, message } from "ant-design-vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useResetRef } from "@/utils/useCommon";
|
import { useResetRef } from "@/utils/useCommon";
|
||||||
@@ -214,7 +214,7 @@ const props = defineProps({
|
|||||||
growId: String,
|
growId: String,
|
||||||
});
|
});
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const formData = useResetRef({
|
const formData = ref({
|
||||||
info: {
|
info: {
|
||||||
activityName: "",
|
activityName: "",
|
||||||
activityNotice: "",
|
activityNotice: "",
|
||||||
@@ -267,8 +267,7 @@ const rulesRef = ref({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
|
||||||
const durationText = computed(() =>
|
const durationText = computed(() =>
|
||||||
dateTime.value?.length
|
dateTime.value?.length
|
||||||
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
||||||
@@ -278,8 +277,18 @@ const durationText = computed(() =>
|
|||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
dateTime.value = [];
|
dateTime.value = [];
|
||||||
formData.reset();
|
// formData.reset();
|
||||||
formData.value.info = {};
|
formData.value.info = {
|
||||||
|
activityName: "",
|
||||||
|
activityNotice: "",
|
||||||
|
activityStartTime: "",
|
||||||
|
activityEndTime: "",
|
||||||
|
activityDuration: "",
|
||||||
|
activityAddress: "",
|
||||||
|
activityExplain: "",
|
||||||
|
beforeSignIn: "",
|
||||||
|
afterSignIn: "",
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function timeChange(time, timeStr) {
|
function timeChange(time, timeStr) {
|
||||||
@@ -298,6 +307,10 @@ async function confirm() {
|
|||||||
message.warning(errorFields[0].errors.join());
|
message.warning(errorFields[0].errors.join());
|
||||||
throw Error("数据校验不通过");
|
throw Error("数据校验不通过");
|
||||||
});
|
});
|
||||||
|
if (dayjs().isAfter(dayjs(formData.value.info.activityEndTime))) {
|
||||||
|
message.warning("活动结束时间不能小于当前时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 专业力ID
|
// 专业力ID
|
||||||
formData.value.growthId = props.growId;
|
formData.value.growthId = props.growId;
|
||||||
// 任务类型
|
// 任务类型
|
||||||
@@ -307,8 +320,12 @@ async function confirm() {
|
|||||||
// 任务名称
|
// 任务名称
|
||||||
formData.value.taskName = formData.value.info.activityName;
|
formData.value.taskName = formData.value.info.activityName;
|
||||||
// 任务时长
|
// 任务时长
|
||||||
formData.value.duration = durationText.value;
|
if (!formData.value.info.activityDuration) {
|
||||||
formData.value.info.activityDuration = durationText.value;
|
formData.value.info.activityDuration = durationText.value;
|
||||||
|
formData.value.duration = durationText.value;
|
||||||
|
} else {
|
||||||
|
formData.value.duration = formData.value.info.activityDuration;
|
||||||
|
}
|
||||||
saveTask(formData.value).then((res) => {
|
saveTask(formData.value).then((res) => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
if (formData.value.id) {
|
if (formData.value.id) {
|
||||||
@@ -326,12 +343,13 @@ async function confirm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openDrawer(row) {
|
function openDrawer(row) {
|
||||||
row && (formData.value = row);
|
row && (formData.value = reactive(row));
|
||||||
row &&
|
row &&
|
||||||
(dateTime.value = [
|
(dateTime.value = [
|
||||||
dayjs(row.info.activityStartTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.activityStartTime, "YYYY-MM-DD HH:mm"),
|
||||||
dayjs(row.info.activityEndTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.activityEndTime, "YYYY-MM-DD HH:mm"),
|
||||||
]);
|
]);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,9 +90,10 @@
|
|||||||
v-model:value="nameSearch.departName"
|
v-model:value="nameSearch.departName"
|
||||||
placeholder="请输入部门名称"
|
placeholder="请输入部门名称"
|
||||||
@search="getOrgList"
|
@search="getOrgList"
|
||||||
|
allowClear
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="tree" style="margin: 10px 4px 0 10px">
|
<div class="tree" style="margin: 10px 4px 0 10px" v-if="!treeSpin">
|
||||||
<a-tree
|
<a-tree
|
||||||
allow-clear
|
allow-clear
|
||||||
tree-default-expand-all
|
tree-default-expand-all
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const formData = useResetRef({
|
|||||||
discussSettings: true,
|
discussSettings: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['refresh']);
|
const emit = defineEmits(["refresh"]);
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
const rulesRef = ref({
|
const rulesRef = ref({
|
||||||
discussName: [
|
discussName: [
|
||||||
@@ -118,8 +118,7 @@ const rulesRef = ref({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
let validate = Form.useForm(formData.value.info, rulesRef).validate
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
dateTime.value = [];
|
dateTime.value = [];
|
||||||
@@ -138,8 +137,8 @@ async function confirm() {
|
|||||||
formData.value.taskType = props.type;
|
formData.value.taskType = props.type;
|
||||||
// 必修/选修
|
// 必修/选修
|
||||||
formData.value.type = props.activeKey;
|
formData.value.type = props.activeKey;
|
||||||
// 任务名称
|
// 任务名称
|
||||||
formData.value.taskName = formData.value.info.discussName;
|
formData.value.taskName = formData.value.info.discussName;
|
||||||
saveTask(formData.value).then((res) => {
|
saveTask(formData.value).then((res) => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
if (formData.value.id) {
|
if (formData.value.id) {
|
||||||
@@ -162,6 +161,7 @@ function openDrawer(row) {
|
|||||||
row.info.discussSettings === "false" || row.info.discussSettings === false
|
row.info.discussSettings === "false" || row.info.discussSettings === false
|
||||||
? false
|
? false
|
||||||
: true);
|
: true);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ const rulesRef = ref({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
if (step.value > 1) {
|
if (step.value > 1) {
|
||||||
@@ -267,6 +267,7 @@ function openDrawer(row) {
|
|||||||
dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"),
|
||||||
dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm"),
|
||||||
]);
|
]);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">选择试卷:</span>
|
<span style="margin-right: 3px">选择试卷:</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="formData.info.examinationPaperId">
|
<div v-if="formData.info.examinationPaperId">
|
||||||
<a-tag
|
<a-tag
|
||||||
closable
|
closable
|
||||||
@@ -95,11 +96,13 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox" @click="selectTest">
|
<template v-if="!formData.id">
|
||||||
<button class="xkbtn" style="margin: 0">
|
<div class="btnbox" @click="selectTest">
|
||||||
{{ formData.info.examinationPaperId ? "重选" : "选择" }}试卷
|
<button class="xkbtn" style="margin: 0">
|
||||||
</button>
|
{{ formData.info.examinationPaperId ? "重选" : "选择" }}试卷
|
||||||
</div>
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- <GrowthSelectTest
|
<!-- <GrowthSelectTest
|
||||||
v-if="taskIndex < 0 || (taskIndex >= 0 && isEdit == false)"
|
v-if="taskIndex < 0 || (taskIndex >= 0 && isEdit == false)"
|
||||||
@@ -149,6 +152,7 @@
|
|||||||
<div class="select">
|
<div class="select">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
|
:disabled="formData.id"
|
||||||
:max="999999"
|
:max="999999"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
@@ -170,6 +174,7 @@
|
|||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
min="0"
|
min="0"
|
||||||
|
:disabled="formData.id"
|
||||||
v-model:value="formData.info.passLine"
|
v-model:value="formData.info.passLine"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
/>
|
/>
|
||||||
@@ -183,6 +188,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
|
:disabled="formData.id"
|
||||||
v-model:value="formData.info.examinationExplain"
|
v-model:value="formData.info.examinationExplain"
|
||||||
placeholder="请输入考试说明"
|
placeholder="请输入考试说明"
|
||||||
show-count
|
show-count
|
||||||
@@ -203,6 +209,7 @@
|
|||||||
<span>允许重复考试:</span>
|
<span>允许重复考试:</span>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:min="-1"
|
:min="-1"
|
||||||
|
:disabled="formData.id"
|
||||||
:max="999999"
|
:max="999999"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="
|
style="
|
||||||
@@ -229,6 +236,7 @@
|
|||||||
<a-radio-group
|
<a-radio-group
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-model:value="formData.info.showAnswers"
|
v-model:value="formData.info.showAnswers"
|
||||||
|
:disabled="formData.id"
|
||||||
>
|
>
|
||||||
<a-radio :value="'1'">允许查看</a-radio>
|
<a-radio :value="'1'">允许查看</a-radio>
|
||||||
<a-radio :value="'2'">不允许查看</a-radio>
|
<a-radio :value="'2'">不允许查看</a-radio>
|
||||||
@@ -242,6 +250,7 @@
|
|||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
|
:disabled="formData.id"
|
||||||
v-model:value="formData.info.showAnalysis"
|
v-model:value="formData.info.showAnalysis"
|
||||||
>
|
>
|
||||||
<a-radio :value="'1'">允许查看</a-radio>
|
<a-radio :value="'1'">允许查看</a-radio>
|
||||||
@@ -256,6 +265,7 @@
|
|||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
|
:disabled="formData.id"
|
||||||
v-model:value="formData.info.scoringModel"
|
v-model:value="formData.info.scoringModel"
|
||||||
>
|
>
|
||||||
<a-radio :value="'1'">最高一次</a-radio>
|
<a-radio :value="'1'">最高一次</a-radio>
|
||||||
@@ -271,6 +281,7 @@
|
|||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
|
:disabled="formData.id"
|
||||||
v-model:value="formData.info.questionArrangement"
|
v-model:value="formData.info.questionArrangement"
|
||||||
>
|
>
|
||||||
<a-radio :value="'1'">试题乱序</a-radio>
|
<a-radio :value="'1'">试题乱序</a-radio>
|
||||||
@@ -424,7 +435,7 @@ const initValue = {
|
|||||||
examinationPaperId: "",
|
examinationPaperId: "",
|
||||||
examinationStartTime: "",
|
examinationStartTime: "",
|
||||||
examinationEndTime: "",
|
examinationEndTime: "",
|
||||||
examinationDuration: null,
|
examinationDuration: 0,
|
||||||
passLine: "",
|
passLine: "",
|
||||||
examType: 1,
|
examType: 1,
|
||||||
source: "",
|
source: "",
|
||||||
@@ -491,18 +502,19 @@ const outerRule = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const rulesRef = ref(innerRule);
|
const rulesRef = ref([innerRule]);
|
||||||
const emit = defineEmits({});
|
const emit = defineEmits({});
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
|
|
||||||
const { resetFields, validate } = Form.useForm(formData.value.info, rulesRef);
|
|
||||||
watch(
|
watch(
|
||||||
() => formData.value.info.examType,
|
() => formData.value.info.examType,
|
||||||
() => {
|
() => {
|
||||||
formData.value.info.examType === 1
|
formData.value.info.examType === 1
|
||||||
? (rulesRef.value = innerRule)
|
? (rulesRef.value = innerRule)
|
||||||
: (rulesRef.value = outerRule);
|
: (rulesRef.value = outerRule);
|
||||||
}
|
},
|
||||||
|
{ deep: true }
|
||||||
);
|
);
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
// 新增完试卷需要更新数据
|
// 新增完试卷需要更新数据
|
||||||
@@ -512,7 +524,6 @@ const closeDrawer = () => {
|
|||||||
if (step.value > 1) {
|
if (step.value > 1) {
|
||||||
step.value = step.value - 1;
|
step.value = step.value - 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
formData.reset();
|
formData.reset();
|
||||||
formData.value.info = {
|
formData.value.info = {
|
||||||
examType: 1,
|
examType: 1,
|
||||||
@@ -545,7 +556,16 @@ async function confirm() {
|
|||||||
message.warning(errorFields[0].errors.join());
|
message.warning(errorFields[0].errors.join());
|
||||||
throw Error("数据校验不通过");
|
throw Error("数据校验不通过");
|
||||||
});
|
});
|
||||||
|
if (formData.value.info.examType == 1) {
|
||||||
|
if (formData.value.info.examinationName.trim() == "") {
|
||||||
|
message.warning("请输入考试名称");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (dayjs().isAfter(dayjs(formData.value.info.examinationEndTime))) {
|
||||||
|
message.warning("考试结束时间不能小于当前时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
// 专业力ID
|
// 专业力ID
|
||||||
formData.value.growthId = props.growId;
|
formData.value.growthId = props.growId;
|
||||||
// 任务类型
|
// 任务类型
|
||||||
@@ -570,17 +590,19 @@ async function confirm() {
|
|||||||
closeDrawer();
|
closeDrawer();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDrawer(row) {
|
function openDrawer(row) {
|
||||||
console.log(row, "irow");
|
console.log(row, "irow");
|
||||||
row && resetFields(row.info);
|
|
||||||
row &&
|
row &&
|
||||||
(dateTime.value = [
|
(dateTime.value = [
|
||||||
row.info.examinationStartTime,
|
row.info.examinationStartTime,
|
||||||
row.info.examinationEndTime,
|
row.info.examinationEndTime,
|
||||||
]);
|
]);
|
||||||
row && (formData.value = row);
|
row && (formData.value = row);
|
||||||
|
row &&
|
||||||
|
(validate = Form.useForm(
|
||||||
|
formData.value.info,
|
||||||
|
row.info.examType == 2 ? outerRule : innerRule
|
||||||
|
).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
div
|
||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:visible="FSvisible"
|
:visible="FSvisible"
|
||||||
@@ -124,31 +125,6 @@
|
|||||||
style="margin-top: 20px; flex-wrap: wrap"
|
style="margin-top: 20px; flex-wrap: wrap"
|
||||||
v-if="checkPer(permissions, createId) && data?.length"
|
v-if="checkPer(permissions, createId) && data?.length"
|
||||||
>
|
>
|
||||||
<div
|
|
||||||
class="btn btn1"
|
|
||||||
style="margin-right: 20px"
|
|
||||||
@click="qrcodeVisibleSign()"
|
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
|
||||||
>
|
|
||||||
<div class="wz">签到二维码</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="btn btn1"
|
|
||||||
style="margin-right: 20px"
|
|
||||||
v-if="data[coursePlanIndex]?.assessmentId"
|
|
||||||
@click="qrcodeAssement()"
|
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
|
||||||
>
|
|
||||||
<div class="wz">评估二维码</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="btn btn1"
|
|
||||||
style="margin-right: 20px"
|
|
||||||
@click="qrcodeVisible()"
|
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
|
||||||
>
|
|
||||||
<div class="wz">开课二维码</div>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
class="btn btn1"
|
class="btn btn1"
|
||||||
@@ -166,34 +142,66 @@
|
|||||||
<div class="img1"></div>
|
<div class="img1"></div>
|
||||||
<div class="wz">导入学员</div>
|
<div class="wz">导入学员</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn1" @click="batchSign" style="margin-right: 20px">
|
<template v-if="data[coursePlanIndex].type == 4">
|
||||||
<div class="wz">批量签到</div>
|
<div
|
||||||
</div>
|
class="btn btn1"
|
||||||
<div
|
style="margin-right: 20px"
|
||||||
class="btn btn1"
|
@click="qrcodeVisibleSign()"
|
||||||
@click="batchSignAll"
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
style="margin-right: 20px"
|
>
|
||||||
>
|
<div class="wz">签到二维码</div>
|
||||||
<div class="wz">全部签到</div>
|
</div>
|
||||||
</div>
|
<div
|
||||||
<div
|
class="btn btn1"
|
||||||
class="btn btn1"
|
style="margin-right: 20px"
|
||||||
@click="exportTaskStu"
|
v-if="data[coursePlanIndex]?.assessmentId"
|
||||||
style="margin-right: 20px"
|
@click="qrcodeAssement()"
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
>
|
>
|
||||||
<div class="img2"></div>
|
<div class="wz">评估二维码</div>
|
||||||
<div class="wz">导出签到数据</div>
|
</div>
|
||||||
</div>
|
<div
|
||||||
<div
|
class="btn btn1"
|
||||||
class="btn btn1"
|
style="margin-right: 20px"
|
||||||
@click="exportAssessment"
|
@click="qrcodeVisible()"
|
||||||
v-if="data[coursePlanIndex]?.assessmentId"
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
>
|
||||||
>
|
<div class="wz">开课二维码</div>
|
||||||
<div class="img2"></div>
|
</div>
|
||||||
<div class="wz">导出评估数据</div>
|
|
||||||
</div>
|
<div
|
||||||
|
class="btn btn1"
|
||||||
|
@click="batchSign"
|
||||||
|
style="margin-right: 20px"
|
||||||
|
>
|
||||||
|
<div class="wz">批量签到</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="btn btn1"
|
||||||
|
@click="batchSignAll"
|
||||||
|
style="margin-right: 20px"
|
||||||
|
>
|
||||||
|
<div class="wz">全部签到</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="btn btn1"
|
||||||
|
@click="exportTaskStu"
|
||||||
|
style="margin-right: 20px"
|
||||||
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
|
>
|
||||||
|
<div class="img2"></div>
|
||||||
|
<div class="wz">导出签到数据</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="btn btn1"
|
||||||
|
@click="exportAssessment"
|
||||||
|
v-if="data[coursePlanIndex]?.assessmentId"
|
||||||
|
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||||
|
>
|
||||||
|
<div class="img2"></div>
|
||||||
|
<div class="wz">导出评估数据</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="tableBox" style="margin-top: 30px">
|
<div class="tableBox" style="margin-top: 30px">
|
||||||
<BaseTable
|
<BaseTable
|
||||||
@@ -325,7 +333,7 @@ const addUserConfirm = (stuSelectRows, projectSelectRows) => {
|
|||||||
}
|
}
|
||||||
saveStu({
|
saveStu({
|
||||||
targetId: data.value[coursePlanIndex.value]?.id,
|
targetId: data.value[coursePlanIndex.value]?.id,
|
||||||
type: 4,
|
type: data.value[coursePlanIndex.value].type,
|
||||||
studentList: stuSelectRows,
|
studentList: stuSelectRows,
|
||||||
projectList: projectSelectRows,
|
projectList: projectSelectRows,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
@@ -456,19 +464,23 @@ const columns = ref([
|
|||||||
key: "opacation",
|
key: "opacation",
|
||||||
width: 130,
|
width: 130,
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: (text) => (
|
customRender: (text) =>
|
||||||
<div class="opa">
|
data.value[coursePlanIndex.value].type == 4 && (
|
||||||
<a-radio checked={text.record.signStatus} onClick={() => stuSign(text)}>
|
<div class="opa">
|
||||||
签到
|
<a-radio
|
||||||
</a-radio>
|
checked={text.record.signStatus}
|
||||||
<a-radio
|
onClick={() => stuSign(text)}
|
||||||
checked={text.record.leaveStatus}
|
>
|
||||||
onClick={() => stuSign(text)}
|
签到
|
||||||
>
|
</a-radio>
|
||||||
请假
|
<a-radio
|
||||||
</a-radio>
|
checked={text.record.leaveStatus}
|
||||||
</div>
|
onClick={() => stuSign(text)}
|
||||||
),
|
>
|
||||||
|
请假
|
||||||
|
</a-radio>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -478,17 +490,18 @@ const columns = ref([
|
|||||||
key: "opacation",
|
key: "opacation",
|
||||||
width: 130,
|
width: 130,
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: (text) => (
|
customRender: (text) =>
|
||||||
<div class="opa">
|
data.value[coursePlanIndex.value].type == 4 && (
|
||||||
<a
|
<div class="opa">
|
||||||
className="opa"
|
<a
|
||||||
style={{ color: "#666" }}
|
className="opa"
|
||||||
onClick={() => removeStu(text.record.id)}
|
style={{ color: "#666" }}
|
||||||
>
|
onClick={() => removeStu(text.record.id)}
|
||||||
删除
|
>
|
||||||
</a>
|
删除
|
||||||
</div>
|
</a>
|
||||||
),
|
</div>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ const rulesRef = ref({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
|
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
formData.reset();
|
formData.reset();
|
||||||
@@ -173,6 +173,11 @@ async function confirm() {
|
|||||||
message.warning(errorFields[0].errors.join());
|
message.warning(errorFields[0].errors.join());
|
||||||
throw Error("数据校验不通过");
|
throw Error("数据校验不通过");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (dayjs().isAfter(dayjs(formData.value.info.submitEndTime))) {
|
||||||
|
message.warning("结束时间不能小于当前时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 专业力ID
|
// 专业力ID
|
||||||
formData.value.growthId = props.growId;
|
formData.value.growthId = props.growId;
|
||||||
// 任务类型
|
// 任务类型
|
||||||
@@ -186,6 +191,7 @@ async function confirm() {
|
|||||||
formData.value.info.submitStartTime,
|
formData.value.info.submitStartTime,
|
||||||
"minutes"
|
"minutes"
|
||||||
);
|
);
|
||||||
|
|
||||||
saveTask(formData.value).then((res) => {
|
saveTask(formData.value).then((res) => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
if (formData.value.id) {
|
if (formData.value.id) {
|
||||||
@@ -207,6 +213,7 @@ function openDrawer(row) {
|
|||||||
dayjs(row.info.submitStartTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.submitStartTime, "YYYY-MM-DD HH:mm"),
|
||||||
dayjs(row.info.submitEndTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.submitEndTime, "YYYY-MM-DD HH:mm"),
|
||||||
]);
|
]);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ const formData = useResetRef({
|
|||||||
liveExplain: "",
|
liveExplain: "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['refresh']);
|
const emit = defineEmits(["refresh"]);
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
|
|
||||||
const rulesRef = ref({
|
const rulesRef = ref({
|
||||||
@@ -436,8 +436,8 @@ const rulesRef = ref({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
const { resetFields, validate } = Form.useForm(formData.info, rulesRef);
|
const { resetFields } = Form.useForm(formData.value.info, rulesRef);
|
||||||
const durationText = computed(() =>
|
const durationText = computed(() =>
|
||||||
dateTime.value?.length
|
dateTime.value?.length
|
||||||
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
||||||
@@ -481,8 +481,13 @@ async function confirm() {
|
|||||||
// 任务名称
|
// 任务名称
|
||||||
formData.value.taskName = formData.value.info.liveName;
|
formData.value.taskName = formData.value.info.liveName;
|
||||||
// 任务时长
|
// 任务时长
|
||||||
formData.value.duration = durationText.value;
|
if (!formData.value.info.liveDuration) {
|
||||||
formData.value.info.liveDuration = durationText.value;
|
formData.value.info.liveDuration = durationText.value;
|
||||||
|
formData.value.duration = durationText.value;
|
||||||
|
} else {
|
||||||
|
formData.value.duration = formData.value.info.liveDuration;
|
||||||
|
}
|
||||||
|
|
||||||
saveTask(formData.value).then((res) => {
|
saveTask(formData.value).then((res) => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
if (formData.value.id) {
|
if (formData.value.id) {
|
||||||
@@ -494,7 +499,7 @@ async function confirm() {
|
|||||||
} else {
|
} else {
|
||||||
message.error(res.msg);
|
message.error(res.msg);
|
||||||
}
|
}
|
||||||
closeDrawer()
|
closeDrawer();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -502,6 +507,7 @@ function openDrawer(row) {
|
|||||||
row && (formData.value = row);
|
row && (formData.value = row);
|
||||||
row && (dateTime.value = [row.info.liveStartTime, row.info.liveEndTime]);
|
row && (dateTime.value = [row.info.liveStartTime, row.info.liveEndTime]);
|
||||||
row && (imageUrl.value = row.info.liveCover);
|
row && (imageUrl.value = row.info.liveCover);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,15 @@
|
|||||||
<div class="img2"></div>
|
<div class="img2"></div>
|
||||||
<div class="wz">导出数据</div>
|
<div class="wz">导出数据</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<template v-if="datasource.taskType == 4">
|
||||||
|
<div class="btn btn2" @click="exportHomeWorkShow">
|
||||||
|
<div class="wz">导出作业</div>
|
||||||
|
</div>
|
||||||
|
<div class="btn btn2">
|
||||||
|
<div class="wz" @click="showEntryScore">导入成绩</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||||
<a-table
|
<a-table
|
||||||
@@ -537,12 +546,43 @@ export default {
|
|||||||
});
|
});
|
||||||
return `${url}?${searchParams.toString()}`;
|
return `${url}?${searchParams.toString()}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//显示导出作业弹窗
|
||||||
|
const exportHomeWorkShow = () => {
|
||||||
|
// state.exportHomeWorkV = true;
|
||||||
|
// exportHomeWork();
|
||||||
|
let obj = {
|
||||||
|
currentStageId: props.datasource.chapterId,
|
||||||
|
pid: props.datasource.routerId,
|
||||||
|
taskId: props.datasource.id,
|
||||||
|
taskType: props.datasource.type,
|
||||||
|
type: 2,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.exportHomeWork(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("导出作业", res.data.data);
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
// debugger
|
||||||
|
// message.destroy();
|
||||||
|
// message.success("导出作业成功");
|
||||||
|
state.exportHomeWorkV = true;
|
||||||
|
state.downloadUrl = res.data.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
message.destroy();
|
||||||
|
message.error("导出作业失败");
|
||||||
|
console.log("导出作业失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
selectCompletionStatus,
|
selectCompletionStatus,
|
||||||
checkGrowthPer,
|
checkGrowthPer,
|
||||||
showassess,
|
showassess,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
|
exportHomeWorkShow,
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
tableDataFunc,
|
tableDataFunc,
|
||||||
godie,
|
godie,
|
||||||
|
|||||||
@@ -640,18 +640,19 @@ const columns = ref([
|
|||||||
align: "center",
|
align: "center",
|
||||||
customRender: ({ record }) => {
|
customRender: ({ record }) => {
|
||||||
return (
|
return (
|
||||||
<div class="opa">
|
record.type == 4 && (
|
||||||
<a style="margin-right:10px;" onClick={() => planEdit(record)}>
|
<div class="opa">
|
||||||
编辑
|
<a style="margin-right:10px;" onClick={() => planEdit(record)}>
|
||||||
</a>
|
编辑
|
||||||
<a onClick={() => del(record.id, record)}>删除</a>
|
</a>
|
||||||
</div>
|
<a onClick={() => del(record.id, record)}>删除</a>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const params = ref({
|
const params = ref({
|
||||||
type: props.type,
|
|
||||||
offcourseId: "",
|
offcourseId: "",
|
||||||
taskId: "",
|
taskId: "",
|
||||||
createBeginTime: "",
|
createBeginTime: "",
|
||||||
@@ -866,7 +867,6 @@ function search() {
|
|||||||
const resetTime = ref();
|
const resetTime = ref();
|
||||||
function reset() {
|
function reset() {
|
||||||
tableRef.value.reset({
|
tableRef.value.reset({
|
||||||
type: props.type,
|
|
||||||
offcourseId: params.value.offcourseId,
|
offcourseId: params.value.offcourseId,
|
||||||
});
|
});
|
||||||
resetTime.value.resetTime();
|
resetTime.value.resetTime();
|
||||||
@@ -893,7 +893,6 @@ const closeDrawer = () => {
|
|||||||
} else {
|
} else {
|
||||||
openCourseVisible.value = false;
|
openCourseVisible.value = false;
|
||||||
tableRef.value.reset({
|
tableRef.value.reset({
|
||||||
type: props.type,
|
|
||||||
offcourseId: params.value.offcourseId,
|
offcourseId: params.value.offcourseId,
|
||||||
});
|
});
|
||||||
emit("refresh");
|
emit("refresh");
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ const formData = useResetRef({
|
|||||||
linkDescription: "",
|
linkDescription: "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['refresh']);
|
const emit = defineEmits(["refresh"]);
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
const rulesRef = ref({
|
const rulesRef = ref({
|
||||||
linkName: [
|
linkName: [
|
||||||
@@ -121,7 +121,7 @@ const rulesRef = ref({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
@@ -160,6 +160,7 @@ async function confirm() {
|
|||||||
|
|
||||||
function openDrawer(row) {
|
function openDrawer(row) {
|
||||||
row && (formData.value = row);
|
row && (formData.value = row);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const rulesRef = ref({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
if (step.value > 1) {
|
if (step.value > 1) {
|
||||||
@@ -192,7 +192,7 @@ const closeDrawer = () => {
|
|||||||
dateTime.value = [];
|
dateTime.value = [];
|
||||||
formData.reset();
|
formData.reset();
|
||||||
formData.value.info = {
|
formData.value.info = {
|
||||||
voteStemDtoList:[]
|
voteStemDtoList: [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -211,7 +211,10 @@ async function confirm() {
|
|||||||
message.warning(errorFields[0].errors.join());
|
message.warning(errorFields[0].errors.join());
|
||||||
throw Error("数据校验不通过");
|
throw Error("数据校验不通过");
|
||||||
});
|
});
|
||||||
|
if (dayjs().isAfter(dayjs(formData.value.info.voteEndTime))) {
|
||||||
|
message.warning("考试结束时间不能小于当前时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 专业力ID
|
// 专业力ID
|
||||||
formData.value.growthId = props.growId;
|
formData.value.growthId = props.growId;
|
||||||
// 任务类型
|
// 任务类型
|
||||||
@@ -242,6 +245,7 @@ function openDrawer(row) {
|
|||||||
dayjs(row.info.voteStartTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.voteStartTime, "YYYY-MM-DD HH:mm"),
|
||||||
dayjs(row.info.voteEndTime, "YYYY-MM-DD HH:mm"),
|
dayjs(row.info.voteEndTime, "YYYY-MM-DD HH:mm"),
|
||||||
]);
|
]);
|
||||||
|
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -630,6 +630,8 @@ function getStuList() {
|
|||||||
tableData.value.total = res.data.data.total;
|
tableData.value.total = res.data.data.total;
|
||||||
tableData.value.list = res.data.data.records;
|
tableData.value.list = res.data.data.records;
|
||||||
tableData.value.loading = false;
|
tableData.value.loading = false;
|
||||||
|
getorganizationOption();
|
||||||
|
getBandListData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
tableData.value.loading = false;
|
tableData.value.loading = false;
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ module.exports = defineConfig({
|
|||||||
overlay: false,// 解决代码抛出异常
|
overlay: false,// 解决代码抛出异常
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
"/professional": {
|
// "/professional": {
|
||||||
target: 'http://192.168.31.211:32002',
|
// target: 'http://192.168.31.211:32002',
|
||||||
// target: 'http://192.168.50.195:32002',
|
// // target: 'http://192.168.50.195:32002',
|
||||||
// target: 'http://192.168.86.195:32002',
|
// // target: 'http://192.168.86.195:32002',
|
||||||
changeOrigin: true,
|
|
||||||
},
|
|
||||||
// "/growth": {
|
|
||||||
// target: 'https:' + process.env.VUE_APP_BOE_API_URL,
|
|
||||||
// changeOrigin: true,
|
// changeOrigin: true,
|
||||||
// },
|
// },
|
||||||
|
"/growth": {
|
||||||
|
target: 'https:' + process.env.VUE_APP_BOE_API_URL,
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
"/manageApi": {
|
"/manageApi": {
|
||||||
target: 'https:' + process.env.VUE_APP_PROXY_URL,
|
target: 'https:' + process.env.VUE_APP_PROXY_URL,
|
||||||
changeOrigin: true, //表示是否改变原域名
|
changeOrigin: true, //表示是否改变原域名
|
||||||
|
|||||||
Reference in New Issue
Block a user