From 586136a30e63fe5d1ac4824920c70c78f32d87d9 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 17 Jun 2024 17:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=97=AE=E5=8D=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8A=A5=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/zy/sysZy/kcwjgl/Kcwjgl.api.ts | 72 +++++ src/views/zy/sysZy/kcwjgl/Kcwjgl.data.ts | 91 ++++++ src/views/zy/sysZy/kcwjgl/KcwjglList.vue | 275 ++++++++++++++++ .../zy/sysZy/kcwjgl/components/KcwjglForm.vue | 306 ++++++++++++++++++ .../sysZy/kcwjgl/components/KcwjglModal.vue | 75 +++++ .../zy/sysZy/studentwjgl/Studentwjgl.api.ts | 72 +++++ .../zy/sysZy/studentwjgl/Studentwjgl.data.ts | 75 +++++ .../zy/sysZy/studentwjgl/StudentwjglList.vue | 278 ++++++++++++++++ 8 files changed, 1244 insertions(+) create mode 100644 src/views/zy/sysZy/kcwjgl/Kcwjgl.api.ts create mode 100644 src/views/zy/sysZy/kcwjgl/Kcwjgl.data.ts create mode 100644 src/views/zy/sysZy/kcwjgl/KcwjglList.vue create mode 100644 src/views/zy/sysZy/kcwjgl/components/KcwjglForm.vue create mode 100644 src/views/zy/sysZy/kcwjgl/components/KcwjglModal.vue create mode 100644 src/views/zy/sysZy/studentwjgl/Studentwjgl.api.ts create mode 100644 src/views/zy/sysZy/studentwjgl/Studentwjgl.data.ts create mode 100644 src/views/zy/sysZy/studentwjgl/StudentwjglList.vue diff --git a/src/views/zy/sysZy/kcwjgl/Kcwjgl.api.ts b/src/views/zy/sysZy/kcwjgl/Kcwjgl.api.ts new file mode 100644 index 0000000..aeeeff0 --- /dev/null +++ b/src/views/zy/sysZy/kcwjgl/Kcwjgl.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/wjxWjxx/wjxWjxx/sysList', + save='/wjxWjxx/wjxWjxx/sysUpdateJxnr', + edit='/wjxWjxx/wjxWjxx/sysUpdateJxnr', + deleteOne = '/wjxWjxx/wjxWjxx/delete', + deleteBatch = '/wjxWjxx/wjxWjxx/deleteBatch', + importExcel = '/wjxWjxx/wjxWjxx/importExcel', + exportXls = '/wjxWjxx/wjxWjxx/exportSysXls', +} + +/** + * 导出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/sysZy/kcwjgl/Kcwjgl.data.ts b/src/views/zy/sysZy/kcwjgl/Kcwjgl.data.ts new file mode 100644 index 0000000..aaec532 --- /dev/null +++ b/src/views/zy/sysZy/kcwjgl/Kcwjgl.data.ts @@ -0,0 +1,91 @@ +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: 'xqxn', + }, + { + title: '开课单位', + align: 'center', + dataIndex: 'kkdw', + }, + { + title: '课程编号', + align: 'center', + dataIndex: 'kcbh', + }, + { + title: '课程名称', + align: 'center', + dataIndex: 'kcmc', + }, + { + title: '开课任务编号', + align: 'center', + dataIndex: 'rwbh', + }, + { + title: '上课时间', + align: 'center', + dataIndex: 'sksj', + }, + { + title: '上课地点', + align: 'center', + dataIndex: 'skdd', + }, + { + title: '授课教师', + align: 'center', + dataIndex: 'skjs', + }, + { + title: '选课学生', + align: 'center', + dataIndex: 'xkrs', + }, + { + title: '问卷数量', + align: "center", + dataIndex: 'num', + }, + // { + // title: '课程简介', + // align: 'center', + // dataIndex: 'kcjs', + // }, + // { + // title: '教学日历', + // align: "center", + // dataIndex: 'jxrlFilePath', + // slots: { customRender: 'fileSlot2' }, + // width: '300' + // }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '附件', + field: 'filePath', + component: 'JUpload', + componentProps:{ + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/sysZy/kcwjgl/KcwjglList.vue b/src/views/zy/sysZy/kcwjgl/KcwjglList.vue new file mode 100644 index 0000000..3e8d317 --- /dev/null +++ b/src/views/zy/sysZy/kcwjgl/KcwjglList.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/src/views/zy/sysZy/kcwjgl/components/KcwjglForm.vue b/src/views/zy/sysZy/kcwjgl/components/KcwjglForm.vue new file mode 100644 index 0000000..54d750e --- /dev/null +++ b/src/views/zy/sysZy/kcwjgl/components/KcwjglForm.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/views/zy/sysZy/kcwjgl/components/KcwjglModal.vue b/src/views/zy/sysZy/kcwjgl/components/KcwjglModal.vue new file mode 100644 index 0000000..63da334 --- /dev/null +++ b/src/views/zy/sysZy/kcwjgl/components/KcwjglModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/zy/sysZy/studentwjgl/Studentwjgl.api.ts b/src/views/zy/sysZy/studentwjgl/Studentwjgl.api.ts new file mode 100644 index 0000000..d85e832 --- /dev/null +++ b/src/views/zy/sysZy/studentwjgl/Studentwjgl.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/wjxDjxx/sysWjglList', + save='/wjxDjxx/sysUpdateJxnr', + edit='/wjxDjxx/sysUpdateJxnr', + deleteOne = '/wjxDjxx/delete', + deleteBatch = '/wjxDjxx/deleteBatch', + importExcel = '/wjxDjxx/importExcel', + exportXls = '/wjxDjxx/exportWjglSysXls', +} + +/** + * 导出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/sysZy/studentwjgl/Studentwjgl.data.ts b/src/views/zy/sysZy/studentwjgl/Studentwjgl.data.ts new file mode 100644 index 0000000..607b5b5 --- /dev/null +++ b/src/views/zy/sysZy/studentwjgl/Studentwjgl.data.ts @@ -0,0 +1,75 @@ +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: 'xqxn', + }, + { + title: '课程名称', + align: 'center', + dataIndex: 'kcmc', + }, + { + title: '授课教师', + align: 'center', + dataIndex: 'skjs', + }, + { + title: '作业名称', + align: 'center', + dataIndex: 'title', + }, + { + title: '学生姓名', + align: 'center', + dataIndex: 'stuName', + }, + { + title: '学号', + align: 'center', + dataIndex: 'stuNo', + }, + { + title: '测验状态', + align: 'center', + dataIndex: 'status', + }, + { + title: '测验时间', + align: 'center', + dataIndex: 'createTime', + }, + // { + // title: '测验结果', + // align: "center", + // dataIndex: 'score', + // }, + +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '附件', + field: 'filePath', + component: 'JUpload', + componentProps:{ + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/sysZy/studentwjgl/StudentwjglList.vue b/src/views/zy/sysZy/studentwjgl/StudentwjglList.vue new file mode 100644 index 0000000..751111a --- /dev/null +++ b/src/views/zy/sysZy/studentwjgl/StudentwjglList.vue @@ -0,0 +1,278 @@ + + + + +