修改bug

This commit is contained in:
yangjun 2024-05-23 18:09:34 +08:00
parent 1aa18e9b97
commit 11e456a39d
9 changed files with 65 additions and 55 deletions

View File

@ -24,8 +24,9 @@
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> -->
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px"> 新增</a-button> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px">新增</a-button>
<a-button type="primary" @click="handleTiku('6')" style="margin-left: 8px">题库</a-button>
</a-col> </a-col>
</span> </span>
</a-col> </a-col>
@ -94,6 +95,7 @@
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal> <WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal> <WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal> <XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
<TikuListModal ref="TikuListModalPage"></TikuListModal>
</div> </div>
</template> </template>
@ -102,13 +104,14 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue'; import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api'; import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import {useRouter} from "vue-router";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue' import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue' import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue' import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue' import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router"; import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
// //
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
@ -129,6 +132,7 @@
const WjxWjxxTmlbDjjgsModalPage = ref() const WjxWjxxTmlbDjjgsModalPage = ref()
const WjxWjxxTmlbDjjgsDcModalPage = ref(); const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref(); const XxhbbksListModalPage = ref();
const TikuListModalPage = ref();
const labelCol = reactive({ const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
@ -139,6 +143,14 @@
sm: { span: 16 }, sm: { span: 16 },
}); });
//61
function handleTiku(wjLeixing){
var record = {wjLeixing}
TikuListModalPage.value.disableSubmit = true;
TikuListModalPage.value.init(record);
}
/** /**
* 新增事件 * 新增事件
*/ */
@ -279,11 +291,11 @@
function classFun(type){ function classFun(type){
if(type == '0'){ if(type == '0'){
return "background: #a7a6a6"; return "background: #fe1a1a";
}else if(type == '1'){ }else if(type == '1'){
return "background: #18a689"; return "background: #c6c209";
}else if(type == '2'){ }else if(type == '2'){
return "background: #6583f8"; return "background: #18a689";
} }
} }

View File

