From 02a9be5a889ad61408bae16d972b01eb9ed80760 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Thu, 20 Jul 2023 00:06:30 +0800 Subject: [PATCH] =?UTF-8?q?2023=E5=B9=B47=E6=9C=8820=E6=97=A5=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=B0=83=E5=81=9C=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kc/xxhbtkxx/Xxhbtkxx.api.ts | 72 +++ src/views/kc/xxhbtkxx/Xxhbtkxx.data.ts | 436 ++++++++++++++++++ src/views/kc/xxhbtkxx/XxhbtkxxList.vue | 363 +++++++++++++++ .../kc/xxhbtkxx/components/XxhbtkxxForm.vue | 276 +++++++++++ .../kc/xxhbtkxx/components/XxhbtkxxModal.vue | 75 +++ 5 files changed, 1222 insertions(+) create mode 100644 src/views/kc/xxhbtkxx/Xxhbtkxx.api.ts create mode 100644 src/views/kc/xxhbtkxx/Xxhbtkxx.data.ts create mode 100644 src/views/kc/xxhbtkxx/XxhbtkxxList.vue create mode 100644 src/views/kc/xxhbtkxx/components/XxhbtkxxForm.vue create mode 100644 src/views/kc/xxhbtkxx/components/XxhbtkxxModal.vue diff --git a/src/views/kc/xxhbtkxx/Xxhbtkxx.api.ts b/src/views/kc/xxhbtkxx/Xxhbtkxx.api.ts new file mode 100644 index 0000000..93c2063 --- /dev/null +++ b/src/views/kc/xxhbtkxx/Xxhbtkxx.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/grab/imports/xxhbtkxx/list', + save='/grab/imports/xxhbtkxx/add', + edit='/grab/imports/xxhbtkxx/edit', + deleteOne = '/grab/imports/xxhbtkxx/delete', + deleteBatch = '/grab/imports/xxhbtkxx/deleteBatch', + importExcel = '/grab/imports/xxhbtkxx/importExcel', + exportXls = '/grab/imports/xxhbtkxx/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/kc/xxhbtkxx/Xxhbtkxx.data.ts b/src/views/kc/xxhbtkxx/Xxhbtkxx.data.ts new file mode 100644 index 0000000..92111f2 --- /dev/null +++ b/src/views/kc/xxhbtkxx/Xxhbtkxx.data.ts @@ -0,0 +1,436 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { log } from 'console'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '姓名', + align: "center", + dataIndex: 'xm' + }, + { + title: '创建人', + align: "center", + dataIndex: 'cjr' + }, + { + title: '手机号', + align: "center", + dataIndex: 'sjh' + }, + { + title: '调课事由', + align: "center", + dataIndex: 'tksy' + }, + // { + // title: 'xyjwmsshyj', + // align: "center", + // dataIndex: 'xyjwmsshyj' + // }, + { + title: 'yjxq', + align: "center", + dataIndex: 'yjxq' + }, + { + title: '申请人单位', + align: "center", + dataIndex: 'sqrdw' + }, + // { + // title: 'bizbh', + // align: "center", + // dataIndex: 'bizbh' + // }, + // { + // title: 'jwcsh', + // align: "center", + // dataIndex: 'jwcsh' + // }, + // { + // title: 'szxyldshyj', + // align: "center", + // dataIndex: 'szxyldshyj' + // }, + // { + // title: 'shxq', + // align: "center", + // dataIndex: 'shxq' + // }, + // { + // title: 'lcjgbh', + // align: "center", + // dataIndex: 'lcjgbh' + // }, + { + title: '补课计划', + align: "center", + dataIndex: 'bkjh' + }, + { + title: '时间戳', + align: "center", + dataIndex: 'timestamps' + }, + { + title: '课程名称', + align: "center", + dataIndex: 'kcmc' + }, + // { + // title: 'pbh', + // align: "center", + // dataIndex: 'pbh' + // }, + { + title: '教材', + align: "center", + dataIndex: 'jc' + }, + { + title: '上课日期', + align: "center", + dataIndex: 'skrq' + }, + { + title: '课程信息编号', + align: "center", + dataIndex: 'kcxxbh' + }, + { + title: '学期', + align: "center", + dataIndex: 'xq' + }, + { + title: '教师工号', + align: "center", + dataIndex: 'jsgh' + }, + { + title: '编号', + align: "center", + dataIndex: 'bh' + }, + { + title: '授课教室', + align: "center", + dataIndex: 'skjs' + }, + // { + // title: 'lcbh', + // align: "center", + // dataIndex: 'lcbh' + // }, + { + title: '调整事由', + align: "center", + dataIndex: 'tklx', + customRender: ({ text }) => { + if(text == '1'){ + return '调整时间'; + }else if(text == '2'){ + return '调整地点'; + }else if(text == '3'){ + return '更换教师'; + }else if(text == '4'){ + return '其他'; + }else{ + return ''; + } + } + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "姓名", + field: 'xm', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "cjr", + field: 'cjr', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "sjh", + field: 'sjh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "tksy", + field: 'tksy', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "xyjwmsshyj", + field: 'xyjwmsshyj', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "yjxq", + field: 'yjxq', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "sqrdw", + field: 'sqrdw', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "bizbh", + field: 'bizbh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "jwcsh", + field: 'jwcsh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "szxyldshyj", + field: 'szxyldshyj', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "shxq", + field: 'shxq', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "lcjgbh", + field: 'lcjgbh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "bkjh", + field: 'bkjh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "时间戳", + field: 'timestamps', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "课程名称", + field: 'kcmc', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "pbh", + field: 'pbh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "教材", + field: 'jc', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "上课日期", + field: 'skrq', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "kcxxbh", + field: 'kcxxbh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "学期", + field: 'xq', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "jsgh", + field: 'jsgh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "编号", + field: 'bh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "授课教师", + field: 'skjs', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "lcbh", + field: 'lcbh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "1-调整时间,2-调整地点,3-更换教师,4-其他", + field: 'tklx', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '姓名', + field: 'xm', + component: 'Input', + }, + { + label: 'cjr', + field: 'cjr', + component: 'Input', + }, + { + label: 'sjh', + field: 'sjh', + component: 'Input', + }, + { + label: 'tksy', + field: 'tksy', + component: 'Input', + }, + { + label: 'xyjwmsshyj', + field: 'xyjwmsshyj', + component: 'Input', + }, + { + label: 'yjxq', + field: 'yjxq', + component: 'Input', + }, + { + label: 'sqrdw', + field: 'sqrdw', + component: 'Input', + }, + { + label: 'bizbh', + field: 'bizbh', + component: 'Input', + }, + { + label: 'jwcsh', + field: 'jwcsh', + component: 'Input', + }, + { + label: 'szxyldshyj', + field: 'szxyldshyj', + component: 'Input', + }, + { + label: 'shxq', + field: 'shxq', + component: 'Input', + }, + { + label: 'lcjgbh', + field: 'lcjgbh', + component: 'Input', + }, + { + label: 'bkjh', + field: 'bkjh', + component: 'Input', + }, + { + label: '时间戳', + field: 'timestamps', + component: 'Input', + }, + { + label: '课程名称', + field: 'kcmc', + component: 'Input', + }, + { + label: 'pbh', + field: 'pbh', + component: 'Input', + }, + { + label: '教材', + field: 'jc', + component: 'Input', + }, + { + label: '上课日期', + field: 'skrq', + component: 'Input', + }, + { + label: 'kcxxbh', + field: 'kcxxbh', + component: 'Input', + }, + { + label: '学期', + field: 'xq', + component: 'Input', + }, + { + label: 'jsgh', + field: 'jsgh', + component: 'Input', + }, + { + label: '编号', + field: 'bh', + component: 'Input', + }, + { + label: '授课教师', + field: 'skjs', + component: 'Input', + }, + { + label: 'lcbh', + field: 'lcbh', + component: 'Input', + }, + { + label: '1-调整时间,2-调整地点,3-更换教师,4-其他', + field: 'tklx', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/kc/xxhbtkxx/XxhbtkxxList.vue b/src/views/kc/xxhbtkxx/XxhbtkxxList.vue new file mode 100644 index 0000000..f237f43 --- /dev/null +++ b/src/views/kc/xxhbtkxx/XxhbtkxxList.vue @@ -0,0 +1,363 @@ + + + + + diff --git a/src/views/kc/xxhbtkxx/components/XxhbtkxxForm.vue b/src/views/kc/xxhbtkxx/components/XxhbtkxxForm.vue new file mode 100644 index 0000000..bea3bca --- /dev/null +++ b/src/views/kc/xxhbtkxx/components/XxhbtkxxForm.vue @@ -0,0 +1,276 @@ + + + + + diff --git a/src/views/kc/xxhbtkxx/components/XxhbtkxxModal.vue b/src/views/kc/xxhbtkxx/components/XxhbtkxxModal.vue new file mode 100644 index 0000000..fd6c67e --- /dev/null +++ b/src/views/kc/xxhbtkxx/components/XxhbtkxxModal.vue @@ -0,0 +1,75 @@ + + + + +