Merge remote-tracking branch 'origin/master'

master
admin 2 years ago
commit 3e33c31dcc
  1. 2
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  2. 15
      ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
  3. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  4. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java
  5. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java

@ -183,7 +183,7 @@
{
title:'对应模块',
align:"center",
dataIndex: 'moduleId'
dataIndex: 'moduleId_dictText'
},
{
title:'中文名称',

@ -27,7 +27,7 @@
<a-col :span="24">
<a-form-model-item label="对应实体" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableId">
<j-dict-select-tag type="list" v-model="model.tableId" :dictCode=table placeholder="请选择对应实体" @change="ziduan"/>
<j-dict-select-tag type="list" v-model="model.tableId" :dictCode=table placeholder="请选择对应实体" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -149,9 +149,10 @@
add: "/rulex/rulex/add",
edit: "/rulex/rulex/edit",
queryById: "/rulex/rulex/queryById",
query:'modulex/modulex/queryById',
sort:'/rulex/rulex/sort'
},
table:'',
table:'tablex,table_name,id',
field:'fieldx,field_name,id',
}
},
@ -163,9 +164,10 @@
created () {
//model
this.model.moduleId=this.$route.query.moduleid
this.table="tablex,table_name,id,module_id="+this.model.moduleId
// this.table="tablex,table_name,id,module_id="+this.model.moduleId
this.model.functionId=this.$route.query.functionid
this.sort()
this.shiti()
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
@ -177,6 +179,13 @@
console.log(this.model.ruleNo)
})
},
shiti(){
getAction(this.url.query,{id:this.model.moduleId}).then((res)=>{
this.model.tableId=res.result.relatedBean
this.field="fieldx,field_name,id,table_id="+this.model.tableId;
console.log(this.model.tableId,"-----------")
})
},
ziduan(){
this.field="fieldx,field_name,id,table_id="+this.model.tableId;
},

@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.service.IModulexService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -52,6 +54,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class FunctionxController extends JeecgController<Functionx, IFunctionxService> {
@Autowired
private IFunctionxService functionxService;
@Autowired
private IModulexService modulexService;
/**
* 分页列表查询
@ -108,6 +112,14 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
@ApiOperation(value="功能管理-添加", notes="功能管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Functionx functionx) {
QueryWrapper<Modulex> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("id",functionx.getModuleId());
Modulex one = modulexService.getOne(queryWrapper);
if(one.getRelatedBean()==null){
return Result.error("请先为对应模块关联实体!!!");
}
//感觉不符合逻辑,上级模块如果是已发布,然后新增也是已发布状态,那样发布按钮还有什么用??
// functionx.setWorkStatus(one.getWorkStatus());
functionxService.save(functionx);
return Result.OK("添加成功!");
}
@ -198,9 +210,9 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
@GetMapping(value = "/bianma")
public Result<?> moduleCode(@RequestParam(name="id",required=true) String id) {
String s=functionxService.findModuleCode(id);
//后期放入返回值中,当前为返回信息
System.out.println(s);
return Result.OK("编码");
// //后期放入返回值中,当前为返回信息
// System.out.println(s);
return Result.OK(s);
}
//在主界面判断一下登录角色,对操作栏进行替换
@GetMapping(value = "/loginrole")

@ -54,7 +54,7 @@ public class Functionx implements Serializable {
/**对应模块id*/
@Excel(name = "对应模块id", width = 15)
@ApiModelProperty(value = "对应模块id")
// @Dict(dictTable = "modulex",dicCode = "id",dicText = "module_name")
@Dict(dictTable = "modulex",dicCode = "id",dicText = "module_name")
private java.lang.String moduleId;
/**中文名称*/
@Excel(name = "中文名称", width = 15)

@ -103,6 +103,15 @@ public class RulexController extends JeecgController<Rulex, IRulexService> {
return Result.error("功能点错误!!!");
}
Functionx functionx = functionxMapper.selectById(rulex.getFunctionId());
if(functionx.getStartTime()!=null){
rulex.setStartTime(functionx.getStartTime());
}
if(functionx.getSubmitTime()!=null){
rulex.setSubmitTime(functionx.getSubmitTime());
}
if(functionx.getRealDuration()!=null){
rulex.setRealDuration(functionx.getRealDuration());
}
rulex.setManagerUsers(functionx.getManagerUsers());
rulex.setWorkStatus(functionx.getWorkStatus());
rulexService.save(rulex);

Loading…
Cancel
Save