Ben Lin
2024-09-11 c153a50b5de2780fe7b072fd360b97e00e54b897
src/views/tigerprojects/system/lowcode/normalDrawer.vue
@@ -49,7 +49,7 @@
          preIcon="search|svg"
        />
        <GeneralModal
          @register="registerItemAdd"
          @register="useModaldata[item][0]"
          @success="(d, u) => handleItemSuccess(d, u, item)"
        />
      </template>
@@ -81,6 +81,7 @@
  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,
@@ -105,6 +106,12 @@
      : 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 });
@@ -195,10 +202,10 @@
      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: [
              {