专家绑定作品

dev
Gitea 5 months ago
parent 6f9e348266
commit a16880eb5b
  1. 18
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/anncomgrotopp/entity/AnnComGroTopP.java
  2. 33
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  3. 22
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java
  4. 4
      jeecgboot-vue3-master/src/views/anncomgrotopp/AnnComGroTopP.data.ts
  5. 2
      jeecgboot-vue3-master/src/views/anncomgrotopp/components/AnnComGroTopPModal.vue
  6. 16
      jeecgboot-vue3-master/src/views/anncomgrotopp/components/ChaoseTopicPersion.data.ts
  7. 11
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroup.api.ts
  8. 4
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList.vue
  9. 282
      jeecgboot-vue3-master/src/views/annualcompgroup/AnnualCompGroupList1.vue

@ -72,4 +72,22 @@ public class AnnComGroTopP implements Serializable {
@Excel(name = "已评专家数", width = 15) @Excel(name = "已评专家数", width = 15)
@ApiModelProperty(value = "已评专家数") @ApiModelProperty(value = "已评专家数")
private java.lang.Integer ypzj; private java.lang.Integer ypzj;
/**年度*/
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id")
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id")
@ApiModelProperty(value = "年度")
private java.lang.String annid;
/**年度比赛项目*/
@Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@ApiModelProperty(value = "年度比赛项目")
private java.lang.String annComP;
/**专家组*/
@Excel(name = "专家组", width = 15, dictTable = "annual_comp_group", dicText = "name", dicCode = "id")
@Dict(dictTable = "annual_comp_group", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "专家组")
private java.lang.String annComPG;
/**作品名称*/
@ApiModelProperty(value = "作品名称")
private java.lang.String topicName;
} }

