修改页面

This commit is contained in:
yangjun 2024-10-15 18:21:39 +08:00
parent 8facf418eb
commit 0d42134f8c
11 changed files with 749 additions and 231 deletions

View File

@ -10,8 +10,10 @@
<a-col :span="24" style="text-align: center"> <a-col :span="24" style="text-align: center">
<span class="title">{{ zyInfo.title }}</span> <span class="title">{{ zyInfo.title }}</span>
</a-col> </a-col>
<a-col :span="24" style="text-align: right;"> <a-col :span="24" style="text-align: right">
<span style=" color: #999">开始时间</span><span style="color:#666;">{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }}</span> ~ <span style=" color: #999; ">结束时间</span><span style="color:#666; margin-right:20px">{{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }}</span> <span style="color: #999">开始时间</span><span style="color: #666">{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }}</span> ~
<span style="color: #999">结束时间</span
><span style="color: #666; margin-right: 20px">{{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }}</span>
</a-col> </a-col>
<a-col :span="24" style="margin-top: 10px"> <a-col :span="24" style="margin-top: 10px">
<div style="display: flex"> <div style="display: flex">
@ -29,18 +31,27 @@
> >
</div> </div>
</a-col> </a-col>
<a-col :span="24" style="margin-top: 10px; text-align: right;"> <a-col :span="24" style="margin-top: 10px; text-align: right">
<a-switch style=" margin-right:20px;" checkedChildren="统计" unCheckedChildren="图表" v-model:checked="twoShowType" /> <a-switch style="margin-right: 20px" checkedChildren="统计" unCheckedChildren="图表" v-model:checked="twoShowType" />
</a-col> </a-col>
<a-col :span="23.5" style="margin:10px 20px;" v-if="twoShowType"> <a-col :span="23.5" style="margin: 10px 20px" v-if="twoShowType">
<a-collapse accordion expandIconPosition="right"> <a-collapse accordion expandIconPosition="right">
<a-collapse-panel :key="index" v-for="(item, index) in zyInfo.tmlbList"> <a-collapse-panel :key="index" v-for="(item, index) in zyInfo.tmlbList">
<template #header> <template #header>
<a-row :span="24" style="width: 90%"> <a-row :span="24" style="width: 90%">
<a-col :span="24" class="title2">{{ item.wjTitle }}</a-col> <a-col :span="24" class="title2">{{ item.wjTitle }}</a-col>
<a-col :span="8" style="color:#909399;display:flex;flex-direction: column; text-align: left;font-size:12px;"><span style="font-weight: bold;font-size:20px; margin-left:5px;">{{ item.yzd }}</span>已作答人数</a-col> <a-col :span="8" style="color: #909399; display: flex; flex-direction: column; text-align: left; font-size: 12px"
<a-col :span="8" style="color:#1ab394;display:flex;flex-direction: column; text-align: left;font-size:12px;"><span style="font-weight: bold;font-size:20px; margin-left:5px;">{{ item.ddrs }}</span>答对人数</a-col> ><span style="font-weight: bold; font-size: 20px; margin-left: 5px">{{ item.yzd }}</span
<a-col :span="8" style="color:#f56c6c;display:flex;flex-direction: column; text-align: left; font-size:12px;"><span style="font-weight: bold;font-size:20px; margin-left:5px;">{{ item.dcrs }}</span>答错人数</a-col> >已作答人数</a-col
>
<a-col :span="8" style="color: #1ab394; display: flex; flex-direction: column; text-align: left; font-size: 12px"
><span style="font-weight: bold; font-size: 20px; margin-left: 5px">{{ item.ddrs }}</span
>{{ item.wjType == '8' ? '已批阅人数' : '答对人数' }}</a-col
>
<a-col :span="8" style="color: #f56c6c; display: flex; flex-direction: column; text-align: left; font-size: 12px"
><span style="font-weight: bold; font-size: 20px; margin-left: 5px">{{ item.dcrs }}</span
>{{ item.wjType != '8' ? '未批阅人数' : '答错人数' }}</a-col
>
</a-row> </a-row>
</template> </template>
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3"> <div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3">
@ -100,14 +111,33 @@
</template> </template>
</a-card> </a-card>
</div> </div>
<!-- 文件题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8">
<!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> -->
<!-- <span class="tjfx-zql">正确率15%</span> -->
<a-card>
<template #title>
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
<!-- <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> -->
<!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> -->
</template>
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
</a-card>
</div>
<div v-else> 无对应类型 </div> <div v-else> 无对应类型 </div>
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
</a-col> </a-col>
<!-- 图表 --> <!-- 图表 -->
<a-col :span="23.5" style="margin: 10px 20px" v-if="!twoShowType">
<a-col :span="23.5" style="margin:10px 20px;" v-if="!twoShowType">
<a-collapse accordion expandIconPosition="right"> <a-collapse accordion expandIconPosition="right">
<a-collapse-panel :key="index" v-for="(item, index) in zyInfo.tmlbList"> <a-collapse-panel :key="index" v-for="(item, index) in zyInfo.tmlbList">
<template #header> <template #header>
@ -161,6 +191,7 @@ import Pie from '/@/components/chart/Pie.vue';
import BarMulti from '/@/components/chart/BarMulti.vue'; import BarMulti from '/@/components/chart/BarMulti.vue';
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'; import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
// //
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
@ -183,26 +214,42 @@ const pieOption = {
}; };
function getPieData(item) { function getPieData(item) {
console.log('👨‍🔧', item); console.log('👩', item);
if(item.wjType == 8){
const pieData = [
{ value: parseInt(item.ddrs), name: '已批阅人数' },
{ value: parseInt(item.dcrs), name: '未批阅人数' },
];
return pieData;
}else{
const pieData = [ const pieData = [
{ value: parseInt(item.ddrs), name: '答对人数' }, { value: parseInt(item.ddrs), name: '答对人数' },
{ value: parseInt(item.dcrs), name: '答错人数' }, { value: parseInt(item.dcrs), name: '答错人数' },
]; ];
return pieData; return pieData;
}
} }
function getBarData(item) { function getBarData(item) {
if(item.wjType == 8){
const barMultiData = [
{ value: parseInt(item.yzd), name: '作答人数' },
{ value: parseInt(item.ddrs), name: '已批阅人数' },
{ value: parseInt(item.dcrs), name: '未批阅人数' },
];
return barMultiData;
}else{
const barMultiData = [ const barMultiData = [
{ value: parseInt(item.yzd), name: '作答人数' }, { value: parseInt(item.yzd), name: '作答人数' },
{ value: parseInt(item.ddrs), name: '答对人数' }, { value: parseInt(item.ddrs), name: '答对人数' },
{ value: parseInt(item.dcrs), name: '答错人数' }, { value: parseInt(item.dcrs), name: '答错人数' },
]; ];
return barMultiData; return barMultiData;
}
} }
function reloadZy() { function reloadZy() {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/queryCyjgById', params: { id: cyid } }).then((res) => { defHttp.get({ url: '/wjxWjxx/wjxWjxx/queryCyjgById', params: { id: cyid } }).then((res) => {
console.log('🚶‍♂️', res);
zyInfo.value = res; zyInfo.value = res;
}); });
} }
@ -217,18 +264,12 @@ function handleDjjgs(record: Recordable, flag) {
onMounted(() => { onMounted(() => {
reloadZy(); reloadZy();
intervalId = setInterval(() => { intervalId = setInterval(() => {
// aaaaa.value++;
console.log('🤯1111111111111111111', aaaaa.value);
// //
reloadZy(); reloadZy();
if (zyInfo.value.xkrs == zyInfo.value.ywcrs) { if (zyInfo.value.xkrs == zyInfo.value.ywcrs) {
clear(); clear();
} }
// if (aaaaa.value == 3) { }, 15000);
// console.log('2222222222222222222', aaaaa.value);
// clear();
// }
}, 5000);
}); });
function clear() { function clear() {
@ -418,7 +459,7 @@ function clear() {
font-weight: bold; font-weight: bold;
} }
.tjfx-line { .tjfx-line {
width:33%; width: 33%;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -239,6 +239,7 @@
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
</template> </template>
<j-upload v-model:value="item.picPath" text="上传图片" fileType="image" :maxCount="9" :disabled="!isShow"></j-upload>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
</a-row> </a-row>
@ -324,6 +325,7 @@
v-if="!editDisabled" v-if="!editDisabled"
/></a-tooltip> /></a-tooltip>
</template> </template>
<j-upload v-model:value="item.picPath" text="上传图片" fileType="image" :maxCount="9" :disabled="!isShow"></j-upload>
<a-row v-if="isShow"> <a-row v-if="isShow">
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col> <a-col :span="24" style="color: darkgrey; font-size: 13px"> 选中即为正确答案 </a-col>
</a-row> </a-row>
@ -411,6 +413,13 @@
/></a-tooltip> /></a-tooltip>
</template> </template>
<a-row v-if="isShow"> <a-row v-if="isShow">
<j-upload
v-model:value="item.picPath"
text="上传图片"
fileType="image"
:maxCount="9"
:disabled="!isShow"
></j-upload>
<a-col :span="24"> <a-col :span="24">
<a-textarea <a-textarea
placeholder="请填写答案" placeholder="请填写答案"
@ -491,7 +500,7 @@
/></a-tooltip> /></a-tooltip>
<!-- <JUpload ref="uploadRef" /> --> <!-- <JUpload ref="uploadRef" /> -->
</template> </template>
<j-upload v-model:value="item.picPath" fileType="image" maxCount="9"></j-upload> <j-upload v-model:value="item.picPath" text="上传图片" fileType="image" :maxCount="9" :disabled="!isShow"></j-upload>
</a-card> </a-card>
</div> </div>
@ -633,6 +642,27 @@
</template> </template>
</a-card> </a-card>
</div> </div>
<!-- 文件题 -->
<div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 8">
<!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> -->
<!-- <span class="tjfx-zql">正确率15%</span> -->
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<!-- <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数{{ item.num }}</span>
<span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数{{ item.num2 }}</span> -->
</template>
<template #extra v-if="zyInfo.atype == 6">
<span class="question-type" style="margin-left: 40px">文件题</span>
<span style="margin-left: 40px"
>题目分值<span class="answer-word"> {{ item.wjScore }}</span> </span
>
</template>
<j-upload v-model:value="item.picPath" fileType="image" :max-count="1" disabled :buttonVisible="false"></j-upload>
</a-card>
</div>
<div v-else> 无对应类型 </div> <div v-else> 无对应类型 </div>
</div> </div>
</a-col> </a-col>
@ -1155,9 +1185,9 @@ async function importDrtmXls(data, url) {
} }
}; };
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn }); await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
console.log('22222222222222222222222',zyInfo.value); console.log('22222222222222222222222', zyInfo.value);
handleEdit(zyInfo.value, false); handleEdit(zyInfo.value, false);
importOpen.value = false importOpen.value = false;
} }
/** /**
* 导入xls * 导入xls
@ -1202,9 +1232,7 @@ async function importXls(data, url) {
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn }); await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
} }
function handleWxtx(record) { function handleWxtx(record) {
createConfirm({ createConfirm({
iconType: 'warning', iconType: 'warning',
title: '微信提醒', title: '微信提醒',
@ -1333,6 +1361,7 @@ function handleJscjbfb() {
// //
function handleYytkSuccess(record) { function handleYytkSuccess(record) {
console.log('💇‍♀️', record);
for (var i = 0; i < record.length; i++) { for (var i = 0; i < record.length; i++) {
var type = record[i].wjType; var type = record[i].wjType;
var list = tiganData.value; var list = tiganData.value;
@ -1360,6 +1389,7 @@ function handleYytkSuccess(record) {
wjLeixing, wjLeixing,
itemSelected: sfxz + '', itemSelected: sfxz + '',
wjSfqh: '0', wjSfqh: '0',
picPath: record[i].picPath,
wjxWjxxTmxxList: addwjxWjxxTmxxList, wjxWjxxTmxxList: addwjxWjxxTmxxList,
}; };
list.push(params); list.push(params);
@ -1385,6 +1415,7 @@ function handleYytkSuccess(record) {
wjLeixing, wjLeixing,
itemSelected: sfxz, itemSelected: sfxz,
wjSfqh: '0', wjSfqh: '0',
picPath: record[i].picPath,
wjxWjxxTmxxList: addwjxWjxxTmxxList, wjxWjxxTmxxList: addwjxWjxxTmxxList,
}; };
list.push(params); list.push(params);
@ -1403,6 +1434,25 @@ function handleYytkSuccess(record) {
wjLeixing, wjLeixing,
wjAnswer: huida, wjAnswer: huida,
wjSfqh: '0', wjSfqh: '0',
picPath: record[i].picPath
};
list.push(params);
tiganData.value = [...list];
} else if (type == 8) {
var huida = record[i].wjAnswer;
if (wjLeixing.value == '1') {
huida = '';
}
let params = {
wjType: parseInt(type),
wjIndex: list.length + 1,
mainId: mainId,
wjTitle: record[i].wjTitle,
wjScore: record[i].wjScore,
wjLeixing,
wjAnswer: huida,
wjSfqh: '0',
picPath: record[i].picPath
}; };
list.push(params); list.push(params);
tiganData.value = [...list]; tiganData.value = [...list];

View File

@ -3,6 +3,9 @@
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24">
<a-button type="primary" @click="handleZgtpf">主观题评分</a-button>
</a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item label="学生姓名"> <a-form-item label="学生姓名">
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input> <a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input>
@ -35,120 +38,141 @@
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" > <BasicTable @register="registerTable">
<!--操作栏--> <!--操作栏-->
<template #action="{ record }" > <template #action="{ record }">
<TableAction :actions="getTableAction(record)"/> <TableAction :actions="getTableAction(record)" />
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal> <WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="reload"></WjxWjxxTmlbDjjgModal>
<ZgtpfModal ref="ZgtpfModalPage" @success="reload"></ZgtpfModal>
</div> </div>
</template> </template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup> <script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue'; import { ref, reactive, defineExpose, unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './WjxWjxxTmlbDjjgs.data'; import { columns } from './WjxWjxxTmlbDjjgs.data';
import { list,getExportUrl } from './WjxWjxxTmlbDjjgs.api'; import { list, getExportUrl } from './WjxWjxxTmlbDjjgs.api';
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue' import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue';
import ZgtpfModal from '/@/views/kc/wjxWjxx/components/ZgtpfModal.vue';
const queryParam = ref<any>({}); const queryParam = ref<any>({});
const isFinished = ref<string>(''); const isFinished = ref<string>('');
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
const WjxWjxxTmlbDjjgModalPage = ref(); const WjxWjxxTmlbDjjgModalPage = ref();
//table const ZgtpfModalPage = ref();
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const sjxxInfo = ref<any>({});
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
title: '', title: '',
api: list, api: list,
columns, columns,
canResize:false, canResize: false,
useSearchForm: false, useSearchForm: false,
actionColumn: { actionColumn: {
width: 120, width: 220,
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
params.column = '',params.order = '';// (params.column = ''), (params.order = ''); //
return Object.assign(params, queryParam.value); return Object.assign(params, queryParam.value);
}, },
}, },
exportConfig: { exportConfig: {
name: "学生测验信息", name: '学生测验信息',
url: getExportUrl, url: getExportUrl,
params: () => { params: () => {
return Object.assign({},queryParam.value); return Object.assign({}, queryParam.value);
}
}, },
}); },
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; });
const labelCol = reactive({ const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 }, sm: { span: 7 },
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 16 }, sm: { span: 16 },
}); });
/** /**
* 答卷详情 * 答卷详情
*/ */
function handlePeizhiDjjg(record: Recordable) { function handlePeizhiDjjg(record: Recordable) {
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true; WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgModalPage.value.edit(record.id,false); WjxWjxxTmlbDjjgModalPage.value.edit(record.id, false);
} }
/** function handleZgypf(record: Recordable) {
ZgtpfModalPage.value.disableSubmit = true;
ZgtpfModalPage.value.edit(record, false);
}
function handleZgtpf() {
console.log('👩‍🦰', sjxxInfo);
console.log('👩‍🦰', sjxxInfo.value.vid);
ZgtpfModalPage.value.disableSubmit = true;
ZgtpfModalPage.value.edit({vid:sjxxInfo.value.vid}, false);
}
/**
* 操作栏 * 操作栏
*/ */
function getTableAction(record) { function getTableAction(record) {
if(record.commitTime != null && record.commitTime != ''){ if (record.commitTime != null && record.commitTime != '') {
return [ return [
{ {
label: '答卷结果', label: '答卷结果',
onClick: handlePeizhiDjjg.bind(null, record), onClick: handlePeizhiDjjg.bind(null, record),
} },
] {
}else{ label: '主观题评分',
onClick: handleZgypf.bind(null, record),
ifShow: record.sfxysdpy == 1,
},
];
} else {
return []; return [];
} }
}
} function init(record, flag) {
console.log('👨‍🦲', record);
function init(record,flag){ sjxxInfo.value = record;
queryParam.value.id = record.id; queryParam.value.id = record.id;
queryParam.value.rwbh = record.rwbh; queryParam.value.rwbh = record.rwbh;
queryParam.value.isFinished = flag; queryParam.value.isFinished = flag;
isFinished.value = flag; isFinished.value = flag;
reload(); reload();
} }
defineExpose({
init
});
defineExpose({
init,
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;
white-space: nowrap; white-space: nowrap;
} }
.query-group-cust{ .query-group-cust {
width: calc(50% - 15px); width: calc(50% - 15px);
min-width: 100px !important; min-width: 100px !important;
} }
.query-group-split-cust{ .query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center;
}
} }
}
</style> </style>

