|
|
@ -14,16 +14,18 @@ |
|
|
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
|
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
|
|
* author entfrm开发团队-王翔 |
|
|
|
* author entfrm开发团队-王翔 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
import { ref, unref } from 'vue'; |
|
|
|
import {ref, toRaw, unref} from 'vue'; |
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
|
|
import { formSchema } from './passList.data'; |
|
|
|
import { formSchema } from './passList.data'; |
|
|
|
import { addPushPassList, editPushPassList, getPushPassList } from '/@/api/platform/common/controller/pushPassList'; |
|
|
|
import { addPushPassList, editPushPassList, getPushPassList } from '/@/api/platform/common/controller/pushPassList'; |
|
|
|
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
|
|
|
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
|
|
|
|
|
|
|
import { useRoute } from "vue-router"; |
|
|
|
|
|
|
|
|
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
const tag = ref<Nullable<string>>(''); |
|
|
|
const tag = ref<Nullable<string>>(''); |
|
|
|
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
|
|
|
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
|
|
|
const emit = defineEmits(['success', 'register']); |
|
|
|
const emit = defineEmits(['success', 'register']); |
|
|
|
|
|
|
|
const router = useRoute(); |
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({ |
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({ |
|
|
|
labelWidth: 100, |
|
|
|
labelWidth: 100, |
|
|
|
schemas: formSchema, |
|
|
|
schemas: formSchema, |
|
|
@ -38,6 +40,12 @@ |
|
|
|
tag.value = data._tag; |
|
|
|
tag.value = data._tag; |
|
|
|
const refId = data.record?.id; |
|
|
|
const refId = data.record?.id; |
|
|
|
const props: Partial<ModalProps> = { confirmLoading: false }; |
|
|
|
const props: Partial<ModalProps> = { confirmLoading: false }; |
|
|
|
|
|
|
|
await updateSchema([ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'type', |
|
|
|
|
|
|
|
defaultValue: router.query.type |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
]); |
|
|
|
// 采用tag标签区分操作 |
|
|
|
// 采用tag标签区分操作 |
|
|
|
switch (unref(tag)) { |
|
|
|
switch (unref(tag)) { |
|
|
|
case 'add': |
|
|
|
case 'add': |
|
|
|