From 426450f48f7c51bcbcc979f21cfc1bdfdd30169f Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 6 May 2024 19:41:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=87=E6=8D=A2=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes/index.ts | 12 +- src/router/routes/modules/site/site.ts | 19 +- src/router/routes/modules/zy/zy.ts | 52 ++++ .../KcEvaluationsHisrecord.data.ts | 18 ++ .../renKeJiaoCheng/checkKecheng/dqxqkc.vue | 9 +- .../checkKecheng/dqxqkcDetail.vue | 149 +---------- .../checkKecheng/dqxqkcMain.vue | 95 +++++++ .../checkKecheng/dqxqkcMenu.vue | 111 ++++++++ src/views/zy/zyInfo/ZyInfo.api.ts | 72 +++++ src/views/zy/zyInfo/ZyInfo.data.ts | 240 +++++++++++++++++ src/views/zy/zyInfo/ZyInfoList copy.vue | 250 ++++++++++++++++++ src/views/zy/zyInfo/ZyInfoList.vue | 250 ++++++++++++++++++ src/views/zy/zyInfo/components/ZyInfoForm.vue | 200 ++++++++++++++ .../zy/zyInfo/components/ZyInfoModal.vue | 75 ++++++ .../zy/zyInfoStudent/ZyInfoStudent.api.ts | 72 +++++ .../zy/zyInfoStudent/ZyInfoStudent.data.ts | 81 ++++++ .../zy/zyInfoStudent/ZyInfoStudentList.vue | 233 ++++++++++++++++ .../components/ZyInfoStudentForm.vue | 129 +++++++++ .../components/ZyInfoStudentModal.vue | 75 ++++++ 19 files changed, 1983 insertions(+), 159 deletions(-) create mode 100644 src/router/routes/modules/zy/zy.ts create mode 100644 src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMain.vue create mode 100644 src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue create mode 100644 src/views/zy/zyInfo/ZyInfo.api.ts create mode 100644 src/views/zy/zyInfo/ZyInfo.data.ts create mode 100644 src/views/zy/zyInfo/ZyInfoList copy.vue create mode 100644 src/views/zy/zyInfo/ZyInfoList.vue create mode 100644 src/views/zy/zyInfo/components/ZyInfoForm.vue create mode 100644 src/views/zy/zyInfo/components/ZyInfoModal.vue create mode 100644 src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts create mode 100644 src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts create mode 100644 src/views/zy/zyInfoStudent/ZyInfoStudentList.vue create mode 100644 src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue create mode 100644 src/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index 4276420..fe55f74 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -6,19 +6,27 @@ import { mainOutRoutes } from './mainOut'; import { PageEnum } from '/@/enums/pageEnum'; import { t } from '/@/hooks/web/useI18n'; -import NoTokenSiteRoute from './modules/site/site'; +// import NoTokenSiteRoute from './modules/site/site'; +// import NoTokenZyRoute from './modules/zy/zy'; // import NoTokenSiteRoute from './modules/site.ts'; // const NoTokenSiteRoute = import.meta.glob('./modules/site/site.ts', { eager: true }); const modules = import.meta.glob('./modules/**/*.ts', { eager: true }); +// console.log(`🚀 ~ modules:`, modules) + const routeModuleList: AppRouteModule[] = []; +const routeModuleStaticList: AppRouteModule[] = []; + // 加入到路由集合中 Object.keys(modules).forEach((key) => { const mod = (modules as Recordable)[key].default || {}; const modList = Array.isArray(mod) ? [...mod] : [mod]; + if(modList[0] && modList[0]?.meta?.isAddStaticPath){ + routeModuleStaticList.push(...modList) + } routeModuleList.push(...modList); }); @@ -85,5 +93,5 @@ export const basicRoutes = [ PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute, - NoTokenSiteRoute, + ...routeModuleStaticList, ]; diff --git a/src/router/routes/modules/site/site.ts b/src/router/routes/modules/site/site.ts index c0461cb..8051074 100644 --- a/src/router/routes/modules/site/site.ts +++ b/src/router/routes/modules/site/site.ts @@ -9,6 +9,7 @@ const site: AppRouteModule = { component: () => import('/@/layouts/page/index.vue'), redirect: '/site/index', meta: { + isAddStaticPath: true,//是否静态引入(不用配置menu表) orderNo: 10, icon: 'ion:grid-outline', title: t('routes.dashboard.dashboard'), @@ -189,24 +190,6 @@ const site: AppRouteModule = { title: '选择课程', }, }, - { - path: 'dqkcDetail', - name: 'dqkcDetail', - component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue'), - meta: { - title: '课程工作台', - }, - }, - { - path: 'dqkcGongju', - name: 'dqkcGongju', - component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcGongju.vue'), - meta: { - title: '课程工具', - }, - }, - - ], }; diff --git a/src/router/routes/modules/zy/zy.ts b/src/router/routes/modules/zy/zy.ts new file mode 100644 index 0000000..cf8d1da --- /dev/null +++ b/src/router/routes/modules/zy/zy.ts @@ -0,0 +1,52 @@ +import type { AppRouteModule } from '/@/router/types'; + +// import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const zuoye: AppRouteModule = { + path: '/zy', + name: 'zy', + component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMain.vue'), + redirect: '/zy/main', + meta: { + isAddStaticPath: true,//是否静态引入(不用配置menu表) + orderNo: 103, + title: '作业', + }, + children: [ + { + path: 'main', + name: 'zuoyeMain', + meta: { + title: '作业管理', + }, + component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue'), + }, + { + path: 'dqkcDetail', + name: 'dqkcDetail', + component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue'), + meta: { + title: '课程工作台', + }, + }, + { + path: 'dqkcDqzy', + name: 'dqkcDqzy', + component: () => import('/@/views/zy/zyInfo/ZyInfoList.vue'), + meta: { + title: '当前作业', + }, + }, + { + path: 'dqkcGongju', + name: 'dqkcGongju', + component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcGongju.vue'), + meta: { + title: '课程工具', + }, + }, + ] +} + +export default zuoye; diff --git a/src/views/kc/kcEvaluationsHisrecord/KcEvaluationsHisrecord.data.ts b/src/views/kc/kcEvaluationsHisrecord/KcEvaluationsHisrecord.data.ts index 0dc1f4f..404fc6a 100644 --- a/src/views/kc/kcEvaluationsHisrecord/KcEvaluationsHisrecord.data.ts +++ b/src/views/kc/kcEvaluationsHisrecord/KcEvaluationsHisrecord.data.ts @@ -92,6 +92,24 @@ export const columns: BasicColumn[] = [ ]; //查询数据 export const searchFormSchema: FormSchema[] = [ + { + label: '学年学期', + field: 'xnxq', + component: 'JDictSelectTag', + componentProps:{ + dictCode:'kc_xqxn_history,title,title' + }, + }, + { + label: '课程名称', + field: 'kcmc', + component: 'JInput', + }, + { + label: '听课教师', + field: 'tkjs', + component: 'JInput', + }, ]; //表单数据 export const formSchema: FormSchema[] = [ diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue index b5cc240..b46ebff 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue @@ -4,7 +4,7 @@
-
{{ toWeek(item.week) }},第{{ item.hh }}节
+
{{ item.sksj }}
{{ item.kcmc }}
@@ -22,8 +22,11 @@ import { getUserSf,getSysConfig } from '/@/views/site/utils/index'; import { defHttp } from '/@/utils/http/axios'; + + import { router } from '/@/router'; + import { useRouter } from 'vue-router'; + const allList = ref([]); - const weebMap = { '1': '星期一', @@ -47,7 +50,7 @@ function toWeek(week){ function openKechengDetail(item){ console.log(`🚀 ~ openKechengDetail ~ item:`, item) - window.open(`/site/dqkcDetail?kechengbiaoid=`+item.id,"_blank"); + window.open(`/zy/dqkcDetail?rwbh=`+item.rwbh,"_blank"); } \ No newline at end of file diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMain.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMain.vue new file mode 100644 index 0000000..0e9203e --- /dev/null +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMain.vue @@ -0,0 +1,95 @@ + + + + \ No newline at end of file diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue new file mode 100644 index 0000000..90777f0 --- /dev/null +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue @@ -0,0 +1,111 @@ + + + + \ No newline at end of file diff --git a/src/views/zy/zyInfo/ZyInfo.api.ts b/src/views/zy/zyInfo/ZyInfo.api.ts new file mode 100644 index 0000000..b4ba19d --- /dev/null +++ b/src/views/zy/zyInfo/ZyInfo.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/zyInfo/zyInfo/list', + save='/zyInfo/zyInfo/add', + edit='/zyInfo/zyInfo/edit', + deleteOne = '/zyInfo/zyInfo/delete', + deleteBatch = '/zyInfo/zyInfo/deleteBatch', + importExcel = '/zyInfo/zyInfo/importExcel', + exportXls = '/zyInfo/zyInfo/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/zy/zyInfo/ZyInfo.data.ts b/src/views/zy/zyInfo/ZyInfo.data.ts new file mode 100644 index 0000000..5d43ad3 --- /dev/null +++ b/src/views/zy/zyInfo/ZyInfo.data.ts @@ -0,0 +1,240 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '作业名称', + align: "center", + dataIndex: 'title' + }, + { + title: '类型', + align: "center", + dataIndex: 'zyType_dictText' + }, + { + title: '描述', + align: "center", + dataIndex: 'content' + }, + { + title: '开始时间', + align: "center", + dataIndex: 'startTime', + customRender:({text}) =>{ + return !text?"":(text.length>10?text.substr(0,10):text); + }, + }, + { + title: '结束时间', + align: "center", + dataIndex: 'endTime', + customRender:({text}) =>{ + return !text?"":(text.length>10?text.substr(0,10):text); + }, + }, + { + title: '状态', + align: "center", + dataIndex: 'zyStatus' + }, + { + title: '学年学期', + align: "center", + dataIndex: 'xnxq' + }, + { + title: '外网是否查重', + align: "center", + dataIndex: 'wwcc_dictText' + }, + { + title: '外网通过率', + align: "center", + dataIndex: 'wwtgl' + }, + { + title: '内网查重', + align: "center", + dataIndex: 'nwcc_dictText' + }, + { + title: '内网通过率', + align: "center", + dataIndex: 'nwtgl' + }, + { + title: 'aigc查重', + align: "center", + dataIndex: 'aigccc_dictText' + }, + { + title: 'aigc通过率', + align: "center", + dataIndex: 'aigctgl' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "作业名称", + field: 'title', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "类型", + field: 'zyType', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "zy_type" + }, + colProps: {span: 6}, + }, + { + label: "状态", + field: 'zyStatus', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "学年学期", + field: 'xnxq', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '作业名称', + field: 'title', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入作业名称!'}, + ]; + }, + }, + { + label: '类型', + field: 'zyType', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "zy_type" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入类型!'}, + ]; + }, + }, + { + label: '描述', + field: 'content', + component: 'Input', + }, + { + label: '开始时间', + field: 'startTime', + component: 'DatePicker', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入开始时间!'}, + ]; + }, + }, + { + label: '结束时间', + field: 'endTime', + component: 'DatePicker', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入结束时间!'}, + ]; + }, + }, + { + label: '外网是否查重', + field: 'wwcc', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "yn" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入外网是否查重!'}, + ]; + }, + }, + { + label: '外网通过率', + field: 'wwtgl', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'}, + ]; + }, + }, + { + label: '内网查重', + field: 'nwcc', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "yn" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入内网查重!'}, + ]; + }, + }, + { + label: '内网通过率', + field: 'nwtgl', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'}, + ]; + }, + }, + { + label: 'aigc查重', + field: 'aigccc', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "yn" + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入aigc查重!'}, + ]; + }, + }, + { + label: 'aigc通过率', + field: 'aigctgl', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'}, + ]; + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/zyInfo/ZyInfoList copy.vue b/src/views/zy/zyInfo/ZyInfoList copy.vue new file mode 100644 index 0000000..5040a44 --- /dev/null +++ b/src/views/zy/zyInfo/ZyInfoList copy.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/zy/zyInfo/ZyInfoList.vue b/src/views/zy/zyInfo/ZyInfoList.vue new file mode 100644 index 0000000..5040a44 --- /dev/null +++ b/src/views/zy/zyInfo/ZyInfoList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/zy/zyInfo/components/ZyInfoForm.vue b/src/views/zy/zyInfo/components/ZyInfoForm.vue new file mode 100644 index 0000000..2d9bba0 --- /dev/null +++ b/src/views/zy/zyInfo/components/ZyInfoForm.vue @@ -0,0 +1,200 @@ + + + + + diff --git a/src/views/zy/zyInfo/components/ZyInfoModal.vue b/src/views/zy/zyInfo/components/ZyInfoModal.vue new file mode 100644 index 0000000..664bc7c --- /dev/null +++ b/src/views/zy/zyInfo/components/ZyInfoModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts b/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts new file mode 100644 index 0000000..80fb88b --- /dev/null +++ b/src/views/zy/zyInfoStudent/ZyInfoStudent.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/zyInfoStudent/zyInfoStudent/list', + save='/zyInfoStudent/zyInfoStudent/add', + edit='/zyInfoStudent/zyInfoStudent/edit', + deleteOne = '/zyInfoStudent/zyInfoStudent/delete', + deleteBatch = '/zyInfoStudent/zyInfoStudent/deleteBatch', + importExcel = '/zyInfoStudent/zyInfoStudent/importExcel', + exportXls = '/zyInfoStudent/zyInfoStudent/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts b/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts new file mode 100644 index 0000000..9fb1932 --- /dev/null +++ b/src/views/zy/zyInfoStudent/ZyInfoStudent.data.ts @@ -0,0 +1,81 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '作业名称', + align: "center", + dataIndex: 'mainId' + }, + { + title: '作业附件', + align: "center", + dataIndex: 'filePath', + slots: { customRender: 'fileSlot' }, + }, + { + title: '外网相似律', + align: "center", + dataIndex: 'wwxsl' + }, + { + title: '内网相似律', + align: "center", + dataIndex: 'nwxsl' + }, + { + title: 'aigc相似律', + align: "center", + dataIndex: 'aigcxsl' + }, + { + title: '外网是否通过', + align: "center", + dataIndex: 'wwsftg' + }, + { + title: '内网是否通过', + align: "center", + dataIndex: 'nwsftg' + }, + { + title: 'aigc是否通过', + align: "center", + dataIndex: 'aigcsftg' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "作业名称", + field: 'mainId', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '作业附件', + field: 'filePath', + component: 'JUpload', + componentProps:{ + }, + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入作业附件!'}, + ]; + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/zyInfoStudent/ZyInfoStudentList.vue b/src/views/zy/zyInfoStudent/ZyInfoStudentList.vue new file mode 100644 index 0000000..784d6a1 --- /dev/null +++ b/src/views/zy/zyInfoStudent/ZyInfoStudentList.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue b/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue new file mode 100644 index 0000000..e186122 --- /dev/null +++ b/src/views/zy/zyInfoStudent/components/ZyInfoStudentForm.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue b/src/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue new file mode 100644 index 0000000..827632d --- /dev/null +++ b/src/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue @@ -0,0 +1,75 @@ + + + + +