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/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 @@ 删除 - 添加下级 + 添加下级 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 97cd107..6fbe053 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 @@ -279,10 +279,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("编辑成功!"); }