View File

@ -21,6 +21,9 @@
<a-card> <a-card>
<template #title> <template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
<div v-if="item.picPath">
<j-upload v-model:value="item.picPath" fileType="image" disabled :maxCount="item.picPath.split(',').length" :buttonVisible="true" ></j-upload>
</div>
</template> </template>
<template #extra> <template #extra>
<span style="margin-left: 40px" v-if="isShow" <span style="margin-left: 40px" v-if="isShow"
@ -42,6 +45,9 @@
<a-card> <a-card>
<template #title> <template #title>
<span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" /> <span>{{ index + 1 }}</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload v-model:value="item.picPath" fileType="image" disabled :maxCount="item.picPath.split(',').length" :buttonVisible="true" ></j-upload>
</div>
</template> </template>
<template #extra> <template #extra>
<span style="margin-left: 40px" v-if="isShow" <span style="margin-left: 40px" v-if="isShow"
@ -66,6 +72,9 @@
<template #title> <template #title>
<span>{{ index + 1 }}</span <span>{{ index + 1 }}</span
><span v-html="item.wjTitle" style="font-weight: bold; white-space: pre-wrap; word-wrap: break-word" /> ><span v-html="item.wjTitle" style="font-weight: bold; white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload v-model:value="item.picPath" fileType="image" disabled :maxCount="item.picPath.split(',').length" :buttonVisible="true" ></j-upload>
</div>
</template> </template>
<template #extra> <template #extra>
<span style="margin-left: 40px" v-if="isShow" <span style="margin-left: 40px" v-if="isShow"
@ -92,6 +101,9 @@
<template #title> <template #title>
<span>{{ index + 1 }}</span <span>{{ index + 1 }}</span
><span v-html="item.wjTitle" style="font-weight: bold; white-space: pre-wrap; word-wrap: break-word" /> ><span v-html="item.wjTitle" style="font-weight: bold; white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload v-model:value="item.picPath" fileType="image" disabled :maxCount="item.picPath.split(',').length" :buttonVisible="true" ></j-upload>
</div>
</template> </template>
<template #extra> <template #extra>
<span style="margin-left: 40px" v-if="isShow" <span style="margin-left: 40px" v-if="isShow"
@ -100,19 +112,13 @@
</template> </template>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-image
:width="200"
:height="200"
:src="picPathItem"
v-for="(picPathItem, index) in item.picPath.split(',')"
/>
<j-upload v-model:value="item.picPath" fileType="image" disabled :maxCount="item.picPath.split(',').length" :buttonVisible="true" ></j-upload>
<!-- -{{item.picPath.split(',')}}- --> <!-- -{{item.picPath.split(',')}}- -->
<!-- <JImageUpload v-model:value="item.picPath" disabled></JImageUpload> --> <!-- <JImageUpload v-model:value="item.picPath" disabled></JImageUpload> -->
<!-- <j-image-upload v-model:value="item.picPath" :disabled="disabled"></j-image-upload> --> <!-- <j-image-upload v-model:value="item.picPath" :disabled="disabled"></j-image-upload> -->
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<j-upload v-model:value="item.wjAnswer" :disabled="disabled" ></j-upload> <j-upload v-model:value="item.wjAnswer" :max-count="1" :disabled="disabled" accept=".doc,.docx,.pdf,.jpg,.jpeg,.png,.mp3,.mp4,.zip,.ppt,.rar,.excel" ></j-upload>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>

