From 9ce25b825e74e7042cf2a3c20ec1c55241de45ec Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 20 May 2024 18:19:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes/modules/site/site.ts | 8 + src/router/routes/modules/zy/zy.ts | 8 + src/utils/common/compUtils.ts | 4 +- .../checkKecheng/dqxqkcMenu.vue | 5 + src/views/zy/zyTlq/TlqJiaohuList.vue | 206 +++++++++++++++++ src/views/zy/zyTlq/ZyTlq.api.ts | 72 ++++++ src/views/zy/zyTlq/ZyTlq.data.ts | 42 ++++ src/views/zy/zyTlq/ZyTlqList copy.vue | 215 ++++++++++++++++++ src/views/zy/zyTlq/ZyTlqList.vue | 198 ++++++++++++++++ src/views/zy/zyTlq/components/ZyTlqForm.vue | 147 ++++++++++++ src/views/zy/zyTlq/components/ZyTlqModal.vue | 75 ++++++ src/views/zy/zyTlqContent/ZyTlqContent.api.ts | 72 ++++++ .../zy/zyTlqContent/ZyTlqContent.data.ts | 72 ++++++ .../zy/zyTlqContent/ZyTlqContentList.vue | 215 ++++++++++++++++++ .../components/ZyTlqContentForm.vue | 151 ++++++++++++ .../components/ZyTlqContentModal.vue | 75 ++++++ 16 files changed, 1563 insertions(+), 2 deletions(-) create mode 100644 src/views/zy/zyTlq/TlqJiaohuList.vue create mode 100644 src/views/zy/zyTlq/ZyTlq.api.ts create mode 100644 src/views/zy/zyTlq/ZyTlq.data.ts create mode 100644 src/views/zy/zyTlq/ZyTlqList copy.vue create mode 100644 src/views/zy/zyTlq/ZyTlqList.vue create mode 100644 src/views/zy/zyTlq/components/ZyTlqForm.vue create mode 100644 src/views/zy/zyTlq/components/ZyTlqModal.vue create mode 100644 src/views/zy/zyTlqContent/ZyTlqContent.api.ts create mode 100644 src/views/zy/zyTlqContent/ZyTlqContent.data.ts create mode 100644 src/views/zy/zyTlqContent/ZyTlqContentList.vue create mode 100644 src/views/zy/zyTlqContent/components/ZyTlqContentForm.vue create mode 100644 src/views/zy/zyTlqContent/components/ZyTlqContentModal.vue diff --git a/src/router/routes/modules/site/site.ts b/src/router/routes/modules/site/site.ts index 44e0e53..233c501 100644 --- a/src/router/routes/modules/site/site.ts +++ b/src/router/routes/modules/site/site.ts @@ -199,6 +199,14 @@ const site: AppRouteModule = { title: '选择课程', }, }, + { + path: 'dqkcTlqjh', + name: 'dqkcTlqjh', + component: () => import('/@/views/zy/zyTlq/TlqJiaohuList.vue'), + meta: { + title: '讨论区', + }, + }, ], }; diff --git a/src/router/routes/modules/zy/zy.ts b/src/router/routes/modules/zy/zy.ts index 3fe9d45..203c119 100644 --- a/src/router/routes/modules/zy/zy.ts +++ b/src/router/routes/modules/zy/zy.ts @@ -87,6 +87,14 @@ const zuoye: AppRouteModule = { title: '调查问卷', }, }, + { + path: 'dqkcTlq', + name: 'dqkcTlq', + component: () => import('/@/views/zy/zyTlq/ZyTlqList.vue'), + meta: { + title: '讨论区', + }, + }, ] } diff --git a/src/utils/common/compUtils.ts b/src/utils/common/compUtils.ts index fd34aa6..f64736b 100644 --- a/src/utils/common/compUtils.ts +++ b/src/utils/common/compUtils.ts @@ -17,8 +17,8 @@ export const getFileAccessHttpUrl = (fileUrl, prefix = 'http') => { //判断是否是数组格式 let isArray = fileUrl.indexOf('[') != -1; if (!isArray) { - // let prefix = `${baseApiUrl}/sys/common/static/`; - let prefix = `${baseApiUrl}/zyk/zykInfo/static/`; + let prefix = `${baseApiUrl}/sys/common/static/`; + // let prefix = `${baseApiUrl}/zyk/zykInfo/static/`; // 判断是否已包含前缀 if (!fileUrl.startsWith(prefix)) { result = `${prefix}${fileUrl}`; diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue index e2d6b07..5f49f41 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue @@ -26,6 +26,9 @@ 教学资源库 + + 讨论区 + @@ -82,6 +85,8 @@ href = "/zy/ceshiWenjuan"; }else if(zytype=='gongju'){ href = "/zy/dqkcGongju"; + }else if(zytype=='tlq'){ + href = "/zy/dqkcTlq"; } router.push({path:href,query: {rwbh,xqxn,type}}); diff --git a/src/views/zy/zyTlq/TlqJiaohuList.vue b/src/views/zy/zyTlq/TlqJiaohuList.vue new file mode 100644 index 0000000..73c0d69 --- /dev/null +++ b/src/views/zy/zyTlq/TlqJiaohuList.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/views/zy/zyTlq/ZyTlq.api.ts b/src/views/zy/zyTlq/ZyTlq.api.ts new file mode 100644 index 0000000..0d930c3 --- /dev/null +++ b/src/views/zy/zyTlq/ZyTlq.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/zyTlq/zyTlq/list', + save='/zyTlq/zyTlq/add', + edit='/zyTlq/zyTlq/edit', + deleteOne = '/zyTlq/zyTlq/delete', + deleteBatch = '/zyTlq/zyTlq/deleteBatch', + importExcel = '/zyTlq/zyTlq/importExcel', + exportXls = '/zyTlq/zyTlq/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/zyTlq/ZyTlq.data.ts b/src/views/zy/zyTlq/ZyTlq.data.ts new file mode 100644 index 0000000..7ab0af7 --- /dev/null +++ b/src/views/zy/zyTlq/ZyTlq.data.ts @@ -0,0 +1,42 @@ +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: 'mainId', + align: "center", + dataIndex: 'mainId' + }, + { + title: '标题', + align: "center", + dataIndex: 'title' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: 'mainId', + field: 'mainId', + component: 'Input', + }, + { + label: '标题', + field: 'title', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/zyTlq/ZyTlqList copy.vue b/src/views/zy/zyTlq/ZyTlqList copy.vue new file mode 100644 index 0000000..772bbde --- /dev/null +++ b/src/views/zy/zyTlq/ZyTlqList copy.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/src/views/zy/zyTlq/ZyTlqList.vue b/src/views/zy/zyTlq/ZyTlqList.vue new file mode 100644 index 0000000..19bd147 --- /dev/null +++ b/src/views/zy/zyTlq/ZyTlqList.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/src/views/zy/zyTlq/components/ZyTlqForm.vue b/src/views/zy/zyTlq/components/ZyTlqForm.vue new file mode 100644 index 0000000..660c400 --- /dev/null +++ b/src/views/zy/zyTlq/components/ZyTlqForm.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/views/zy/zyTlq/components/ZyTlqModal.vue b/src/views/zy/zyTlq/components/ZyTlqModal.vue new file mode 100644 index 0000000..45f5434 --- /dev/null +++ b/src/views/zy/zyTlq/components/ZyTlqModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/zy/zyTlqContent/ZyTlqContent.api.ts b/src/views/zy/zyTlqContent/ZyTlqContent.api.ts new file mode 100644 index 0000000..c39c584 --- /dev/null +++ b/src/views/zy/zyTlqContent/ZyTlqContent.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/zyTlqContent/zyTlqContent/list', + save='/zyTlqContent/zyTlqContent/add', + edit='/zyTlqContent/zyTlqContent/edit', + deleteOne = '/zyTlqContent/zyTlqContent/delete', + deleteBatch = '/zyTlqContent/zyTlqContent/deleteBatch', + importExcel = '/zyTlqContent/zyTlqContent/importExcel', + exportXls = '/zyTlqContent/zyTlqContent/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/zyTlqContent/ZyTlqContent.data.ts b/src/views/zy/zyTlqContent/ZyTlqContent.data.ts new file mode 100644 index 0000000..aa23ecb --- /dev/null +++ b/src/views/zy/zyTlqContent/ZyTlqContent.data.ts @@ -0,0 +1,72 @@ +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: 'mainId', + align: "center", + dataIndex: 'mainId' + }, + { + title: '讨论信息', + align: "center", + dataIndex: 'content' + }, + { + title: '图片', + align: "center", + dataIndex: 'picPath' + }, + { + title: '附件', + align: "center", + dataIndex: 'filePath' + }, + { + title: '点赞', + align: "center", + dataIndex: 'dianzan' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: 'mainId', + field: 'mainId', + component: 'Input', + }, + { + label: '讨论信息', + field: 'content', + component: 'InputTextArea', + }, + { + label: '图片', + field: 'picPath', + component: 'InputTextArea', + }, + { + label: '附件', + field: 'filePath', + component: 'InputTextArea', + }, + { + label: '点赞', + field: 'dianzan', + component: 'InputNumber', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/src/views/zy/zyTlqContent/ZyTlqContentList.vue b/src/views/zy/zyTlqContent/ZyTlqContentList.vue new file mode 100644 index 0000000..47ab2f0 --- /dev/null +++ b/src/views/zy/zyTlqContent/ZyTlqContentList.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/src/views/zy/zyTlqContent/components/ZyTlqContentForm.vue b/src/views/zy/zyTlqContent/components/ZyTlqContentForm.vue new file mode 100644 index 0000000..3e72c0e --- /dev/null +++ b/src/views/zy/zyTlqContent/components/ZyTlqContentForm.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/views/zy/zyTlqContent/components/ZyTlqContentModal.vue b/src/views/zy/zyTlqContent/components/ZyTlqContentModal.vue new file mode 100644 index 0000000..49e53be --- /dev/null +++ b/src/views/zy/zyTlqContent/components/ZyTlqContentModal.vue @@ -0,0 +1,75 @@ + + + + + From efc8756c1c623f9317df3bf82d4d6829aa2882b1 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 20 May 2024 23:01:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes/modules/stuzy/stuzy.ts | 8 + .../kc/wjxWjxx/components/WjxWjxxTmlbForm.vue | 4 +- src/views/site/common/header.vue | 5 +- src/views/site/index.vue | 2 +- .../checkKecheng/dqxqkcDetail.vue | 24 +- .../checkKecheng/dqxqkcMenu.vue | 2 +- .../checkKecheng/history/kcHistoryMenu.vue | 2 +- src/views/site/studentJlrkb/index.vue | 2 +- src/views/site/studentWdkc/studentMenu.vue | 7 +- src/views/site/studentWdkc/studentZyxx.vue | 26 +- src/views/zy/zyInfo/ZyInfo.data.ts | 2 +- src/views/zy/zyInfo/ZyInfoLiebiaoList.vue | 3 +- src/views/zy/zyInfo/ZyInfoList.vue | 3 +- src/views/zy/zyInfo/components/ZyInfoForm.vue | 20 +- src/views/zy/zyTlq/StuZyTlqList.vue | 189 ++++++++++++++ src/views/zy/zyTlq/TlqJiaohuList.vue | 48 +++- src/views/zy/zyTlq/TlqJiaohuListMain.vue | 230 ++++++++++++++++++ src/views/zy/zyTlq/ZyTlqList.vue | 2 +- 18 files changed, 541 insertions(+), 38 deletions(-) create mode 100644 src/views/zy/zyTlq/StuZyTlqList.vue create mode 100644 src/views/zy/zyTlq/TlqJiaohuListMain.vue diff --git a/src/router/routes/modules/stuzy/stuzy.ts b/src/router/routes/modules/stuzy/stuzy.ts index d86cb38..dd44419 100644 --- a/src/router/routes/modules/stuzy/stuzy.ts +++ b/src/router/routes/modules/stuzy/stuzy.ts @@ -62,6 +62,14 @@ const stuzy: AppRouteModule = { title: '通知公告', }, }, + { + path: 'stuTlq', + name: 'stuTlq', + component: () => import('/@/views/zy/zyTlq/StuZyTlqList.vue'), + meta: { + title: '通知公告', + }, + }, ] } diff --git a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbForm.vue b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbForm.vue index 9943e6c..059a346 100644 --- a/src/views/kc/wjxWjxx/components/WjxWjxxTmlbForm.vue +++ b/src/views/kc/wjxWjxx/components/WjxWjxxTmlbForm.vue @@ -39,7 +39,7 @@
- + @@ -73,7 +73,7 @@ - + diff --git a/src/views/site/common/header.vue b/src/views/site/common/header.vue index e92989e..8310336 100644 --- a/src/views/site/common/header.vue +++ b/src/views/site/common/header.vue @@ -52,14 +52,11 @@ - - 听课笔记 - 今日课表 - 进六日课表 + 近六日课表 我的课程 diff --git a/src/views/site/index.vue b/src/views/site/index.vue index 9dde6d6..256b155 100644 --- a/src/views/site/index.vue +++ b/src/views/site/index.vue @@ -55,7 +55,7 @@ - + diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue index 2ceb2d9..45dabfc 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue @@ -20,9 +20,18 @@ 预览
- + + +
+ 教学日历: + + + + + 提交 + 预览 + +
@@ -105,6 +114,7 @@ const baseApiUrl = globSetting.domainUrl; const jxdgInfo = ref({ id:'', filePath:null, + jxrlFilePath:null, kcjs:'' }); @@ -140,6 +150,14 @@ const baseApiUrl = globSetting.domainUrl; let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); window.open(url,"_blank") } + + function openJxrlPdf(record){ + var url2 = getFileAccessHttpUrl(record.jxrlPdfPath) + console.log(`🚀 ~ openPdf ~ url2:`, url2) + let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); + window.open(url,"_blank") + } + //常见问题回调刷新 diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue index 5f49f41..690d917 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkcMenu.vue @@ -14,7 +14,7 @@ 教学单元内容 - + 课程作业 课程测验 diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryMenu.vue b/src/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryMenu.vue index bba8a7b..d2b7533 100644 --- a/src/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryMenu.vue +++ b/src/views/site/renKeJiaoCheng/checkKecheng/history/kcHistoryMenu.vue @@ -14,7 +14,7 @@ 教学单元内容 - + 课程作业 课程测验 diff --git a/src/views/site/studentJlrkb/index.vue b/src/views/site/studentJlrkb/index.vue index cc39037..64b9c67 100644 --- a/src/views/site/studentJlrkb/index.vue +++ b/src/views/site/studentJlrkb/index.vue @@ -1,7 +1,7 @@ + + + + diff --git a/src/views/zy/zyTlq/TlqJiaohuList.vue b/src/views/zy/zyTlq/TlqJiaohuList.vue index 73c0d69..1e02bda 100644 --- a/src/views/zy/zyTlq/TlqJiaohuList.vue +++ b/src/views/zy/zyTlq/TlqJiaohuList.vue @@ -16,23 +16,27 @@
-
+
- +
-
+
发表内容:
@@ -46,10 +50,10 @@
附件:
-
+
- 发表 + 发表
@@ -125,18 +129,25 @@ dayjs.extend(relativeTime); console.log(`🚀 ~ awaitdefHttp.get ~ res:`, res) tlqInfo.value = res; }); - // loadData(1) } - async function loadData(arg){ - await defHttp.get({ url: '/zyTlqContent/zyTlqContent/list', params: { pageSize: pageSize,pageNo:arg, mainId:id,column:'createTime',order:'desc' } }).then((res) => { + function loadData(arg){ + defHttp.get({ url: '/zyTlqContent/zyTlqContent/list', params: { mainId:id+"",column:'createTime',order:'desc' } }).then((res) => { console.log(`🚀 ~ defHttp.get ~ res:`, res) dataSource.value = res.records; total.value = res.total; }); } + + function submitForm(){ + formData.value.mainId = id; + defHttp.post({ url: '/zyTlqContent/zyTlqContent/add', params: formData.value}).then((res) => { + loadData(1); + }); + } //进入就加载 onMounted(() => { getTlqInfo(); + loadData(1); }); @@ -203,4 +214,17 @@ dayjs.extend(relativeTime); margin: 0 8px 8px 0; vertical-align: top; } +/deep/.ant-upload.ant-upload-select-picture-card { + width: 80px; + height: 80px; + margin-right: 8px; + margin-bottom: 8px; + text-align: center; + vertical-align: top; + background-color: #fafafa; + border: 1px dashed #d9d9d9; + border-radius: 2px; + cursor: pointer; + transition: border-color 0.3s; +} diff --git a/src/views/zy/zyTlq/TlqJiaohuListMain.vue b/src/views/zy/zyTlq/TlqJiaohuListMain.vue new file mode 100644 index 0000000..1e02bda --- /dev/null +++ b/src/views/zy/zyTlq/TlqJiaohuListMain.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/src/views/zy/zyTlq/ZyTlqList.vue b/src/views/zy/zyTlq/ZyTlqList.vue index 19bd147..0ce72fe 100644 --- a/src/views/zy/zyTlq/ZyTlqList.vue +++ b/src/views/zy/zyTlq/ZyTlqList.vue @@ -98,7 +98,7 @@ * 发布 */ function handleFabu(record) { - defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "6" } }).then(res => { + defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "1" } }).then(res => { total.value = 1; pageNo.value = 0; loadData(1);