Merge remote-tracking branch 'origin/master'

master
王家东 4 weeks ago
commit acb979cfff
  1. 37
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  2. 25
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java
  3. 2
      jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml
  4. 2
      jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml
  5. 4
      jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.api.ts
  6. 57
      jeecgboot-vue3/src/views/cooperationDepart/CooperationDepart.data.ts
  7. 150
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue
  8. 5
      jeecgboot-vue3/src/views/projectObjective/ProjectObjective.api.ts

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.project.controller; package org.jeecg.modules.demo.project.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -16,6 +17,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.modules.demo.departext.entity.DepartExt; import org.jeecg.modules.demo.departext.entity.DepartExt;
import org.jeecg.modules.demo.departext.service.IDepartExtService; import org.jeecg.modules.demo.departext.service.IDepartExtService;
import org.jeecg.modules.demo.project.dto.BasicInfoDto;
import org.jeecg.modules.demo.project.dto.DepartExtDto; import org.jeecg.modules.demo.project.dto.DepartExtDto;
import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto; import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto;
import org.jeecg.modules.demo.project.entity.Project; import org.jeecg.modules.demo.project.entity.Project;
@ -28,6 +30,7 @@ import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
import org.jeewx.api.core.util.DateUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -115,13 +118,43 @@ public class ProjectController extends JeecgController<Project, IProjectService>
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
project.setAnnualName(projectType.getAnnualName()); project.setAnnualName(projectType.getAnnualName());
project.setProjectTypeName(projectType.getTypeName()); project.setProjectTypeName(projectType.getTypeName());
SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode());
project.setDepartName(sysDepart.getDepartName());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
project.setProjectCharger(sysUser.getRealname());
return Result.OK(project);
}
@ApiOperation(value = "预算书-获取预算基本信息", notes = "预算书-获取预算基本信息")
@GetMapping(value = "/getBaseInfo")
public Result<BasicInfoDto> getBaseInfo(Project param, HttpServletRequest req) {
Project project = projectService.getById(param.getId());
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
project.setAnnualName(projectType.getAnnualName()); project.setAnnualName(projectType.getAnnualName());
project.setProjectTypeName(projectType.getTypeName()); project.setProjectTypeName(projectType.getTypeName());
SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode());
project.setDepartName(sysDepart.getDepartName()); project.setDepartName(sysDepart.getDepartName());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
project.setProjectCharger(sysUser.getRealname()); project.setProjectCharger(sysUser.getRealname());
return Result.OK(project);
UserExt userExt = iUserExtService.getOne(new LambdaQueryWrapper<UserExt>()
.eq(UserExt::getUserId, sysUser.getId())
.eq(UserExt::getProjectId, param.getId())
);
if (StrUtil.isNotBlank(sysUser.getPhone())) {
userExt.setPhone(sysUser.getPhone());
}
if (StrUtil.isNotBlank(sysUser.getEmail())) {
userExt.setEmail(sysUser.getEmail());
}
BasicInfoDto basicInfoDto = new BasicInfoDto();
BeanUtils.copyProperties(userExt, basicInfoDto);
BeanUtils.copyProperties(project, basicInfoDto);
basicInfoDto.setRealName(sysUser.getRealname());
basicInfoDto.setProjectTime(DateUtils.formatDate(project.getStartTime()) +"——"+DateUtils.formatDate(project.getEndTime()));
return Result.OK(basicInfoDto);
} }
@ApiOperation(value = "获取项目负责人信息", notes = "获取项目负责人信息") @ApiOperation(value = "获取项目负责人信息", notes = "获取项目负责人信息")
@ -134,7 +167,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
.eq(UserExt::getUserId, project.getProjectCharger()) .eq(UserExt::getUserId, project.getProjectCharger())
.eq(UserExt::getProjectId, para.getId()) .eq(UserExt::getProjectId, para.getId())
); );
userExt.setIdNO(sysUser.getId()); userExt.setIdNO(sysUser.getIdNo());
userExt.setPhone(sysUser.getPhone()); userExt.setPhone(sysUser.getPhone());
userExt.setEmail(sysUser.getEmail()); userExt.setEmail(sysUser.getEmail());
return Result.OK(userExt); return Result.OK(userExt);

@ -0,0 +1,25 @@
package org.jeecg.modules.demo.project.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description: TODO
* @Author: Z.H.C
* @CreateTime: 2024-10-27 11:56
* @Version: 1.0
*/
@Data
public class BasicInfoDto {
private String projectName;
// private String projectCharger;
private String projectTime;
private String idNO;
private String phone;
private String realName;
private String email;
private String title;;
}

