From 2701b02c59dcb6b0813b640cb938d72b57c1230c Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Tue, 14 Apr 2026 09:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8A=95=E8=AF=89=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/Activity/index.ts | 63 +++++ src/api/system/Activity/type.ts | 110 +++++++++ src/api/system/ComplainType/index.ts | 63 +++++ src/api/system/ComplainType/type.ts | 80 +++++++ src/api/system/Complaint/index.ts | 63 +++++ src/api/system/Complaint/type.ts | 155 +++++++++++++ src/api/system/resident/type.ts | 4 +- src/assets/styles/element-ui.scss | 18 +- src/components/Holder/repairUser.vue | 24 +- src/views/system/Activity/addActivity.vue | 125 ++++++++++ src/views/system/Activity/index.vue | 217 ++++++++++++++++++ src/views/system/Complaint/complainMain.vue | 206 +++++++++++++++++ src/views/system/Complaint/index.vue | 196 ++++++++++++++++ .../system/ComplaintType/addComplaintType.vue | 125 ++++++++++ src/views/system/ComplaintType/index.vue | 172 ++++++++++++++ src/views/tool/gen/index.vue | 10 +- 16 files changed, 1615 insertions(+), 16 deletions(-) create mode 100644 src/api/system/Activity/index.ts create mode 100644 src/api/system/Activity/type.ts create mode 100644 src/api/system/ComplainType/index.ts create mode 100644 src/api/system/ComplainType/type.ts create mode 100644 src/api/system/Complaint/index.ts create mode 100644 src/api/system/Complaint/type.ts create mode 100644 src/views/system/Activity/addActivity.vue create mode 100644 src/views/system/Activity/index.vue create mode 100644 src/views/system/Complaint/complainMain.vue create mode 100644 src/views/system/Complaint/index.vue create mode 100644 src/views/system/ComplaintType/addComplaintType.vue create mode 100644 src/views/system/ComplaintType/index.vue diff --git a/src/api/system/Activity/index.ts b/src/api/system/Activity/index.ts new file mode 100644 index 0000000..1cd5a75 --- /dev/null +++ b/src/api/system/Activity/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ActivityVO, ActivityForm, ActivityQuery } from '@/api/system/Activity/type'; + +/** + * 查询活动管理列表 + * @param query + * @returns {*} + */ + +export const listActivity = (query?: ActivityQuery): AxiosPromise => { + return request({ + url: '/activity/list', + method: 'get', + params: query + }); +}; + +/** + * 查询活动管理详细 + * @param id + */ +export const getActivity = (id: string | number): AxiosPromise => { + return request({ + url: '/activity/' + id, + method: 'get' + }); +}; + +/** + * 新增活动管理 + * @param data + */ +export const addActivity = (data: ActivityForm) => { + return request({ + url: '/activity', + method: 'post', + data: data + }); +}; + +/** + * 修改活动管理 + * @param data + */ +export const updateActivity = (data: ActivityForm) => { + return request({ + url: '/activity', + method: 'put', + data: data + }); +}; + +/** + * 删除活动管理 + * @param id + */ +export const delActivity = (id: string | number | Array) => { + return request({ + url: '/activity/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/Activity/type.ts b/src/api/system/Activity/type.ts new file mode 100644 index 0000000..5be40b9 --- /dev/null +++ b/src/api/system/Activity/type.ts @@ -0,0 +1,110 @@ +export interface ActivityVO { + /** + * 活动管理表id + */ + id: string | number; + + /** + * 标题 + */ + titile: string; + + /** + * 作者 + */ + author: string; + + /** + * 内容 + */ + content: string; + + /** + * 发布状态 0未发布 1已发布 + */ + status: string; + + /** + * 浏览量 + */ + pageViews: number; + + /** + * 创建者姓名 + */ + createName: string; +} + +export interface ActivityForm extends BaseEntity { + /** + * 活动管理表id + */ + id?: string | number; + + /** + * 标题 + */ + titile?: string; + + /** + * 作者 + */ + author?: string; + + /** + * 内容 + */ + content?: string; + + /** + * 发布状态 0未发布 1已发布 + */ + status?: string; + + /** + * 浏览量 + */ + pageViews?: number; + + /** + * 创建者姓名 + */ + createName?: string; +} + +export interface ActivityQuery extends PageQuery { + /** + * 标题 + */ + titile?: string; + + /** + * 作者 + */ + author?: string; + + /** + * 内容 + */ + content?: string; + + /** + * 发布状态 0未发布 1已发布 + */ + status?: string; + + /** + * 浏览量 + */ + pageViews?: number; + + /** + * 创建者姓名 + */ + createName?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/ComplainType/index.ts b/src/api/system/ComplainType/index.ts new file mode 100644 index 0000000..16b7414 --- /dev/null +++ b/src/api/system/ComplainType/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ComplaintTypeVO, ComplaintTypeForm, ComplaintTypeQuery } from '@/api/system/ComplainType/type'; + +/** + * 查询投诉类型管理列表 + * @param query + * @returns {*} + */ + +export const listComplaintType = (query?: ComplaintTypeQuery): AxiosPromise => { + return request({ + url: '/complaintType/list', + method: 'get', + params: query + }); +}; + +/** + * 查询投诉类型管理详细 + * @param id + */ +export const getComplaintType = (id: string | number): AxiosPromise => { + return request({ + url: '/complaintType/' + id, + method: 'get' + }); +}; + +/** + * 新增投诉类型管理 + * @param data + */ +export const addComplaintType = (data: ComplaintTypeForm) => { + return request({ + url: '/complaintType', + method: 'post', + data: data + }); +}; + +/** + * 修改投诉类型管理 + * @param data + */ +export const updateComplaintType = (data: ComplaintTypeForm) => { + return request({ + url: '/complaintType', + method: 'put', + data: data + }); +}; + +/** + * 删除投诉类型管理 + * @param id + */ +export const delComplaintType = (id: string | number | Array) => { + return request({ + url: '/complaintType/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/ComplainType/type.ts b/src/api/system/ComplainType/type.ts new file mode 100644 index 0000000..965a747 --- /dev/null +++ b/src/api/system/ComplainType/type.ts @@ -0,0 +1,80 @@ +export interface ComplaintTypeVO { + /** + * 投诉类型管理表id + */ + id: string | number; + + /** + * 投诉类型名称 + */ + name: string; + + /** + * 状态 0 启用 1停用 + */ + status: string; + + /** + * 创建人名称 + */ + createNam: string; + + /** + * 创建时间 + */ + creaateTime: string; +} + +export interface ComplaintTypeForm extends BaseEntity { + /** + * 投诉类型管理表id + */ + id?: string | number; + + /** + * 投诉类型名称 + */ + name?: string; + + /** + * 状态 0 启用 1停用 + */ + status?: string; + + /** + * 创建人名称 + */ + createNam?: string; + + /** + * 创建时间 + */ + creaateTime?: string; +} + +export interface ComplaintTypeQuery extends PageQuery { + /** + * 投诉类型名称 + */ + name?: string; + + /** + * 状态 0 启用 1停用 + */ + status?: string; + + /** + * 创建人名称 + */ + createNam?: string; + + /** + * 创建时间 + */ + creaateTime?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/Complaint/index.ts b/src/api/system/Complaint/index.ts new file mode 100644 index 0000000..82abe2d --- /dev/null +++ b/src/api/system/Complaint/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ComplaintVO, ComplaintForm, ComplaintQuery } from '@/api/system/Complaint/type'; + +/** + * 查询投诉管理列表 + * @param query + * @returns {*} + */ + +export const listComplaint = (query?: ComplaintQuery): AxiosPromise => { + return request({ + url: '/complaint/list', + method: 'get', + params: query + }); +}; + +/** + * 查询投诉管理详细 + * @param id + */ +export const getComplaint = (id: string | number): AxiosPromise => { + return request({ + url: '/complaint/' + id, + method: 'get' + }); +}; + +/** + * 新增投诉管理 + * @param data + */ +export const addComplaint = (data: ComplaintForm) => { + return request({ + url: '/complaint', + method: 'post', + data: data + }); +}; + +/** + * 修改投诉管理 + * @param data + */ +export const updateComplaint = (data: ComplaintForm) => { + return request({ + url: '/complaint', + method: 'put', + data: data + }); +}; + +/** + * 删除投诉管理 + * @param id + */ +export const delComplaint = (id: string | number | Array) => { + return request({ + url: '/complaint/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/Complaint/type.ts b/src/api/system/Complaint/type.ts new file mode 100644 index 0000000..85804ac --- /dev/null +++ b/src/api/system/Complaint/type.ts @@ -0,0 +1,155 @@ +export interface ComplaintVO { + /** + * 投诉管理表id + */ + id: string | number; + + /** + * 投诉类型id + */ + typeId: string | number; + + /** + * 问题描述 + */ + problemDes: string; + + /** + * 投诉人姓名 + */ + complaintName: string; + + /** + * 手机号 + */ + phone: string; + + /** + * 问题照片url + */ + problemIamgeUrl: string; + + /** + * 投诉状态 0待处理 1处理中 2已处理 + */ + status: string; + + /** + * 处理人员id + */ + handleId: string; + + /** + * 处理人员姓名 + */ + handleName: string; + + /** + * 处理描述 + */ + handleContent: string; +} + +export interface ComplaintForm extends BaseEntity { + /** + * 投诉管理表id + */ + id?: string | number; + + /** + * 投诉类型id + */ + typeId?: string | number; + + /** + * 问题描述 + */ + problemDes?: string; + + /** + * 投诉人姓名 + */ + complaintName?: string; + + /** + * 手机号 + */ + phone?: string; + + /** + * 问题照片url + */ + problemIamgeUrl?: string; + + /** + * 投诉状态 0待处理 1处理中 2已处理 + */ + status?: string; + + /** + * 处理人员id + */ + handleId?: string; + + /** + * 处理人员姓名 + */ + handleName?: string; + + /** + * 处理描述 + */ + handleContent?: string; +} + +export interface ComplaintQuery extends PageQuery { + /** + * 投诉类型id + */ + typeId?: string | number; + + /** + * 问题描述 + */ + problemDes?: string; + + /** + * 投诉人姓名 + */ + complaintName?: string; + + /** + * 手机号 + */ + phone?: string; + + /** + * 问题照片url + */ + problemIamgeUrl?: string; + + /** + * 投诉状态 0待处理 1处理中 2已处理 + */ + status?: string; + + /** + * 处理人员id + */ + handleId?: string; + + /** + * 处理人员姓名 + */ + handleName?: string; + + /** + * 处理描述 + */ + handleContent?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/resident/type.ts b/src/api/system/resident/type.ts index b31b3f9..96e0f6c 100644 --- a/src/api/system/resident/type.ts +++ b/src/api/system/resident/type.ts @@ -2,7 +2,7 @@ export interface ResidentVO { /** * 主键 住户管理id */ - id: string | number; + userId: string | number; /** * 住户编号 @@ -77,7 +77,7 @@ export interface ResidentForm extends BaseEntity { /** * 主键 住户管理id */ - id?: string | number; + userId?: string | number; /** * 住户编号 diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss index 106a647..e70e8ed 100644 --- a/src/assets/styles/element-ui.scss +++ b/src/assets/styles/element-ui.scss @@ -179,7 +179,10 @@ .el-input-number__decrease, .el-input-number__increase { border-radius: var(--app-radius-md); - transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; + transition: + box-shadow 0.2s ease, + border-color 0.2s ease, + background-color 0.2s ease; } .el-input__wrapper.is-focus, @@ -192,8 +195,14 @@ // Buttons .el-button { + width: 80px; + height: 35px; border-radius: var(--app-radius-md); - transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; + transition: + transform 0.15s ease, + box-shadow 0.2s ease, + background-color 0.2s ease, + border-color 0.2s ease; } .el-button:not(.is-text):not(.is-link):hover { @@ -261,7 +270,10 @@ .el-pagination .btn-next, .el-pagination .el-pager li { border-radius: var(--app-radius-sm); - transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; + transition: + background-color 0.2s ease, + color 0.2s ease, + box-shadow 0.2s ease; } .el-pagination .el-pager li.is-active { diff --git a/src/components/Holder/repairUser.vue b/src/components/Holder/repairUser.vue index 1c90a11..3dc0a6b 100644 --- a/src/components/Holder/repairUser.vue +++ b/src/components/Holder/repairUser.vue @@ -6,7 +6,7 @@
姓名:{{ multipleSelection[0] && multipleSelection[0].nickName }} - 联系方式:{{ multipleSelection[0] && multipleSelection[0].phonenumber }} + 联系方式:{{ multipleSelection[0].phonenumber }}
@@ -67,9 +67,16 @@ interface tableType extends ResidentVO { housePath?: string; } -const props = defineProps<{ - userid: string | number; -}>(); +const props = defineProps({ + userid: { + type: String || Number + }, + returnvalue: { + type: String, + default: 'id', + required: true + } +}); const { userid } = toRefs(props); const emit = defineEmits<{ change: [value: string | number]; @@ -113,8 +120,9 @@ const handleRowClick = (row) => { // 统一回显 userid 选中(安全版) const handleUserSelection = () => { if (!userid.value || !tableData.value.length) return; + console.log('user', userid, tableData.value); - const target = tableData.value.find((item) => item.id == userid.value); + const target = tableData.value.find((item) => item.userId == userid.value); if (target) { multipleSelection.value = [target]; nextTick(() => { @@ -172,7 +180,11 @@ function conback() { function confim() { dialog.value.dialogVisible = false; if (multipleSelection.value.length > 0) { - emit('change', multipleSelection.value[0].id); + if (props.returnvalue === 'id') { + emit('change', multipleSelection.value[0].id); + } else if (props.returnvalue === 'value') { + emit('change', multipleSelection.value[0]); + } } } diff --git a/src/views/system/Activity/addActivity.vue b/src/views/system/Activity/addActivity.vue new file mode 100644 index 0000000..79d3027 --- /dev/null +++ b/src/views/system/Activity/addActivity.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/views/system/Activity/index.vue b/src/views/system/Activity/index.vue new file mode 100644 index 0000000..ee4b7b3 --- /dev/null +++ b/src/views/system/Activity/index.vue @@ -0,0 +1,217 @@ + + + + diff --git a/src/views/system/Complaint/complainMain.vue b/src/views/system/Complaint/complainMain.vue new file mode 100644 index 0000000..d509c07 --- /dev/null +++ b/src/views/system/Complaint/complainMain.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/views/system/Complaint/index.vue b/src/views/system/Complaint/index.vue new file mode 100644 index 0000000..980288f --- /dev/null +++ b/src/views/system/Complaint/index.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/views/system/ComplaintType/addComplaintType.vue b/src/views/system/ComplaintType/addComplaintType.vue new file mode 100644 index 0000000..79d3027 --- /dev/null +++ b/src/views/system/ComplaintType/addComplaintType.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/views/system/ComplaintType/index.vue b/src/views/system/ComplaintType/index.vue new file mode 100644 index 0000000..aaea2e5 --- /dev/null +++ b/src/views/system/ComplaintType/index.vue @@ -0,0 +1,172 @@ + + + diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue index e73a3fb..6a4a491 100644 --- a/src/views/tool/gen/index.vue +++ b/src/views/tool/gen/index.vue @@ -65,11 +65,11 @@ - - - - - + + + + +