任务管理 问题修改 6.21

master
zhc077 1 year ago
parent 1feaec98bb
commit 6f804a3f7f
  1. 10
      ant-design-vue-jeecg/src/views/task/TaskList.vue
  2. 104
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue
  3. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java
  4. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java

@ -203,12 +203,12 @@ export default {
// }
},
// {
// title: '',
// title: '',
// align: "center",
// dataIndex: 'expectedEndTime',
// customRender: function (text) {
// return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
// }
// dataIndex: 'createTime',
// // customRender: function (text) {
// // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
// // }
// },
// {
// title:'',

@ -12,29 +12,30 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="任务层级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="level">
<!-- <j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"-->
<!-- dict-code="task_type_level" style="width: 100%">-->
<!-- </j-dict-select-tag>-->
<!-- <j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"-->
<!-- dict-code="task_type_level" style="width: 100%">-->
<!-- </j-dict-select-tag>-->
<j-dict-select-tag v-model="model.level" type="radio" style="width: 100%" dictCode="task_type_level"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<!-- <j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"-->
<!-- dict-code="task_type,type_name,id" :disabled="model.level==null">-->
<!-- </j-dict-select-tag>-->
<!-- <j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%" dict-code="task_type,type_name,id"/>-->
<el-tree
:props="typeId"
ref="treeList"
:load="this.loadData2"
check-strictly
show-checkbox
node-key='id'
@check ='changetree'
@check-change="handleCheckChange">
</el-tree>
<!-- <j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"-->
<!-- dict-code="task_type,type_name,id" :disabled="model.level==null">-->
<!-- </j-dict-select-tag>-->
<j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%"
dict-code="task_type,type_name,id"/>
<!---->
<!-- <el-tree-->
<!-- :props="typeId"-->
<!-- ref="treeList"-->
<!-- :load="this.loadData2"-->
<!-- check-strictly-->
<!-- show-checkbox-->
<!-- node-key='id'-->
<!-- @check ='changetree'-->
<!-- @check-change="handleCheckChange">-->
<!-- </el-tree>-->
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -100,35 +101,34 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.publishTime"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<!-- <j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
<!-- <j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.startTime"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedEndTime">
<!-- <j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
<!-- <j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.expectedEndTime"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="预计任务时长(天)" :labelCol="labelCol" :wrapperCol="wrapperCol"
<a-form-model-item label="预计任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedDuration">
<a-input-number v-model="model.expectedDuration" placeholder="请输入预计任务时长" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime">
<j-date placeholder="请选择提交时间" v-model="model.submitTime" style="width: 100%"/>
<!-- <j-date placeholder="请选择提交时间" v-model="model.submitTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.submitTime"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -182,8 +182,8 @@ export default {
model: {
workLevel: 2,
workStatus: 0,
startTime: new Date(),
expectedEndTime: new Date(),
startTime: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
expectedEndTime: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
expectedDuration: 1,
// curryUserName: '',
},
@ -247,6 +247,7 @@ export default {
formDisabled() {
return this.disabled
},
},
created() {
//model
@ -259,9 +260,8 @@ export default {
this.$refs.treeList.setCheckedNodes([data.id])
}
},
changetree(data,lst)
{
if(lst,checkedKeys.lenght==0)
changetree(data, lst) {
if (lst, checkedKeys.lenght == 0)
this.$refs.treeList.setCheckedNodes([data.id])
},
fillTaskName() {
@ -344,8 +344,42 @@ export default {
}
})
}
,
},
// currentTime() {
// var date = new Date();
// var year = date.getFullYear(); //0~11
// let month = date.getMonth();
// // console.log("month",month);
// var dateArr = [
// date.getMonth() + 1,
// date.getDate(),
// date.getHours(),
// date.getMinutes(),
// date.getSeconds(),
// ];
// //MMM
// for (var i = 0; i < dateArr.length; i++) {
// if (dateArr[i] >= 1 && dateArr[i] <= 9) {
// dateArr[i] = "0" + dateArr[i];
// }
// }
// var strDate =
// year +
// "-" +
// dateArr[0] +
// "-" +
// dateArr[1] +
// " " +
// dateArr[2] +
// ":" +
// dateArr[3] +
// ":" +
// dateArr[4];
// // strDate:2022-05-01 13:25:30
// this.model.startTime = strDate;
// this.model.expectedEndTime = strDate;
// console.log("strDate", strDate);
// },
loadData2() {
// if (!this.url.list) {
// this.$message.error("url.list!");

@ -94,8 +94,8 @@ public class TaskController extends JeecgController<Task, ITaskService> {
}
IPage<Task> pageList = taskService.page(page, queryWrapper);
pageList.getRecords().stream().forEach(e -> {
String startDate = DateUtils.date2Str(e.getStartTime(), new SimpleDateFormat("yyyy/MM/dd"));
String endDate = DateUtils.date2Str(e.getExpectedEndTime(), new SimpleDateFormat("yyyy/MM/dd"));
String startDate = DateUtils.date2Str(e.getStartTime(), new SimpleDateFormat("yyyy/MM/dd hh:mm:ss"));
String endDate = DateUtils.date2Str(e.getExpectedEndTime(), new SimpleDateFormat("yyyy/MM/dd hh:mm:ss"));
String startEndTime = startDate + "-" + endDate;
e.setStartEndTime(startEndTime);
Projectx projectx = iProjectxService.getById(e.getProjectId());

@ -133,25 +133,24 @@ public class Task implements Serializable {
/**
* 发布时间
*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "发布时间")
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private java.util.Date publishTime;
/**
* 开始时间
*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间")
private java.util.Date startTime;
/**
* 预计结束时间
*/
@Excel(name = "预计结束时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Excel(name = "预计结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "预计结束时间")
private java.util.Date expectedEndTime;
@ -169,9 +168,9 @@ public class Task implements Serializable {
/**
* 提交时间
*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间")
private java.util.Date submitTime;
/**

Loading…
Cancel
Save