任务新增中新增按钮2.0

dev
chengyufei 1 year ago
parent 27568c0364
commit 6c02c3f1a2
  1. 21
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue
  2. 6
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue
  3. 11
      ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
  4. 6
      ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue
  5. 21
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue
  6. 2
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java
  7. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java

@ -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) {

@ -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(()=>{

@ -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;

@ -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(()=>{

@ -104,7 +104,7 @@
<j-dict-select-tag v-model="model.functionId" placeholder="请选择功能"
:dict-code="functionx"
style="width: 80%" @change="fillFunctionName()"></j-dict-select-tag>
<a-button @click="handleAdd1" type="primary" icon="plus" style="width: 20%;" ></a-button>
<a-button @click="handleAdd1(model.moduleId)" type="primary" icon="plus" style="width: 20%;" ></a-button>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -112,7 +112,7 @@
<!-- <a-input v-model="model.ruleId" placeholder="请输入规则id" rulex,rule_no,id></a-input>-->
<j-dict-select-tag v-model="model.ruleId" placeholder="请选择规则" :dict-code="rulex"
style="width: 80%"></j-dict-select-tag>
<a-button @click="handleAdd2" type="primary" icon="plus" style="width: 20%;"></a-button>
<a-button @click="handleAdd2(model.functionId,model.moduleId)" type="primary" icon="plus" style="width: 20%;"></a-button>
</a-form-model-item>
</a-col>
</a-row>
@ -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();
// 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 () {
this.$refs.modalForm2.add();
handleAdd2: function (functionId,moduleId) {
this.$refs.modalForm2.add1(functionId,moduleId);
this.$refs.modalForm2.title = "新增";
this.$refs.modalForm2.disableSubmit = false;
},

@ -198,7 +198,7 @@ public interface CommonConstant {
public static final String ONLINE_PARAM_VAL_IS_FALSE = "N";
/**
* 文件上传类型本地localMiniominio阿里云alioss
* 文件上传类型本地localMiniominio阿里云alioss
*/
public static final String UPLOAD_TYPE_LOCAL = "local";
public static final String UPLOAD_TYPE_MINIO = "minio";

@ -178,10 +178,23 @@ public class TaskController extends JeecgController<Task, ITaskService> {
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("编辑成功!");
}

Loading…
Cancel
Save