From 271f83438bdf84421138f66589b6f3485f8e26da Mon Sep 17 00:00:00 2001 From: pch <75729660@qq.com> Date: Wed, 19 Feb 2025 18:29:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/question/index.ts | 49 +++ src/main.ts | 1 + src/utils/dict.ts | 1 + src/views/Home/qjgl/draft/indexDraft.vue | 16 +- src/views/Home/qjgl/qjsq/QjglCreate.vue | 55 +++- src/views/Home/qjgl/qjsq/index.vue | 18 +- src/views/Home/question/info/QuestionForm.vue | 187 ++++++++++++ src/views/Home/question/info/index.vue | 289 ++++++++++++++++++ 8 files changed, 589 insertions(+), 27 deletions(-) create mode 100644 src/api/home/question/index.ts create mode 100644 src/views/Home/question/info/QuestionForm.vue create mode 100644 src/views/Home/question/info/index.vue diff --git a/src/api/home/question/index.ts b/src/api/home/question/index.ts new file mode 100644 index 0000000..326e502 --- /dev/null +++ b/src/api/home/question/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +// 问题 VO +export interface QuestionVO { + id: number // id + userId: number // 申请人的用户编号 + userName: string // 作者 + typeId: number // 类型id + deptId: number // 部门id + deptName: string // 部门名字 + title: string // 问题标题 + content: string // 内容 + status: number // 状态 + filePath: string // 文件路径 + module: string // 所属模块 +} + +// 问题 API +export const QuestionApi = { + // 查询问题分页 + getQuestionPage: async (params: any) => { + return await request.get({ url: `/home/question/page`, params }) + }, + + // 查询问题详情 + getQuestion: async (id: number) => { + return await request.get({ url: `/home/question/get?id=` + id }) + }, + + // 新增问题 + createQuestion: async (data: QuestionVO) => { + return await request.post({ url: `/home/question/create`, data }) + }, + + // 修改问题 + updateQuestion: async (data: QuestionVO) => { + return await request.put({ url: `/home/question/update`, data }) + }, + + // 删除问题 + deleteQuestion: async (id: number) => { + return await request.delete({ url: `/home/question/delete?id=` + id }) + }, + + // 导出问题 Excel + exportQuestion: async (params) => { + return await request.download({ url: `/home/question/export-excel`, params }) + } +} diff --git a/src/main.ts b/src/main.ts index 76c7247..6ed2c4e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,7 @@ import '@/styles/index.scss' // 引入动画 import '@/plugins/animate.css' + // 路由 import router, { setupRouter } from '@/router' diff --git a/src/utils/dict.ts b/src/utils/dict.ts index ec0f8cb..2fda432 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -143,6 +143,7 @@ export enum DICT_TYPE { OA_NUMBERS_NUM = 'oa_numbers_num', FWGL_MJ_TYPE = 'fwgl_mj_type', FWGl_JH_TYPE = 'fwgl_jh_type', + QUESTIONTYPE = 'questiontype', // ========== SYSTEM 模块 ========== SYSTEM_USER_SEX = 'system_user_sex', SYSTEM_MENU_TYPE = 'system_menu_type', diff --git a/src/views/Home/qjgl/draft/indexDraft.vue b/src/views/Home/qjgl/draft/indexDraft.vue index 89fc759..20a9fbc 100644 --- a/src/views/Home/qjgl/draft/indexDraft.vue +++ b/src/views/Home/qjgl/draft/indexDraft.vue @@ -69,14 +69,14 @@ 搜索 重置 - - - - - - - - + + 发起请假 + - - - + + + + + + + + - - + + + + diff --git a/src/views/Home/qjgl/qjsq/index.vue b/src/views/Home/qjgl/qjsq/index.vue index 75fb15f..1922a34 100644 --- a/src/views/Home/qjgl/qjsq/index.vue +++ b/src/views/Home/qjgl/qjsq/index.vue @@ -220,21 +220,21 @@