修改bug

This commit is contained in:
yangjun 2024-08-29 09:10:49 +08:00
parent a3d33eed34
commit 08b87d995d
14 changed files with 706 additions and 372 deletions

2
.env
View File

@ -2,7 +2,7 @@
VITE_PORT = 3100 VITE_PORT = 3100
# 网站标题 //课程信息中心 # 网站标题 //课程信息中心
VITE_GLOB_APP_TITLE = 智慧教学服务中心 VITE_GLOB_APP_TITLE = 东师智慧教学服务中心
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符 # 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
VITE_GLOB_APP_SHORT_NAME = CourseInformationCenter VITE_GLOB_APP_SHORT_NAME = CourseInformationCenter

View File

@ -9,7 +9,7 @@
<a-col :span="24" style="text-align: center; color: #494b56"> <a-col :span="24" style="text-align: center; color: #494b56">
<div>老师您好</div> <div>老师您好</div>
<div>请根据课程教学大纲的要求设置学生修完本课程需要完成的课程测验次数</div> <div>请根据课程教学大纲的要求设置学生修完本课程需要完成的课程测验次数</div>
<div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleShowType(1)">设置测验次数</a></div> <div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置测验次数</a></div>
<div class="tishi">温馨提示设置完成后您也可以在课程教学过程中随时根据实际情况进行调整</div> <div class="tishi">温馨提示设置完成后您也可以在课程教学过程中随时根据实际情况进行调整</div>
</a-col> </a-col>
</a-row> </a-row>
@ -20,6 +20,19 @@
<a-col :span="24"><span class="title">课程测验次数设置</span><a-divider /></a-col> <a-col :span="24"><span class="title">课程测验次数设置</span><a-divider /></a-col>
<a-col :span="24" style="padding: 0 0 0 30px"> <a-col :span="24" style="padding: 0 0 0 30px">
<a-row> <a-row>
<a-col :span="24" style="margin-top: 10px; height: 50px">
<a-row style="text-align: center">
<a-col :span="8"
><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col
>
<a-col :span="8"
><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col
>
<a-col :span="8"
><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col
>
</a-row>
</a-col>
<a-col :span="18" style="margin-top: 5px"> <a-col :span="18" style="margin-top: 5px">
<span style="color: #777777">学生修完本课程需要完成的测验次数</span> <span style="color: #777777">学生修完本课程需要完成的测验次数</span>
<a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled" /><span <a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled" /><span
@ -37,7 +50,7 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'score'"> <template v-if="column.key === 'score'">
<span> <span>
<a-input-number v-model:value="record.score" :min="0" :max="100"> <template #addonAfter> % </template></a-input-number> <a-input-number v-model:value="record.score" :min="0" :max="100" @blur="handleJscjbfb"> <template #addonAfter> % </template></a-input-number>
</span> </span>
</template> </template>
<template v-else-if="column.key === 'lstitle'"> <template v-else-if="column.key === 'lstitle'">
@ -552,7 +565,7 @@
<a-row> <a-row>
<a-col :span="24"><span class="title">布置测验</span><a-divider /></a-col> <a-col :span="24"><span class="title">布置测验</span><a-divider /></a-col>
<a-col :span="24" style="text-align: right; margin-top: 5px"> <a-col :span="24" style="text-align: right; margin-top: 5px">
<a-button type="primary" @click="handleShowType(1)"><Icon icon="ant-design:edit-outlined" />修改课程测验次数</a-button> <a-button type="primary" @click="handleSzzycs(1)"><Icon icon="ant-design:edit-outlined" />修改课程测验次数</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="handleAddOne" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增测验</a-button> <a-button type="primary" @click="handleAddOne" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增测验</a-button>
</a-col> </a-col>
@ -891,6 +904,10 @@ const qrCodeUrl = ref<string>('');
const ewmvisible = ref<boolean>(false); const ewmvisible = ref<boolean>(false);
const ewmInfo = ref<any>({}); const ewmInfo = ref<any>({});
const kczyzb = ref<number>(0);
const qmkszb = ref<number>(0);
const ktcyzb = ref<number>(0);
// //
const disabledDate = (current: Dayjs) => { const disabledDate = (current: Dayjs) => {
return current && current < dayjs().subtract(1, 'days').endOf('day'); return current && current < dayjs().subtract(1, 'days').endOf('day');
@ -1017,6 +1034,37 @@ function handleYylx(sylx) {
} }
} }
function handleJscjbfb(){
var list = tableData.value;
var cjbfb = qmkszb.value; //
var cjbfb2 = kczyzb.value; //
var zcj = 0;
var score22 = 0;
for (var i = 0; i < list.length; i++) {
console.log('🥵', list);
var score = list[i].score;
if (score == null || score + '' == '') {
createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空!');
break;
}
score22 = parseInt(score22)+parseInt(score);
if (score < 0 || score > 100) {
createMessage.error('作业成绩百分比必须在0-100之间');
break;
}
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
}
}
// //
function handleYytkSuccess(record) { function handleYytkSuccess(record) {
for (var i = 0; i < record.length; i++) { for (var i = 0; i < record.length; i++) {
@ -1313,40 +1361,67 @@ function handleDelZycs(index) {
handleZycs(); handleZycs();
} }
function handleSzzycs(val){
defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params: { rwbh, xqxn, teano, zyLeixing: '1' } }).then((res) => {
console.log('😥', res);
var list = res;
for(var i = 0; i < list.length; i++){
if(list[i].zyLeixing == '0'){
kczyzb.value = list[i].score
}else if(list[i].zyLeixing == '1'){
qmkszb.value = list[i].score
}else if(list[i].zyLeixing == '2'){
}else if(list[i].zyLeixing == '3'){
ktcyzb.value = list[i].score
}
}
});
handleShowType(1)
}
// //
function handleBatchAdd() { function handleBatchAdd() {
var list = tableData.value; var list = tableData.value;
var sfjx = 0; // var sfjx = 0; //
var cjbfb = 0; // var cjbfb = kczyzb.value; //
var cjbfb2 = qmkszb.value; //
var zcj = 0;
var score22 = 0;
if (list.length == 0) { if (list.length == 0) {
createMessage.error('测验次数不能为空!'); createMessage.error('作业次数不能为空!');
return; return;
} }
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
console.log('🥵', list); console.log('🥵', list);
var score = list[i].score; var score = list[i].score;
console.log('👨‍❤️‍💋‍👨', !score);
console.log('🤖', score == null);
console.log('🤖', score + '' == '');
if (score == null || score + '' == '') { if (score == null || score + '' == '') {
createMessage.error('第' + (i + 1) + '次测验占期末总成绩的百分比不能为空!'); createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空!');
sfjx = 1; sfjx = 1;
break; break;
} }
cjbfb = parseInt(cjbfb) + parseInt(score);
if (score < 0 || score > 100) { if (score < 0 || score > 100) {
createMessage.error('测验成绩百分比必须在0-100之间'); createMessage.error('作业成绩百分比必须在0-100之间');
sfjx = 1; sfjx = 1;
break; break;
} }
score22 = parseInt(score22) + parseInt(score);
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
} }
if (sfjx == 1) { if (sfjx == 1) {
return; return;
} }
if (cjbfb > 100) {
createMessage.error('本次测验占期末总成绩的百分比不得超过100%,当前测验总百分比为:' + cjbfb + '%');
return;
}
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
@ -1374,7 +1449,7 @@ const columns = [
key: 'lstitle', key: 'lstitle',
}, },
{ {
title: '本次测验占期末总成绩的百分比', title: '本次测验占总成绩的百分比',
dataIndex: 'score', dataIndex: 'score',
key: 'score', key: 'score',
}, },

View File

