diff --git a/src/router/routes/modules/stuzy/stuzy.ts b/src/router/routes/modules/stuzy/stuzy.ts index e838b54..131e745 100644 --- a/src/router/routes/modules/stuzy/stuzy.ts +++ b/src/router/routes/modules/stuzy/stuzy.ts @@ -2,7 +2,7 @@ import type { AppRouteModule } from '/@/router/types'; // import { LAYOUT } from '/@/router/constant'; import { t } from '/@/hooks/web/useI18n'; - + const stuzy: AppRouteModule = { path: '/stuzy', name: 'stuzy', @@ -38,7 +38,22 @@ const stuzy: AppRouteModule = { }, component: () => import('/@/views/zy/zyInfo/SutdentZyInfoHistoryList.vue'), }, - + { + path: 'stuCeshiWenjuan', + name: 'stuCeshiWenjuan', + component: () => import('/@/views/kc/wjxCswj/WjxCswjStuList.vue'), + meta: { + title: '测试问卷', + }, + }, + { + path: 'stuDcwjWenjuan', + name: 'stuDcwjWenjuan', + component: () => import('/@/views/kc/wjxDcwj/WjxDcwjStuList.vue'), + meta: { + title: '调查问卷', + }, + }, ] } diff --git a/src/router/routes/modules/zy/zy.ts b/src/router/routes/modules/zy/zy.ts index 3533bf7..23704bd 100644 --- a/src/router/routes/modules/zy/zy.ts +++ b/src/router/routes/modules/zy/zy.ts @@ -62,17 +62,22 @@ const zuoye: AppRouteModule = { title: '公告', }, }, - { - path: 'dqkcWenjuan', - name: 'dqkcWenjuan', - component: () => import('/@/views/kc/wjxWjxx/WjxWjxxList.vue'), + path: 'ceshiWenjuan', + name: 'ceshiWenjuan', + component: () => import('/@/views/kc/wjxCswj/WjxCswjMainList.vue'), meta: { - title: '当前问卷', + title: '测试问卷', + }, + }, + { + path: 'dcwjWenjuan', + name: 'dcwjWenjuan', + component: () => import('/@/views/kc/wjxDcwj/WjxDcwjMainList.vue'), + meta: { + title: '调查问卷', }, }, - - ] } diff --git a/src/views/kc/wjxWjxx/WjxWjxxList.vue b/src/views/kc/wjxCswj/WjxCswjList.vue similarity index 75% rename from src/views/kc/wjxWjxx/WjxWjxxList.vue rename to src/views/kc/wjxCswj/WjxCswjList.vue index 3a27561..12ef182 100644 --- a/src/views/kc/wjxWjxx/WjxWjxxList.vue +++ b/src/views/kc/wjxCswj/WjxCswjList.vue @@ -12,6 +12,7 @@ + 全部 未发布 已发布 @@ -33,7 +34,7 @@
-
{{item.qpublish =='0'? '待发布':'已发布'}}
+
{{item.qpublish =='0'? '待发布':'已发布'}}
{{item.title}}
@@ -51,7 +52,13 @@ {{item.xqxn}} - {{item.xkrs}}人选课 + + + + + + + @@ -61,12 +68,12 @@ 删除 详情 配置 - 结果 - - - 答卷 - 查看答卷 + + + + +
@@ -83,8 +90,8 @@ - + @@ -92,18 +99,18 @@ import {ref, reactive, defineExpose, unref, onMounted} from 'vue'; import { defHttp } from '/@/utils/http/axios'; import { Input, Popover, Pagination, Empty } from 'ant-design-vue'; - import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './WjxWjxx.api'; - import WjxWjxxModal from './components/WjxWjxxModal.vue' + import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api'; + import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue' import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue' import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue' - import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue' import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue' + import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import {useRouter} from "vue-router"; //当前路由信息 const { currentRoute } = useRouter(); const { query } = unref(currentRoute); - const { rwbh,xqxn } = query;//获取传递参数 + const { rwbh,xqxn,typa } = query;//获取传递参数 const APagination = Pagination; const queryParam = ref({}); @@ -116,8 +123,9 @@ const registerModal = ref(); const WjxWjxxTmlbModalPage = ref(); const WjxWjxxTmlbDjModalPage = ref(); - const WjxWjxxTmlbDjjgModalPage = ref(); - const WjxWjxxTmlbDjjgsModalPage = ref(); + const WjxWjxxTmlbDjjgsModalPage = ref() + const WjxWjxxTmlbDjjgsDcModalPage = ref(); + const XxhbbksListModalPage = ref(); const labelCol = reactive({ xs: { span: 24 }, @@ -144,12 +152,21 @@ registerModal.value.edit(record); } + /** + * 获取选课人数 + */ + function openXkrs(record){ + // console.log(`🚀 ~ openXkrs ~ record:`, record) + XxhbbksListModalPage.value.disableSubmit = true; + XxhbbksListModalPage.value.init(record); + } + /** * 配置 */ function handlePeizhi(record: Recordable) { WjxWjxxTmlbModalPage.value.disableSubmit = false; - WjxWjxxTmlbModalPage.value.edit(record); + WjxWjxxTmlbModalPage.value.edit(record,"6"); } /** @@ -157,31 +174,31 @@ */ function handlePeizhiXq(record: Recordable) { WjxWjxxTmlbDjModalPage.value.disableSubmit = true; - WjxWjxxTmlbDjModalPage.value.edit(record,true); + WjxWjxxTmlbDjModalPage.value.edit(record,true,"6",'ls'); } - /** - * 答卷详情 - */ - function handleDj(record: Recordable) { - WjxWjxxTmlbDjModalPage.value.disableSubmit = false; - WjxWjxxTmlbDjModalPage.value.edit(record,false); - } + // /** + // * 答卷详情 + // */ + // function handleDj(record: Recordable) { + // WjxWjxxTmlbDjModalPage.value.disableSubmit = false; + // WjxWjxxTmlbDjModalPage.value.edit(record,false); + // } - /** - * 答卷详情 - */ - function handleDjjg(record: Recordable) { - WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true; - WjxWjxxTmlbDjjgModalPage.value.edit(record,false); - } + // /** + // * 答卷详情 + // */ + // function handleDjjg(record: Recordable) { + // WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true; + // WjxWjxxTmlbDjjgModalPage.value.edit(record,false); + // } /** * 学生答卷列表 */ - function handleDjjgs(record: Recordable) { + function handleDjjgs(record: Recordable,flag) { WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true; - WjxWjxxTmlbDjjgsModalPage.value.edit(record,false); + WjxWjxxTmlbDjjgsModalPage.value.edit(record,flag); } /** @@ -196,7 +213,7 @@ * 发布 */ function handleFabu(record: Recordable) { - defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id } }).then(res => { + defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => { total.value = 1; pageNo.value = 0; reload(); @@ -259,6 +276,14 @@ searchQuery(); }); + function classFun(type){ + if(type == '0'){ + return "background: #a7a6a6"; + }else if(type == '1'){ + return "background: #18a689"; + } + } + diff --git a/src/views/kc/wjxCswj/WjxCswjStuList.vue b/src/views/kc/wjxCswj/WjxCswjStuList.vue new file mode 100644 index 0000000..96d6f37 --- /dev/null +++ b/src/views/kc/wjxCswj/WjxCswjStuList.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/src/views/kc/wjxCswj/WjxCswjTableList.vue b/src/views/kc/wjxCswj/WjxCswjTableList.vue new file mode 100644 index 0000000..677abd3 --- /dev/null +++ b/src/views/kc/wjxCswj/WjxCswjTableList.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/src/views/kc/wjxDcwj/WjxDcwjList.vue b/src/views/kc/wjxDcwj/WjxDcwjList.vue new file mode 100644 index 0000000..954b6a7 --- /dev/null +++ b/src/views/kc/wjxDcwj/WjxDcwjList.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/src/views/kc/wjxDcwj/WjxDcwjMainList.vue b/src/views/kc/wjxDcwj/WjxDcwjMainList.vue new file mode 100644 index 0000000..bcaf2cb --- /dev/null +++ b/src/views/kc/wjxDcwj/WjxDcwjMainList.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/views/kc/wjxDcwj/WjxDcwjStuList.vue b/src/views/kc/wjxDcwj/WjxDcwjStuList.vue new file mode 100644 index 0000000..329dbbc --- /dev/null +++ b/src/views/kc/wjxDcwj/WjxDcwjStuList.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/src/views/kc/wjxDcwj/WjxDcwjTableList.vue b/src/views/kc/wjxDcwj/WjxDcwjTableList.vue new file mode 100644 index 0000000..d9f8591 --- /dev/null +++ b/src/views/kc/wjxDcwj/WjxDcwjTableList.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/src/views/kc/wjxWjxx/WjxWjxx.data.ts b/src/views/kc/wjxWjxx/WjxWjxx.data.ts index 02c4f5a..3c9aed2 100644 --- a/src/views/kc/wjxWjxx/WjxWjxx.data.ts +++ b/src/views/kc/wjxWjxx/WjxWjxx.data.ts @@ -4,46 +4,16 @@ import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ - // { - // title: '创建人', - // align: "center", - // dataIndex: 'createBy' - // }, - // { - // title: '创建时间', - // align: "center", - // dataIndex: 'createTime', - // customRender:({text}) =>{ - // return !text?"":(text.length>10?text.substr(0,10):text); - // }, - // }, { - title: '学年学期', + title: '是否发布问卷', align: "center", - dataIndex: 'xnxq' - }, - { - title: '课程名称', - align: "center", - dataIndex: 'kcmc' + dataIndex: 'qpublish_dictText' }, { title: '问卷名称', align: "center", dataIndex: 'title' }, - { - title: '问卷类型', - align: "center", - dataIndex: 'atype', - customRender: ({ text }) => { - let dictMap = { - '1': '调查', - '6': '随堂练', - } - return dictMap[text??'']; - } - }, { title: '开始时间', align: "center", @@ -55,14 +25,24 @@ export const columns: BasicColumn[] = [ dataIndex: 'endTime' }, { - title: '问卷描述', + title: '学期学年', align: "center", - dataIndex: 'content' + dataIndex: 'xqxn' }, { - title: '是否发布问卷', + title: '选课人数', align: "center", - dataIndex: 'qpublish_dictText' + dataIndex: 'xkrs' + }, + { + title: '未提交', + align: "center", + dataIndex: 'wwcrs' + }, + { + title: '已提交', + align: "center", + dataIndex: 'ywcrs' }, ]; diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjForm.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjForm.vue index 8ae993e..5283ee5 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjForm.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjForm.vue @@ -15,9 +15,9 @@ {{index+1}}、 - +
@@ -34,9 +34,9 @@ {{index+1}}、 - + @@ -47,6 +47,23 @@
+ +
+
填空题
+ + + + + + + + + +
无对应类型
@@ -69,6 +86,7 @@ import { } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api'; const title = ref(''); const mainId = ref(''); +const isShow = ref(false); const disabled = ref(false); const confirmLoading = ref(false); const tiganData = ref([]); @@ -79,29 +97,38 @@ const { createMessage } = useMessage(); const emit = defineEmits(['ok', 'closeLoading']); //初始化 -function edit(record,isDisabled){ +function edit(record,isDisabled,type,flag){ openTime.value = getCurrentTimeFormat(); tiganData.value = []; disabled.value = isDisabled; + if(type == '6'){ + isShow.value = true; + }else if(type == '1'){ + isShow.value = false; + } title.value = record.title; mainId.value = record.id; - defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId',params:{id:record.id}}).then(res =>{ - // console.log(`🚀 ~ defHttp.get ~ res:`, res) - var list = res; - for(var i=0;i parseInt(str)); - list[i].itemSelected = numArray; + if(flag == 'ls'){ + defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId',params:{id:record.id}}).then(res =>{ + // console.log(`🚀 ~ defHttp.get ~ res:`, res) + let list = res; + for(let i=0;i parseInt(str)); + list[i].itemSelected = numArray; + } } - }else{ - par.itemSelected = null; } - } - tiganData.value = res; - }) + tiganData.value = res; + }) + }else{ + defHttp.get({url:'/wjxWjxxTmlb/wjxWjxxTmlb/queryDjByMainId',params:{id:record.id}}).then(res =>{ + tiganData.value = res; + }) + } } //提交数据 @@ -109,14 +136,22 @@ async function submitForm(){ const data = tiganData.value; // console.log(`🚀 ~ submitForm ~ data:`, data) const values = Object.assign([], data); - for(var i=0;i { - registerForm.value.edit(record,isDisabled); + registerForm.value.edit(record,isDisabled,type,flag); }); } diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue index 11a9654..1454f96 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgForm.vue @@ -54,6 +54,24 @@ + +
+
填空题
+ + + + + + + + + +
无对应类型
@@ -84,10 +102,10 @@ const { createMessage } = useMessage(); const emit = defineEmits(['register', 'success']); //初始化 -function edit(record){ +function edit(id){ tiganData.value = []; - mainId.value = record.id; - defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:record.id}}).then(res =>{ + mainId.value = id; + defHttp.get({url:'/wjxDjxx/queryByMainId',params:{id:id}}).then(res =>{ // console.log(`🚀 ~ defHttp.get ~ res:`, res) let djxx = res; let list = djxx.wjxDjxxTmxxList; diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue index de78e19..f54211a 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue @@ -19,11 +19,11 @@ * 编辑 * @param record */ - function edit(record) { + function edit(id) { title.value = disableSubmit.value ? '答卷结果' : '编辑'; visible.value = true; nextTick(() => { - registerForm.value.edit(record); + registerForm.value.edit(id); }); } diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts index bfb9a6c..72d5476 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgs.data.ts @@ -10,6 +10,12 @@ export const columns: BasicColumn[] = [ dataIndex: 'title', width: 200 }, + { + title: '学号', + align: "center", + dataIndex: 'userId', + width: 100 + }, { title: '学生', align: "center", @@ -78,6 +84,75 @@ export const columns: BasicColumn[] = [ }, ]; +export const dccolumns: BasicColumn[] = [ + { + title: '问卷名称', + align: "center", + dataIndex: 'title', + width: 200 + }, + { + title: '学号', + align: "center", + dataIndex: 'userId', + width: 100 + }, + { + title: '学生', + align: "center", + dataIndex: 'userName', + width: 100 + }, + { + title: '答卷时间', + align: "center", + dataIndex: 'openTime', + width: 150 + }, + { + title: '交卷时间', + align: "center", + dataIndex: 'commitTime', + width: 150 + }, + { + title: '答卷用时', + align: "center", + dataIndex: 'answerSfm', + width: 80 + }, + { + title: '学期学年', + align: "center", + dataIndex: 'xqxn', + width: 80 + }, + { + title: '课程名称', + align: "center", + dataIndex: 'kcmc', + width: 200 + }, + { + title: '开始时间', + align: "center", + dataIndex: 'startTime', + width: 150 + }, + { + title: '结束时间', + align: "center", + dataIndex: 'endTime', + width: 150 + }, + { + title: '问卷描述', + align: "center", + dataIndex: 'content', + width: 200 + }, +]; + //查询数据 export const searchFormSchema: FormSchema[] = [ ]; diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcList.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcList.vue new file mode 100644 index 0000000..6007dd2 --- /dev/null +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcList.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue new file mode 100644 index 0000000..531a213 --- /dev/null +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsList.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsList.vue index 9b632ba..231d0ca 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsList.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsList.vue @@ -3,7 +3,7 @@ -