@ -173,7 +173,7 @@ spring:
#driver-class-name: com.mysql.cj.jdbc.Driver #driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置 #redis 配置
redis: redis:
database: 5 database: 7
host: 182.92.169.222 host: 182.92.169.222
port: 6379 port: 6379
password: 'redis@ycwl2022.' password: 'redis@ycwl2022.'

@ -173,7 +173,7 @@ spring:
#driver-class-name: com.mysql.cj.jdbc.Driver #driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置 #redis 配置
redis: redis:
database: 5 database: 7
host: 182.92.169.222 host: 182.92.169.222
port: 6379 port: 6379
password: 'redis@ycwl2022.' password: 'redis@ycwl2022.'

@ -28,6 +28,10 @@ export const getImportUrl = Api.importExcel;
export const list = (params) => export const list = (params) =>
defHttp.get({url: Api.list, params}); defHttp.get({url: Api.list, params});
export const list2 = (params) =>
defHttp.get({url: Api.list, params});
/** /**
* 删除单个 * 删除单个
*/ */

@ -56,6 +56,63 @@ export const columns: BasicColumn[] = [
dataIndex: 'linkmanEmail' dataIndex: 'linkmanEmail'
},*/ },*/
]; ];
export const columns2: BasicColumn[] = [
{
title: '单位名称 ',
align: "center",
dataIndex: 'cooperationDepartName'
},
{
title: '主管部门',
align: "center",
dataIndex: 'competentDepartName'
},
{
title: '所属区域',
align: "center",
dataIndex: 'area_dictText'
},
{
title: '单位性质',
align:"center",
dataIndex: 'category_dictText'
},
{
title: '企业登记注册类型',
align:"center",
dataIndex: 'departType_dictText',
},
{
title: '统一社会信用代码',
align: "center",
dataIndex: 'creditCode',
},
{
title: '注册时间',
align:"center",
dataIndex: 'registerDate',
customRender:({text}) =>{
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
return text;
},
},
{
title: '联系人',
align: "center",
dataIndex: 'linkmanName'
},
{
title: '手机',
align: "center",
dataIndex: 'linkmanPhone'
},
/* {
title: '电子邮箱',
align:"center",
dataIndex: 'linkmanEmail'
},*/
];
// //
export const searchFormSchema: FormSchema[] = []; export const searchFormSchema: FormSchema[] = [];
// //

@ -1,26 +1,15 @@
<template> <template>
<div> <div v-if="falg">
<PageWrapper> <PageWrapper>
<Description <Description
title="项目基本信息" title="项目基本信息:"
:collapseOptions="{ canExpand: false, helpMessage: 'help me' }" :collapseOptions="{ canExpand: false}"
:column="2" :column="2"
:data="projectBaseInfoData" :data="projectBaseInfoData"
:schema="schema" :schema="schema"
/> />
<!-- <Description
class="mt-4"
title="垂直示例"
layout="vertical"
:collapseOptions="{ canExpand: false, helpMessage: 'help me' }"
:column="2"
:data="mockData"
:schema="schema"
/>-->
<Description @register="register" class="mt-4"/>
<Description @register="register1" class="mt-4"/>
</PageWrapper> </PageWrapper>
<BasicTable @register="registerTimeTable"/>
</div> </div>
<div> <div>
<!--引用表格--> <!--引用表格-->
@ -28,29 +17,29 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {onMounted} from 'vue'; import {ref} from 'vue';
import {DescItem, Description, useDescription} from '/@/components/Description/index'; import {Description} from '/@/components/Description/index';
import {PageWrapper} from '/@/components/Page'; import {PageWrapper} from '/@/components/Page';
import {BasicTable} from '/@/components/Table'; import {BasicTable, useTable} from '/@/components/Table';
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {getFengMian} from './FengMian.api';
import {useModal} from "@/components/Modal"; import {useModal} from "@/components/Modal";
import {useListPage} from "@/hooks/system/useListPage"; import {useListPage} from "@/hooks/system/useListPage";
import {columns} from "@/views/projectObjective/ProjectObjective.data"; import {columns} from "@/views/projectObjective/ProjectObjective.data";
import {list} from '@/views/projectObjective/ProjectObjective.api'; import {getBaseInfo, list} from '@/views/projectObjective/ProjectObjective.api';
import {columns2} from "@/views/cooperationDepart/CooperationDepart.data";
import {list2} from "@/views/cooperationDepart/CooperationDepart.api";
const route = useRoute(); const route = useRoute();
const falg = ref(false)
//model //model
const [registerModal, {openModal}] = useModal(); const [registerModal, {openModal}] = useModal();
//table //table
const {tableContext} = useListPage({ const {tableContext} = useListPage({
tableProps: { tableProps: {
title: '项目绩效目标及分年度目标:', title: '项目绩效目标及分年度目标:',
api: list, api: listProjectObjectiveByProjectId,
columns, columns,
canResize: false, canResize: false,
showTableSetting: false, showTableSetting: false,
@ -62,83 +51,88 @@ const {tableContext} = useListPage({
pagination: false, pagination: false,
} }
}) })
const [registerTable] = tableContext
async function listProjectObjectiveByProjectId() {
let params = {
projectId: route.query.id,
};
console.log(JSON.stringify(params));
return await list(params);
};
const [registerTable, {reload}, {rowSelection, selectedRowKeys}] = tableContext
const projectBaseInfoData: Recordable = { const [registerTimeTable] = useTable({
username: 'oooooo777', title: '主要合作单位:',
nickName: 'VB', columns: columns2,
age: '123', pagination: false,
phone: '15695909xxx', // dataSource: list,
email: '190848757@qq.com', api: listCooperationByProjectId,
addr: '厦门市思明区', showIndexColumn: false,
sex: '男', scroll: {y: 300},
certy: '3504256199xxxxxxxxx', });
tag: 'orange',
async function listCooperationByProjectId() {
let params = {
projectId: route.query.id,
};
console.log(JSON.stringify(params));
return await list2(params);
}; };
const mockData: Recordable = { const projectBaseInfoData: any = {
username: 'test', projectName: '',
nickName: 'VB', projectTime: '',
age: '123', phone: '',
phone: '15695909xxx', realName: '',
email: '190848757@qq.com', email: '',
addr: '厦门市思明区', title: '',
sex: '男',
certy: '3504256199xxxxxxxxx',
tag: 'orange',
}; };
const schema: DescItem[] = [
const schema: any = [
{ {
field: 'username', field: 'projectName',
label: '用户名', label: '项目名称',
}, },
{ {
field: 'nickName', field: 'projectTime',
label: '昵称', label: '项目实施时间',
render: (curVal, data) => {
return `${data.username}-${curVal}`;
},
}, },
{ {
field: 'phone', field: 'realName',
label: '联系电话', label: '项目负责人姓名',
}, },
{ {
field: 'email', field: 'email',
label: '邮箱', label: '项目负责人职称',
},
{
field: 'title',
label: '项目负责人职称',
}, },
{ {
field: 'addr', field: 'phone',
label: '地址', label: '项目负责人手机',
}, },
]; ];
const [register] = useDescription({
title: 'useDescription',
// data: mockData,
data: projectBaseInfoData,
schema: schema,
});
/*const [register1] = useDescription({
title: '无边框',
bordered: false,
data: mockData,
schema: schema,
});*/
async function getData() { async function getData() {
let params = { let params = {
id: route.query.id, id: route.query.id,
}; };
let obj = await getFengMian(params); let obj = await getBaseInfo(params);
console.log('data', JSON.stringify(obj)) // console.log('data', JSON.stringify(obj))
projectBaseInfoData.value = obj projectBaseInfoData.projectName = obj.projectName;
projectBaseInfoData.email = obj.email;
projectBaseInfoData.phone = obj.phone;
projectBaseInfoData.realName = obj.realName;
projectBaseInfoData.projectTime = obj.projectTime;
projectBaseInfoData.title = obj.title;
console.log('projectBaseInfoData', JSON.stringify(projectBaseInfoData))
falg.value = true
} }
onMounted(() => { getData();
getData()
});
</script> </script>

@ -5,6 +5,7 @@ const {createConfirm} = useMessage();
enum Api { enum Api {
list = '/projectObjective/projectObjective/list', list = '/projectObjective/projectObjective/list',
baseInfo = '/project/project/getBaseInfo',
save = '/projectObjective/projectObjective/add', save = '/projectObjective/projectObjective/add',
edit = '/projectObjective/projectObjective/edit', edit = '/projectObjective/projectObjective/edit',
deleteOne = '/projectObjective/projectObjective/delete', deleteOne = '/projectObjective/projectObjective/delete',
@ -29,6 +30,10 @@ export const getImportUrl = Api.importExcel;
export const list = (params) => export const list = (params) =>
defHttp.get({url: Api.list, params}); defHttp.get({url: Api.list, params});
export const getBaseInfo = (params) =>
defHttp.get({url: Api.baseInfo, params});
/** /**
* 删除单个 * 删除单个
*/ */

Loading…
Cancel
Save