diff --git a/policeManagement/src/views/query/publicUnit.vue b/policeManagement/src/views/query/publicUnit.vue
index 62cb0da..8d24796 100644
--- a/policeManagement/src/views/query/publicUnit.vue
+++ b/policeManagement/src/views/query/publicUnit.vue
@@ -304,7 +304,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
icon: ' ',
centered: true,
content: () => ,
- onOk: async () => {
+ onOk: debounce(async () => {
await _formRef.value?.validate()
const resp = await api.post('/eu/add_upd', {
@@ -318,7 +318,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
await tableRef.value?.requestGetTableData()
callback && callback()
- },
+ }, 300),
})
}
@@ -486,7 +486,15 @@ const formItemOptions = ref>(null)
+const _tableRef = ref(null)
+
+const deleteAccount = async (snowFlakeId) => {
+ const resp = await api.delete('/m2/eu/deleteSpById', {
+ serviceProjectId: snowFlakeId,
+ })
+ message.success(resp.message)
+ await _tableRef.value?.requestGetTableData()
+}
const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) => {
const _columns: _TableProps['columns'] = [
{
@@ -624,16 +632,7 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
>
编辑
- {
- const resp = await api.delete('/m2/eu/deleteSpById', {
- serviceProjectId: record.snowFlakeId,
- })
- message.success(resp.message)
- await _tableRef.value?.requestGetTableData()
- }}
- >
+ deleteAccount(record.snowFlakeId)}>
删除