@ -34,6 +34,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.topic.service.ITopicService; import org.jeecg.modules.demo.topic.service.ITopicService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -76,6 +78,8 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
private IAnnComGroTopService annComGroTopService; private IAnnComGroTopService annComGroTopService;
@Autowired @Autowired
private IAnnComGroTopPService annComGroTopPService; private IAnnComGroTopPService annComGroTopPService;
@Autowired
private IUpfilePersionService upfilePersionService;
/** /**
* 分页列表查询 * 分页列表查询
@ -136,7 +140,6 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
/** /**
* 分页列表查询 * 分页列表查询
* *
* @param chaoseTopicPersion
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param req * @param req
@ -145,28 +148,30 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
//@AutoLog(value = "比赛选题-分页列表查询") //@AutoLog(value = "比赛选题-分页列表查询")
@ApiOperation(value = "报名编号-分页列表查询", notes = "报名编号-分页列表查询") @ApiOperation(value = "报名编号-分页列表查询", notes = "报名编号-分页列表查询")
@GetMapping(value = "/bmbhlist") @GetMapping(value = "/bmbhlist")
public Result<IPage<ChaoseTopicPersion>> bmbhlist(ChaoseTopicPersion chaoseTopicPersion, public Result<IPage<UpfilePersion>> bmbhlist(UpfilePersion upfilePersion,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) { HttpServletRequest req,@RequestParam(name="xmtmid",required=true) String xmtmid) {
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid); AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid);
QueryWrapper<ChaoseTopicPersion> queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); QueryWrapper<UpfilePersion> queryWrapper = QueryGenerator.initQueryWrapper(upfilePersion, req.getParameterMap());
queryWrapper.eq("timul",annComGroTop.getTopid()); queryWrapper.eq("annual_id",annComGroTop.getAnnid());
queryWrapper.eq("status","2"); queryWrapper.eq("annual_comp_point_id",annComGroTop.getAnnComP());
queryWrapper.eq("status","0");
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); AnnComGroTopP annComGroTopP = new AnnComGroTopP();
QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap()); QueryWrapper<AnnComGroTopP> queryWrapperagt = QueryGenerator.initQueryWrapper(annComGroTopP, req.getParameterMap());
//queryWrapperagt.eq("ann_com_gro_topid",xmtmid); //queryWrapperagt.eq("ann_com_gro_topid",xmtmid);
queryWrapperagt.eq("topid",annComGroTop.getTopid()); queryWrapperagt.eq("annid",annComGroTop.getAnnid());
queryWrapperagt.eq("ann_com_p",annComGroTop.getAnnComP());
List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt); List<AnnComGroTopP> listact = annComGroTopPService.list(queryWrapperagt);
String str = ""; String str = "";
for(int i = 0 ; i<listact.size();i++){ for(int i = 0 ; i<listact.size();i++){
str = str+listact.get(i).getBmcode()+","; str = str+listact.get(i).getBmcode()+",";
} }
if(str!=""){ if(str!=""){
queryWrapper.notIn("bmcode",str.split(",")); queryWrapper.notIn("apply_code",str.split(","));
} }
Page<ChaoseTopicPersion> page = new Page<>(pageNo, pageSize); Page<UpfilePersion> page = new Page<>(pageNo, pageSize);
IPage<ChaoseTopicPersion> pageList = chaoseTopicPersionService.page(page, queryWrapper); IPage<UpfilePersion> pageList = upfilePersionService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -182,12 +187,16 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@GetMapping(value = "/bmbhadd") @GetMapping(value = "/bmbhadd")
public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) { public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid) {
String strs[] = ids.split(","); String strs[] = ids.split(",");
AnnComGroTop annComGroTop = annComGroTopService.getById(xmtmid);
for (int i = 0 ; i < strs.length ; i++){ for (int i = 0 ; i < strs.length ; i++){
ChaoseTopicPersion chaoseTopicPersion = chaoseTopicPersionService.getById(strs[i]); UpfilePersion upfilePersion = upfilePersionService.getById(strs[i]);
AnnComGroTopP annComGroTopP = new AnnComGroTopP(); AnnComGroTopP annComGroTopP = new AnnComGroTopP();
annComGroTopP.setAnnComGroTopid(xmtmid); annComGroTopP.setAnnComGroTopid(xmtmid);
annComGroTopP.setTopid(chaoseTopicPersion.getTimul()); annComGroTopP.setBmcode(upfilePersion.getApplyCode());
annComGroTopP.setBmcode(chaoseTopicPersion.getBmcode()); annComGroTopP.setAnnid(annComGroTop.getAnnid());
annComGroTopP.setAnnComP(annComGroTop.getAnnComP());
annComGroTopP.setAnnComPG(annComGroTop.getAnnComPG());
annComGroTopP.setTopicName(upfilePersion.getTopicName());
annComGroTopPService.save(annComGroTopP); annComGroTopPService.save(annComGroTopP);
} }
return Result.OK("绑定成功!"); return Result.OK("绑定成功!");

@ -124,16 +124,15 @@ public class TopicController extends JeecgController<Topic, ITopicService> {
/** /**
* 添加 * 添加
* *
* @param ids
* @return * @return
*/ */
@AutoLog(value = "设置题目添加") @AutoLog(value = "设置题目添加")
@ApiOperation(value="设置题目添加", notes="设置题目添加") @ApiOperation(value="设置题目添加", notes="设置题目添加")
//@RequiresPermissions("expert:expert:add") //@RequiresPermissions("expert:expert:add")
@GetMapping(value = "/szadd") @GetMapping(value = "/szadd")
public Result<String> szadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid) { public Result<String> szadd(@RequestParam(name="ndbsxzid",required=true) String ndbsxzid,HttpServletRequest req) {
AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid); AnnualCompGroup annualCompGroup = annualCompGroupService.getById(ndbsxzid);
String str[] =ids.split(","); /* String str[] =ids.split(",");
for (int i = 0 ; i < str.length;i++){ for (int i = 0 ; i < str.length;i++){
AnnComGroTop annComGroTop = new AnnComGroTop(); AnnComGroTop annComGroTop = new AnnComGroTop();
annComGroTop.setAnnid(annualCompGroup.getAnnal()); annComGroTop.setAnnid(annualCompGroup.getAnnal());
@ -141,8 +140,23 @@ public class TopicController extends JeecgController<Topic, ITopicService> {
annComGroTop.setAnnComPG(ndbsxzid); annComGroTop.setAnnComPG(ndbsxzid);
annComGroTop.setTopid(str[i]); annComGroTop.setTopid(str[i]);
annComGroTopService.save(annComGroTop); annComGroTopService.save(annComGroTop);
}*/
AnnComGroTop annComGroTopnew = new AnnComGroTop();
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTopnew, req.getParameterMap());
queryWrapper.eq("annid",annualCompGroup.getAnnal());
queryWrapper.eq("ann_com_p",annualCompGroup.getAnnCompP());
queryWrapper.eq("ann_com_p_g",ndbsxzid);
List<AnnComGroTop> list = annComGroTopService.list(queryWrapper);
if(list.size()==0){
AnnComGroTop annComGroTop = new AnnComGroTop();
annComGroTop.setAnnid(annualCompGroup.getAnnal());
annComGroTop.setAnnComP(annualCompGroup.getAnnCompP());
annComGroTop.setAnnComPG(ndbsxzid);
annComGroTopService.save(annComGroTop);
return Result.OK(annComGroTop.getId());
}else{
return Result.OK(list.get(0).getId());
} }
return Result.OK("设置成功!");
} }
// @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询") // @ApiOperation(value = "题目管理-教务处待审核", notes = "题目管理-分页列表查询")

@ -5,9 +5,9 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '题目', title: '作品名称',
align: "center", align: "center",
dataIndex: 'topid_dictText' dataIndex: 'topicName'
}, },
{ {
title: '报名编号', title: '报名编号',

@ -19,7 +19,7 @@
* 新增 * 新增
*/ */
function add() { function add() {
title.value = '绑定报名编号'; title.value = '绑定作品';
visible.value = true; visible.value = true;
/* nextTick(() => { /* nextTick(() => {
registerForm.value.add(); registerForm.value.add();

@ -3,20 +3,20 @@ import {FormSchema} from '/@/components/Table';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '报名编号', title: '作品名称',
align: "center", align: "center",
dataIndex: 'bmcode' dataIndex: 'topicName'
}, },
{ {
title: '题目', title: '报名编号',
align: "center", align: "center",
dataIndex: 'timul_dictText' dataIndex: 'applyCode'
}, }
{ /* {
title: '状态', title: '状态',
align: "center", align: "center",
dataIndex: 'status_dictText' dataIndex: "待评分"
} }*/
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [

@ -12,6 +12,7 @@ enum Api {
importExcel = '/annualcompgroup/annualCompGroup/importExcel', importExcel = '/annualcompgroup/annualCompGroup/importExcel',
exportXls = '/annualcompgroup/annualCompGroup/exportXls', exportXls = '/annualcompgroup/annualCompGroup/exportXls',
queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', queryCompId = '/annualcompgroup/annualCompGroup/queryCompId',
saveTop = '/topic/topic/szadd',
} }
/** /**
@ -73,3 +74,13 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save; let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false }); return defHttp.post({ url: url, params }, { isTransformResponse: false });
} }
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdateTop = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.saveTop;
return defHttp.get({ url: url, params }, { isTransformResponse: false });
}

@ -201,11 +201,11 @@
onClick: bdcy.bind(null, record), onClick: bdcy.bind(null, record),
//this.$Router.push //this.$Router.push
}, },
{ /* {
label: '设置题目', label: '设置题目',
onClick: sztm.bind(null, record), onClick: sztm.bind(null, record),
//this.$Router.push //this.$Router.push
}, },*/
] ]
} }

@ -0,0 +1,282 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="年度" name="annal">
<j-dict-select-tag placeholder="请选择年度" v-model:value="queryParam.annal" dictCode="annual,annual_name,id"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="小组名称" name="name">
<a-input placeholder="请输入小组名称" v-model:value="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<AnnualCompGroupModal ref="registerModal" @success="handleSuccess"></AnnualCompGroupModal>
</div>
</template>
<script lang="ts" name="annualcompgroup-annualCompGroup" setup>
import { ref, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './AnnualCompGroup.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,saveOrUpdateTop } from './AnnualCompGroup.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import AnnualCompGroupModal from './components/AnnualCompGroupModal.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
import {saveOrUpdate} from "/@/views/anncomgrotop/components/Topic.api";
import {defHttp} from "/@/utils/http/axios";
const router = useRouter();
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,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "年度比赛项目专家小组",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '绑定作品',
onClick: sztm.bind(null, record),
//this.$Router.push
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
},
/* {
label: '绑定成员',
onClick: bdcy.bind(null, record),
//this.$Router.push
},*/
]
}
/**
* 绑定成员事件
*/
function bdcy(record: Recordable) {
//console.log(record.annalComp)
//let ndbsid = record.annalComp;
let id= record.id;
router.push({ path: '/expgroup/ExpGroupList', query: {id} })
}
/**
* 设置题目事件
*/
async function sztm(record: Recordable) {
//console.log(record.annalComp)
//let ndbsid = record.annalComp;
let ndbsxzid= record.id;
await saveOrUpdateTop({ndbsxzid:ndbsxzid}, false)
.then((res) => {
if (res.success) {
console.log(res.result)
let id =res.result;
router.push({ path: '/anncomgrotopp/AnnComGroTopPList', query: {id} })
}
});
//router.push({ path: '/anncomgrotop/AnnComGroTopList', query: {id} })
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>
Loading…
Cancel
Save