修改页面
This commit is contained in:
parent
8facf418eb
commit
0d42134f8c
|
@ -10,8 +10,10 @@
|
|||
<a-col :span="24" style="text-align: center">
|
||||
<span class="title">{{ zyInfo.title }}</span>
|
||||
</a-col>
|
||||
<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>
|
||||
<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>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 10px">
|
||||
<div style="display: flex">
|
||||
|
@ -29,18 +31,27 @@
|
|||
>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 10px; text-align: right;">
|
||||
<a-switch style=" margin-right:20px;" checkedChildren="统计" unCheckedChildren="图表" v-model:checked="twoShowType" />
|
||||
<a-col :span="24" style="margin-top: 10px; text-align: right">
|
||||
<a-switch style="margin-right: 20px" checkedChildren="统计" unCheckedChildren="图表" v-model:checked="twoShowType" />
|
||||
</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-panel :key="index" v-for="(item, index) in zyInfo.tmlbList">
|
||||
<template #header>
|
||||
<a-row :span="24" style="width: 90%">
|
||||
<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:#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>
|
||||
<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 :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: #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>
|
||||
</template>
|
||||
<div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3">
|
||||
|
@ -100,14 +111,33 @@
|
|||
</template>
|
||||
</a-card>
|
||||
</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>
|
||||
</a-collapse-panel>
|
||||
</a-collapse>
|
||||
</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-panel :key="index" v-for="(item, index) in zyInfo.tmlbList">
|
||||
<template #header>
|
||||
|
@ -161,6 +191,7 @@ import Pie from '/@/components/chart/Pie.vue';
|
|||
import BarMulti from '/@/components/chart/BarMulti.vue';
|
||||
|
||||
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
@ -183,26 +214,42 @@ const pieOption = {
|
|||
};
|
||||
|
||||
function getPieData(item) {
|
||||
console.log('👨🔧', item);
|
||||
|
||||
const pieData = [
|
||||
{ value: parseInt(item.ddrs), name: '答对人数' },
|
||||
{ value: parseInt(item.dcrs), name: '答错人数' },
|
||||
];
|
||||
return pieData;
|
||||
console.log('👩', item);
|
||||
if(item.wjType == 8){
|
||||
const pieData = [
|
||||
{ value: parseInt(item.ddrs), name: '已批阅人数' },
|
||||
{ value: parseInt(item.dcrs), name: '未批阅人数' },
|
||||
];
|
||||
return pieData;
|
||||
}else{
|
||||
const pieData = [
|
||||
{ value: parseInt(item.ddrs), name: '答对人数' },
|
||||
{ value: parseInt(item.dcrs), name: '答错人数' },
|
||||
];
|
||||
return pieData;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getBarData(item) {
|
||||
const barMultiData = [
|
||||
{ value: parseInt(item.yzd), name: '作答人数' },
|
||||
{ value: parseInt(item.ddrs), name: '答对人数' },
|
||||
{ value: parseInt(item.dcrs), name: '答错人数' },
|
||||
];
|
||||
return barMultiData;
|
||||
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 = [
|
||||
{ value: parseInt(item.yzd), name: '作答人数' },
|
||||
{ value: parseInt(item.ddrs), name: '答对人数' },
|
||||
{ value: parseInt(item.dcrs), name: '答错人数' },
|
||||
];
|
||||
return barMultiData;
|
||||
}
|
||||
}
|
||||
function reloadZy() {
|
||||
defHttp.get({ url: '/wjxWjxx/wjxWjxx/queryCyjgById', params: { id: cyid } }).then((res) => {
|
||||
console.log('🚶♂️', res);
|
||||
zyInfo.value = res;
|
||||
});
|
||||
}
|
||||
|
@ -217,18 +264,12 @@ function handleDjjgs(record: Recordable, flag) {
|
|||
onMounted(() => {
|
||||
reloadZy();
|
||||
intervalId = setInterval(() => {
|
||||
// aaaaa.value++;
|
||||
console.log('🤯1111111111111111111', aaaaa.value);
|
||||
// 执行要重复执行的逻辑
|
||||
reloadZy();
|
||||
if (zyInfo.value.xkrs == zyInfo.value.ywcrs) {
|
||||
clear();
|
||||
}
|
||||
// if (aaaaa.value == 3) {
|
||||
// console.log('2222222222222222222', aaaaa.value);
|
||||
// clear();
|
||||
// }
|
||||
}, 5000);
|
||||
}, 15000);
|
||||
});
|
||||
|
||||
function clear() {
|
||||
|
@ -418,7 +459,7 @@ function clear() {
|
|||
font-weight: bold;
|
||||
}
|
||||
.tjfx-line {
|
||||
width:33%;
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
v-if="!editDisabled"
|
||||
/></a-tooltip>
|
||||
</template>
|
||||
<j-upload v-model:value="item.picPath" text="上传图片" fileType="image" :maxCount="9" :disabled="!isShow"></j-upload>
|
||||
<a-row v-if="isShow">
|
||||
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 注:选中即为正确答案 </a-col>
|
||||
</a-row>
|
||||
|
@ -324,6 +325,7 @@
|
|||
v-if="!editDisabled"
|
||||
/></a-tooltip>
|
||||
</template>
|
||||
<j-upload v-model:value="item.picPath" text="上传图片" fileType="image" :maxCount="9" :disabled="!isShow"></j-upload>
|
||||
<a-row v-if="isShow">
|
||||
<a-col :span="24" style="color: darkgrey; font-size: 13px"> 注:选中即为正确答案 </a-col>
|
||||
</a-row>
|
||||
|
@ -411,6 +413,13 @@
|
|||
/></a-tooltip>
|
||||
</template>
|
||||
<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-textarea
|
||||
placeholder="请填写答案"
|
||||
|
@ -491,7 +500,7 @@
|
|||
/></a-tooltip>
|
||||
<!-- <JUpload ref="uploadRef" /> -->
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
@ -633,6 +642,27 @@
|
|||
</template>
|
||||
</a-card>
|
||||
</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>
|
||||
</a-col>
|
||||
|
@ -1155,9 +1185,9 @@ async function importDrtmXls(data, url) {
|
|||
}
|
||||
};
|
||||
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
|
||||
console.log('22222222222222222222222',zyInfo.value);
|
||||
console.log('22222222222222222222222', zyInfo.value);
|
||||
handleEdit(zyInfo.value, false);
|
||||
importOpen.value = false
|
||||
importOpen.value = false;
|
||||
}
|
||||
/**
|
||||
* 导入xls
|
||||
|
@ -1202,9 +1232,7 @@ async function importXls(data, url) {
|
|||
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
|
||||
}
|
||||
|
||||
|
||||
function handleWxtx(record) {
|
||||
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '微信提醒',
|
||||
|
@ -1333,6 +1361,7 @@ function handleJscjbfb() {
|
|||
|
||||
//引用题库回调
|
||||
function handleYytkSuccess(record) {
|
||||
console.log('💇♀️', record);
|
||||
for (var i = 0; i < record.length; i++) {
|
||||
var type = record[i].wjType;
|
||||
var list = tiganData.value;
|
||||
|
@ -1360,6 +1389,7 @@ function handleYytkSuccess(record) {
|
|||
wjLeixing,
|
||||
itemSelected: sfxz + '',
|
||||
wjSfqh: '0',
|
||||
picPath: record[i].picPath,
|
||||
wjxWjxxTmxxList: addwjxWjxxTmxxList,
|
||||
};
|
||||
list.push(params);
|
||||
|
@ -1385,6 +1415,7 @@ function handleYytkSuccess(record) {
|
|||
wjLeixing,
|
||||
itemSelected: sfxz,
|
||||
wjSfqh: '0',
|
||||
picPath: record[i].picPath,
|
||||
wjxWjxxTmxxList: addwjxWjxxTmxxList,
|
||||
};
|
||||
list.push(params);
|
||||
|
@ -1403,6 +1434,25 @@ function handleYytkSuccess(record) {
|
|||
wjLeixing,
|
||||
wjAnswer: huida,
|
||||
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);
|
||||
tiganData.value = [...list];
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-button type="primary" @click="handleZgtpf">主观题评分</a-button>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item label="学生姓名">
|
||||
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input>
|
||||
|
@ -26,7 +29,7 @@
|
|||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
|
||||
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> -->
|
||||
</a-col>
|
||||
</span>
|
||||
|
@ -35,120 +38,141 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }" >
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
|
||||
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="reload"></WjxWjxxTmlbDjjgModal>
|
||||
<ZgtpfModal ref="ZgtpfModalPage" @success="reload"></ZgtpfModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
|
||||
import {ref, reactive, defineExpose, unref} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './WjxWjxxTmlbDjjgs.data';
|
||||
import { list,getExportUrl } from './WjxWjxxTmlbDjjgs.api';
|
||||
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
|
||||
import { ref, reactive, defineExpose, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './WjxWjxxTmlbDjjgs.data';
|
||||
import { list, getExportUrl } from './WjxWjxxTmlbDjjgs.api';
|
||||
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue';
|
||||
import ZgtpfModal from '/@/views/kc/wjxWjxx/components/ZgtpfModal.vue';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const isFinished = ref<string>('');
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const WjxWjxxTmlbDjjgModalPage = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = '',params.order = '';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
const queryParam = ref<any>({});
|
||||
const isFinished = ref<string>('');
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const WjxWjxxTmlbDjjgModalPage = ref();
|
||||
const ZgtpfModalPage = ref();
|
||||
const sjxxInfo = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 220,
|
||||
fixed: 'right',
|
||||
},
|
||||
exportConfig: {
|
||||
name: "学生测验信息",
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
return Object.assign({},queryParam.value);
|
||||
}
|
||||
beforeFetch: (params) => {
|
||||
(params.column = ''), (params.order = ''); //新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
},
|
||||
exportConfig: {
|
||||
name: '学生测验信息',
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
return Object.assign({}, queryParam.value);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
/**
|
||||
* 答卷详情
|
||||
*/
|
||||
function handlePeizhiDjjg(record: Recordable) {
|
||||
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
|
||||
WjxWjxxTmlbDjjgModalPage.value.edit(record.id,false);
|
||||
/**
|
||||
* 答卷详情
|
||||
*/
|
||||
function handlePeizhiDjjg(record: Recordable) {
|
||||
WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
|
||||
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) {
|
||||
if (record.commitTime != null && record.commitTime != '') {
|
||||
return [
|
||||
{
|
||||
label: '答卷结果',
|
||||
onClick: handlePeizhiDjjg.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '主观题评分',
|
||||
onClick: handleZgypf.bind(null, record),
|
||||
ifShow: record.sfxysdpy == 1,
|
||||
},
|
||||
];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
if(record.commitTime != null && record.commitTime != ''){
|
||||
return [
|
||||
{
|
||||
label: '答卷结果',
|
||||
onClick: handlePeizhiDjjg.bind(null, record),
|
||||
}
|
||||
]
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function init(record,flag){
|
||||
queryParam.value.id = record.id;
|
||||
queryParam.value.rwbh = record.rwbh;
|
||||
queryParam.value.isFinished = flag;
|
||||
isFinished.value = flag;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
});
|
||||
|
||||
function init(record, flag) {
|
||||
console.log('👨🦲', record);
|
||||
sjxxInfo.value = record;
|
||||
queryParam.value.id = record.id;
|
||||
queryParam.value.rwbh = record.rwbh;
|
||||
queryParam.value.isFinished = flag;
|
||||
isFinished.value = flag;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.jeecg-basic-table-form-container {
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust {
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<a-card>
|
||||
<template #title>
|
||||
<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 #extra>
|
||||
<span style="margin-left: 40px" v-if="isShow"
|
||||
|
@ -42,6 +45,9 @@
|
|||
<a-card>
|
||||
<template #title>
|
||||
<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 #extra>
|
||||
<span style="margin-left: 40px" v-if="isShow"
|
||||
|
@ -66,6 +72,9 @@
|
|||
<template #title>
|
||||
<span>{{ index + 1 }}、</span
|
||||
><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 #extra>
|
||||
<span style="margin-left: 40px" v-if="isShow"
|
||||
|
@ -92,6 +101,9 @@
|
|||
<template #title>
|
||||
<span>{{ index + 1 }}、</span
|
||||
><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 #extra>
|
||||
<span style="margin-left: 40px" v-if="isShow"
|
||||
|
@ -100,19 +112,13 @@
|
|||
</template>
|
||||
<a-row>
|
||||
<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(',')}}- -->
|
||||
<!-- <JImageUpload v-model:value="item.picPath" disabled></JImageUpload> -->
|
||||
<!-- <j-image-upload v-model:value="item.picPath" :disabled="disabled"></j-image-upload> -->
|
||||
</a-col>
|
||||
<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-row>
|
||||
</a-card>
|
||||
|
|
|
@ -1,57 +1,84 @@
|
|||
<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;">
|
||||
<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.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>
|
||||
<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: 100%" v-for="(item, index) in tiganData" :key="index">
|
||||
<!-- 单选题 -->
|
||||
<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="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>
|
||||
<a-card>
|
||||
<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 #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}}</span> 分</div>
|
||||
<div style="margin-left: 40px"
|
||||
>题目分值:<span class="answer-word"> {{ item.wjScore }}</span> 分</div
|
||||
>
|
||||
<div style="margin-left: 40px"
|
||||
>所得分值:<span class="answer-word"> {{ item.itemScore }}</span> 分</div
|
||||
>
|
||||
</template>
|
||||
<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">
|
||||
<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-if="tmxx.itemSelected == 'true'" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(此选项是正确答案)</span>
|
||||
<div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList">
|
||||
<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-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(此选项是正确答案)</span>
|
||||
</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 多选题 -->
|
||||
<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>
|
||||
<a-card >
|
||||
<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>
|
||||
<a-card>
|
||||
<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 #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}}</span> 分</div>
|
||||
<div style="margin-left: 40px"
|
||||
>题目分值:<span class="answer-word"> {{ item.wjScore }} </span> 分</div
|
||||
>
|
||||
<div style="margin-left: 40px"
|
||||
>所得分值:<span class="answer-word"> {{ item.itemScore }}</span> 分</div
|
||||
>
|
||||
</template>
|
||||
<!-- -{{item.itemSelected}}- -->
|
||||
<!-- -{{item.itemSelected}}- -->
|
||||
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
|
||||
<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}}- -->
|
||||
<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-if="tmxx.itemSelected == 'true'" style="color:#9e9e9e;margin-left:30px;font-size:12px;">(此选项是正确答案)</span>
|
||||
<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-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(此选项是正确答案)</span>
|
||||
</a-checkbox>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -59,16 +86,30 @@
|
|||
</a-card>
|
||||
</div>
|
||||
<!-- 填空题 -->
|
||||
<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>
|
||||
<a-card >
|
||||
<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>
|
||||
<a-card>
|
||||
<template #title>
|
||||
<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>{{ 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>
|
||||
|
||||
<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 #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}}</span> 分</div>
|
||||
<div style="margin-left: 40px"
|
||||
>题目分值:<span class="answer-word">{{ item.wjScore }}</span> 分</div
|
||||
>
|
||||
<div style="margin-left: 40px"
|
||||
>所得分值:<span class="answer-word">{{ item.itemScore }}</span> 分</div
|
||||
>
|
||||
</template>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
|
@ -78,9 +119,49 @@
|
|||
</a-row>
|
||||
</a-card>
|
||||
</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>
|
||||
<!-- <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>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -92,12 +173,8 @@ import { ref, nextTick, defineExpose } from 'vue';
|
|||
import { Icon } from '/@/components/Icon';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import {
|
||||
queryWjxWjxxTmxxListByMainId,
|
||||
queryDataById,
|
||||
saveOrUpdate,
|
||||
djtj
|
||||
} from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate, djtj } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
|
||||
const title = ref<string>('');
|
||||
const mainId = ref<string>('');
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
|
@ -108,79 +185,79 @@ const { createMessage } = useMessage();
|
|||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
//初始化
|
||||
function edit(id){
|
||||
function edit(id) {
|
||||
tiganData.value = [];
|
||||
mainId.value = id;
|
||||
defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:id}}).then(res =>{
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
defHttp.get({ url: '/wjxDjxx/queryByMainId', params: { id: id } }).then((res) => {
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res);
|
||||
let djxx = res;
|
||||
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];
|
||||
if(par.wjType==4){
|
||||
let lssj = par.itemSelected.split(",");
|
||||
const numArray = lssj.map(str => parseInt(str));
|
||||
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;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//提交数据
|
||||
async function submitForm(){
|
||||
async function submitForm() {
|
||||
emit('ok');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
defineExpose({
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
/deep/span.ant-radio + * {
|
||||
width: 100%;
|
||||
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%;
|
||||
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%;
|
||||
padding-right: 8px;
|
||||
padding-left: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
.ant-checkbox-wrapper[aria-disabled='true'] {
|
||||
color: rgb(2, 2, 2); /* 例如,将文本颜色设置为灰色 */
|
||||
cursor: not-allowed; /* 将鼠标指针设置为禁用状态 */
|
||||
}
|
||||
.answer-title{
|
||||
.answer-title {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
.answer-info{
|
||||
.answer-info {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
text-decoration: underline;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.answer-word{
|
||||
.answer-word {
|
||||
color: #ff8710;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -27,20 +27,19 @@ export const columns: BasicColumn[] = [
|
|||
align: "center",
|
||||
dataIndex: 'score',
|
||||
width: 80,
|
||||
customRender: ({ text }) => {
|
||||
console.log('🥴', text)
|
||||
return parseFloat(text).toFixed(1);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '总分',
|
||||
align: "center",
|
||||
dataIndex: 'totalScore',
|
||||
width: 80,
|
||||
customRender: ({ text }) => {
|
||||
return parseFloat(text).toFixed(1);
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '总分',
|
||||
// align: "center",
|
||||
// dataIndex: 'totalScore',
|
||||
// width: 80,
|
||||
// customRender: ({ text }) => {
|
||||
// return parseFloat(text).toFixed(1);
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title: '答卷时间',
|
||||
align: "center",
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -17,6 +17,8 @@ export const columns: BasicColumn[] = [
|
|||
rt = "多选";
|
||||
}else if(text == '5'){
|
||||
rt = "填空";
|
||||
}else if(text == '8'){
|
||||
rt = "文件";
|
||||
}
|
||||
return rt;
|
||||
},
|
||||
|
@ -50,6 +52,8 @@ export const wjdccolumns: BasicColumn[] = [
|
|||
rt = "多选";
|
||||
}else if(text == '5'){
|
||||
rt = "填空";
|
||||
}else if(text == '8'){
|
||||
rt = "文件";
|
||||
}
|
||||
return rt;
|
||||
},
|
||||
|
@ -78,6 +82,8 @@ export const columnsYytk: BasicColumn[] = [
|
|||
rt = "多选";
|
||||
}else if(text == '5'){
|
||||
rt = "填空";
|
||||
}else if(text == '8'){
|
||||
rt = "文件";
|
||||
}
|
||||
return rt;
|
||||
},
|
||||
|
@ -111,6 +117,8 @@ export const columnsYytkdc: BasicColumn[] = [
|
|||
rt = "多选";
|
||||
}else if(text == '5'){
|
||||
rt = "填空";
|
||||
}else if(text == '8'){
|
||||
rt = "文件";
|
||||
}
|
||||
return rt;
|
||||
},
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<a-select-option value="3">单选</a-select-option>
|
||||
<a-select-option value="4">多选</a-select-option>
|
||||
<a-select-option value="5">填空</a-select-option>
|
||||
<a-select-option value="8">文件</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<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="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" />
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
|
@ -71,6 +72,7 @@
|
|||
import { columns, searchFormSchema } from './user.data';
|
||||
import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch, syncUser } from './user.api';
|
||||
import {usePermission} from "/@/hooks/web/usePermission";
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const { isDisabledAuth } = usePermission();
|
||||
|
@ -171,6 +173,11 @@
|
|||
reload();
|
||||
});
|
||||
}
|
||||
|
||||
function handleCshmm(){
|
||||
defHttp.put({url:"/sys/user/chongzhiPassword"})
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue