Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
@@ -9,6 +9,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 拉取代码仓库
|
- name: 拉取代码仓库
|
||||||
uses: http://git.missmoc.top/mocheng/checkout@v4
|
uses: http://git.missmoc.top/mocheng/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1 # 只拉取最新的1个提交(浅克隆)
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: http://git.missmoc.top/mocheng/setup-node@v3
|
uses: http://git.missmoc.top/mocheng/setup-node@v3
|
||||||
|
@@ -35,6 +35,7 @@ export interface Resident_unitVO {
|
|||||||
* 入驻位置
|
* 入驻位置
|
||||||
*/
|
*/
|
||||||
location: string;
|
location: string;
|
||||||
|
locations: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入驻时间
|
* 入驻时间
|
||||||
|
@@ -0,0 +1,88 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import { contingenPlanInfo, contingenPlanUpdate } from '#/api/property/customerService/contingenPlan';
|
||||||
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
import {schema} from './data';
|
||||||
|
|
||||||
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
formItemClass: 'col-span-1',
|
||||||
|
labelWidth: 80,
|
||||||
|
componentProps: {
|
||||||
|
class: 'w-full',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
schema: schema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
wrapperClass: 'grid-cols-2',
|
||||||
|
});
|
||||||
|
|
||||||
|
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||||
|
{
|
||||||
|
initializedGetter: defaultFormValueGetter(formApi),
|
||||||
|
currentGetter: defaultFormValueGetter(formApi),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const record = ref({})
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
// 在这里更改宽度
|
||||||
|
class: 'w-[550px]',
|
||||||
|
fullscreenButton: false,
|
||||||
|
onBeforeClose,
|
||||||
|
onClosed: handleClosed,
|
||||||
|
onConfirm: handleConfirm,
|
||||||
|
onOpenChange: async (isOpen) => {
|
||||||
|
if (!isOpen) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
|
|
||||||
|
record.value = await contingenPlanInfo(id);
|
||||||
|
await formApi.setValues(record.value);
|
||||||
|
|
||||||
|
await markInitialized();
|
||||||
|
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleConfirm() {
|
||||||
|
try {
|
||||||
|
modalApi.lock(true);
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
record.value.status = data.status
|
||||||
|
await contingenPlanUpdate(record.value)
|
||||||
|
resetInitialized();
|
||||||
|
emit('reload');
|
||||||
|
modalApi.close();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
modalApi.lock(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleClosed() {
|
||||||
|
await formApi.resetForm();
|
||||||
|
resetInitialized();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal title="审核">
|
||||||
|
<BasicForm />
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
@@ -156,3 +156,27 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const schema: FormSchemaGetter = () => [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
fieldName: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: () => false,
|
||||||
|
triggerFields: [''],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '演练状态',
|
||||||
|
fieldName: 'status',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '已取消', value: 1 },
|
||||||
|
{ label: '待进行', value: 2 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
@@ -18,6 +18,7 @@ import type { ContingenPlanForm } from '#/api/property/customerService/contingen
|
|||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
|
|
||||||
import contingenPlanModal from './contingenPlan-modal.vue';
|
import contingenPlanModal from './contingenPlan-modal.vue';
|
||||||
|
import contingenPlanExamine from './contingenPlan-examine.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 {personList} from "#/api/property/resident/person";
|
||||||
@@ -96,10 +97,13 @@ async function handleDelete(row: Required<ContingenPlanForm>) {
|
|||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [ContingenPlanExamine, contingenPlanExamineApi] = useVbenModal({
|
||||||
|
connectedComponent: contingenPlanExamine,
|
||||||
|
});
|
||||||
|
|
||||||
async function handleExamine(row: Required<ContingenPlanForm>) {
|
async function handleExamine(row: Required<ContingenPlanForm>) {
|
||||||
row.status = '1'
|
contingenPlanExamineApi.setData({ id: row.id });
|
||||||
await contingenPlanUpdate(row);
|
contingenPlanExamineApi.open();
|
||||||
await tableApi.query();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
@@ -183,19 +187,12 @@ onMounted(async () => {
|
|||||||
</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
|
<ghost-button
|
||||||
@click.stop=""
|
v-if="row.status === '0'"
|
||||||
|
@click.stop="handleExamine(row)"
|
||||||
>
|
>
|
||||||
{{ '审核' }}
|
{{ '审核' }}
|
||||||
</ghost-button>
|
</ghost-button>
|
||||||
</Popconfirm>
|
|
||||||
<ghost-button
|
<ghost-button
|
||||||
@click.stop="handleInfo(row)"
|
@click.stop="handleInfo(row)"
|
||||||
>
|
>
|
||||||
@@ -227,5 +224,6 @@ onMounted(async () => {
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<ContingenPlanModal @reload="tableApi.query()" />
|
<ContingenPlanModal @reload="tableApi.query()" />
|
||||||
<contingenPlanDetailModal/>
|
<contingenPlanDetailModal/>
|
||||||
|
<ContingenPlanExamine @reload="tableApi.query()" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -157,7 +157,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '入驻位置',
|
label: '入驻位置',
|
||||||
fieldName: 'location',
|
fieldName: 'locations',
|
||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
formItemClass: 'col-span-2'
|
formItemClass: 'col-span-2'
|
||||||
|
@@ -64,7 +64,11 @@ 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,authTime:[record.authBegDate,record.authEndDate]});
|
let roomIds=record.location.split(',')
|
||||||
|
await formApi.setValues({...record,
|
||||||
|
authTime:[record.authBegDate,record.authEndDate],
|
||||||
|
locations:roomIds
|
||||||
|
});
|
||||||
}
|
}
|
||||||
await markInitialized();
|
await markInitialized();
|
||||||
|
|
||||||
@@ -84,7 +88,7 @@ async function handleConfirm() {
|
|||||||
|
|
||||||
data.authBegDate = data.authTime[0];
|
data.authBegDate = data.authTime[0];
|
||||||
data.authEndDate = data.authTime[1];
|
data.authEndDate = data.authTime[1];
|
||||||
|
data.location=data.locations.join(',')
|
||||||
await (isUpdate.value ? resident_unitUpdate(data) : resident_unitAdd(data));
|
await (isUpdate.value ? resident_unitUpdate(data) : resident_unitAdd(data));
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
@@ -125,8 +129,9 @@ async function initLocationOptions() {
|
|||||||
treeNodeFilterProp: 'label',
|
treeNodeFilterProp: 'label',
|
||||||
// 选中后显示在输入框的值
|
// 选中后显示在输入框的值
|
||||||
treeNodeLabelProp: 'fullName',
|
treeNodeLabelProp: 'fullName',
|
||||||
|
multiple:true
|
||||||
}),
|
}),
|
||||||
fieldName: 'location',
|
fieldName: 'locations',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -43,16 +43,16 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'unitName',
|
field: 'unitName',
|
||||||
minWidth:'120'
|
minWidth:'120'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '预定人',
|
// title: '预定人',
|
||||||
field: 'personName',
|
// field: 'personName',
|
||||||
minWidth:'120'
|
// minWidth:'120'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '联系方式',
|
// title: '联系方式',
|
||||||
field: 'phone',
|
// field: 'phone',
|
||||||
minWidth:'120'
|
// minWidth:'120'
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '预定时间',
|
// title: '预定时间',
|
||||||
// field: 'scheduledStarttime',
|
// field: 'scheduledStarttime',
|
||||||
@@ -64,7 +64,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '预定时间',
|
title: '预定时间',
|
||||||
field: 'scheduledStarttime',
|
field: 'scheduledStarttime',
|
||||||
minWidth: '180',
|
minWidth: '200',
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
const start = row.scheduledStarttime;
|
const start = row.scheduledStarttime;
|
||||||
const end = row.scheduledEndtime;
|
const end = row.scheduledEndtime;
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
<Select
|
<Select
|
||||||
v-model:value="formState.meetingRoomType"
|
v-model:value="formState.meetingRoomType"
|
||||||
class="room-select"
|
class="room-select"
|
||||||
placeholder="请选择会议室类型"
|
placeholder="请选择类型"
|
||||||
style="width: 180px;"
|
style="width: 150px;"
|
||||||
>
|
>
|
||||||
<SelectOption
|
<SelectOption
|
||||||
v-for="item in getDictOptions('meeting_room_type')"
|
v-for="item in getDictOptions('meeting_room_type')"
|
||||||
@@ -23,14 +23,14 @@
|
|||||||
</Select>
|
</Select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="会议日期">
|
<a-form-item label="会议日期">
|
||||||
<DatePicker v-model:value="formState.appointmentTime" style="width: 180px;"/>
|
<DatePicker v-model:value="formState.appointmentTime" style="width: 130px;"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="会议时段">
|
<a-form-item label="会议时段">
|
||||||
<TimeRangePicker style="width: 200px;" format="HH:mm"
|
<TimeRangePicker style="width: 190px;" format="HH:mm"
|
||||||
v-model:value="formState.openHours"></TimeRangePicker>
|
v-model:value="formState.openHours"></TimeRangePicker>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="参会人数">
|
<a-form-item label="参会人数">
|
||||||
<InputNumber style="width: 150px;" placeholder="请输入参会人数"
|
<InputNumber style="width: 120px;" placeholder="请输入人数"
|
||||||
v-model:value="formState.personNumber"/>
|
v-model:value="formState.personNumber"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item >
|
<a-form-item >
|
||||||
|
@@ -42,7 +42,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'meetingRoomType',
|
field: 'meetingRoomType',
|
||||||
slots: {
|
slots: {
|
||||||
default: ({row}) => {
|
default: ({row}) => {
|
||||||
return renderDict(row.meetingRoomType, 'meeting_room_type');
|
return row.meetingRoomType!=null?renderDict(row.meetingRoomType, 'meeting_room_type'):'';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
minWidth:100,
|
minWidth:100,
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
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 {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
@@ -87,6 +88,11 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '事由',
|
title: '事由',
|
||||||
field: 'visitingReason',
|
field: 'visitingReason',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.visitingReason, 'reason_for_visit');
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '拜访时间',
|
title: '拜访时间',
|
||||||
|
Reference in New Issue
Block a user