mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
Merge branch '250213-prod-master_1202-gx-copy' into test20250220
This commit is contained in:
@@ -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" },
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
title="添加活动"
|
||||
placement="right"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="drawerMain" v-if="visible">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ formData.id ? "编辑" : "添加" }}活动</div>
|
||||
<img
|
||||
@@ -201,7 +201,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<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 dayjs from "dayjs";
|
||||
import { useResetRef } from "@/utils/useCommon";
|
||||
@@ -214,7 +214,7 @@ const props = defineProps({
|
||||
growId: String,
|
||||
});
|
||||
const visible = ref(false);
|
||||
const formData = useResetRef({
|
||||
const formData = ref({
|
||||
info: {
|
||||
activityName: "",
|
||||
activityNotice: "",
|
||||
@@ -267,8 +267,7 @@ const rulesRef = ref({
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const { validate } = Form.useForm(formData.info, rulesRef);
|
||||
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||
const durationText = computed(() =>
|
||||
dateTime.value?.length
|
||||
? dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]), "minute")
|
||||
@@ -278,8 +277,18 @@ const durationText = computed(() =>
|
||||
const closeDrawer = () => {
|
||||
visible.value = false;
|
||||
dateTime.value = [];
|
||||
formData.reset();
|
||||
formData.value.info = {};
|
||||
// formData.reset();
|
||||
formData.value.info = {
|
||||
activityName: "",
|
||||
activityNotice: "",
|
||||
activityStartTime: "",
|
||||
activityEndTime: "",
|
||||
activityDuration: "",
|
||||
activityAddress: "",
|
||||
activityExplain: "",
|
||||
beforeSignIn: "",
|
||||
afterSignIn: "",
|
||||
};
|
||||
};
|
||||
|
||||
function timeChange(time, timeStr) {
|
||||
@@ -298,6 +307,10 @@ async function confirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
if (dayjs().isAfter(dayjs(formData.value.info.activityEndTime))) {
|
||||
message.warning("活动结束时间不能小于当前时间");
|
||||
return;
|
||||
}
|
||||
// 专业力ID
|
||||
formData.value.growthId = props.growId;
|
||||
// 任务类型
|
||||
@@ -307,8 +320,12 @@ async function confirm() {
|
||||
// 任务名称
|
||||
formData.value.taskName = formData.value.info.activityName;
|
||||
// 任务时长
|
||||
formData.value.duration = durationText.value;
|
||||
formData.value.info.activityDuration = durationText.value;
|
||||
if (!formData.value.info.activityDuration) {
|
||||
formData.value.info.activityDuration = durationText.value;
|
||||
formData.value.duration = durationText.value;
|
||||
} else {
|
||||
formData.value.duration = formData.value.info.activityDuration;
|
||||
}
|
||||
saveTask(formData.value).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (formData.value.id) {
|
||||
@@ -326,12 +343,13 @@ async function confirm() {
|
||||
}
|
||||
|
||||
function openDrawer(row) {
|
||||
row && (formData.value = row);
|
||||
row && (formData.value = reactive(row));
|
||||
row &&
|
||||
(dateTime.value = [
|
||||
dayjs(row.info.activityStartTime, "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;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,9 +90,10 @@
|
||||
v-model:value="nameSearch.departName"
|
||||
placeholder="请输入部门名称"
|
||||
@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
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
|
||||
@@ -101,7 +101,7 @@ const formData = useResetRef({
|
||||
discussSettings: true,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['refresh']);
|
||||
const emit = defineEmits(["refresh"]);
|
||||
const dateTime = ref([]);
|
||||
const rulesRef = ref({
|
||||
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 = () => {
|
||||
visible.value = false;
|
||||
dateTime.value = [];
|
||||
@@ -138,8 +137,8 @@ async function confirm() {
|
||||
formData.value.taskType = props.type;
|
||||
// 必修/选修
|
||||
formData.value.type = props.activeKey;
|
||||
// 任务名称
|
||||
formData.value.taskName = formData.value.info.discussName;
|
||||
// 任务名称
|
||||
formData.value.taskName = formData.value.info.discussName;
|
||||
saveTask(formData.value).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (formData.value.id) {
|
||||
@@ -162,6 +161,7 @@ function openDrawer(row) {
|
||||
row.info.discussSettings === "false" || row.info.discussSettings === false
|
||||
? false
|
||||
: true);
|
||||
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||
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 = () => {
|
||||
if (step.value > 1) {
|
||||
@@ -267,6 +267,7 @@ function openDrawer(row) {
|
||||
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);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">选择试卷:</span>
|
||||
</div>
|
||||
|
||||
<div v-if="formData.info.examinationPaperId">
|
||||
<a-tag
|
||||
closable
|
||||
@@ -95,11 +96,13 @@
|
||||
}}</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
<div class="btnbox" @click="selectTest">
|
||||
<button class="xkbtn" style="margin: 0">
|
||||
{{ formData.info.examinationPaperId ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
</div>
|
||||
<template v-if="!formData.id">
|
||||
<div class="btnbox" @click="selectTest">
|
||||
<button class="xkbtn" style="margin: 0">
|
||||
{{ formData.info.examinationPaperId ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <GrowthSelectTest
|
||||
v-if="taskIndex < 0 || (taskIndex >= 0 && isEdit == false)"
|
||||
@@ -149,6 +152,7 @@
|
||||
<div class="select">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:disabled="formData.id"
|
||||
:max="999999"
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
@@ -170,6 +174,7 @@
|
||||
<div class="btnbox">
|
||||
<a-input-number
|
||||
min="0"
|
||||
:disabled="formData.id"
|
||||
v-model:value="formData.info.passLine"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
/>
|
||||
@@ -183,6 +188,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
:disabled="formData.id"
|
||||
v-model:value="formData.info.examinationExplain"
|
||||
placeholder="请输入考试说明"
|
||||
show-count
|
||||
@@ -203,6 +209,7 @@
|
||||
<span>允许重复考试:</span>
|
||||
<a-input-number
|
||||
:min="-1"
|
||||
:disabled="formData.id"
|
||||
:max="999999"
|
||||
:precision="0"
|
||||
style="
|
||||
@@ -229,6 +236,7 @@
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="formData.info.showAnswers"
|
||||
:disabled="formData.id"
|
||||
>
|
||||
<a-radio :value="'1'">允许查看</a-radio>
|
||||
<a-radio :value="'2'">不允许查看</a-radio>
|
||||
@@ -242,6 +250,7 @@
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
:disabled="formData.id"
|
||||
v-model:value="formData.info.showAnalysis"
|
||||
>
|
||||
<a-radio :value="'1'">允许查看</a-radio>
|
||||
@@ -256,6 +265,7 @@
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
:disabled="formData.id"
|
||||
v-model:value="formData.info.scoringModel"
|
||||
>
|
||||
<a-radio :value="'1'">最高一次</a-radio>
|
||||
@@ -271,6 +281,7 @@
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
:disabled="formData.id"
|
||||
v-model:value="formData.info.questionArrangement"
|
||||
>
|
||||
<a-radio :value="'1'">试题乱序</a-radio>
|
||||
@@ -424,7 +435,7 @@ const initValue = {
|
||||
examinationPaperId: "",
|
||||
examinationStartTime: "",
|
||||
examinationEndTime: "",
|
||||
examinationDuration: null,
|
||||
examinationDuration: 0,
|
||||
passLine: "",
|
||||
examType: 1,
|
||||
source: "",
|
||||
@@ -491,18 +502,19 @@ const outerRule = {
|
||||
},
|
||||
],
|
||||
};
|
||||
const rulesRef = ref(innerRule);
|
||||
const rulesRef = ref([innerRule]);
|
||||
const emit = defineEmits({});
|
||||
const dateTime = ref([]);
|
||||
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData.value.info, rulesRef);
|
||||
watch(
|
||||
() => formData.value.info.examType,
|
||||
() => {
|
||||
formData.value.info.examType === 1
|
||||
? (rulesRef.value = innerRule)
|
||||
: (rulesRef.value = outerRule);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const closeDrawer = () => {
|
||||
// 新增完试卷需要更新数据
|
||||
@@ -512,7 +524,6 @@ const closeDrawer = () => {
|
||||
if (step.value > 1) {
|
||||
step.value = step.value - 1;
|
||||
} else {
|
||||
|
||||
formData.reset();
|
||||
formData.value.info = {
|
||||
examType: 1,
|
||||
@@ -545,7 +556,16 @@ async function confirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
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
|
||||
formData.value.growthId = props.growId;
|
||||
// 任务类型
|
||||
@@ -570,17 +590,19 @@ async function confirm() {
|
||||
closeDrawer();
|
||||
});
|
||||
}
|
||||
|
||||
function openDrawer(row) {
|
||||
console.log(row, "irow");
|
||||
row && resetFields(row.info);
|
||||
row &&
|
||||
(dateTime.value = [
|
||||
row.info.examinationStartTime,
|
||||
row.info.examinationEndTime,
|
||||
]);
|
||||
row && (formData.value = row);
|
||||
|
||||
row &&
|
||||
(validate = Form.useForm(
|
||||
formData.value.info,
|
||||
row.info.examType == 2 ? outerRule : innerRule
|
||||
).validate);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
div
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="FSvisible"
|
||||
@@ -124,31 +125,6 @@
|
||||
style="margin-top: 20px; flex-wrap: wrap"
|
||||
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
|
||||
:class="{ notClick: courseSelectRows.length > 0 }"
|
||||
class="btn btn1"
|
||||
@@ -166,34 +142,66 @@
|
||||
<div class="img1"></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 v-if="data[coursePlanIndex].type == 4">
|
||||
<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
|
||||
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 class="tableBox" style="margin-top: 30px">
|
||||
<BaseTable
|
||||
@@ -325,7 +333,7 @@ const addUserConfirm = (stuSelectRows, projectSelectRows) => {
|
||||
}
|
||||
saveStu({
|
||||
targetId: data.value[coursePlanIndex.value]?.id,
|
||||
type: 4,
|
||||
type: data.value[coursePlanIndex.value].type,
|
||||
studentList: stuSelectRows,
|
||||
projectList: projectSelectRows,
|
||||
}).then(() => {
|
||||
@@ -456,19 +464,23 @@ const columns = ref([
|
||||
key: "opacation",
|
||||
width: 130,
|
||||
align: "center",
|
||||
customRender: (text) => (
|
||||
<div class="opa">
|
||||
<a-radio checked={text.record.signStatus} onClick={() => stuSign(text)}>
|
||||
签到
|
||||
</a-radio>
|
||||
<a-radio
|
||||
checked={text.record.leaveStatus}
|
||||
onClick={() => stuSign(text)}
|
||||
>
|
||||
请假
|
||||
</a-radio>
|
||||
</div>
|
||||
),
|
||||
customRender: (text) =>
|
||||
data.value[coursePlanIndex.value].type == 4 && (
|
||||
<div class="opa">
|
||||
<a-radio
|
||||
checked={text.record.signStatus}
|
||||
onClick={() => stuSign(text)}
|
||||
>
|
||||
签到
|
||||
</a-radio>
|
||||
<a-radio
|
||||
checked={text.record.leaveStatus}
|
||||
onClick={() => stuSign(text)}
|
||||
>
|
||||
请假
|
||||
</a-radio>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
@@ -478,17 +490,18 @@ const columns = ref([
|
||||
key: "opacation",
|
||||
width: 130,
|
||||
align: "center",
|
||||
customRender: (text) => (
|
||||
<div class="opa">
|
||||
<a
|
||||
className="opa"
|
||||
style={{ color: "#666" }}
|
||||
onClick={() => removeStu(text.record.id)}
|
||||
>
|
||||
删除
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
customRender: (text) =>
|
||||
data.value[coursePlanIndex.value].type == 4 && (
|
||||
<div class="opa">
|
||||
<a
|
||||
className="opa"
|
||||
style={{ color: "#666" }}
|
||||
onClick={() => removeStu(text.record.id)}
|
||||
>
|
||||
删除
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]);
|
||||
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 = () => {
|
||||
visible.value = false;
|
||||
formData.reset();
|
||||
@@ -173,6 +173,11 @@ async function confirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
|
||||
if (dayjs().isAfter(dayjs(formData.value.info.submitEndTime))) {
|
||||
message.warning("结束时间不能小于当前时间");
|
||||
return;
|
||||
}
|
||||
// 专业力ID
|
||||
formData.value.growthId = props.growId;
|
||||
// 任务类型
|
||||
@@ -186,6 +191,7 @@ async function confirm() {
|
||||
formData.value.info.submitStartTime,
|
||||
"minutes"
|
||||
);
|
||||
|
||||
saveTask(formData.value).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (formData.value.id) {
|
||||
@@ -207,6 +213,7 @@ function openDrawer(row) {
|
||||
dayjs(row.info.submitStartTime, "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;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ const formData = useResetRef({
|
||||
liveExplain: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['refresh']);
|
||||
const emit = defineEmits(["refresh"]);
|
||||
const dateTime = ref([]);
|
||||
|
||||
const rulesRef = ref({
|
||||
@@ -436,8 +436,8 @@ const rulesRef = ref({
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData.info, rulesRef);
|
||||
let validate = Form.useForm(formData.value.info, rulesRef).validate;
|
||||
const { resetFields } = Form.useForm(formData.value.info, rulesRef);
|
||||
const durationText = computed(() =>
|
||||
dateTime.value?.length
|
||||
? 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.duration = durationText.value;
|
||||
formData.value.info.liveDuration = durationText.value;
|
||||
if (!formData.value.info.liveDuration) {
|
||||
formData.value.info.liveDuration = durationText.value;
|
||||
formData.value.duration = durationText.value;
|
||||
} else {
|
||||
formData.value.duration = formData.value.info.liveDuration;
|
||||
}
|
||||
|
||||
saveTask(formData.value).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (formData.value.id) {
|
||||
@@ -494,7 +499,7 @@ async function confirm() {
|
||||
} else {
|
||||
message.error(res.msg);
|
||||
}
|
||||
closeDrawer()
|
||||
closeDrawer();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -502,6 +507,7 @@ function openDrawer(row) {
|
||||
row && (formData.value = row);
|
||||
row && (dateTime.value = [row.info.liveStartTime, row.info.liveEndTime]);
|
||||
row && (imageUrl.value = row.info.liveCover);
|
||||
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,15 @@
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</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 class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
@@ -537,12 +546,43 @@ export default {
|
||||
});
|
||||
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 {
|
||||
...toRefs(state),
|
||||
selectCompletionStatus,
|
||||
checkGrowthPer,
|
||||
showassess,
|
||||
closeDrawer,
|
||||
exportHomeWorkShow,
|
||||
afterVisibleChange,
|
||||
tableDataFunc,
|
||||
godie,
|
||||
|
||||
@@ -640,18 +640,19 @@ const columns = ref([
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
return (
|
||||
<div class="opa">
|
||||
<a style="margin-right:10px;" onClick={() => planEdit(record)}>
|
||||
编辑
|
||||
</a>
|
||||
<a onClick={() => del(record.id, record)}>删除</a>
|
||||
</div>
|
||||
record.type == 4 && (
|
||||
<div class="opa">
|
||||
<a style="margin-right:10px;" onClick={() => planEdit(record)}>
|
||||
编辑
|
||||
</a>
|
||||
<a onClick={() => del(record.id, record)}>删除</a>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
},
|
||||
},
|
||||
]);
|
||||
const params = ref({
|
||||
type: props.type,
|
||||
offcourseId: "",
|
||||
taskId: "",
|
||||
createBeginTime: "",
|
||||
@@ -866,7 +867,6 @@ function search() {
|
||||
const resetTime = ref();
|
||||
function reset() {
|
||||
tableRef.value.reset({
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
});
|
||||
resetTime.value.resetTime();
|
||||
@@ -893,7 +893,6 @@ const closeDrawer = () => {
|
||||
} else {
|
||||
openCourseVisible.value = false;
|
||||
tableRef.value.reset({
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
});
|
||||
emit("refresh");
|
||||
|
||||
@@ -103,7 +103,7 @@ const formData = useResetRef({
|
||||
linkDescription: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['refresh']);
|
||||
const emit = defineEmits(["refresh"]);
|
||||
const dateTime = ref([]);
|
||||
const rulesRef = ref({
|
||||
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 = () => {
|
||||
visible.value = false;
|
||||
@@ -160,6 +160,7 @@ async function confirm() {
|
||||
|
||||
function openDrawer(row) {
|
||||
row && (formData.value = row);
|
||||
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
|
||||
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 = () => {
|
||||
if (step.value > 1) {
|
||||
@@ -192,7 +192,7 @@ const closeDrawer = () => {
|
||||
dateTime.value = [];
|
||||
formData.reset();
|
||||
formData.value.info = {
|
||||
voteStemDtoList:[]
|
||||
voteStemDtoList: [],
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -211,7 +211,10 @@ async function confirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
|
||||
if (dayjs().isAfter(dayjs(formData.value.info.voteEndTime))) {
|
||||
message.warning("考试结束时间不能小于当前时间");
|
||||
return;
|
||||
}
|
||||
// 专业力ID
|
||||
formData.value.growthId = props.growId;
|
||||
// 任务类型
|
||||
@@ -242,6 +245,7 @@ function openDrawer(row) {
|
||||
dayjs(row.info.voteStartTime, "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;
|
||||
}
|
||||
|
||||
|
||||
@@ -630,6 +630,8 @@ function getStuList() {
|
||||
tableData.value.total = res.data.data.total;
|
||||
tableData.value.list = res.data.data.records;
|
||||
tableData.value.loading = false;
|
||||
getorganizationOption();
|
||||
getBandListData();
|
||||
})
|
||||
.catch((err) => {
|
||||
tableData.value.loading = false;
|
||||
|
||||
@@ -18,16 +18,16 @@ module.exports = defineConfig({
|
||||
overlay: false,// 解决代码抛出异常
|
||||
},
|
||||
proxy: {
|
||||
"/professional": {
|
||||
target: 'http://192.168.31.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.31.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, //表示是否改变原域名
|
||||
|
||||
Reference in New Issue
Block a user