修改bug

This commit is contained in:
yangjun 2024-08-01 22:06:40 +08:00
parent aed2d04b73
commit 0c9620c177
8 changed files with 91 additions and 36 deletions

View File

@ -16,7 +16,7 @@
<div class="ant-upload-text">{{ text }}</div>
</div>
</template>
<a-button v-else-if="buttonVisible" :disabled="isMaxCount || disabled || otherData.loading" :loading="otherData.loading">
<a-button v-else-if="buttonVisible" type="primary" :disabled="isMaxCount || disabled || otherData.loading" :loading="otherData.loading">
<Icon icon="ant-design:upload-outlined" />
<span>{{ text }}</span>
</a-button>

View File

@ -22,11 +22,11 @@
<a-input v-model:value="formData.score" placeholder="请输入名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24" v-show="formData.atype=='6'">
<!-- <a-col :span="24" v-show="formData.atype=='6'">
<a-form-item label="问卷平均分数" >
<a-input v-model:value="formData.average_score" placeholder="请输入名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
</a-col> -->
</a-row>
</a-form>

View File

@ -74,15 +74,15 @@
</a-form-item>
</a-form-item>
</a-col>
<a-col :span="24" v-if="!isYl">
<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>
<a-col :span="24" v-if="!isYl" style="text-align: center;">
<!-- <a-form-item label="上传作业" v-bind="validateInfos.filePath"> -->
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :text="`上传作业`" style="background: #ededed" :forceAcceptVerify="true" ></j-upload>
<!-- </a-form-item> -->
</a-col>
<a-col :span="24" v-if="isYl">
<span style="width:300px;float: left;">
<span style="float:left;">
<j-upload v-model:value="formData.stuFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload>
<j-upload v-model:value="formData.stuFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload>
</span>
</span>
<span style="float: right;">

View File

