main
Gitea 1 year ago
parent 7966a8878a
commit 63bcb45f9b
  1. 178
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue

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

Loading…
Cancel
Save