Compare commits
2 Commits
5975d1b94d
...
e88b8b41d8
Author | SHA1 | Date | |
---|---|---|---|
e88b8b41d8 | |||
48ea62150d |
@@ -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
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -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 = {
|
||||||
@@ -138,8 +121,8 @@ function handleDownloadExcel() {
|
|||||||
<a-button
|
<a-button
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
danger
|
danger
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['property:assetType:remove']"
|
v-access:code="['property:assetType:remove']"
|
||||||
@click="handleMultiDelete">
|
@click="handleMultiDelete">
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
@@ -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,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -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');
|
||||||
|
@@ -163,8 +163,8 @@ const { hasAccessByCodes } = useAccess();
|
|||||||
</template>
|
</template>
|
||||||
<template #status="{ row }">
|
<template #status="{ row }">
|
||||||
<TableSwitch
|
<TableSwitch
|
||||||
:checkedValue="1"
|
:checkedValue="0"
|
||||||
:unCheckedValue="0"
|
:unCheckedValue="1"
|
||||||
:checkedText="'启用'"
|
:checkedText="'启用'"
|
||||||
:unCheckedText="'停用'"
|
:unCheckedText="'停用'"
|
||||||
v-model:value="row.status"
|
v-model:value="row.status"
|
||||||
|
@@ -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>
|
||||||
|
Reference in New Issue
Block a user