master
admin 2 years ago
parent 8b5e39980e
commit f64abed5d5
  1. BIN
      ant-design-vue-jeecg/src/views/edu/img/pic.png
  2. 2
      ant-design-vue-jeecg/src/views/skillPoints/SkillPointsList.vue
  3. 10
      ant-design-vue-jeecg/src/views/skillPoints/modules/SkillPointsForm.vue
  4. 2
      ant-design-vue-jeecg/src/views/skillType/SkillTypeList.vue
  5. 2
      ant-design-vue-jeecg/src/views/taskSkill/TaskSkillList.vue
  6. 98
      ant-design-vue-jeecg/src/views/taskSkill/modules/TaskSkillForm.vue
  7. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/controller/SkillPointsController.java
  8. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/entity/SkillPoints.java
  9. 36
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskSkill/controller/TaskSkillController.java

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -62,7 +62,7 @@
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-if="!text" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;" src="@/views/edu/img/pic.png"/>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">

@ -4,8 +4,8 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supertypeId">
<j-search-select-tag v-model="model.supertypeId" dict="skill_type,type_name,id" placeholder="请选择类型" ></j-search-select-tag>
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="skillType">
<j-search-select-tag v-model="model.skillType" dict="skill_type,type_name,id" placeholder="请选择类型" ></j-search-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -77,6 +77,12 @@
},
confirmLoading: false,
validatorRules: {
skillType: [
{ required: true, message: '请选择类型!'},
],
skillName: [
{ required: true, message: '输入技能名称!'},
],
},
url: {
add: "/skillPoints/skillPoints/add",

@ -62,7 +62,7 @@
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-if="!text" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;" src="@/views/edu/img/pic.png"/>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">

@ -130,7 +130,7 @@
{
title:'任务',
align:"center",
dataIndex: 'taskId_dictText'
dataIndex: 'taskId'
},
{
title: '操作',

@ -10,7 +10,22 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskType">
<j-dict-select-tag v-model="model.taskType" dictCode="task_type" @change="settask" placeholder="请选择任务类型" style="width: 100%" />
<j-dict-select-tag v-model="model.taskType" dictCode="task_type" placeholder="请选择任务类型" @change="leixing" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item v-if="xiangmu" label="项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" >
<j-dict-select-tag v-model="project" dictCode="projectx,project_name,id" @change="setmoduledict()" placeholder="请选择项目" ></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item v-if="mokuai" label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
<j-dict-select-tag v-model="module" :dictCode="moduledict" placeholder="请选择模块" @change="setfunctiondict" ></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item v-if="gongneng" label="功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
<j-dict-select-tag v-model="functionx" :dictCode="functiondict" placeholder="请选择功能" @change="settaskdict" ></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -44,6 +59,14 @@
},
data () {
return {
xiangmu:false,
mokuai:false,
gongneng:false,
project:'',
module:'',
functionx:'',
moduledict:"a,a,a",
functiondict:"a,a,a",
taskdict:"a,a,a",
model:{
taskId:'',
@ -85,17 +108,68 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
settask() {
if(this.model.taskType == '0'){
this.taskdict="projectx,project_name,id"
}else if(this.model.taskType == '1'){
this.taskdict="modulex,module_name,id"
}else if(this.model.taskType == '2'){
this.taskdict="functionx,function_name,id"
}else if(this.model.taskType == '3'){
this.taskdict="rulex,rule_code,id"
}else { this.taskdict=""}
this.model.taskId='';
leixing(){
// 0 1 2 3
//
if (this.model.taskType == '0'){
//
this.xiangmu = false;
this.mokuai = false;
this.gongneng = false;
this.taskdict = "projectx,project_name,id"
}if (this.model.taskType == '1'){
//
this.mokuai = false;
this.gongneng = false;
//
this.taskdict='a,a,a';
this.xiangmu = true;
}if (this.model.taskType == '2'){
//
this.gongneng = false;
//
this.taskdict='a,a,a';
this.xiangmu = true;
this.mokuai = true;
}if (this.model.taskType == '3'){
//
this.taskdict='a,a,a';
this.xiangmu = true;
this.mokuai = true;
this.gongneng = true;
}
//
this.project = '';
this.module = '';
this.functionx = '';
this.model.taskId = '';
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
},
setmoduledict(){
this.moduledict = "modulex,module_name,id,project_id="+this.project
if (this.model.taskType == '1'){
this.taskdict = "modulex,module_name,id,project_id="+this.project
}
this.module = '';
this.functionx = '';
this.model.taskId = '';
},
setfunctiondict(){
this.functiondict = "functionx,function_name,id,module_id="+this.module
if (this.model.taskType == '2'){
this.taskdict = "functionx,function_name,id,module_id="+this.module
}
this.functionx = '';
this.model.taskId = '';
},
settaskdict(){
this.taskdict = "rulex,rule_code,id,function_id="+this.functionx;
this.model.taskId = '';
},
add () {
this.edit(this.modelDefault);

@ -83,13 +83,16 @@ public class SkillPointsController extends JeecgController<SkillPoints, ISkillPo
@PostMapping(value = "/add")
public Result<?> add(@RequestBody SkillPoints skillPoints) {
String code = "";
SkillPoints skillPoints1 = skillPointsService.getOne(new QueryWrapper<SkillPoints>().lambda().orderByDesc(SkillPoints::getSkillCode));
List<SkillPoints> list = skillPointsService.list(new QueryWrapper<SkillPoints>().lambda().orderByDesc(SkillPoints::getSkillCode));
SkillPoints skillPoints1 = list.get(0);
if (skillPoints1 == null){
code = "J0000000001";
code = "J000000001";
}else {
code = skillPoints1.getSkillCode()+1;
Integer s = Integer.valueOf(skillPoints1.getSkillCode().substring(1)) + 1;
String format = String.format("%0" + 9 + "d", s);
code = "J"+format;
}
System.out.println(code);
skillPoints.setSkillCode(code);
skillPointsService.save(skillPoints);
return Result.OK("添加成功!");
}

@ -43,7 +43,7 @@ public class SkillPoints implements Serializable {
@Excel(name = "类型", width = 15)
@ApiModelProperty(value = "类型")
@Dict(dictTable = "skill_type",dicText = "type_name",dicCode = "id")
private java.lang.Integer skillType;
private java.lang.String skillType;
/**技能点名称*/
@Excel(name = "技能点名称", width = 15)
@ApiModelProperty(value = "技能点名称")

@ -12,6 +12,14 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.service.IRulexService;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.service.IModulexService;
import org.jeecg.modules.projectx.entity.Projectx;
import org.jeecg.modules.projectx.service.IProjectxService;
import org.jeecg.modules.taskSkill.entity.TaskSkill;
import org.jeecg.modules.taskSkill.service.ITaskSkillService;
@ -49,6 +57,15 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class TaskSkillController extends JeecgController<TaskSkill, ITaskSkillService> {
@Autowired
private ITaskSkillService taskSkillService;
@Autowired
private IProjectxService projectxService;
@Autowired
private IModulexService modulexService;
@Autowired
private IFunctionxService functionxService;
@Autowired
private IRulexService rulexService;
/**
* 分页列表查询
@ -69,6 +86,25 @@ public class TaskSkillController extends JeecgController<TaskSkill, ITaskSkillSe
QueryWrapper<TaskSkill> queryWrapper = QueryGenerator.initQueryWrapper(taskSkill, req.getParameterMap());
Page<TaskSkill> page = new Page<TaskSkill>(pageNo, pageSize);
IPage<TaskSkill> pageList = taskSkillService.page(page, queryWrapper);
for (TaskSkill taskSkill1 : pageList.getRecords()){
// 任务类型 项目0 模块1 功能2 规则3
if (taskSkill1.getTaskType() == 0){
Projectx projectx = projectxService.getById(taskSkill1.getTaskId());
taskSkill1.setTaskId(projectx.getProjectName());
}
if (taskSkill1.getTaskType() == 1){
Modulex modulex = modulexService.getById(taskSkill1.getTaskId());
taskSkill1.setTaskId(modulex.getModuleName());
}
if (taskSkill1.getTaskType() == 2){
Functionx functionx = functionxService.getById(taskSkill1.getTaskId());
taskSkill1.setTaskId(functionx.getFunctionName());
}
if (taskSkill1.getTaskType() == 3){
Rulex rulex = rulexService.getById(taskSkill1.getTaskId());
taskSkill1.setTaskId(rulex.getRuleCode());
}
}
return Result.OK(pageList);
}

Loading…
Cancel
Save