From 70d97857c18d9e7d844fa1be2b044ba68c6a4fef Mon Sep 17 00:00:00 2001
From: yangjun <1173114630@qq.com>
Date: Sat, 25 May 2024 09:53:05 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E9=86=92=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../renKeJiaoCheng/checkKecheng/dqxqkc.vue | 20 +-
src/views/site/studentWdkc/studentWdkc.vue | 18 +-
src/views/zy/zyDbtx/ZyDbtx.api.ts | 72 ++++++
src/views/zy/zyDbtx/ZyDbtx.data.ts | 55 +++++
src/views/zy/zyDbtx/ZyDbtxList.vue | 215 ++++++++++++++++++
src/views/zy/zyDbtx/components/ZyDbtxForm.vue | 140 ++++++++++++
.../zy/zyDbtx/components/ZyDbtxModal.vue | 75 ++++++
7 files changed, 586 insertions(+), 9 deletions(-)
create mode 100644 src/views/zy/zyDbtx/ZyDbtx.api.ts
create mode 100644 src/views/zy/zyDbtx/ZyDbtx.data.ts
create mode 100644 src/views/zy/zyDbtx/ZyDbtxList.vue
create mode 100644 src/views/zy/zyDbtx/components/ZyDbtxForm.vue
create mode 100644 src/views/zy/zyDbtx/components/ZyDbtxModal.vue
diff --git a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue
index 8131311..7382463 100644
--- a/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue
+++ b/src/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue
@@ -7,7 +7,11 @@
@@ -45,14 +45,20 @@ import { getSysConfig } from '/@/views/site/utils/index';
const dataSource = ref([]);
//进入就加载
onMounted(() => {
- defHttp.get({ url: '/ktgl/kcKechengbiao/getStudentKclist',params:{pageSize:-1} }).then((res) => {
- console.log(`🚀 ~ defHttp.get ~ res:`, res)
- dataSource.value = res.records;
- console.log(`🚀 ~ defHttp.get ~ dataSource:`, dataSource)
- });
+ loaddata()
});
+function loaddata(){
+ defHttp.get({ url: '/ktgl/kcKechengbiao/getStudentKclist',params:{pageSize:-1} }).then((res) => {
+ dataSource.value = res.records;
+ });
+}
function openKecheng(record){
+ console.log(`🚀 ~ openKecheng ~ record:`, record)
+
+ defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate',params:{rwbh:record.rwbh} }).then((res) => {
+ loaddata()
+ });
var url = "/stuzy/studentMain?rwbh="+record.rwbh+"&xqxn="+record.xqxn;
window.open(url,'_blank')
}
diff --git a/src/views/zy/zyDbtx/ZyDbtx.api.ts b/src/views/zy/zyDbtx/ZyDbtx.api.ts
new file mode 100644
index 0000000..9f03d55
--- /dev/null
+++ b/src/views/zy/zyDbtx/ZyDbtx.api.ts
@@ -0,0 +1,72 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+ list = '/zyDbtx/zyDbtx/list',
+ save='/zyDbtx/zyDbtx/add',
+ edit='/zyDbtx/zyDbtx/edit',
+ deleteOne = '/zyDbtx/zyDbtx/delete',
+ deleteBatch = '/zyDbtx/zyDbtx/deleteBatch',
+ importExcel = '/zyDbtx/zyDbtx/importExcel',
+ exportXls = '/zyDbtx/zyDbtx/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/zyDbtx/ZyDbtx.data.ts b/src/views/zy/zyDbtx/ZyDbtx.data.ts
new file mode 100644
index 0000000..c2cde95
--- /dev/null
+++ b/src/views/zy/zyDbtx/ZyDbtx.data.ts
@@ -0,0 +1,55 @@
+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: '通知类型(0发布作业 1评分 2测验 3问卷 4讨论)',
+ align: "center",
+ dataIndex: 'type_dictText'
+ },
+ {
+ title: '任务编号',
+ align: "center",
+ dataIndex: 'rwbh'
+ },
+ {
+ title: '内容',
+ align: "center",
+ dataIndex: 'content'
+ },
+];
+
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+];
+
+//表单数据
+export const formSchema: FormSchema[] = [
+ {
+ label: '通知类型(0发布作业 1评分 2测验 3问卷 4讨论)',
+ field: 'type',
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode: "dbtx_type"
+ },
+ },
+ {
+ label: '任务编号',
+ field: 'rwbh',
+ component: 'Input',
+ },
+ {
+ label: '内容',
+ field: 'content',
+ component: 'Input',
+ },
+ // TODO 主键隐藏字段,目前写死为ID
+ {
+ label: '',
+ field: 'id',
+ component: 'Input',
+ show: false,
+ },
+];
diff --git a/src/views/zy/zyDbtx/ZyDbtxList.vue b/src/views/zy/zyDbtx/ZyDbtxList.vue
new file mode 100644
index 0000000..3dbf035
--- /dev/null
+++ b/src/views/zy/zyDbtx/ZyDbtxList.vue
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+
+
+ 新增
+ 导出
+ 导入
+
+
+
+
+
+ 删除
+
+
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无文件
+ 下载
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/zy/zyDbtx/components/ZyDbtxForm.vue b/src/views/zy/zyDbtx/components/ZyDbtxForm.vue
new file mode 100644
index 0000000..756dfd8
--- /dev/null
+++ b/src/views/zy/zyDbtx/components/ZyDbtxForm.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/zy/zyDbtx/components/ZyDbtxModal.vue b/src/views/zy/zyDbtx/components/ZyDbtxModal.vue
new file mode 100644
index 0000000..f1b488d
--- /dev/null
+++ b/src/views/zy/zyDbtx/components/ZyDbtxModal.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+