Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2025-08-25 15:46:13 +08:00
72 changed files with 592 additions and 370 deletions

View File

@@ -37,12 +37,6 @@ jobs:
exit 1 exit 1
fi fi
- name: 通过SSH复制文件 - name: 通过SSH复制文件
uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7 run: cp -rf ./apps/web-antd/dist/* /www/wwwroot/183.230.235.66_11010/property
with:
host: 127.0.0.1
username: ${{ secrets.SERVER_NAME }} # 使用secrets存储
password: ${{ secrets.SERVER_PWD }} # 使用secrets存储
port: 11001
source: "./apps/web-antd/dist"
target: "/www/wwwroot/183.230.235.66_11010/property"

View File

@@ -20,7 +20,7 @@ export interface AttendanceAreaVO {
* 备注 * 备注
*/ */
reamark: string; reamark: string;
areaDevice?: any[];
} }
export interface AttendanceAreaForm extends BaseEntity { export interface AttendanceAreaForm extends BaseEntity {
@@ -43,7 +43,6 @@ export interface AttendanceAreaForm extends BaseEntity {
* 备注 * 备注
*/ */
reamark?: string; reamark?: string;
} }
export interface AttendanceAreaQuery extends PageQuery { export interface AttendanceAreaQuery extends PageQuery {

View File

@@ -59,3 +59,19 @@ export function workOrdersUpdate(data: WorkOrdersForm) {
export function workOrdersRemove(id: ID | IDS) { export function workOrdersRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/workOrders/${id}`); return requestClient.deleteWithMsg<void>(`/property/workOrders/${id}`);
} }
/**
* 派单
* @param data
*/
export function workOrdersDispatch(data: WorkOrdersForm) {
return requestClient.putWithMsg<void>('/property/workOrders/dispatch', data);
}
/**
* 抢单
* @param data
*/
export function workOrdersGrab(data: WorkOrdersForm) {
return requestClient.putWithMsg<void>('/property/workOrders/grab', data);
}

View File

@@ -64,7 +64,7 @@ export interface WorkOrdersVO {
/** /**
* 评价 * 评价
*/ */
serviceEvalua: string; serviceEvalua: number;
/** /**
* 是否超时 * 是否超时
@@ -82,6 +82,8 @@ export interface WorkOrdersVO {
* 评价图片 * 评价图片
*/ */
imgUrl: string; imgUrl: string;
evaluateImgPath: string[];
/** /**
* 评价内容 * 评价内容
*/ */
@@ -99,6 +101,12 @@ export interface WorkOrdersVO {
*/ */
orderImgUrl: string; orderImgUrl: string;
orderImgPath: string[];
reportingType: string;
processingWeight: string;
} }
export interface HandleRecords { export interface HandleRecords {

View File

@@ -37,6 +37,11 @@ export interface WorkOrdersTypeVO {
isTransfers: string; isTransfers: string;
excludeId: string; excludeId: string;
/**
* 处理优先级
*/
processingWeight: string;
} }
export interface WorkOrdersTypeForm extends BaseEntity { export interface WorkOrdersTypeForm extends BaseEntity {
@@ -79,6 +84,11 @@ export interface WorkOrdersTypeForm extends BaseEntity {
* 上级类型id * 上级类型id
*/ */
parentId?: string; parentId?: string;
/**
* 处理优先级
*/
processingWeight: string;
} }
export interface WorkOrdersTypeQuery extends PageQuery { export interface WorkOrdersTypeQuery extends PageQuery {

View File

@@ -144,6 +144,16 @@ export interface Clean_orderForm extends BaseEntity {
*/ */
phone?: string; phone?: string;
/**
* 签到图片
*/
signImgUrl?: string;
/**
* 评价图片
*/
imgUrl?: string;
} }
export interface Clean_orderQuery extends PageQuery { export interface Clean_orderQuery extends PageQuery {

View File

@@ -21,6 +21,8 @@ export interface KnowledgeVO {
*/ */
covers: string; covers: string;
coversPath: string|undefined;
/** /**
* 内容 * 内容
*/ */

View File

@@ -26,6 +26,8 @@ export interface PropertyVO {
*/ */
imgPath: string; imgPath: string;
plantImg: string;
/** /**
* 规格 * 规格
*/ */
@@ -102,7 +104,6 @@ export interface PropertyForm extends BaseEntity {
* 备注 * 备注
*/ */
remark?: string; remark?: string;
} }
export interface PropertyQuery extends PageQuery { export interface PropertyQuery extends PageQuery {
@@ -178,6 +179,8 @@ export interface plantsProduct extends BaseEntity {
*/ */
imgPath?: string; imgPath?: string;
plantImg: string |undefined;
/** /**
* 规格 * 规格
*/ */

View File

@@ -31,6 +31,8 @@ export interface PersonVO {
*/ */
img: string img: string
imgPath?: string
/** /**
* 所属单位id * 所属单位id
*/ */
@@ -79,6 +81,10 @@ export interface PersonVO {
rosterType?: string | number rosterType?: string | number
email?: string
idCard?: string
} }
export interface PersonForm extends BaseEntity { export interface PersonForm extends BaseEntity {

View File

@@ -65,6 +65,9 @@ export interface Resident_unitVO {
* 权限组名称 * 权限组名称
*/ */
authGroupName?: string; authGroupName?: string;
// 授权期限
authBegDate?:string;//开始
authEndDate?:string;//结束
} }

View File

@@ -67,6 +67,8 @@ export interface MeetVO {
* 图片 * 图片
*/ */
picture: string; picture: string;
pictureArr: string[];
/** /**
* 开放时段开始时间 * 开放时段开始时间
*/ */
@@ -75,6 +77,19 @@ export interface MeetVO {
* 开放时段结束时间 * 开放时段结束时间
*/ */
openEndHours: string; openEndHours: string;
/**
* 会议室类型
*/
meetingRoomType: string;
/**
* 位置
*/
locationName: string;
/**
* 负责人
*/
principalsName: string;
} }
export interface MeetForm extends BaseEntity { export interface MeetForm extends BaseEntity {
@@ -161,6 +176,8 @@ export interface MeetForm extends BaseEntity {
*/ */
picture: string; picture: string;
pictureArr: string[];
/** /**
* 开放时段开始时间 * 开放时段开始时间
*/ */

View File

@@ -61,5 +61,11 @@ export const modalSchema: FormSchemaGetter = () => [
label: '排序', label: '排序',
fieldName: 'sort', fieldName: 'sort',
component: 'InputNumber', component: 'InputNumber',
rules:'required',
componentProps: {
min: 0,
precision: 0,
step: 1
},
}, },
]; ];

View File

@@ -164,7 +164,7 @@ const { hasAccessByCodes } = useAccess();
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:depot:info']" v-access:code="['property:depot:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -5,9 +5,9 @@ import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render'; import { renderDict } from '#/utils/render';
import { suppliersList } from '#/api/property/assetManage/suppliers'; import { suppliersList } from '#/api/property/assetManage/suppliers';
import { depotList } from '#/api/property/assetManage/depot'; import { depotList } from '#/api/property/assetManage/depot';
import { useUserStore } from '@vben/stores'; // import { useUserStore } from '@vben/stores';
const userStore = useUserStore(); // const userStore = useUserStore();
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
// { // {
@@ -39,11 +39,13 @@ export const querySchema: FormSchemaGetter = () => [
{ {
component: 'Select', component: 'Select',
componentProps: {}, componentProps: {
fieldName: 'buyType',
label: '采购方式',
options: getDictOptions('wy_zccgfs'), options: getDictOptions('wy_zccgfs'),
}, },
fieldName: 'buyType',
label: '采购方式',
},
{ {
component: 'Select', component: 'Select',
componentProps: { componentProps: {

View File

@@ -179,7 +179,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['domain:procurementApplication:audit']" v-access:code="['domain:procurementApplication:edit']"
:disabled="row.state === '1' || row.state === '2'" :disabled="row.state === '1' || row.state === '2'"
type="primary" type="primary"
@click.stop="handleAudit(row)" @click.stop="handleAudit(row)"
@@ -187,7 +187,7 @@ function handleDownloadExcel() {
审核 审核
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['domain:procurementApplication:detail']" v-access:code="['domain:procurementApplication:query']"
@click.stop="handleDetail(row)" @click.stop="handleDetail(row)"
> >
详情 详情

View File

@@ -155,14 +155,14 @@ const { hasAccessByCodes } = useAccess();
:unCheckedValue="0" :unCheckedValue="0"
v-model:value="row.state" v-model:value="row.state"
:api="() => suppliersUpdate(row)" :api="() => suppliersUpdate(row)"
:disabled="!hasAccessByCodes(['property:suppliers:update'])" :disabled="!hasAccessByCodes(['property:suppliers:edit'])"
@reload="() => tableApi.query()" @reload="() => tableApi.query()"
/> />
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:suppliers:info']" v-access:code="['property:suppliers:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -1,20 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Recordable } from '@vben/types';
import { ref } from 'vue';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui'; import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils'; import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue'; import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import { import {
useVbenVxeGrid, useVbenVxeGrid,
vxeCheckboxChecked, vxeCheckboxChecked,
type VxeGridProps type VxeGridProps
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
assetTypeExport, assetTypeExport,
assetTypeList, assetTypeList,
@@ -35,15 +27,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 = {

View File

@@ -63,6 +63,9 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) { if (isUpdate.value && id) {
const record = await attendanceAreaInfo(id); const record = await attendanceAreaInfo(id);
record.deviceManageId = record.areaDevice
.map((device: any) => device.remoteSisDeviceManage?.id || '')
.filter((id: string) => id);
await formApi.setValues(record); await formApi.setValues(record);
} }
await markInitialized(); await markInitialized();

View File

@@ -62,11 +62,13 @@ export const modalSchema: FormSchemaGetter = () => [
label: '区域', label: '区域',
fieldName: 'area', fieldName: 'area',
component: 'Input', component: 'Input',
rules: 'required',
}, },
{ {
label: '摄像机', label: '摄像机',
fieldName: 'deviceManageId', fieldName: 'deviceManageId',
component: 'ApiSelect', component: 'ApiSelect',
rules: 'required',
componentProps: { componentProps: {
api: async () => { api: async () => {
const res = await deviceManageList({ const res = await deviceManageList({

View File

@@ -154,7 +154,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['Property:group:info']" v-access:code="['Property:group:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
@@ -187,7 +187,7 @@ function handleDownloadExcel() {
:unCheckedValue="0" :unCheckedValue="0"
v-model:value="row.status" v-model:value="row.status"
:api="() => groupUpdate(row)" :api="() => groupUpdate(row)"
:disabled="!hasAccessByCodes(['property:depot:edit'])" :disabled="!hasAccessByCodes(['Property:group:edit'])"
@reload="() => tableApi.query()" @reload="() => tableApi.query()"
/> />
</template> </template>

View File

@@ -276,7 +276,7 @@ defineExpose({
</div> </div>
</div> </div>
<div> <div>
<Button type="primary" @click="handleAdd">新增排班</Button> <Button type="primary" @click="handleAdd" v-access:code="['Property:arrangement:add']">新增排班</Button>
</div> </div>
</div> </div>
<div class="flex-1 p-1"> <div class="flex-1 p-1">
@@ -295,12 +295,16 @@ defineExpose({
<a <a
style="margin-left: 4px; color: #1890ff; cursor: pointer" style="margin-left: 4px; color: #1890ff; cursor: pointer"
@click.stop="handleEdit(item.item, current)" @click.stop="handleEdit(item.item, current)"
v-access:code="['Property:arrangement:edit']"
> >
编辑 编辑
</a> </a>
<a <a
style="margin-left: 4px; color: #ff4d4f; cursor: pointer" style="margin-left: 4px; color: #ff4d4f; cursor: pointer"
@click.stop="handleDelete(item.item)" @click.stop="handleDelete(item.item)"
v-access:code="['Property:arrangement:remove']"
> >
删除 删除
</a> </a>
@@ -311,6 +315,7 @@ defineExpose({
v-if="getListData2(current).length > 0" v-if="getListData2(current).length > 0"
style="margin-left: 4px; color: #1890ff; cursor: pointer" style="margin-left: 4px; color: #1890ff; cursor: pointer"
@click.stop="handleViewDateDetails(current)" @click.stop="handleViewDateDetails(current)"
v-access:code="['Property:userGroup:queryScheduleView']"
> >
详情 详情
</a> </a>

View File

@@ -137,7 +137,7 @@ defineExpose({
> >
<ghost-button <ghost-button
danger danger
v-access:code="['property:arrangement:remove']" v-access:code="['Property:arrangement:remove']"
@click.stop="" @click.stop=""
> >
移除 移除

View File

@@ -75,7 +75,7 @@ function handleInfo(row:any) {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:workOrders:info']" v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -8,7 +8,7 @@ import {
import { import {
workOrdersList, workOrdersList,
} from '#/api/property/businessManagement/workOrders'; } from '#/api/property/businessManagement/workOrders';
import workOrdersDetail from './work-orders-detail.vue'; import workOrdersDetail from '../workOrders/work-orders-detail.vue';
import {columns, querySchema} from './data'; import {columns, querySchema} from './data';
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
@@ -75,7 +75,7 @@ function handleInfo(row:any) {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:workOrders:info']" v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -56,7 +56,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'reportingType', field: 'reportingType',
slots: { slots: {
default: ({row}) => { default: ({row}) => {
return renderDict(row.reportingType, 'wy_gdsblx'); return row.reportingType!=null?renderDict(row.reportingType, 'wy_gdsblx'):'';
}, },
}, },
width: 100, width: 100,
@@ -86,7 +86,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'processingWeight', field: 'processingWeight',
slots: { slots: {
default: ({row}) => { default: ({row}) => {
return renderDict(row.processingWeight, 'pro_processing_weight'); return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
}, },
}, },
width: 100, width: 100,

View File

@@ -184,19 +184,21 @@ onMounted(async () => {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:workOrders:dispatch']"
@click.stop="handleOrders(row,'group')" @click.stop="handleOrders(row,'group')"
v-if="row.status!=='1' && row.status!=='2'" v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
> >
{{ '派单' }} {{ '派单' }}
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['property:workOrders:grab']"
@click.stop="handleOrders(row,'rob')" @click.stop="handleOrders(row,'rob')"
v-if="row.status!=='1' && row.status!=='2'" v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
> >
{{ '抢单' }} {{ '抢单' }}
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['property:workOrders:info']" v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -3,6 +3,7 @@ import {useVbenModal} from '@vben/common-ui';
import {cloneDeep} from '@vben/utils'; import {cloneDeep} from '@vben/utils';
import {useVbenForm} from '#/adapter/form'; import {useVbenForm} from '#/adapter/form';
import { import {
workOrdersDispatch, workOrdersGrab,
workOrdersInfo, workOrdersInfo,
workOrdersUpdate workOrdersUpdate
} from '#/api/property/businessManagement/workOrders'; } from '#/api/property/businessManagement/workOrders';
@@ -84,11 +85,15 @@ async function handleConfirm() {
} }
const data = cloneDeep(await formApi.getValues()); const data = cloneDeep(await formApi.getValues());
if(title.value === '派单'){ if(title.value === '派单'){
//派单
record.value.handler = data.handler record.value.handler = data.handler
await workOrdersDispatch(record.value)
}else{ }else{
//抢单
record.value.handler = userStore.userInfo.userId record.value.handler = userStore.userInfo.userId
await workOrdersGrab(record.value)
} }
await workOrdersUpdate(record.value)
resetInitialized(); resetInitialized();
emit('reload'); emit('reload');
modalApi.close(); modalApi.close();

View File

@@ -1,13 +1,21 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowRef} from 'vue'; import {ref, shallowRef} from 'vue';
import {useVbenModal} from '@vben/common-ui'; import {useVbenModal} from '@vben/common-ui';
import {Descriptions, DescriptionsItem, Timeline, TimelineItem, Rate,Divider} from 'ant-design-vue'; import {
Descriptions,
DescriptionsItem,
Timeline,
TimelineItem,
Rate,
Divider
} from 'ant-design-vue';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration'; import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime'; import relativeTime from 'dayjs/plugin/relativeTime';
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders"; import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
import type {HandleRecords, WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model"; import type {HandleRecords, WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration); dayjs.extend(duration);
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
@@ -21,6 +29,7 @@ const [BasicModal, modalApi] = useVbenModal({
const orderDetail = shallowRef<null | WorkOrdersVO>(null); const orderDetail = shallowRef<null | WorkOrdersVO>(null);
const handleRecords = ref<HandleRecords[]>([]) const handleRecords = ref<HandleRecords[]>([])
async function handleOpenChange(open: boolean) { async function handleOpenChange(open: boolean) {
if (!open) { if (!open) {
return null; return null;
@@ -28,12 +37,31 @@ async function handleOpenChange(open: boolean) {
modalApi.modalLoading(true); modalApi.modalLoading(true);
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
orderDetail.value = await workOrdersInfo(id); orderDetail.value = await workOrdersInfo(id);
if(orderDetail.value){ if (orderDetail.value.workOrdersRecordVoList) {
handleRecords.value = orderDetail.value.workOrdersRecordVoList.map((item, index) => ({ handleRecords.value = orderDetail.value.workOrdersRecordVoList.map((item, index) => ({
status: item.status, status: item.status,
createTime: item.createTime, createTime: item.createTime,
handlerName: index === 0 ? item.initiatorPeople : item.handlerName handlerName: index === 0 ? item.initiatorPeople : item.handlerName
})) }))
}
try {
if (orderDetail.value.orderImgUrl) {
const res = await ossInfo([orderDetail.value.orderImgUrl]);
let imgUrls = [];
res.forEach(item => {
imgUrls.push(item.url)
})
orderDetail.value.orderImgPath = imgUrls;
}
if (orderDetail.value.imgUrl) {
const res = await ossInfo([orderDetail.value.imgUrl]);
let imgUrls = [];
res.forEach(item => {
imgUrls.push(item.url)
})
orderDetail.value.evaluateImgPath = imgUrls
}
} catch (e) {
} }
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
@@ -53,12 +81,12 @@ async function handleOpenChange(open: boolean) {
{{ orderDetail.typeName }} {{ orderDetail.typeName }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="上报类型"> <DescriptionsItem label="上报类型">
<component <component v-if="orderDetail.reportingType!=null"
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')" :is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="处理优先级"> <DescriptionsItem label="处理优先级">
<component <component v-if="orderDetail.processingWeight!=null"
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')" :is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
/> />
</DescriptionsItem> </DescriptionsItem>
@@ -88,23 +116,24 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="完成时间"> <DescriptionsItem label="完成时间">
{{ orderDetail.compleTime }} {{ orderDetail.compleTime }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="是否超时" :span="2">
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null"> <component v-if="orderDetail.isTimeOut!=null"
<component
:is="renderDict(orderDetail.isTimeOut,'wy_sf')" :is="renderDict(orderDetail.isTimeOut,'wy_sf')"
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgPath" :span="2">
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
class="orders-img"/>
</DescriptionsItem>
<DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null" :span="2"> <DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null" :span="2">
<Rate :value="orderDetail.serviceEvalua" disabled/> <Rate :value="orderDetail.serviceEvalua" disabled/>
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="评价内容" v-if="orderDetail.serviceEvaluaText" :span="2"> <DescriptionsItem label="评价内容" v-if="orderDetail.serviceEvaluaText" :span="2">
{{ orderDetail.serviceEvaluaText }} {{ orderDetail.serviceEvaluaText }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="评价图片" v-if="orderDetail.imgUrl" :span="2"> <DescriptionsItem label="评价图片" v-if="orderDetail.evaluateImgPath" :span="2">
{{ orderDetail.imgUrl }} <img v-for="item in orderDetail.evaluateImgPath" :src="item" alt="图片加载失败"
</DescriptionsItem> class="orders-img"/>
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgUrl" :span="2">
{{ orderDetail.orderImgUrl }}
</DescriptionsItem> </DescriptionsItem>
</Descriptions> </Descriptions>
<Divider orientation="left" orientation-margin="0px"> <Divider orientation="left" orientation-margin="0px">
@@ -113,9 +142,10 @@ async function handleOpenChange(open: boolean) {
<Timeline> <Timeline>
<TimelineItem v-for="(item,index) in handleRecords" :key="index"> <TimelineItem v-for="(item,index) in handleRecords" :key="index">
<p style="display: flex;">类型 <p style="display: flex;">类型
<component <component v-if="item.status!=null"
:is="renderDict(item.status,'wy_gdclzt')" :is="renderDict(item.status,'wy_gdclzt')"
/></p> />
</p>
<p>时间{{ item.createTime }}</p> <p>时间{{ item.createTime }}</p>
<p>处理人{{ item.handlerName }}</p> <p>处理人{{ item.handlerName }}</p>
</TimelineItem> </TimelineItem>
@@ -123,3 +153,10 @@ async function handleOpenChange(open: boolean) {
</div> </div>
</BasicModal> </BasicModal>
</template> </template>
<style scoped lang="scss">
.orders-img {
width: 100px;
margin: 5px 10px;
display: inline-block;
}
</style>

View File

@@ -15,6 +15,7 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
import {modalSchema} from './data'; import {modalSchema} from './data';
import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType"; import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType";
import type {WorkOrdersTypeVO} from "#/api/property/businessManagement/workOrdersType/model";
const emit = defineEmits<{ reload: [] }>(); const emit = defineEmits<{ reload: [] }>();
@@ -108,7 +109,7 @@ async function queryWorkOrdersType() {
const options = await workOrdersTypeTree() const options = await workOrdersTypeTree()
formApi.updateSchema([ formApi.updateSchema([
{ {
componentProps: () => ({ componentProps: (formModel) => ({
class: 'w-full', class: 'w-full',
fieldNames: { fieldNames: {
key: 'id', key: 'id',
@@ -123,16 +124,15 @@ async function queryWorkOrdersType() {
treeLine: { showLeafIcon: false }, treeLine: { showLeafIcon: false },
treeNodeFilterProp: 'orderTypeName', treeNodeFilterProp: 'orderTypeName',
treeNodeLabelProp: 'orderTypeName', treeNodeLabelProp: 'orderTypeName',
async onSelect(type:string,node:WorkOrdersTypeVO) {
formModel.processingWeight = node.processingWeight;
},
}), }),
fieldName: 'type', fieldName: 'type',
}, },
]); ]);
} }
const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
</script> </script>
<template> <template>

View File

@@ -46,6 +46,16 @@ export const columns: VxeGridProps['columns'] = [
}, },
width:180, width:180,
}, },
{
title: '处理优先级',
field: 'processingWeight',
slots: {
default: ({row}) => {
return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
},
},
width: 100,
},
{ {
title: '排序值', title: '排序值',
field: 'sort', field: 'sort',
@@ -105,6 +115,15 @@ export const modalSchema: FormSchemaGetter = () => [
}, },
rules: 'selectRequired', rules: 'selectRequired',
}, },
{
label: '处理优先级',
fieldName: 'processingWeight',
component: 'Select',
componentProps: {
options: getDictOptions('pro_processing_weight'),
},
rules: 'selectRequired',
},
{ {
label: '完成时效(小时)', label: '完成时效(小时)',
fieldName: 'completionNumber', fieldName: 'completionNumber',

View File

@@ -140,6 +140,7 @@ function handleMultiDelete() {
<Space> <Space>
<ghost-button <ghost-button
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
v-access:code="['property:workOrdersType:query']"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>

View File

@@ -37,11 +37,16 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="类型名称"> <DescriptionsItem label="类型名称">
{{ workOrdersTypeInfoDetail.orderTypeName }} {{ workOrdersTypeInfoDetail.orderTypeName }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="运作模式" v-if="workOrdersTypeInfoDetail.operationMode!=null"> <DescriptionsItem label="运作模式" >
<component <component v-if="workOrdersTypeInfoDetail.operationMode!=null"
:is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')" :is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')"
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="处理优先级">
<component v-if="workOrdersTypeInfoDetail.processingWeight!=null"
:is="renderDict(workOrdersTypeInfoDetail.processingWeight,'pro_processing_weight')"
/>
</DescriptionsItem>
<DescriptionsItem label="排序值"> <DescriptionsItem label="排序值">
{{ workOrdersTypeInfoDetail.sort }} {{ workOrdersTypeInfoDetail.sort }}
</DescriptionsItem> </DescriptionsItem>

View File

@@ -26,6 +26,7 @@ import cleanDetailModal from './clean-detail-modal.vue';
// import { modalSchema } from './data'; // import { modalSchema } from './data';
import { communityTree } from '#/api/property/community'; import { communityTree } from '#/api/property/community';
import { getDictOptions } from '#/utils/dict'; import { getDictOptions } from '#/utils/dict';
import type {Clean_orderForm} from "#/api/property/clean_order/model";
const emit = defineEmits<{ reload: [] }>(); const emit = defineEmits<{ reload: [] }>();
@@ -190,9 +191,13 @@ const modalSchema = [
{ {
label: '评价图片', label: '评价图片',
fieldName: 'imgUrl', fieldName: 'imgUrl',
component: 'Input', component: 'ImageUpload',
componentProps: {
helpMessage: false,
},
dependencies: { dependencies: {
show: () => (isReadonly.value ? true : false), show: (formValue:Clean_orderForm) =>
isReadonly.value && formValue.imgUrl ? true : false,
triggerFields: [''], triggerFields: [''],
}, },
}, },
@@ -201,7 +206,7 @@ const modalSchema = [
fieldName: 'signType', fieldName: 'signType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:getDictOptions('wy_bjqdfs') options: getDictOptions('wy_bjqdfs'),
}, },
dependencies: { dependencies: {
show: () => (isReadonly.value ? true : false), show: () => (isReadonly.value ? true : false),
@@ -213,10 +218,11 @@ const modalSchema = [
fieldName: 'signImgUrl', fieldName: 'signImgUrl',
component: 'ImageUpload', component: 'ImageUpload',
componentProps: { componentProps: {
helpMessage:false helpMessage: false,
}, },
dependencies: { dependencies: {
show: (formValue) => (isReadonly.value&&formValue.signImgUrl ? true : false), show: (formValue:Clean_orderForm) =>
isReadonly.value && formValue.signImgUrl ? true : false,
triggerFields: [''], triggerFields: [''],
}, },
}, },
@@ -289,7 +295,6 @@ const [BasicModal, modalApi] = useVbenModal({
if (!isOpen) { if (!isOpen) {
return null; return null;
} }
console.log(isReadonly.value);
// 查询服务地址树形结构 // 查询服务地址树形结构
setupCommunitySelect(); setupCommunitySelect();
@@ -314,6 +319,7 @@ const [BasicModal, modalApi] = useVbenModal({
} }
if ((isUpdate.value || isReadonly.value) && id) { if ((isUpdate.value || isReadonly.value) && id) {
const record: any = await clean_orderInfo(id); const record: any = await clean_orderInfo(id);
if (record.starTime) record.starTime = dayjs(record.starTime); if (record.starTime) record.starTime = dayjs(record.starTime);
if (record.endTime) record.endTime = dayjs(record.endTime); if (record.endTime) record.endTime = dayjs(record.endTime);
editUnitId.value = record.unitId || ''; editUnitId.value = record.unitId || '';
@@ -496,7 +502,6 @@ async function handleConfirm() {
return; return;
} }
const data = cloneDeep(await formApi.getValues()); const data = cloneDeep(await formApi.getValues());
console.log(data);
// 单位数据缓存 // 单位数据缓存
if (unitListData.length === 0) { if (unitListData.length === 0) {
@@ -537,7 +542,6 @@ async function handleClosed() {
// 获取服务地址 // 获取服务地址
async function setupCommunitySelect() { async function setupCommunitySelect() {
const areaList = await communityTree(4); const areaList = await communityTree(4);
console.log(areaList);
// 选中后显示在输入框的值 即父节点 / 子节点 // 选中后显示在输入框的值 即父节点 / 子节点
// addFullName(areaList, 'areaName', ' / '); // addFullName(areaList, 'areaName', ' / ');

View File

@@ -74,8 +74,8 @@ export const columns: VxeGridProps['columns'] = [
}, },
{ {
title: '服务地址', title: '服务地址',
field: 'location', field: 'locationName',
width: '180', width: '260',
}, },
{ {
title: '合计费用(元)', title: '合计费用(元)',

View File

@@ -7,8 +7,6 @@ import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render'; import { renderDict } from '#/utils/render';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting'; import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
import { personList } from '#/api/property/resident/person'; import { personList } from '#/api/property/resident/person';
import { communityTree } from '#/api/property/community';
import { handleNode } from '@vben/utils';
/** /**
* 查询表单 schema * 查询表单 schema
@@ -57,7 +55,7 @@ export const columns: VxeGridProps['columns'] = [
}, },
{ title: '车牌号', field: 'carNumber' }, { title: '车牌号', field: 'carNumber' },
{ title: '车位', field: 'location' }, { title: '车位', field: 'location' },
{ title: '业主', field: 'personId' }, { title: '业主', field: 'personName' },
{ {
title: '缴费状态', title: '缴费状态',
field: 'chargeStatus', field: 'chargeStatus',
@@ -106,12 +104,12 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: async () => { api: async () => {
const rows = await personList({ pageSize: 1000000000, pageNum: 1 }); const rows = await userList({ pageSize: 1000000000, pageNum: 1 });
return rows; return rows;
}, },
resultField: 'rows', resultField: 'rows',
labelField: 'userName', labelField: 'userName',
valueField: 'id', valueField: 'userId',
}, },
disabled: true, disabled: true,
}, },
@@ -143,7 +141,11 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' }); const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows; return rows;
}, },
resultField: 'rows', resultField: 'rows',
@@ -244,7 +246,11 @@ export const addModalSchema: FormSchemaGetter = () => [
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' }); const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows; return rows;
}, },
resultField: 'rows', resultField: 'rows',

View File

@@ -152,7 +152,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:carCharge:info']" v-access:code="['property:carCharge:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -48,11 +48,11 @@ const schema = [
componentProps: { componentProps: {
api: async () => { api: async () => {
const res = await personList({ pageSize: 1000000000, pageNum: 1 }); const res = await personList({ pageSize: 1000000000, pageNum: 1 });
return res.rows.map((item: any) => ({ return res;
label: item.userName,
value: item.id,
}));
}, },
resultField: 'rows',
labelField: 'userName',
valueField: 'id',
}, },
}, },
{ {

View File

@@ -1,8 +1,7 @@
import type { FormSchemaGetter } from '#/adapter/form'; import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table'; import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict'; import { getDictOptions } from '#/utils/dict';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting'; import {renderDict} from "#/utils/render";
import {meterReadingTypeList} from '#/api/property/costManagement/meterReadingType';
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
{ {
@@ -27,7 +26,12 @@ export const columns: VxeGridProps['columns'] = [
}, },
{ {
title: '费用类型', title: '费用类型',
field: 'itemId', field: 'costType',
slots: {
default: ({ row }) => {
return renderDict(row.costType, 'wy_cbfylx');
},
},
}, },
{ {
title: '抄表类型', title: '抄表类型',

View File

@@ -29,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 = {

View File

@@ -36,7 +36,7 @@ export const columns: VxeGridProps['columns'] = [
{type: 'checkbox', width: 60}, {type: 'checkbox', width: 60},
{ {
title: '房屋', title: '房屋',
field: 'roomId', field: 'roomName',
minWidth: 150, minWidth: 150,
}, },
{ {

View File

@@ -164,7 +164,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:houseCharge:info']" v-access:code="['property:houseCharge:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -85,12 +85,14 @@ async function handleEdit(row: Required<PaymentReviewForm>) {
<Space> <Space>
<ghost-button <ghost-button
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
v-access:code="['property:payFeeAudit:query']"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>
<ghost-button <ghost-button
:disabled="row.state!=='0'" :disabled="row.state!=='0'"
@click.stop="handleEdit(row)" @click.stop="handleEdit(row)"
v-access:code="['property:payFeeAudit:edit']"
> >
{{ '审核' }} {{ '审核' }}
</ghost-button> </ghost-button>

View File

@@ -158,7 +158,7 @@ function handleDownloadExcel() {
审核 审核
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['property:returnPayFee:info']" v-access:code="['property:returnPayFee:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -39,6 +39,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
}, },
); );
const record = ref({})
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度 // 在这里更改宽度
class: 'w-[60%]', class: 'w-[60%]',
@@ -56,8 +57,8 @@ const [BasicModal, modalApi] = useVbenModal({
isUpdate.value = !!id; isUpdate.value = !!id;
if (isUpdate.value && id) { if (isUpdate.value && id) {
const record = await contingenPlanInfo(id); record.value = await contingenPlanInfo(id);
await formApi.setValues(record); await formApi.setValues(record.value);
} }
await markInitialized(); await markInitialized();
@@ -74,6 +75,8 @@ async function handleConfirm() {
} }
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
const data = cloneDeep(await formApi.getValues()); const data = cloneDeep(await formApi.getValues());
data.status = record.value.status
console.log(data,123)
await (isUpdate.value ? contingenPlanUpdate(data) : contingenPlanAdd(data)); await (isUpdate.value ? contingenPlanUpdate(data) : contingenPlanAdd(data));
resetInitialized(); resetInitialized();
emit('reload'); emit('reload');

View File

@@ -122,7 +122,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['system:feedbacks:info']" v-access:code="['system:feedbacks:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
@@ -134,7 +134,7 @@ function handleDownloadExcel() {
{{ $t('pages.common.edit') }} {{ $t('pages.common.edit') }}
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['system:feedbacks:info']" v-access:code="['system:feedbacks:query']"
@click.stop="handleOrderInfo(row)" @click.stop="handleOrderInfo(row)"
:disabled="row.isWorkOrder=='1'" :disabled="row.isWorkOrder=='1'"
> >

View File

@@ -147,7 +147,7 @@ async function handleDelete(row: Required<QuestionnaireForm>) {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:questionnaire:info']" v-access:code="['property:questionnaire:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
预览问卷 预览问卷
@@ -175,8 +175,7 @@ async function handleDelete(row: Required<QuestionnaireForm>) {
</ghost-button> </ghost-button>
</Popconfirm> </Popconfirm>
<ghost-button <ghost-button
v-access:code="['property:questionnaire:statistics']" :disabled="row.status=='1'"
@click.stop="handleEdit(row)"
> >
统计分析 统计分析
</ghost-button> </ghost-button>

View File

@@ -173,7 +173,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:machine:info']" v-access:code="['property:machine:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -153,7 +153,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:maintainPlan:info']" v-access:code="['property:maintainPlan:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -6,7 +6,7 @@ import { $t } from '@vben/locales';
import { import {
useVbenVxeGrid, useVbenVxeGrid,
vxeCheckboxChecked, vxeCheckboxChecked,
type VxeGridProps type VxeGridProps,
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
orderChargeList, orderChargeList,
@@ -51,7 +51,7 @@ const gridOptions: VxeGridProps = {
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
}, },
id: 'property-orderCharge-index' id: 'property-orderCharge-index',
}; };
const [BasicTable, tableApi] = useVbenVxeGrid({ const [BasicTable, tableApi] = useVbenVxeGrid({
@@ -112,7 +112,8 @@ function handleMultiDelete() {
danger danger
type="primary" type="primary"
v-access:code="['property:orderCharge:remove']" v-access:code="['property:orderCharge:remove']"
@click="handleMultiDelete"> @click="handleMultiDelete"
>
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
</a-button> </a-button>
<a-button <a-button
@@ -128,6 +129,7 @@ function handleMultiDelete() {
<Space> <Space>
<ghost-button <ghost-button
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
v-access:code="['property:orderCharge:query']"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>

View File

@@ -89,7 +89,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'inspectResult', field: 'inspectResult',
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return renderDict(row.inspectResult, 'pro_inspection_results'); return row.inspectResult!=null? renderDict(row.inspectResult, 'pro_inspection_results'):'';
}, },
}, },
minWidth: '120', minWidth: '120',
@@ -152,6 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
labelWidth: 100, labelWidth: 100,
formItemClass:'col-span-2'
}, },
{ {
label: '服务地点', label: '服务地点',
@@ -160,6 +161,7 @@ export const modalSchema: FormSchemaGetter = () => [
defaultValue: undefined, defaultValue: undefined,
rules: 'required', rules: 'required',
labelWidth: 100, labelWidth: 100,
formItemClass:'col-span-2'
}, },
{ {
label: '服务类型', label: '服务类型',
@@ -226,50 +228,51 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required', rules: 'required',
labelWidth: 100, labelWidth: 100,
}, },
{ //
label: '巡检结果', // {
fieldName: 'inspectResult', // label: '巡检结果',
component: 'Select', // fieldName: 'inspectResult',
componentProps: { // component: 'Select',
options: getDictOptions('pro_inspection_results'), // componentProps: {
}, // options: getDictOptions('pro_inspection_results'),
rules: 'selectRequired', // },
labelWidth: 100, // rules: 'selectRequired',
}, // labelWidth: 100,
{ // },
label: '处理措施', // {
fieldName: 'measure', // label: '处理措施',
component: 'Textarea', // fieldName: 'measure',
rules: 'required', // component: 'Textarea',
labelWidth: 100, // rules: 'required',
}, // labelWidth: 100,
{ // },
label: '客户评分', // {
fieldName: 'customerScore', // label: '客户评分',
component: 'Rate', // fieldName: 'customerScore',
componentProps: { // component: 'Rate',
allowHalf: false, // componentProps: {
count: 5, // allowHalf: false,
tooltips: ['1星', '2星', '3星', '4星', '5星'], // count: 5,
defaultValue: 0, // tooltips: ['1星', '2星', '3星', '4星', '5星'],
}, // defaultValue: 0,
rules: 'required', // },
labelWidth: 100, // rules: 'required',
}, // labelWidth: 100,
{ // },
label: '客户反馈', // {
fieldName: 'customerAdvice', // label: '客户反馈',
component: 'Textarea', // fieldName: 'customerAdvice',
labelWidth: 100, // component: 'Textarea',
}, // labelWidth: 100,
{ // },
label: '处理状态', // {
fieldName: 'state', // label: '处理状态',
component: 'Select', // fieldName: 'state',
componentProps: { // component: 'Select',
options: getDictOptions('pro_processing_status'), // componentProps: {
}, // options: getDictOptions('pro_processing_status'),
rules: 'selectRequired', // },
labelWidth: 100, // rules: 'selectRequired',
}, // labelWidth: 100,
// },
]; ];

View File

@@ -12,7 +12,7 @@ import dayjs from 'dayjs';
import { import {
useVbenVxeGrid, useVbenVxeGrid,
vxeCheckboxChecked, vxeCheckboxChecked,
type VxeGridProps type VxeGridProps,
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
@@ -76,7 +76,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id', keyField: 'id',
}, },
// 表格全局唯一表示 保存列配置需要用到 // 表格全局唯一表示 保存列配置需要用到
id: 'property-rentalPlan-index' id: 'property-rentalPlan-index',
}; };
const [BasicTable, tableApi] = useVbenVxeGrid({ const [BasicTable, tableApi] = useVbenVxeGrid({
@@ -103,7 +103,7 @@ async function handleDelete(row: Required<RentalPlanForm>) {
await tableApi.query(); await tableApi.query();
} }
async function handleView(row: Required<RentalPlanForm>) { async function handleView(row: Required<RentalPlanForm>) {
modalApi.setData({ id: row.id, readonly: true,}); modalApi.setData({ id: row.id, readonly: true });
modalApi.open(); modalApi.open();
} }
function handleMultiDelete() { function handleMultiDelete() {
@@ -121,11 +121,15 @@ function handleMultiDelete() {
} }
function handleDownloadExcel() { function handleDownloadExcel() {
commonDownloadExcel(rentalPlanExport, '绿植租赁-租赁方案数据', tableApi.formApi.form.values, { commonDownloadExcel(
rentalPlanExport,
'绿植租赁-租赁方案数据',
tableApi.formApi.form.values,
{
fieldMappingTime: formOptions.fieldMappingTime, fieldMappingTime: formOptions.fieldMappingTime,
}); },
);
} }
</script> </script>
<template> <template>
@@ -144,7 +148,8 @@ function handleDownloadExcel() {
danger danger
type="primary" type="primary"
v-access:code="['property:rentalPlan:remove']" v-access:code="['property:rentalPlan:remove']"
@click="handleMultiDelete"> @click="handleMultiDelete"
>
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
</a-button> </a-button>
<a-button <a-button
@@ -158,7 +163,9 @@ function handleDownloadExcel() {
</template> </template>
<template #rentalPeriod="{ row }"> <template #rentalPeriod="{ row }">
<div> <div>
{{ row.rentalPeriod == 0?'月':row.rentalPeriod == 1 ? '季度':'年' }} {{
row.rentalPeriod == 0 ? '月' : row.rentalPeriod == 1 ? '季度' : '年'
}}
</div> </div>
</template> </template>
<template #state="{ row }"> <template #state="{ row }">
@@ -167,7 +174,12 @@ function handleDownloadExcel() {
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button @click.stop="handleView(row)"> 查看 </ghost-button> <ghost-button
@click.stop="handleView(row)"
v-access:code="['property:rentalPlan:query']"
>
查看
</ghost-button>
<ghost-button <ghost-button
v-access:code="['property:rentalPlan:edit']" v-access:code="['property:rentalPlan:edit']"
@click.stop="handleEdit(row)" @click.stop="handleEdit(row)"

View File

@@ -47,7 +47,7 @@ export const columns: VxeGridProps['columns'] = [
{ {
title: '订单号', title: '订单号',
field: 'orderNo', field: 'orderNo',
width: 100 minWidth: 180
}, },
{ {
title: '客户名称', title: '客户名称',
@@ -134,7 +134,7 @@ export const columns: VxeGridProps['columns'] = [
fixed: 'right', fixed: 'right',
slots: {default: 'action'}, slots: {default: 'action'},
title: '操作', title: '操作',
minWidth: 180, width: 180,
}, },
]; ];

View File

@@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui'; import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils'; import { getVxePopupContainer } from '@vben/utils';
@@ -8,7 +7,7 @@ import { Modal, Popconfirm, Space } from 'ant-design-vue';
import { import {
useVbenVxeGrid, useVbenVxeGrid,
vxeCheckboxChecked, vxeCheckboxChecked,
type VxeGridProps type VxeGridProps,
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
@@ -62,7 +61,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id', keyField: 'id',
}, },
// 表格全局唯一表示 保存列配置需要用到 // 表格全局唯一表示 保存列配置需要用到
id: 'property-rentalOrder-index' id: 'property-rentalOrder-index',
}; };
const [BasicTable, tableApi] = useVbenVxeGrid({ const [BasicTable, tableApi] = useVbenVxeGrid({
@@ -108,9 +107,14 @@ function handleMultiDelete() {
} }
function handleDownloadExcel() { function handleDownloadExcel() {
commonDownloadExcel(rentalOrderExport, '绿植租赁-订单管理数据', tableApi.formApi.form.values, { commonDownloadExcel(
rentalOrderExport,
'绿植租赁-订单管理数据',
tableApi.formApi.form.values,
{
fieldMappingTime: formOptions.fieldMappingTime, fieldMappingTime: formOptions.fieldMappingTime,
}); },
);
} }
</script> </script>
@@ -130,7 +134,8 @@ function handleDownloadExcel() {
danger danger
type="primary" type="primary"
v-access:code="['property:rentalOrder:remove']" v-access:code="['property:rentalOrder:remove']"
@click="handleMultiDelete"> @click="handleMultiDelete"
>
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
</a-button> </a-button>
<a-button <a-button
@@ -145,8 +150,9 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:rentalOrder:info']" v-access:code="['property:rentalOrder:query']"
@click.stop="handleInfo(row)"> @click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>
<Popconfirm <Popconfirm

View File

@@ -15,7 +15,6 @@ import type { PropertyForm } from '#/api/property/productManagement/model';
import PlantsProductModal from './plantsProduct-modal.vue'; import PlantsProductModal from './plantsProduct-modal.vue';
import PlantsProductDetail from './plantsProduct-detail.vue'; import PlantsProductDetail from './plantsProduct-detail.vue';
import { columns, querySchema } from './data'; import { columns, querySchema } from './data';
import { ref } from 'vue';
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
commonConfig: { commonConfig: {
labelWidth: 80, labelWidth: 80,
@@ -110,13 +109,13 @@ function handleMultiDelete() {
:disabled="!vxeCheckboxChecked(tableApi)" :disabled="!vxeCheckboxChecked(tableApi)"
danger danger
type="primary" type="primary"
v-access:code="['property:property:remove']" v-access:code="['property:plantsProduct:remove']"
@click="handleMultiDelete"> @click="handleMultiDelete">
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
</a-button> </a-button>
<a-button <a-button
type="primary" type="primary"
v-access:code="['property:property:add']" v-access:code="['property:plantsProduct:add']"
@click="handleAdd" @click="handleAdd"
> >
{{ $t('pages.common.add') }} {{ $t('pages.common.add') }}
@@ -126,12 +125,13 @@ function handleMultiDelete() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:plantsProduct:query']"
@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-access:code="['property:property:edit']" v-access:code="['property:plantsProduct:edit']"
@click.stop="handleEdit(row)" @click.stop="handleEdit(row)"
> >
{{ $t('pages.common.edit') }} {{ $t('pages.common.edit') }}
@@ -144,7 +144,7 @@ function handleMultiDelete() {
> >
<ghost-button <ghost-button
danger danger
v-access:code="['property:property:remove']" v-access:code="['property:plantsProduct:remove']"
@click.stop="" @click.stop=""
> >
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}

View File

@@ -5,6 +5,7 @@ import {useVbenModal} from '@vben/common-ui';
import {Descriptions, DescriptionsItem} from 'ant-design-vue'; import {Descriptions, DescriptionsItem} from 'ant-design-vue';
import {plantsProductInfo} from '#/api/property/productManagement'; import {plantsProductInfo} from '#/api/property/productManagement';
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import {ossInfo} from "#/api/system/oss";
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
onOpenChange: handleOpenChange, onOpenChange: handleOpenChange,
@@ -21,8 +22,11 @@ async function handleOpenChange(open: boolean) {
} }
modalApi.modalLoading(true); modalApi.modalLoading(true);
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
const response = await plantsProductInfo(id); plantsProductDetail.value = await plantsProductInfo(id);
plantsProductDetail.value = response; if(plantsProductDetail.value.imgPath){
const res = await ossInfo([plantsProductDetail.value.imgPath]);
plantsProductDetail.value.plantImg = res?.[0]?.url
}
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
</script> </script>
@@ -55,15 +59,16 @@ async function handleOpenChange(open: boolean) {
:is="renderDict(plantsProductDetail.state,'product_management_status')" :is="renderDict(plantsProductDetail.state,'product_management_status')"
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="产品图片">
<img :src="plantsProductDetail.imgPath" alt="">
</DescriptionsItem>
<DescriptionsItem label="备注">
{{ plantsProductDetail.remark }}
</DescriptionsItem>
<DescriptionsItem label="创建时间"> <DescriptionsItem label="创建时间">
{{ plantsProductDetail.createTime }} {{ plantsProductDetail.createTime }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="产品图片" :span="2">
<img v-if="plantsProductDetail.plantImg" :src="plantsProductDetail.plantImg" alt="图片加载失败" class="w-[100px] h-[100px]" />
</DescriptionsItem>
<DescriptionsItem label="备注" :span="2">
{{ plantsProductDetail.remark }}
</DescriptionsItem>
</Descriptions> </Descriptions>
</BasicModal> </BasicModal>
</template> </template>

View File

@@ -105,7 +105,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:inspectionTask:info']" v-access:code="['property:inspectionTask:query']"
@click.stop="handInfo(row)" @click.stop="handInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -149,7 +149,7 @@ const { hasAccessByCodes } = useAccess();
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:inspectionPlan:info']" v-access:code="['property:inspectionPlan:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -155,7 +155,7 @@ async function handleDownload(row){
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:inspectionPoint:info']" v-access:code="['property:inspectionPoint:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -10,7 +10,6 @@ import { inspectionPointAdd, inspectionPointInfo, inspectionPointUpdate } from '
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import { modalSchema } from './data'; import { modalSchema } from './data';
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
const emit = defineEmits<{ reload: [] }>(); const emit = defineEmits<{ reload: [] }>();
@@ -54,7 +53,6 @@ const [BasicModal, modalApi] = useVbenModal({
return null; return null;
} }
modalApi.modalLoading(true); modalApi.modalLoading(true);
await queryWorkOrdersType()
const { id } = modalApi.getData() as { id?: number | string }; const { id } = modalApi.getData() as { id?: number | string };
isUpdate.value = !!id; isUpdate.value = !!id;
@@ -92,31 +90,6 @@ async function handleClosed() {
await formApi.resetForm(); await formApi.resetForm();
resetInitialized(); resetInitialized();
} }
async function queryWorkOrdersType() {
let params = {
pageSize: 1000,
pageNum: 1
}
const res = await workOrdersTypeList(params)
const options = res.rows.map((item) => ({
label: item.orderTypeName,
value: item.id,
}));
formApi.updateSchema([{
componentProps: () => ({
options: options,
filterOption: filterOption,
showSearch:true,
}),
fieldName: 'type',
}])
}
const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
</script> </script>
<template> <template>

View File

@@ -147,7 +147,7 @@ function handleDownloadExcel() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['domain:knowledge:info']" v-access:code="['domain:knowledge:query']"
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}

View File

@@ -8,6 +8,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import {knowledgeInfo} from "#/api/property/maintenance/knowledge"; import {knowledgeInfo} from "#/api/property/maintenance/knowledge";
import type {KnowledgeVO} from "#/api/property/maintenance/knowledge/model"; import type {KnowledgeVO} from "#/api/property/maintenance/knowledge/model";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration); dayjs.extend(duration);
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
@@ -28,6 +29,14 @@ async function handleOpenChange(open: boolean) {
modalApi.modalLoading(true); modalApi.modalLoading(true);
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
knowledgeDetail.value = await knowledgeInfo(id); knowledgeDetail.value = await knowledgeInfo(id);
if(knowledgeDetail.value.covers){
try {
const res = await ossInfo([knowledgeDetail.value.covers]);
knowledgeDetail.value.coversPath = res?.[0]?.url;
} catch (e) {
knowledgeDetail.value.coversPath = '';
}
}
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
</script> </script>
@@ -50,7 +59,7 @@ async function handleOpenChange(open: boolean) {
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="封面" :span="2"> <DescriptionsItem label="封面" :span="2">
<img style="width: 100px" :src="knowledgeDetail.covers"/> <img style="width: 100px" :src="knowledgeDetail.coversPath" alt="图片加载失败"/>
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="发布时间" :span="2"> <DescriptionsItem label="发布时间" :span="2">
{{ knowledgeDetail.releaseTime}} {{ knowledgeDetail.releaseTime}}

View File

@@ -24,6 +24,7 @@ import {getDictOptions} from "#/utils/dict";
import type {KnowledgeForm, KnowledgeVO} from "#/api/property/maintenance/knowledge/model"; import type {KnowledgeForm, KnowledgeVO} from "#/api/property/maintenance/knowledge/model";
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import knowledgeDetail from '../knowledge/knowledge-detail.vue'; import knowledgeDetail from '../knowledge/knowledge-detail.vue';
import {ossInfo} from "#/api/system/oss";
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE; const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const [KnowledgeModal, modalApi] = useVbenModal({ const [KnowledgeModal, modalApi] = useVbenModal({
@@ -66,6 +67,16 @@ const handleClean = () => {
async function queryPageList() { async function queryPageList() {
const res = await knowledgeList(formState) const res = await knowledgeList(formState)
pageList.value = res.rows pageList.value = res.rows
for (const item of pageList.value) {
if (item.covers) {
try {
const res = await ossInfo([item.covers]);
item.coversPath = res?.[0]?.url;
} catch (e) {
item.coversPath = '';
}
}
}
total.value = res.total total.value = res.total
} }
@@ -132,7 +143,7 @@ async function handleInfo(row: Required<KnowledgeForm>) {
<template #cover> <template #cover>
<img class="card-img" <img class="card-img"
alt="图片加载失败" alt="图片加载失败"
:src="item.covers"/> :src="item.coversPath"/>
</template> </template>
<CardMeta :title="item.title"> <CardMeta :title="item.title">
<template #description> <template #description>

View File

@@ -9,14 +9,15 @@ import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime'; import relativeTime from 'dayjs/plugin/relativeTime';
import {personInfo} from '#/api/property/resident/person'; import {personInfo} from '#/api/property/resident/person';
import type {Person} from "#/api/property/resident/person/model"; import type {PersonVO} from "#/api/property/resident/person/model";
import {accessControlColumns,carColumns} from "#/views/property/resident/person/data"; import {accessControlColumns,carColumns} from "#/views/property/resident/person/data";
import {renderDict, renderDictValue} from "#/utils/render"; import {renderDict, renderDictValue} from "#/utils/render";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration); dayjs.extend(duration);
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
const personDetail = shallowRef<null | Person>(null); const personDetail = shallowRef<null | PersonVO>(null);
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
onOpenChange: handleOpenChange, onOpenChange: handleOpenChange,
@@ -38,7 +39,10 @@ async function handleOpenChange(open: boolean) {
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
// 赋值 // 赋值
personDetail.value = await personInfo(id); personDetail.value = await personInfo(id);
if(personDetail.value.img){
const res = await ossInfo([personDetail.value.img]);
personDetail.value.imgPath = res?.[0]?.url
}
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
@@ -64,7 +68,7 @@ async function handleOpenChange(open: boolean) {
<!-- {{ personDetail.locathon }}--> <!-- {{ personDetail.locathon }}-->
<!-- </DescriptionsItem>--> <!-- </DescriptionsItem>-->
<DescriptionsItem label="人脸图片"> <DescriptionsItem label="人脸图片">
{{ personDetail.img }} <img v-if="personDetail.imgPath" :src="personDetail.imgPath" alt="图片加载失败" class="w-[100px] h-[100px]" />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="入驻时间"> <DescriptionsItem label="入驻时间">
{{ personDetail.time}} {{ personDetail.time}}

View File

@@ -64,7 +64,7 @@ const [BasicModal, modalApi] = useVbenModal({
await initLocationOptions(); await initLocationOptions();
if (isUpdate.value && id) { if (isUpdate.value && id) {
const record = await resident_unitInfo(id); const record = await resident_unitInfo(id);
await formApi.setValues(record); await formApi.setValues({...record,authTime:[record.authBegDate,record.authEndDate]});
} }
await markInitialized(); await markInitialized();

View File

@@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { import type {
ConferenceSettingsDetail, MeetVO,
} from '#/api/property/roomBooking/conferenceSettings/model'; } from '#/api/property/roomBooking/conferenceSettings/model';
import {shallowRef} from 'vue'; import {shallowRef} from 'vue';
import {useVbenModal} from '@vben/common-ui'; import {useVbenModal} from '@vben/common-ui';
@@ -10,6 +10,7 @@ import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime'; import relativeTime from 'dayjs/plugin/relativeTime';
import {meetInfo} from '#/api/property/roomBooking/conferenceSettings'; import {meetInfo} from '#/api/property/roomBooking/conferenceSettings';
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration); dayjs.extend(duration);
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
@@ -21,7 +22,7 @@ const [BasicModal, modalApi] = useVbenModal({
}, },
}); });
const conferenceSettingsDetail = shallowRef<null | ConferenceSettingsDetail>(null); const conferenceSettingsDetail = shallowRef<null | MeetVO>(null);
async function handleOpenChange(open: boolean) { async function handleOpenChange(open: boolean) {
if (!open) { if (!open) {
@@ -30,6 +31,17 @@ async function handleOpenChange(open: boolean) {
modalApi.modalLoading(true); modalApi.modalLoading(true);
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
conferenceSettingsDetail.value = await meetInfo(id); conferenceSettingsDetail.value = await meetInfo(id);
if (conferenceSettingsDetail.value?.picture) {
const res = await ossInfo([conferenceSettingsDetail.value?.picture]);
if (res) {
let imgArr = [] as string[];
res.forEach(item => {
imgArr.push(item.url)
})
conferenceSettingsDetail.value.pictureArr = imgArr;
}
}
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
</script> </script>
@@ -67,7 +79,9 @@ async function handleOpenChange(open: boolean) {
{{ conferenceSettingsDetail.basePrice }} {{ conferenceSettingsDetail.basePrice }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="会议室图片" :span="2"> <DescriptionsItem label="会议室图片" :span="2">
{{ conferenceSettingsDetail.picture }} <div v-if="conferenceSettingsDetail.pictureArr">
<img v-for="item in conferenceSettingsDetail.pictureArr" style="width: 100px;margin: 5px 10px;display: inline-block" :src="item" alt="图片加载失败">
</div>
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="预约是否审核"> <DescriptionsItem label="预约是否审核">
<component <component

View File

@@ -78,6 +78,9 @@ const [BasicModal, modalApi] = useVbenModal({
if (record.openStartHours&&record.openEndHours) { if (record.openStartHours&&record.openEndHours) {
record.openHours = [dayjs(record.openStartHours, 'HH:mm'), dayjs(record.openEndHours, 'HH:mm')]; record.openHours = [dayjs(record.openStartHours, 'HH:mm'), dayjs(record.openEndHours, 'HH:mm')];
} }
if(record.picture){
record.pictureArr=record.picture.split(';',)
}
await formApi.setValues(record); await formApi.setValues(record);
} }
await markInitialized(); await markInitialized();
@@ -99,6 +102,9 @@ async function handleConfirm() {
data.openStartHours=data.openHours[0]?.format('HH:mm'); data.openStartHours=data.openHours[0]?.format('HH:mm');
data.openEndHours=data.openHours[1]?.format('HH:mm'); data.openEndHours=data.openHours[1]?.format('HH:mm');
} }
if(data.pictureArr){
data.picture=data.pictureArr.join(';',)
}
await (isUpdate.value ? meetUpdate(data) : meetAdd(data)); await (isUpdate.value ? meetUpdate(data) : meetAdd(data));
resetInitialized(); resetInitialized();
emit('reload'); emit('reload');

View File

@@ -184,7 +184,7 @@ export const modalSchema: FormSchemaGetter = () => [
}, },
{ {
label: '会议室图片', label: '会议室图片',
fieldName: 'picture', fieldName: 'pictureArr',
component: 'ImageUpload', component: 'ImageUpload',
componentProps: { componentProps: {
maxCount: 10, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型 maxCount: 10, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型

View File

@@ -119,13 +119,13 @@ const { hasAccessByCodes } = useAccess();
:disabled="!vxeCheckboxChecked(tableApi)" :disabled="!vxeCheckboxChecked(tableApi)"
danger danger
type="primary" type="primary"
v-access:code="['system:meet:remove']" v-access:code="['property:meet:remove']"
@click="handleMultiDelete"> @click="handleMultiDelete">
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
</a-button> </a-button>
<a-button <a-button
type="primary" type="primary"
v-access:code="['system:meet:add']" v-access:code="['property:meet:add']"
@click="handleAdd" @click="handleAdd"
> >
{{ $t('pages.common.add') }} {{ $t('pages.common.add') }}
@@ -140,7 +140,7 @@ const { hasAccessByCodes } = useAccess();
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>
<ghost-button <ghost-button
v-access:code="['system:meet:edit']" v-access:code="['property:meet:edit']"
@click.stop="handleEdit(row)" @click.stop="handleEdit(row)"
> >
{{ $t('pages.common.edit') }} {{ $t('pages.common.edit') }}
@@ -153,7 +153,7 @@ const { hasAccessByCodes } = useAccess();
> >
<ghost-button <ghost-button
danger danger
v-access:code="['system:meet:remove']" v-access:code="['property:meet:remove']"
@click.stop="" @click.stop=""
> >
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
@@ -169,7 +169,7 @@ const { hasAccessByCodes } = useAccess();
:unCheckedText="'停用'" :unCheckedText="'停用'"
v-model:value="row.status" v-model:value="row.status"
:api="() => meetUpdate(row)" :api="() => meetUpdate(row)"
:disabled=" !hasAccessByCodes(['system:meet:edit'])" :disabled=" !hasAccessByCodes(['property:meet:edit'])"
@reload="() => tableApi.query()" @reload="() => tableApi.query()"
/> />
</template> </template>

View File

@@ -88,7 +88,7 @@ function handleAdd() {
<Space> <Space>
<a-button <a-button
type="primary" type="primary"
v-access:code="['property:visitorManagement:add']" v-access:code="['property:visitorManagement:addVisitorManagement']"
@click="handleAdd" @click="handleAdd"
> >
{{ '添加邀约' }} {{ '添加邀约' }}
@@ -99,6 +99,7 @@ function handleAdd() {
<Space> <Space>
<ghost-button <ghost-button
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
v-access:code="['property:visitorManagement:query']"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>

View File

@@ -90,6 +90,7 @@ const [VisitorTodoModal, modalApi] = useVbenModal({
<Space> <Space>
<ghost-button <ghost-button
@click.stop="handleInfo(row)" @click.stop="handleInfo(row)"
v-access:code="['property:visitorManagement:query']"
> >
{{ $t('pages.common.info') }} {{ $t('pages.common.info') }}
</ghost-button> </ghost-button>

View File

@@ -8,6 +8,8 @@ import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime'; import relativeTime from 'dayjs/plugin/relativeTime';
import {visitorManagementInfo} from '#/api/property/visitorManagement'; import {visitorManagementInfo} from '#/api/property/visitorManagement';
import {renderDict} from "#/utils/render"; import {renderDict} from "#/utils/render";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration); dayjs.extend(duration);
dayjs.extend(relativeTime); dayjs.extend(relativeTime);
@@ -28,6 +30,15 @@ async function handleOpenChange(open: boolean) {
const {id} = modalApi.getData() as { id: number | string }; const {id} = modalApi.getData() as { id: number | string };
const response = await visitorManagementInfo(id); const response = await visitorManagementInfo(id);
visitorTodoDetail.value = response; visitorTodoDetail.value = response;
try {
if (visitorTodoDetail.value.facePictures) {
const res = await ossInfo([visitorTodoDetail.value.facePictures]);
console.log(res,123)
visitorTodoDetail.value.facePictures = res?.[0]?.url
}
} catch (e) {
}
modalApi.modalLoading(false); modalApi.modalLoading(false);
} }
</script> </script>
@@ -44,8 +55,8 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="访客身份证"> <DescriptionsItem label="访客身份证">
{{ visitorTodoDetail.idCard }} {{ visitorTodoDetail.idCard }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="人脸图片"> <DescriptionsItem label="人脸图片" v-if="visitorTodoDetail.facePictures" :span="2">
{{ visitorTodoDetail.facePictures }} <img :src="visitorTodoDetail.facePictures" alt="图片加载失败" class="w-[100px] h-[100px]"/>
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="所属公司"> <DescriptionsItem label="所属公司">
{{ visitorTodoDetail.visitorUnit}} {{ visitorTodoDetail.visitorUnit}}
@@ -65,7 +76,7 @@ async function handleOpenChange(open: boolean) {
/> />
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="拜访时间"> <DescriptionsItem label="拜访时间">
{{ visitorTodoDetail.visitingBeginTime+' - '+visitorTodoDetail.visitingBeginTime }} {{ visitorTodoDetail.visitingBeginTime+' - '+visitorTodoDetail.visitingEndTime }}
</DescriptionsItem> </DescriptionsItem>
<!-- <DescriptionsItem label="是否预约车位" v-if="visitorTodoDetail.bookingParkingSpace!=null">--> <!-- <DescriptionsItem label="是否预约车位" v-if="visitorTodoDetail.bookingParkingSpace!=null">-->
<!-- <component--> <!-- <component-->

View File

@@ -1,157 +1,171 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref, onMounted } from 'vue' import { computed, ref, onMounted } from "vue";
import { useVbenModal } from '@vben/common-ui' import { useVbenModal } from "@vben/common-ui";
import { $t } from '@vben/locales' import { $t } from "@vben/locales";
import { cloneDeep } from '@vben/utils' import { cloneDeep } from "@vben/utils";
import { useVbenForm } from '#/adapter/form' import { useVbenForm } from "#/adapter/form";
import { authGroupAdd, authGroupInfo, authGroupUpdate } from '#/api/sis/authGroup' import {
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup' authGroupAdd,
import { queryTree } from '#/api/sis/authRecord' authGroupInfo,
import { message, Tree } from 'ant-design-vue' authGroupUpdate,
} from "#/api/sis/authGroup";
import { defaultFormValueGetter, useBeforeCloseDiff } from "#/utils/popup";
import { queryTree } from "#/api/sis/authRecord";
import { message, Tree } from "ant-design-vue";
import { modalSchema } from './data' import { modalSchema } from "./data";
const emit = defineEmits<{ reload: [] }>() const emit = defineEmits<{ reload: [] }>();
const isUpdate = ref(false) const isUpdate = ref(false);
const title = computed(() => { const title = computed(() => {
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add') return isUpdate.value ? $t("pages.common.edit") : $t("pages.common.add");
}) });
const [BasicForm, formApi] = useVbenForm({ const [BasicForm, formApi] = useVbenForm({
commonConfig: { commonConfig: {
// 默认占满两列 // 默认占满两列
formItemClass: 'col-span-2', formItemClass: "col-span-2",
// 默认label宽度 px // 默认label宽度 px
labelWidth: 80, labelWidth: 80,
// 通用配置项 会影响到所有表单项 // 通用配置项 会影响到所有表单项
componentProps: { componentProps: {
class: 'w-full', class: "w-full",
} },
}, },
schema: modalSchema(), schema: modalSchema(),
showDefaultActions: false, showDefaultActions: false,
wrapperClass: 'grid-cols-2', wrapperClass: "grid-cols-2",
}) });
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
{ {
initializedGetter: defaultFormValueGetter(formApi), initializedGetter: defaultFormValueGetter(formApi),
currentGetter: defaultFormValueGetter(formApi), currentGetter: defaultFormValueGetter(formApi),
}, }
) );
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度 // 在这里更改宽度
class: 'w-[550px]', class: "w-[550px]",
fullscreenButton: false, fullscreenButton: false,
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
onConfirm: handleConfirm, onConfirm: handleConfirm,
onOpenChange: async (isOpen) => { onOpenChange: async (isOpen) => {
if (!isOpen) { if (!isOpen) {
return null return null;
} }
modalApi.modalLoading(true) modalApi.modalLoading(true);
loadDeviceTree() loadDeviceTree();
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 authGroupInfo(id) const record = await authGroupInfo(id);
checkedKeys.value = (record.acIds || []).concat(record.floorIds || []) checkedKeys.value = (record.acIds || []).concat(record.floorIds || []);
await formApi.setValues(record) await formApi.setValues(record);
} }
await markInitialized() await markInitialized();
modalApi.modalLoading(false) modalApi.modalLoading(false);
}, },
}) });
async function handleConfirm() { async function handleConfirm() {
try { try {
modalApi.lock(true) modalApi.lock(true);
const { valid } = await formApi.validate() const { valid } = await formApi.validate();
if (!valid) { if (!valid) {
return return;
} }
if (eleIds.value.length === 0 && acIds.value.length === 0) { if (eleIds.value.length === 0 && acIds.value.length === 0) {
message.error('请选择授权设备') message.error("请选择授权设备");
return return;
} }
const data = cloneDeep(await formApi.getValues()) const data = cloneDeep(await formApi.getValues());
data.acIds = acIds.value data.acIds = acIds.value;
data.eleIds = eleIds.value data.eleIds = eleIds.value;
data.floorIds = floorIds.value data.floorIds = floorIds.value;
await (isUpdate.value ? authGroupUpdate(data) : authGroupAdd(data)) await (isUpdate.value ? authGroupUpdate(data) : authGroupAdd(data));
resetInitialized() resetInitialized();
emit('reload') emit("reload");
modalApi.close() modalApi.close();
} catch (error) { } catch (error) {
console.error(error) console.error(error);
} finally { } finally {
modalApi.lock(false) modalApi.lock(false);
} }
} }
async function handleClosed() { async function handleClosed() {
await formApi.resetForm() await formApi.resetForm();
checkedKeys.value = [] checkedKeys.value = [];
resetInitialized() resetInitialized();
} }
const treeData = ref([]);
const treeData = ref([])
function loadDeviceTree() { function loadDeviceTree() {
queryTree().then((data: any) => { queryTree().then((data: any) => {
treeData.value = data data[0].children.forEach((item: any) => {
}) if (item.code === 2) {
item.disabled = true;
item.children.forEach((item: any) => {
item.disabled = true;
item.children.forEach((item: any) => {
item.disabled = true;
});
});
}
});
treeData.value = data;
});
} }
const fieldNames = { const fieldNames = {
title: 'title', title: "title",
label: 'label', label: "label",
key: 'code', key: "code",
children: 'children', children: "children",
} };
const checkedKeys = ref<any[]>([]) const checkedKeys = ref<any[]>([]);
type Key = string | number type Key = string | number;
const eleIds = ref<any[]>([]) const eleIds = ref<any[]>([]);
const acIds = ref<any[]>([]) const acIds = ref<any[]>([]);
const floorIds = ref<any[]>([]) const floorIds = ref<any[]>([]);
function handleCheck(checked: Key[] | { checked: Key[]; halfChecked: Key[] }, info: any) { function handleCheck(
checked: Key[] | { checked: Key[]; halfChecked: Key[] },
acIds.value = [] info: any
eleIds.value = [] ) {
floorIds.value = [] acIds.value = [];
eleIds.value = [];
floorIds.value = [];
info.checkedNodesPositions.forEach((item: any) => { info.checkedNodesPositions.forEach((item: any) => {
switch (item.node.label) { switch (item.node.label) {
case 'accessControl': case "accessControl":
acIds.value = acIds.value.concat(item.node.code) acIds.value = acIds.value.concat(item.node.code);
break break;
case 'floor': case "floor":
floorIds.value = floorIds.value.concat(item.node.code) floorIds.value = floorIds.value.concat(item.node.code);
eleIds.value = eleIds.value.concat(item.node.parentCode) eleIds.value = eleIds.value.concat(item.node.parentCode);
break break;
case 'elevator': case "elevator":
eleIds.value = eleIds.value.concat(item.node.code) eleIds.value = eleIds.value.concat(item.node.code);
break break;
} }
}) });
// 去重 // 去重
acIds.value = [...new Set(acIds.value)] acIds.value = [...new Set(acIds.value)];
eleIds.value = [...new Set(eleIds.value)] eleIds.value = [...new Set(eleIds.value)];
floorIds.value = [...new Set(floorIds.value)] floorIds.value = [...new Set(floorIds.value)];
} }
</script> </script>
@@ -159,7 +173,10 @@ function handleCheck(checked: Key[] | { checked: Key[]; halfChecked: Key[] }, in
<BasicModal :title="title"> <BasicModal :title="title">
<BasicForm /> <BasicForm />
<div class="p-4"> <div class="p-4">
<Tree checkable :tree-data="treeData" :fieldNames="fieldNames" v-model:checkedKeys="checkedKeys" <Tree checkable
:tree-data="treeData"
:fieldNames="fieldNames"
v-model:checkedKeys="checkedKeys"
:onCheck="handleCheck"> :onCheck="handleCheck">
</Tree> </Tree>
</div> </div>