|
@ -7,11 +7,19 @@ |
|
|
<TableAction :actions="getTableAction(record)" /> |
|
|
<TableAction :actions="getTableAction(record)" /> |
|
|
</template> |
|
|
</template> |
|
|
</BasicTable> |
|
|
</BasicTable> |
|
|
<BasicModal @register="registerSubmitProjectArchive" title="归档信息详情" width="1200px" :showOkBtn="false" |
|
|
<BasicModal |
|
|
:showCancelBtn="false"> |
|
|
@register="registerSubmitProjectArchive" |
|
|
<SubmitProjectArchive :projectid="projectid" :showApprovalForm="showApprovalForm" @close="close" /> |
|
|
title="归档信息详情" |
|
|
|
|
|
width="1200px" |
|
|
|
|
|
:showOkBtn="false" |
|
|
|
|
|
:showCancelBtn="false" |
|
|
|
|
|
> |
|
|
|
|
|
<SubmitProjectArchive |
|
|
|
|
|
:projectid="projectid" |
|
|
|
|
|
:showApprovalForm="showApprovalForm" |
|
|
|
|
|
@close="close" |
|
|
|
|
|
/> |
|
|
</BasicModal> |
|
|
</BasicModal> |
|
|
|
|
|
|
|
|
</PageWrapper> |
|
|
</PageWrapper> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -20,24 +28,26 @@ |
|
|
import { ref } from 'vue'; |
|
|
import { ref } from 'vue'; |
|
|
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table'; |
|
|
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table'; |
|
|
import { useModal, BasicModal } from '@/components/Modal'; |
|
|
import { useModal, BasicModal } from '@/components/Modal'; |
|
|
import SubmitProjectArchive from './SubmitProjectArchive.vue' |
|
|
import SubmitProjectArchive from './SubmitProjectArchive.vue'; |
|
|
import { PageWrapper } from '@/components/Page'; |
|
|
import { PageWrapper } from '@/components/Page'; |
|
|
|
|
|
|
|
|
import { columns, searchFormSchema } from '../projectInfo/projectInfo.data'; |
|
|
import { columns, searchFormSchema } from '../projectInfo/projectInfo.data'; |
|
|
|
|
|
|
|
|
import { projectArchivePageList } from './projectArchive.api'; |
|
|
import { projectArchivePageList, archiveProject } from './projectArchive.api'; |
|
|
import { useUserStore } from '@/store/modules/user'; |
|
|
import { useUserStore } from '@/store/modules/user'; |
|
|
|
|
|
import { message } from 'ant-design-vue'; |
|
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
const userStore = useUserStore(); |
|
|
const [registerSubmitProjectArchive, { openModal: openModalSubmitProjectArchive, closeModal }] = useModal(); |
|
|
const [registerSubmitProjectArchive, { openModal: openModalSubmitProjectArchive, closeModal }] = |
|
|
let projectid = ref() |
|
|
useModal(); |
|
|
let showApprovalForm = ref<boolean>(false) |
|
|
let projectid = ref(); |
|
|
|
|
|
let showApprovalForm = ref<boolean>(false); |
|
|
const [registerTable] = useTable({ |
|
|
const [registerTable] = useTable({ |
|
|
title: '项目归档信息', |
|
|
title: '项目归档信息', |
|
|
api: projectArchivePageList, |
|
|
api: projectArchivePageList, |
|
|
columns: columns, |
|
|
columns: columns, |
|
|
useSearchForm: true, |
|
|
useSearchForm: true, |
|
|
rowKey: "id", |
|
|
rowKey: 'id', |
|
|
showIndexColumn: false, |
|
|
showIndexColumn: false, |
|
|
actionColumn: { |
|
|
actionColumn: { |
|
|
width: 140, |
|
|
width: 140, |
|
@ -50,43 +60,49 @@ const [registerTable] = useTable({ |
|
|
schemas: searchFormSchema, |
|
|
schemas: searchFormSchema, |
|
|
}, |
|
|
}, |
|
|
beforeFetch: (param) => { |
|
|
beforeFetch: (param) => { |
|
|
|
|
|
|
|
|
if (param.stage == undefined || param.stage == null) { |
|
|
if (param.stage == undefined || param.stage == null) { |
|
|
param.stage = "2" |
|
|
param.stage = '2'; |
|
|
} else { |
|
|
} else { |
|
|
param.newStage=param.stage |
|
|
param.newStage = param.stage; |
|
|
param.stage = "2" |
|
|
param.stage = '2'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getTableAction(record): ActionItem[] { |
|
|
function getTableAction(record): ActionItem[] { |
|
|
return [ |
|
|
return [ |
|
|
{ |
|
|
{ |
|
|
label: '详情', |
|
|
label: '详情', |
|
|
ifShow: () => { |
|
|
ifShow: () => { |
|
|
return record.stage >= 2 |
|
|
return record.stage >= 2; |
|
|
}, |
|
|
}, |
|
|
onClick: handleDetailpage.bind(null, record), |
|
|
onClick: handleDetailpage.bind(null, record), |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '归档', |
|
|
|
|
|
ifShow: () => { |
|
|
|
|
|
return record.isArchive == true; |
|
|
|
|
|
}, |
|
|
|
|
|
onClick: handleArchive.bind(null, record), |
|
|
|
|
|
}, |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleDetailpage(record) { |
|
|
function handleDetailpage(record) { |
|
|
projectid.value = record.id |
|
|
projectid.value = record.id; |
|
|
showApprovalForm.value = true |
|
|
showApprovalForm.value = true; |
|
|
openModalSubmitProjectArchive(true) |
|
|
openModalSubmitProjectArchive(true); |
|
|
|
|
|
} |
|
|
|
|
|
async function handleArchive(record) { |
|
|
|
|
|
projectid.value = record.id; |
|
|
|
|
|
const res = await archiveProject(projectid.value); |
|
|
|
|
|
if (res == '归档项目成功!') { |
|
|
|
|
|
message.success('归档成功'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function close() { |
|
|
function close() { |
|
|
closeModal() |
|
|
closeModal(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
@ -131,7 +147,6 @@ function close() { |
|
|
margin-bottom: 10px; |
|
|
margin-bottom: 10px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .ant-table-expanded-row { |
|
|
::v-deep .ant-table-expanded-row { |
|
|
height: auto !important; |
|
|
height: auto !important; |
|
|
/* 其他样式 */ |
|
|
/* 其他样式 */ |
|
|