|
|
|
@ -58,34 +58,35 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" name="AnnualCompPoint-annualCompPoint" setup> |
|
|
|
|
import {ref, reactive} from 'vue'; |
|
|
|
|
import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
|
|
|
|
import {award} from '/@/views/award/AwardManagement.api.ts'; |
|
|
|
|
import {useListPage} from '/@/hooks/system/useListPage'; |
|
|
|
|
import {columns} from './AnnualCompPoint.data'; |
|
|
|
|
import { |
|
|
|
|
import {ref, reactive} from 'vue'; |
|
|
|
|
import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
|
|
|
|
import {award} from '/@/views/award/AwardManagement.api.ts'; |
|
|
|
|
import {useListPage} from '/@/hooks/system/useListPage'; |
|
|
|
|
import {columns} from './AnnualCompPoint.data'; |
|
|
|
|
import { |
|
|
|
|
list, |
|
|
|
|
deleteOne, |
|
|
|
|
batchDelete, |
|
|
|
|
getImportUrl, |
|
|
|
|
getExportUrl, |
|
|
|
|
updateApply, |
|
|
|
|
collectScore |
|
|
|
|
} from './AnnualCompPoint.api'; |
|
|
|
|
import {downloadFile} from '/@/utils/common/renderUtils'; |
|
|
|
|
import AnnualCompPointModal from './components/AnnualCompPointModal.vue' |
|
|
|
|
import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue'; |
|
|
|
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; |
|
|
|
|
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; |
|
|
|
|
import {router} from "/@/router"; |
|
|
|
|
import {useRouter} from "vue-router"; |
|
|
|
|
collectScore, |
|
|
|
|
pj |
|
|
|
|
} from './AnnualCompPoint.api'; |
|
|
|
|
import {downloadFile} from '/@/utils/common/renderUtils'; |
|
|
|
|
import AnnualCompPointModal from './components/AnnualCompPointModal.vue' |
|
|
|
|
import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue'; |
|
|
|
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; |
|
|
|
|
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; |
|
|
|
|
import {router} from "/@/router"; |
|
|
|
|
import {useRouter} from "vue-router"; |
|
|
|
|
|
|
|
|
|
const formRef = ref(); |
|
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
|
const toggleSearchStatus = ref<boolean>(false); |
|
|
|
|
const registerModal = ref(); |
|
|
|
|
//注册table数据 |
|
|
|
|
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ |
|
|
|
|
const formRef = ref(); |
|
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
|
const toggleSearchStatus = ref<boolean>(false); |
|
|
|
|
const registerModal = ref(); |
|
|
|
|
//注册table数据 |
|
|
|
|
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ |
|
|
|
|
tableProps: { |
|
|
|
|
title: '年度比赛项目管理', |
|
|
|
|
api: list, |
|
|
|
@ -109,105 +110,111 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ |
|
|
|
|
url: getImportUrl, |
|
|
|
|
success: handleSuccess |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
const [registerTable, { |
|
|
|
|
}); |
|
|
|
|
const [registerTable, { |
|
|
|
|
reload, |
|
|
|
|
collapseAll, |
|
|
|
|
updateTableDataRecord, |
|
|
|
|
findTableDataRecord, |
|
|
|
|
getDataSource |
|
|
|
|
}, {rowSelection, selectedRowKeys}] = tableContext; |
|
|
|
|
const labelCol = reactive({ |
|
|
|
|
}, {rowSelection, selectedRowKeys}] = tableContext; |
|
|
|
|
const labelCol = reactive({ |
|
|
|
|
xs: {span: 24}, |
|
|
|
|
sm: {span: 7}, |
|
|
|
|
}); |
|
|
|
|
const wrapperCol = reactive({ |
|
|
|
|
}); |
|
|
|
|
const wrapperCol = reactive({ |
|
|
|
|
xs: {span: 24}, |
|
|
|
|
sm: {span: 16}, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 新增事件 |
|
|
|
|
*/ |
|
|
|
|
function handleAdd() { |
|
|
|
|
function handleAdd() { |
|
|
|
|
registerModal.value.disableSubmit = false; |
|
|
|
|
registerModal.value.add(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 编辑事件 |
|
|
|
|
*/ |
|
|
|
|
function handleEdit(record: Recordable) { |
|
|
|
|
function handleEdit(record: Recordable) { |
|
|
|
|
registerModal.value.disableSubmit = false; |
|
|
|
|
registerModal.value.edit(record); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 详情 |
|
|
|
|
*/ |
|
|
|
|
function handleDetail(record: Recordable) { |
|
|
|
|
function handleDetail(record: Recordable) { |
|
|
|
|
registerModal.value.disableSubmit = true; |
|
|
|
|
registerModal.value.edit(record); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 年度项目管理 评奖 |
|
|
|
|
*/ |
|
|
|
|
const router = useRouter() |
|
|
|
|
function pingjiang(record: Recordable) { |
|
|
|
|
const router = useRouter() |
|
|
|
|
function pingjiang(record: Recordable) { |
|
|
|
|
router.push({ |
|
|
|
|
path: '/award/AwardManagementList', |
|
|
|
|
query: {id: record.id} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 年度项目管理 作品管理 |
|
|
|
|
*/ |
|
|
|
|
function workManage(record: Recordable) { |
|
|
|
|
function workManage(record: Recordable) { |
|
|
|
|
router.push({ |
|
|
|
|
path: '/workManage/works', |
|
|
|
|
query: {annualCompPointId: record.id} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
function handleCollectScoreApply(record: Recordable) { |
|
|
|
|
collectScore({id: record.id, annualCompId: record.annualCompId}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 年度项目管理 提交审核按钮 |
|
|
|
|
*/ |
|
|
|
|
function handleSubmitandApply(record: Recordable) { |
|
|
|
|
function handleSubmitandApply(record: Recordable) { |
|
|
|
|
updateApply({id: record.id, annualCompState: record.annualCompState}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleCollectScoreApply(record: Recordable) { |
|
|
|
|
collectScore({id: record.id, annualCompId: record.annualCompId}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function handleDelete(record) { |
|
|
|
|
async function handleDelete(record) { |
|
|
|
|
await deleteOne({id: record.id}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 评奖事件 |
|
|
|
|
*/ |
|
|
|
|
async function pjgl(record) { |
|
|
|
|
await pj({id: record.id}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 批量删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function batchHandleDelete() { |
|
|
|
|
async function batchHandleDelete() { |
|
|
|
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 成功回调 |
|
|
|
|
*/ |
|
|
|
|
function handleSuccess() { |
|
|
|
|
function handleSuccess() { |
|
|
|
|
(selectedRowKeys.value = []) && reload(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 操作栏 |
|
|
|
|
*/ |
|
|
|
|
function getTableAction(record) { |
|
|
|
|
function getTableAction(record) { |
|
|
|
|
|
|
|
|
|
const actions = [ |
|
|
|
|
{ |
|
|
|
@ -225,6 +232,15 @@ function getTableAction(record) { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
if(Date.parse(new Date())>Date.parse(record.scoreEndTime)){ |
|
|
|
|
actions.unshift({ |
|
|
|
|
label: '评奖', |
|
|
|
|
popConfirm: { |
|
|
|
|
title: '是否确认评奖', |
|
|
|
|
confirm: pjgl.bind(null, record), |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (record.annualCompState === "0") { // 年度比赛状态 0待提交、1已提交(待审核)、2已审核、3待驳回、4已驳回 |
|
|
|
|
actions.unshift({ |
|
|
|
|
label: '提交', |
|
|
|
@ -250,13 +266,6 @@ function getTableAction(record) { |
|
|
|
|
onClick: handleSubmitandApply.bind(null, record), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (record.annualCompState === "8") { |
|
|
|
|
actions.unshift({ |
|
|
|
|
label: '评奖', |
|
|
|
|
onClick: pingjiang.bind(null, record), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
是否已凭奖为1且未汇总过时,可以积分汇总操作 |
|
|
|
|
* 状态:0待提交、1已提交(待审核)、2已审核(已通过)、3待驳回、4已驳回、5-已报名、6-已选题、7-已上传作品、8-已评分、9-已评奖,10-积分已汇总 |
|
|
|
@ -267,7 +276,12 @@ function getTableAction(record) { |
|
|
|
|
onClick: handleCollectScoreApply.bind(null, record), |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* if (record.annualCompState === "8") { |
|
|
|
|
actions.unshift({ |
|
|
|
|
label: '评奖', |
|
|
|
|
onClick: pingjiang.bind(null, record), |
|
|
|
|
}); |
|
|
|
|
}*/ |
|
|
|
|
actions.unshift({ |
|
|
|
|
label: '作品管理', |
|
|
|
|
onClick: workManage.bind(null, record), |
|
|
|
@ -291,40 +305,40 @@ function getTableAction(record) { |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
return actions; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 查询 |
|
|
|
|
*/ |
|
|
|
|
function searchQuery() { |
|
|
|
|
function searchQuery() { |
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 重置 |
|
|
|
|
*/ |
|
|
|
|
function searchReset() { |
|
|
|
|
function searchReset() { |
|
|
|
|
formRef.value.resetFields(); |
|
|
|
|
selectedRowKeys.value = []; |
|
|
|
|
//刷新数据 |
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* popup组件值改变事件 |
|
|
|
|
*/ |
|
|
|
|
function setFieldsValue(map) { |
|
|
|
|
function setFieldsValue(map) { |
|
|
|
|
Object.keys(map).map((key) => { |
|
|
|
|
queryParam[key] = map[key]; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
.jeecg-basic-table-form-container { |
|
|
|
|
.jeecg-basic-table-form-container { |
|
|
|
|
.table-page-search-submitButtons { |
|
|
|
|
display: block; |
|
|
|
|
margin-bottom: 24px; |
|
|
|
@ -341,5 +355,5 @@ function setFieldsValue(map) { |
|
|
|
|
display: inline-block; |
|
|
|
|
text-align: center |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|