From 6c02c3f1a2c80d33a836c682baac3ebabc5b3ee4 Mon Sep 17 00:00:00 2001 From: chengyufei <1932574737@qq.com> Date: Mon, 17 Jul 2023 18:27:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=AD=E6=96=B0=E5=A2=9E=E6=8C=89=E9=92=AE2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/functionx/modules/FunctionxForm.vue | 21 ++++++++++++++- .../modules/FunctionxModal__Style#Drawer.vue | 6 +++++ .../src/views/rulex/modules/RulexForm.vue | 11 ++++++++ .../modules/RulexModal__Style#Drawer.vue | 6 +++++ .../src/views/task/modules/TaskForm.vue | 27 ++++++++++++------- .../jeecg/common/constant/CommonConstant.java | 2 +- .../task/controller/TaskController.java | 15 ++++++++++- 7 files changed, 75 insertions(+), 13 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue index 9000645..1b0c274 100644 --- a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue +++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue @@ -398,9 +398,11 @@ export default { }, url: { add: '/functionx/functionx/add', + add1: '/functionx/functionx/add', edit: '/functionx/functionx/edit', queryById: '/functionx/functionx/queryById', - bianma: '/functionx/functionx/bianma' + bianma: '/functionx/functionx/bianma', + getmoduleid:"/modulex/modulex/queryById" }, moduleid: '', modulecode: '' @@ -451,6 +453,23 @@ export default { add() { this.edit(this.modelDefault) }, + + add1 (moduleId) { + console.log(moduleId+"--------------------") + getAction(this.url.getmoduleid,{id:moduleId}).then((res)=>{ + + if (res.success) { + this.moduleid=res.result.id; + this.model.moduleId=res.result.id; + //获得模块编码 + this.modulebianma(this.moduleid); + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + this.edit(this.modelDefault); + }else{ + this.$message.warning(res.message); + } + }); + }, edit(record) { this.model = Object.assign({}, record) if (this.model.functionName1 != null) { diff --git a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue index 867d695..0ff80fa 100644 --- a/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue +++ b/ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue @@ -39,6 +39,12 @@ this.$refs.realForm.add(); }) }, + add1 (moduleId) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add1(moduleId); + }) + }, edit (record) { this.visible=true this.$nextTick(()=>{ diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue b/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue index c1fcfb2..d90a3e5 100644 --- a/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue +++ b/ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue @@ -216,6 +216,17 @@ export default { add() { this.edit(this.modelDefault); }, + add1(functionId,moduleId) { + this.functionId=functionId; + this.model.functionId=functionId; + this.moduleId=moduleId; + this.model.moduleId=moduleId; + this.sort(); + this.shiti(); + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + this.edit(this.modelDefault); + + }, edit(record) { this.model = Object.assign({}, record); this.visible = true; diff --git a/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue index 7827922..0fb99ea 100644 --- a/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue +++ b/ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue @@ -39,6 +39,12 @@ this.$refs.realForm.add(); }) }, + add1 (functionId,moduleId) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add1(functionId,moduleId); + }) + }, edit (record) { this.visible=true this.$nextTick(()=>{ diff --git a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue index 746dce7..e8f8569 100644 --- a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue +++ b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue @@ -104,7 +104,7 @@ - + @@ -112,7 +112,7 @@ - + @@ -194,7 +194,7 @@ import JMultiSelectTag from "@/components/dict/JMultiSelectTag" import TaskModal from "@views/task/modules/TaskModal.vue"; import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {mixinDevice} from "@/utils/mixin"; -import modulexModal from "@views/modulex/modules/ModulexModal.vue"; +import modulexModal from "@views/modulex/modules/ModulexModal__Style#Drawer.vue"; import FunctionxModal from "@views/functionx/modules/FunctionxModal__Style#Drawer.vue"; import RulexModal from "@views/rulex/modules/RulexModal__Style#Drawer.vue"; @@ -399,13 +399,20 @@ export default { this.$refs.modalForm3.title = "新增"; this.$refs.modalForm3.disableSubmit = false; }, - handleAdd1: function () { - this.$refs.modalForm1.add(); - this.$refs.modalForm1.title = "新增"; - this.$refs.modalForm1.disableSubmit = false; - }, - handleAdd2: function () { - this.$refs.modalForm2.add(); + // handleAdd1: function (moduleId) { + // console.log(this.moduleId,'1111') + // this.$refs.modalForm1.add(); + // this.$refs.modalForm1.title = "新增"; + // this.$refs.modalForm1.disableSubmit = false; + // }, + handleAdd1(moduleId){ + console.log(moduleId+"22222222222222") + this.$refs.modalForm1.add1(moduleId) + this.$refs.modalForm1.title = "新增"; + this.$refs.modalForm1.disableSubmit = false; + }, + handleAdd2: function (functionId,moduleId) { + this.$refs.modalForm2.add1(functionId,moduleId); this.$refs.modalForm2.title = "新增"; this.$refs.modalForm2.disableSubmit = false; }, diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java index 0175d0f..152ebec 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java @@ -198,7 +198,7 @@ public interface CommonConstant { public static final String ONLINE_PARAM_VAL_IS_FALSE = "N"; /** - * 文件上传类型(本地:local,Minio:minio,阿里云:alioss) + * 文件上传类型(本地:local,:Miniominio,阿里云:alioss) */ public static final String UPLOAD_TYPE_LOCAL = "local"; public static final String UPLOAD_TYPE_MINIO = "minio"; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java index bd96289..b405c25 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java @@ -178,10 +178,23 @@ public class TaskController extends JeecgController { return Result.OK("编辑成功!"); } + /** + * 提交任务,更新状态,同时计算实际任务时长 + * 计算一整天、一上午、一下午的工作时间;计算有多个个这样的整段时间,之后算头和尾时间 + * @param task + * @return + */ @ApiOperation(value = "任务管理-更新状态", notes = "任务管理-更新状态") @PutMapping(value = "/updateWorkStatus") public Result updateWorkStatus(@RequestBody Task task) { - task.setUpdateTime(new Date()); + //获取数据 + Task oldTask = taskService.query().eq("id", task.getId()).one(); + Date startTime = oldTask.getStartTime(); + Date endTime = new Date(); + + //更新数据 + task.setUpdateTime(endTime); + task.setSubmitTime(endTime); taskService.updateById(task); return Result.OK("编辑成功!"); } From 53617f29cabb8100d5c35b8bcf47e198cb09c40c Mon Sep 17 00:00:00 2001 From: lijinyu <3023846734@qq.com> Date: Mon, 17 Jul 2023 18:59:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=8C=E4=BA=8C=E7=BA=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=B2=A1=E6=9C=89=E6=B7=BB=E5=8A=A0=E4=B8=8B?= =?UTF-8?q?=E7=BA=A7=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue b/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue index 6a2ad20..0684db4 100644 --- a/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue +++ b/ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue @@ -60,7 +60,7 @@ 删除 - 添加下级 + 添加下级