master
parent
149f5de8f3
commit
f497ed6854
31 changed files with 2770 additions and 1 deletions
@ -0,0 +1,300 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('模块管理')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
||||
<a-dropdown v-if="selectedRowKeys.length > 0"> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
||||
</a-menu> |
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> |
||||
</a-dropdown> |
||||
</div> |
||||
|
||||
<!-- table区域-begin --> |
||||
<div> |
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||
</div> |
||||
|
||||
<a-table |
||||
ref="table" |
||||
size="middle" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<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-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="fileSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||
<a-button |
||||
v-else |
||||
:ghost="true" |
||||
type="primary" |
||||
icon="download" |
||||
size="small" |
||||
@click="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
|
||||
<a-divider type="vertical" /> |
||||
<a-dropdown> |
||||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item> |
||||
<a @click="handleDetail(record)">详情</a> |
||||
</a-menu-item> |
||||
<a-menu-item> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
</a-menu-item> |
||||
</a-menu> |
||||
</a-dropdown> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import ModulexModal from './modules/ModulexModal' |
||||
|
||||
export default { |
||||
name: 'ModulexList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ModulexModal |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '模块管理管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'上级模块id', |
||||
align:"center", |
||||
dataIndex: 'pid' |
||||
}, |
||||
{ |
||||
title:'项目id', |
||||
align:"center", |
||||
dataIndex: 'projectId' |
||||
}, |
||||
{ |
||||
title:'中文名称', |
||||
align:"center", |
||||
dataIndex: 'moduleName' |
||||
}, |
||||
{ |
||||
title:'英文名称', |
||||
align:"center", |
||||
dataIndex: 'moduleEnName' |
||||
}, |
||||
{ |
||||
title:'模块编码', |
||||
align:"center", |
||||
dataIndex: 'moduleCode' |
||||
}, |
||||
{ |
||||
title:'内容描述', |
||||
align:"center", |
||||
dataIndex: 'pmDescribe' |
||||
}, |
||||
// { |
||||
// title:'责任人', |
||||
// align:"center", |
||||
// dataIndex: 'managerUsers' |
||||
// }, |
||||
{ |
||||
title:'任务等级', |
||||
align:"center", |
||||
dataIndex: 'workLevel_dictText' |
||||
}, |
||||
{ |
||||
title:'任务状态', |
||||
align:"center", |
||||
dataIndex: 'workStatus_dictText' |
||||
}, |
||||
{ |
||||
title:'发布时间', |
||||
align:"center", |
||||
dataIndex: 'publishTime', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'任务时长', |
||||
align:"center", |
||||
dataIndex: 'duration' |
||||
}, |
||||
// { |
||||
// title:'开始时间', |
||||
// align:"center", |
||||
// dataIndex: 'startTime', |
||||
// customRender:function (text) { |
||||
// return !text?"":(text.length>10?text.substr(0,10):text) |
||||
// } |
||||
// }, |
||||
// { |
||||
// title:'提交时间', |
||||
// align:"center", |
||||
// dataIndex: 'submitTime', |
||||
// customRender:function (text) { |
||||
// return !text?"":(text.length>10?text.substr(0,10):text) |
||||
// } |
||||
// }, |
||||
{ |
||||
title:'实际时长', |
||||
align:"center", |
||||
dataIndex: 'realDuration' |
||||
}, |
||||
// { |
||||
// title:'用户角色', |
||||
// align:"center", |
||||
// dataIndex: 'userRole' |
||||
// }, |
||||
// { |
||||
// title:'关联实体', |
||||
// align:"center", |
||||
// dataIndex: 'relatedBean' |
||||
// }, |
||||
// { |
||||
// title:'原型图', |
||||
// align:"center", |
||||
// dataIndex: 'prototypes' |
||||
// }, |
||||
// { |
||||
// title:'分析图', |
||||
// align:"center", |
||||
// dataIndex: 'diagrams' |
||||
// }, |
||||
{ |
||||
title:'模块状态', |
||||
align:"center", |
||||
dataIndex: 'status_dictText' |
||||
}, |
||||
{ |
||||
title:'版本状态', |
||||
align:"center", |
||||
dataIndex: 'verisonStatus_dictText' |
||||
}, |
||||
// { |
||||
// title:'版本号', |
||||
// align:"center", |
||||
// dataIndex: 'verison' |
||||
// }, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/modulex/modulex/list", |
||||
delete: "/modulex/modulex/delete", |
||||
deleteBatch: "/modulex/modulex/deleteBatch", |
||||
exportXlsUrl: "/modulex/modulex/exportXls", |
||||
importExcelUrl: "modulex/modulex/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'pid',text:'上级模块id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'projectId',text:'项目id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'moduleName',text:'中文名称',dictCode:''}) |
||||
fieldList.push({type:'string',value:'moduleEnName',text:'英文名称',dictCode:''}) |
||||
fieldList.push({type:'string',value:'moduleCode',text:'模块编码',dictCode:''}) |
||||
fieldList.push({type:'string',value:'pmDescribe',text:'内容描述',dictCode:''}) |
||||
fieldList.push({type:'string',value:'managerUsers',text:'责任人',dictCode:''}) |
||||
fieldList.push({type:'int',value:'workLevel',text:'任务等级',dictCode:''}) |
||||
fieldList.push({type:'int',value:'workStatus',text:'任务状态',dictCode:''}) |
||||
fieldList.push({type:'date',value:'publishTime',text:'发布时间'}) |
||||
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''}) |
||||
fieldList.push({type:'date',value:'startTime',text:'开始时间'}) |
||||
fieldList.push({type:'date',value:'submitTime',text:'提交时间'}) |
||||
fieldList.push({type:'double',value:'realDuration',text:'实际时长',dictCode:''}) |
||||
fieldList.push({type:'string',value:'userRole',text:'用户角色',dictCode:''}) |
||||
fieldList.push({type:'string',value:'relatedBean',text:'关联实体',dictCode:''}) |
||||
fieldList.push({type:'string',value:'prototypes',text:'原型图',dictCode:''}) |
||||
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''}) |
||||
fieldList.push({type:'int',value:'status',text:'模块状态',dictCode:''}) |
||||
fieldList.push({type:'int',value:'verisonStatus',text:'版本状态',dictCode:''}) |
||||
fieldList.push({type:'int',value:'verison',text:'版本号',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,237 @@ |
||||
<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="pid"> |
||||
<a-input v-model="model.pid" 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="projectId"> |
||||
<a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input> |
||||
</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> |
||||
</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%" /> |
||||
</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%" /> |
||||
</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="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="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="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="userRole"> |
||||
<a-input v-model="model.userRole" placeholder="请输入用户角色" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="关联实体" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="relatedBean"> |
||||
<a-input v-model="model.relatedBean" placeholder="请输入关联实体" ></a-input> |
||||
</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> |
||||
</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> |
||||
</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%" /> |
||||
</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%" /> |
||||
</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' |
||||
|
||||
export default { |
||||
name: 'ModulexForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
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/add", |
||||
edit: "/modulex/modulex/edit", |
||||
queryById: "/modulex/modulex/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
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="关闭"> |
||||
<modulex-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></modulex-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ModulexForm from './ModulexForm' |
||||
export default { |
||||
name: 'ModulexModal', |
||||
components: { |
||||
ModulexForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<modulex-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></modulex-form> |
||||
<div class="drawer-footer"> |
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> |
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> |
||||
</div> |
||||
</a-drawer> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ModulexForm from './ModulexForm' |
||||
|
||||
export default { |
||||
name: 'ModulexModal', |
||||
components: { |
||||
ModulexForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:"操作", |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}); |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less" scoped> |
||||
/** Button按钮间距 */ |
||||
.ant-btn { |
||||
margin-left: 30px; |
||||
margin-bottom: 30px; |
||||
float: right; |
||||
} |
||||
.drawer-footer{ |
||||
position: absolute; |
||||
bottom: -8px; |
||||
width: 100%; |
||||
border-top: 1px solid #e8e8e8; |
||||
padding: 10px 16px; |
||||
text-align: right; |
||||
left: 0; |
||||
background: #fff; |
||||
border-radius: 0 0 2px 2px; |
||||
} |
||||
</style> |
@ -0,0 +1,195 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('管理项目用户角色')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
||||
<a-dropdown v-if="selectedRowKeys.length > 0"> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
||||
</a-menu> |
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> |
||||
</a-dropdown> |
||||
</div> |
||||
|
||||
<!-- table区域-begin --> |
||||
<div> |
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||
</div> |
||||
|
||||
<a-table |
||||
ref="table" |
||||
size="middle" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<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-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="fileSlot" slot-scope="text"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||
<a-button |
||||
v-else |
||||
:ghost="true" |
||||
type="primary" |
||||
icon="download" |
||||
size="small" |
||||
@click="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
|
||||
<a-divider type="vertical" /> |
||||
<a-dropdown> |
||||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item> |
||||
<a @click="handleDetail(record)">详情</a> |
||||
</a-menu-item> |
||||
<a-menu-item> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
</a-menu-item> |
||||
</a-menu> |
||||
</a-dropdown> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<project-user-role-modal ref="modalForm" @ok="modalFormOk"></project-user-role-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import ProjectUserRoleModal from './modules/ProjectUserRoleModal' |
||||
|
||||
export default { |
||||
name: 'ProjectUserRoleList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ProjectUserRoleModal |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '管理项目用户角色管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'项目id', |
||||
align:"center", |
||||
dataIndex: 'projectId' |
||||
}, |
||||
{ |
||||
title:'角色名称', |
||||
align:"center", |
||||
dataIndex: 'userRole' |
||||
}, |
||||
{ |
||||
title:'角色描述', |
||||
align:"center", |
||||
dataIndex: 'pmDescribe' |
||||
}, |
||||
{ |
||||
title:'父用户', |
||||
align:"center", |
||||
dataIndex: 'sourceId' |
||||
}, |
||||
{ |
||||
title:'上级用户', |
||||
align:"center", |
||||
dataIndex: 'pid' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/projectx/projectUserRole/list", |
||||
delete: "/projectx/projectUserRole/delete", |
||||
deleteBatch: "/projectx/projectUserRole/deleteBatch", |
||||
exportXlsUrl: "/projectx/projectUserRole/exportXls", |
||||
importExcelUrl: "projectx/projectUserRole/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'projectId',text:'项目id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'userRole',text:'角色名称',dictCode:''}) |
||||
fieldList.push({type:'string',value:'pmDescribe',text:'角色描述',dictCode:''}) |
||||
fieldList.push({type:'string',value:'sourceId',text:'父用户',dictCode:''}) |
||||
fieldList.push({type:'string',value:'pid',text:'上级用户',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,124 @@ |
||||
<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="projectId"> |
||||
<a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input> |
||||
</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> |
||||
</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="sourceId"> |
||||
<a-input v-model="model.sourceId" placeholder="请输入父用户" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="上级用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid"> |
||||
<a-input v-model="model.pid" placeholder="请输入上级用户" ></a-input> |
||||
</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: 'ProjectUserRoleForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
}, |
||||
url: { |
||||
add: "/projectx/projectUserRole/add", |
||||
edit: "/projectx/projectUserRole/edit", |
||||
queryById: "/projectx/projectUserRole/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
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="关闭"> |
||||
<project-user-role-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></project-user-role-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ProjectUserRoleForm from './ProjectUserRoleForm' |
||||
export default { |
||||
name: 'ProjectUserRoleModal', |
||||
components: { |
||||
ProjectUserRoleForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<project-user-role-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></project-user-role-form> |
||||
<div class="drawer-footer"> |
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> |
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> |
||||
</div> |
||||
</a-drawer> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ProjectUserRoleForm from './ProjectUserRoleForm' |
||||
|
||||
export default { |
||||
name: 'ProjectUserRoleModal', |
||||
components: { |
||||
ProjectUserRoleForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:"操作", |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}); |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less" scoped> |
||||
/** Button按钮间距 */ |
||||
.ant-btn { |
||||
margin-left: 30px; |
||||
margin-bottom: 30px; |
||||
float: right; |
||||
} |
||||
.drawer-footer{ |
||||
position: absolute; |
||||
bottom: -8px; |
||||
width: 100%; |
||||
border-top: 1px solid #e8e8e8; |
||||
padding: 10px 16px; |
||||
text-align: right; |
||||
left: 0; |
||||
background: #fff; |
||||
border-radius: 0 0 2px 2px; |
||||
} |
||||
</style> |
@ -0,0 +1,290 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
<a-col :md="6" :sm="12"> |
||||
<a-form-item label="项目名称"> |
||||
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>--> |
||||
<j-input placeholder="输入账号模糊查询" v-model="queryParam.projectName"></j-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
|
||||
<!-- <a-col :md="6" :sm="8">--> |
||||
<!-- <a-form-item label="性别">--> |
||||
<!-- <a-select v-model="queryParam.sex" placeholder="请选择性别">--> |
||||
<!-- <a-select-option value="">请选择</a-select-option>--> |
||||
<!-- <a-select-option value="1">男</a-select-option>--> |
||||
<!-- <a-select-option value="2">女</a-select-option>--> |
||||
<!-- </a-select>--> |
||||
<!-- </a-form-item>--> |
||||
<!-- </a-col>--> |
||||
|
||||
|
||||
<a-col :md="6" :sm="8"> |
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||
|
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('项目管理 管理项目基本信息')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
||||
@change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" |
||||
@handleSuperQuery="handleSuperQuery"></j-super-query> |
||||
<a-dropdown v-if="selectedRowKeys.length > 0"> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item key="1" @click="batchDel"> |
||||
<a-icon type="delete"/> |
||||
删除 |
||||
</a-menu-item> |
||||
</a-menu> |
||||
<a-button style="margin-left: 8px"> 批量操作 |
||||
<a-icon type="down"/> |
||||
</a-button> |
||||
</a-dropdown> |
||||
</div> |
||||
|
||||
<!-- table区域-begin --> |
||||
<div> |
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
||||
style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||
</div> |
||||
|
||||
<a-table |
||||
ref="table" |
||||
size="middle" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<template slot="htmlSlot" slot-scope="text"> |
||||
<!-- <div v-html="text"></div>--> |
||||
<a @click="rolemanage()">角色管理</a> |
||||
<a-divider type="vertical"/> |
||||
<a @click="modulemanage()">模块管理</a> |
||||
</template> |
||||
|
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
|
||||
<a-divider type="vertical"/> |
||||
<a-dropdown> |
||||
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
||||
<a-menu slot="overlay"> |
||||
<a-menu-item> |
||||
<a @click="handleDetail(record)">详情</a> |
||||
</a-menu-item> |
||||
<a-menu-item> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
</a-menu-item> |
||||
</a-menu> |
||||
</a-dropdown> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<projectx-modal ref="modalForm" @ok="modalFormOk"></projectx-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import {mixinDevice} from '@/utils/mixin' |
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||
import ProjectxModal from './modules/ProjectxModal' |
||||
|
||||
export default { |
||||
name: 'ProjectxList', //添加用户 |
||||
mixins: [JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ProjectxModal |
||||
}, |
||||
data() { |
||||
return { |
||||
description: '项目管理 管理项目基本信息管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key: 'rowIndex', |
||||
width: 60, |
||||
align: "center", |
||||
customRender: function (t, r, index) { |
||||
return parseInt(index) + 1; |
||||
} |
||||
}, |
||||
{ |
||||
title: '项目中文名称', |
||||
align: "center", |
||||
dataIndex: 'projectName' |
||||
}, |
||||
{ |
||||
title: '项目英文名称', |
||||
align: "center", |
||||
dataIndex: 'projectEnName' |
||||
}, |
||||
{ |
||||
title: '项目编码', |
||||
align: "center", |
||||
dataIndex: 'projectCode' |
||||
}, |
||||
{ |
||||
title: '项目描述', |
||||
align: "center", |
||||
dataIndex: 'pmDescribe' |
||||
}, |
||||
{ |
||||
title: '项目图片', |
||||
align: "center", |
||||
dataIndex: 'projectPic' |
||||
}, |
||||
{ |
||||
title: '项目网址', |
||||
align: "center", |
||||
dataIndex: 'projectUrl' |
||||
}, |
||||
// { |
||||
// title:'源码地址', |
||||
// align:"center", |
||||
// dataIndex: 'projectCodeUrl' |
||||
// }, |
||||
// { |
||||
// title:'数据库名', |
||||
// align:"center", |
||||
// dataIndex: 'projectDbName' |
||||
// }, |
||||
// { |
||||
// title:'数据地址', |
||||
// align:"center", |
||||
// dataIndex: 'projectDbUrl' |
||||
// }, |
||||
{ |
||||
title: '开始时间', |
||||
align: "center", |
||||
dataIndex: 'startTime', |
||||
customRender: function (text) { |
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
||||
} |
||||
}, |
||||
{ |
||||
title: '完成时间', |
||||
align: "center", |
||||
dataIndex: 'completeTime', |
||||
customRender: function (text) { |
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
||||
} |
||||
}, |
||||
// { |
||||
// title:'复制来源', |
||||
// align:"center", |
||||
// dataIndex: 'sourceProjectId' |
||||
// }, |
||||
{ |
||||
title: '项目状态', |
||||
align: "center", |
||||
dataIndex: 'projectStatus_dictText' |
||||
}, |
||||
{ |
||||
title: '管理', |
||||
dataIndex: 'htmlSlot', |
||||
align: "center", |
||||
fixed: "right", |
||||
width: 147, |
||||
scopedSlots: {customRender: 'htmlSlot'} |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align: "center", |
||||
fixed: "right", |
||||
width: 147, |
||||
scopedSlots: {customRender: 'action'} |
||||
} |
||||
], |
||||
url: { |
||||
list: "/projectx/projectx/list", |
||||
delete: "/projectx/projectx/delete", |
||||
deleteBatch: "/projectx/projectx/deleteBatch", |
||||
exportXlsUrl: "/projectx/projectx/exportXls", |
||||
importExcelUrl: "projectx/projectx/importExcel", |
||||
|
||||
}, |
||||
dictOptions: {}, |
||||
superFieldList: [], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function () { |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
rolemanage() { |
||||
this.$router.push({ |
||||
path: '/src/views/projectUserRole/ProjectUserRoleList', |
||||
//query: {id: '123456'} |
||||
}) |
||||
}, |
||||
modulemanage() { |
||||
this.$router.push({ |
||||
path: '/src/views/modulex/ModulexList', |
||||
//query: {id: '123456'} |
||||
}) |
||||
}, |
||||
initDictConfig() { |
||||
}, |
||||
getSuperFieldList() { |
||||
let fieldList = []; |
||||
fieldList.push({type: 'string', value: 'projectName', text: '项目中文名称', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectEnName', text: '项目英文名称', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectCode', text: '项目编码', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'pmDescribe', text: '项目描述', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectPic', text: '项目图片', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectUrl', text: '项目网址', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectCodeUrl', text: '源码地址', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectDbName', text: '数据库名', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'projectDbUrl', text: '数据地址', dictCode: ''}) |
||||
fieldList.push({type: 'date', value: 'startTime', text: '开始时间'}) |
||||
fieldList.push({type: 'date', value: 'completeTime', text: '完成时间'}) |
||||
fieldList.push({type: 'string', value: 'sourceProjectId', text: '复制来源', dictCode: ''}) |
||||
fieldList.push({type: 'int', value: 'projectStatus', text: '项目状态', dictCode: ''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,193 @@ |
||||
<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="projectName"> |
||||
<a-input v-model="model.projectName" placeholder="请输入项目中文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="项目英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectEnName"> |
||||
<a-input v-model="model.projectEnName" placeholder="请输入项目英文名称" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCode"> |
||||
<a-input v-model="model.projectCode" 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="projectPic"> |
||||
<a-input v-model="model.projectPic" placeholder="请输入项目图片" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="项目网址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectUrl"> |
||||
<a-input v-model="model.projectUrl" placeholder="请输入项目网址" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="源码地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCodeUrl"> |
||||
<a-input v-model="model.projectCodeUrl" placeholder="请输入源码地址" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="数据库名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbName"> |
||||
<a-input v-model="model.projectDbName" placeholder="请输入数据库名" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="数据地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbUrl"> |
||||
<a-input v-model="model.projectDbUrl" placeholder="请输入数据地址" ></a-input> |
||||
</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="completeTime"> |
||||
<j-date placeholder="请选择完成时间" v-model="model.completeTime" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="复制来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sourceProjectId"> |
||||
<a-input v-model="model.sourceProjectId" placeholder="请输入复制来源" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="项目状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectStatus"> |
||||
|
||||
|
||||
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">--> |
||||
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" >--> |
||||
<!-- <a-radio value="1">--> |
||||
<!-- 男--> |
||||
<!-- </a-radio>--> |
||||
<!-- <a-radio value="2">--> |
||||
<!-- 女--> |
||||
<!-- </a-radio>--> |
||||
<!-- </a-radio-group>--> |
||||
|
||||
<j-dict-select-tag v-model="model.projectStatus" placeholder="请输入项目状态" dict-code="project_status"/> |
||||
|
||||
<!-- <a-input-number :min="0" v-model="model.projectStatus" 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 JVxeRadioCell from "@comp/JVxeCells/JVxeRadioCell"; |
||||
|
||||
export default { |
||||
name: 'ProjectxForm', |
||||
components: { |
||||
JVxeRadioCell |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
projectStatus: 1, |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
projectName: [ |
||||
{ required: true, message: '请输入项目中文名称!'}, |
||||
], |
||||
projectEnName: [ |
||||
{ required: true, message: '请输入项目英文名称!'}, |
||||
], |
||||
projectCode: [ |
||||
{ required: true, message: '请输入项目编码!'}, |
||||
], |
||||
projectStatus: [ |
||||
{ required: true, message: '请输入项目状态!'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/projectx/projectx/add", |
||||
edit: "/projectx/projectx/edit", |
||||
queryById: "/projectx/projectx/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
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="关闭"> |
||||
<projectx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></projectx-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ProjectxForm from './ProjectxForm' |
||||
export default { |
||||
name: 'ProjectxModal', |
||||
components: { |
||||
ProjectxForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<projectx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></projectx-form> |
||||
<div class="drawer-footer"> |
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> |
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> |
||||
</div> |
||||
</a-drawer> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ProjectxForm from './ProjectxForm' |
||||
|
||||
export default { |
||||
name: 'ProjectxModal', |
||||
components: { |
||||
ProjectxForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:"操作", |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}); |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less" scoped> |
||||
/** Button按钮间距 */ |
||||
.ant-btn { |
||||
margin-left: 30px; |
||||
margin-bottom: 30px; |
||||
float: right; |
||||
} |
||||
.drawer-footer{ |
||||
position: absolute; |
||||
bottom: -8px; |
||||
width: 100%; |
||||
border-top: 1px solid #e8e8e8; |
||||
padding: 10px 16px; |
||||
text-align: right; |
||||
left: 0; |
||||
background: #fff; |
||||
border-radius: 0 0 2px 2px; |
||||
} |
||||
</style> |
@ -0,0 +1,159 @@ |
||||
package org.jeecg.modules.modulex.controller; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.modulex.entity.Modulex; |
||||
import org.jeecg.modules.modulex.service.IModulexService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @Description: 模块管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="模块管理") |
||||
@RestController |
||||
@RequestMapping("/modulex/modulex") |
||||
@Slf4j |
||||
public class ModulexController extends JeecgController<Modulex, IModulexService> { |
||||
@Autowired |
||||
private IModulexService modulexService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param modulex |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "模块管理-分页列表查询") |
||||
@ApiOperation(value="模块管理-分页列表查询", notes="模块管理-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(Modulex modulex, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<Modulex> queryWrapper = QueryGenerator.initQueryWrapper(modulex, req.getParameterMap()); |
||||
Page<Modulex> page = new Page<Modulex>(pageNo, pageSize); |
||||
IPage<Modulex> pageList = modulexService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param modulex |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "模块管理-添加") |
||||
@ApiOperation(value="模块管理-添加", notes="模块管理-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody Modulex modulex) { |
||||
//版本号 顺序累加;初始值1
|
||||
Integer newVersion = modulexService.getMaxVersion(modulex.getVerison()); |
||||
modulex.setVerison(newVersion+1); |
||||
modulexService.save(modulex); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param modulex |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "模块管理-编辑") |
||||
@ApiOperation(value="模块管理-编辑", notes="模块管理-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody Modulex modulex) { |
||||
modulexService.updateById(modulex); |
||||
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) { |
||||
modulexService.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.modulexService.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) { |
||||
Modulex modulex = modulexService.getById(id); |
||||
if(modulex==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(modulex); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param modulex |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Modulex modulex) { |
||||
return super.exportXls(request, modulex, Modulex.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, Modulex.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,163 @@ |
||||
package org.jeecg.modules.modulex.entity; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 模块管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("modulex") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="modulex对象", description="模块管理") |
||||
public class Modulex implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**上级模块id*/ |
||||
@Excel(name = "上级模块id", width = 15) |
||||
@ApiModelProperty(value = "上级模块id") |
||||
private String pid; |
||||
/**项目id*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
private String projectId; |
||||
/**中文名称*/ |
||||
@Excel(name = "中文名称", width = 15) |
||||
@ApiModelProperty(value = "中文名称") |
||||
private String moduleName; |
||||
/**英文名称*/ |
||||
@Excel(name = "英文名称", width = 15) |
||||
@ApiModelProperty(value = "英文名称") |
||||
private String moduleEnName; |
||||
/**模块编码*/ |
||||
@Excel(name = "模块编码", width = 15) |
||||
@ApiModelProperty(value = "模块编码") |
||||
private String moduleCode; |
||||
/**内容描述*/ |
||||
@Excel(name = "内容描述", width = 15) |
||||
@ApiModelProperty(value = "内容描述") |
||||
private String pmDescribe; |
||||
/**责任人*/ |
||||
@Excel(name = "责任人", width = 15) |
||||
@ApiModelProperty(value = "责任人") |
||||
private String managerUsers; |
||||
/** |
||||
* 任务等级 |
||||
* 值:1、2、3、4、5,默认2 |
||||
*/ |
||||
@Excel(name = "任务等级", width = 15) |
||||
@ApiModelProperty(value = "任务等级") |
||||
@Dict(dicCode = "work_level") |
||||
private Integer workLevel; |
||||
/** |
||||
* 任务状态 |
||||
* 值:未发布0、已发布1、开发中2、已完成3、已驳回8;默认0 |
||||
*/ |
||||
@Excel(name = "任务状态", width = 15) |
||||
@ApiModelProperty(value = "任务状态") |
||||
@Dict(dicCode = "work_status") |
||||
private Integer workStatus; |
||||
/**发布时间*/ |
||||
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "发布时间") |
||||
private Date publishTime; |
||||
/**任务时长*/ |
||||
@Excel(name = "任务时长", width = 15) |
||||
@ApiModelProperty(value = "任务时长") |
||||
private Double duration; |
||||
/**开始时间*/ |
||||
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "开始时间") |
||||
private Date startTime; |
||||
/**提交时间*/ |
||||
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "提交时间") |
||||
private Date submitTime; |
||||
/**实际时长*/ |
||||
@Excel(name = "实际时长", width = 15) |
||||
@ApiModelProperty(value = "实际时长") |
||||
private Double realDuration; |
||||
/**用户角色*/ |
||||
@Excel(name = "用户角色", width = 15) |
||||
@ApiModelProperty(value = "用户角色") |
||||
private String userRole; |
||||
/**关联实体*/ |
||||
@Excel(name = "关联实体", width = 15) |
||||
@ApiModelProperty(value = "关联实体") |
||||
private String relatedBean; |
||||
/**原型图*/ |
||||
@Excel(name = "原型图", width = 15) |
||||
@ApiModelProperty(value = "原型图") |
||||
private String prototypes; |
||||
/**分析图*/ |
||||
@Excel(name = "分析图", width = 15) |
||||
@ApiModelProperty(value = "分析图") |
||||
private String diagrams; |
||||
/** |
||||
* 模块状态 |
||||
* 值:正常1、停用0、废弃9;默认1 |
||||
*/ |
||||
@Excel(name = "模块状态", width = 15) |
||||
@ApiModelProperty(value = "模块状态") |
||||
@Dict(dicCode = "a_status") |
||||
private Integer status; |
||||
/** |
||||
* 版本状态 |
||||
* "值:当前1、历史0;默认1" |
||||
*/ |
||||
@Excel(name = "版本状态", width = 15) |
||||
@ApiModelProperty(value = "版本状态") |
||||
@Dict(dicCode = "verison_status") |
||||
private Integer verisonStatus; |
||||
/** |
||||
* 版本号 |
||||
* 顺序累加;初始值1 |
||||
*/ |
||||
@Excel(name = "版本号", width = 15) |
||||
@ApiModelProperty(value = "版本号") |
||||
private Integer verison; |
||||
} |
@ -0,0 +1,15 @@ |
||||
package org.jeecg.modules.modulex.mapper; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.jeecg.modules.modulex.entity.Modulex; |
||||
|
||||
/** |
||||
* @Description: 模块管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ModulexMapper extends BaseMapper<Modulex> { |
||||
|
||||
} |
@ -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.modulex.mapper.ModulexMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.modulex.service; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import org.jeecg.modules.modulex.entity.Modulex; |
||||
|
||||
/** |
||||
* @Description: 模块管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IModulexService extends IService<Modulex> { |
||||
|
||||
/** |
||||
* 得到最大的版本号 |
||||
*/ |
||||
Integer getMaxVersion(Integer verison); |
||||
} |
@ -0,0 +1,30 @@ |
||||
package org.jeecg.modules.modulex.service.impl; |
||||
|
||||
import org.jeecg.modules.modulex.entity.Modulex; |
||||
import org.jeecg.modules.modulex.mapper.ModulexMapper; |
||||
import org.jeecg.modules.modulex.service.IModulexService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
import java.util.List; |
||||
import java.util.Objects; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* @Description: 模块管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> implements IModulexService { |
||||
|
||||
/** |
||||
* 得到最大的版本号 |
||||
*/ |
||||
@Override |
||||
public Integer getMaxVersion(Integer verison) { |
||||
return this.list().size(); |
||||
} |
||||
} |
@ -0,0 +1,156 @@ |
||||
package org.jeecg.modules.projectUserRole.controller; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.projectUserRole.entity.ProjectUserRole; |
||||
import org.jeecg.modules.projectUserRole.service.IProjectUserRoleService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @Description: 管理项目用户角色 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="管理项目用户角色") |
||||
@RestController |
||||
@RequestMapping("/projectx/projectUserRole") |
||||
@Slf4j |
||||
public class ProjectUserRoleController extends JeecgController<ProjectUserRole, IProjectUserRoleService> { |
||||
@Autowired |
||||
private IProjectUserRoleService projectUserRoleService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param projectUserRole |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "管理项目用户角色-分页列表查询") |
||||
@ApiOperation(value="管理项目用户角色-分页列表查询", notes="管理项目用户角色-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(ProjectUserRole projectUserRole, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<ProjectUserRole> queryWrapper = QueryGenerator.initQueryWrapper(projectUserRole, req.getParameterMap()); |
||||
Page<ProjectUserRole> page = new Page<ProjectUserRole>(pageNo, pageSize); |
||||
IPage<ProjectUserRole> pageList = projectUserRoleService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param projectUserRole |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "管理项目用户角色-添加") |
||||
@ApiOperation(value="管理项目用户角色-添加", notes="管理项目用户角色-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody ProjectUserRole projectUserRole) { |
||||
projectUserRoleService.save(projectUserRole); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param projectUserRole |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "管理项目用户角色-编辑") |
||||
@ApiOperation(value="管理项目用户角色-编辑", notes="管理项目用户角色-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody ProjectUserRole projectUserRole) { |
||||
projectUserRoleService.updateById(projectUserRole); |
||||
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) { |
||||
projectUserRoleService.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.projectUserRoleService.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) { |
||||
ProjectUserRole projectUserRole = projectUserRoleService.getById(id); |
||||
if(projectUserRole==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectUserRole); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param projectUserRole |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectUserRole projectUserRole) { |
||||
return super.exportXls(request, projectUserRole, ProjectUserRole.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, ProjectUserRole.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,73 @@ |
||||
package org.jeecg.modules.projectUserRole.entity; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 管理项目用户角色 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("project_user_role") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="project_user_role对象", description="管理项目用户角色") |
||||
public class ProjectUserRole implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**项目id*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
private String projectId; |
||||
/**角色名称*/ |
||||
@Excel(name = "角色名称", width = 15) |
||||
@ApiModelProperty(value = "角色名称") |
||||
private String userRole; |
||||
/**角色描述*/ |
||||
@Excel(name = "角色描述", width = 15) |
||||
@ApiModelProperty(value = "角色描述") |
||||
private String pmDescribe; |
||||
/**父用户*/ |
||||
@Excel(name = "父用户", width = 15) |
||||
@ApiModelProperty(value = "父用户") |
||||
private String sourceId; |
||||
/**上级用户*/ |
||||
@Excel(name = "上级用户", width = 15) |
||||
@ApiModelProperty(value = "上级用户") |
||||
private String pid; |
||||
} |
@ -0,0 +1,15 @@ |
||||
package org.jeecg.modules.projectUserRole.mapper; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.jeecg.modules.projectUserRole.entity.ProjectUserRole; |
||||
|
||||
/** |
||||
* @Description: 管理项目用户角色 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ProjectUserRoleMapper extends BaseMapper<ProjectUserRole> { |
||||
|
||||
} |
@ -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.projectUserRole.mapper.ProjectUserRoleMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.projectUserRole.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import org.jeecg.modules.projectUserRole.entity.ProjectUserRole; |
||||
|
||||
/** |
||||
* @Description: 管理项目用户角色 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IProjectUserRoleService extends IService<ProjectUserRole> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.projectUserRole.service.impl; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.jeecg.modules.projectUserRole.entity.ProjectUserRole; |
||||
import org.jeecg.modules.projectUserRole.mapper.ProjectUserRoleMapper; |
||||
import org.jeecg.modules.projectUserRole.service.IProjectUserRoleService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @Description: 管理项目用户角色 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ProjectUserRoleServiceImpl extends ServiceImpl<ProjectUserRoleMapper, ProjectUserRole> implements IProjectUserRoleService { |
||||
|
||||
} |
@ -0,0 +1,156 @@ |
||||
package org.jeecg.modules.projectx.controller; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.projectx.entity.Projectx; |
||||
import org.jeecg.modules.projectx.service.IProjectxService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @Description: 项目管理 管理项目基本信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="项目管理 管理项目基本信息") |
||||
@RestController |
||||
@RequestMapping("/projectx/projectx") |
||||
@Slf4j |
||||
public class ProjectxController extends JeecgController<Projectx, IProjectxService> { |
||||
@Autowired |
||||
private IProjectxService projectxService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param projectx |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目管理 管理项目基本信息-分页列表查询") |
||||
@ApiOperation(value="项目管理 管理项目基本信息-分页列表查询", notes="项目管理 管理项目基本信息-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(Projectx projectx, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<Projectx> queryWrapper = QueryGenerator.initQueryWrapper(projectx, req.getParameterMap()); |
||||
Page<Projectx> page = new Page<Projectx>(pageNo, pageSize); |
||||
IPage<Projectx> pageList = projectxService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param projectx |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目管理 管理项目基本信息-添加") |
||||
@ApiOperation(value="项目管理 管理项目基本信息-添加", notes="项目管理 管理项目基本信息-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody Projectx projectx) { |
||||
projectxService.save(projectx); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param projectx |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目管理 管理项目基本信息-编辑") |
||||
@ApiOperation(value="项目管理 管理项目基本信息-编辑", notes="项目管理 管理项目基本信息-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody Projectx projectx) { |
||||
projectxService.updateById(projectx); |
||||
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) { |
||||
projectxService.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.projectxService.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) { |
||||
Projectx projectx = projectxService.getById(id); |
||||
if(projectx==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectx); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param projectx |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Projectx projectx) { |
||||
return super.exportXls(request, projectx, Projectx.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, Projectx.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,111 @@ |
||||
package org.jeecg.modules.projectx.entity; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 项目管理 管理项目基本信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("projectx") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="projectx对象", description="项目管理 管理项目基本信息") |
||||
public class Projectx implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**项目中文名称*/ |
||||
@Excel(name = "项目中文名称", width = 15) |
||||
@ApiModelProperty(value = "项目中文名称") |
||||
private String projectName; |
||||
/**项目英文名称*/ |
||||
@Excel(name = "项目英文名称", width = 15) |
||||
@ApiModelProperty(value = "项目英文名称") |
||||
private String projectEnName; |
||||
/**项目编码*/ |
||||
@Excel(name = "项目编码", width = 15) |
||||
@ApiModelProperty(value = "项目编码") |
||||
private String projectCode; |
||||
/**项目描述*/ |
||||
@Excel(name = "项目描述", width = 15) |
||||
@ApiModelProperty(value = "项目描述") |
||||
private String pmDescribe; |
||||
/**项目图片*/ |
||||
@Excel(name = "项目图片", width = 15) |
||||
@ApiModelProperty(value = "项目图片") |
||||
private String projectPic; |
||||
/**项目网址*/ |
||||
@Excel(name = "项目网址", width = 15) |
||||
@ApiModelProperty(value = "项目网址") |
||||
private String projectUrl; |
||||
/**源码地址*/ |
||||
@Excel(name = "源码地址", width = 15) |
||||
@ApiModelProperty(value = "源码地址") |
||||
private String projectCodeUrl; |
||||
/**数据库名*/ |
||||
@Excel(name = "数据库名", width = 15) |
||||
@ApiModelProperty(value = "数据库名") |
||||
private String projectDbName; |
||||
/**数据地址*/ |
||||
@Excel(name = "数据地址", width = 15) |
||||
@ApiModelProperty(value = "数据地址") |
||||
private String projectDbUrl; |
||||
/**开始时间*/ |
||||
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "开始时间") |
||||
private Date startTime; |
||||
/**完成时间*/ |
||||
@Excel(name = "完成时间", width = 15, format = "yyyy-MM-dd") |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
@ApiModelProperty(value = "完成时间") |
||||
private Date completeTime; |
||||
/**复制来源*/ |
||||
@Excel(name = "复制来源", width = 15) |
||||
@ApiModelProperty(value = "复制来源") |
||||
private String sourceProjectId; |
||||
/**项目状态*/ |
||||
@Excel(name = "项目状态", width = 15) |
||||
@ApiModelProperty(value = "项目状态") |
||||
@Dict(dicCode = "project_status") |
||||
private Integer projectStatus; |
||||
} |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.projectx.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.jeecg.modules.projectx.entity.Projectx; |
||||
|
||||
/** |
||||
* @Description: 项目管理 管理项目基本信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ProjectxMapper extends BaseMapper<Projectx> { |
||||
|
||||
} |
@ -0,0 +1,4 @@ |
||||
<?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.projectx.mapper.ProjectxMapper"> |
||||
</mapper> |
@ -0,0 +1,16 @@ |
||||
package org.jeecg.modules.projectx.service; |
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import org.jeecg.modules.projectx.entity.Projectx; |
||||
|
||||
/** |
||||
* @Description: 项目管理 管理项目基本信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IProjectxService extends IService<Projectx> { |
||||
|
||||
} |
@ -0,0 +1,18 @@ |
||||
package org.jeecg.modules.projectx.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.jeecg.modules.projectx.entity.Projectx; |
||||
import org.jeecg.modules.projectx.mapper.ProjectxMapper; |
||||
import org.jeecg.modules.projectx.service.IProjectxService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @Description: 项目管理 管理项目基本信息 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-10 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ProjectxServiceImpl extends ServiceImpl<ProjectxMapper, Projectx> implements IProjectxService { |
||||
|
||||
} |
Loading…
Reference in new issue