任务管理 问题修改 6.21

master
zhc077 1 year ago
parent 1feaec98bb
commit 6f804a3f7f
  1. 10
      ant-design-vue-jeecg/src/views/task/TaskList.vue
  2. 108
      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", // align: "center",
// dataIndex: 'expectedEndTime', // dataIndex: 'createTime',
// customRender: function (text) { // // customRender: function (text) {
// return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) // // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
// } // // }
// }, // },
// { // {
// title:'', // title:'',

@ -12,29 +12,30 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="任务层级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="level"> <a-form-model-item label="任务层级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="level">
<!-- <j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"--> <!-- <j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"-->
<!-- dict-code="task_type_level" style="width: 100%">--> <!-- dict-code="task_type_level" style="width: 100%">-->
<!-- </j-dict-select-tag>--> <!-- </j-dict-select-tag>-->
<j-dict-select-tag v-model="model.level" type="radio" style="width: 100%" dictCode="task_type_level"/> <j-dict-select-tag v-model="model.level" type="radio" style="width: 100%" dictCode="task_type_level"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<!-- <j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"--> <!-- <j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"-->
<!-- dict-code="task_type,type_name,id" :disabled="model.level==null">--> <!-- dict-code="task_type,type_name,id" :disabled="model.level==null">-->
<!-- </j-dict-select-tag>--> <!-- </j-dict-select-tag>-->
<!-- <j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%" dict-code="task_type,type_name,id"/>--> <j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%"
dict-code="task_type,type_name,id"/>
<el-tree <!---->
:props="typeId" <!-- <el-tree-->
ref="treeList" <!-- :props="typeId"-->
:load="this.loadData2" <!-- ref="treeList"-->
check-strictly <!-- :load="this.loadData2"-->
show-checkbox <!-- check-strictly-->
node-key='id' <!-- show-checkbox-->
@check ='changetree' <!-- node-key='id'-->
@check-change="handleCheckChange"> <!-- @check ='changetree'-->
</el-tree> <!-- @check-change="handleCheckChange">-->
<!-- </el-tree>-->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -85,7 +86,7 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel"> <a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel">
<!-- <a-input-number :min="1" :max="16" v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />--> <!-- <a-input-number :min="1" :max="16" v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />-->
<j-dict-select-tag v-model="model.workLevel" type="radio" placeholder="请选择任务等级" <j-dict-select-tag v-model="model.workLevel" type="radio" placeholder="请选择任务等级"
dict-code="workLevel" style="width: 100%"> dict-code="workLevel" style="width: 100%">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
@ -100,35 +101,34 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime"> <a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%"/>--> <!-- <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" /> <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.publishTime"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<!-- <j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%"/>--> <!-- <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" /> <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.startTime"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" <a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedEndTime"> prop="expectedEndTime">
<!-- <j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>--> <!-- <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" /> <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.expectedEndTime"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="预计任务时长(天)" :labelCol="labelCol" :wrapperCol="wrapperCol" <a-form-model-item label="预计任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedDuration"> prop="expectedDuration">
<a-input-number v-model="model.expectedDuration" placeholder="请输入预计任务时长" style="width: 100%"/> <a-input-number v-model="model.expectedDuration" placeholder="请输入预计任务时长" style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime"> <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-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -148,7 +148,7 @@
<a-form-model-item label="任务描述" style="width: 700px" prop="taskDescribe"> <a-form-model-item label="任务描述" style="width: 700px" prop="taskDescribe">
<a-input type="textarea" v-model="model.taskDescribe" :rows="2"/> <a-input type="textarea" v-model="model.taskDescribe" :rows="2"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
@ -182,8 +182,8 @@ export default {
model: { model: {
workLevel: 2, workLevel: 2,
workStatus: 0, workStatus: 0,
startTime: new Date(), startTime: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
expectedEndTime: new Date(), expectedEndTime: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
expectedDuration: 1, expectedDuration: 1,
// curryUserName: '', // curryUserName: '',
}, },
@ -247,6 +247,7 @@ export default {
formDisabled() { formDisabled() {
return this.disabled return this.disabled
}, },
}, },
created() { created() {
//model //model
@ -259,9 +260,8 @@ export default {
this.$refs.treeList.setCheckedNodes([data.id]) this.$refs.treeList.setCheckedNodes([data.id])
} }
}, },
changetree(data,lst) changetree(data, lst) {
{ if (lst, checkedKeys.lenght == 0)
if(lst,checkedKeys.lenght==0)
this.$refs.treeList.setCheckedNodes([data.id]) this.$refs.treeList.setCheckedNodes([data.id])
}, },
fillTaskName() { 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() { loadData2() {
// if (!this.url.list) { // if (!this.url.list) {
// this.$message.error("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); IPage<Task> pageList = taskService.page(page, queryWrapper);
pageList.getRecords().stream().forEach(e -> { pageList.getRecords().stream().forEach(e -> {
String startDate = DateUtils.date2Str(e.getStartTime(), 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")); String endDate = DateUtils.date2Str(e.getExpectedEndTime(), new SimpleDateFormat("yyyy/MM/dd hh:mm:ss"));
String startEndTime = startDate + "-" + endDate; String startEndTime = startDate + "-" + endDate;
e.setStartEndTime(startEndTime); e.setStartEndTime(startEndTime);
Projectx projectx = iProjectxService.getById(e.getProjectId()); Projectx projectx = iProjectxService.getById(e.getProjectId());

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

Loading…
Cancel
Save