@ -17,6 +17,7 @@
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" @click="handleZyxxDetail" style="margin-left: 8px;;">作业信息</a-button>
</span>
</a-col>
</a-row>
@ -53,7 +54,7 @@
</template>
<script lang="ts" name="zyInfoStudentHp-zyInfoStudentHp" setup>
import { ref, reactive, unref } from 'vue';
import { ref, reactive, unref,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columnsZyhp } from './ZyInfoStudentHp.data';
@ -180,7 +181,7 @@ function handleSuccess() {
}
function handleZyxxDetail(record: Recordable) {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: record.mainId } }).then((res) => {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: mainId } }).then((res) => {
console.log('😒', res);
registerZyxxModal.value.disableSubmit = true;
registerZyxxModal.value.edit(res);
@ -193,10 +194,10 @@ function handleZyxxDetail(record: Recordable) {
function getTableAction(record) {
if(record.sfpf == '0'){
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
// {
// label: '',
// onClick: handleZyxxDetail.bind(null, record),
// },
{
label: '评分',
onClick: handleOneScore.bind(null, record),
@ -204,10 +205,10 @@ function getTableAction(record) {
];
}else{
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
// {
// label: '',
// onClick: handleZyxxDetail.bind(null, record),
// },
];
}
@ -248,6 +249,12 @@ function searchReset() {
//
reload();
}
defineExpose({
reload
});
</script>
<style lang="less" scoped>

View File

@ -1,5 +1,6 @@
<template>
<div>
<div style="width:100%;text-align: right;"><a-button type="primary" @click="handleZyxxDetail" style="margin-left: 8px;;">作业信息</a-button></div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
@ -34,7 +35,7 @@
</template>
<script lang="ts" name="zyInfoStudentHp-zyInfoStudentHp" setup>
import { ref, reactive, unref } from 'vue';
import { ref, reactive, unref,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columnsZyhp } from './ZyInfoStudentHp.data';
@ -63,6 +64,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
columns: columns,
canResize: false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
@ -144,7 +146,7 @@ function handleSuccess() {
}
function handleZyxxDetail(record: Recordable) {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: record.mainId } }).then((res) => {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: mainId } }).then((res) => {
console.log('😒', res);
registerZyxxModal.value.disableSubmit = true;
registerZyxxModal.value.edit(res);
@ -212,6 +214,9 @@ function searchReset() {
//
reload();
}
defineExpose({
reload
});
</script>
<style lang="less" scoped>

View File

@ -17,6 +17,7 @@
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" @click="handleZyxxDetail" style="margin-left: 8px;;">作业信息</a-button>
</span>
</a-col>
</a-row>
@ -53,7 +54,7 @@
</template>
<script lang="ts" name="zyInfoStudentHp-zyInfoStudentHp" setup>
import { ref, reactive, unref } from 'vue';
import { ref, reactive, unref,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columnsZyhpYhp } from './ZyInfoStudentHp.data';
@ -88,6 +89,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
columns: columnsZyhpYhp,
canResize: false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',
@ -179,7 +181,7 @@ function handleSuccess() {
}
function handleZyxxDetail(record: Recordable) {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: record.mainId } }).then((res) => {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: mainId } }).then((res) => {
console.log('😒', res);
registerZyxxModal.value.disableSubmit = true;
registerZyxxModal.value.edit(res);
@ -192,10 +194,10 @@ function handleZyxxDetail(record: Recordable) {
function getTableAction(record) {
if (record.sfpf == '0') {
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
// {
// label: '',
// onClick: handleZyxxDetail.bind(null, record),
// },
{
label: '评分',
onClick: handleOneScore.bind(null, record),
@ -203,10 +205,10 @@ function getTableAction(record) {
];
} else {
return [
{
label: '作业信息',
onClick: handleZyxxDetail.bind(null, record),
},
// {
// label: '',
// onClick: handleZyxxDetail.bind(null, record),
// },
];
}
}
@ -246,6 +248,9 @@ function searchReset() {
//
reload();
}
defineExpose({
reload
});
</script>
<style lang="less" scoped>

View File

@ -3,13 +3,13 @@
<div style="text-align: right;width:100%;"><a-button type="primary" @click="handleback">返回</a-button></div>
<a-tabs v-model:activeKey="activeKey" @change="handleChange">
<a-tab-pane key="1" tab="待互评">
<ZyInfoStudentHpList />
<ZyInfoStudentHpList ref="dhpPage"/>
</a-tab-pane>
<a-tab-pane key="2" tab="已互评" force-render>
<ZyInfoStudentHpYpyList />
<ZyInfoStudentHpYpyList ref="yhpPage" />
</a-tab-pane>
<a-tab-pane key="3" tab="本次作业互评分数">
<ZyInfoStudentHpMyhpfsList />
<a-tab-pane key="3" tab="我的作业互评结果" v-if="zyInfo.xssfck=='1'">
<ZyInfoStudentHpMyhpfsList ref="wdhpPage" />
</a-tab-pane>
</a-tabs>
</div>
@ -22,18 +22,37 @@ import ZyInfoStudentHpYpyList from '/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpY
import ZyInfoStudentHpMyhpfsList from '/@/views/zy/zyInfoStudentHp/ZyInfoStudentHpMyhpfsList.vue'
import { useRouter } from 'vue-router';
import { defHttp } from '/@/utils/http/axios';
var activeKey = ref('1');
const dhpPage = ref();
const yhpPage = ref();
const wdhpPage = ref();
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano ,mainId,zyStuId} = query; //
let router = useRouter();
const zyInfo = ref<any>({});
function handleChange(record) {
console.log('👩‍🚒', record);
if(record == '1'){
dhpPage.value.reload();
}else if(record == '2'){
yhpPage.value.reload();
}else if(record == '3'){
wdhpPage.value.reload();
}
}
function handleback(){
var href = "/stuzy/studentDqzy";
router.push({path:href,query: {rwbh,xqxn,type,teano}});
}
onMounted(() => {
defHttp.get({ url: '/zyInfo/zyInfo/queryById', params: { id: mainId } }).then((res) => {
console.log('😒', res);
zyInfo.value = res;
});
});
</script>
<style lang="less" scoped>

View File

@ -2,9 +2,21 @@
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24" v-show="formData.sturead == '1' && formData.pfbz">
<a-form-item label="评分标准" layout="inline">
<div v-html="formData.pfbz" style="margin-top: 5px"></div>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="评分" v-bind="validateInfos.stuScore">
<a-input-number v-model:value="formData.stuScore" placeholder="请输入评分" :min="1" :max="100" style="width:300px;" :disabled="disabled"></a-input-number>
<a-input-number
v-model:value="formData.stuScore"
placeholder="请输入评分"
:min="1"
style="width: 300px"
:disabled="disabled"
@change="handleScoreChange"
></a-input-number>
</a-form-item>
</a-col>
</a-row>
@ -58,6 +70,13 @@ const disabled = computed(() => {
return props.formDisabled;
});
function handleScoreChange(record) {
console.log('😟', record);
if(record && parseInt(record) > 100){
formData.stuScore = 100
createMessage.error('请输入正确的分数');
}
}
/**
* 新增
*/
@ -124,7 +143,7 @@ defineExpose({
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
min-height: 200px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}