@ -184,9 +184,9 @@
function classFun(type){ function classFun(type){
if(type == '-1'){ if(type == '-1'){
return "background: #a7a6a6"; return "background: #fe1a1a";
}else if(type == '0'){ }else if(type == '0'){
return "background: #1c84c6"; return "background: #c6c209";
}else if(type == '1'){ }else if(type == '1'){
return "background: #18a689"; return "background: #18a689";
} }

View File

@ -282,11 +282,11 @@
function classFun(type){ function classFun(type){
if(type == '0'){ if(type == '0'){
return "background: #a7a6a6"; return "background: #fe1a1a";
}else if(type == '1'){ }else if(type == '1'){
return "background: #18a689"; return "background: #c6c209";
}else if(type == '2'){ }else if(type == '2'){
return "background: #6583f8"; return "background: #18a689";
} }
} }

View File

@ -13,8 +13,8 @@
<a-form-item label="测验类型"> <a-form-item label="测验类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.flag"> <a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.flag">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option value="-1">提交</a-select-option> <a-select-option value="-1">答卷</a-select-option>
<a-select-option value="0">已提交</a-select-option> <a-select-option value="0">待批卷</a-select-option>
<a-select-option value="1">已完成</a-select-option> <a-select-option value="1">已完成</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@ -51,7 +51,7 @@
</a-col> </a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;"> <a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='-1'">答卷</a-button> <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='-1'">答卷</a-button>
<a-button type="primary" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='0'" disabled>正在批卷</a-button> <a-button type="primary" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);color:#ffffff;" v-if="item.flag=='0'" disabled>正在批卷</a-button>
<a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='1'">查看答卷</a-button> <a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='1'">查看答卷</a-button>
</a-col> </a-col>
</a-row> </a-row>
@ -184,9 +184,9 @@
function classFun(type){ function classFun(type){
if(type == '-1'){ if(type == '-1'){
return "background: #a7a6a6"; return "background: #fe1a1a";
}else if(type == '0'){ }else if(type == '0'){
return "background: #1c84c6"; return "background: #c6c209";
}else if(type == '1'){ }else if(type == '1'){
return "background: #18a689"; return "background: #18a689";
} }

View File

@ -127,6 +127,7 @@ const isShow = ref<boolean>(false);
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
const tiganData = ref<any>([]); const tiganData = ref<any>([]);
const tmxxPar = ref<any>({}); const tmxxPar = ref<any>({});
const wjLeixing = ref<string>('');
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
@ -140,6 +141,7 @@ function addTigan(type){
mainId:mainId, mainId:mainId,
wjTitle:null, wjTitle:null,
wjScore:null, wjScore:null,
wjLeixing,
// itemSelected:'1', // itemSelected:'1',
wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}], wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}],
} }
@ -152,6 +154,7 @@ function addTigan(type){
mainId:mainId, mainId:mainId,
wjTitle:null, wjTitle:null,
wjScore:null, wjScore:null,
wjLeixing,
// itemSelected:['1'], // itemSelected:['1'],
wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}], wjxWjxxTmxxList:[{itemTitle:null,itemIndex:'1'},{itemTitle:null,itemIndex:'2'}],
} }
@ -164,6 +167,7 @@ function addTigan(type){
mainId:mainId, mainId:mainId,
wjTitle:null, wjTitle:null,
wjScore:null, wjScore:null,
wjLeixing,
wjAnswer:null, wjAnswer:null,
} }
list.push(params); list.push(params);
@ -195,6 +199,7 @@ function getType(value,type){
} }
// //
function edit(record,type){ function edit(record,type){
wjLeixing.value=type;
tiganData.value = []; tiganData.value = [];
title.value = record.title; title.value = record.title;
mainId.value = record.id; mainId.value = record.id;

View File

@ -5,26 +5,21 @@ import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{
title: '题目编号',
align:"center",
dataIndex: 'wjIndex'
},
{ {
title: '问题标题', title: '问题标题',
align:"center", align:"center",
dataIndex: 'wjTitle' dataIndex: 'wjTitle'
}, },
{
title: '是否必填',
align:"center",
dataIndex: 'isRequir'
},
{ {
title: '问题分值', title: '问题分值',
align:"center", align:"center",
dataIndex: 'wjScore' dataIndex: 'wjScore'
}, },
{
title: '是否公有',
align:"center",
dataIndex: 'wjSytype_dictText'
},
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -62,21 +57,21 @@ export const formSchema: FormSchema[] = [
//子表单数据 //子表单数据
//子表表格配置 //子表表格配置
export const wjxWjxxTmxxColumns: JVxeColumn[] = [ export const wjxWjxxTmxxColumns: JVxeColumn[] = [
// {
// title: '选项编号',
// key: 'itemIndex',
// type: JVxeTypes.inputNumber,
// width:"200px",
// placeholder: '请输入${title}',
// defaultValue:'',
// validateRules: [
// { required: true, message: '${title}不能为空' },
// ],
// },
{ {
title: '选项编号', title: '选项',
key: 'itemIndex',
type: JVxeTypes.inputNumber,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
validateRules: [
{ required: true, message: '${title}不能为空' },
],
},
{
title: '选项标题',
key: 'itemTitle', key: 'itemTitle',
type: JVxeTypes.input, type: JVxeTypes.text,
width:"200px", width:"200px",
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue:'', defaultValue:'',
@ -87,7 +82,7 @@ export const wjxWjxxTmxxColumns: JVxeColumn[] = [
{ {
title: '正确答案', title: '正确答案',
key: 'itemSelected', key: 'itemSelected',
type: JVxeTypes.input, type: JVxeTypes.text,
width:"200px", width:"200px",
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue:'', defaultValue:'',

View File

@ -2,22 +2,22 @@
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<a-form v-bind="formItemLayout"> <a-form v-bind="formItemLayout">
<a-row> <a-row>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="题目编号" v-bind="validateInfos.wjIndex"> <a-form-item label="题目编号" v-bind="validateInfos.wjIndex">
<a-input-number v-model:value="formData.wjIndex" placeholder="请输入题目编号" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.wjIndex" placeholder="请输入题目编号" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="24"> <a-col :span="12">
<a-form-item label="问题标题" v-bind="validateInfos.wjTitle"> <a-form-item label="问题标题" v-bind="validateInfos.wjTitle">
<a-input v-model:value="formData.wjTitle" placeholder="请输入问题标题" :disabled="disabled"></a-input> <a-input v-model:value="formData.wjTitle" placeholder="请输入问题标题" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <!-- <a-col :span="24">
<a-form-item label="是否必填" v-bind="validateInfos.isRequir"> <a-form-item label="是否必填" v-bind="validateInfos.isRequir">
<a-input v-model:value="formData.isRequir" placeholder="请输入是否必填" :disabled="disabled"></a-input> <a-input v-model:value="formData.isRequir" placeholder="请输入是否必填" :disabled="disabled"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="24"> <a-col :span="12">
<a-form-item label="问题分值" v-bind="validateInfos.wjScore"> <a-form-item label="问题分值" v-bind="validateInfos.wjScore">
<a-input-number v-model:value="formData.wjScore" placeholder="请输入问题分值" style="width: 100%" :disabled="disabled"/> <a-input-number v-model:value="formData.wjScore" placeholder="请输入问题分值" style="width: 100%" :disabled="disabled"/>
</a-form-item> </a-form-item>
@ -39,7 +39,7 @@
:disabled="disabled" :disabled="disabled"
:rowNumber="true" :rowNumber="true"
:rowSelection="true" :rowSelection="true"
:toolbar="true"/> :toolbar="false"/>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-spin> </a-spin>
@ -80,9 +80,7 @@
const activeKey = ref('wjxWjxxTmxx'); const activeKey = ref('wjxWjxxTmxx');
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
wjIndex: '',
wjTitle: '', wjTitle: '',
isRequir: '',
wjScore: '', wjScore: '',
}); });

View File

@ -120,11 +120,11 @@
function classFun(record){ function classFun(record){
if(record.score){ if(record.score){
return "background: #1f77f8";
}else if(record.stuFilePath){
return "background: #18a689"; return "background: #18a689";
}else if(record.stuFilePath){
return "background: #c6c209";
}else{ }else{
return "background: #ff0000"; return "background: #fe1a1a";
} }
} }
function callText(record){ function callText(record){

View File

@ -125,11 +125,11 @@ import dayjs from 'dayjs';
function classFun(type){ function classFun(type){
if(type == '0'){ if(type == '0'){
return "background: #a7a6a6"; return "background: #fe1a1a";
}else if(type == '1'){ }else if(type == '1'){
return "background: #18a689"; return "background: #c6c209";
}else if(type == '2'){ }else if(type == '2'){
return "background: #6583f8"; return "background: #18a689";
} }
} }
/** /**