|
|
@@ -56,7 +56,9 @@
|
|
|
},
|
|
|
emits: ['register'],
|
|
|
setup(props) {
|
|
|
- const modelRef = ref({});
|
|
|
+ const modelRef = ref({
|
|
|
+ id: '',
|
|
|
+ });
|
|
|
const isShowFooter = ref(true);
|
|
|
const { t } = useI18n();
|
|
|
const num = ref(0);
|
|
|
@@ -153,13 +155,17 @@
|
|
|
},
|
|
|
});
|
|
|
async function submitModal(val) {
|
|
|
- console.log('submitModal', val);
|
|
|
- let res = await auditCompany({
|
|
|
- id: modelRef.value.id,
|
|
|
- state: val ? 1 : 2,
|
|
|
- });
|
|
|
- success(res);
|
|
|
- closeModal();
|
|
|
+ try {
|
|
|
+ console.log('submitModal', val);
|
|
|
+ await auditCompany({
|
|
|
+ id: modelRef.value.id,
|
|
|
+ state: val ? 1 : 2,
|
|
|
+ });
|
|
|
+ success(t('common.optSuccess'));
|
|
|
+ closeModal();
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error', error);
|
|
|
+ }
|
|
|
}
|
|
|
async function onDataReceive(data) {
|
|
|
// 方式1;
|