From ae098aa1e03916a72de28b987f3ecef27343f7b7 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 23 Jul 2025 16:28:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1=E3=80=81=E9=80=9A=E7=9F=A5=E5=85=AC?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerService/feedbacks/index.ts | 12 +- .../customerService/feedbacks/model.d.ts | 11 +- .../property/customerService/notices/index.ts | 61 ++++++ .../customerService/notices/model.d.ts | 139 ++++++++++++++ .../customerService/feedbacks/data.ts | 106 ++++++----- .../feedbacks/feedbacks-detail.vue | 69 +++++++ .../feedbacks/feedbacks-modal.vue | 55 ++++-- .../customerService/feedbacks/index.vue | 91 ++++----- .../property/customerService/notices/data.ts | 137 ++++++++++++++ .../customerService/notices/index.vue | 178 ++++++++++++++++++ .../customerService/notices/notices-modal.vue | 101 ++++++++++ .../conferenceReservations/index.vue | 2 +- .../roomBooking/conferenceSettings/data.ts | 9 +- 13 files changed, 842 insertions(+), 129 deletions(-) create mode 100644 apps/web-antd/src/api/property/customerService/notices/index.ts create mode 100644 apps/web-antd/src/api/property/customerService/notices/model.d.ts create mode 100644 apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-detail.vue create mode 100644 apps/web-antd/src/views/property/customerService/notices/data.ts create mode 100644 apps/web-antd/src/views/property/customerService/notices/index.vue create mode 100644 apps/web-antd/src/views/property/customerService/notices/notices-modal.vue diff --git a/apps/web-antd/src/api/property/customerService/feedbacks/index.ts b/apps/web-antd/src/api/property/customerService/feedbacks/index.ts index 5989ef68..03c79c9a 100644 --- a/apps/web-antd/src/api/property/customerService/feedbacks/index.ts +++ b/apps/web-antd/src/api/property/customerService/feedbacks/index.ts @@ -12,7 +12,7 @@ import { requestClient } from '#/api/request'; * @returns 意见反馈列表 */ export function feedbacksList(params?: FeedbacksQuery) { - return requestClient.get>('/system/feedbacks/list', { params }); + return requestClient.get>('/property/feedbacks/list', { params }); } /** @@ -21,7 +21,7 @@ export function feedbacksList(params?: FeedbacksQuery) { * @returns 意见反馈列表 */ export function feedbacksExport(params?: FeedbacksQuery) { - return commonExport('/system/feedbacks/export', params ?? {}); + return commonExport('/property/feedbacks/export', params ?? {}); } /** @@ -30,7 +30,7 @@ export function feedbacksExport(params?: FeedbacksQuery) { * @returns 意见反馈详情 */ export function feedbacksInfo(id: ID) { - return requestClient.get(`/system/feedbacks/${id}`); + return requestClient.get(`/property/feedbacks/${id}`); } /** @@ -39,7 +39,7 @@ export function feedbacksInfo(id: ID) { * @returns void */ export function feedbacksAdd(data: FeedbacksForm) { - return requestClient.postWithMsg('/system/feedbacks', data); + return requestClient.postWithMsg('/property/feedbacks', data); } /** @@ -48,7 +48,7 @@ export function feedbacksAdd(data: FeedbacksForm) { * @returns void */ export function feedbacksUpdate(data: FeedbacksForm) { - return requestClient.putWithMsg('/system/feedbacks', data); + return requestClient.putWithMsg('/property/feedbacks', data); } /** @@ -57,5 +57,5 @@ export function feedbacksUpdate(data: FeedbacksForm) { * @returns void */ export function feedbacksRemove(id: ID | IDS) { - return requestClient.deleteWithMsg(`/system/feedbacks/${id}`); + return requestClient.deleteWithMsg(`/property/feedbacks/${id}`); } diff --git a/apps/web-antd/src/api/property/customerService/feedbacks/model.d.ts b/apps/web-antd/src/api/property/customerService/feedbacks/model.d.ts index bab69c5a..c3d31a77 100644 --- a/apps/web-antd/src/api/property/customerService/feedbacks/model.d.ts +++ b/apps/web-antd/src/api/property/customerService/feedbacks/model.d.ts @@ -1,4 +1,4 @@ -import type { PageQuery, BaseEntity } from '#/api/common'; +import type {PageQuery, BaseEntity} from '#/api/common'; export interface FeedbacksVO { /** @@ -104,6 +104,11 @@ export interface FeedbacksForm extends BaseEntity { */ serviceName?: string; + /** + * 工单id + */ + orderId?: string; + } export interface FeedbacksQuery extends PageQuery { @@ -153,7 +158,7 @@ export interface FeedbacksQuery extends PageQuery { serviceName?: string; /** - * 日期范围参数 - */ + * 日期范围参数 + */ params?: any; } diff --git a/apps/web-antd/src/api/property/customerService/notices/index.ts b/apps/web-antd/src/api/property/customerService/notices/index.ts new file mode 100644 index 00000000..dbcfd540 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/notices/index.ts @@ -0,0 +1,61 @@ +import type { NoticesVO, NoticesForm, NoticesQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询客户服务-通知公告列表 +* @param params +* @returns 客户服务-通知公告列表 +*/ +export function noticesList(params?: NoticesQuery) { + return requestClient.get>('/property/notices/list', { params }); +} + +/** + * 导出客户服务-通知公告列表 + * @param params + * @returns 客户服务-通知公告列表 + */ +export function noticesExport(params?: NoticesQuery) { + return commonExport('/property/notices/export', params ?? {}); +} + +/** + * 查询客户服务-通知公告详情 + * @param id id + * @returns 客户服务-通知公告详情 + */ +export function noticesInfo(id: ID) { + return requestClient.get(`/property/notices/${id}`); +} + +/** + * 新增客户服务-通知公告 + * @param data + * @returns void + */ +export function noticesAdd(data: NoticesForm) { + return requestClient.postWithMsg('/property/notices', data); +} + +/** + * 更新客户服务-通知公告 + * @param data + * @returns void + */ +export function noticesUpdate(data: NoticesForm) { + return requestClient.putWithMsg('/property/notices', data); +} + +/** + * 删除客户服务-通知公告 + * @param id id + * @returns void + */ +export function noticesRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/notices/${id}`); +} diff --git a/apps/web-antd/src/api/property/customerService/notices/model.d.ts b/apps/web-antd/src/api/property/customerService/notices/model.d.ts new file mode 100644 index 00000000..0964abf5 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/notices/model.d.ts @@ -0,0 +1,139 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface NoticesVO { + /** + * 主键 + */ + id: string | number; + + /** + * 标题 + */ + title: string; + + /** + * 类型 + */ + type: string; + + /** + * 备注 + */ + remark: string; + + /** + * 是否全小区公告 + */ + isAll: string; + + /** + * 开始时间 + */ + startTime: string; + + /** + * 结束时间 + */ + endTime: string; + + /** + * 公告内容 + */ + afficheContent: string; + + /** + * 发布人 + */ + issuers: number; + +} + +export interface NoticesForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 标题 + */ + title?: string; + + /** + * 类型 + */ + type?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 是否全小区公告 + */ + isAll?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 公告内容 + */ + afficheContent?: string; + + /** + * 发布人 + */ + issuers?: number; + +} + +export interface NoticesQuery extends PageQuery { + /** + * 标题 + */ + title?: string; + + /** + * 类型 + */ + type?: string; + + /** + * 是否全小区公告 + */ + isAll?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 公告内容 + */ + afficheContent?: string; + + /** + * 发布人 + */ + issuers?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/customerService/feedbacks/data.ts b/apps/web-antd/src/views/property/customerService/feedbacks/data.ts index 04e73671..7382d67f 100644 --- a/apps/web-antd/src/views/property/customerService/feedbacks/data.ts +++ b/apps/web-antd/src/views/property/customerService/feedbacks/data.ts @@ -5,14 +5,6 @@ import {renderDict} from "#/utils/render"; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Select', - componentProps: { - options:getDictOptions('wy_yjfklx') - }, - fieldName: 'feedbackType', - label: '反馈类型', - }, { component: 'Select', componentProps: { @@ -26,34 +18,30 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, - { - title: '反馈类型', - field: 'feedbackType', - slots:{ - default: ({row})=>{ - return renderDict(row.feedbackType,'wy_yjfklx') - } - } - }, - { - title: '反馈人', - field: 'feedbackPersion', - }, - { - title: '反馈人电话', - field: 'feedbackPersionPhone', - }, + // { + // title: '反馈类型', + // field: 'feedbackType', + // width:120 + // }, + // { + // title: '反馈人', + // field: 'feedbackPersion', + // width:120 + // }, + // { + // title: '反馈人电话', + // field: 'feedbackPersionPhone', + // width:120 + // }, { title: '反馈内容', field: 'feedbackContent', + minWidth:180 }, { title: '反馈位置', field: 'feedbackLocation', - }, - { - title: '反馈图片', - field: 'feedbackImg', + width:120 }, { title: '是否转至工单', @@ -62,7 +50,8 @@ export const columns: VxeGridProps['columns'] = [ default: ({row})=>{ return renderDict(row.isWorkOrder,'wy_sf') } - } + }, + width:120 }, { title: '处理状态', @@ -71,18 +60,20 @@ export const columns: VxeGridProps['columns'] = [ default: ({row})=>{ return renderDict(row.status,'wy_yjclzt') } - } + }, + width:120 }, { title: '客服电话', field: 'serviceName', + width:120 }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', - width: 180, + width: 200, }, ]; @@ -100,22 +91,41 @@ export const modalSchema: FormSchemaGetter = () => [ label: '反馈类型', fieldName: 'feedbackType', component: 'Select', - componentProps: { - options:getDictOptions('wy_yjfklx') - }, rules: 'selectRequired', }, + { + label: '反馈人', + fieldName: 'person', + component: 'Input', + slots:{ + default:'person' + } + }, { label: '反馈人', fieldName: 'feedbackPersion', component: 'Input', rules: 'required', + dependencies: { + show: () => false, + triggerFields: [''], + }, }, { label: '反馈人电话', fieldName: 'feedbackPersionPhone', component: 'Input', rules: 'required', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '客服电话', + fieldName: 'serviceName', + component: 'Input', + rules: 'required', }, { label: '反馈内容', @@ -139,19 +149,8 @@ export const modalSchema: FormSchemaGetter = () => [ // accept: 'image/*', // 可选拓展名或者mime类型 ,拼接 // maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型 }, - rules: 'required', formItemClass:'col-span-2' }, - { - label: '转至工单', - fieldName: 'isWorkOrder', - component: 'RadioGroup', - componentProps: { - buttonStyle: 'solid', - options: getDictOptions('wy_sf'), - }, - defaultValue:'0' - }, { label: '处理状态', fieldName: 'status', @@ -159,10 +158,19 @@ export const modalSchema: FormSchemaGetter = () => [ componentProps: { options: getDictOptions('wy_yjclzt') }, + rules:'selectRequired' }, + { - label: '客服电话', - fieldName: 'serviceName', - component: 'Input', + label: '转至工单',//转至工单 + fieldName: 'isWorkOrder', + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + options: getDictOptions('wy_sf'), + optionType: 'button', + }, + defaultValue:'0', + rules:'selectRequired' }, ]; diff --git a/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-detail.vue b/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-detail.vue new file mode 100644 index 00000000..c2af9a84 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-detail.vue @@ -0,0 +1,69 @@ + + + diff --git a/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-modal.vue b/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-modal.vue index ead082ef..58a2ceef 100644 --- a/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-modal.vue +++ b/apps/web-antd/src/views/property/customerService/feedbacks/feedbacks-modal.vue @@ -1,15 +1,21 @@ diff --git a/apps/web-antd/src/views/property/customerService/feedbacks/index.vue b/apps/web-antd/src/views/property/customerService/feedbacks/index.vue index ad9d0cb7..b7cc9ff6 100644 --- a/apps/web-antd/src/views/property/customerService/feedbacks/index.vue +++ b/apps/web-antd/src/views/property/customerService/feedbacks/index.vue @@ -1,25 +1,23 @@ + + diff --git a/apps/web-antd/src/views/property/customerService/notices/notices-modal.vue b/apps/web-antd/src/views/property/customerService/notices/notices-modal.vue new file mode 100644 index 00000000..d8b19ba9 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/notices/notices-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceReservations/index.vue b/apps/web-antd/src/views/property/roomBooking/conferenceReservations/index.vue index 927037a7..0f0b25e7 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceReservations/index.vue +++ b/apps/web-antd/src/views/property/roomBooking/conferenceReservations/index.vue @@ -20,7 +20,7 @@ 重置 搜索 diff --git a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts index 0733b20b..c569d228 100644 --- a/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts +++ b/apps/web-antd/src/views/property/roomBooking/conferenceSettings/data.ts @@ -37,9 +37,14 @@ export const columns: VxeGridProps['columns'] = [ field: 'name', minWidth:100, }, + // { + // title: '会议室地址', + // field: 'locationName', + // width:210, + // }, { - title: '会议室地址', - field: 'locationName', + title: '配套设备', + field: 'baseService', width:210, }, { From 8d20a262ebcc3b8c8ca8234f71c9e6616b69d561 Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Wed, 23 Jul 2025 16:29:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerService/centerConsole/index.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue index 147acde9..2be3601d 100644 --- a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue +++ b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue @@ -3,7 +3,9 @@ import { EditOutlined } from '@ant-design/icons-vue'; import {EchartsUI, type EchartsUIType, useEcharts} from "@vben/plugins/echarts"; import {onMounted, ref} from "vue"; import {countsList} from '#/api/property/customerService/centerConsole' +import { useRouter } from 'vue-router' +const router = useRouter() const board = ref ({}) const getBoard = async () => { board.value = await countsList(); @@ -15,19 +17,21 @@ const seriesData = ref([]); const workOrderCount = ref(); const { renderEcharts: renderWorkOrderCount } = useEcharts(workOrderCount); async function fetchWorkOrderCount() { - xAxisData.value = board.value.recentWeekWorkOrders - const result = xAxisData.value.map(item => { + xAxisData.value = board.value.recentWeekWorkOrders.map(item => { const [year, month, day] = item.date.split('-'); const monthDay = `${month}-${day}`; return `${monthDay}${item.dayOfWeek}`; }); - console.log(result) + seriesData.value = board.value.recentWeekWorkOrders.map(item => { + return `${item.count}`; + }); + console.log(xAxisData.value,seriesData.value) renderWorkOrderCount({ tooltip: { trigger: 'axis' }, xAxis: { type: 'category', boundaryGap: false, - data: ['06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二'] + data: xAxisData.value }, yAxis: { type: 'value', @@ -35,7 +39,7 @@ async function fetchWorkOrderCount() { }, series: [ { - data: [6, 2, 0, 1, 0, 0, 1], + data: seriesData.value, type: 'line', areaStyle: {}, smooth: true, @@ -153,6 +157,10 @@ async function fetchOrderTyper() { }) } +const goToProperty = () => { + router.push('/property') +} + onMounted(async () => { await getBoard() await fetchWorkOrderCount() @@ -172,7 +180,7 @@ onMounted(async () => {
工单总数:
{{ board.workOrdersTotal }}
-
点击前往工单池
+
点击前往工单池
From 9d75dd2168c7cc5abc1fc065e671154c6d6d39bc Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Wed, 23 Jul 2025 20:50:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../costManagement/costItemSetting/data.ts | 4 +- .../customerService/centerConsole/index.vue | 31 ++++--- .../contingenPlan/contingenPlan-detail.vue | 31 ++++++- .../customerService/contingenPlan/data.ts | 4 +- .../customerService/contingenPlan/index.vue | 55 ++++++++++++- .../customerService/feedbacks/index.vue | 10 +-- .../property/customerService/notices/data.ts | 81 ++++++++++--------- .../customerService/notices/index.vue | 40 ++++----- .../notices/notices-detail.vue | 60 ++++++++++++++ .../customerService/notices/notices-modal.vue | 38 ++++++++- 10 files changed, 266 insertions(+), 88 deletions(-) create mode 100644 apps/web-antd/src/views/property/customerService/notices/notices-detail.vue diff --git a/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts b/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts index 1a81f642..0cb913d5 100644 --- a/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts +++ b/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts @@ -207,13 +207,13 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '计费单价', fieldName: 'unitPrice', - component: 'Input', + component: 'InputNumber', rules: 'required', }, { label: '附加费', fieldName: 'surcharge', - component: 'Input', + component: 'InputNumber', rules: 'required', }, ]; diff --git a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue index 2be3601d..e82aae92 100644 --- a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue +++ b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue @@ -52,16 +52,19 @@ async function fetchWorkOrderCount() { const satisfactionLevel = ref(); const { renderEcharts: renderSatisfactionLevel } = useEcharts(satisfactionLevel); async function fetchSatisfactionLevel() { + seriesData.value = board.value.satisfactionRateList.map(item => { + return `${item.value}`; + }) renderSatisfactionLevel({ title: {text: '满意度指数',left: '18px'}, tooltip: { trigger: 'item'}, radar: { indicator: [ - {name: '1星', max: 1000}, - {name: '2星', max: 1000}, - {name: '3星', max: 1000}, - {name: '4星', max: 1000}, - {name: '5星', max: 1000}, + {name: '1星'}, + {name: '2星'}, + {name: '3星'}, + {name: '4星'}, + {name: '5星'}, ] }, series: [ @@ -70,7 +73,7 @@ async function fetchSatisfactionLevel() { name: '满意度指数', data: [ { - value: [500, 400, 800, 600, 400], + value: seriesData.value, } ] } @@ -157,8 +160,12 @@ async function fetchOrderTyper() { }) } -const goToProperty = () => { - router.push('/property') +const goOrderPool = () => { + router.push('/property/business/workOrders') +} + +const goToDo = () => { + router.push('/property/business/workOrderPending') } onMounted(async () => { @@ -180,7 +187,7 @@ onMounted(async () => {
工单总数:
{{ board.workOrdersTotal }}
-
点击前往工单池
+
点击前往工单池
@@ -188,7 +195,7 @@ onMounted(async () => {
待派工单数:
{{ board.notWorkOrdersTotal }}
-
点击前往工单待办
+
点击前往工单待办
@@ -226,8 +233,8 @@ onMounted(async () => {
累计处理工单数
12
-
累计回复数
-
2
+ +
(null); - +const handleRecords = shallowRef(null); async function handleOpenChange(open: boolean) { if (!open) { return null; @@ -23,6 +30,12 @@ async function handleOpenChange(open: boolean) { const {id} = modalApi.getData() as { id: number | string }; const response = await contingenPlanInfo(id); contingenPlanIDetail.value = response; + handleRecords.value = response.contingenPlanRecordVos.map(item => ({ + status: item.status, + createTime: item.createTime, + handlerName: item.dutyPersionName + })); + console.log(handleRecords.value) modalApi.modalLoading(false); } @@ -65,5 +78,19 @@ async function handleOpenChange(open: boolean) { + + + 处理记录 + + + +

类型: +

+

时间:{{item.createTime}}

+

处理人:{{item.handlerName}}

+
+
diff --git a/apps/web-antd/src/views/property/customerService/contingenPlan/data.ts b/apps/web-antd/src/views/property/customerService/contingenPlan/data.ts index aef7829e..933e55ec 100644 --- a/apps/web-antd/src/views/property/customerService/contingenPlan/data.ts +++ b/apps/web-antd/src/views/property/customerService/contingenPlan/data.ts @@ -15,7 +15,7 @@ export const querySchema: FormSchemaGetter = () => [ label: '预案类型', }, { - component: 'Input', + component: 'ApiSelect', fieldName: 'dutyPersion', label: '责任人', }, @@ -92,7 +92,7 @@ export const columns: VxeGridProps['columns'] = [ fixed: 'right', slots: { default: 'action' }, title: '操作', - width: 180, + width: 240, }, ]; diff --git a/apps/web-antd/src/views/property/customerService/contingenPlan/index.vue b/apps/web-antd/src/views/property/customerService/contingenPlan/index.vue index e9bc09e4..5d105101 100644 --- a/apps/web-antd/src/views/property/customerService/contingenPlan/index.vue +++ b/apps/web-antd/src/views/property/customerService/contingenPlan/index.vue @@ -7,11 +7,12 @@ import { vxeCheckboxChecked, type VxeGridProps } from '#/adapter/vxe-table'; - +import {onMounted} from "vue"; import { contingenPlanExport, contingenPlanList, contingenPlanRemove, + contingenPlanUpdate } from '#/api/property/customerService/contingenPlan'; import type { ContingenPlanForm } from '#/api/property/customerService/contingenPlan/model'; import { commonDownloadExcel } from '#/utils/file/download'; @@ -19,6 +20,8 @@ import { commonDownloadExcel } from '#/utils/file/download'; import contingenPlanModal from './contingenPlan-modal.vue'; import contingenPlanDetail from './contingenPlan-detail.vue'; import { columns, querySchema } from './data'; +import {personList} from "#/api/property/resident/person"; +import {renderDictValue} from "#/utils/render"; const formOptions: VbenFormProps = { commonConfig: { @@ -93,6 +96,12 @@ async function handleDelete(row: Required) { await tableApi.query(); } +async function handleExamine(row: Required) { + row.status = '1' + await contingenPlanUpdate(row); + await tableApi.query(); +} + function handleMultiDelete() { const rows = tableApi.grid.getCheckboxRecords(); const ids = rows.map((row: Required) => row.id); @@ -112,6 +121,36 @@ function handleDownloadExcel() { fieldMappingTime: formOptions.fieldMappingTime, }); } + +async function queryPersonData() { + let params = { + pageSize: 1000, + pageNum: 1, + } + const res = await personList(params); + const options = res.rows.map((user) => ({ + label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone, + value: user.id, + })); + tableApi.formApi.updateSchema([ + { + componentProps: () => ({ + options: options, + showSearch:true, + filterOption: filterOption + }), + fieldName: 'dutyPersion', + } + ]) +} + +const filterOption = (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; +}; + +onMounted(async () => { + await queryPersonData() +})