|
|
@@ -0,0 +1,198 @@
|
|
|
+<script lang="ts" setup>
|
|
|
+import type { AdvancedForm } from '@/types/form'
|
|
|
+
|
|
|
+const formConfig = reactive<AdvancedForm>({
|
|
|
+ span: 8,
|
|
|
+ formItems: [
|
|
|
+ {
|
|
|
+ label: '仓库管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '任务管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '仓库管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '任务管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '仓库管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '任务管理',
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '用户名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '密码',
|
|
|
+ value: '',
|
|
|
+ name: 'password',
|
|
|
+ type: 'input',
|
|
|
+ rules: [{ required: true, message: '请输入密码', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '字段名',
|
|
|
+ value: '',
|
|
|
+ name: 'name',
|
|
|
+ type: 'input'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+})
|
|
|
+
|
|
|
+const formData = reactive({})
|
|
|
+
|
|
|
+const create = () => {
|
|
|
+ console.log('保存的方法')
|
|
|
+}
|
|
|
+const update = () => {
|
|
|
+ console.log('保存的方法')
|
|
|
+}
|
|
|
+
|
|
|
+const proFormRef = ref<any>()
|
|
|
+const handleSave = () => {
|
|
|
+ proFormRef.value.submit()
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="overflow-auto pb-42px" style="height: calc(100vh - 101px - var(--main-padding) * 2)">
|
|
|
+ <pro-form
|
|
|
+ advanced
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formData="formData"
|
|
|
+ :create="create"
|
|
|
+ :update="update"
|
|
|
+ ref="proFormRef"
|
|
|
+ ></pro-form>
|
|
|
+ <div
|
|
|
+ class="fixed bottom-0 right-0 text-right bg-white px-16px py-5px form-footer"
|
|
|
+ style="width: calc(100vw - var(--menu-width))"
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="handleSave">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.form-footer {
|
|
|
+ box-shadow: rgb(0 0 0 / 8%) 0px -6px 16px -8px;
|
|
|
+}
|
|
|
+</style>
|