Merge remote-tracking branch 'origin/master'

master
admin 2 years ago
commit 67ae69ccab
  1. 6
      ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue
  2. 9
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  3. 18
      ant-design-vue-jeecg/src/utils/util.js
  4. 500
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  5. 279
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionxForm.vue
  6. 60
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal.vue
  7. 84
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionxModal__Style#Drawer.vue
  8. 300
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  9. 237
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexForm.vue
  10. 60
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexModal.vue
  11. 84
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexModal__Style#Drawer.vue
  12. 195
      ant-design-vue-jeecg/src/views/projectUserRole/ProjectUserRoleList.vue
  13. 124
      ant-design-vue-jeecg/src/views/projectUserRole/modules/ProjectUserRoleForm.vue
  14. 60
      ant-design-vue-jeecg/src/views/projectUserRole/modules/ProjectUserRoleModal.vue
  15. 84
      ant-design-vue-jeecg/src/views/projectUserRole/modules/ProjectUserRoleModal__Style#Drawer.vue
  16. 290
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  17. 193
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxForm.vue
  18. 60
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxModal.vue
  19. 84
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxModal__Style#Drawer.vue
  20. 274
      ant-design-vue-jeecg/src/views/rulex/RulexList.vue
  21. 227
      ant-design-vue-jeecg/src/views/rulex/modules/RulexForm.vue
  22. 60
      ant-design-vue-jeecg/src/views/rulex/modules/RulexModal.vue
  23. 84
      ant-design-vue-jeecg/src/views/rulex/modules/RulexModal__Style#Drawer.vue
  24. 8
      ant-design-vue-jeecg/src/views/system/DictList.vue
  25. 55369
      jeecg-boot/db/20221029-mysql.sql
  26. 10153
      jeecg-boot/db/project_management.sql
  27. 237
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  28. 147
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/Functionx.java
  29. 42
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/FunctionxMapper.java
  30. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/mapper/xml/FunctionxMapper.xml
  31. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
  32. 136
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
  33. 171
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java
  34. 130
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/entity/Rulex.java
  35. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/RulexMapper.java
  36. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/mapper/xml/RulexMapper.xml
  37. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/IRulexService.java
  38. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java
  39. 159
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  40. 163
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/entity/Modulex.java
  41. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/mapper/ModulexMapper.java
  42. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/mapper/xml/ModulexMapper.xml
  43. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
  44. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
  45. 156
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/controller/ProjectUserRoleController.java
  46. 73
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/entity/ProjectUserRole.java
  47. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/mapper/ProjectUserRoleMapper.java
  48. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/mapper/xml/ProjectUserRoleMapper.xml
  49. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/service/IProjectUserRoleService.java
  50. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectUserRole/service/impl/ProjectUserRoleServiceImpl.java
  51. 156
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/controller/ProjectxController.java
  52. 111
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/entity/Projectx.java
  53. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/mapper/ProjectxMapper.java
  54. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/mapper/xml/ProjectxMapper.xml
  55. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/service/IProjectxService.java
  56. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/service/impl/ProjectxServiceImpl.java
  57. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java
  58. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
  59. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml
  60. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/model/DuplicateCheckVo.java
  61. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
  62. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml

@ -58,7 +58,7 @@
@change="handleTableChange"
>
<!-- selectionRows 这个是 选择过的用户 selectedRowKeys 这个是 选择中的 用户
dataSource 这个是原始数据
dataSource 这个是原始数据
-->
</a-table>
</a-card>
@ -163,7 +163,7 @@ export default {
selectUserRows: {
deep: true,
handler() {
this.$bus.$emit('headleUser', {
restle: this.selectUserRows, //
userSelect: this._props.userSelect, //
@ -296,7 +296,7 @@ export default {
this.selectUserRows.push(row)
}
}
this.selectUserIds = this.selectUserRows.map((row) => row.username).join(',')
this.selectUserIds = this.selectUserRows.map((row) => row.id).join(',')
},
// ,
onDepSelect(selectedDepIds) {

@ -274,6 +274,15 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
},
fuzhi: function(record){
record.id=''
record.functionName=record.functionName+1
record.functionEnName=record.functionEnName+1
record.functionCode=record.functionCode+1
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false;
},
handleAdd: function () {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";

@ -358,6 +358,7 @@ export function jsExpand(options = {}) {
* @param callback
*/
export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, callback) {
if (fieldVal) {
let params = { tableName, fieldName, fieldVal, dataId }
api
@ -372,6 +373,23 @@ export function validateDuplicateValue(tableName, fieldName, fieldVal, dataId, c
callback()
}
}
export function validateDuplicateValue1(tableName, fieldName, fieldVal, dataId,moduleid, callback) {
if (fieldVal) {
let params = { tableName, fieldName, fieldVal, dataId ,moduleid}
api
.duplicateCheck(params)
.then((res) => {
res['success'] ? callback() : callback(res['message'])
})
.catch((err) => {
callback(err.message || err)
})
} else {
callback()
}
}
/**
* 根据编码校验规则code校验传入的值是否合法

@ -0,0 +1,500 @@
<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 :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文名称">
<a-input placeholder="中文名称" v-model="queryParam.functionName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文名称">
<a-input placeholder="英文名称" v-model="queryParam.functionEnName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="功能类型">
<j-dict-select-tag type="list" v-model="queryParam.functionType" dictCode="function_type" placeholder="请选择功能类型"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="任务状态">
<j-dict-select-tag type="list" v-model="queryParam.workStatus" dictCode="work_status" placeholder="请选择任务状态" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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>-->
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>
</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="action1" slot-scope="text, record">
<a @click="guize(record)">开发规则</a>
</span>
<span slot="action" slot-scope="text, record" v-if="role==2">
<a @click="fabu(record)" v-if="record.workStatus==0">发布</a>
<a v-else="">已发布</a>
<a-divider type="vertical" />
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical" />
<a @click="tijiao(record)">提交</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
<span slot="action" slot-scope="text, record" v-if="role==1">
<a @click="fabu(record)" v-if="record.workStatus==0">发布</a>
<a v-else="">已发布</a>
<a-divider type="vertical" />
<a @click="kaishi(record)">开始</a>
<a-divider type="vertical" />
<a @click="tijiao(record)">提交</a>
<a-divider type="vertical" />
<a @click="fuzhi(record)">复制</a>
<a-divider type="vertical" />
<a @click="cehui(record)">撤回</a>
<a-divider type="vertical" />
<a @click="fankui(record)">DEBUG</a>
<a-divider type="vertical" />
<a @click="shenhe(record)">审核</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<functionx-modal ref="modalForm" @ok="modalFormOk"></functionx-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import FunctionxModal from './modules/FunctionxModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import store from '@/store'
export default {
name: 'FunctionxList',
mixins:[JeecgListMixin, mixinDevice],
components: {
FunctionxModal
},
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: 'moduleId'
},
{
title:'中文名称',
align:"center",
dataIndex: 'functionName'
},
{
title:'英文名称',
align:"center",
dataIndex: 'functionEnName'
},
{
title:'功能编码',
align:"center",
dataIndex: 'functionCode'
},
{
title:'功能类型',
align:"center",
dataIndex: 'functionType_dictText'
},
{
title:'功能描述',
align:"center",
dataIndex: 'pmDescribe',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title:'分析图',
align:"center",
dataIndex: 'diagrams',
scopedSlots: {customRender: 'imgSlot'}
},
// {
// title:'',
// align:"center",
// dataIndex: 'userRole_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'managerUsers_dictText'
// },
{
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: 'startTime',
// customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text)
// }
},
{
title:'任务时长',
align:"center",
dataIndex: 'duration'
},
{
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: 'action1',
width:147,
scopedSlots: { customRender: 'action1' }
},
// {
// 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: "/functionx/functionx/list",
delete: "/functionx/functionx/delete",
deleteBatch: "/functionx/functionx/deleteBatch",
exportXlsUrl: "/functionx/functionx/exportXls",
importExcelUrl: "functionx/functionx/importExcel",
loginrole:'functionx/functionx/loginrole',
fabu:'functionx/functionx/fabu',
kaishi:'functionx/functionx/kaishi',
tijiao:'functionx/functionx/tijiao',
cehui:'functionx/functionx/cehui',
shenhe:'functionx/functionx/shenhe'
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
role:'',
queryParam:{},
}
},
created() {
let usercode = store.getters.userInfo.id
//id
this.loginrole(usercode)
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
shenhe(record){
getAction(this.url.shenhe,{id:record.id}).then((res)=>{
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
},
cehui(record){
getAction(this.url.cehui,{id:record.id}).then((res)=>{
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
},
tijiao(record){
getAction(this.url.tijiao,{id:record.id}).then((res)=>{
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
},
kaishi(record){
getAction(this.url.kaishi,{id:record.id}).then((res)=>{
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
},
//
fabu(record){
getAction(this.url.fabu,{id:record.id}).then((res)=>{
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}
})
},
loginrole(id){
getAction(this.url.loginrole,{id:id}).then((res)=>{
if (res.success) {
//
this.role=res.result;
}
})
},
guize(record){
this.$router.push({
/*返回产品*/
path: '/src/views/rulex/RulexList',/*在引号中填写返回vue*/
query:{
moduleid:record.moduleId,
functionid:record.id
},
});
},
fanhui(){
this.$router.push({
/*返回产品*/
path: '',/*在引号中填写返回vue*/
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'moduleId',text:'对应模块id',dictCode:''})
fieldList.push({type:'string',value:'functionName',text:'中文名称',dictCode:''})
fieldList.push({type:'string',value:'functionEnName',text:'英文名称',dictCode:''})
fieldList.push({type:'string',value:'functionCode',text:'功能编码',dictCode:''})
fieldList.push({type:'int',value:'functionType',text:'功能类型',dictCode:''})
fieldList.push({type:'string',value:'pmDescribe',text:'功能描述',dictCode:''})
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''})
fieldList.push({type:'list_multi',value:'userRole',text:'用户角色',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'sel_user',value:'managerUsers',text:'责任人'})
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:'date',value:'startTime',text:'开始时间'})
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''})
fieldList.push({type:'date',value:'submitTime',text:'提交时间'})
fieldList.push({type:'double',value:'realDuration',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
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.moduleid;
// console.log("***********")
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.moduleId = this.$route.query.moduleid;
return filterObj(param);
},
searchReset() {
this.queryParam=''
this.loadData();
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,279 @@
<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/add",
edit: "/functionx/functionx/edit",
queryById: "/functionx/functionx/queryById",
bianma:'/functionx/functionx/bianma'
},
moduleid:'',
modulecode:'',
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.moduleid=this.$route.query.moduleid
this.model.moduleId=this.$route.query.moduleid
//
this.modulebianma(this.moduleid)
this.modelDefault = JSON.parse(JSON.stringify(this.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 () {
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="关闭">
<functionx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></functionx-form>
</j-modal>
</template>
<script>
import FunctionxForm from './FunctionxForm'
export default {
name: 'FunctionxModal',
components: {
FunctionxForm
},
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">
<functionx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></functionx-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 FunctionxForm from './FunctionxForm'
export default {
name: 'FunctionxModal',
components: {
FunctionxForm
},
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,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,274 @@
<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>
<rulex-modal ref="modalForm" @ok="modalFormOk"></rulex-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RulexModal from './modules/RulexModal'
export default {
name: 'RulexList',
mixins:[JeecgListMixin, mixinDevice],
components: {
RulexModal
},
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: 'moduleId'
},
{
title:'对应功能id',
align:"center",
dataIndex: 'functionId'
},
{
title:'规则序号',
align:"center",
dataIndex: 'ruleNo'
},
{
title:'规则编码',
align:"center",
dataIndex: 'ruleCode'
},
{
title:'规则描述',
align:"center",
dataIndex: 'pmDescribe'
},
{
title:'分析图',
align:"center",
dataIndex: 'diagrams',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'对应实体id',
align:"center",
dataIndex: 'tableId_dictText'
},
{
title:'对应字段',
align:"center",
dataIndex: 'fieldId_dictText'
},
{
title:'责任人',
align:"center",
dataIndex: 'managerUsers'
},
{
title:'任务等级',
align:"center",
dataIndex: 'workLevel_dictText'
},
{
title:'任务状态',
align:"center",
dataIndex: 'workStatus_dictText'
},
{
title:'开始时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'任务时长',
align:"center",
dataIndex: 'duration'
},
{
title:'提交时间',
align:"center",
dataIndex: 'submitTime'
},
{
title:'实际时长',
align:"center",
dataIndex: 'realDuration'
},
{
title:'规则状态',
align:"center",
dataIndex: 'status'
},
{
title:'版本状态',
align:"center",
dataIndex: 'verisonStatus'
},
{
title:'版本号',
align:"center",
dataIndex: 'verison'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rulex/rulex/list",
delete: "/rulex/rulex/delete",
deleteBatch: "/rulex/rulex/deleteBatch",
exportXlsUrl: "/rulex/rulex/exportXls",
importExcelUrl: "rulex/rulex/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:'moduleId',text:'对应模块id',dictCode:''})
fieldList.push({type:'string',value:'functionId',text:'对应功能id',dictCode:''})
fieldList.push({type:'string',value:'ruleNo',text:'规则序号',dictCode:''})
fieldList.push({type:'string',value:'ruleCode',text:'规则编码',dictCode:''})
fieldList.push({type:'string',value:'pmDescribe',text:'规则描述',dictCode:''})
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''})
fieldList.push({type:'string',value:'tableId',text:'对应实体id',dictCode:''})
fieldList.push({type:'string',value:'fieldId',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:'datetime',value:'startTime',text:'开始时间'})
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''})
fieldList.push({type:'datetime',value:'submitTime',text:'提交时间'})
fieldList.push({type:'double',value:'realDuration',text:'实际时长',dictCode:''})
fieldList.push({type:'int',value:'status',text:'规则状态',dictCode:''})
fieldList.push({type:'int',value:'verisonStatus',text:'版本状态',dictCode:''})
fieldList.push({type:'string',value:'verison',text:'版本号',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,227 @@
<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="请输入规则序号" ></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="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="diagrams">
<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="对应实体id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableId">
<j-dict-select-tag type="list" v-model="model.tableId" dictCode="" placeholder="请选择对应实体id" />
</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="" 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="" 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="startTime">
<j-date placeholder="请选择开始时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" 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" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" 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">
<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 v-model="model.verison" 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: 'RulexForm',
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: {
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/add",
edit: "/rulex/rulex/edit",
queryById: "/rulex/rulex/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.model.moduleId=this.$route.query.moduleid
this.model.functionId=this.$route.query.functionid
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="关闭">
<rulex-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rulex-form>
</j-modal>
</template>
<script>
import RulexForm from './RulexForm'
export default {
name: 'RulexModal',
components: {
RulexForm
},
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">
<rulex-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rulex-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 RulexForm from './RulexForm'
export default {
name: 'RulexModal',
components: {
RulexForm
},
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>

@ -115,6 +115,12 @@
align: "left",
dataIndex: 'description',
},
{
title: '创建时间',
align: "center",
sorter: true,
dataIndex: 'createTime',
},
{
title: '操作',
dataIndex: 'action',
@ -204,5 +210,5 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,237 @@
package org.jeecg.modules.demo.functionx.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.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
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-04-10
* @Version: V1.0
*/
@Api(tags="功能管理")
@RestController
@RequestMapping("/functionx/functionx")
@Slf4j
public class FunctionxController extends JeecgController<Functionx, IFunctionxService> {
@Autowired
private IFunctionxService functionxService;
/**
* 分页列表查询
*
* @param functionx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "功能管理-分页列表查询")
@ApiOperation(value="功能管理-分页列表查询", notes="功能管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Functionx functionx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<Functionx> queryWrapper = QueryGenerator.initQueryWrapper(functionx, req.getParameterMap());
//判断一下登陆人,如果是项目负责人,就可以看到所有,如果是参与干活的人,只能看到自己参与的
QueryWrapper<Functionx> queryWrapper=new QueryWrapper<>();
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxService.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
}else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId());
}
queryWrapper.eq("module_id",functionx.getModuleId());
queryWrapper.orderByDesc("work_level");
if(functionx.getFunctionName()!=null){
queryWrapper.like("function_name",functionx.getFunctionName());
}
if(functionx.getFunctionEnName()!=null){
queryWrapper.like("function_en_name",functionx.getFunctionEnName());
}
if(functionx.getWorkStatus()!=null){
queryWrapper.eq("work_status",functionx.getWorkStatus());
}
if(functionx.getFunctionType()!=null){
queryWrapper.eq("function_type",functionx.getFunctionType());
}
Page<Functionx> page = new Page<Functionx>(pageNo, pageSize);
IPage<Functionx> pageList = functionxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param functionx
* @return
*/
@AutoLog(value = "功能管理-添加")
@ApiOperation(value="功能管理-添加", notes="功能管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Functionx functionx) {
functionxService.save(functionx);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param functionx
* @return
*/
@AutoLog(value = "功能管理-编辑")
@ApiOperation(value="功能管理-编辑", notes="功能管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Functionx functionx) {
functionxService.updateById(functionx);
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) {
functionxService.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.functionxService.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) {
Functionx functionx = functionxService.getById(id);
if(functionx==null) {
return Result.error("未找到对应数据");
}
return Result.OK(functionx);
}
/**
* 导出excel
*
* @param request
* @param functionx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Functionx functionx) {
return super.exportXls(request, functionx, Functionx.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, Functionx.class);
}
//获得模块管理的编码,填充给功能编码
@GetMapping(value = "/bianma")
public Result<?> moduleCode(@RequestParam(name="id",required=true) String id) {
String s=functionxService.findModuleCode(id);
//后期放入返回值中,当前为返回信息
System.out.println(s);
return Result.OK("编码");
}
//在主界面判断一下登录角色,对操作栏进行替换
@GetMapping(value = "/loginrole")
public Result<?> loginrole(@RequestParam(name="id",required=true) String id) {
List<String> list=functionxService.findRole(id);
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else
return Result.OK("2");
}
@GetMapping(value = "/fabu")
public Result<?> fabu(@RequestParam(name="id",required=true) String id) {
return functionxService.fabu(id);
}
@GetMapping(value = "/kaishi")
public Result<?> kaishi(@RequestParam(name="id",required=true) String id) {
return functionxService.kaishi(id);
}
@GetMapping(value = "/tijiao")
public Result<?> tijiao(@RequestParam(name="id",required=true) String id) {
return functionxService.tijiao(id);
}
@GetMapping(value = "/cehui")
public Result<?> cehui(@RequestParam(name="id",required=true) String id) {
return functionxService.cehui(id);
}
@GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) {
return functionxService.shenhe(id);
}
}

@ -0,0 +1,147 @@
package org.jeecg.modules.demo.functionx.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-04-10
* @Version: V1.0
*/
@Data
@TableName("functionx")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="functionx对象", description="功能管理")
public class Functionx 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;
/**对应模块id*/
@Excel(name = "对应模块id", width = 15)
@ApiModelProperty(value = "对应模块id")
// @Dict(dictTable = "modulex",dicCode = "id",dicText = "module_name")
private java.lang.String moduleId;
/**中文名称*/
@Excel(name = "中文名称", width = 15)
@ApiModelProperty(value = "中文名称")
private java.lang.String functionName;
/**英文名称*/
@Excel(name = "英文名称", width = 15)
@ApiModelProperty(value = "英文名称")
private java.lang.String functionEnName;
/**功能编码*/
@Excel(name = "功能编码", width = 15)
@ApiModelProperty(value = "功能编码")
private java.lang.String functionCode;
/**功能
* 列表0增加1删除2修改3查看4导入5导出6其它99默认99
* 类型*/
@Excel(name = "功能类型", width = 15)
@ApiModelProperty(value = "功能类型")
@Dict(dicCode = "function_type")
private java.lang.Integer functionType;
/**功能描述*/
@Excel(name = "功能描述", width = 15)
@ApiModelProperty(value = "功能描述")
private java.lang.String pmDescribe;
/**分析图*/
@Excel(name = "分析图", width = 15)
@ApiModelProperty(value = "分析图")
private java.lang.String diagrams;
/**用户角色*/
@Excel(name = "用户角色", width = 15)
@ApiModelProperty(value = "用户角色")
private java.lang.String userRole;
/**责任人*/
@Excel(name = "责任人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "责任人")
private java.lang.String managerUsers;
/**任务等级*/
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级")
@Dict(dicCode = "work_level")
private java.lang.Integer workLevel;
/**任务状
* 未发布0已发布1开发中2已完成3已审核4DEBUG9默认0
* */
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态")
@Dict(dicCode = "work_status")
private java.lang.Integer workStatus;
/**发布时间*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd")
@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 publishTime;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@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 startTime;
/**任务时长*/
@Excel(name = "任务时长", width = 15)
@ApiModelProperty(value = "任务时长")
private java.lang.Double duration;
/**提交时间*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd")
@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 submitTime;
/**实际时长*/
@Excel(name = "实际时长", width = 15)
@ApiModelProperty(value = "实际时长")
private java.lang.Double realDuration;
/**功能状态*/
@Excel(name = "功能状态", width = 15)
@ApiModelProperty(value = "功能状态")
@Dict(dicCode = "status")
private java.lang.Integer status;
/**版本状态*/
@Excel(name = "版本状态", width = 15)
@ApiModelProperty(value = "版本状态")
@Dict(dicCode = "verison_status")
private java.lang.Integer verisonStatus;
/**版本号*/
@Excel(name = "版本号", width = 15)
@ApiModelProperty(value = "版本号")
private java.lang.Integer verison;
}

@ -0,0 +1,42 @@
package org.jeecg.modules.demo.functionx.mapper;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* @Description: 功能管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
@Repository
public interface FunctionxMapper extends BaseMapper<Functionx> {
@Select("select module_code from modulex where id=#{id}")
String findModuleCode(String id);
@Select("select role_id from sys_user_role where user_id=#{id}")
List<String> findRole(String id);
@Update("update rulex set work_status=1 where function_id=#{id} and work_status=0")
void updateruleByFunctionId(String id);
@Update("update rulex set work_status=2,submit_time=#{date},real_duration=#{v} where function_id=#{id} and work_status=2")
void updateruleByFunctionIdStartTime(@Param("id") String id, @Param("date") Date date,@Param("v") Double v);
@Update("update rulex set work_status=2,start_time=#{date} where function_id=#{id} and work_status=1")
void updateruleByFunctionIdStart(@Param("id")String id,@Param("date") Date date);
//撤回
@Update("update rulex set work_status=2,submit_time=null,real_duration=null where function_id=#{id} ")
void rule(String id);
//审核
@Update("update rulex set work_status=4 where function_id=#{id} and work_status=3")
void uprule(String id);
@Update("update functionx set work_status=2,submit_time=null,real_duration=null where id=#{id} ")
void cehui(String id);
}

@ -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.functionx.mapper.FunctionxMapper">
</mapper>

@ -0,0 +1,30 @@
package org.jeecg.modules.demo.functionx.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 功能管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface IFunctionxService extends IService<Functionx> {
String findModuleCode(String id);
List<String> findRole(String id);
Result<?> fabu(String id);
Result<?> kaishi(String id);
Result<?> tijiao(String id);
Result<?> cehui(String id);
Result<?> shenhe(String id);
}

@ -0,0 +1,136 @@
package org.jeecg.modules.demo.functionx.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description: 功能管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
@Service
public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx> implements IFunctionxService {
@Autowired
FunctionxMapper functionxMapper;
@Override
public String findModuleCode(String id) {
return functionxMapper.findModuleCode(id);
}
@Override
public List<String> findRole(String id) {
return functionxMapper.findRole(id);
}
@Override
public Result<?> fabu(String id) {
Functionx functionx = functionxMapper.selectById(id);
//先判断一下当前是什么状态,如果不是处于未发布状态就不让发布
//先改变功能的状态,变为已发布
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==0){
functionx.setWorkStatus(1);
functionx.setPublishTime(new Date());
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionId(id);
return Result.OK("发布成功!!");
}else{
return Result.error("当前功能已发布!!!");
}
}
@Override
public Result<?> kaishi(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==0)
return Result.error("请先进行发布!!!");
else if(functionx.getWorkStatus()==1){
functionx.setWorkStatus(2);
functionx.setStartTime(new Date());
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStart(id,new Date());
return Result.OK("开始工作!!");
}else if(functionx.getWorkStatus()==2){
return Result.error("已经开始!!!");
}else {
return Result.error("当前不处于开始阶段!!!");
}
}
@Override
public Result<?> tijiao(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==1)
return Result.error("请先开始工作!!!");
else if(functionx.getWorkStatus()==2){
functionx.setWorkStatus(3);
functionx.setSubmitTime(new Date());
//获得实际工作时间
//更新规则的提交时间还有时长
long a=(new Date().getTime()-functionx.getStartTime().getTime());
String s=""+a;
BigDecimal bigDecimal=new BigDecimal(s);
BigDecimal divide = bigDecimal.divide(new BigDecimal("3600000"),1,BigDecimal.ROUND_HALF_UP);
double v = Double.parseDouble(divide.toString());
functionx.setRealDuration(v);
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStartTime(id,new Date(),v);
return Result.OK("提交成功!!");
}else if(functionx.getWorkStatus()==3){
return Result.error("已提交!!!");
}else{
return Result.error("当前不属于提交阶段!!!");
}
}
@Override
public Result<?> cehui(String id) {
Functionx functionx = functionxMapper.selectById(id);
if(functionx.getWorkStatus()==2){
return Result.error("正处于开发中!!");
}
// functionxMapper.updateById(functionx);
functionxMapper.cehui(id);
//工作状态全部开发者,提交时间null,真实工作时间null
functionxMapper.rule(id);
return Result.OK("撤回成功!!!");
}
@Override
public Result<?> shenhe(String id) {
Functionx functionx = functionxMapper.selectById(id);
if(functionx.getWorkStatus()==3){
functionx.setWorkStatus(4);
functionxMapper.updateById(functionx);
functionxMapper.uprule(id);
return Result.OK("审核通过!!1");
}
if(functionx.getWorkStatus()==4){
return Result.error("已审核!!!");
}
if(functionx.getWorkStatus()<3){
return Result.error("请先完成之前的步骤");
}
if(functionx.getWorkStatus()==9){
return Result.error("出现BUG,请先解决");
}
return null;
}
}

@ -0,0 +1,171 @@
package org.jeecg.modules.demo.rulex.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.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.service.IRulexService;
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-04-10
* @Version: V1.0
*/
@Api(tags="规则管理")
@RestController
@RequestMapping("/rulex/rulex")
@Slf4j
public class RulexController extends JeecgController<Rulex, IRulexService> {
@Autowired
private IRulexService rulexService;
/**
* 分页列表查询
*
* @param rulex
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "规则管理-分页列表查询")
@ApiOperation(value="规则管理-分页列表查询", notes="规则管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Rulex rulex,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Rulex> queryWrapper = QueryGenerator.initQueryWrapper(rulex, req.getParameterMap());
Page<Rulex> page = new Page<Rulex>(pageNo, pageSize);
IPage<Rulex> pageList = rulexService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param rulex
* @return
*/
@AutoLog(value = "规则管理-添加")
@ApiOperation(value="规则管理-添加", notes="规则管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Rulex rulex) {
rulexService.save(rulex);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param rulex
* @return
*/
@AutoLog(value = "规则管理-编辑")
@ApiOperation(value="规则管理-编辑", notes="规则管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Rulex rulex) {
rulexService.updateById(rulex);
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) {
rulexService.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.rulexService.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) {
Rulex rulex = rulexService.getById(id);
if(rulex==null) {
return Result.error("未找到对应数据");
}
return Result.OK(rulex);
}
/**
* 导出excel
*
* @param request
* @param rulex
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Rulex rulex) {
return super.exportXls(request, rulex, Rulex.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, Rulex.class);
}
}

@ -0,0 +1,130 @@
package org.jeecg.modules.demo.rulex.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-04-10
* @Version: V1.0
*/
@Data
@TableName("rulex")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rulex对象", description="规则管理")
public class Rulex 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;
/**对应模块id*/
@Excel(name = "对应模块id", width = 15)
@ApiModelProperty(value = "对应模块id")
private java.lang.String moduleId;
/**对应功能id*/
@Excel(name = "对应功能id", width = 15)
@ApiModelProperty(value = "对应功能id")
private java.lang.String functionId;
/**规则序号*/
@Excel(name = "规则序号", width = 15)
@ApiModelProperty(value = "规则序号")
private java.lang.String ruleNo;
/**规则编码*/
@Excel(name = "规则编码", width = 15)
@ApiModelProperty(value = "规则编码")
private java.lang.String ruleCode;
/**规则描述*/
@Excel(name = "规则描述", width = 15)
@ApiModelProperty(value = "规则描述")
private java.lang.String pmDescribe;
/**分析图*/
@Excel(name = "分析图", width = 15)
@ApiModelProperty(value = "分析图")
private java.lang.String diagrams;
/**对应实体id*/
@Excel(name = "对应实体id", width = 15)
@ApiModelProperty(value = "对应实体id")
private java.lang.String tableId;
/**对应字段*/
@Excel(name = "对应字段", width = 15)
@ApiModelProperty(value = "对应字段")
private java.lang.String fieldId;
/**责任人*/
@Excel(name = "责任人", width = 15)
@ApiModelProperty(value = "责任人")
private java.lang.String managerUsers;
/**任务等级*/
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级")
private java.lang.Integer workLevel;
/**任务状态*/
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态")
private java.lang.Integer workStatus;
/**开始时间*/
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@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 startTime;
/**任务时长*/
@Excel(name = "任务时长", width = 15)
@ApiModelProperty(value = "任务时长")
private java.lang.Double duration;
/**提交时间*/
@Excel(name = "提交时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@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 submitTime;
/**实际时长*/
@Excel(name = "实际时长", width = 15)
@ApiModelProperty(value = "实际时长")
private java.lang.Double realDuration;
/**规则状态*/
@Excel(name = "规则状态", width = 15)
@ApiModelProperty(value = "规则状态")
private java.lang.Integer status;
/**版本状态*/
@Excel(name = "版本状态", width = 15)
@ApiModelProperty(value = "版本状态")
private java.lang.Integer verisonStatus;
/**版本号*/
@Excel(name = "版本号", width = 15)
@ApiModelProperty(value = "版本号")
private java.lang.String verison;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.rulex.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 规则管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface RulexMapper extends BaseMapper<Rulex> {
}

@ -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.rulex.mapper.RulexMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.rulex.service;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 规则管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface IRulexService extends IService<Rulex> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.rulex.service.impl;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
import org.jeecg.modules.demo.rulex.service.IRulexService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 规则管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
@Service
public class RulexServiceImpl extends ServiceImpl<RulexMapper, Rulex> implements IRulexService {
}

@ -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;
/**
* 任务等级
* 12345默认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 {
}

@ -34,7 +34,7 @@ public class DuplicateCheckController {
/**
* 校验数据是否在系统中是否存在
*
*
* @return
*/
@RequestMapping(value = "/check", method = RequestMethod.GET)
@ -47,14 +47,25 @@ public class DuplicateCheckController {
//SQL注入校验(只限制非法串改数据库)
final String[] sqlInjCheck = {duplicateCheckVo.getTableName(),duplicateCheckVo.getFieldName()};
SqlInjectionUtil.filterContent(sqlInjCheck);
if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
// [2].编辑页面校验
num = sysDictMapper.duplicateCheckCountSql(duplicateCheckVo);
} else {
// [1].添加页面校验
num = sysDictMapper.duplicateCheckCountSqlNoDataId(duplicateCheckVo);
if(duplicateCheckVo.getModuleid()!=null){
if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
// [2].编辑页面校验
num = sysDictMapper.duplicateCheckCountSql1(duplicateCheckVo);
} else {
// [1].添加页面校验
num = sysDictMapper.duplicateCheckCountSqlNoDataId1(duplicateCheckVo);
}
}else{
if (StringUtils.isNotBlank(duplicateCheckVo.getDataId())) {
// [2].编辑页面校验
num = sysDictMapper.duplicateCheckCountSql(duplicateCheckVo);
} else {
// [1].添加页面校验
num = sysDictMapper.duplicateCheckCountSqlNoDataId(duplicateCheckVo);
}
}
if (num == null || num == 0) {
// 该值可用
return Result.ok("该值可用!");

@ -25,14 +25,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @since 2018-12-28
*/
public interface SysDictMapper extends BaseMapper<SysDict> {
/**
* 重复检查SQL
* @return
*/
public Long duplicateCheckCountSql(DuplicateCheckVo duplicateCheckVo);
public Long duplicateCheckCountSqlNoDataId(DuplicateCheckVo duplicateCheckVo);
public List<DictModel> queryDictItemsByCode(@Param("code") String code);
@Deprecated
@ -58,13 +58,13 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
* @return
*/
public List<DictModel> queryAllDepartBackDictModel();
/**
* 查询所有用户 作为字典信息 username -->value,realname -->text
* @return
*/
public List<DictModel> queryAllUserBackDictModel();
/**
* 通过关键字查询出字典表
* @param table
@ -153,4 +153,13 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
* @return
*/
List<DictModel> queryAllTableDictItems(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql);
/*
* 针对模块中的功能点
* */
Long duplicateCheckCountSql1(DuplicateCheckVo duplicateCheckVo);
Long duplicateCheckCountSqlNoDataId1(DuplicateCheckVo duplicateCheckVo);
}

@ -8,10 +8,10 @@
where dict_id = (select id from sys_dict where dict_code = #{code})
order by s.sort_order asc
</select>
<!-- 通过字典code获取字典数据 -->
<select id="queryDictTextByKey" parameterType="String" resultType="String">
select s.item_text from sys_dict_item s
select s.item_text from sys_dict_item s
where s.dict_id = (select id from sys_dict where dict_code = #{code})
and s.item_value = #{key}
</select>
@ -21,7 +21,7 @@
<select id="queryTableDictItemsByCode" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel">
select ${text} as "text",${code} as "value" from ${table}
</select>
<!--通过查询指定table的 text code 获取字典(指定查询条件)-->
<select id="queryTableDictItemsByCodeAndFilter" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel">
select ${text} as "text",${code} as "value" from ${table}
@ -29,7 +29,7 @@
where ${filterSql}
</if>
</select>
<!--通过查询指定table的 text code key 获取字典值-->
<select id="queryTableDictTextByKey" parameterType="String" resultType="String">
select ${text} as "text" from ${table} where ${code}= #{key}
@ -47,27 +47,36 @@
<select id="duplicateCheckCountSql" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id &lt;&gt; #{dataId}
</select>
<!-- 重复校验 sql语句 -->
<select id="duplicateCheckCountSqlNoDataId" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal}
</select>
<!-- 重复校验 sql语句 -->
<select id="duplicateCheckCountSql1" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id &lt;&gt; #{dataId} and module_id=#{moduleid}
</select>
<!-- 重复校验 sql语句 -->
<select id="duplicateCheckCountSqlNoDataId1" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and module_id=#{moduleid}
</select>
<!-- 查询部门信息 作为字典数据 -->
<select id="queryAllDepartBackDictModel" resultType="org.jeecg.common.system.vo.DictModel">
select id as "value",depart_name as "text" from sys_depart where del_flag = '0'
</select>
<!-- 查询用户信息 作为字典数据 -->
<select id="queryAllUserBackDictModel" resultType="org.jeecg.common.system.vo.DictModel">
select username as "value",realname as "text" from sys_user where del_flag = '0'
</select>
<!--通过查询指定table的 text code 获取字典数据,且支持关键字查询 -->
<select id="queryTableDictItems" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel">
select ${text} as "text",${code} as "value" from ${table} where ${text} like #{keyword}
</select>
<!-- 根据表名、显示字段名、存储字段名、父ID查询树 -->
<select id="queryTreeList" parameterType="Object" resultType="org.jeecg.modules.system.model.TreeSelectModel">
select ${text} as "title",

@ -1,6 +1,8 @@
package org.jeecg.modules.system.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -22,23 +24,27 @@ public class DuplicateCheckVo implements Serializable {
*/
@ApiModelProperty(value="表名",name="tableName",example="sys_log")
private String tableName;
/**
* 字段名
*/
@ApiModelProperty(value="字段名",name="fieldName",example="id")
private String fieldName;
/**
* 字段值
*/
@ApiModelProperty(value="字段值",name="fieldVal",example="1000")
private String fieldVal;
/**
* 数据ID
*/
@ApiModelProperty(value="数据ID",name="dataId",example="2000")
private String dataId;
}
@ApiModelProperty(value="数据ID",name="dataId",example="2000")
@TableField(exist = false)
private String moduleid;
}

@ -143,7 +143,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
database: 3
host: 127.0.0.1
lettuce:
pool:

@ -144,7 +144,7 @@ spring:
#driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
database: 3
host: 182.92.169.222
lettuce:
pool:

Loading…
Cancel
Save