From 8869a6de30d0f374d502c9d5334f32b052434fc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com>
Date: Sat, 6 Jul 2024 18:29:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6--=E6=AF=94=E8=B5=9B=E8=AF=A6?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../annualcomp/annualcomp/AnnualComp.api.ts | 81 +++++++
.../annualcomp/annualcomp/AnnualComp.data.ts | 171 +++++++++++++++
.../annualcomp/AnnualCompListZJ.vue | 206 ++++++++++++++++++
.../annualcomp/AnnualComp_menu_insert.sql | 26 +++
.../annualcomp/components/AnnualCompForm.vue | 70 ++++++
.../annualcomp/components/AnnualCompModal.vue | 66 ++++++
6 files changed, 620 insertions(+)
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.api.ts
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.data.ts
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualCompListZJ.vue
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp_menu_insert.sql
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompForm.vue
create mode 100644 jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompModal.vue
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.api.ts b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.api.ts
new file mode 100644
index 00000000..6c58995f
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.api.ts
@@ -0,0 +1,81 @@
+import {defHttp} from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+ listZJ = '/annualcomp/annualComp/listZJ',
+ save='/annualcomp/annualComp/add',
+ edit='/annualcomp/annualComp/edit',
+ deleteOne = '/annualcomp/annualComp/delete',
+ deleteBatch = '/annualcomp/annualComp/deleteBatch',
+ importExcel = '/annualcomp/annualComp/importExcel',
+ exportXls = '/annualcomp/annualComp/exportXls',
+ submit = '/annualcomp/annualComp/submit',
+ enable = '/annualcomp/annualComp/enable',
+ deactivate = '/annualcomp/annualComp/deactivate',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+/**
+ * 列表接口
+ * @param params
+ */
+export const listZJ = (params) => defHttp.get({ url: Api.listZJ, params });
+export const submit = (params,handleSuccess) => {
+ return defHttp.get({url: Api.submit, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+export const enable = (params,handleSuccess) => {
+ return defHttp.get({url: Api.enable, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+export const deactivate = (params,handleSuccess) => {
+ return defHttp.get({url: Api.deactivate, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+
+/**
+ * 删除单个
+ */
+export const deleteOne = (params,handleSuccess) => {
+ return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+/**
+ * 批量删除
+ * @param params
+ */
+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
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+ let url = isUpdate ? Api.edit : Api.save;
+ return defHttp.post({url: url, params});
+}
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.data.ts b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.data.ts
new file mode 100644
index 00000000..cb41ba10
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp.data.ts
@@ -0,0 +1,171 @@
+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: 'compname',
+ },
+ {
+ title: '年度名称',
+ align: 'center',
+ dataIndex: 'annualname',
+ },
+ {
+ title: '赛次',
+ align: 'center',
+ dataIndex: 'games',
+ },
+ {
+ title: '名称',
+ align: 'center',
+ dataIndex: 'name',
+ },
+ {
+ title: '年度比赛状态',
+ align: 'center',
+ dataIndex: 'state_dictText',
+ },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '比赛名称',
+ field: 'compid',
+ component: 'JPopup',
+ componentProps: ({ formActionType }) => {
+ const { setFieldsValue } = formActionType;
+ return {
+ setFieldsValue: setFieldsValue,
+ code: 'bsmc',
+ fieldConfig: [{ source: 'comp_name', target: 'compid' }],
+ multi: false,
+ };
+ },
+
+ colProps: { span: 6 },
+ },
+ {
+ label: '年度名称',
+ field: 'annualid',
+ component: 'JSearchSelect',
+ componentProps: {
+ dict: 'annual,annual_name,id',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '名称',
+ field: 'name',
+ component: 'Input',
+ colProps: { span: 6 },
+ },
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+ {
+ label: '比赛名称',
+ field: 'compname',
+ component: 'JPopup',
+ componentProps: ({ formActionType }) => {
+ const { setFieldsValue } = formActionType;
+ return {
+ setFieldsValue: setFieldsValue,
+ code: 'bsmc',
+ fieldConfig: [{ source: 'comp_name', target: 'compname' }],
+ multi: false,
+ };
+ },
+
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入比赛名称!' }];
+ },
+ },
+ {
+ label: '年度名称',
+ field: 'annualid',
+ component: 'JSearchSelect',
+ componentProps: {
+ dict: 'annual,annual_name,id',
+ },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入年度名称!' }];
+ },
+ },
+ {
+ label: '赛次',
+ field: 'games',
+ component: 'Input',
+ },
+ {
+ label: '名称',
+ field: 'name',
+ component: 'Input',
+ },
+ {
+ label: '年度比赛简介',
+ field: 'introduction',
+ component: 'InputTextArea',
+ },
+ {
+ label: '年度比赛介绍',
+ field: 'introduce',
+ component: 'JEditor',
+ },
+ {
+ label: '比赛图片',
+ field: 'image',
+ component: 'JImageUpload',
+ componentProps: {},
+ },
+ {
+ label: '年度比赛介绍文件',
+ field: 'compfile',
+ component: 'JUpload',
+ componentProps: {},
+ },
+ {
+ label: '开始时间',
+ field: 'starttime',
+ component: 'DatePicker',
+ },
+ {
+ label: '结束时间',
+ field: 'endtime',
+ component: 'DatePicker',
+ },
+ {
+ label: '主办方',
+ field: 'organizer',
+ component: 'Input',
+ },
+ {
+ label: '协办方',
+ field: 'coorganizer',
+ component: 'Input',
+ },
+
+ {
+ label: '驳回信息',
+ field: 'backinfo',
+ component: 'InputTextArea',
+ },
+ // TODO 主键隐藏字段,目前写死为ID
+ {
+ label: '',
+ field: 'id',
+ component: 'Input',
+ show: false,
+ },
+];
+/**
+ * 流程表单调用这个方法获取formSchema
+ * @param param
+ */
+export function getBpmFormSchema(_formData): FormSchema[] {
+ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+ return formSchema;
+}
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualCompListZJ.vue b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualCompListZJ.vue
new file mode 100644
index 00000000..bbb71efb
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualCompListZJ.vue
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getAreaTextByCode(text) }}
+
+
+ 无文件
+ 下载
+
+
+
+
+
+
+
+
+
+
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp_menu_insert.sql b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp_menu_insert.sql
new file mode 100644
index 00000000..a20fa42d
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/AnnualComp_menu_insert.sql
@@ -0,0 +1,26 @@
+-- 注意:该页面对应的前台目录为views/annualcomp文件夹下
+-- 如果你想更改到其他目录,请修改sql中component字段对应的值
+
+
+INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
+VALUES ('2023081809206940540', NULL, '年度比赛管理', '/annualcomp/annualCompList', 'annualcomp/AnnualCompList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0);
+
+-- 权限控制sql
+-- 新增
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940541', '2023081809206940540', '添加年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
+-- 编辑
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940542', '2023081809206940540', '编辑年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
+-- 删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940543', '2023081809206940540', '删除年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
+-- 批量删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940544', '2023081809206940540', '批量删除年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
+-- 导出excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940545', '2023081809206940540', '导出excel_年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
+-- 导入excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2023081809206940546', '2023081809206940540', '导入excel_年度比赛管理', NULL, NULL, 0, NULL, NULL, 2, 'annualcomp:annual_comp:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-08-18 09:20:54', NULL, NULL, 0, 0, '1', 0);
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompForm.vue b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompForm.vue
new file mode 100644
index 00000000..bcc08197
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompForm.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
diff --git a/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompModal.vue b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompModal.vue
new file mode 100644
index 00000000..711252be
--- /dev/null
+++ b/jeecgboot-vue3-master/src/views/annualcomp/annualcomp/components/AnnualCompModal.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+