40 lines
1.1 KiB
Vue
40 lines
1.1 KiB
Vue
<template>
|
|
<BasicModal v-bind="$attrs" @register="registerModal" title="查看详情" :showCancelBtn="false" :showOkBtn="false" width="900px">
|
|
<BasicForm @register="registerForm" disabled />
|
|
</BasicModal>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { ref, computed, unref } from 'vue';
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
|
import { formSchema } from './notice.data';
|
|
|
|
//表单配置
|
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
schemas: formSchema,
|
|
showActionButtonGroup: false,
|
|
});
|
|
//表单赋值
|
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
//重置表单
|
|
await resetFields();
|
|
setModalProps({ confirmLoading: false });
|
|
if (data.record.userIds) {
|
|
data.record.userIds = data.record.userIds.substring(0, data.record.userIds.length - 1);
|
|
}
|
|
//表单赋值
|
|
await setFieldsValue({
|
|
...data.record,
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.detail-iframe {
|
|
border: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 500px;
|
|
}
|
|
</style>
|