|
@@ -68,7 +68,7 @@
|
|
ComponentOptions,
|
|
ComponentOptions,
|
|
shallowRef,
|
|
shallowRef,
|
|
computed,
|
|
computed,
|
|
- inject,
|
|
|
|
|
|
+ // inject,
|
|
} from 'vue';
|
|
} from 'vue';
|
|
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
|
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
|
import { BasicTable, BasicColumn, TableAction, TableActionType } from '/@/components/Table';
|
|
import { BasicTable, BasicColumn, TableAction, TableActionType } from '/@/components/Table';
|
|
@@ -84,15 +84,15 @@
|
|
props: {
|
|
props: {
|
|
userData: { type: Object },
|
|
userData: { type: Object },
|
|
},
|
|
},
|
|
- emits: ['addtable', 'register'],
|
|
|
|
- setup(props) {
|
|
|
|
|
|
+ emits: ['addtable', 'register', 'update'],
|
|
|
|
+ setup(props, { emit }) {
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
const { createConfirm, createMessage } = useMessage();
|
|
const { createConfirm, createMessage } = useMessage();
|
|
const currentModal = shallowRef<Nullable<ComponentOptions>>(null);
|
|
const currentModal = shallowRef<Nullable<ComponentOptions>>(null);
|
|
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
const [register4, { openModal: addopenModal }] = useModal();
|
|
const [register4, { openModal: addopenModal }] = useModal();
|
|
const modelRef = ref({});
|
|
const modelRef = ref({});
|
|
- const reload = inject('tablereload');
|
|
|
|
|
|
+ // const reload = inject('tablereload');
|
|
// const editList = ref({
|
|
// const editList = ref({
|
|
// list:[]
|
|
// list:[]
|
|
// })
|
|
// })
|
|
@@ -279,8 +279,9 @@
|
|
subUsers: tableData,
|
|
subUsers: tableData,
|
|
});
|
|
});
|
|
console.log('saveTable', res);
|
|
console.log('saveTable', res);
|
|
- createMessage.success(t('common.o'));
|
|
|
|
- reload();
|
|
|
|
|
|
+ createMessage.success(t('common.optSuccess'));
|
|
|
|
+ // reload();
|
|
|
|
+ emit('update');
|
|
closeModal();
|
|
closeModal();
|
|
}
|
|
}
|
|
function addTabledata(val) {
|
|
function addTabledata(val) {
|
|
@@ -312,7 +313,6 @@
|
|
saveTable,
|
|
saveTable,
|
|
closeModal,
|
|
closeModal,
|
|
addTabledata,
|
|
addTabledata,
|
|
- reload,
|
|
|
|
t,
|
|
t,
|
|
};
|
|
};
|
|
},
|
|
},
|