修改bug

This commit is contained in:
yangjun 2024-05-22 18:26:41 +08:00
parent 2bba0ffa2c
commit 9d38d55f0e
8 changed files with 91 additions and 32 deletions

View File

@ -225,6 +225,8 @@ async function submitForm(){
var sfjx = "1";
for(let i=0;i<values.length;i++){
let param = values[i];
values[i].itemSelected = param.itemSelected+"";
if(isShow.value){
if(!param.wjScore){
@ -239,6 +241,7 @@ async function submitForm(){
sfjx = "0";
return;
}
var wjType = param.wjType;
if(wjType != 5){
var itemlist = param.wjxWjxxTmxxList;
@ -249,6 +252,28 @@ async function submitForm(){
return;
}
}
if(isShow.value){
var zqda = values[i].itemSelected;
console.log(`🚀 ~ submitForm ~ zqda:`, zqda)
if(!zqda||zqda=='NaN'||zqda=='undefined'){
createMessage.error('请选择正确答案');
sfjx = "0";
return;
}
}
}else{
if(isShow.value){
var wjAnswer = values[i].wjAnswer;
console.log(`🚀 ~ submitForm ~ wjAnswer:`, wjAnswer)
if(!wjAnswer||wjAnswer=='NaN'||wjAnswer=='undefined'){
createMessage.error('请选择正确答案');
sfjx = "0";
return;
}
}
}
}
if(sfjx=='0'){

View File

@ -172,9 +172,10 @@ const baseApiUrl = globSetting.domainUrl;
}
function cjwtData(arg){
defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn } }).then((res) => {
defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn,column:'createTime',order:'desc' } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
cjwtSource.value = res.records;
total.value = res.total;
console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource)
});
}

View File

@ -194,12 +194,14 @@ onMounted(() => {
});
let roleList = userStore?.getLoginInfo?.roleList
if(roleList){
for(var i=0;i<roleList.length;i++){
var roleCode = roleList[i].roleCode
if(roleCode == 'admin' || roleCode == 'jwms'){
sfxx.value = "1";
}
}
}
});
function showList(type){

View File

@ -43,11 +43,11 @@
<a-col :span="24" class="zyCon">时间{{item.startTime}} - {{item.endTime}}</a-col>
<a-col :span="24" class="zyCon">
<div style="float:left" >评分{{item.score?item.score:'未评'}}</div>
<div style="float:right;">网络查重:{{item.wwtgl?item.wwtgl:'-'}}</div>
<div style="float:right;">网络查重:{{item.wwxsl?item.wwxsl+'%':'-'}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<div style="float:left" >课程内查重:{{item.nwtgl?item.nwtgl:'-'}}</div>
<div style="float:right;">Aigc查重:{{item.aigctgl?item.aigctgl:'-'}}</div>
<div style="float:left" >课程内查重:{{item.nwxsl?item.nwxsl+'%':'-'}}</div>
<div style="float:right;">Aigc查重:{{item.aigcxsl?item.aigcxsl+'%':'-'}}</div>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);">详情</a-button>

View File

@ -57,7 +57,7 @@
</template>
<script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive } from 'vue';
import { ref, reactive,unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './ZyInfo.data';
@ -66,11 +66,16 @@
import ZyInfoModal from './components/ZyInfoModal.vue'
import { useMessage } from "/@/hooks/web/useMessage";
import { JInput } from '/@/components/Form';
import { useRouter } from 'vue-router';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
import { defHttp } from '/@/utils/http/axios';
const queryParam = ref<any>({});
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,type } = query;//
const queryParam = ref<any>({xqxn,rwbh});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const ZyInfoStudentListModalPage = ref();
@ -87,7 +92,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
params.column = 'endTime',params.order = 'desc';//
return Object.assign(params, queryParam.value);
},
},
@ -247,7 +252,8 @@
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
queryParam.value.xqxn = xqxn;
queryParam.value.rwbh = rwbh;
//
reload();
}

View File

@ -39,20 +39,21 @@
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 240px;border: 1px solid rgb(28, 132, 198);">
<a-card style="height: 290px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
<a-row style="top: -48px;position: relative;">
<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>
</a-col>
<a-col :span="24" class="zyCon">时间{{item.startTime}} - {{item.endTime}}</a-col>
<a-col :span="24" class="zyCon"><div style="float:left">{{item.xnxq}}</div><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkxs}}人选课</a></div></a-col>
<a-col :span="24" class="zyCon"><div style="float:left">未提交{{item.wtjnum?item.wtjnum:0}};</div><div style="float:right;" >已提交{{item.ytjnum?item.ytjnum:0}}</div></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"><div style="float:left">&nbsp;</div><div style="float:right;" @click="openXkrs(item)"><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.wpynum}};</div><div style="float:right;" >已评阅{{item.ypynum}}</div></a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">编辑</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">发布</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">删除</a-button>
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">编辑作业</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">发布作业</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">删除作业</a-button>
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业详情</a-button>
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">查看作业</a-button>
<!-- <a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">上传</a-button> -->
@ -86,6 +87,7 @@
import { useMessage } from "/@/hooks/web/useMessage";
import { useRouter } from 'vue-router';
import { JInput } from '/@/components/Form';
import dayjs from 'dayjs';
import ZyInfoModal from './components/ZyInfoModal.vue';
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
@ -235,8 +237,8 @@
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.pageNo = pageNo.value;
queryParam.value.pageSize = pageSize.value;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
// queryParam.value.sflssj = '0';
@ -246,7 +248,7 @@
console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
current.value = res.total;
tableData.value = res.records;
});
}

View File

@ -181,7 +181,11 @@ const baseApiUrl = globSetting.domainUrl;
registerScoreModal.value.disableSubmit = false;
registerScoreModal.value.edit(record);
}
function handleBohui(record: Recordable){
defHttp.post({url:'/zyInfoStudent/zyInfoStudent/editBohui',params:{id:record.id}}).then(res =>{
handleSuccess()
})
}
function handleScoreFabu(record: Recordable){
defHttp.post({url:'/zyInfoStudent/zyInfoStudent/editFabu',params:{id:record.id,scoreFabu:'1'}}).then(res =>{
handleSuccess()
@ -243,6 +247,10 @@ const baseApiUrl = globSetting.domainUrl;
return list;
}else{
var list = [
{
label: '驳回',
onClick: handleBohui.bind(null, record),
},
{
label: '评分',
onClick: handleScore.bind(null, record),

View File

@ -2,7 +2,10 @@
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24">
<!-- <a-col :span="24" style="text-align:center;margin-top:30px;">
<span style="color:red;font-weight:bold;">作业上传后不可修改请仔细检查后提交</span>
</a-col> -->
<a-col :span="24" style="margin-top:30px;">
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
</a-form-item>
@ -20,6 +23,8 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate,zyscStu } from '../ZyInfoStudent.api';
import { Form } from 'ant-design-vue';
const { createConfirm } = useMessage();
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -98,18 +103,28 @@
}
}
}
await zyscStu(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
createConfirm({
iconType: 'warning',
title: '确认提交',
content: '是否确认提交数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
zyscStu(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
});
}