Commit 993ecec9 authored by 罗林杰's avatar 罗林杰

修改文件

parent 0647a49e
......@@ -164,20 +164,15 @@ export const addFileFormSchema: any = [
export const editFileFormSchema: any = [
{
field: 'name',
label: '资源名称',
label: '文件名称',
component: 'Input',
colProps: { lg: 12, md: 12 },
required: true,
colProps: { lg: 10, md: 10 },
},
{
field: 'path',
label: '文件路径',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'workSpaceName',
......@@ -185,13 +180,13 @@ export const editFileFormSchema: any = [
},
getPopupContainer: () => document.body,
},
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
{
field: 'remark',
label: '描述',
component: 'Input',
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
{
field: 'workGroup',
......@@ -233,7 +228,7 @@ export const editFileFormSchema: any = [
value: 'businessId',
},
},
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
{
field: 'tag',
......@@ -248,7 +243,7 @@ export const editFileFormSchema: any = [
{ label: '财务', value: '财务' },
],
},
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
{
field: 'sensitive',
......@@ -261,7 +256,7 @@ export const editFileFormSchema: any = [
{ label: '不敏感', value: '不敏感' },
],
},
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
{
field: 'security',
......@@ -276,6 +271,59 @@ export const editFileFormSchema: any = [
{ label: 'D级', value: 'D级' },
],
},
colProps: { lg: 12, md: 12 },
colProps: { lg: 10, md: 10 },
},
];
export const editFilePermissionsFormSchema: any = [
{
field: 'download',
label: '下载权限',
component: 'Switch',
required: true,
colProps: { lg: 24, md: 24 },
},
{
field: 'encrypt',
label: '文件加密',
component: 'Switch',
required: true,
colProps: { lg: 24, md: 24 },
},
];
export const editFileOptionsFormSchema: any = [
{
field: 'autoOffShelfDate',
label: '自动下架日期',
component: 'Input',
required: true,
colProps: { lg: 24, md: 24 },
},
{
field: 'shareType',
label: '共享方式',
component: 'Select',
componentProps: {
placeholder: '请选择共享方式',
options: [
{ label: '公开', value: '公开' },
{ label: '私有', value: '私有' },
],
},
required: true,
colProps: { lg: 24, md: 24 },
},
{
field: 'visibleRange',
label: '可见范围',
component: 'Select',
componentProps: {
placeholder: '请选择可见范围',
options: [
{ label: '公开', value: '公开' },
{ label: '私有', value: '私有' },
],
},
required: true,
colProps: { lg: 24, md: 24 },
},
];
......@@ -7,14 +7,28 @@
@ok="handleSubmit"
>
<Description size="middle" title="基本信息" :bordered="false" />
<BasicForm @register="registerForm" />
<div>
<BasicForm @register="registerForm" />
</div>
<Description size="middle" title="开放权限" :bordered="false" />
<div>
<BasicForm @register="registerPermissionsForm" />
</div>
<Description size="middle" title="默认上架配置" :bordered="false" />
<div>
<BasicForm @register="registerOptionsForm" />
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { editFileFormSchema } from './data';
import {
editFileFormSchema,
editFileOptionsFormSchema,
editFilePermissionsFormSchema,
} from './data';
import { TreeData } from './dataFileData';
import { useMessage } from '@/hooks/web/useMessage';
import { Description } from '@/components/Description';
......@@ -28,12 +42,27 @@
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
labelWidth: 120,
schemas: editFileFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
span: 24,
},
});
const [registerPermissionsForm] = useForm({
labelWidth: 120,
schemas: editFilePermissionsFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
});
const [registerOptionsForm] = useForm({
labelWidth: 120,
schemas: editFileOptionsFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
});
//初始化弹框
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment