From 0d42134f8c5f0a870336752e392e8a3987036561 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Tue, 15 Oct 2024 18:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kc/wjxCswj/WjxCywjV2Dtjg.vue | 105 +++++--- src/views/kc/wjxCswj/WjxCywjV2List.vue | 60 ++++- .../components/WjxWjxxTmlbAllDjjgsList.vue | 220 +++++++++------- .../components/WjxWjxxTmlbDjV2Form.vue | 22 +- .../components/WjxWjxxTmlbDjjgForm.vue | 233 +++++++++++------ .../components/WjxWjxxTmlbDjjgs.data.ts | 19 +- src/views/kc/wjxWjxx/components/ZgtpfForm.vue | 242 ++++++++++++++++++ .../kc/wjxWjxx/components/ZgtpfModal.vue | 63 +++++ src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts | 8 + src/views/kc/wjxWjxxTmlb/YinyongTikuList.vue | 1 + src/views/system/user/index.vue | 7 + 11 files changed, 749 insertions(+), 231 deletions(-) create mode 100644 src/views/kc/wjxWjxx/components/ZgtpfForm.vue create mode 100644 src/views/kc/wjxWjxx/components/ZgtpfModal.vue diff --git a/src/views/kc/wjxCswj/WjxCywjV2Dtjg.vue b/src/views/kc/wjxCswj/WjxCywjV2Dtjg.vue index 40902ee..e335401 100644 --- a/src/views/kc/wjxCswj/WjxCywjV2Dtjg.vue +++ b/src/views/kc/wjxCswj/WjxCywjV2Dtjg.vue @@ -10,8 +10,10 @@ {{ zyInfo.title }} - - 开始时间:{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }} ~ 结束时间:{{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }} + + 开始时间:{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }} ~ + 结束时间:{{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }} @@ -29,18 +31,27 @@ > - - + + - + {{ item.wjTitle }} - {{ item.yzd }}已作答人数 - {{ item.ddrs }}答对人数 - {{ item.dcrs }}答错人数 + {{ item.yzd }}已作答人数 + {{ item.ddrs }}{{ item.wjType == '8' ? '已批阅人数' : '答对人数' }} + {{ item.dcrs }}{{ item.wjType != '8' ? '未批阅人数' : '答错人数' }} @@ -100,14 +111,33 @@ + + + + + + + + + + + + 文件题 + 题目分值: {{ item.wjScore }} 分 + + + 无对应类型 - - + @@ -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; diff --git a/src/views/kc/wjxCswj/WjxCywjV2List.vue b/src/views/kc/wjxCswj/WjxCywjV2List.vue index 07e15b3..b83b709 100644 --- a/src/views/kc/wjxCswj/WjxCywjV2List.vue +++ b/src/views/kc/wjxCswj/WjxCywjV2List.vue @@ -239,6 +239,7 @@ v-if="!editDisabled" /> + 注:选中即为正确答案 @@ -324,6 +325,7 @@ v-if="!editDisabled" /> + 注:选中即为正确答案 @@ -411,6 +413,13 @@ /> + - + @@ -633,6 +642,27 @@ + + + + + + + {{ index + 1 }}、 + + + + 文件题 + 题目分值: {{ item.wjScore }} 分 + + + + + 无对应类型 @@ -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]; diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbAllDjjgsList.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbAllDjjgsList.vue index 81c7fc5..73d3790 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbAllDjjgsList.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbAllDjjgsList.vue @@ -3,6 +3,9 @@ + + 主观题评分 + @@ -26,7 +29,7 @@ 查询 - 导出 + 导出 @@ -35,120 +38,141 @@ - + - - + + - + + diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjV2Form.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjV2Form.vue index dcafb60..f04355f 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjV2Form.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjV2Form.vue @@ -21,6 +21,9 @@ {{ index + 1 }}、 + + + {{ index + 1 }}、 + + + {{ index + 1 }}、 + + + {{ index + 1 }}、 + + + - - + - + diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue index ea5fc7f..7264d53 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue @@ -1,57 +1,84 @@ - - - - {{ djxxData.title }} - + + + {{ djxxData.title }} + 答卷人:{{ djxxData.userName }} - 总分:{{ djxxData.totalScore }} + 得分:{{ djxxData.score }} - 用时:{{djxxData.answerSfm}} + 用时:{{ djxxData.answerSfm }} - + - - 单选题 + + 单选题 - {{index+1}}、 + {{ index + 1 }}、 + + + + - 题目分值: {{item.wjScore}} 分 - 所得分值: {{item.itemScore}} 分 + 题目分值: {{ item.wjScore }} 分 + 所得分值: {{ item.itemScore }} 分 - - - - (此选项是正确答案) + + + + (此选项是正确答案) - - 多选题 - + + 多选题 + - {{index+1}}、 + {{ index + 1 }}、 + + + + - 题目分值: {{item.wjScore}} 分 - 所得分值: {{item.itemScore}} 分 + 题目分值: {{ item.wjScore }} 分 + 所得分值: {{ item.itemScore }} 分 - + - + - - - (此选项是正确答案) + + + (此选项是正确答案) @@ -59,16 +86,30 @@ - - 填空题 - + + 填空题 + - {{index+1}}、 - (正确答案:{{item.tktda}}) + {{ index + 1 }}、 + (正确答案:{{ item.tktda }}) + + + + - 题目分值:{{item.wjScore}} 分 - 所得分值:{{item.itemScore}} 分 + 题目分值:{{ item.wjScore }} 分 + 所得分值:{{ item.itemScore }} 分 @@ -78,9 +119,49 @@ - - 无对应类型 + + + 文件题 + + + {{ index + 1 }}、 + + + + + + + + 题目分值:{{ item.wjScore }} 分 + 所得分值:{{ item.itemScore?item.itemScore:'待评' }} 分 + + + + + + + + + + + + + 无对应类型 @@ -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(''); const mainId = ref(''); const confirmLoading = ref(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 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, +}); diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts index 9c6c390..b5767fc 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts @@ -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", diff --git a/src/views/kc/wjxWjxx/components/ZgtpfForm.vue b/src/views/kc/wjxWjxx/components/ZgtpfForm.vue new file mode 100644 index 0000000..1022ad7 --- /dev/null +++ b/src/views/kc/wjxWjxx/components/ZgtpfForm.vue @@ -0,0 +1,242 @@ + + + + + {{ djxxData.title }} + + 答卷人:{{ djxxData.userName }} + + 得分:{{ djxxData.score }} + 用时:{{ djxxData.answerSfm }} + + + + + + 文件题 + + + {{ index + 1 }}、 + + + + + + + + 题目分值:{{ item.wjScore }} 分 + 所得分值:{{ item.itemScore ? item.itemScore : '待评' }} 分 + + + + + + + + + + + + 评分 + + + + + + + + + 保存 + 保存并下一个 + + + + + + + + + diff --git a/src/views/kc/wjxWjxx/components/ZgtpfModal.vue b/src/views/kc/wjxWjxx/components/ZgtpfModal.vue new file mode 100644 index 0000000..a7f5826 --- /dev/null +++ b/src/views/kc/wjxWjxx/components/ZgtpfModal.vue @@ -0,0 +1,63 @@ + + + + + + + + + diff --git a/src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts b/src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts index 6ca0a5c..89fd25d 100644 --- a/src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts +++ b/src/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.data.ts @@ -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; }, diff --git a/src/views/kc/wjxWjxxTmlb/YinyongTikuList.vue b/src/views/kc/wjxWjxxTmlb/YinyongTikuList.vue index defd4f2..9501787 100644 --- a/src/views/kc/wjxWjxxTmlb/YinyongTikuList.vue +++ b/src/views/kc/wjxWjxxTmlb/YinyongTikuList.vue @@ -17,6 +17,7 @@ 单选 多选 填空 + 文件 diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 8a41ad1..31df649 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -9,6 +9,7 @@ 导入 回收站 + 初始化密码 @@ -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"}) + } + /** * 成功回调 */