|
@ -42,7 +42,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { computed, inject, ref, toRaw } from 'vue'; |
|
|
import { computed, inject, ref, toRaw } from 'vue'; |
|
|
import { Tools, NotifyManager, noErrorAxios, t } from '@/platform'; |
|
|
import { Tools, NotifyManager, noErrorAxios, t, ServerExceptionHandler } from '@/platform'; |
|
|
import { editStatus } from './ts/grid'; |
|
|
import { editStatus } from './ts/grid'; |
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
@ -178,18 +178,10 @@ const rowSave = (args) => { |
|
|
table.bodyEditStatus = 'none'; |
|
|
table.bodyEditStatus = 'none'; |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
.catch((error) => { |
|
|
const response = error?.response; |
|
|
if (error.code === 1001) { |
|
|
const status = response?.status; |
|
|
|
|
|
const data = response?.data; |
|
|
|
|
|
if (data?.code === 1001) { |
|
|
|
|
|
NotifyManager.error('服务器验证未通过'); |
|
|
NotifyManager.error('服务器验证未通过'); |
|
|
} else { |
|
|
} else { |
|
|
//其他错误 |
|
|
ServerExceptionHandler.handle(error); |
|
|
if (status === 500) { |
|
|
|
|
|
NotifyManager.error(t(data?.errorMessageI18nKey)); |
|
|
|
|
|
} else { |
|
|
|
|
|
NotifyManager.error(t(status)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -301,18 +293,10 @@ const updates = (data, callback) => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
.catch((error) => { |
|
|
const response = error?.response; |
|
|
if (error.code === 1001) { |
|
|
const status = response?.status; |
|
|
|
|
|
const data = response?.data; |
|
|
|
|
|
if (data?.code === 1001) { |
|
|
|
|
|
NotifyManager.error('服务器验证未通过'); |
|
|
NotifyManager.error('服务器验证未通过'); |
|
|
} else { |
|
|
} else { |
|
|
//其他错误 |
|
|
ServerExceptionHandler.handle(error); |
|
|
if (status === 500) { |
|
|
|
|
|
NotifyManager.error(t(data?.errorMessageI18nKey)); |
|
|
|
|
|
} else { |
|
|
|
|
|
NotifyManager.error(t(status)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|