This commit is contained in:
@@ -207,13 +207,13 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
label: '计费单价',
|
label: '计费单价',
|
||||||
fieldName: 'unitPrice',
|
fieldName: 'unitPrice',
|
||||||
component: 'Input',
|
component: 'InputNumber',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '附加费',
|
label: '附加费',
|
||||||
fieldName: 'surcharge',
|
fieldName: 'surcharge',
|
||||||
component: 'Input',
|
component: 'InputNumber',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -52,16 +52,19 @@ async function fetchWorkOrderCount() {
|
|||||||
const satisfactionLevel = ref<EchartsUIType>();
|
const satisfactionLevel = ref<EchartsUIType>();
|
||||||
const { renderEcharts: renderSatisfactionLevel } = useEcharts(satisfactionLevel);
|
const { renderEcharts: renderSatisfactionLevel } = useEcharts(satisfactionLevel);
|
||||||
async function fetchSatisfactionLevel() {
|
async function fetchSatisfactionLevel() {
|
||||||
|
seriesData.value = board.value.satisfactionRateList.map(item => {
|
||||||
|
return `${item.value}`;
|
||||||
|
})
|
||||||
renderSatisfactionLevel({
|
renderSatisfactionLevel({
|
||||||
title: {text: '满意度指数',left: '18px'},
|
title: {text: '满意度指数',left: '18px'},
|
||||||
tooltip: { trigger: 'item'},
|
tooltip: { trigger: 'item'},
|
||||||
radar: {
|
radar: {
|
||||||
indicator: [
|
indicator: [
|
||||||
{name: '1星', max: 1000},
|
{name: '1星'},
|
||||||
{name: '2星', max: 1000},
|
{name: '2星'},
|
||||||
{name: '3星', max: 1000},
|
{name: '3星'},
|
||||||
{name: '4星', max: 1000},
|
{name: '4星'},
|
||||||
{name: '5星', max: 1000},
|
{name: '5星'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
@@ -70,7 +73,7 @@ async function fetchSatisfactionLevel() {
|
|||||||
name: '满意度指数',
|
name: '满意度指数',
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: [500, 400, 800, 600, 400],
|
value: seriesData.value,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -157,8 +160,12 @@ async function fetchOrderTyper() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const goToProperty = () => {
|
const goOrderPool = () => {
|
||||||
router.push('/property')
|
router.push('/property/business/workOrders')
|
||||||
|
}
|
||||||
|
|
||||||
|
const goToDo = () => {
|
||||||
|
router.push('/property/business/workOrderPending')
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
@@ -180,7 +187,7 @@ onMounted(async () => {
|
|||||||
<div>
|
<div>
|
||||||
<div>工单总数:</div>
|
<div>工单总数:</div>
|
||||||
<div>{{ board.workOrdersTotal }}</div>
|
<div>{{ board.workOrdersTotal }}</div>
|
||||||
<div style="color: #1890FF" @click="goToProperty()">点击前往工单池</div>
|
<div style="color: #1890FF;cursor: pointer" @click="goOrderPool()">点击前往工单池</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon-edit"><EditOutlined /></div>
|
<div class="icon-edit"><EditOutlined /></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -188,7 +195,7 @@ onMounted(async () => {
|
|||||||
<div>
|
<div>
|
||||||
<div>待派工单数:</div>
|
<div>待派工单数:</div>
|
||||||
<div>{{ board.notWorkOrdersTotal }}</div>
|
<div>{{ board.notWorkOrdersTotal }}</div>
|
||||||
<div style="color: #1890FF">点击前往工单待办</div>
|
<div style="color: #1890FF;cursor: pointer" @click="goToDo()">点击前往工单待办</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon-edit"><EditOutlined /></div>
|
<div class="icon-edit"><EditOutlined /></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -226,8 +233,8 @@ onMounted(async () => {
|
|||||||
<div style="margin-left: 20px;line-height: 30px">
|
<div style="margin-left: 20px;line-height: 30px">
|
||||||
<div>累计处理工单数</div>
|
<div>累计处理工单数</div>
|
||||||
<div>12</div>
|
<div>12</div>
|
||||||
<div>累计回复数</div>
|
<!-- <div>累计回复数</div>-->
|
||||||
<div>2</div>
|
<!-- <div>2</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<EchartsUI
|
<EchartsUI
|
||||||
|
@@ -2,7 +2,14 @@
|
|||||||
import type {ContingenPlanVO} from '#/api/property/customerService/contingenPlan/model';
|
import type {ContingenPlanVO} from '#/api/property/customerService/contingenPlan/model';
|
||||||
import {shallowRef} from 'vue';
|
import {shallowRef} from 'vue';
|
||||||
import {useVbenModal} from '@vben/common-ui';
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
import {Descriptions, DescriptionsItem, Rate} from 'ant-design-vue';
|
import {
|
||||||
|
Descriptions,
|
||||||
|
DescriptionsItem,
|
||||||
|
Divider,
|
||||||
|
Rate,
|
||||||
|
Timeline,
|
||||||
|
TimelineItem
|
||||||
|
} from 'ant-design-vue';
|
||||||
import {contingenPlanInfo} from '#/api/property/customerService/contingenPlan';
|
import {contingenPlanInfo} from '#/api/property/customerService/contingenPlan';
|
||||||
import {renderDict} from "#/utils/render";
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
@@ -14,7 +21,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const contingenPlanIDetail = shallowRef<null | ContingenPlanVO>(null);
|
const contingenPlanIDetail = shallowRef<null | ContingenPlanVO>(null);
|
||||||
|
const handleRecords = shallowRef<null | ContingenPlanVO>(null);
|
||||||
async function handleOpenChange(open: boolean) {
|
async function handleOpenChange(open: boolean) {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
return null;
|
return null;
|
||||||
@@ -23,6 +30,12 @@ async function handleOpenChange(open: boolean) {
|
|||||||
const {id} = modalApi.getData() as { id: number | string };
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
const response = await contingenPlanInfo(id);
|
const response = await contingenPlanInfo(id);
|
||||||
contingenPlanIDetail.value = response;
|
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);
|
modalApi.modalLoading(false);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -65,5 +78,19 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<Rate :value="contingenPlanIDetail.grade" disabled />
|
<Rate :value="contingenPlanIDetail.grade" disabled />
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|
||||||
|
<Divider orientation="left" orientation-margin="0px">
|
||||||
|
处理记录
|
||||||
|
</Divider>
|
||||||
|
<Timeline>
|
||||||
|
<TimelineItem v-for="(item,index) in handleRecords" :key="index">
|
||||||
|
<p style="display: flex;">类型:
|
||||||
|
<component
|
||||||
|
:is="renderDict(item.status,'pro_exercise_status')"
|
||||||
|
/></p>
|
||||||
|
<p>时间:{{item.createTime}}</p>
|
||||||
|
<p>处理人:{{item.handlerName}}</p>
|
||||||
|
</TimelineItem>
|
||||||
|
</Timeline>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -15,7 +15,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
label: '预案类型',
|
label: '预案类型',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'ApiSelect',
|
||||||
fieldName: 'dutyPersion',
|
fieldName: 'dutyPersion',
|
||||||
label: '责任人',
|
label: '责任人',
|
||||||
},
|
},
|
||||||
@@ -92,7 +92,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { default: 'action' },
|
slots: { default: 'action' },
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 180,
|
width: 240,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -7,11 +7,12 @@ import {
|
|||||||
vxeCheckboxChecked,
|
vxeCheckboxChecked,
|
||||||
type VxeGridProps
|
type VxeGridProps
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
|
import {onMounted} from "vue";
|
||||||
import {
|
import {
|
||||||
contingenPlanExport,
|
contingenPlanExport,
|
||||||
contingenPlanList,
|
contingenPlanList,
|
||||||
contingenPlanRemove,
|
contingenPlanRemove,
|
||||||
|
contingenPlanUpdate
|
||||||
} from '#/api/property/customerService/contingenPlan';
|
} from '#/api/property/customerService/contingenPlan';
|
||||||
import type { ContingenPlanForm } from '#/api/property/customerService/contingenPlan/model';
|
import type { ContingenPlanForm } from '#/api/property/customerService/contingenPlan/model';
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
@@ -19,6 +20,8 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
|||||||
import contingenPlanModal from './contingenPlan-modal.vue';
|
import contingenPlanModal from './contingenPlan-modal.vue';
|
||||||
import contingenPlanDetail from './contingenPlan-detail.vue';
|
import contingenPlanDetail from './contingenPlan-detail.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
import {personList} from "#/api/property/resident/person";
|
||||||
|
import {renderDictValue} from "#/utils/render";
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
@@ -93,6 +96,12 @@ async function handleDelete(row: Required<ContingenPlanForm>) {
|
|||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleExamine(row: Required<ContingenPlanForm>) {
|
||||||
|
row.status = '1'
|
||||||
|
await contingenPlanUpdate(row);
|
||||||
|
await tableApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Required<ContingenPlanForm>) => row.id);
|
const ids = rows.map((row: Required<ContingenPlanForm>) => row.id);
|
||||||
@@ -112,6 +121,36 @@ function handleDownloadExcel() {
|
|||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
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()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -144,12 +183,26 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
|
<Popconfirm
|
||||||
|
v-if="row.status === '0'"
|
||||||
|
:get-popup-container="getVxePopupContainer"
|
||||||
|
placement="left"
|
||||||
|
title="确认审核?"
|
||||||
|
@confirm="handleExamine(row)"
|
||||||
|
>
|
||||||
|
<ghost-button
|
||||||
|
@click.stop=""
|
||||||
|
>
|
||||||
|
{{ '审核' }}
|
||||||
|
</ghost-button>
|
||||||
|
</Popconfirm>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
@click.stop="handleInfo(row)"
|
@click.stop="handleInfo(row)"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.info') }}
|
{{ $t('pages.common.info') }}
|
||||||
</ghost-button>
|
</ghost-button>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
|
v-if="row.status === '0'"
|
||||||
v-access:code="['system:contingenPlan:edit']"
|
v-access:code="['system:contingenPlan:edit']"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
>
|
>
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import {type FormSchemaGetter, z} from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
@@ -11,57 +12,50 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_information_type'),
|
||||||
},
|
},
|
||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
label: '类型',
|
label: '信息类型',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
|
{
|
||||||
|
title: '信息ID',
|
||||||
|
field: 'id',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '标题',
|
title: '标题',
|
||||||
field: 'title',
|
field: 'title',
|
||||||
minWidth: 180
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '类型',
|
title: '信息类型',
|
||||||
field: 'type',
|
field: 'type',
|
||||||
width: 150
|
slots:{
|
||||||
|
default: ({row})=>{
|
||||||
|
return renderDict(row.type,'pro_information_type')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
field: 'remark',
|
|
||||||
width: 150
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '是否全小区公告',
|
|
||||||
field: 'isAll',
|
|
||||||
width: 150
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: '开始时间',
|
||||||
field: 'startTime',
|
field: 'startTime',
|
||||||
width: 150
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '结束时间',
|
title: '结束时间',
|
||||||
field: 'endTime',
|
field: 'endTime',
|
||||||
width: 150
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '公告内容',
|
title: '发布人',
|
||||||
field: 'afficheContent',
|
field: 'issuers',
|
||||||
width: 150
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { default: 'action' },
|
slots: { default: 'action' },
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 180,
|
width:'180'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -78,26 +72,41 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
label: '标题',
|
label: '标题',
|
||||||
fieldName: 'title',
|
fieldName: 'title',
|
||||||
component: 'Textarea',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '公告类型',
|
||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('pro_information_type'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '全小区公告',
|
||||||
fieldName: 'remark',
|
fieldName: 'isAll',
|
||||||
component: 'Textarea',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions('wy_sf'),
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '是否全小区公告',
|
label: '通知人',
|
||||||
fieldName: 'isAll',
|
fieldName: 'noticePersion',
|
||||||
component: 'Input',
|
component: 'ApiSelect',
|
||||||
|
componentProps:{
|
||||||
|
mode: 'multiple',
|
||||||
|
},
|
||||||
|
rules: z.array(z.string()).min(1, { message: '请选择巡检人员' }),
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
dependencies: {
|
||||||
|
show: (formValue) =>formValue.isAll==1 ,
|
||||||
|
triggerFields: ['isAll'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '开始时间',
|
label: '开始时间',
|
||||||
@@ -108,6 +117,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '结束时间',
|
label: '结束时间',
|
||||||
@@ -118,6 +128,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '公告内容',
|
label: '公告内容',
|
||||||
@@ -128,10 +139,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
// height: 400 // 高度 默认400
|
// height: 400 // 高度 默认400
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
formItemClass: 'col-span-2'
|
||||||
{
|
|
||||||
label: '发布人',
|
|
||||||
fieldName: 'issuers',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -12,13 +12,11 @@ import {
|
|||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
noticesExport,
|
|
||||||
noticesList,
|
noticesList,
|
||||||
noticesRemove,
|
noticesRemove,
|
||||||
} from '#/api/property/customerService/notices';
|
} from '#/api/property/customerService/notices';
|
||||||
import type { NoticesForm } from '#/api/property/customerService/notices/model';
|
import type { NoticesForm } from '#/api/property/customerService/notices/model';
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import noticesDetail from './notices-detail.vue';
|
||||||
|
|
||||||
import noticesModal from './notices-modal.vue';
|
import noticesModal from './notices-modal.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
@@ -31,15 +29,6 @@ const formOptions: VbenFormProps = {
|
|||||||
},
|
},
|
||||||
schema: querySchema(),
|
schema: querySchema(),
|
||||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
|
|
||||||
// 不需要直接删除
|
|
||||||
// fieldMappingTime: [
|
|
||||||
// [
|
|
||||||
// 'createTime',
|
|
||||||
// ['params[beginTime]', 'params[endTime]'],
|
|
||||||
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridOptions: VxeGridProps = {
|
const gridOptions: VxeGridProps = {
|
||||||
@@ -84,6 +73,15 @@ const [NoticesModal, modalApi] = useVbenModal({
|
|||||||
connectedComponent: noticesModal,
|
connectedComponent: noticesModal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [noticesDetailModal, noticesDetailApi] = useVbenModal({
|
||||||
|
connectedComponent: noticesDetail,
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleInfo(row: Required<NoticesForm>) {
|
||||||
|
noticesDetailApi.setData({ id: row.id });
|
||||||
|
noticesDetailApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
modalApi.setData({});
|
modalApi.setData({});
|
||||||
modalApi.open();
|
modalApi.open();
|
||||||
@@ -112,12 +110,6 @@ function handleMultiDelete() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDownloadExcel() {
|
|
||||||
commonDownloadExcel(noticesExport, '客户服务-通知公告数据', tableApi.formApi.form.values, {
|
|
||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -125,12 +117,6 @@ function handleDownloadExcel() {
|
|||||||
<BasicTable table-title="通知公告列表">
|
<BasicTable table-title="通知公告列表">
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
|
||||||
v-access:code="['domain:notices:export']"
|
|
||||||
@click="handleDownloadExcel"
|
|
||||||
>
|
|
||||||
{{ $t('pages.common.export') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
<a-button
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
danger
|
danger
|
||||||
@@ -150,6 +136,11 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
@click.stop="handleInfo(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.info') }}
|
||||||
|
</ghost-button>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
v-access:code="['domain:notices:edit']"
|
v-access:code="['domain:notices:edit']"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
@@ -174,5 +165,6 @@ function handleDownloadExcel() {
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<NoticesModal @reload="tableApi.query()" />
|
<NoticesModal @reload="tableApi.query()" />
|
||||||
|
<noticesDetailModal/>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -0,0 +1,60 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {shallowRef} from 'vue';
|
||||||
|
import {useVbenModal} from '@vben/common-ui';
|
||||||
|
import {Descriptions, DescriptionsItem} from 'ant-design-vue';
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
import {noticesInfo} from "#/api/property/customerService/notices";
|
||||||
|
import type {NoticesVO} from "#/api/property/customerService/notices/model";
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
onOpenChange: handleOpenChange,
|
||||||
|
onClosed() {
|
||||||
|
noticesDetail.value = null;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const noticesDetail = shallowRef<null | NoticesVO>(null);
|
||||||
|
|
||||||
|
async function handleOpenChange(open: boolean) {
|
||||||
|
if (!open) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
const {id} = modalApi.getData() as { id: number | string };
|
||||||
|
noticesDetail.value = await noticesInfo(id);
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :footer="false" :fullscreen-button="false" title="意见反馈详情" class="w-[70%]">
|
||||||
|
<Descriptions v-if="noticesDetail" size="small" :column="2" bordered
|
||||||
|
:labelStyle="{width:'120px'}">
|
||||||
|
<DescriptionsItem label="标题">
|
||||||
|
{{ noticesDetail.title }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="公告类型">
|
||||||
|
<component
|
||||||
|
:is="renderDict(noticesDetail.type,'pro_information_type')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="全小区公告">
|
||||||
|
<component
|
||||||
|
:is="renderDict(noticesDetail.isAll,'wy_sf')"
|
||||||
|
/>
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="通知人">
|
||||||
|
{{ noticesDetail.noticePersion }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="开始时间">
|
||||||
|
{{ noticesDetail.startTime }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="结束时间">
|
||||||
|
{{ noticesDetail.endTime }}
|
||||||
|
</DescriptionsItem>
|
||||||
|
<DescriptionsItem label="公告内容">
|
||||||
|
<div v-html="noticesDetail.afficheContent"></div>
|
||||||
|
</DescriptionsItem>
|
||||||
|
</Descriptions>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
@@ -10,6 +10,8 @@ import { noticesAdd, noticesInfo, noticesUpdate } from '#/api/property/customerS
|
|||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
import { modalSchema } from './data';
|
import { modalSchema } from './data';
|
||||||
|
import {personList} from "#/api/property/resident/person";
|
||||||
|
import {renderDictValue} from "#/utils/render";
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
@@ -21,7 +23,7 @@ const title = computed(() => {
|
|||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
// 默认label宽度 px
|
// 默认label宽度 px
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
// 通用配置项 会影响到所有表单项
|
// 通用配置项 会影响到所有表单项
|
||||||
@@ -43,7 +45,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
// 在这里更改宽度
|
// 在这里更改宽度
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
@@ -53,12 +55,15 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
|
await queryPersonData()
|
||||||
const { id } = modalApi.getData() as { id?: number | string };
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
isUpdate.value = !!id;
|
isUpdate.value = !!id;
|
||||||
|
|
||||||
if (isUpdate.value && id) {
|
if (isUpdate.value && id) {
|
||||||
const record = await noticesInfo(id);
|
const record = await noticesInfo(id);
|
||||||
|
if(record.isAll === '0'){
|
||||||
|
record.noticePersion = null
|
||||||
|
}
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
@@ -76,6 +81,7 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
data.noticePersion = data.noticePersion?.join(',')
|
||||||
await (isUpdate.value ? noticesUpdate(data) : noticesAdd(data));
|
await (isUpdate.value ? noticesUpdate(data) : noticesAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@@ -91,6 +97,32 @@ async function handleClosed() {
|
|||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 + '-' + user.unitName,
|
||||||
|
value: user.id,
|
||||||
|
}));
|
||||||
|
formApi.updateSchema([{
|
||||||
|
componentProps: () => ({
|
||||||
|
options: options,
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: filterOption,
|
||||||
|
mode: 'multiple',
|
||||||
|
}),
|
||||||
|
fieldName: 'noticePersion',
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Reference in New Issue
Block a user