master
Gitea 2 weeks ago
parent ef954b8b6d
commit d67c2d8071
  1. 9
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
  2. 21
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  3. 4
      jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
  4. 10
      jeecgboot-vue3/src/views/declarantUnit/depart.user.data.ts
  5. 448
      jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue

@ -151,7 +151,7 @@ public class SysDepartController {
/** /**
* @description: 根据当前登录角色查询 下级部门数据 * @description: 根据当前登录角色查询 下级部门数据
* @param: [parentId, ids, primaryKey] * @param: [parentId, ids, primaryKey]
* @return: org.jeecg.common.api.vo.Result<java.util.List<org.jeecg.modules.system.model.SysDepartTreeModel>> * @return: org.jeecg.common.api.vo.Result<java.util.List < org.jeecg.modules.system.model.SysDepartTreeModel>>
* @author: z.h.c * @author: z.h.c
* @date: 24/11/9 16:07 * @date: 24/11/9 16:07
*/ */
@ -174,7 +174,7 @@ public class SysDepartController {
/** /**
* @description: 法人注册时只显示市和县区科技局不显示下属单位 * @description: 法人注册时只显示市和县区科技局不显示下属单位
* @param: [parentId, ids, primaryKey] * @param: [parentId, ids, primaryKey]
* @return: org.jeecg.common.api.vo.Result<java.util.List<org.jeecg.modules.system.model.SysDepartTreeModel>> * @return: org.jeecg.common.api.vo.Result<java.util.List < org.jeecg.modules.system.model.SysDepartTreeModel>>
* @author: z.h.c * @author: z.h.c
* @date: 24/11/9 16:07 * @date: 24/11/9 16:07
*/ */
@ -244,8 +244,11 @@ public class SysDepartController {
//单位法人角色时,只查询自己部门 //单位法人角色时,只查询自己部门
if ("faren_admin".equals(user.getRoleCode())) { if ("faren_admin".equals(user.getRoleCode())) {
queryWrapper.eq("id", user.getOrgId()); queryWrapper.eq("id", user.getOrgId());
} else { // 查询下级部门 } else if ("quxian_admin".equals(user.getRoleCode())) {
queryWrapper.eq("parent_id", user.getOrgId()); queryWrapper.eq("parent_id", user.getOrgId());
} else if ("kejiju_admin".equals(user.getRoleCode())) {// 查询所有法人级部门
queryWrapper.ne("depart_name_abbr","null");
queryWrapper.ne("depart_name_abbr","");
} }
return sysDepartService.queryPageList(req, queryWrapper, pageSize, pageNo); return sysDepartService.queryPageList(req, queryWrapper, pageSize, pageNo);

@ -8,7 +8,6 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
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.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -166,7 +165,7 @@ public class SysUserController {
/** /**
* @description: 根据用户角色查询下属用户 * @description: 根据用户角色查询下属用户
* @param: [user, pageNo, pageSize, req] * @param: [user, pageNo, pageSize, req]
* @return: org.jeecg.common.api.vo.Result<com.baomidou.mybatisplus.core.metadata.IPage<org.jeecg.modules.system.entity.SysUser>> * @return: org.jeecg.common.api.vo.Result<com.baomidou.mybatisplus.core.metadata.IPage < org.jeecg.modules.system.entity.SysUser>>
* @author: z.h.c * @author: z.h.c
* @date: 24/11/8 15:19 * @date: 24/11/8 15:19
*/ */
@ -194,19 +193,15 @@ public class SysUserController {
public Result<IPage<SysUser>> getDeclarantList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, public Result<IPage<SysUser>> getDeclarantList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
user.setUserType("shenbaoren");
String roleCode = loginUser.getRoleCode(); String roleCode = loginUser.getRoleCode();
List<String> userIds = new LinkedList<>(); // List<String> userIds = new LinkedList<>();
//申报人是只查询自己 //申报人是只查询自己
if (StringUtils.equals(roleCode, "shenbaoren_role")) {
userIds.add(loginUser.getId());
} else if (StringUtils.equals(roleCode, "faren_admin")) {
List<SysUserDepart> departList = sysUserDepartService.list(new LambdaQueryWrapper<SysUserDepart>().eq(SysUserDepart::getDepId, loginUser.getOrgId()));
userIds = Optional.ofNullable(departList).orElse(new LinkedList<>()).stream().map(u -> u.getUserId()).collect(Collectors.toList());
}
user.setUserType("shenbaoren");
QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap()); QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
if (ObjectUtil.isNotEmpty(userIds)) { if (StringUtils.equals(roleCode, "shenbaoren_role")) {
queryWrapper.in("id", userIds); queryWrapper.eq("org_code", loginUser.getOrgCode());
} else {
queryWrapper.likeRight("org_code", loginUser.getOrgCode());
} }
return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo); return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo);
} }
@ -1967,7 +1962,7 @@ public class SysUserController {
SysDepart depart = sysDepartService.getById(departmentid); SysDepart depart = sysDepartService.getById(departmentid);
//所先部门状态为0时,说明该部门注册后未通过审核,申报人此时不能选择该部门注册 //所先部门状态为0时,说明该部门注册后未通过审核,申报人此时不能选择该部门注册
if(StringUtils.equals(depart.getStatus(),"0")){ if (StringUtils.equals(depart.getStatus(), "0")) {
throw new JeecgBootException("该单位未通过审核,暂时不能注册为该单位申报人"); throw new JeecgBootException("该单位未通过审核,暂时不能注册为该单位申报人");
} }

@ -182,7 +182,7 @@
// }, // },
{ {
label: '驳回', label: '驳回',
ifShow: userStore.getUserInfo.roleCode !='faren_admin' && record.status == 1, ifShow: userStore.getUserInfo.roleCode =='quxian_admin' && record.status == 1,
popConfirm: { popConfirm: {
title: '确定驳回吗?', title: '确定驳回吗?',
confirm: handleFrozen.bind(null, record, 0), confirm: handleFrozen.bind(null, record, 0),
@ -190,7 +190,7 @@
}, },
{ {
label: '通过', label: '通过',
ifShow: userStore.getUserInfo.roleCode !='faren_admin' && record.status == 0, ifShow: userStore.getUserInfo.roleCode =='quxian_admin' && record.status == 0,
popConfirm: { popConfirm: {
title: '确定通过吗?', title: '确定通过吗?',
confirm: handleFrozen.bind(null, record, 1), confirm: handleFrozen.bind(null, record, 1),

@ -15,11 +15,11 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'departNameAbbr', dataIndex: 'departNameAbbr',
}, },
{ /* {
title: '编码', title: '编码',
align:"center", align:"center",
dataIndex: 'orgCode' dataIndex: 'orgCode'
}, },*/
{ {
title: '手机号', title: '手机号',
align:"center", align:"center",

@ -4,10 +4,10 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>-->
<!-- <a-button type="primary" @click="go_xinjianshenbao" preIcon="ant-design:plus-outlined"> 新建报书</a-button>--> <!-- <a-button type="primary" @click="go_xinjianshenbao" preIcon="ant-design:plus-outlined"> 新建报书</a-button>-->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" v-auth="'project:project:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> <!-- <j-upload-button type="primary" v-auth="'project:project:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<a-dropdown> <a-dropdown>
<template #overlay> <template #overlay>
<a-menu> <a-menu>
@ -15,13 +15,16 @@
<Icon icon="ant-design:plus-outlined"></Icon> <Icon icon="ant-design:plus-outlined"></Icon>
科技攻关 科技攻关
</a-menu-item> </a-menu-item>
<!-- <a-menu-item v-for="opt of RANGE_OPTIONS" :key="opt.key">
{{ opt.label }}
</a-menu-item>-->
<!--<a-menu-item key="1" @click="go_xinjianshenbao"> <!--<a-menu-item key="1" @click="go_xinjianshenbao">
<Icon icon="ant-design:plus-outlined"></Icon> <Icon icon="ant-design:plus-outlined"></Icon>
xxx xxx
</a-menu-item>--> </a-menu-item>-->
</a-menu> </a-menu>
</template> </template>
<a-button type="primary">新建 <a-button type="primary">新建
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
@ -43,203 +46,264 @@
<script lang="ts" name="project-project" setup> <script lang="ts" name="project-project" setup>
import {ref, reactive, computed, unref, onMounted} from 'vue'; import {ref, reactive, computed, unref, onMounted} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table'; import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal'; import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage' import { useListPage } from '/@/hooks/system/useListPage'
import ProjectModal from './components/ProjectModal.vue' import ProjectModal from './components/ProjectModal.vue'
import {columns, searchFormSchema, superQuerySchema} from './Project.data'; import {columns, searchFormSchema, superQuerySchema} from './Project.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './Project.api'; import {
import { downloadFile } from '/@/utils/common/renderUtils'; list,
import { useGo } from '/@/hooks/web/usePage'; deleteOne,
rollbackOne,
import { useUserStore } from '/@/store/modules/user'; submitOne,
import {getUserData} from "@/views/system/usersetting/UserSetting.api"; batchDelete,
const go = useGo(); getImportUrl,
getExportUrl,
const queryParam = reactive<any>({}); getProjectTypeList
const checkedKeys = ref<Array<string | number>>([]); } from './Project.api';
const userStore = useUserStore(); import { downloadFile } from '/@/utils/common/renderUtils';
//model import { useGo } from '/@/hooks/web/usePage';
const [registerModal, {openModal}] = useModal();
//table import { useUserStore } from '/@/store/modules/user';
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ import {getUserData} from "@/views/system/usersetting/UserSetting.api";
tableProps:{ import {useTimeoutFn} from "@/hooks/core/useTimeout";
title: '项目表', const go = useGo();
api: list,
columns, const queryParam = reactive<any>({});
canResize:false, const checkedKeys = ref<Array<string | number>>([]);
formConfig: { const userStore = useUserStore();
//labelWidth: 120, //model
schemas: searchFormSchema, const [registerModal, {openModal}] = useModal();
autoSubmitOnEnter:true, const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
showAdvancedButton:true, tableProps:{
fieldMapToNumber: [ title: '项目表',
], api: list,
fieldMapToTime: [ columns,
], canResize:false,
}, formConfig: {
actionColumn: { //labelWidth: 120,
width: 280, schemas: searchFormSchema,
fixed:'right' autoSubmitOnEnter:true,
}, showAdvancedButton:true,
beforeFetch: (params) => { fieldMapToNumber: [
return Object.assign(params, queryParam); ],
}, fieldMapToTime: [
}, ],
exportConfig: { },
name:"项目表", actionColumn: {
url: getExportUrl, width: 380,
params: queryParam, fixed:'right'
}, },
importConfig: { beforeFetch: (params) => {
url: getImportUrl, return Object.assign(params, queryParam);
success: handleSuccess },
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
reload();
}
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
//
function go_xinjianshenbao() {
// go('/comp/jeecg/basic');
go('/projectApplication/index');
}
//
function go_xiangmushu(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/xiangmushu?id='+record.id);
}
//
function go_yusuanshu(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/xiangmushu?id='+record.id);
}
/**
* 编辑事件
*/
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){
const actions = [
{
label: '项目书',
onClick: go_xiangmushu.bind(null, record),
// auth: 'projecttype:project_type:edit'
}, },
{ exportConfig: {
label: '预算书', name:"项目表",
onClick: go_yusuanshu.bind(null, record), url: getExportUrl,
// auth: 'projecttype:project_type:edit' params: queryParam,
}, },
{ importConfig: {
label: '详情', url: getImportUrl,
onClick: handleDetail.bind(null, record), success: handleSuccess
}, },
{ })
label: '删除',
popConfirm: { //
title: '是否确认删除', //
confirm: handleDelete.bind(null, record), const RANGE_OPTIONS = [
placement: 'topLeft', {key: 'TODAY', label: '今天'},
{key: 'YESTERDAY', label: '昨天'},
{key: 'TOMORROW', label: '明天'},
{key: 'THIS_WEEK', label: '本周'},
{key: 'LAST_WEEK', label: '上周'},
{key: 'NEXT_WEEK', label: '下周'},
{key: 'LAST_7_DAYS', label: '过去七天'},
{key: 'THIS_MONTH', label: '本月'},
{key: 'LAST_MONTH', label: '上月'},
{key: 'NEXT_MONTH', label: '下月'},
];
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
reload();
}
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
//
function go_xinjianshenbao() {
// go('/comp/jeecg/basic');
go('/projectApplication/index?projectTypeId='+'1846744340708184065');
}
//
function go_xiangmushu(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/xiangmushu?id='+record.id);
}
//
function go_yusuanshu(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/yusuanshu?id='+record.id);
}
function go_projectLog(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectLog/projectLogList?id='+record.id);
}
/**
* 编辑事件
*/
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 handleSubmitOne(record) {
await submitOne({id: record.id}, handleSuccess);
}
//
async function handleRollbackOne(record) {
await rollbackOne({id: record.id}, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record){
const actions = [
{
label: '项目书',
onClick: go_xiangmushu.bind(null, record),
// auth: 'projecttype:project_type:edit'
}, },
// auth: 'projecttype:project_type:delete' {
}]; label: '预算书',
// onClick: go_yusuanshu.bind(null, record),
if (record.projectStatus == 5) { // auth: 'projecttype:project_type:edit'
actions.unshift({
label: '编辑',
onClick: handleEdit.bind(null, record),
});
}
return actions;
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
}, },
auth: 'project:project:delete' {
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '日志查询',
onClick: go_projectLog.bind(null, record),
}
];
//()
if (record.projectStatus == 5) {
actions.unshift({
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
});
}
if (record.projectStatus == 5) {
actions.unshift({
label: '提交项目',
onClick: handleSubmitOne.bind(null, record),
});
}
//projectStatus
//('', '1');
//('', '2');
//('', '3');
//('', '4');
//('', '5');
//('', '6');
//('', '7');
//('', '8');
if (record.projectStatus ==6) {
actions.unshift({
label: '取回项目',
onClick: handleRollbackOne.bind(null, record),
});
} }
] return actions;
} }
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'project:project:delete'
}
]
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-picker),:deep(.ant-input-number){ :deep(.ant-picker),:deep(.ant-input-number){
width: 100%; width: 100%;
} }
</style> </style>

Loading…
Cancel
Save