diff --git a/src/router/routes/modules/zy/zy.ts b/src/router/routes/modules/zy/zy.ts index 11430be..70a8d55 100644 --- a/src/router/routes/modules/zy/zy.ts +++ b/src/router/routes/modules/zy/zy.ts @@ -33,7 +33,7 @@ const zuoye: AppRouteModule = { { path: 'dqkcDqzy', name: 'dqkcDqzy', - component: () => import('/@/views/zy/zyInfo/ZyInfoList.vue'), + component: () => import('/@/views/zy/zyInfo/ZyInfoMainList.vue'), meta: { title: '当前作业', }, diff --git a/src/views/zy/zyInfo/ZyInfo.data.ts b/src/views/zy/zyInfo/ZyInfo.data.ts index 5d43ad3..207be31 100644 --- a/src/views/zy/zyInfo/ZyInfo.data.ts +++ b/src/views/zy/zyInfo/ZyInfo.data.ts @@ -9,16 +9,11 @@ export const columns: BasicColumn[] = [ align: "center", dataIndex: 'title' }, - { - title: '类型', - align: "center", - dataIndex: 'zyType_dictText' - }, - { - title: '描述', - align: "center", - dataIndex: 'content' - }, + // { + // title: '类型', + // align: "center", + // dataIndex: 'zyType_dictText' + // }, { title: '开始时间', align: "center", @@ -38,7 +33,7 @@ export const columns: BasicColumn[] = [ { title: '状态', align: "center", - dataIndex: 'zyStatus' + dataIndex: 'zyStatus_dictText' }, { title: '学年学期', @@ -46,34 +41,25 @@ export const columns: BasicColumn[] = [ dataIndex: 'xnxq' }, { - title: '外网是否查重', + title: '选课人数', align: "center", - dataIndex: 'wwcc_dictText' + dataIndex: 'xkxs' }, { - title: '外网通过率', + title: '未提交人数', align: "center", - dataIndex: 'wwtgl' + dataIndex: 'wtjnum', + customRender:({text}) =>{ + return text?text:"0"; + }, }, { - title: '内网查重', + title: '已提交人数', align: "center", - dataIndex: 'nwcc_dictText' - }, - { - title: '内网通过率', - align: "center", - dataIndex: 'nwtgl' - }, - { - title: 'aigc查重', - align: "center", - dataIndex: 'aigccc_dictText' - }, - { - title: 'aigc通过率', - align: "center", - dataIndex: 'aigctgl' + dataIndex: 'ytjnum', + customRender:({text}) =>{ + return text?text:"0"; + }, }, ]; diff --git a/src/views/zy/zyInfo/ZyInfoList copy.vue b/src/views/zy/zyInfo/ZyInfoLiebiaoList.vue similarity index 68% rename from src/views/zy/zyInfo/ZyInfoList copy.vue rename to src/views/zy/zyInfo/ZyInfoLiebiaoList.vue index 5040a44..58e5cb6 100644 --- a/src/views/zy/zyInfo/ZyInfoList copy.vue +++ b/src/views/zy/zyInfo/ZyInfoLiebiaoList.vue @@ -9,28 +9,18 @@ - - - - - - - + + - - - - - - 查询 重置 + 新增 - - - - 新增 - 导出 - 导入 - - - - - - 删除 - - - - 批量操作 - - - - + - + @@ -81,6 +52,7 @@ + @@ -92,21 +64,25 @@ import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api'; import { downloadFile } from '/@/utils/common/renderUtils'; import ZyInfoModal from './components/ZyInfoModal.vue' + import { useMessage } from "/@/hooks/web/useMessage"; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; + import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue'; + import { defHttp } from '/@/utils/http/axios'; const queryParam = ref({}); const toggleSearchStatus = ref(false); const registerModal = ref(); + const ZyInfoStudentListModalPage = ref(); + const { createConfirm,createMessage } = useMessage(); //注册table数据 const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { - title: '作业发布', api: list, columns, canResize:false, useSearchForm: false, actionColumn: { - width: 120, + width: 220, fixed: 'right', }, beforeFetch: (params) => { @@ -182,29 +158,79 @@ * 操作栏 */ function getTableAction(record) { - return [ + var list = []; + if(record.zyStatus=='0'){ + list = [ + { + label: '编辑', + onClick: handleEdit.bind(null, record), + }, + { + label: '详情', + onClick: handleDetail.bind(null, record), + }, + { + label: '发布', + onClick: handleFabu.bind(null, record), + }, { + label: '删除', + popConfirm: { + title: '是否确认删除', + confirm: handleDelete.bind(null, record), + } + } + ]; + }else{ + list = [ { - label: '编辑', - onClick: handleEdit.bind(null, record), - }, - ]; + label: '详情', + onClick: handleDetail.bind(null, record), + }, + { + label: '作业', + onClick: handleZyxx.bind(null, record), + }, + ] + } + return list; } + //查看作业信息 + function handleZyxx(record){ + ZyInfoStudentListModalPage.value.disableSubmit = true; + ZyInfoStudentListModalPage.value.init(record); + + } + //发布作业 + async function handleFabu(record){ + createConfirm({ + iconType: 'warning', + title: '确认发布', + content: '是否发布作业数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + var url = "/zyInfo/zyInfo/edit"; + var params = {id:record.id,zyStatus:'1'}; + defHttp.post({ url: url, params }).then((res) => { + handleZySuccess(record.id); + }); + } + }); + } + + + function handleZySuccess(zyid){ + var url = "/zyInfo/zyInfo/editStudent"; + defHttp.get({ url: url, params:{id:zyid} }).then((res) => { + }); + setTimeout(()=>{handleSuccess()}, 1500); + } /** * 下拉操作栏 */ function getDropDownAction(record) { return [ - { - label: '详情', - onClick: handleDetail.bind(null, record), - }, { - label: '删除', - popConfirm: { - title: '是否确认删除', - confirm: handleDelete.bind(null, record), - } - } ] } diff --git a/src/views/zy/zyInfo/ZyInfoList.vue b/src/views/zy/zyInfo/ZyInfoList.vue index aa709bc..128e67e 100644 --- a/src/views/zy/zyInfo/ZyInfoList.vue +++ b/src/views/zy/zyInfo/ZyInfoList.vue @@ -39,7 +39,7 @@ - + {{item.zyStatus_dictText}} @@ -47,6 +47,8 @@ 时间:{{item.startTime}} - {{item.endTime}} {{item.xnxq}}{{item.xkxs}}人选课 + 未提交:{{item.wtjnum?item.wtjnum:0}}人;已提交:{{item.ytjnum?item.ytjnum:0}}人 + 编辑 发布 diff --git a/src/views/zy/zyInfo/ZyInfoMainList.vue b/src/views/zy/zyInfo/ZyInfoMainList.vue new file mode 100644 index 0000000..f5543ca --- /dev/null +++ b/src/views/zy/zyInfo/ZyInfoMainList.vue @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts b/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts index 03cad2b..cb97f7a 100644 --- a/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts +++ b/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts @@ -19,6 +19,11 @@ export const columns: BasicColumn[] = [ align: "center", dataIndex: 'createTime' }, + { + title: '评分', + align: "center", + dataIndex: 'score' + }, // { // title: '作业附件', // align: "center",