parent
ccf9f5f3c6
commit
9e76b566c2
17 changed files with 1557 additions and 1 deletions
@ -0,0 +1,296 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="对应模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">--> |
||||
<!-- <a-input v-model="model.moduleId" placeholder="请输入对应模块id" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionName"> |
||||
<a-input v-model="model.functionName" placeholder="请输入中文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionEnName"> |
||||
<a-input v-model="model.functionEnName" placeholder="请输入英文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="功能类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionType"> |
||||
<j-dict-select-tag type="list" v-model="model.functionType" dictCode="function_type" placeholder="请选择功能类型" @change="functionxbianma"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="功能编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionCode"> |
||||
<a-input v-model="model.functionCode" placeholder="请输入功能编码" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
|
||||
|
||||
<a-col :span="24"> |
||||
<a-form-model-item label="用户角色" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userRole"> |
||||
<j-multi-select-tag type="list_multi" v-model="model.userRole" dictCode="sys_role,role_name,id" placeholder="请选择用户角色" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers"> |
||||
<j-select-user-by-dep v-model="model.managerUsers" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel"> |
||||
<j-dict-select-tag type="list" v-model="model.workLevel" dictCode="work_level" placeholder="请选择任务等级" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="任务状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workStatus">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.workStatus" dictCode="work_status" placeholder="请选择任务状态" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">--> |
||||
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">--> |
||||
<!-- <j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
||||
<a-input-number v-model="model.duration" placeholder="请输入任务时长" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime">--> |
||||
<!-- <j-date placeholder="请选择提交时间" v-model="model.submitTime" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="实际时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realDuration">--> |
||||
<!-- <a-input-number v-model="model.realDuration" placeholder="请输入实际时长" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="功能状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.status" dictCode="a_status" placeholder="请选择功能状态" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="版本状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verisonStatus">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.verisonStatus" dictCode="verison_status" placeholder="请选择版本状态" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="版本号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verison">--> |
||||
<!-- <a-input-number v-model="model.verison" placeholder="请输入版本号" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="分析图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diagrams"> |
||||
<j-image-upload isMultiple v-model="model.diagrams" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="功能描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe"> |
||||
<j-editor v-model="model.pmDescribe" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue1 } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'FunctionxForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
workLevel:2, |
||||
workStatus:0, |
||||
|
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
moduleId: [ |
||||
{ required: true, message: '请输入对应模块id!'}, |
||||
], |
||||
functionName: [ |
||||
{ required: true, message: '请输入中文名称!'}, |
||||
{ validator: (rule, value, callback) => validateDuplicateValue1('functionx', 'function_name', value, this.model.id,this.moduleid, callback)}, |
||||
], |
||||
functionEnName: [ |
||||
{ required: true, message: '请输入英文名称!'}, |
||||
{ validator: (rule, value, callback) => validateDuplicateValue1('functionx', 'function_en_name', value, this.model.id,this.moduleid, callback)}, |
||||
], |
||||
functionCode: [ |
||||
{ required: true, message: '请输入功能编码!'}, |
||||
], |
||||
functionType: [ |
||||
{ required: true, message: '请输入功能类型!'}, |
||||
], |
||||
workLevel: [ |
||||
{ required: true, message: '请输入任务等级!'}, |
||||
], |
||||
workStatus: [ |
||||
{ required: true, message: '请输入任务状态!'}, |
||||
], |
||||
realDuration: [ |
||||
{ required: true, message: '请输入实际时长!'}, |
||||
], |
||||
status: [ |
||||
{ required: true, message: '请输入功能状态!'}, |
||||
], |
||||
verisonStatus: [ |
||||
{ required: true, message: '请输入版本状态!'}, |
||||
], |
||||
verison: [ |
||||
{ required: true, message: '请输入版本号!'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/functionx/functionx/zhgn", |
||||
edit: "/functionx/functionx/edit", |
||||
queryById: "/functionx/functionx/queryById", |
||||
bianma:'/functionx/functionx/bianma', |
||||
getmoduleid:"/modulex/modulex/getmoduleid" |
||||
}, |
||||
moduleid:'', |
||||
modulecode:'', |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
|
||||
}, |
||||
methods: { |
||||
functionxbianma(){ |
||||
if(this.model.functionType==0){ |
||||
this.model.functionCode=this.modulecode+"列表" |
||||
} |
||||
else if(this.model.functionType==1){ |
||||
this.model.functionCode=this.modulecode+"增加" |
||||
} |
||||
else if(this.model.functionType==2){ |
||||
this.model.functionCode=this.modulecode+"删除" |
||||
} |
||||
else if(this.model.functionType==3){ |
||||
this.model.functionCode=this.modulecode+"修改" |
||||
} |
||||
else if(this.model.functionType==4){ |
||||
this.model.functionCode=this.modulecode+"查看" |
||||
} |
||||
else if(this.model.functionType==5){ |
||||
this.model.functionCode=this.modulecode+"导入" |
||||
} |
||||
else if(this.model.functionType==6){ |
||||
this.model.functionCode=this.modulecode+"导出" |
||||
} |
||||
else { |
||||
this.model.functionCode=this.modulecode+"其他" |
||||
} |
||||
console.log(this.model.functionCode,"---------") |
||||
}, |
||||
modulebianma(id){ |
||||
getAction(this.url.bianma,{id:id}).then((res)=>{ |
||||
if (res.success) { |
||||
//重新计算分页问题 |
||||
this.modulecode=res.result; |
||||
|
||||
} |
||||
}) |
||||
}, |
||||
add (record) { |
||||
getAction(this.url.getmoduleid,{requirementid:record.id}).then((res)=>{ |
||||
if (res.success) { |
||||
this.moduleid=res.result; |
||||
this.model.moduleId=res.result; |
||||
//获得模块编码 |
||||
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){ |
||||
this.model.functionName=this.model.functionName1; |
||||
} |
||||
if(this.model.functionEnName1!=null){ |
||||
this.model.functionEnName=this.model.functionEnName1 |
||||
} |
||||
if(this.model.functionCode1!=null){ |
||||
this.model.functionCode=this.model.functionCode1 |
||||
} |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<functionx-form1 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></functionx-form1> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import FunctionxForm1 from './FunctionxForm1' |
||||
export default { |
||||
name: 'FunctionxModal1', |
||||
components: { |
||||
FunctionxForm1 |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(record); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,274 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<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="pid"> |
||||
<!-- <a-input v-model="model.pid" placeholder="请输入上级模块id" ></a-input>--> |
||||
<j-dict-select-tag v-model="model.pid" dict-code="modulex,module_name,id" |
||||
placeholder="请输入上级模块" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="项目名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId"> |
||||
<!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>--> |
||||
<j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id" |
||||
placeholder="请输入项目id" style="width: 100%" disabled/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleName"> |
||||
<a-input v-model="model.moduleName" placeholder="请输入中文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleEnName"> |
||||
<a-input v-model="model.moduleEnName" placeholder="请输入英文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="模块编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleCode"> |
||||
<a-input v-model="model.moduleCode" placeholder="请输入模块编码" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="内容描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe"> |
||||
<a-input v-model="model.pmDescribe" placeholder="请输入内容描述" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers"> |
||||
<!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>--> |
||||
<j-select-user-by-dep v-model="model.managerUsers" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel"> |
||||
<!-- <a-input-number v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />--> |
||||
<j-dict-select-tag v-model="model.workLevel" dict-code="work_level" |
||||
placeholder="请输入任务等级" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workStatus"> |
||||
<!-- <a-input-number v-model="model.workStatus" placeholder="请输入任务状态" style="width: 100%" />--> |
||||
<j-dict-select-tag v-model="model.workStatus" dict-code="work_status" |
||||
placeholder="请输入任务状态" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime"> |
||||
<j-date placeholder="请选择发布时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.publishTime" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
||||
<a-input-number :min="0.1" :max="16" :precision="1" v-model="model.duration" placeholder="请输入任务时长" style="width: 100%"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> |
||||
<j-date placeholder="请选择开始时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.startTime" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime"> |
||||
<j-date placeholder="请选择提交时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.submitTime" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="实际时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realDuration"> |
||||
<!-- <a-input-number v-model="model.realDuration" placeholder="请输入实际时长" style="width: 100%" />--> |
||||
<a-input-number :min="0.1" :max="16" :precision="1" v-model="model.realDuration" placeholder="请输入实际时长" style="width: 100%"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="用户角色" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userRole"> |
||||
<!-- <a-input v-model="model.userRole" placeholder="请输入用户角色" ></a-input>--> |
||||
<j-multi-select-tag type="list_multi" v-model="model.userRole" dictCode="sys_role,role_name,id" placeholder="请选择用户角色" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="关联实体" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="relatedBean">--> |
||||
<!-- <j-dict-select-tag v-model="model.relatedBean" dict-code="tablex,table_name,id"--> |
||||
<!-- placeholder="请输入关联实体" ></j-dict-select-tag>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="原型图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="prototypes"> |
||||
<!-- <a-input v-model="model.prototypes" placeholder="请输入原型图" ></a-input>--> |
||||
<j-image-upload isMultiple v-model="model.prototypes" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="分析图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diagrams"> |
||||
<!-- <a-input v-model="model.diagrams" placeholder="请输入分析图" ></a-input>--> |
||||
<j-image-upload isMultiple v-model="model.diagrams" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="模块状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
||||
<!-- <a-input-number v-model="model.status" placeholder="请输入模块状态" style="width: 100%" />--> |
||||
<j-dict-select-tag type="radio" v-model="model.status" placeholder="请输入模块状态" dict-code="a_status" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="版本状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verisonStatus"> |
||||
<!-- <a-input-number v-model="model.verisonStatus" placeholder="请输入版本状态" style="width: 100%" />--> |
||||
<j-dict-select-tag type="radioButton" v-model="model.verisonStatus" dict-code="verison_status" |
||||
placeholder="请输入版本状态"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="版本号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verison">--> |
||||
<!-- <a-input-number v-model="model.verison" placeholder="请输入版本号" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
import moment from "dayjs"; |
||||
|
||||
export default { |
||||
name: 'ModulexForm1', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
workLevel: 2, |
||||
workStatus: 0, |
||||
duration: 1, |
||||
submitTime: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
||||
realDuration: 16, |
||||
status: 1, |
||||
verisonStatus: 1, |
||||
requirementid:"", |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
projectId: [ |
||||
{ required: true, message: '请输入项目id!'}, |
||||
], |
||||
moduleName: [ |
||||
{ required: true, message: '请输入中文名称!'}, |
||||
], |
||||
moduleEnName: [ |
||||
{ required: true, message: '请输入英文名称!'}, |
||||
], |
||||
moduleCode: [ |
||||
{ required: true, message: '请输入模块编码!'}, |
||||
], |
||||
workLevel: [ |
||||
{ required: true, message: '请输入任务等级!'}, |
||||
], |
||||
workStatus: [ |
||||
{ required: true, message: '请输入任务状态!'}, |
||||
], |
||||
duration: [ |
||||
{ required: true, message: '请输入任务时长!'}, |
||||
], |
||||
realDuration: [ |
||||
{ required: true, message: '请输入实际时长!'}, |
||||
], |
||||
status: [ |
||||
{ required: true, message: '请输入模块状态!'}, |
||||
], |
||||
verisonStatus: [ |
||||
{ required: true, message: '请输入版本状态!'}, |
||||
], |
||||
verison: [ |
||||
{ required: true, message: '请输入版本号!'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/modulex/modulex/zhmk", |
||||
edit: "/modulex/modulex/edit", |
||||
queryById: "/modulex/modulex/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model 原始值 |
||||
|
||||
}, |
||||
methods: { |
||||
add (record) { |
||||
this.model.projectId = record.projectId; |
||||
this.model.requirementid = record.id; |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
if (this.model.fuzhi){ |
||||
|
||||
this.model.id = null; |
||||
this.model.moduleName = this.model.moduleName + '+1'; |
||||
this.model.moduleEnName = this.model.moduleEnName + '+1'; |
||||
this.model.moduleCode = this.model.moduleCode + '+1'; |
||||
this.model.createTime = null; |
||||
} |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<modulex-form1 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></modulex-form1> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ModulexForm1 from './ModulexForm1' |
||||
export default { |
||||
name: 'ModulexModal', |
||||
components: { |
||||
ModulexForm1 |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(record); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,245 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="对应模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">--> |
||||
<!-- <a-input v-model="model.moduleId" placeholder="请输入对应模块id" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="对应功能id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionId">--> |
||||
<!-- <a-input v-model="model.functionId" placeholder="请输入对应功能id" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="规则序号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleNo"> |
||||
<a-input v-model="model.ruleNo" placeholder="请输入规则序号" disabled></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="规则编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleCode"> |
||||
<a-input v-model="model.ruleCode" placeholder="请输入规则编码" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
|
||||
|
||||
<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="请选择对应实体" disabled/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="对应字段" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fieldId"> |
||||
<j-dict-select-tag type="list" v-model="model.fieldId" :dictCode=field placeholder="请选择对应字段" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers">--> |
||||
<!-- <a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel"> |
||||
<j-dict-select-tag type="list" v-model="model.workLevel" dictCode="work_level" placeholder="请选择任务等级" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="任务状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workStatus">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.workStatus" dictCode="" placeholder="请选择任务状态" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
|
||||
<a-col :span="24"> |
||||
<a-form-model-item label="任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
||||
<a-input-number v-model="model.duration" placeholder="请输入任务时长" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
|
||||
<a-col :span="24"> |
||||
<a-form-model-item label="分析图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diagrams"> |
||||
<j-image-upload isMultiple v-model="model.diagrams" ></j-image-upload> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="规则描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe"> |
||||
<j-editor v-model="model.pmDescribe" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'RulexForm1', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
ruleNo:'', |
||||
ruleCode:'' |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
moduleId: [ |
||||
{ required: true, message: '请输入对应模块id!'}, |
||||
], |
||||
functionId: [ |
||||
{ required: true, message: '请输入对应功能id!'}, |
||||
], |
||||
ruleNo: [ |
||||
{ required: true, message: '请输入规则序号!'}, |
||||
], |
||||
ruleCode: [ |
||||
{ required: true, message: '请输入规则编码!'}, |
||||
], |
||||
tableId: [ |
||||
{ required: true, message: '请输入对应实体id!'}, |
||||
], |
||||
// fieldId: [ |
||||
// { required: true, message: '请输入对应字段!'}, |
||||
// ], |
||||
workLevel: [ |
||||
{ required: true, message: '请输入任务等级!'}, |
||||
], |
||||
workStatus: [ |
||||
{ required: true, message: '请输入任务状态!'}, |
||||
], |
||||
realDuration: [ |
||||
{ required: true, message: '请输入实际时长!'}, |
||||
], |
||||
status: [ |
||||
{ required: true, message: '请输入规则状态!'}, |
||||
], |
||||
verisonStatus: [ |
||||
{ required: true, message: '请输入版本状态!'}, |
||||
], |
||||
verison: [ |
||||
{ required: true, message: '请输入版本号!'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/rulex/rulex/zhgz", |
||||
edit: "/rulex/rulex/edit", |
||||
queryById: "/rulex/rulex/queryById", |
||||
query:'modulex/modulex/queryById', |
||||
sort:'/rulex/rulex/sort', |
||||
getmoduleid:"/modulex/modulex/getmoduleid", |
||||
getfunctionid:"/modulex/modulex/getfunctionid", |
||||
}, |
||||
table:'tablex,table_name,id', |
||||
field:'fieldx,field_name,id', |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
// this.table="tablex,table_name,id,module_id="+this.model.moduleId |
||||
}, |
||||
methods: { |
||||
sort(){ |
||||
getAction(this.url.sort,{id:this.model.functionId}).then((res)=>{ |
||||
console.log(res) |
||||
this.model.ruleNo=res.result.substring(0,3); |
||||
this.model.ruleCode=res.result.substring(3)+this.model.ruleNo; |
||||
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; |
||||
}, |
||||
add (record) { |
||||
getAction(this.url.getmoduleid,{requirementid:record.id}).then((res)=>{ |
||||
if (res.success) { |
||||
this.model.moduleId=res.result; |
||||
getAction(this.url.getfunctionid,{requirementid:record.id}).then((res1)=>{ |
||||
if (res1.success) { |
||||
this.model.functionId=res1.result; |
||||
this.sort(); |
||||
this.shiti(); |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
this.edit(this.modelDefault); |
||||
}else{ |
||||
this.$message.warning(res1.message); |
||||
} |
||||
}); |
||||
}else{ |
||||
this.$message.warning(res.message); |
||||
} |
||||
}); |
||||
|
||||
}, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<rulex-form1 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rulex-form1> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import RulexForm1 from './RulexForm1' |
||||
export default { |
||||
name: 'RulexModal1', |
||||
components: { |
||||
RulexForm1 |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(record); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,171 @@ |
||||
package org.jeecg.modules.demo.requirementfun.controller; |
||||
|
||||
import java.util.Arrays; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
import java.io.IOException; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URLDecoder; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
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.requirementfun.entity.RequirementFun; |
||||
import org.jeecg.modules.demo.requirementfun.service.IRequirementFunService; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil; |
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
||||
import org.jeecgframework.poi.excel.entity.ExportParams; |
||||
import org.jeecgframework.poi.excel.entity.ImportParams; |
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
import com.alibaba.fastjson.JSON; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
|
||||
/** |
||||
* @Description: 需求功能关联管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-07-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="需求功能关联管理") |
||||
@RestController |
||||
@RequestMapping("/requirementfun/requirementFun") |
||||
@Slf4j |
||||
public class RequirementFunController extends JeecgController<RequirementFun, IRequirementFunService> { |
||||
@Autowired |
||||
private IRequirementFunService requirementFunService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param requirementFun |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-分页列表查询") |
||||
@ApiOperation(value="需求功能关联管理-分页列表查询", notes="需求功能关联管理-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(RequirementFun requirementFun, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<RequirementFun> queryWrapper = QueryGenerator.initQueryWrapper(requirementFun, req.getParameterMap()); |
||||
Page<RequirementFun> page = new Page<RequirementFun>(pageNo, pageSize); |
||||
IPage<RequirementFun> pageList = requirementFunService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param requirementFun |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-添加") |
||||
@ApiOperation(value="需求功能关联管理-添加", notes="需求功能关联管理-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody RequirementFun requirementFun) { |
||||
requirementFunService.save(requirementFun); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param requirementFun |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-编辑") |
||||
@ApiOperation(value="需求功能关联管理-编辑", notes="需求功能关联管理-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody RequirementFun requirementFun) { |
||||
requirementFunService.updateById(requirementFun); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-通过id删除") |
||||
@ApiOperation(value="需求功能关联管理-通过id删除", notes="需求功能关联管理-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
||||
requirementFunService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-批量删除") |
||||
@ApiOperation(value="需求功能关联管理-批量删除", notes="需求功能关联管理-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.requirementFunService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "需求功能关联管理-通过id查询") |
||||
@ApiOperation(value="需求功能关联管理-通过id查询", notes="需求功能关联管理-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
||||
RequirementFun requirementFun = requirementFunService.getById(id); |
||||
if(requirementFun==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(requirementFun); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param requirementFun |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, RequirementFun requirementFun) { |
||||
return super.exportXls(request, requirementFun, RequirementFun.class, "需求功能关联管理"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, RequirementFun.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,69 @@ |
||||
package org.jeecg.modules.demo.requirementfun.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 需求功能关联管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-07-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("requirement_fun") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="requirement_fun对象", description="需求功能关联管理") |
||||
public class RequirementFun implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private java.lang.String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private java.lang.String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private java.util.Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private java.lang.String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private java.util.Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private java.lang.String sysOrgCode; |
||||
/**需求id*/ |
||||
@Excel(name = "需求id", width = 15) |
||||
@ApiModelProperty(value = "需求id") |
||||
private java.lang.String requirementId; |
||||
/**功能层级*/ |
||||
@Excel(name = "功能层级", width = 15) |
||||
@ApiModelProperty(value = "功能层级") |
||||
private java.lang.Integer funLevel; |
||||
/**功能id*/ |
||||
@Excel(name = "功能id", width = 15) |
||||
@ApiModelProperty(value = "功能id") |
||||
private java.lang.String funId; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.requirementfun.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.requirementfun.entity.RequirementFun; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 需求功能关联管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-07-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface RequirementFunMapper extends BaseMapper<RequirementFun> { |
||||
|
||||
} |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.jeecg.modules.demo.requirementfun.mapper.RequirementFunMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.requirementfun.service; |
||||
|
||||
import org.jeecg.modules.demo.requirementfun.entity.RequirementFun; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 需求功能关联管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-07-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IRequirementFunService extends IService<RequirementFun> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.requirementfun.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.requirementfun.entity.RequirementFun; |
||||
import org.jeecg.modules.demo.requirementfun.mapper.RequirementFunMapper; |
||||
import org.jeecg.modules.demo.requirementfun.service.IRequirementFunService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 需求功能关联管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-07-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class RequirementFunServiceImpl extends ServiceImpl<RequirementFunMapper, RequirementFun> implements IRequirementFunService { |
||||
|
||||
} |
Loading…
Reference in new issue