|
@@ -6,6 +6,7 @@
|
|
|
<template #tableTitle>
|
|
|
<a-button type="primary" v-auth="'baseCode:base_project_archive:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
|
|
|
<a-button type="primary" v-auth="'baseCode:base_project_archive:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
|
|
|
+ <a-button type="primary" @click="handleDeactivate"> 停用(Deactivate)</a-button>
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<template #overlay>
|
|
|
<a-menu>
|
|
@@ -30,6 +31,7 @@
|
|
|
</BasicTable>
|
|
|
<!-- 表单区域 -->
|
|
|
<BaseProjectArchiveModal @register="registerModal" @success="handleSuccess"></BaseProjectArchiveModal>
|
|
|
+ <SetCloseReasonModal ref="SetCloseReasonModalRef" @success="successfullyDeactive"></SetCloseReasonModal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -40,12 +42,14 @@
|
|
|
import { useListPage } from '/@/hooks/system/useListPage'
|
|
|
import BaseProjectArchiveModal from './components/BaseProjectArchiveModal.vue'
|
|
|
import {columns, searchFormSchema, superQuerySchema} from './BaseProjectArchive.data';
|
|
|
- import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './BaseProjectArchive.api';
|
|
|
- import { downloadFile } from '/@/utils/common/renderUtils';
|
|
|
+ import SetCloseReasonModal from '../../publicComponents/SetCloseReasonModal.vue'
|
|
|
+ import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,getDeactive} from './BaseProjectArchive.api';
|
|
|
+ import { message } from 'ant-design-vue';
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
const queryParam = reactive<any>({});
|
|
|
const checkedKeys = ref<Array<string | number>>([]);
|
|
|
const userStore = useUserStore();
|
|
|
+ var SetCloseReasonModalRef = ref();
|
|
|
//注册model
|
|
|
const [registerModal, {openModal}] = useModal();
|
|
|
//注册table数据
|
|
@@ -107,6 +111,23 @@
|
|
|
isUpdate: false,
|
|
|
showFooter: true,
|
|
|
});
|
|
|
+ }
|
|
|
+ //停用
|
|
|
+ function handleDeactivate(){
|
|
|
+ if (selectedRowKeys.value.length == 0) {
|
|
|
+ message.warning('请选择数据');
|
|
|
+ } else {
|
|
|
+ var ids = selectedRowKeys.value.join(',');
|
|
|
+ var ids=selectedRowKeys.value.join(',')
|
|
|
+ SetCloseReasonModalRef.value.getTableDeactivate(ids)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function successfullyDeactive(reason,id){
|
|
|
+ var params={
|
|
|
+ ids: id,
|
|
|
+ closeReason: reason
|
|
|
+ }
|
|
|
+ getDeactive(params,handleSuccess);
|
|
|
}
|
|
|
/**
|
|
|
* 编辑事件
|