View File

@ -1,57 +1,84 @@
<template> <template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-row style="height: calc(80vh)">
<a-row style="height: calc(80vh);"> <a-col :span="24" style="overflow-y: scroll; height: calc(80vh)">
<a-col :span="24" style="overflow-y: scroll;height: calc(80vh);"> <div style="text-align: center; width: 100%; font-weight: bold; font-size: 20px; padding: 20px">{{ djxxData.title }}</div>
<div style="text-align: center;width: 100%;font-weight: bold;font-size: 20px;padding: 20px;">{{ djxxData.title }}</div> <div style="text-align: right; font-size: 16px; padding-right: 20px">
<div style="text-align: right;font-size: 16px;padding-right: 20px;">
<span class="answer-title">答卷人</span><span class="answer-info">{{ djxxData.userName }} </span> <span class="answer-title">答卷人</span><span class="answer-info">{{ djxxData.userName }} </span>
<span v-if="djxxData.atype == 6" class="answer-title">总分:</span><span class="answer-info">{{ djxxData.totalScore }} </span> <!-- <span v-if="djxxData.atype == 6" class="answer-title">总分:</span><span class="answer-info">{{ djxxData.totalScore }} </span> -->
<span v-if="djxxData.atype == 6" class="answer-title">得分:</span><span class="answer-info">{{ djxxData.score }} </span> <span v-if="djxxData.atype == 6" class="answer-title">得分:</span><span class="answer-info">{{ djxxData.score }} </span>
<span class="answer-title">用时</span><span class="answer-info">{{djxxData.answerSfm}} </span> <span class="answer-title">用时</span><span class="answer-info">{{ djxxData.answerSfm }} </span>
</div> </div>
<!-- 题干信息 --> <!-- 题干信息 -->
<div style="width:100%;" v-for="(item,index) in tiganData" :key="index"> <div style="width: 100%" v-for="(item, index) in tiganData" :key="index">
<!-- 单选题 --> <!-- 单选题 -->
<div style="width:92%; margin:0 auto" v-if="item.wjType==3"> <div style="width: 92%; margin: 0 auto" v-if="item.wjType == 3">
<div style="text-align: left;width: 100%;font-weight: bold;font-size: 18px;padding: 20px;">单选题</div> <div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px; padding: 20px">单选题</div>
<a-card> <a-card>
<template #title> <template #title>
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word"></span> <span>{{ index + 1 }}</span><span v-html:value="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
<div v-if="item.picPath">
<j-upload
v-model:value="item.picPath"
fileType="image"
disabled
:maxCount="item.picPath.split(',').length"
:buttonVisible="false"
></j-upload>
</div>
</template> </template>
<template #extra v-if="djxxData.atype == 6"> <template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px;">题目分值<span class="answer-word"> {{item.wjScore}}</span> </div> <div style="margin-left: 40px"
<div style="margin-left: 40px;">所得分值<span class="answer-word"> {{item.itemScore}}</span> </div> >题目分值<span class="answer-word"> {{ item.wjScore }}</span> </div
>
<div style="margin-left: 40px"
>所得分值<span class="answer-word"> {{ item.itemScore }}</span> </div
>
</template> </template>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<div style="width: 100%" v-for="(tmxx,index) in item.wjxWjxxTmxxList"> <div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList">
<a-radio :value="tmxx.itemIndex+``" style="width: 100%;margin-bottom: 5px;"> <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
<span v-html:value="tmxx.itemTitle" style="width:80%;font-size: 16px;color:#000;"></span> <span v-html:value="tmxx.itemTitle" style="width: 80%; font-size: 16px; color: #000"></span>
<span v-if="tmxx.itemSelected == 'true'" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(此选项是正确答案)</span> <span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(此选项是正确答案)</span>
</a-radio> </a-radio>
</div> </div>
</a-radio-group> </a-radio-group>
</a-card> </a-card>
</div> </div>
<!-- 多选题 --> <!-- 多选题 -->
<div style="width:92%; margin:0 auto" v-else-if="item.wjType==4"> <div style="width: 92%; margin: 0 auto" v-else-if="item.wjType == 4">
<div style="text-align: left;width: 100%;font-weight: bold;font-size: 18px;padding: 20px;">多选题</div> <div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px; padding: 20px">多选题</div>
<a-card > <a-card>
<template #title> <template #title>
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word"/> <span>{{ index + 1 }}</span><span v-html:value="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload
v-model:value="item.picPath"
fileType="image"
disabled
:maxCount="item.picPath.split(',').length"
:buttonVisible="false"
></j-upload>
</div>
</template> </template>
<template #extra v-if="djxxData.atype == 6"> <template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px;">题目分值<span class="answer-word"> {{item.wjScore}} </span> </div> <div style="margin-left: 40px"
<div style="margin-left: 40px;">所得分值<span class="answer-word"> {{item.itemScore}}</span> </div> >题目分值<span class="answer-word"> {{ item.wjScore }} </span> </div
>
<div style="margin-left: 40px"
>所得分值<span class="answer-word"> {{ item.itemScore }}</span> </div
>
</template> </template>
<!-- -{{item.itemSelected}}- --> <!-- -{{item.itemSelected}}- -->
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled> <a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
<a-row> <a-row>
<a-col :span="24" v-for="(tmxx,index) in item.wjxWjxxTmxxList"> <a-col :span="24" v-for="(tmxx, index) in item.wjxWjxxTmxxList">
<!-- -{{tmxx}}- --> <!-- -{{tmxx}}- -->
<a-checkbox :value="tmxx.itemIndex" style="width: 100%;margin-bottom: 5px;"> <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
<span v-html:value="tmxx.itemTitle" style="width:80%;font-size: 16px;color:#000;"></span> <span v-html:value="tmxx.itemTitle" style="width: 80%; font-size: 16px; color: #000"></span>
<span v-if="tmxx.itemSelected == 'true'" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(此选项是正确答案)</span> <span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(此选项是正确答案)</span>
</a-checkbox> </a-checkbox>
</a-col> </a-col>
</a-row> </a-row>
@ -59,16 +86,30 @@
</a-card> </a-card>
</div> </div>
<!-- 填空题 --> <!-- 填空题 -->
<div style="width:92%; margin:0 auto" v-else-if="item.wjType==5"> <div style="width: 92%; margin: 0 auto" v-else-if="item.wjType == 5">
<div style="text-align: left;width: 100%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</div> <div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px; padding: 20px">填空题</div>
<a-card > <a-card>
<template #title> <template #title>
<span>{{index+1}}</span><span v-html:value="item.wjTitle" style="white-space:pre-wrap;word-wrap : break-word" /> <span>{{ index + 1 }}</span><span v-html:value="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<span v-if="item.tktda" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(正确答案:{{item.tktda}})</span> <span v-if="item.tktda" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.tktda }})</span>
<div v-if="item.picPath">
<j-upload
v-model:value="item.picPath"
fileType="image"
disabled
:maxCount="item.picPath.split(',').length"
:buttonVisible="false"
></j-upload>
</div>
</template> </template>
<template #extra v-if="djxxData.atype == 6"> <template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px;">题目分值<span class="answer-word">{{item.wjScore}}</span> </div> <div style="margin-left: 40px"
<div style="margin-left: 40px;">所得分值<span class="answer-word">{{item.itemScore}}</span> </div> >题目分值<span class="answer-word">{{ item.wjScore }}</span> </div
>
<div style="margin-left: 40px"
>所得分值<span class="answer-word">{{ item.itemScore }}</span> </div
>
</template> </template>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
@ -78,9 +119,49 @@
</a-row> </a-row>
</a-card> </a-card>
</div> </div>
<div v-else> <!-- 文件题 -->
无对应类型 <div style="width: 92%; margin: 0 auto" v-else-if="item.wjType == '8'">
<div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px; padding: 20px">文件题</div>
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html:value="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload
v-model:value="item.picPath"
fileType="image"
disabled
:maxCount="item.picPath.split(',').length"
:buttonVisible="false"
></j-upload>
</div> </div>
<!-- <span v-if="item.tktda" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(正确答案:{{item.tktda}})</span> -->
</template>
<template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px"
>题目分值<span class="answer-word">{{ item.wjScore }}</span> </div
>
<div style="margin-left: 40px"
>所得分值<span class="answer-word">{{ item.itemScore?item.itemScore:'待评' }}</span> </div
>
</template>
<a-row>
<a-col :span="24">
<div v-if="item.answerText">
<j-upload
v-model:value="item.answerText"
disabled
:buttonVisible="false"
></j-upload>
</div>
<!-- <span v-html="item.answerText"></span> -->
<!-- <a-textarea v-model:value="item.answerText" style="width:100%;" :auto-size="{ minRows: 2, maxRows: 5 }" disabled/> -->
</a-col>
</a-row>
</a-card>
</div>
<div v-else> 无对应类型 </div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -92,12 +173,8 @@ import { ref, nextTick, defineExpose } from 'vue';
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
queryWjxWjxxTmxxListByMainId, import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate, djtj } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
queryDataById,
saveOrUpdate,
djtj
} from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
const title = ref<string>(''); const title = ref<string>('');
const mainId = ref<string>(''); const mainId = ref<string>('');
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
@ -108,39 +185,39 @@ const { createMessage } = useMessage();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
// //
function edit(id){ function edit(id) {
tiganData.value = []; tiganData.value = [];
mainId.value = id; mainId.value = id;
defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:id}}).then(res =>{ defHttp.get({ url: '/wjxDjxx/queryByMainId', params: { id: id } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res) console.log(`🚀 ~ defHttp.get ~ res:`, res);
let djxx = res; let djxx = res;
let list = djxx.wjxDjxxTmxxList; let list = djxx.wjxDjxxTmxxList;
for(let i=0;i<list.length;i++){ console.log('🥳11111111111', list);
for (let i = 0; i < list.length; i++) {
let par = list[i]; let par = list[i];
if(par.wjType==4){ if (par.wjType == 4) {
let lssj = par.itemSelected.split(","); let lssj = par.itemSelected.split(',');
const numArray = lssj.map(str => parseInt(str)); const numArray = lssj.map((str) => parseInt(str));
list[i].itemSelected = numArray; list[i].itemSelected = numArray;
} }
} }
tiganData.value = list; tiganData.value = list;
djxxData.value = djxx; djxxData.value = djxx;
}) });
} }
// //
async function submitForm(){ async function submitForm() {
emit('ok'); emit('ok');
} }
defineExpose({ defineExpose({
edit, edit,
submitForm, submitForm,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/span.ant-radio + * { /deep/span.ant-radio + * {
width: 100%; width: 100%;
} }
@ -170,17 +247,17 @@ async function submitForm(){
color: rgb(2, 2, 2); /* 例如,将文本颜色设置为灰色 */ color: rgb(2, 2, 2); /* 例如,将文本颜色设置为灰色 */
cursor: not-allowed; /* 将鼠标指针设置为禁用状态 */ cursor: not-allowed; /* 将鼠标指针设置为禁用状态 */
} }
.answer-title{ .answer-title {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
.answer-info{ .answer-info {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
text-decoration: underline; text-decoration: underline;
margin-right: 15px; margin-right: 15px;
} }
.answer-word{ .answer-word {
color: #ff8710; color: #ff8710;
} }
</style> </style>

View File

@ -27,20 +27,19 @@ export const columns: BasicColumn[] = [
align: "center", align: "center",
dataIndex: 'score', dataIndex: 'score',
width: 80, width: 80,
customRender: ({ text }) => {
console.log('🥴', text)
return parseFloat(text).toFixed(1);
}
},
{
title: '总分',
align: "center",
dataIndex: 'totalScore',
width: 80,
customRender: ({ text }) => { customRender: ({ text }) => {
return parseFloat(text).toFixed(1); return parseFloat(text).toFixed(1);
} }
}, },
// {
// title: '总分',
// align: "center",
// dataIndex: 'totalScore',
// width: 80,
// customRender: ({ text }) => {
// return parseFloat(text).toFixed(1);
// }
// },
{ {
title: '答卷时间', title: '答卷时间',
align: "center", align: "center",

View File

@ -0,0 +1,242 @@
<template>
<a-spin :spinning="confirmLoading">
<a-row style="height: calc(80vh)">
<a-col :span="24" style="overflow-y: scroll; height: calc(80vh)">
<div style="text-align: center; width: 100%; font-weight: bold; font-size: 20px; padding: 20px">{{ djxxData.title }}</div>
<div style="text-align: right; font-size: 16px; padding-right: 20px">
<span class="answer-title">答卷人</span><span class="answer-info">{{ djxxData.userName }} </span>
<!-- <span v-if="djxxData.atype == 6" class="answer-title">总分:</span><span class="answer-info">{{ djxxData.totalScore }} </span> -->
<span v-if="djxxData.atype == 6" class="answer-title">得分:</span><span class="answer-info">{{ djxxData.score }} </span>
<span class="answer-title">用时</span><span class="answer-info">{{ djxxData.answerSfm }} </span>
</div>
<!-- 题干信息 -->
<div style="width: 100%" v-for="(item, index) in tiganData" :key="index">
<!-- 文件题 -->
<div style="width: 92%; margin: 0 auto" v-if="item.wjType == '8'">
<div style="text-align: left; width: 100%; font-weight: bold; font-size: 18px; padding: 20px">文件题</div>
<a-card>
<template #title>
<span>{{ index + 1 }}</span><span v-html:value="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
<div v-if="item.picPath">
<j-upload
v-model:value="item.picPath"
fileType="image"
disabled
:maxCount="item.picPath.split(',').length"
:buttonVisible="false"
></j-upload>
</div>
<!-- <span v-if="item.tktda" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(正确答案:{{item.tktda}})</span> -->
</template>
<template #extra v-if="djxxData.atype == 6">
<div style="margin-left: 40px"
>题目分值<span class="answer-word">{{ item.wjScore }}</span> </div
>
<div style="margin-left: 40px"
>所得分值<span class="answer-word">{{ item.itemScore ? item.itemScore : '待评' }}</span> </div
>
</template>
<a-row>
<a-col :span="18">
<div v-if="item.answerText">
<iframe
id="pdfPreviewIframe"
:src="getUrl(item.answerText)"
frameborder="0"
width="100%"
height="550px"
scrolling="auto"
></iframe>
</div>
<!-- <span v-html="item.answerText"></span> -->
<!-- <a-textarea v-model:value="item.answerText" style="width:100%;" :auto-size="{ minRows: 2, maxRows: 5 }" disabled/> -->
</a-col>
<a-col :span="6">
<div style="text-align: right">
<span>评分</span>
<a-input
placeholder="请输入评分"
v-model:value="item.itemScore2"
style="width: 70%; margin-bottom: 5px; margin-left: 10px"
@change="emitChange(item)"
/>
</div>
</a-col>
</a-row>
</a-card>
</div>
</div>
<div style="text-align: center; margin-top: 20px">
<a-button type="primary" @click="submitForm">保存</a-button>
<a-button type="primary" @click="submitNextForm" style="margin-left: 10px">保存并下一个</a-button>
</div>
</a-col>
</a-row>
</a-spin>
</template>
<script lang="ts" name="wjxWjxx-add" setup>
import { ref, nextTick, defineExpose } from 'vue';
import { Icon } from '/@/components/Icon';
import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate, djtj } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
import { randomString, simpleDebounce, getFileAccessHttpUrl, baseApiUrl } from '/@/utils/common/compUtils';
import { encryptByBase64 } from '/@/utils/cipher';
const title = ref<string>('');
const mainId = ref<string>('');
const confirmLoading = ref<boolean>(false);
const tiganData = ref<any>([]);
const djxxData = ref<any>({});
const infoData = ref<any>({});
const { createMessage } = useMessage();
const emit = defineEmits(['register', 'ok']);
function getUrl(record) {
var file = baseApiUrl + '/' + record;
console.log('👩‍👩‍👧', file);
var url = 'https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file));
return url;
}
//
function edit(record) {
console.log('🙇1111111111111', record);
tiganData.value = [];
infoData.value = record;
defHttp.get({ url: '/wjxDjxx/queryZgtdpf', params: { vid: record.vid, jid: record.jid } }).then((res) => {
console.log('👛', res);
if (res) {
mainId.value = res.id;
let djxx = res;
let list = djxx.wjxDjxxTmxxList;
for (let i = 0; i < list.length; i++) {
let par = list[i];
if (par.wjType == 4) {
let lssj = par.itemSelected.split(',');
const numArray = lssj.map((str) => parseInt(str));
list[i].itemSelected = numArray;
}
}
tiganData.value = list;
djxxData.value = djxx;
} else {
createMessage.warning('暂无需要评分数据');
}
});
}
function emitChange(record) {
console.log('👮‍♀️', record);
var wjScore = record.wjScore;
var itemScore2 = record.itemScore2;
if (!/^[\d.]+$/.test(itemScore2)) {
createMessage.warning('请输入正确的分数');
record.itemScore = null;
record.itemScore2 = null;
return;
}
if (wjScore && itemScore2) {
if (parseInt(wjScore) < parseInt(itemScore2)) {
createMessage.warning('评分不能大于题目分值');
record.itemScore = wjScore;
record.itemScore2 = wjScore;
return;
} else if (parseInt(itemScore2) < 0) {
createMessage.warning('评分不能小于0');
record.itemScore = 0;
record.itemScore2 = 0;
return;
} else {
record.itemScore = itemScore2;
}
}
}
//
async function submitForm() {
var list = tiganData.value;
console.log('👩‍🎤', list);
for (var i = 0; i < list.length; i++) {
if (!list[i].itemScore) {
createMessage.warning('您有未填写的评分,请填写评分!');
return;
}
}
console.log(11111111111111);
defHttp.post({ url: '/wjxDjxx/editSdpf', params: list }).then((res) => {
console.log('😕', res);
createMessage.success('保存成功');
emit('ok');
});
}
async function submitNextForm() {
var list = tiganData.value;
console.log('👩‍🎤', list);
for (var i = 0; i < list.length; i++) {
if (!list[i].itemScore) {
createMessage.warning('您有未填写的评分,请填写评分!');
return;
}
}
defHttp.post({ url: '/wjxDjxx/editSdpf', params: list }).then((res) => {
console.log('😕', res);
// createMessage.success('');
edit({ vid: infoData.value.vid });
});
}
defineExpose({
edit,
submitForm,
});
</script>
<style lang="less" scoped>
/deep/span.ant-radio + * {
width: 100%;
}
/deep/.ant-checkbox-wrapper {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: tnum;
display: inline-flex;
align-items: baseline;
line-height: unset;
cursor: pointer;
width: 80%;
}
/deep/.ant-checkbox + span {
padding-right: 8px;
padding-left: 8px;
width: 100%;
}
.ant-checkbox-wrapper[aria-disabled='true'] {
color: rgb(2, 2, 2); /* 例如,将文本颜色设置为灰色 */
cursor: not-allowed; /* 将鼠标指针设置为禁用状态 */
}
.answer-title {
font-size: 14px;
color: #333;
}
.answer-info {
font-size: 14px;
color: #666;
text-decoration: underline;
margin-right: 15px;
}
.answer-word {
color: #ff8710;
}
</style>

View File

@ -0,0 +1,63 @@
<template>
<a-modal :title="title" :width="width" centered :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZgtpfForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZgtpfForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZgtpfForm from './ZgtpfForm.vue'
const title = ref<string>('');
const width = ref<string>('100%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function edit(id) {
title.value = disableSubmit.value ? '答卷结果' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(id);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
emit('success');
}
defineExpose({
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -17,6 +17,8 @@ export const columns: BasicColumn[] = [
rt = "多选"; rt = "多选";
}else if(text == '5'){ }else if(text == '5'){
rt = "填空"; rt = "填空";
}else if(text == '8'){
rt = "文件";
} }
return rt; return rt;
}, },
@ -50,6 +52,8 @@ export const wjdccolumns: BasicColumn[] = [
rt = "多选"; rt = "多选";
}else if(text == '5'){ }else if(text == '5'){
rt = "填空"; rt = "填空";
}else if(text == '8'){
rt = "文件";
} }
return rt; return rt;
}, },
@ -78,6 +82,8 @@ export const columnsYytk: BasicColumn[] = [
rt = "多选"; rt = "多选";
}else if(text == '5'){ }else if(text == '5'){
rt = "填空"; rt = "填空";
}else if(text == '8'){
rt = "文件";
} }
return rt; return rt;
}, },
@ -111,6 +117,8 @@ export const columnsYytkdc: BasicColumn[] = [
rt = "多选"; rt = "多选";
}else if(text == '5'){ }else if(text == '5'){
rt = "填空"; rt = "填空";
}else if(text == '8'){
rt = "文件";
} }
return rt; return rt;
}, },

View File

@ -17,6 +17,7 @@
<a-select-option value="3">单选</a-select-option> <a-select-option value="3">单选</a-select-option>
<a-select-option value="4">多选</a-select-option> <a-select-option value="4">多选</a-select-option>
<a-select-option value="5">填空</a-select-option> <a-select-option value="5">填空</a-select-option>
<a-select-option value="8">文件</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>

View File

@ -9,6 +9,7 @@
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls" >导入</j-upload-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls" >导入</j-upload-button>
<!-- <a-button type="primary" @click="handleSyncUser" preIcon="ant-design:sync-outlined"> 同步流程</a-button> --> <!-- <a-button type="primary" @click="handleSyncUser" preIcon="ant-design:sync-outlined"> 同步流程</a-button> -->
<a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button> <a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button>
<a-button type="primary" @click="handleCshmm" preIcon="ant-design:hdd-outlined" style="display: none;"> 初始化密码</a-button>
<JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" /> <JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" />
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
@ -71,6 +72,7 @@
import { columns, searchFormSchema } from './user.data'; import { columns, searchFormSchema } from './user.data';
import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch, syncUser } from './user.api'; import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch, syncUser } from './user.api';
import {usePermission} from "/@/hooks/web/usePermission"; import {usePermission} from "/@/hooks/web/usePermission";
import { defHttp } from '/@/utils/http/axios';
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const { isDisabledAuth } = usePermission(); const { isDisabledAuth } = usePermission();
@ -171,6 +173,11 @@
reload(); reload();
}); });
} }
function handleCshmm(){
defHttp.put({url:"/sys/user/chongzhiPassword"})
}
/** /**
* 成功回调 * 成功回调
*/ */