| | |
| | | preIcon="search|svg" |
| | | /> |
| | | <GeneralModal |
| | | @register="registerItemAdd" |
| | | @register="useModaldata[item][0]" |
| | | @success="(d, u) => handleItemSuccess(d, u, item)" |
| | | /> |
| | | </template> |
| | |
| | | const formSchema = ref([]); |
| | | const crudColSlots = ref<any>([]); |
| | | const isExistSql = ref(''); |
| | | const useModaldata = ref({}) |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerForm, { resetFields, setFieldsValue, getFieldsValue, validate }] = useForm({ |
| | | labelWidth: 140, |
| | |
| | | : data?.formJson; |
| | | crudColSlots.value = data?.crudColSlots; |
| | | isExistSql.value = data?.isExistSql; |
| | | /* 如果插槽列表不为空,则初始化模态窗口 */ |
| | | if(!isNullOrUnDef(crudColSlots.value) && crudColSlots.value.length>0){ |
| | | crudColSlots.value.forEach((d) =>{ |
| | | useModaldata.value[d] = useModal() |
| | | }) |
| | | } |
| | | resetFields(); |
| | | setDrawerProps({ confirmLoading: false }); |
| | | |
| | |
| | | import(`./entityts/${getFieldsValue()[`${item.replace(/add/, '')}PSelect_0`]}.ts`) |
| | | .then((m) => { |
| | | const [{ OpenSelectItem }] = m.default(); |
| | | OpenSelectItem(openItemModal); |
| | | OpenSelectItem(useModaldata.value[item][1].openModal); |
| | | }) |
| | | .catch(() => { |
| | | openItemModal(true, { |
| | | useModaldata.value[item][1].openModal(true, { |
| | | title: '物料列表', |
| | | schemas: [ |
| | | { |