@ -25,7 +25,7 @@
<a-col :span="24" v-if="addShow"> <a-col :span="24" v-if="addShow">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div style="width: 100%;padding:8px 0px 5px 18px;font-size:12px; color:#666; border-left:3px solid #18a689;" <div style="width: 100%; padding: 8px 0px 5px 18px; font-size: 12px; color: #666; border-left: 3px solid #18a689"
><span>请选择填写的教学大纲版本</span></div ><span>请选择填写的教学大纲版本</span></div
> >
</a-col> </a-col>
@ -42,30 +42,30 @@
</a-col> </a-col>
<a-col> <a-col>
<a-row> <a-row>
<a-col <a-col :span="23" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index" class="borderstyle">
:span="23"
v-for="(item, index) in zyJxdgMainTable.dataSource"
:key="index"
class="borderstyle"
>
<a-row> <a-row>
<a-col :span="24" style="height: 40px; line-height: 40px; background-color: #f7fbfa;border-radius:6px"> <a-col :span="24" style="height: 40px; line-height: 40px; background-color: #f7fbfa; border-radius: 6px">
<span class="title">{{ item.title }}</span> <span class="title">{{ item.title }}</span>
</a-col> </a-col>
<a-col :span="24" v-if="item.tsy">
<span class="tishi">
<span>{{ item.tsy }}</span>
</span>
</a-col>
<!-- 单行文本 1 --> <!-- 单行文本 1 -->
<a-col v-if="item.type === '1'" :span="24"> <a-col v-if="item.type === '1'" :span="24">
<a-input placeholder="请输入内容" v-model:value="item.content" style="width: 100%;" @blur="handleGlxm(item)"></a-input> <a-input placeholder="请输入内容" v-model:value="item.content" style="width: 100%" @blur="handleGlxm(item)"></a-input>
</a-col> </a-col>
<!-- 多行文本 2 --> <!-- 多行文本 2 -->
<a-col v-else-if="item.type === '2'" :span="24"> <a-col v-else-if="item.type === '2'" :span="24">
<a-textarea placeholder="请输入内容" v-model:value="item.content" style="width: 100%;"></a-textarea> <a-textarea placeholder="请输入内容" v-model:value="item.content" style="width: 100%"></a-textarea>
</a-col> </a-col>
<!-- 富文本 3 --> <!-- 富文本 3 -->
<a-col v-else-if="item.type === '3'" :span="24"> <a-col v-else-if="item.type === '3'" :span="24">
<j-editor placeholder="请输入内容" v-model:value="item.content" :disabled="disabled" /> <j-editor placeholder="请输入内容" v-model:value="item.content" :disabled="disabled" />
</a-col> </a-col>
<!-- 固定表单基础信息 4 --> <!-- 固定表单基础信息 4 -->
<a-col v-else-if="item.type === '4'" v-model:value="item.content" :span="24" > <a-col v-else-if="item.type === '4'" v-model:value="item.content" :span="24">
<a-form v-bind="formItemLayout"> <a-form v-bind="formItemLayout">
<a-row> <a-row>
<a-col v-for="(item2, index2) in item.zyJxdgPzxxList" :key="index2" :span="12"> <a-col v-for="(item2, index2) in item.zyJxdgPzxxList" :key="index2" :span="12">
@ -80,7 +80,7 @@
<a-col v-else-if="item.type === '5'" :span="24"> <a-col v-else-if="item.type === '5'" :span="24">
<a-table :columns="getTableColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false"> <a-table :columns="getTableColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%;"></a-input> <a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%"></a-input>
</template> </template>
</a-table> </a-table>
</a-col> </a-col>
@ -95,7 +95,7 @@
placeholder="请输入内容" placeholder="请输入内容"
v-model:value="item2.title" v-model:value="item2.title"
class="form-pattern" class="form-pattern"
style="width:90%; " style="width: 90%"
@blur="handleGlxm(item)" @blur="handleGlxm(item)"
></a-input> ></a-input>
<button @click="handleDhwbDel(item, index2)" class="ant-btn">删除</button> <button @click="handleDhwbDel(item, index2)" class="ant-btn">删除</button>
@ -108,9 +108,9 @@
<a-col> <a-col>
<a-button type="primary" @click="handleDhfwb(item)" class="increase" preIcon="ant-design:plus-outlined">添加</a-button> <a-button type="primary" @click="handleDhfwb(item)" class="increase" preIcon="ant-design:plus-outlined">添加</a-button>
</a-col> </a-col>
<a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align: right;"> <a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align: right">
<j-editor placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" /> <j-editor placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" />
<button @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin: 8px 0 ">删除</button> <button @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin: 8px 0">删除</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -120,7 +120,7 @@
<a-col> <a-col>
<a-button type="primary" @click="handleDhwbArea(item)" class="increase" preIcon="ant-design:plus-outlined">添加</a-button> <a-button type="primary" @click="handleDhwbArea(item)" class="increase" preIcon="ant-design:plus-outlined">添加</a-button>
</a-col> </a-col>
<a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align: right;"> <a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align: right">
<a-textarea placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" /> <a-textarea placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" />
<button @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin: 8px 0">删除</button> <button @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin: 8px 0">删除</button>
</a-col> </a-col>
@ -154,7 +154,7 @@
placeholder="请输入内容" placeholder="请输入内容"
v-model:value="record[column.key]" v-model:value="record[column.key]"
@blur="handleTwoGlxm(item)" @blur="handleTwoGlxm(item)"
style="width: 100%;" style="width: 100%"
></a-input> ></a-input>
</template> </template>
</template> </template>
@ -189,22 +189,22 @@
<a-col style="margin-bottom: 15px"></a-col> <a-col style="margin-bottom: 15px"></a-col>
<a-col v-for="(item2, index2) in item.list2Map" :key="index2"> <a-col v-for="(item2, index2) in item.list2Map" :key="index2">
<!-- -{{ item2 }}- --> <!-- -{{ item2 }}- -->
<a-row style="margin:10px"> <a-row style="margin: 10px">
<a-col v-for="(item3, index3) in item2" :span="index3 == 0 ? '5' : '16'" :key="index3" > <a-col v-for="(item3, index3) in item2" :span="index3 == 0 ? '5' : '16'" :key="index3">
<!-- -{{ item3 }}- --> <!-- -{{ item3 }}- -->
<span> <span>
<a-input <a-input
placeholder="请输入内容" placeholder="请输入内容"
v-model:value="item3.title" v-model:value="item3.title"
class="Sheet" class="Sheet"
style="width:95%; " style="width: 95%"
:disabled="index3 == 0" :disabled="index3 == 0"
@blur="handle2Glxm(item)" @blur="handle2Glxm(item)"
></a-input> ></a-input>
</span> </span>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<button @click="handleKcmbZzbgDel(item, index2)" class="ant-btn" >删除</button> <button @click="handleKcmbZzbgDel(item, index2)" class="ant-btn">删除</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -223,10 +223,10 @@
<a-row v-for="(item2, index2) in item.list" :key="index2"> <a-row v-for="(item2, index2) in item.list" :key="index2">
<a-col v-for="(item3, index3) in item2.list" :key="index3" style="line-height: 40px"> <a-col v-for="(item3, index3) in item2.list" :key="index3" style="line-height: 40px">
<a-row> <a-row>
<a-col style="text-align:right; color:#777;" :span="6"> {{ item3.title }}: </a-col> <a-col style="text-align: right; color: #777" :span="6"> {{ item3.title }}: </a-col>
<a-col :span="18"> <a-col :span="18">
<span v-if="item3.type === '1'"> <span v-if="item3.type === '1'">
<a-input v-model:value="item3.content" style="width:97%; margin-left:10px; text-align: left"></a-input> <a-input v-model:value="item3.content" style="width: 97%; margin-left: 10px; text-align: left"></a-input>
</span> </span>
<span v-if="item3.type === '2'"> <span v-if="item3.type === '2'">
<a-select <a-select
@ -234,7 +234,7 @@
v-model:value="item3.content" v-model:value="item3.content"
mode="tags" mode="tags"
:disabled="disabled" :disabled="disabled"
style="width:97%; text-align:left;margin-left:10px;" style="width: 97%; text-align: left; margin-left: 10px"
> >
<a-select-option value="">{{ `请选择` + item3.title }}</a-select-option> <a-select-option value="">{{ `请选择` + item3.title }}</a-select-option>
<a-select-option :value="peizhi.title" v-for="(peizhi, index2) in kcmbDataSource" :key="index2">{{ <a-select-option :value="peizhi.title" v-for="(peizhi, index2) in kcmbDataSource" :key="index2">{{
@ -245,8 +245,8 @@
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
<a-col style="text-align: right; margin-right:9px;"> <a-col style="text-align: right; margin-right: 9px">
<button class="ant-btn" @click="handle13DelZzbg(item, index2)" style="margin:5px 0">删除</button> <button class="ant-btn" @click="handle13DelZzbg(item, index2)" style="margin: 5px 0">删除</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -262,7 +262,7 @@
<a-col v-if="kcmbShow"> <a-col v-if="kcmbShow">
<a-row> <a-row>
<a-col :span="10"> <a-col :span="10">
<a-select :placeholder="`请选择课程目标`" v-model:value="checkKcmb" :disabled="disabled" style="width: 90%; margin:10px 0"> <a-select :placeholder="`请选择课程目标`" v-model:value="checkKcmb" :disabled="disabled" style="width: 90%; margin: 10px 0">
<a-select-option value="">请选择课程目标</a-select-option> <a-select-option value="">请选择课程目标</a-select-option>
<a-select-option :value="peizhi.title" v-for="(peizhi, index2) in kcmbDataSource" :key="index2">{{ <a-select-option :value="peizhi.title" v-for="(peizhi, index2) in kcmbDataSource" :key="index2">{{
peizhi.title peizhi.title
@ -270,7 +270,13 @@
</a-select> </a-select>
</a-col> </a-col>
<a-col :span="10"> <a-col :span="10">
<a-select :placeholder="`请选择考核方式`" v-model:value="checkKhfs" :disabled="disabled" mode="tags" style="width: 90%;margin:10px 0"> <a-select
:placeholder="`请选择考核方式`"
v-model:value="checkKhfs"
:disabled="disabled"
mode="tags"
style="width: 90%; margin: 10px 0"
>
<a-select-option value="">请选择考核方式</a-select-option> <a-select-option value="">请选择考核方式</a-select-option>
<a-select-option :value="peizhi.title" v-for="(peizhi, index2) in khmbDataSource" :key="index2">{{ <a-select-option :value="peizhi.title" v-for="(peizhi, index2) in khmbDataSource" :key="index2">{{
peizhi.title peizhi.title
@ -278,7 +284,7 @@
</a-select> </a-select>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<button class="ant-btn" @click="handleKhmbqueren(item)" style="margin:10px 0">确认</button> <button class="ant-btn" @click="handleKhmbqueren(item)" style="margin: 10px 0">确认</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -305,12 +311,6 @@
<!-- --------------------------------------20240824------------------------------------------------------ --> <!-- --------------------------------------20240824------------------------------------------------------ -->
<a-col v-else> </a-col> <a-col v-else> </a-col>
<a-col :span="24" v-if="item.tsy">
<span class="tishi">
<span>{{ item.tsy }}</span>
</span>
</a-col>
</a-row> </a-row>
</a-col> </a-col>
</a-row> </a-row>
@ -335,18 +335,18 @@
> >
<a-divider /> <a-divider />
</a-col> </a-col>
<a-col <a-col :span="23" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index" class="borderstyle">
:span="23"
v-for="(item, index) in zyJxdgMainTable.dataSource"
:key="index"
class="borderstyle"
>
<a-row> <a-row>
<a-col :span="24" style="height: 40px; line-height: 40px; background-color: #f7fbfa;border-radius:6px"> <a-col :span="24" style="height: 40px; line-height: 40px; background-color: #f7fbfa; border-radius: 6px">
<span class="title">{{ item.title }}</span> <span class="title">{{ item.title }}</span>
</a-col> </a-col>
<a-col :span="24" v-if="item.tsy">
<span class="tishi">
<span>{{ item.tsy }}</span>
</span>
</a-col>
<!-- 单行文本 1 --> <!-- 单行文本 1 -->
<a-col v-if="item.type === '1'" :span="24" style="margin: 10px;"> <a-col v-if="item.type === '1'" :span="24" style="margin: 10px">
<span class="Text-Content" v-text="item.content"></span> <span class="Text-Content" v-text="item.content"></span>
</a-col> </a-col>
<!-- 多行文本 2 --> <!-- 多行文本 2 -->
@ -404,7 +404,7 @@
<!-- 自增表格 9 --> <!-- 自增表格 9 -->
<a-col v-else-if="item.type === '9' || item.type === '15'" :span="24"> <a-col v-else-if="item.type === '9' || item.type === '15'" :span="24">
<a-table :columns="getTableZzColumns2(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false"> </a-table> <a-table :columns="getTableZzColumns2(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false"> </a-table>
</a-col> </a-col>
<!-- 自增表格两列关联 10 --> <!-- 自增表格两列关联 10 -->
<a-col v-else-if="item.type === '10'" :span="24"> <a-col v-else-if="item.type === '10'" :span="24">
@ -424,7 +424,7 @@
<a-row> <a-row>
<a-col v-for="(item3, index3) in item2" :span="index3 == 0 ? '5' : '16'" :key="index3"> <a-col v-for="(item3, index3) in item2" :span="index3 == 0 ? '5' : '16'" :key="index3">
<!-- -{{ item3 }}- --> <!-- -{{ item3 }}- -->
<span style="line-height: 40px; margin-left: 15px;" v-if="index3 == 0"> {{ item3.title }}: </span> <span style="line-height: 40px; margin-left: 15px" v-if="index3 == 0"> {{ item3.title }}: </span>
<span style="line-height: 40px" v-else> <span style="line-height: 40px" v-else>
{{ item3.title }} {{ item3.title }}
</span> </span>
@ -439,11 +439,21 @@
<a-row> <a-row>
<a-col> <a-col>
<a-row v-for="(item2, index2) in item.list" :key="index2" class="dhxg"> <a-row v-for="(item2, index2) in item.list" :key="index2" class="dhxg">
<a-col v-for="(item3, index3) in item2.list" :key="index3" style="line-height: 40px;"> <a-col v-for="(item3, index3) in item2.list" :key="index3" style="line-height: 40px">
<a-row style="padding:5px; "> <a-row style="padding: 5px">
<a-col style="text-align: left" :span="7"> {{ item3.title }}: </a-col> <a-col v-if="index3 == 0 || index3 == 1">
<a-col :span="15"> <a-row>
{{ item3.content }} <a-col style="text-align: left" :span="4"> {{ item3.title }}: </a-col>
<a-col :span="15">
{{ item3.content }}
</a-col>
</a-row>
</a-col>
<a-col v-else style="text-align: left" :span="24">
<div> {{ item3.title }}: </div>
<div style="padding: 0 0 0 15px">
{{ item3.content }}
</div>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -457,7 +467,8 @@
<a-col v-else-if="item.type === '14'" :span="24"> <a-col v-else-if="item.type === '14'" :span="24">
<a-row> <a-row>
<a-col> <a-col>
<a-table :columns="getTableZzColumns2(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false"> <!-- -{{ getTableZzColumns222(item.zyJxdgPzxxList, item.list) }}- -->
<a-table :columns="getTableZzColumns222(item.zyJxdgPzxxList, item.list)" :dataSource="item.list" :pagination="false">
<!-- <template #bodyCell="{ column, record }"> <!-- <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<button @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button> <button @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
@ -479,12 +490,6 @@
<!-- --------------------------------------20240824------------------------------------------------------ --> <!-- --------------------------------------20240824------------------------------------------------------ -->
<a-col v-else> </a-col> <a-col v-else> </a-col>
<a-col :span="24" v-if="item.tsy">
<span class="tishi">
<span>{{ item.tsy }}</span>
</span>
</a-col>
</a-row> </a-row>
</a-col> </a-col>
</a-row> </a-row>
@ -572,6 +577,7 @@ function handleGlxm(item) {
} }
} }
} }
function handleFabu(sffb) { function handleFabu(sffb) {
if (sffb == '1') { if (sffb == '1') {
var par = jxdgInfo.value; var par = jxdgInfo.value;
@ -746,12 +752,106 @@ function getTableZzColumns2(list) {
title: par.title, title: par.title,
dataIndex: par.id, dataIndex: par.id,
key: par.id, key: par.id,
customCell: (_, index) => {
if (index === 2) {
return { rowSpan: 2 };
}
// These two are merged into above cell
if (index === 3) {
return { rowSpan: 0 };
}
if (index === 4) {
return { colSpan: 0 };
}
},
}; };
columns.push(inePar); columns.push(inePar);
} }
return columns; return columns;
} }
//
function getTableZzColumns222(list, datalist) {
console.log('🙎datalist-->', datalist);
const data = datalist;
// console.log('😊', data);
let columns = reactive<any>([]);
let namePar = '';
for (var i = 0; i < list.length; i++) {
var par = list[i];
var inePar = {
title: par.title,
dataIndex: par.id,
key: par.id,
customCell: (record, index, bhdata) => {
// if (bhdata.title == '' && (index == 0 || index == 1)) {
// let nextRecord = data[index + 1];
// if (nextRecord && nextRecord[bhdata.key] === record[bhdata.key]) {
// let rowSpan = 1;
// while (nextRecord && nextRecord[bhdata.key] === record[bhdata.key]) {
// nextRecord = data[index + rowSpan];
// rowSpan += 1;
// }
// rowSpan -= 1;
// console.log(rowSpan);
// return {
// rowSpan,
// };
// } else {
// return {
// rowSpan: 0,
// };
// }
// }
if (bhdata.title == '课程目标') {
let nextRecord = data[index + 1];
let rowSpan = 0;
while (nextRecord && nextRecord[bhdata.key] === record[bhdata.key]) {
namePar = nextRecord[bhdata.key];
rowSpan += 1;
nextRecord = data[index + rowSpan];
}
let sizeNum = 0;
for (var i = 0; i < data.length; i++) {
let beforeRecord = data[i];
if (beforeRecord[bhdata.key] === record[bhdata.key]) {
sizeNum += 1;
}
}
console.log('👨‍🦳', sizeNum);
if (sizeNum != rowSpan ) {
rowSpan = 0;
}
if(sizeNum == 1){
rowSpan = 1;
}
return {
rowSpan,
};
}
},
};
columns.push(inePar);
}
// columns[0].customCell = (text, index,record ) => {
// if (index === 0) {
// return {
// rowSpan: 2,
// };
// }
// if (index === 1) {
// return {
// rowSpan: 0,
// };
// }
// };
// console.log('columns-->', columns);
return columns;
}
// //
async function handleCheckBanben(record) { async function handleCheckBanben(record) {
jxdgInfo.value.banbenId = record.id; jxdgInfo.value.banbenId = record.id;
@ -1206,7 +1306,7 @@ onMounted(() => {
font-feature-settings: tnum; font-feature-settings: tnum;
/* margin-bottom: 24px; */ /* margin-bottom: 24px; */
vertical-align: top; vertical-align: top;
background: #fafafa ; background: #fafafa;
} }
.bled-countenance { .bled-countenance {
color: #333333; color: #333333;
@ -1222,7 +1322,7 @@ onMounted(() => {
border-radius: 5px; border-radius: 5px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.region:hover{ .region:hover {
margin: 6px 10px; margin: 6px 10px;
padding-bottom: 20px; padding-bottom: 20px;
background: #fff; background: #fff;
@ -1287,19 +1387,19 @@ onMounted(() => {
margin: 17px; margin: 17px;
border-radius: 10px; border-radius: 10px;
} }
.borderstyle{ .borderstyle {
margin:8px auto; margin: 8px auto;
border:1px solid #e6e6e6; border: 1px solid #e6e6e6;
background:#fff; background: #fff;
border-radius:6px; border-radius: 6px;
padding: 8px; padding: 8px;
} }
.borderstyle:hover{ .borderstyle:hover {
margin:8px auto; margin: 8px auto;
border:1px solid #e6e6e6; border: 1px solid #e6e6e6;
background:#fff; background: #fff;
border-radius:6px; border-radius: 6px;
padding:8px; padding: 8px;
box-shadow: 2px 2px 10px 1px #d4d4d4; box-shadow: 2px 2px 10px 1px #d4d4d4;
} }
</style> </style>

View File

@ -79,9 +79,9 @@
<span class="topTitle" > <span class="topTitle" >
<div hidden @click="testKuayu">点击开始跨域报错</div> <div hidden @click="testKuayu">点击开始跨域报错</div>
<RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}<span style="font-size: 16px;">听评课督导平台</span> <RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}<span style="">听评课督导平台</span>
<span style="font-size: 16px;" v-if="getSysConfig().flag1">{{getSysConfig().flag1}}({{getSysConfig().bxqkssj}}{{getSysConfig().bxqjssj}})</span> <!-- <span style="font-size: 16px;" v-if="getSysConfig().flag1">{{getSysConfig().flag1}}({{getSysConfig().bxqkssj}}{{getSysConfig().bxqjssj}})</span>
<span style="font-size: 16px;margin-left: 20px;" v-if="getUserSf()=='T'" >本学期听课要求:{{tkyqcs}}<span v-if="tkyqcs!='未配置'"></span>已完成{{tkyqywc}}</span> <span style="font-size: 16px;margin-left: 20px;" v-if="getUserSf()=='T'" >本学期听课要求:{{tkyqcs}}<span v-if="tkyqcs!='未配置'"></span>已完成{{tkyqywc}}</span> -->
</RouterLink> </RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页rtsp</RouterLink> <RouterLink hidden target='_blank' :to="{path:'/site/liveView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页rtsp</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveFlvView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页flv</RouterLink> <RouterLink hidden target='_blank' :to="{path:'/site/liveFlvView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页flv</RouterLink>

View File

@ -3,208 +3,217 @@
<div id="maxSite" :style="maxClassName"> <div id="maxSite" :style="maxClassName">
<a-layout> <a-layout>
<!-- 页头 --> <!-- 页头 -->
<headerPage showRightButton/> <headerPage showRightButton />
<!-- 主体部分 --> <!-- 主体部分 -->
<a-layout-content v-if="getUserSf()=='T'"> <a-layout-content v-if="getUserSf() == 'T'">
<!-- 学期学年及听课指标 -->
<div class="bmdTitle" v-if="getSysConfig().sfbmd == 'y' && getSysConfig().bmdTitle">{{ getSysConfig().bmdTitle }}</div>
<!-- 白名单说明文字 --> <!-- 白名单说明文字 -->
<div class="bmdTitle" v-if="getSysConfig().sfbmd=='y'&&getSysConfig().bmdTitle">{{getSysConfig().bmdTitle}}</div> <div class="xnxqClass" style="text-align: right;" v-if="getSysConfig().flag1">
<span style="font-size: 16px;" v-if="getSysConfig().flag1">当前学期{{getSysConfig().flag1}}({{getSysConfig().bxqkssj}}{{getSysConfig().bxqjssj}})</span>
<span style="font-size: 16px;margin-left: 20px;" v-if="getUserSf()=='T'" >本学期听课要求:{{tkyqcs}}<span v-if="tkyqcs!='未配置'"></span>已完成{{tkyqywc}}</span>
</div>
<!-- 统计 --> <!-- 统计 -->
<tongjiPage v-if="getUserSf()=='T'&&getSysConfig().flag7=='1'&&getSysConfig().sfbmd=='n'&&sfxx=='1'"/> <tongjiPage v-if="getUserSf() == 'T' && getSysConfig().flag7 == '1' && getSysConfig().sfbmd == 'n' && sfxx == '1'" />
<!-- 轮播图 --> <!-- 轮播图 -->
<lunboPage v-if="getSysConfig().sfbmd=='n'"/> <lunboPage v-if="getSysConfig().sfbmd == 'n'" />
<!-- 通知公告 --> <!-- 通知公告 -->
<tongZhiGongGaoPage v-if="getSysConfig().sfbmd=='n'"/> <tongZhiGongGaoPage v-if="getSysConfig().sfbmd == 'n'" />
<!-- 教师代办提醒 --> <!-- 教师代办提醒 -->
<teacherDbtx v-if="getUserSf()=='T'"></teacherDbtx> <teacherDbtx v-if="getUserSf() == 'T'"></teacherDbtx>
<!-- 任教教程 --> <!-- 任教教程 -->
<renKeJiaoChengPage v-if="getUserSf()=='T'&&getSysConfig().flag2=='1'&&getSysConfig().sfbmd=='n'" /> <renKeJiaoChengPage v-if="getUserSf() == 'T' && getSysConfig().flag2 == '1' && getSysConfig().sfbmd == 'n'" />
<!-- 精彩公开课 --> <!-- 精彩公开课 -->
<jingCaiGongKaiKePage v-if="getUserSf()=='T'&&getSysConfig().flag4=='1'&&getSysConfig().sfbmd=='n'"/> <jingCaiGongKaiKePage v-if="getUserSf() == 'T' && getSysConfig().flag4 == '1' && getSysConfig().sfbmd == 'n'" />
<!-- 可线上听课课堂 --> <!-- 可线上听课课堂 -->
<kxstkktPage v-if="getUserSf()=='T'&&getSysConfig().flag5=='1'"/> <kxstkktPage v-if="getUserSf() == 'T' && getSysConfig().flag5 == '1'" />
<!-- 今日课程列表 --> <!-- 今日课程列表 -->
<a-card class="rowGutter" v-if="getUserSf()=='T'&&getSysConfig().flag6=='1'" id="jrkclbDom"> <a-card class="rowGutter" v-if="getUserSf() == 'T' && getSysConfig().flag6 == '1'" id="jrkclbDom">
<template #title> <template #title>
<span style="font-size: 24px;font-weight: bold;">课程查询</span> <span style="font-size: 24px; font-weight: bold">课程查询</span>
<span style="margin-left: 5%;font-weight: 700;color: red;font-size: 16px;">{{getSysConfig().jrktTitle}}</span> <span style="margin-left: 5%; font-weight: 700; color: red; font-size: 16px">{{ getSysConfig().jrktTitle }}</span>
</template> </template>
<a-tabs v-model:activeKey="activeKey" type="card" @change="kclbCard"> <a-tabs v-model:activeKey="activeKey" type="card" @change="kclbCard">
<a-tab-pane key="1"> <a-tab-pane key="1">
<template #tab> <template #tab>
<div style="font-weight: 600;font-size: 16px;">{{zzskTitle}}</div> <div style="font-weight: 600; font-size: 16px">{{ zzskTitle }}</div>
</template> </template>
<kclbZzsk ref="zzskModeal" @jrkclb-load="jrkclbLoad"></kclbZzsk> <kclbZzsk ref="zzskModeal" @jrkclb-load="jrkclbLoad"></kclbZzsk>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2"> <a-tab-pane key="2">
<template #tab> <template #tab>
<div style="font-weight: 600;font-size: 16px;">下一节课</div> <div style="font-weight: 600; font-size: 16px">下一节课</div>
</template> </template>
<kclbXyjk ref="xyjkModeal" @jrkclb-load="jrkclbLoad"></kclbXyjk> <kclbXyjk ref="xyjkModeal" @jrkclb-load="jrkclbLoad"></kclbXyjk>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3"> <a-tab-pane key="3">
<template #tab> <template #tab>
<div style="font-weight: 600;font-size: 16px;">日课表</div> <div style="font-weight: 600; font-size: 16px">日课表</div>
</template> </template>
<kclbRkb ref="rkbModeal" @jrkclb-load="jrkclbLoad"></kclbRkb> <kclbRkb ref="rkbModeal" @jrkclb-load="jrkclbLoad"></kclbRkb>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-card> </a-card>
<!-- 预约课程 --> <!-- 预约课程 -->
<yuYueKeChengPage ref="yykcModeal" @orther-load="yykcLoad" v-if="getUserSf()=='T'&&getSysConfig().flag3=='1'"/> <yuYueKeChengPage ref="yykcModeal" @orther-load="yykcLoad" v-if="getUserSf() == 'T' && getSysConfig().flag3 == '1'" />
<!-- 课堂随笔 --> <!-- 课堂随笔 -->
<ktsbPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/> <ktsbPage v-if="getSysConfig().sfbmd == 'n' && getUserSf() == 'T'" />
<!-- 评价结果 --> <!-- 评价结果 -->
<pjjgPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/> <pjjgPage v-if="getSysConfig().sfbmd == 'n' && getUserSf() == 'T'" />
<!-- 听课足迹 --> <!-- 听课足迹 -->
<tingKeZuJiPage v-if="getUserSf()=='T'"/> <tingKeZuJiPage v-if="getUserSf() == 'T'" />
</a-layout-content> </a-layout-content>
<!-- 学生部分今日课表 --> <!-- 学生部分今日课表 -->
<StudentJrkbPage v-if="getUserSf()=='S-'"></StudentJrkbPage> <StudentJrkbPage v-if="getUserSf() == 'S-'"></StudentJrkbPage>
<!-- 学生部分近六日课表 --> <!-- 学生部分近六日课表 -->
<StudentJlrkbPage v-if="getUserSf()=='S-'"></StudentJlrkbPage> <StudentJlrkbPage v-if="getUserSf() == 'S-'"></StudentJlrkbPage>
<!-- 学生代办提醒 --> <!-- 学生代办提醒 -->
<studentDbtx v-if="getUserSf()=='S'"></studentDbtx> <studentDbtx v-if="getUserSf() == 'S'"></studentDbtx>
<!-- 我的课程 --> <!-- 我的课程 -->
<studentWdkc v-if="getUserSf()=='S'"></studentWdkc> <studentWdkc v-if="getUserSf() == 'S'"></studentWdkc>
<!-- 页尾 --> <!-- 页尾 -->
<footerPage/> <footerPage />
</a-layout> </a-layout>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import headerPage from '/@/views/site/common/header.vue'; import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue'; import footerPage from '/@/views/site/common/footer.vue';
import tongjiPage from '/@/views/site/tongJi/index.vue'; import tongjiPage from '/@/views/site/tongJi/index.vue';
import lunboPage from '/@/views/site/lunBo/index.vue'; import lunboPage from '/@/views/site/lunBo/index.vue';
import tongZhiGongGaoPage from '/@/views/site/tongZhiGongGao/index.vue'; import tongZhiGongGaoPage from '/@/views/site/tongZhiGongGao/index.vue';
import renKeJiaoChengPage from '/@/views/site/renKeJiaoCheng/index.vue' import renKeJiaoChengPage from '/@/views/site/renKeJiaoCheng/index.vue';
import tingKeZuJiPage from '/@/views/site/tingKeZuJi/index.vue' import tingKeZuJiPage from '/@/views/site/tingKeZuJi/index.vue';
import yuYueKeChengPage from '/@/views/site/yuYueKeCheng/index.vue' import yuYueKeChengPage from '/@/views/site/yuYueKeCheng/index.vue';
import jingCaiGongKaiKePage from '/@/views/site/jingCaiGongKaiKe/index.vue' import jingCaiGongKaiKePage from '/@/views/site/jingCaiGongKaiKe/index.vue';
import kxstkktPage from '/@/views/site/kxstkkt/index.vue' import kxstkktPage from '/@/views/site/kxstkkt/index.vue';
import ktsbPage from '/@/views/site/ktsb/index.vue' import ktsbPage from '/@/views/site/ktsb/index.vue';
import kclbZzsk from '/@/views/site/jrkclb/kclbZzsk.vue';
import kclbXyjk from '/@/views/site/jrkclb/kclbXyjk.vue';
import kclbRkb from '/@/views/site/jrkclb/kclbRkb.vue';
import StudentJrkbPage from '/@/views/site/studentJrkb/index.vue';
import StudentJlrkbPage from '/@/views/site/studentJlrkb/index.vue';
import studentWdkc from '/@/views/site/studentWdkc/studentWdkc.vue';
import studentDbtx from '/@/views/site/studentWdkc/studentDbtx.vue';
import teacherDbtx from '/@/views/site/studentWdkc/teacherDbtx.vue';
import kclbZzsk from '/@/views/site/jrkclb/kclbZzsk.vue'; import pjjgPage from '/@/views/site/pjjgPage/index.vue';
import kclbXyjk from '/@/views/site/jrkclb/kclbXyjk.vue';
import kclbRkb from '/@/views/site/jrkclb/kclbRkb.vue';
import { getUserSf, getSysConfig, getUserInfo } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import StudentJrkbPage from '/@/views/site/studentJrkb/index.vue'; // const headerPage = () => import('/@/views/site/common/header.vue');
import StudentJlrkbPage from '/@/views/site/studentJlrkb/index.vue'; // const footerPage = () => import('/@/views/site/common/footer.vue');
import studentWdkc from '/@/views/site/studentWdkc/studentWdkc.vue';
import studentDbtx from '/@/views/site/studentWdkc/studentDbtx.vue';
import teacherDbtx from '/@/views/site/studentWdkc/teacherDbtx.vue';
import pjjgPage from '/@/views/site/pjjgPage/index.vue'; // const tongjiPage = () => import('/@/views/site/tongJi/index.vue');
// const lunboPage = () => import('/@/views/site/lunBo/index.vue');
// const tongZhiGongGaoPage = () => import('/@/views/site/tongZhiGongGao/index.vue');
// const renKeJiaoChengPage = () => import('/@/views/site/renKeJiaoCheng/index.vue');
// const tingKeZuJiPage = () => import('/@/views/site/tingKeZuJi/index.vue');
// const yuYueKeChengPage = () => import('/@/views/site/yuYueKeCheng/index.vue');
// const jingCaiGongKaiKePage = () => import('/@/views/site/jingCaiGongKaiKe/index.vue');
// const kxstkktPage = () => import('/@/views/site/kxstkkt/index.vue');
import { getUserSf,getSysConfig,getUserInfo } from '/@/views/site/utils/index'; // const kclbZzsk = () => import('/@/views/site/jrkclb/kclbZzsk.vue');
import { defHttp } from '/@/utils/http/axios'; // const kclbXyjk = () => import('/@/views/site/jrkclb/kclbXyjk.vue');
// const kclbRkb = () => import('/@/views/site/jrkclb/kclbRkb.vue');
// const headerPage = () => import('/@/views/site/common/header.vue'); // const StudentJrkbPage = () => import('/@/views/site/studentJrkb/index.vue');
// const footerPage = () => import('/@/views/site/common/footer.vue'); // const StudentJlrkbPage = () => import('/@/views/site/studentJlrkb/index.vue');
// const tongjiPage = () => import('/@/views/site/tongJi/index.vue'); const activeKey = ref('1');
// const lunboPage = () => import('/@/views/site/lunBo/index.vue'); const zzskModeal = ref();
// const tongZhiGongGaoPage = () => import('/@/views/site/tongZhiGongGao/index.vue'); const xyjkModeal = ref();
// const renKeJiaoChengPage = () => import('/@/views/site/renKeJiaoCheng/index.vue'); const rkbModeal = ref();
// const tingKeZuJiPage = () => import('/@/views/site/tingKeZuJi/index.vue'); const yykcModeal = ref();
// const yuYueKeChengPage = () => import('/@/views/site/yuYueKeCheng/index.vue'); const maxClassName = ref<any>({});
// const jingCaiGongKaiKePage = () => import('/@/views/site/jingCaiGongKaiKe/index.vue'); const zzskTitle = ref('正在上课');
// const kxstkktPage = () => import('/@/views/site/kxstkkt/index.vue'); const queryParam = ref<any>({});
// const kclbZzsk = () => import('/@/views/site/jrkclb/kclbZzsk.vue'); const sfxx = ref<string>('0');
// const kclbXyjk = () => import('/@/views/site/jrkclb/kclbXyjk.vue'); const tkyqcs = ref<string>('未配置');
// const kclbRkb = () => import('/@/views/site/jrkclb/kclbRkb.vue'); const tkyqywc = ref<string>('0');
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params: queryParam });
// const StudentJrkbPage = () => import('/@/views/site/studentJrkb/index.vue'); const yqlist = (queryParam) => defHttp.get({ url: '/kcTingke/kcTingke/getUserTingkeInfo', params:queryParam });
// const StudentJlrkbPage = () => import('/@/views/site/studentJlrkb/index.vue');
//
const activeKey = ref('1'); onMounted(() => {
const zzskModeal = ref(); let roleList = getUserInfo().roleList;
const xyjkModeal = ref(); if (roleList) {
const rkbModeal = ref(); for (var i = 0; i < roleList.length; i++) {
const yykcModeal = ref(); var roleCode = roleList[i].roleCode;
const maxClassName = ref<any>({}); console.log(`🚀 ~ onMounted ~ roleCode:`, roleCode);
const zzskTitle = ref('正在上课'); if (roleCode == 'admin' || roleCode == 'jwms') {
const queryParam = ref<any>({}); sfxx.value = '1';
const sfxx = ref<string>('0');
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
//
onMounted(() => {
let roleList = getUserInfo().roleList;
if(roleList){
for(var i=0;i<roleList.length;i++){
var roleCode = roleList[i].roleCode
console.log(`🚀 ~ onMounted ~ roleCode:`, roleCode)
if(roleCode == 'admin' || roleCode == 'jwms'){
sfxx.value = "1";
}
} }
} }
}
jclist(queryParam.value).then((res) => {
var list = res;
jclist(queryParam.value).then(res=>{ let sjsksj = list[0].sjsksj;
var list = res console.log(`🚀 ~ file: index.vue:135 ~ jclist ~ sjsksj:`, sjsksj);
let sjsksj = list[0].sjsksj if (sjsksj) {
console.log(`🚀 ~ file: index.vue:135 ~ jclist ~ sjsksj:`, sjsksj) let nowDate = new Date();
if(sjsksj){ let nowDate2 = new Date(sjsksj);
let nowDate = new Date(); console.log(`🚀 ~ file: index.vue:140 ~ jclist ~ nowDate.getTime():`, nowDate.getTime(), nowDate2.getTime());
let nowDate2 = new Date(sjsksj); if (nowDate.getTime() < nowDate2.getTime()) {
console.log(`🚀 ~ file: index.vue:140 ~ jclist ~ nowDate.getTime():`, nowDate.getTime(),nowDate2.getTime()) zzskTitle.value = '即将上课';
if(nowDate.getTime()<nowDate2.getTime()){ } else {
zzskTitle.value = "即将上课"; zzskTitle.value = '正在上课';
}else{
zzskTitle.value = "正在上课";
}
}else{
zzskTitle.value = "正在上课";
} }
}) } else {
zzskTitle.value = '正在上课';
}
}); });
/**
* 刷新预约课程列表数据
*/
function jrkclbLoad(){
console.log(`🚀 ~ file: index.vue:1301111111:`)
yykcModeal.value.newFunction()
}
/**
* 刷新今日课程列表数据
*/
function yykcLoad(){
kclbCard(1)
kclbCard(2)
kclbCard(3)
}
function kclbCard(activeKey){
if(activeKey==1){
zzskModeal.value.zbLoadData();
}else if(activeKey==2){
xyjkModeal.value.zbLoadData();
}else if(activeKey==3){
rkbModeal.value.zbLoadData();
}
}
//-----------------------------yangjun----------------------- yqlist(null).then(res=>{
//-----------------------------yangjun----------------------- var list = res
if(list){
tkyqcs.value = Number(list.tkyq)||'未配置'
tkyqywc.value = list.sjtksl||'0'
}
})
});
/**
* 刷新预约课程列表数据
*/
function jrkclbLoad() {
console.log(`🚀 ~ file: index.vue:1301111111:`);
yykcModeal.value.newFunction();
}
/**
* 刷新今日课程列表数据
*/
function yykcLoad() {
kclbCard(1);
kclbCard(2);
kclbCard(3);
}
function kclbCard(activeKey) {
if (activeKey == 1) {
zzskModeal.value.zbLoadData();
} else if (activeKey == 2) {
xyjkModeal.value.zbLoadData();
} else if (activeKey == 3) {
rkbModeal.value.zbLoadData();
}
}
//-----------------------------yangjun-----------------------
//-----------------------------yangjun-----------------------
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
#siteMain { #siteMain {
@ -216,7 +225,7 @@
max-width: 1070px; max-width: 1070px;
// //
margin: 0 auto; margin: 0 auto;
.rowGutter{ .rowGutter {
margin-top: 1rem; margin-top: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
@ -227,7 +236,7 @@
} }
.ant-layout-footer { .ant-layout-footer {
line-height: 1.5; line-height: 1.5;
background: #FFF; background: #fff;
} }
.ant-layout-sider { .ant-layout-sider {
color: #fff; color: #fff;
@ -244,7 +253,8 @@
} }
/**暗黑模式特殊配色*/ /**暗黑模式特殊配色*/
[data-theme='dark'] #siteMain #maxSite { [data-theme='dark'] #siteMain #maxSite {
.ant-layout-header, .ant-layout-footer { .ant-layout-header,
.ant-layout-footer {
background: #6aa0c7; background: #6aa0c7;
} }
.ant-layout-content { .ant-layout-content {
@ -262,7 +272,7 @@
a { a {
color: #337ab7; color: #337ab7;
} }
.bmdTitle{ .bmdTitle {
background-color: #fff; background-color: #fff;
height: 100px; height: 100px;
line-height: 23px; line-height: 23px;
@ -271,6 +281,20 @@ a {
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
font-weight: 600;font-size: 16px; font-weight: 600;
font-size: 16px;
} }
.xnxqClass{
width: 100%;
background-color: #fff;
height: 50px;
line-height: 25px;
padding: 10px;
align-items: center;
flex-direction: row;
flex-wrap: wrap;
font-size: 16px;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="rowGutter"> <div class="rowGutter" v-if="list.length > 0">
<!-- --{{ list }}-- --> <!-- --{{ list }}-- -->
<a-carousel autoplay> <a-carousel autoplay>
<div v-for="(item,index) in list" :key="index"> <div v-for="(item,index) in list" :key="index">

View File

@ -21,12 +21,12 @@
</template> </template>
<span @click="getGzt('kcjs')">课程简介</span> <span @click="getGzt('kcjs')">课程简介</span>
</a-menu-item > </a-menu-item >
<!-- <a-menu-item key="sub2"> <a-menu-item key="sub2">
<template #icon> <template #icon>
<SettingOutlined /> <SettingOutlined />
</template> </template>
<span @click="getGzt('jxdg')">教学大纲</span> <span @click="getGzt('jxdg')">教学大纲</span>
</a-menu-item > --> </a-menu-item >
<a-menu-item key="sub3"> <a-menu-item key="sub3">
<template #icon> <template #icon>
<SnippetsOutlined /> <SnippetsOutlined />

View File

@ -1,5 +1,6 @@
<template> <template>
<a-row class="rowGutter maxRow" :gutter="gutter"> <div style="margin-top: 15px;">
<a-row class="rowGutter maxRow" :gutter="gutter" style="line-height: 0;">
<a-col :xs="{ span: 15 }" :sm="{ span: 8 }" :lg="{ span: 5 }"> <a-col :xs="{ span: 15 }" :sm="{ span: 8 }" :lg="{ span: 5 }">
<a-card class="cardDiv" title="今日课堂数"> <a-card class="cardDiv" title="今日课堂数">
<a-row class="" :gutter="gutter"> <a-row class="" :gutter="gutter">
@ -121,6 +122,8 @@
<ykkttkrc ref="ykkttkrcRef"/> <ykkttkrc ref="ykkttkrcRef"/>
<jrtkkts ref="jrtkktsRef"/> <jrtkkts ref="jrtkktsRef"/>
<jrtktkrc ref="jrtktkrcRef"/> <jrtktkrc ref="jrtktkrcRef"/>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, computed, onMounted } from 'vue'; import { ref, reactive, computed, onMounted } from 'vue';

View File

@ -28,9 +28,9 @@
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish_dictText}}</div> <div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish_dictText}}</div>
<a-row style="top: -48px;position: relative;"> <a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;"> <a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div> <div style="font-size: 18px;font-weight: bold;">{{item.title?item.title:'暂未填写'}}</div>
</a-col> </a-col>
<a-col :span="24" class="zyCon"> <a-col :span="24" class="zyCon" v-if="item.endTime">
<a-row> <a-row>
<a-col :span="24" class="zyCon">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col> <a-col :span="24" class="zyCon">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col>
</a-row> </a-row>

View File

@ -28,9 +28,9 @@
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div> <div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
<a-row style="top: -48px;position: relative;"> <a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title"> <a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div> <div style="font-size: 18px;font-weight: bold;">{{item.title?item.title:'暂未填写'}}</div>
</a-col> </a-col>
<a-col :span="24" class="zyCon">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col> <a-col :span="24" class="zyCon" v-if="item.endTime">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col>
<a-col :span="24" class="zyCon"><div style="float:left">&nbsp;</div><div style="float:right;" ><a>{{item.xkxs}}人选课</a></div></a-col> <a-col :span="24" class="zyCon"><div style="float:left">&nbsp;</div><div style="float:right;" ><a>{{item.xkxs}}人选课</a></div></a-col>
<a-col :span="24" class="zyCon"><div style="float:left">未提交{{item.wtjnum}};</div><div style="float:right;" >已提交{{item.ytjnum}}</div></a-col> <a-col :span="24" class="zyCon"><div style="float:left">未提交{{item.wtjnum}};</div><div style="float:right;" >已提交{{item.ytjnum}}</div></a-col>
<a-col :span="24" class="zyCon"><div style="float:left">未评阅{{item.wpynum}};</div><div style="float:right;" >已评阅{{item.ypynum}}</div></a-col> <a-col :span="24" class="zyCon"><div style="float:left">未评阅{{item.wpynum}};</div><div style="float:right;" >已评阅{{item.ypynum}}</div></a-col>

View File

@ -4,7 +4,7 @@
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;"> <a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;">
<div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7"> <div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7">
<!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > --> <!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > -->
<div style="font-size: 18px; font-weight: bold">{{ item.sort }}次作业(本次作业在期末成绩中的占比:{{item.zyzb}}%)</div> <div style="font-size: 18px; font-weight: bold">{{ item.sort }}次作业(本次作业在成绩中的占比:{{item.zyzb}}%)</div>
<!-- </a-col> --> <!-- </a-col> -->
</div> </div>
<a-card style="height: 240px; border: 1px solid #eeeeee"> <a-card style="height: 240px; border: 1px solid #eeeeee">

View File

@ -4,7 +4,7 @@
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;"> <a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;">
<div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7"> <div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7">
<!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > --> <!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > -->
<div style="font-size: 18px; font-weight: bold">{{ item.sort }}次考试(本次考试在期末成绩中的占比:{{item.zyzb}}%)</div> <div style="font-size: 18px; font-weight: bold">{{ item.sort }}次考试(本次考试在成绩中的占比:{{item.zyzb}}%)</div>
<!-- </a-col> --> <!-- </a-col> -->
</div> </div>
<a-card style="height: 240px; border: 1px solid #eeeeee"> <a-card style="height: 240px; border: 1px solid #eeeeee">

View File

@ -10,7 +10,7 @@
<a-col :span="24" style="text-align: center; color: #494b56"> <a-col :span="24" style="text-align: center; color: #494b56">
<div>老师您好</div> <div>老师您好</div>
<div>请根据课程教学大纲的要求</div> <div>请根据课程教学大纲的要求</div>
<div>设置学生修完本课程需要完成的考试次数及每次考试在期末总成绩中所占的比例</div> <div>设置学生修完本课程需要完成的考试次数及每次考试在总成绩中所占的比例</div>
<div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置考试次数</a></div> <div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置考试次数</a></div>
</a-col> </a-col>
</a-row> </a-row>
@ -20,10 +20,18 @@
<a-col :span="24"><span class="title">期末考试次数设置</span><a-divider /></a-col> <a-col :span="24"><span class="title">期末考试次数设置</span><a-divider /></a-col>
<a-col :span="24" style="padding: 0 0 0 30px"> <a-col :span="24" style="padding: 0 0 0 30px">
<a-row> <a-row>
<a-col :span="24" style="margin-top: 10px;text-align: right;"> <a-col :span="24" style="margin-top: 10px; height: 50px">
<div class="title"> <a-row style="text-align: center">
<span>课程作业占比:</span><span>{{ otherKszb }}%</span> <a-col :span="8"
</div> ><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col
>
<a-col :span="8"
><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col
>
<a-col :span="8"
><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col
>
</a-row>
</a-col> </a-col>
<a-col :span="18" style="margin-top: 5px"> <a-col :span="18" style="margin-top: 5px">
<span style="color: #777777">学生修完本课程需要完成的考试次数</span> <span style="color: #777777">学生修完本课程需要完成的考试次数</span>
@ -39,7 +47,7 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'score'"> <template v-if="column.key === 'score'">
<span> <span>
<a-input-number v-model:value="record.score" :min="0" :max="100"> <template #addonAfter> % </template></a-input-number> <a-input-number v-model:value="record.score" :min="0" :max="100" @blur="handleJscjbfb"> <template #addonAfter> % </template></a-input-number>
</span> </span>
</template> </template>
<template v-else-if="column.key === 'lstitle'"> <template v-else-if="column.key === 'lstitle'">
@ -599,6 +607,9 @@ const tableData = ref<any>([]);
const showType = ref<number>(0); const showType = ref<number>(0);
const zycs = ref<number>(0); const zycs = ref<number>(0);
const otherKszb = ref<number>(0); const otherKszb = ref<number>(0);
const kczyzb = ref<number>(0);
const qmkszb = ref<number>(0);
const ktcyzb = ref<number>(0);
const zycsDisabled = ref<boolean>(false); const zycsDisabled = ref<boolean>(false);
const zyInfo = ref<any>({}); const zyInfo = ref<any>({});
const formRef = ref(); const formRef = ref();
@ -964,36 +975,45 @@ function handleSzzynr(record) {
function handleBatchAdd() { function handleBatchAdd() {
var list = tableData.value; var list = tableData.value;
var sfjx = 0; // var sfjx = 0; //
var cjbfb = otherKszb.value; // var cjbfb = kczyzb.value; //
if (list.length == 0) { var cjbfb2 = ktcyzb.value; //
createMessage.error('考试次数不能为空!'); var zcj = 0;
return;
var score22 = 0;
if (list.length == 0) {
createMessage.error('作业次数不能为空!');
return;
}
for (var i = 0; i < list.length; i++) {
console.log('🥵', list);
var score = list[i].score;
if (score == null || score + '' == '') {
createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空!');
sfjx = 1;
break;
} }
for (var i = 0; i < list.length; i++) { if (score < 0 || score > 100) {
console.log('🥵', list); createMessage.error('作业成绩百分比必须在0-100之间');
var score = list[i].score; sfjx = 1;
console.log('👨‍❤️‍💋‍👨', !score); break;
console.log('🤖', score == null);
console.log('🤖', score+"" == '');
if (score == null || score+"" == '') {
createMessage.error('第' + (i + 1) + '次考试占期末总成绩的百分比不能为空!');
sfjx = 1;
break;
}
cjbfb = parseInt(cjbfb) + parseInt(score);
if (score < 0 || score > 100) {
createMessage.error('考试成绩百分比必须在0-100之间');
sfjx = 1;
break;
}
} }
score22 = parseInt(score22) + parseInt(score);
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
}
if (sfjx == 1) { if (sfjx == 1) {
return; return;
} }
if (cjbfb > 100) {
createMessage.error('本次考试占期末总成绩的百分比不得超过100%,当前考试总百分比为:' + cjbfb + '%');
return;
}
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
@ -1008,9 +1028,52 @@ function handleBatchAdd() {
}, },
}); });
} }
function handleJscjbfb(){
var list = tableData.value;
var cjbfb = qmkszb.value; //
var cjbfb2 = kczyzb.value; //
var zcj = 0;
var score22 = 0;
for (var i = 0; i < list.length; i++) {
console.log('🥵', list);
var score = list[i].score;
if (score == null || score + '' == '') {
createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空!');
break;
}
score22 = parseInt(score22)+parseInt(score);
if (score < 0 || score > 100) {
createMessage.error('作业成绩百分比必须在0-100之间');
break;
}
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
}
}
function handleSzzycs(val){ function handleSzzycs(val){
defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params:{rwbh,xqxn,teano,zyLeixing:'0'}}).then((res) => {
otherKszb.value = res?.score?res.score:0; defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params: { rwbh, xqxn, teano, zyLeixing: '1' } }).then((res) => {
console.log('😥', res);
var list = res;
for(var i = 0; i < list.length; i++){
if(list[i].zyLeixing == '0'){
kczyzb.value = list[i].score
}else if(list[i].zyLeixing == '1'){
qmkszb.value = list[i].score
}else if(list[i].zyLeixing == '2'){
}else if(list[i].zyLeixing == '3'){
ktcyzb.value = list[i].score
}
}
}); });
if (val == 1) { if (val == 1) {
zycs.value = 1; zycs.value = 1;
@ -1210,7 +1273,7 @@ const columns = [
key: 'lstitle', key: 'lstitle',
}, },
{ {
title: '本次考试占期末总成绩的百分比', title: '本次考试占总成绩的百分比',
dataIndex: 'score', dataIndex: 'score',
key: 'score', key: 'score',
}, },

View File

@ -10,7 +10,7 @@
<a-col :span="24" style="text-align: center; color: #494b56"> <a-col :span="24" style="text-align: center; color: #494b56">
<div>老师您好</div> <div>老师您好</div>
<div>请根据课程教学大纲的要求</div> <div>请根据课程教学大纲的要求</div>
<div>设置学生修完本课程需要完成的作业次数及每次作业在期末总成绩中所占的比例</div> <div>设置学生修完本课程需要完成的作业次数及每次作业在总成绩中所占的比例</div>
<div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置作业次数</a></div> <div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置作业次数</a></div>
</a-col> </a-col>
</a-row> </a-row>
@ -18,16 +18,27 @@
<div v-if="showType == 1"> <div v-if="showType == 1">
<a-row> <a-row>
<a-col :span="24"><span class="title">课程作业次数设置</span><a-divider /></a-col> <a-col :span="24"><span class="title">课程作业次数设置</span><a-divider /></a-col>
<a-col :span="24" style="margin-top: 10px"> <a-col :span="24" style="margin-top: 10px; height: 50px">
<div class="title"> <a-row style="text-align: center">
<span>期末考试占比:</span><span>{{ otherKszb }}%</span> <a-col :span="8"
</div> ><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col
>
<a-col :span="8"
><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col
>
<a-col :span="8"
><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col
>
</a-row>
</a-col> </a-col>
<a-col :span="24" style="padding: 0 0 0 30px"> <a-col :span="24" style="padding: 0 0 0 30px">
<a-row> <a-row>
<a-col :span="18" style="margin-top: 5px"> <a-col :span="18" style="margin-top: 5px">
<span style="color: #777777">学生修完本课程需要完成的作业次数</span> <span style="color: #777777">学生修完本课程需要完成的作业次数</span>
<a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled"/><span style="margin-left: 5px"></span> <a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled" /><span
style="margin-left: 5px"
></span
>
</a-col> </a-col>
<a-col :span="6" style="text-align: right; padding: 5px 0 0 0"> <a-col :span="6" style="text-align: right; padding: 5px 0 0 0">
<a-button type="primary" @click="handleAddZycs" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button> <a-button type="primary" @click="handleAddZycs" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button>
@ -39,7 +50,7 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'score'"> <template v-if="column.key === 'score'">
<span> <span>
<a-input-number v-model:value="record.score" :min="0" :max="100"> <template #addonAfter> % </template></a-input-number> <a-input-number v-model:value="record.score" :min="0" :max="100" @blur="handleJscjbfb"> <template #addonAfter> % </template></a-input-number>
</span> </span>
</template> </template>
<template v-else-if="column.key === 'lstitle'"> <template v-else-if="column.key === 'lstitle'">
@ -139,7 +150,7 @@
<a-form-item label="作业要求" v-bind="validateInfos.content"> <a-form-item label="作业要求" v-bind="validateInfos.content">
<j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" /> <j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" />
<div style="color: #777777" v-html="zyInfo.content" v-if="!zyyqShow"></div> <div style="color: #777777" v-html="zyInfo.content" v-if="!zyyqShow"></div>
<div @click="handleZyyqShow(1)" class="tishi" v-if="!editDisabled">温馨提示点击可编辑作业要求</div> <div @click="handleZyyqShow(1)" class="tishi" v-if="!editDisabled">温馨提示点击可编辑作业要求</div>
<!-- <div @click="handleZyyqShow(1)"><span style="cursor: pointer; color: #18a689">温馨提示点击可编辑作业要求</span></div> --> <!-- <div @click="handleZyyqShow(1)"><span style="cursor: pointer; color: #18a689">温馨提示点击可编辑作业要求</span></div> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -195,7 +206,12 @@
<template #addonAfter></template> <template #addonAfter></template>
</a-input-number> </a-input-number>
</a-form-item> --> </a-form-item> -->
<a-form-item label="互评结果使用" :labelCol="labelCol3" :wrapperCol="wrapperCol3" style="margin-top: 20px; margin-left: -30px"> <a-form-item
label="互评结果使用"
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"
style="margin-top: 20px; margin-left: -30px"
>
<a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" :disabled="editDisabled"> <a-radio-group v-model:value="zyInfo.sfzzcj" style="width: 100%" size="default" :disabled="editDisabled">
<a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio> <a-radio :value="'1'" style="width: 100%; margin-bottom: 5px">互评成绩为最终成绩</a-radio>
<a-radio :value="'0'" style="width: 100%; margin-bottom: 5px">互评成绩作为教师评分的参考成绩</a-radio> <a-radio :value="'0'" style="width: 100%; margin-bottom: 5px">互评成绩作为教师评分的参考成绩</a-radio>
@ -205,10 +221,10 @@
label="是否允许学生看到互评成绩" label="是否允许学生看到互评成绩"
:labelCol="labelCol4" :labelCol="labelCol4"
:wrapperCol="wrapperCol4" :wrapperCol="wrapperCol4"
style="margin-top: 20px; margin-left: -10px;" style="margin-top: 20px; margin-left: -10px"
> >
<a-radio-group v-model:value="zyInfo.xssfck"> <a-radio-group v-model:value="zyInfo.xssfck">
<a-radio :value="'1'" style="margin-top: 5px;">(匿名)</a-radio> <a-radio :value="'1'" style="margin-top: 5px">(匿名)</a-radio>
<a-radio :value="'0'" style="margin-top: 5px"></a-radio> <a-radio :value="'0'" style="margin-top: 5px"></a-radio>
</a-radio-group> </a-radio-group>
<!-- <j-dict-select-tag <!-- <j-dict-select-tag
@ -345,7 +361,7 @@
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px" <a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px"
>一键发布评分</a-button >一键发布评分</a-button
> >
<span class="tishi" style="margin-left: 20px;padding:10px;">温馨提示作业完成后请及时发布评分</span> <span class="tishi" style="margin-left: 20px; padding: 10px">温馨提示作业完成后请及时发布评分</span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@ -434,21 +450,15 @@
<a-row> <a-row>
<a-col :span="24"><span class="title">布置作业</span><a-divider /></a-col> <a-col :span="24"><span class="title">布置作业</span><a-divider /></a-col>
<a-col :span="24" style="text-align: right; margin-top: 5px"> <a-col :span="24" style="text-align: right; margin-top: 5px">
<a-button type="primary" @click="handleSzzycs(1)"><Icon icon="ant-design:edit-outlined" />修改课程作业次数</a-button> <a-button type="primary" @click="handleSzzycs(1)"><Icon icon="ant-design:edit-outlined" />修改课程作业次数</a-button>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-button type="primary" @click="handleAddOne" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button> <a-button type="primary" @click="handleAddOne" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增作业</a-button>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-row style="padding: 10px;"> <a-row style="padding: 10px">
<a-col :lg="24" v-for="(item, index) in tableData" style="padding: 0 5px 12px 5px;border-radius:5px;" :key="index"> <a-col :lg="24" v-for="(item, index) in tableData" style="padding: 0 5px 12px 5px; border-radius: 5px" :key="index">
<a-card <a-card :title="'第' + item.sort + '次作业(占比' + item.score + '%)'" v-if="!item.endTime" class="cardClass module-bg">
:title="'第' + item.sort + '次作业(占比' + item.score + '%)'" <template #extra><span class="card-label3"> 待设置</span> </template>
v-if="!item.endTime"
class="cardClass module-bg"
>
<template #extra
><span class="card-label3"> 待设置</span>
</template>
<p class="sznrClass">尚未布置作业题目及具体要求</p> <p class="sznrClass">尚未布置作业题目及具体要求</p>
<div style="text-align: right"> <div style="text-align: right">
<a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:file-text-outlined" />设置作业内容及要求</a> <a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:file-text-outlined" />设置作业内容及要求</a>
@ -461,9 +471,7 @@
v-if="item.endTime && item.zyStatus == '1'" v-if="item.endTime && item.zyStatus == '1'"
class="cardClass module-bg" class="cardClass module-bg"
> >
<template #extra <template #extra><span class="card-label">已发布</span> </template>
><span class="card-label">已发布</span>
</template>
<div class="ellip-title"> <div class="ellip-title">
<span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span> <span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span>
<a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a> <a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a>
@ -484,18 +492,21 @@
> >
</div> </div>
<div class="flex"> <div class="flex">
<div style="width:100%;display:flex;margin-top:20px"> <div style="width: 100%; display: flex; margin-top: 20px">
<div class="ellip-word"><span class="ellip-word2">作业发布时间</span>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div> <div class="ellip-word"
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> ><span class="ellip-word2">作业发布时间</span
</div> >{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
<div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%"> >
<a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status" ><Icon icon="ant-design:form-outlined" />编辑作业</a> <div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
<a @click="handleChehui(item)" v-if="item.ytjnum == 0" class="home-status"><Icon icon="ant-design:import-outlined" />撤回作业</a> </div>
<a-divider type="vertical" /> <div style="text-align: right; margin-top: 20px; margin-bottom: -10px; width: 100%">
<a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a> <a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a>
<a-divider type="vertical" /> <a @click="handleChehui(item)" v-if="item.ytjnum == 0" class="home-status"><Icon icon="ant-design:import-outlined" />撤回作业</a>
<a @click="handleDelete(item)" v-if="item.ytjnum == '0'" class="home-status"><Icon icon="ant-design:delete-outlined" />删除</a> <a-divider type="vertical" />
</div> <a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a>
<a-divider type="vertical" />
<a @click="handleDelete(item)" v-if="item.ytjnum == '0'" class="home-status"><Icon icon="ant-design:delete-outlined" />删除</a>
</div>
</div> </div>
</a-card> </a-card>
<a-card <a-card
@ -504,20 +515,21 @@
class="cardClass" class="cardClass"
bodyStyle="background: #fff;" bodyStyle="background: #fff;"
> >
<template #extra <template #extra><span class="card-label2">待发布</span> </template>
><span class="card-label2">待发布</span>
</template>
<div class="ellip-title"> <div class="ellip-title">
<span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span> <span class="ellipsis elli-title" :title="item.title">{{ item.title }}</span>
<a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a> <a class="button-zhta" @click="openXkrs(item)">{{ item.xkxs }}人选课</a>
</div> </div>
<div style="width: 100%;"> <div style="width: 100%">
<div class="ellip-word"><span class="ellip-word2">作业发布时间</span>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div> <div class="ellip-word"
><span class="ellip-word2">作业发布时间</span
>{{ item.startTime ? dayjs(item.startTime).format('YYYY.MM.DD HH:mm') : '未设置' }}</div
>
<div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div> <div class="ellip-word"><span class="ellip-word2">作业截止时间</span>{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</div>
</div> </div>
<div style="height: 45px">&nbsp;</div> <div style="height: 45px">&nbsp;</div>
<div style="text-align: right; margin-top: 30px"> <div style="text-align: right; margin-top: 30px">
<a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a> <a @click="handleEdit(item, false)" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleFabu(item)" class="home-status"><Icon icon="ant-design:upload-outlined" />发布作业</a> <a @click="handleFabu(item)" class="home-status"><Icon icon="ant-design:upload-outlined" />发布作业</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
@ -597,6 +609,10 @@ const tableData = ref<any>([]);
const showType = ref<number>(0); const showType = ref<number>(0);
const zycs = ref<number>(0); const zycs = ref<number>(0);
const otherKszb = ref<number>(0); const otherKszb = ref<number>(0);
const kczyzb = ref<number>(0);
const qmkszb = ref<number>(0);
const ktcyzb = ref<number>(0);
const zycsDisabled = ref<boolean>(false); const zycsDisabled = ref<boolean>(false);
const zyInfo = ref<any>({}); const zyInfo = ref<any>({});
const formRef = ref(); const formRef = ref();
@ -671,6 +687,37 @@ function handleEndTime(record) {
zyInfo.value.xshpkssj = record; zyInfo.value.xshpkssj = record;
} }
function handleJscjbfb(){
var list = tableData.value;
var cjbfb = qmkszb.value; //
var cjbfb2 = kczyzb.value; //
var zcj = 0;
var score22 = 0;
for (var i = 0; i < list.length; i++) {
console.log('🥵', list);
var score = list[i].score;
if (score == null || score + '' == '') {
createMessage.error('第' + (i + 1) + '次作业总成绩的百分比不能为空!');
break;
}
score22 = parseInt(score22)+parseInt(score);
if (score < 0 || score > 100) {
createMessage.error('作业成绩百分比必须在0-100之间');
break;
}
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
}
}
// //
function handleViewInfo(record) { function handleViewInfo(record) {
defHttp.get({ url: '/zyCcjg/zyCcjg/ccjglist', params: { zyStuId: record.id } }).then((res) => { defHttp.get({ url: '/zyCcjg/zyCcjg/ccjglist', params: { zyStuId: record.id } }).then((res) => {
@ -763,7 +810,7 @@ function searchQueryZyxq() {
// //
function handleAddOne() { function handleAddOne() {
defHttp.post({ url: '/zyInfo/zyInfo/addOne', params: { rwbh, xnxq: xqxn, teano,zyLeixing: '0' } }).then((res) => { defHttp.post({ url: '/zyInfo/zyInfo/addOne', params: { rwbh, xnxq: xqxn, teano, zyLeixing: '0' } }).then((res) => {
handleSuccess2(); handleSuccess2();
}); });
} }
@ -962,7 +1009,12 @@ function handleSzzynr(record) {
function handleBatchAdd() { function handleBatchAdd() {
var list = tableData.value; var list = tableData.value;
var sfjx = 0; // var sfjx = 0; //
var cjbfb = otherKszb.value; // var cjbfb = qmkszb.value; //
var cjbfb2 = ktcyzb.value; //
var zcj = 0;
var score22 = 0;
if (list.length == 0) { if (list.length == 0) {
createMessage.error('作业次数不能为空!'); createMessage.error('作业次数不能为空!');
return; return;
@ -970,28 +1022,33 @@ function handleBatchAdd() {
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
console.log('🥵', list); console.log('🥵', list);
var score = list[i].score; var score = list[i].score;
console.log('👨‍❤️‍💋‍👨', !score); if (score == null || score + '' == '') {
console.log('🤖', score == null); createMessage.error('第' + (i + 1) + '次作业总成绩的百分比不能为空!');
console.log('🤖', score+"" == '');
if (score == null || score+"" == '') {
createMessage.error('第' + (i + 1) + '次作业占期末总成绩的百分比不能为空!');
sfjx = 1; sfjx = 1;
break; break;
} }
cjbfb = parseInt(cjbfb) + parseInt(score);
if (score < 0 || score > 100) { if (score < 0 || score > 100) {
createMessage.error('作业成绩百分比必须在0-100之间'); createMessage.error('作业成绩百分比必须在0-100之间');
sfjx = 1; sfjx = 1;
break; break;
} }
score22 = parseInt(score22) + parseInt(score);
if (score22 > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
break;
}
}
zcj = parseInt(score22)+ parseInt(cjbfb)+ parseInt(cjbfb2);
if (zcj > 100) {
createMessage.error('作业总的百分比(课程作业占比+期末考试占比+课堂测验占比已经超过100%,请重新输入');
sfjx = 1;
} }
if (sfjx == 1) { if (sfjx == 1) {
return; return;
} }
if (cjbfb > 100) {
createMessage.error('本次作业占期末总成绩的百分比不得超过100%,当前作业总百分比为:' + cjbfb + '%');
return;
}
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
@ -1007,25 +1064,34 @@ function handleBatchAdd() {
}); });
} }
function handleSzzycs(val){ function handleSzzycs(val) {
defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params:{rwbh,xqxn,teano,zyLeixing:'1'}}).then((res) => { defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params: { rwbh, xqxn, teano, zyLeixing: '1' } }).then((res) => {
otherKszb.value = res?.score?res.score:0; console.log('😥', res);
var list = res;
for(var i = 0; i < list.length; i++){
if(list[i].zyLeixing == '0'){
kczyzb.value = list[i].score
}else if(list[i].zyLeixing == '1'){
qmkszb.value = list[i].score
}else if(list[i].zyLeixing == '2'){
}else if(list[i].zyLeixing == '3'){
ktcyzb.value = list[i].score
}
}
}); });
handleShowType(1) handleShowType(1);
} }
// //
function handleShowType(val) { function handleShowType(val) {
if (tableData.value.length > 0) {
if(tableData.value.length>0){
zycsDisabled.value = true; zycsDisabled.value = true;
}else{ } else {
zycsDisabled.value = false; zycsDisabled.value = false;
} }
console.log('👩‍👩‍👧‍👧', zycsDisabled) console.log('👩‍👩‍👧‍👧', zycsDisabled);
showType.value = val; showType.value = val;
} }
// //
function handleAddZycs() { function handleAddZycs() {
@ -1206,7 +1272,7 @@ const columns = [
key: 'lstitle', key: 'lstitle',
}, },
{ {
title: '本次作业占期末总成绩的百分比', title: '本次作业占总成绩的百分比',
dataIndex: 'score', dataIndex: 'score',
key: 'score', key: 'score',
}, },
@ -1566,7 +1632,7 @@ onMounted(() => {
font-weight: bold; font-weight: bold;
} }
.title2 { .title2 {
font-size:16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
.ant-divider-horizontal { .ant-divider-horizontal {
@ -1607,9 +1673,9 @@ onMounted(() => {
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
background: #f7f7f7; background: #f7f7f7;
} }
.ant-card:hover{ .ant-card:hover {
box-sizing: border-box; box-sizing: border-box;
box-shadow: 2px 2px 10px 1px #d4d4d4; box-shadow: 2px 2px 10px 1px #d4d4d4;
} }
.ant-card-head { .ant-card-head {
min-height: 48px; min-height: 48px;
@ -1638,14 +1704,14 @@ onMounted(() => {
font-weight: bold; font-weight: bold;
} }
.ellip-word { .ellip-word {
font-size:12px; font-size: 12px;
color: #666666; color: #666666;
margin-right: 10px; margin-right: 10px;
} }
.ellip-word2{ .ellip-word2 {
font-size:12px; font-size: 12px;
color: #333; color: #333;
font-weight: bold; font-weight: bold;
} }
.zuanqu:hover { .zuanqu:hover {
cursor: pointer; cursor: pointer;
@ -1657,7 +1723,7 @@ onMounted(() => {
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
width: 25%; width: 25%;
margin-right:5px; margin-right: 5px;
padding: 8px 3px; padding: 8px 3px;
border-radius: 5px; border-radius: 5px;
background: #f7f7f7; background: #f7f7f7;
@ -1729,7 +1795,7 @@ onMounted(() => {
border-radius: 5px; border-radius: 5px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.region:hover{ .region:hover {
margin: 6px 12px; margin: 6px 12px;
padding-bottom: 20px; padding-bottom: 20px;
background: #fff; background: #fff;
@ -1740,48 +1806,51 @@ onMounted(() => {
.region-title { .region-title {
font-size: 16px; font-size: 16px;
color: #333; color: #333;
height:50px; height: 50px;
line-height:50px; line-height: 50px;
border-bottom:1px solid #e1e4eb ; border-bottom: 1px solid #e1e4eb;
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
} }
.region-title-headline{ .region-title-headline {
display: block; display: block;
width: 5px; width: 5px;
height:16px; height: 16px;
background: #18a689; background: #18a689;
border-radius: 6px; border-radius: 6px;
margin-top:18px; margin-top: 18px;
margin-right: 20px; margin-right: 20px;
} }
.module-bg{ .module-bg {
background: #fff; background: #fff;
border-radius:6px; border-radius: 6px;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
} }
.home-status{ .home-status {
color: #1ab394; color: #1ab394;
} }
.home-status:hover{ .home-status:hover {
color: #333; color: #333;
} }
.card-label{ .card-label {
background: #81cbbc; background: #81cbbc;
border-radius:4px; border-radius: 4px;
color: #fff; color: #fff;
padding: 2px 6px; padding: 2px 6px;
} }
.card-label2{ .card-label2 {
background: #84c4fa; background: #84c4fa;
border-radius:4px; border-radius: 4px;
color: #fff; color: #fff;
padding: 2px 6px; padding: 2px 6px;
} }
.card-label3{ .card-label3 {
background: #fabe84; background: #fabe84;
border-radius:4px; border-radius: 4px;
color: #fff; color: #fff;
padding: 2px 6px; padding: 2px 6px;
} }
.zbClass {
margin-left: 15px;
}
</style> </style>