Merge branch 'dev_4newlayout' of http://182.92.169.222:3000/zhc077/projectManagement into dev_4newlayout

dev_4newlayout
deng 1 year ago
commit 6e6bddabd7
  1. 1
      ant-design-vue-jeecg/src/permission.js
  2. 62
      ant-design-vue-jeecg/src/views/newLayout/module/Main.vue
  3. 13
      ant-design-vue-jeecg/src/views/task/TaskList.vue
  4. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
  5. 108
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java
  6. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java

@ -30,6 +30,7 @@ const whiteList = [
'/cms/major',
'/cms/detail',
'/newLayout/dayu',
'/home/lnfo'
] // no redirect whitelist
router.beforeEach((to, from, next) => {

@ -73,6 +73,7 @@
<i
class="el-icon-office-building"
@click="dialogFormVisible = true"
@click.stop.prevent="openCollapse()"
style="background-color: #2147fb; margin-right: 15px; color: #ffffff"
></i>
<i class="el-icon-coin" style="background-color: #2147fb; margin-right: 15px; color: #ffffff"></i>
@ -81,10 +82,19 @@
<div class="toxiang" style="margin-right: 10px"></div>
<span class="zhangsan" style="margin-right: 15px">{{ item.managerUsers_dictText }}</span>
<span class="zhangsan">截止时间{{ item.submitTime }}</span>
<div class="top-right2">
<i class="el-icon-edit" style="margin-right: 5px"></i>
<i class="el-icon-circle-plus-outline" style="margin-right: 5px"></i>
<i
class="el-icon-edit"
@click.stop.prevent="openCollapse()"
@click="handleEdit1()"
style="margin-right: 5px"
></i>
<i
class="el-icon-circle-plus-outline"
@click.stop.prevent="openCollapse()"
@click="handleAdd1()"
style="margin-right: 5px"
></i>
<i class="el-icon-chat-dot-round" @click="dialogKuiVisible = true" style="margin-right: 15px"></i>
</div>
<img
@ -98,7 +108,7 @@
</div>
</div>
</template>
<!-- 这是二级模块 -->
<!-- 这是二级模块 -->
<!-- <div class="top">
<i class="el-icon-s-fold" style="margin-left: 15px"></i>
<span class="mkuai-text" style="margin-left: 15px">子模块2.1 账号管理</span>
@ -164,7 +174,6 @@
<i class="el-icon-circle-plus-outline" style="margin-right: 5px"></i>
<i class="el-icon-chat-dot-round" style="margin-right: 15px"></i>
</div>
<div class="wt-buttom">
<el-radio v-model="radio" style="margin-right: 15px; transform: scale(0.7)" label="1"
>已解决</el-radio
@ -202,7 +211,7 @@
</el-dialog>
<!-- 展示表单 原型 Dialog-->
<el-dialog title="上传/查看原型图" :visible.sync="dialogFormVisible">
<el-dialog title="查看原型图" :visible.sync="dialogFormVisible">
<div class="yuanxing">
<el-image :src="src"></el-image>
<div class="yuanxing-buttom">原型主图示意</div>
@ -224,16 +233,23 @@
</div>
</el-dialog>
<modulex-modal ref="modalForm"></modulex-modal>
<functionx-modal ref="modalForm1" @ok="modalFormOk"></functionx-modal>
<rulex-modal ref="modalForm2" @ok="modalFormOk"></rulex-modal>
</div>
</template>
<script>
import { getAction } from "@api/manage"
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ModulexModal from '@views/modulex/modules/ModulexModal.vue'
import FunctionxModal from '@views/functionx/modules/FunctionxModal.vue'
import RulexModal from '@views/rulex/modules/RulexModal.vue'
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: 'Main',
mixins: [JeecgListMixin, mixinDevice],
data () {
return {
msg: [],
@ -424,12 +440,37 @@ export default {
this.getData1()
},
methods: {
handleAdd: function () {
openCollapse () {
console.log('阻止冒泡 @click.stop.prevent')
},
handleAdd () {
this.$refs.modalForm.add()
this.$refs.modalForm.title = "新增"
this.$refs.modalForm.disableSubmit = false
},
change: function (index) {
handleAdd1 () {
this.$refs.modalForm1.add()
this.$refs.modalForm1.title = "新增"
this.$refs.modalForm1.disableSubmit = false
},
handleEdit1 () {
this.$refs.modalForm1.edit()
this.$refs.modalForm1.title = "编辑"
this.$refs.modalForm1.disableSubmit = false
},
//
// handleAdd2 () {
// this.$refs.modalForm2.add()
// this.$refs.modalForm2.title = ""
// this.$refs.modalForm2.disableSubmit = false
// },
// handleEdit1 () {
// this.$refs.modalForm2.edit()
// this.$refs.modalForm2.title = ""
// this.$refs.modalForm2.disableSubmit = false
// },
change (index) {
this.number = index
},
handleClick (tab, event) {
@ -440,6 +481,7 @@ export default {
// console.log('wwwwwww', this.tabActiveName)
getAction('newprojectx/newprojectx/queryById', { id: this.tabActiveName }).then((res) => {
if (res.success) {
console.log(res)
this.detailList = res.result
this.companyList = res.result.moduleDtoList
res.result.moduleDtoList.forEach((element) => {
@ -478,7 +520,9 @@ export default {
components: {
// Msg
ModulexModal
ModulexModal,
FunctionxModal,
RulexModal
}
}

@ -42,9 +42,18 @@
<j-input placeholder="" v-model="queryParam.taskName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-col :md="4" :sm="12">
<a-form-item label="责任人">
<j-input placeholder="" v-model="queryParam.userName"></j-input>
<j-dict-select-tag v-model="queryParam.managerUsers" placeholder="请选责任人"
dict-code="sys_user,realname,id"
style="width: 100%"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="日期">
<j-dict-select-tag v-model="queryParam.time" placeholder="请选择日期"
dict-code="task_time_status"
style="width: 100%"></j-dict-select-tag>
</a-form-item>
</a-col>

@ -28,7 +28,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 功能管理
@ -284,8 +283,8 @@ public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx
List<BugDto> bugDtoList =
bugxService.queryBugDtoListByFunctionId(functionDto);
// 功能对应的bug_type为2
bugDtoList = bugDtoList.stream().filter(bugDto ->
bugDto.getType().equals(2)).collect(Collectors.toList());
/* bugDtoList = bugDtoList.stream().filter(bugDto ->
bugDto.getType().equals(2)).collect(Collectors.toList());*/
functionDto.setBugDtoList(bugDtoList);
functionDtoList.add(functionDto);

@ -30,6 +30,8 @@ import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.task.entity.Task;
import org.jeecg.modules.task.service.ITaskService;
import org.jeecg.modules.taskType.entity.TaskType;
import org.jeecg.modules.taskType.service.ITaskTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -37,11 +39,9 @@ import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.*;
/**
* @Description: 任务管理
@ -76,6 +76,9 @@ public class TaskController extends JeecgController<Task, ITaskService> {
@Resource
private IRulexService iRulexService;
@Resource
private ITaskTypeService taskTypeService;
/**
* 分页列表查询
*
@ -89,11 +92,12 @@ public class TaskController extends JeecgController<Task, ITaskService> {
@ApiOperation(value = "任务管理-分页列表查询", notes = "任务管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Task task,
@RequestParam(name = "type",required = false) List<String> type,
@RequestParam(name = "type", required = false) List<String> type,
@RequestParam(name = "userName", defaultValue = "") String userName,
@RequestParam(name = "time", required = false) Integer time,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req) throws ParseException {
QueryWrapper<Task> queryWrapper = new QueryWrapper<>();
Page<Task> page = new Page<Task>(pageNo, pageSize);
@ -109,16 +113,79 @@ public class TaskController extends JeecgController<Task, ITaskService> {
qw.or();
}
});
List<SysUser> sysUsers = taskService.UserIdByUserName(userName);
if (sysUsers != null && sysUsers.size() > 0)
queryWrapper.and(qw -> {
for (int i = 0; i < sysUsers.size(); i++) {
qw.like("manager_users", sysUsers.get(i).getId());
if (i != sysUsers.size() - 1)
qw.or();
// projectId
Calendar now = Calendar.getInstance();
int year = now.get(Calendar.YEAR);
int month = now.get(Calendar.MONTH) + 1;
int day = now.get(Calendar.DAY_OF_MONTH);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (time != null) {
switch (time) {
case 1: {//当前天
Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00");
Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59");
queryWrapper.ge("start_time", startTime);
queryWrapper.le("start_time", endTime);
break;
}
});
case 2: {//当前周
Calendar now1 = Calendar.getInstance();
now1.set(Calendar.DAY_OF_WEEK, 2);
int year1 = now1.get(Calendar.YEAR);
int month1 = now1.get(Calendar.MONTH) + 1;
int day1 = now1.get(Calendar.DAY_OF_MONTH);
now1.set(Calendar.DATE, now1.get(Calendar.DATE) + 6);
int year2 = now1.get(Calendar.YEAR);
int month2 = now1.get(Calendar.MONTH) + 1;
int day2 = now1.get(Calendar.DAY_OF_MONTH);
Date startTime = sdf.parse(year1 + "-" + month1 + "-" + day1 + " 00:00:00");
Date endTime = sdf.parse(year2 + "-" + month2 + "-" + day2 + " 23:59:59");
queryWrapper.ge("start_time", startTime);
queryWrapper.le("start_time", endTime);
}
case 3: {//当前月
int minDay = now.getActualMinimum(Calendar.DAY_OF_MONTH);
int lastDay = now.getActualMaximum(Calendar.DAY_OF_MONTH);
Date startTime = sdf.parse(year + "-" + month + "-" + minDay + " 00:00:00");
Date endTime = sdf.parse(year + "-" + month + "-" + lastDay + " 23:59:59");
queryWrapper.ge("start_time", startTime);
queryWrapper.le("start_time", endTime);
break;
}
// case 4: {
// Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00");
// Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59");
// queryWrapper.ge("create_time", startTime);
// queryWrapper.le("create_time", endTime);
// break;
// }
}
}
if (task != null && StringUtils.isNotBlank(task.getModuleId())) {
String moduleId = task.getModuleId();
queryWrapper.like("module_id", moduleId);
}
if (task != null && StringUtils.isNotBlank(task.getProjectId())) {
String projectId = task.getProjectId();
queryWrapper.like("project_id", projectId);
}
if (task != null && StringUtils.isNotBlank(task.getTypeId())) {
String typeId = task.getTypeId();
queryWrapper.like("type_id", typeId);
}
if (task != null && StringUtils.isNotBlank(task.getManagerUsers())) {
String managerUsers = task.getManagerUsers();
queryWrapper.like("manager_users", managerUsers);
}
// List<SysUser> sysUsers = taskService.UserIdByUserName(userName);
// queryWrapper.and(qw -> {
// for (int i = 0; i < sysUsers.size(); i++) {
// qw.like("manager_users", sysUsers.get(i).getId());
// if (i != sysUsers.size() - 1)
// qw.or();
// }
// });
if (task != null && StringUtils.isNotBlank(task.getTaskName())) {
String tas = task.getTaskName();
if (tas.startsWith("*") && tas.endsWith("*"))
@ -127,9 +194,10 @@ public class TaskController extends JeecgController<Task, ITaskService> {
}
if (task != null && task.getWorkStatus() != null && (task.getWorkStatus() == 0 || task.getWorkStatus() == 1)) {
queryWrapper.in("work_status", 0, 1);
}
if (task != null && task.getWorkStatus() != null && (task.getWorkStatus() == 2 || task.getWorkStatus() == 9)) {
} else if (task != null && task.getWorkStatus() != null && (task.getWorkStatus() == 2 || task.getWorkStatus() == 9)) {
queryWrapper.in("work_status", 2, 9);
} else if (task != null && task.getWorkStatus() != null) {
queryWrapper.eq("work_status", task.getWorkStatus());
}
queryWrapper.orderByDesc("update_time");
IPage<Task> pageList = taskService.page(page, queryWrapper);
@ -158,6 +226,12 @@ public class TaskController extends JeecgController<Task, ITaskService> {
e.setUpperTaskName(taskUpper.getTaskName());
}
}
if (StringUtils.isNotBlank(e.getTypeId())) {
TaskType taskType = taskTypeService.getById(e.getTypeId());
if (ObjectUtils.isNotEmpty(taskType)) {
e.setTypePid(taskType.getPid());
}
}
if (e.getTaskFile() != null && !e.getTaskFile().equals("")) {
e.setContentType("file");
} else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) {

@ -97,6 +97,7 @@ public class Task implements Serializable {
*/
@Excel(name = "模块id", width = 15)
@ApiModelProperty(value = "模块id")
@Dict(dictTable = "modulex", dicText = "module_name",dicCode = "id")
private java.lang.String moduleId;
/**
* 功能id
@ -117,6 +118,13 @@ public class Task implements Serializable {
@ApiModelProperty(value = "任务类型id")
@Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
private java.lang.String typeId;
/**
* 任务类型父id
*/
@TableField(exist = false)
@Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
private java.lang.String typePid;
/**
* 责任人
*/

Loading…
Cancel
Save