巡查点关闭功能
parent
666e2e871f
commit
2e8e0ad62d
|
|
@ -10,6 +10,8 @@ enum Api {
|
|||
Update = '/api/MiMinePoint/Update',
|
||||
// 删除
|
||||
Delete = '/api/MiMinePoint/Delete',
|
||||
// 关闭巡查点
|
||||
CloseMinePoint = '/api/MiMinePoint/CloseMinePoint',
|
||||
}
|
||||
export function LoadAllPage(params) {
|
||||
return defHttp.get({
|
||||
|
|
@ -40,4 +42,9 @@ export function Delete(params) {
|
|||
url: Api.Delete,
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function CloseMinePoint(params: { pointid: string; }) {
|
||||
return defHttp.post({
|
||||
url: `${Api.CloseMinePoint}?pointid=${params.pointid}`,
|
||||
});
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { BasicTable, useTable } from '@/components/Table';
|
||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { LoadAllPage, Delete } from '@/api/illegalconstruction/miningsitemanagement'
|
||||
import { LoadAllPage, Delete, CloseMinePoint } from '@/api/illegalconstruction/miningsitemanagement'
|
||||
import { columns, searchFormSchema } from './util';
|
||||
import AddOrUpdateModal from './AddOrUpdateModal/index.vue'
|
||||
|
||||
|
|
@ -86,6 +86,27 @@
|
|||
},
|
||||
});
|
||||
break;
|
||||
case 'btnClose':
|
||||
if (getSelectRows().length !== 1) {
|
||||
message.warning('请选择一条数据');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '是否确认关闭该巡查点?',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
onCancel() {},
|
||||
onOk() {
|
||||
let selectList = getSelectRows()
|
||||
let params = {
|
||||
pointid: selectList[0].id
|
||||
}
|
||||
return CloseMinePoint(params).then(res => {
|
||||
message.success('关闭成功')
|
||||
reload()
|
||||
})
|
||||
},
|
||||
});
|
||||
break
|
||||
}
|
||||
};
|
||||
const closeAddOrUpdateModal = (isReload=false) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue