1、人个能力评价

main
zhc077 1 year ago
parent 202ce4835e
commit b58cbeeba8
  1. 150
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java
  2. 175
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluation.java
  3. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/PersonalAbilityEvaluationMapper.java
  4. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/xml/PersonalAbilityEvaluationMapper.xml
  5. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java
  6. 19
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java
  7. 64
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.api.ts
  8. 189
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.data.ts
  9. 173
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluationList.vue
  10. 26
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation_menu_insert.sql
  11. 70
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationForm.vue
  12. 66
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationModal.vue
  13. 64
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluation.api.ts
  14. 262
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluation.data.ts
  15. 177
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluationList.vue
  16. 70
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/components/PersonalAbilityEvaluationForm.vue
  17. 66
      jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/components/PersonalAbilityEvaluationModal.vue

@ -0,0 +1,150 @@
package org.jeecg.modules.demo.abilityEvaluation.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 个人能力评价
* @Author: jeecg-boot
* @Date: 2023-11-07
* @Version: V1.0
*/
@Api(tags = "个人能力评价")
@RestController
@RequestMapping("/abilityEvaluation/personalAbilityEvaluation")
@Slf4j
public class PersonalAbilityEvaluationController extends JeecgController<PersonalAbilityEvaluation, IPersonalAbilityEvaluationService> {
@Autowired
private IPersonalAbilityEvaluationService personalAbilityEvaluationService;
/**
* 分页列表查询
*
* @param personalAbilityEvaluation
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "个人能力评价-分页列表查询")
@ApiOperation(value = "个人能力评价-分页列表查询", notes = "个人能力评价-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<PersonalAbilityEvaluation>> queryPageList(PersonalAbilityEvaluation personalAbilityEvaluation,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<PersonalAbilityEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(personalAbilityEvaluation, req.getParameterMap());
Page<PersonalAbilityEvaluation> page = new Page<PersonalAbilityEvaluation>(pageNo, pageSize);
IPage<PersonalAbilityEvaluation> pageList = personalAbilityEvaluationService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param personalAbilityEvaluation
* @return
*/
@ApiOperation(value = "个人能力评价-添加", notes = "个人能力评价-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody PersonalAbilityEvaluation personalAbilityEvaluation) {
personalAbilityEvaluationService.save(personalAbilityEvaluation);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param personalAbilityEvaluation
* @return
*/
@ApiOperation(value = "个人能力评价-编辑", notes = "个人能力评价-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody PersonalAbilityEvaluation personalAbilityEvaluation) {
personalAbilityEvaluationService.updateById(personalAbilityEvaluation);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@ApiOperation(value = "个人能力评价-通过id删除", notes = "个人能力评价-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
personalAbilityEvaluationService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@ApiOperation(value = "个人能力评价-批量删除", notes = "个人能力评价-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.personalAbilityEvaluationService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "个人能力评价-通过id查询")
@ApiOperation(value = "个人能力评价-通过id查询", notes = "个人能力评价-通过id查询")
@GetMapping(value = "/queryById")
public Result<PersonalAbilityEvaluation> queryById(@RequestParam(name = "id", required = true) String id) {
PersonalAbilityEvaluation personalAbilityEvaluation = personalAbilityEvaluationService.getById(id);
if (personalAbilityEvaluation == null) {
return Result.error("未找到对应数据");
}
return Result.OK(personalAbilityEvaluation);
}
/**
* 导出excel
*
* @param request
* @param personalAbilityEvaluation
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PersonalAbilityEvaluation personalAbilityEvaluation) {
return super.exportXls(request, personalAbilityEvaluation, PersonalAbilityEvaluation.class, "个人能力评价");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, PersonalAbilityEvaluation.class);
}
}

@ -0,0 +1,175 @@
package org.jeecg.modules.demo.abilityEvaluation.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 个人能力评价
* @Author: jeecg-boot
* @Date: 2023-11-07
* @Version: V1.0
*/
@Data
@TableName("personal_ability_evaluation")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "personal_ability_evaluation对象", description = "个人能力评价")
public class PersonalAbilityEvaluation implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 所属部门
*/
@Excel(name = "所属部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "所属部门")
private String depetId;
/**
* 年度
*/
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id")
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id")
@ApiModelProperty(value = "年度")
private String annualId;
/**
* 年度比赛
*/
@Excel(name = "年度比赛", width = 15)
@ApiModelProperty(value = "年度比赛")
@Dict(dictTable = "annual_comp",dicCode = "id",dicText = "name")
private String annualCompId;
/**
* 年度比赛项目
*/
@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 String annualCompP;
/**
* 学号
*/
@Excel(name = "学号", width = 15)
@ApiModelProperty(value = "学号")
private String workOn;
/**
* 姓名
*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private String name;
/**
* 能力1
*/
@Excel(name = "能力1", width = 15)
@ApiModelProperty(value = "能力1")
private Double soc1;
/**
* 能力2
*/
@Excel(name = "能力2", width = 15)
@ApiModelProperty(value = "能力2")
private Double soc2;
/**
* 能力3
*/
@Excel(name = "能力3", width = 15)
@ApiModelProperty(value = "能力3")
private Double soc3;
/**
* 能力4
*/
@Excel(name = "能力4", width = 15)
@ApiModelProperty(value = "能力4")
private Double soc4;
/**
* 能力5
*/
@Excel(name = "能力5", width = 15)
@ApiModelProperty(value = "能力5")
private Double soc5;
/**
* 能力6
*/
@Excel(name = "能力6", width = 15)
@ApiModelProperty(value = "能力6")
private Double soc6;
/**
* 能力7
*/
@Excel(name = "能力7", width = 15)
@ApiModelProperty(value = "能力7")
private Double soc7;
/**
* 能力8
*/
@Excel(name = "能力8", width = 15)
@ApiModelProperty(value = "能力8")
private Double soc8;
/**
* 能力9
*/
@Excel(name = "能力9", width = 15)
@ApiModelProperty(value = "能力9")
private Double soc9;
/**
* 能力10
*/
@Excel(name = "能力10", width = 15)
@ApiModelProperty(value = "能力10")
private Double soc10;
/**
* 能力11
*/
@Excel(name = "能力11", width = 15)
@ApiModelProperty(value = "能力11")
private Double soc11;
/**
* 能力12
*/
@Excel(name = "能力12", width = 15)
@ApiModelProperty(value = "能力12")
private Double soc12;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.abilityEvaluation.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 个人能力评价
* @Author: jeecg-boot
* @Date: 2023-11-07
* @Version: V1.0
*/
public interface PersonalAbilityEvaluationMapper extends BaseMapper<PersonalAbilityEvaluation> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.abilityEvaluation.mapper.PersonalAbilityEvaluationMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.abilityEvaluation.service;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 个人能力评价
* @Author: jeecg-boot
* @Date: 2023-11-07
* @Version: V1.0
*/
public interface IPersonalAbilityEvaluationService extends IService<PersonalAbilityEvaluation> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.abilityEvaluation.service.impl;
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation;
import org.jeecg.modules.demo.abilityEvaluation.mapper.PersonalAbilityEvaluationMapper;
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 个人能力评价
* @Author: jeecg-boot
* @Date: 2023-11-07
* @Version: V1.0
*/
@Service
public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl<PersonalAbilityEvaluationMapper, PersonalAbilityEvaluation> implements IPersonalAbilityEvaluationService {
}

@ -0,0 +1,64 @@
import {defHttp} from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/abilityEvaluation/personalAbilityEvaluation/list',
save='/abilityEvaluation/personalAbilityEvaluation/add',
edit='/abilityEvaluation/personalAbilityEvaluation/edit',
deleteOne = '/abilityEvaluation/personalAbilityEvaluation/delete',
deleteBatch = '/abilityEvaluation/personalAbilityEvaluation/deleteBatch',
importExcel = '/abilityEvaluation/personalAbilityEvaluation/importExcel',
exportXls = '/abilityEvaluation/personalAbilityEvaluation/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

@ -0,0 +1,189 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '年度',
align:"center",
dataIndex: 'annualId_dictText'
},
{
title: '年度比赛',
align:"center",
dataIndex: 'annualCompId_dictText'
},
{
title: '年度比赛项目',
align:"center",
dataIndex: 'annualCompP_dictText'
},
{
title: '学号',
align:"center",
dataIndex: 'workOn'
},
{
title: '姓名',
align:"center",
dataIndex: 'name'
},
{
title: '能力1',
align:"center",
dataIndex: 'soc1'
},
{
title: '能力2',
align:"center",
dataIndex: 'soc2'
},
{
title: '能力3',
align:"center",
dataIndex: 'soc3'
},
{
title: '能力4',
align:"center",
dataIndex: 'soc4'
},
{
title: '能力5',
align:"center",
dataIndex: 'soc5'
},
{
title: '能力6',
align:"center",
dataIndex: 'soc6'
},
{
title: '能力7',
align:"center",
dataIndex: 'soc7'
},
{
title: '能力8',
align:"center",
dataIndex: 'soc8'
},
{
title: '能力9',
align:"center",
dataIndex: 'soc9'
},
{
title: '能力10',
align:"center",
dataIndex: 'soc10'
},
{
title: '能力11',
align:"center",
dataIndex: 'soc11'
},
{
title: '能力12',
align:"center",
dataIndex: 'soc12'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "所属部门",
field: 'depetId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"sys_depart,depart_name,id"
},
colProps: {span: 6},
},
{
label: "年度",
field: 'annualId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual,annual_name,id"
},
colProps: {span: 6},
},
{
label: "年度比赛项目",
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual_comp_point,obj_name,id"
},
colProps: {span: 6},
},
{
label: "学号",
field: 'workOn',
component: 'Input',
colProps: {span: 6},
},
{
label: "姓名",
field: 'name',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '年度',
field: 'annualId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual,annual_name,id"
},
},
{
label: '年度比赛',
field: 'annualCompId',
component: 'JDictSelectTag',
componentProps:{
dictCode:""
},
},
{
label: '年度比赛项目',
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual_comp_point,obj_name,id"
},
},
{
label: '学号',
field: 'workOn',
component: 'Input',
},
{
label: '姓名',
field: 'name',
component: 'Input',
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
/**
* formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}

@ -0,0 +1,173 @@
<template>
<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)" :dropDownActions="getDropDownAction(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>
<!-- 表单区域 -->
<PersonalAbilityEvaluationModal @register="registerModal" @success="handleSuccess"></PersonalAbilityEvaluationModal>
</div>
</template>
<script lang="ts" name="abilityEvaluation-personalAbilityEvaluation" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import PersonalAbilityEvaluationModal from './components/PersonalAbilityEvaluationModal.vue'
import {columns, searchFormSchema} from './PersonalAbilityEvaluation.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './PersonalAbilityEvaluation.api';
import { downloadFile } from '/@/utils/common/renderUtils';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '个人能力评价',
api: list,
columns,
canResize:false,
formConfig: {
//labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToNumber: [
],
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
fixed:'right'
},
},
exportConfig: {
name:"个人能力评价",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
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: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

@ -0,0 +1,26 @@
-- 注意:该页面对应的前台目录为views/abilityEvaluation文件夹下
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023110705066770200', NULL, '个人能力评价', '/abilityEvaluation/personalAbilityEvaluationList', 'abilityEvaluation/PersonalAbilityEvaluationList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770201', '2023110705066770200', '添加个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770202', '2023110705066770200', '编辑个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770203', '2023110705066770200', '删除个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770204', '2023110705066770200', '批量删除个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770205', '2023110705066770200', '导出excel_个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023110705066770206', '2023110705066770200', '导入excel_个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,70 @@
<template>
<div style="min-height: 400px">
<BasicForm @register="registerForm"></BasicForm>
<div style="width: 100%;text-align: center" v-if="!formDisabled">
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary"> </a-button>
</div>
</div>
</template>
<script lang="ts">
import {BasicForm, useForm} from '/@/components/Form/index';
import {computed, defineComponent} from 'vue';
import {defHttp} from '/@/utils/http/axios';
import { propTypes } from '/@/utils/propTypes';
import {getBpmFormSchema} from '../PersonalAbilityEvaluation.data';
import {saveOrUpdate} from '../PersonalAbilityEvaluation.api';
export default defineComponent({
name: "PersonalAbilityEvaluationForm",
components:{
BasicForm
},
props:{
formData: propTypes.object.def({}),
formBpm: propTypes.bool.def(true),
},
setup(props){
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
labelWidth: 150,
schemas: getBpmFormSchema(props.formData),
showActionButtonGroup: false,
baseColProps: {span: 24}
});
const formDisabled = computed(()=>{
if(props.formData.disabled === false){
return false;
}
return true;
});
let formData = {};
const queryByIdUrl = '/abilityEvaluation/personalAbilityEvaluation/queryById';
async function initFormData(){
let params = {id: props.formData.dataId};
const data = await defHttp.get({url: queryByIdUrl, params});
formData = {...data}
//
await setFieldsValue(formData);
//
await setProps({disabled: formDisabled.value})
}
async function submitForm() {
let data = getFieldsValue();
let params = Object.assign({}, formData, data);
console.log('表单数据', params)
await saveOrUpdate(params, true)
}
initFormData();
return {
registerForm,
formDisabled,
submitForm,
}
}
});
</script>

@ -0,0 +1,66 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../PersonalAbilityEvaluation.data';
import {saveOrUpdate} from '../PersonalAbilityEvaluation.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
//labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: {span: 24}
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number){
width: 100%
}
:deep(.ant-calendar-picker){
width: 100%
}
</style>

@ -0,0 +1,64 @@
import {defHttp} from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/abilityEvaluation/personalAbilityEvaluation/list',
save='/abilityEvaluation/personalAbilityEvaluation/add',
edit='/abilityEvaluation/personalAbilityEvaluation/edit',
deleteOne = '/abilityEvaluation/personalAbilityEvaluation/delete',
deleteBatch = '/abilityEvaluation/personalAbilityEvaluation/deleteBatch',
importExcel = '/abilityEvaluation/personalAbilityEvaluation/importExcel',
exportXls = '/abilityEvaluation/personalAbilityEvaluation/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

@ -0,0 +1,262 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '所属部门',
align:"center",
dataIndex: 'depetId_dictText'
},
{
title: '年度',
align:"center",
dataIndex: 'annualId_dictText'
},
{
title: '年度比赛',
align:"center",
dataIndex: 'annualCompId_dictText'
},
{
title: '年度比赛项目',
align:"center",
dataIndex: 'annualCompP_dictText'
},
{
title: '学号',
align:"center",
dataIndex: 'workOn'
},
{
title: '姓名',
align:"center",
dataIndex: 'name'
},
{
title: '能力1',
align:"center",
dataIndex: 'soc1'
},
{
title: '能力2',
align:"center",
dataIndex: 'soc2'
},
{
title: '能力3',
align:"center",
dataIndex: 'soc3'
},
{
title: '能力4',
align:"center",
dataIndex: 'soc4'
},
{
title: '能力5',
align:"center",
dataIndex: 'soc5'
},
{
title: '能力6',
align:"center",
dataIndex: 'soc6'
},
{
title: '能力7',
align:"center",
dataIndex: 'soc7'
},
{
title: '能力8',
align:"center",
dataIndex: 'soc8'
},
{
title: '能力9',
align:"center",
dataIndex: 'soc9'
},
{
title: '能力10',
align:"center",
dataIndex: 'soc10'
},
{
title: '能力11',
align:"center",
dataIndex: 'soc11'
},
{
title: '能力12',
align:"center",
dataIndex: 'soc12'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "所属部门",
field: 'depetId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"sys_depart,depart_name,id"
},
colProps: {span: 6},
},
{
label: "年度",
field: 'annualId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual,annual_name,id"
},
colProps: {span: 6},
},
{
label: "年度比赛项目",
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual_comp_point,obj_name,id"
},
colProps: {span: 6},
},
{
label: "学号",
field: 'workOn',
component: 'Input',
colProps: {span: 6},
},
{
label: "姓名",
field: 'name',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '所属部门',
field: 'depetId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"sys_depart,depart_name,id"
},
},
{
label: '年度',
field: 'annualId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual,annual_name,id"
},
},
{
label: '年度比赛',
field: 'annualCompId',
component: 'JDictSelectTag',
componentProps:{
dictCode:""
},
},
{
label: '年度比赛项目',
field: 'annualCompP',
component: 'JDictSelectTag',
componentProps:{
dictCode:"annual_comp_point,obj_name,id"
},
},
{
label: '学号',
field: 'workOn',
component: 'Input',
},
{
label: '姓名',
field: 'name',
component: 'Input',
},
{
label: '能力1',
field: 'soc1',
component: 'InputNumber',
},
{
label: '能力2',
field: 'soc2',
component: 'InputNumber',
},
{
label: '能力3',
field: 'soc3',
component: 'InputNumber',
},
{
label: '能力4',
field: 'soc4',
component: 'InputNumber',
},
{
label: '能力5',
field: 'soc5',
component: 'InputNumber',
},
{
label: '能力6',
field: 'soc6',
component: 'InputNumber',
},
{
label: '能力7',
field: 'soc7',
component: 'InputNumber',
},
{
label: '能力8',
field: 'soc8',
component: 'InputNumber',
},
{
label: '能力9',
field: 'soc9',
component: 'InputNumber',
},
{
label: '能力10',
field: 'soc10',
component: 'InputNumber',
},
{
label: '能力11',
field: 'soc11',
component: 'InputNumber',
},
{
label: '能力12',
field: 'soc12',
component: 'InputNumber',
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
/**
* formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
}

@ -0,0 +1,177 @@
<template>
<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>
<!-- 表单区域 -->
<PersonalAbilityEvaluationModal @register="registerModal" @success="handleSuccess"></PersonalAbilityEvaluationModal>
</div>
</template>
<script lang="ts" name="abilityEvaluation-personalAbilityEvaluation" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import PersonalAbilityEvaluationModal from './components/PersonalAbilityEvaluationModal.vue'
import {columns, searchFormSchema} from './PersonalAbilityEvaluation.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './PersonalAbilityEvaluation.api';
import { downloadFile } from '/@/utils/common/renderUtils';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '个人能力评价',
api: list,
columns,
canResize:false,
formConfig: {
//labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToNumber: [
],
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
fixed:'right'
},
},
exportConfig: {
name:"个人能力评价",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
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: handleEdit.bind(null, record),
// }
{
label: '详情',
onClick: handleDetail.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

@ -0,0 +1,70 @@
<template>
<div style="min-height: 400px">
<BasicForm @register="registerForm"></BasicForm>
<div style="width: 100%;text-align: center" v-if="!formDisabled">
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary"> </a-button>
</div>
</div>
</template>
<script lang="ts">
import {BasicForm, useForm} from '/@/components/Form/index';
import {computed, defineComponent} from 'vue';
import {defHttp} from '/@/utils/http/axios';
import { propTypes } from '/@/utils/propTypes';
import {getBpmFormSchema} from '../PersonalAbilityEvaluation.data';
import {saveOrUpdate} from '../PersonalAbilityEvaluation.api';
export default defineComponent({
name: "PersonalAbilityEvaluationForm",
components:{
BasicForm
},
props:{
formData: propTypes.object.def({}),
formBpm: propTypes.bool.def(true),
},
setup(props){
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
labelWidth: 150,
schemas: getBpmFormSchema(props.formData),
showActionButtonGroup: false,
baseColProps: {span: 24}
});
const formDisabled = computed(()=>{
if(props.formData.disabled === false){
return false;
}
return true;
});
let formData = {};
const queryByIdUrl = '/abilityEvaluation/personalAbilityEvaluation/queryById';
async function initFormData(){
let params = {id: props.formData.dataId};
const data = await defHttp.get({url: queryByIdUrl, params});
formData = {...data}
//
await setFieldsValue(formData);
//
await setProps({disabled: formDisabled.value})
}
async function submitForm() {
let data = getFieldsValue();
let params = Object.assign({}, formData, data);
console.log('表单数据', params)
await saveOrUpdate(params, true)
}
initFormData();
return {
registerForm,
formDisabled,
submitForm,
}
}
});
</script>

@ -0,0 +1,66 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../PersonalAbilityEvaluation.data';
import {saveOrUpdate} from '../PersonalAbilityEvaluation.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
//labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: {span: 24}
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number){
width: 100%
}
:deep(.ant-calendar-picker){
width: 100%
}
</style>
Loading…
Cancel
Save