master
赵玉瑞 2 years ago
parent af5a9a643c
commit 33cfc36560
  1. 178
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 134
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 261
      ant-design-vue-jeecg/src/views/modulex/modules/BugxForm.vue
  4. 1
      ant-design-vue-jeecg/src/views/modulex/modules/BugxModal.vue
  5. 14
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexForm.vue
  6. 2
      ant-design-vue-jeecg/src/views/projectUserRole/ProjectUserRoleList.vue
  7. 6
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  8. 243
      ant-design-vue-jeecg/src/views/projectx/modules/ProjectxForm.vue
  9. 397
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  10. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  11. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/entity/Modulex.java
  12. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/IModulexService.java
  13. 53
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java
  14. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/projectx/entity/Projectx.java

@ -3,27 +3,27 @@
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal * 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除 * data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
*/ */
import { filterObj } from '@/utils/util'; import {filterObj} from '@/utils/util';
import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage' import {deleteAction, getAction, downFile, getFileAccessHttpUrl} from '@/api/manage'
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types" import {ACCESS_TOKEN, TENANT_ID} from "@/store/mutation-types"
import store from '@/store' import store from '@/store'
import {Modal} from 'ant-design-vue' import {Modal} from 'ant-design-vue'
export const JeecgListMixin = { export const JeecgListMixin = {
data(){ data() {
return { return {
pagedOld:{ pagedOld: {
record:{}, record: {},
title:"", title: "",
}, },
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */ /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
queryParam: {}, queryParam: {},
/* 数据源 */ /* 数据源 */
dataSource:[], dataSource: [],
/* 分页参数 */ /* 分页参数 */
ipagination:{ ipagination: {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
pageSizeOptions: ['10', '20', '30'], pageSizeOptions: ['10', '20', '30'],
@ -35,22 +35,22 @@ export const JeecgListMixin = {
total: 0 total: 0
}, },
/* 排序参数 */ /* 排序参数 */
isorter:{ isorter: {
column: 'createTime', column: 'createTime',
order: 'desc', order: 'desc',
}, },
/* 筛选参数 */ /* 筛选参数 */
filters: {}, filters: {},
/* table加载状态 */ /* table加载状态 */
loading:false, loading: false,
/* table选中keys*/ /* table选中keys*/
selectedRowKeys: [], selectedRowKeys: [],
/* table选中records*/ /* table选中records*/
selectionRows: [], selectionRows: [],
/* 查询折叠 */ /* 查询折叠 */
toggleSearchStatus:false, toggleSearchStatus: false,
/* 高级查询条件生效状态 */ /* 高级查询条件生效状态 */
superQueryFlag:false, superQueryFlag: false,
/* 高级查询条件 */ /* 高级查询条件 */
superQueryParams: '', superQueryParams: '',
/** 高级查询拼接方式 */ /** 高级查询拼接方式 */
@ -58,30 +58,30 @@ export const JeecgListMixin = {
} }
}, },
created() { created() {
if(!this.disableMixinCreated){ if (!this.disableMixinCreated) {
console.log(' -- mixin created -- ') console.log(' -- mixin created -- ')
this.loadData(); this.loadData();
//初始化字典配置 在自己页面定义 //初始化字典配置 在自己页面定义
this.initDictConfig(); this.initDictConfig();
} }
this.$bus.$on('getInfo', (oldFunction) => { this.$bus.$on('getInfo', (oldFunction) => {
oldFunction(this.pagedOld) oldFunction(this.pagedOld)
}) })
}, },
computed: { computed: {
//token header //token header
tokenHeader(){ tokenHeader() {
let head = {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)} let head = {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)}
let tenantid = Vue.ls.get(TENANT_ID) let tenantid = Vue.ls.get(TENANT_ID)
if(tenantid){ if (tenantid) {
head['tenant-id'] = tenantid head['tenant-id'] = tenantid
} }
return head; return head;
} }
}, },
methods:{ methods: {
loadData(arg) { loadData(arg) {
if(!this.url.list){ if (!this.url.list) {
this.$message.error("请设置url.list属性!") this.$message.error("请设置url.list属性!")
return return
} }
@ -94,32 +94,31 @@ export const JeecgListMixin = {
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
if (res.success) { if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result; this.dataSource = res.result.records || res.result;
if(res.result.total) if (res.result.total) {
{
this.ipagination.total = res.result.total; this.ipagination.total = res.result.total;
}else{ } else {
this.ipagination.total = 0; this.ipagination.total = 0;
} }
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
} }
if(res.code===510){ if (res.code === 510) {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
this.loading = false; this.loading = false;
}) })
}, },
initDictConfig(){ initDictConfig() {
console.log("--这是一个假的方法!") console.log("--这是一个假的方法!")
}, },
handleSuperQuery(params, matchType) { handleSuperQuery(params, matchType) {
//高级查询方法 //高级查询方法
if(!params){ if (!params) {
this.superQueryParams='' this.superQueryParams = ''
this.superQueryFlag = false this.superQueryFlag = false
}else{ } else {
this.superQueryFlag = true this.superQueryFlag = true
this.superQueryParams=JSON.stringify(params) this.superQueryParams = JSON.stringify(params)
this.superQueryMatchType = matchType this.superQueryMatchType = matchType
} }
this.loadData(1) this.loadData(1)
@ -127,11 +126,11 @@ export const JeecgListMixin = {
getQueryParams() { getQueryParams() {
//获取查询条件 //获取查询条件
let sqp = {} let sqp = {}
if(this.superQueryParams){ if (this.superQueryParams) {
sqp['superQueryParams']=encodeURI(this.superQueryParams) sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType sqp['superQueryMatchType'] = this.superQueryMatchType
} }
var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField(); param.field = this.getQueryField();
param.pageNo = this.ipagination.current; param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize; param.pageSize = this.ipagination.pageSize;
@ -165,7 +164,7 @@ export const JeecgListMixin = {
this.loadData(1); this.loadData(1);
}, },
batchDel: function () { batchDel: function () {
if(!this.url.deleteBatch){ if (!this.url.deleteBatch) {
this.$message.error("请设置url.deleteBatch属性!") this.$message.error("请设置url.deleteBatch属性!")
return return
} }
@ -225,7 +224,7 @@ export const JeecgListMixin = {
} }
}, },
handleDelete: function (id) { handleDelete: function (id) {
if(!this.url.delete){ if (!this.url.delete) {
this.$message.error("请设置url.delete属性!") this.$message.error("请设置url.delete属性!")
return return
} }
@ -242,7 +241,7 @@ export const JeecgListMixin = {
}); });
}, },
startorstop: function (id) { startorstop: function (id) {
if(!this.url.update){ if (!this.url.update) {
this.$message.error("请设置url.update属性!") this.$message.error("请设置url.update属性!")
return return
} }
@ -258,40 +257,45 @@ export const JeecgListMixin = {
} }
}); });
}, },
reCalculatePage(count){ reCalculatePage(count) {
//总数量-count //总数量-count
let total=this.ipagination.total-count; let total = this.ipagination.total - count;
//获取删除后的分页数 //获取删除后的分页数
let currentIndex=Math.ceil(total/this.ipagination.pageSize); let currentIndex = Math.ceil(total / this.ipagination.pageSize);
//删除后的分页数<所在当前页 //删除后的分页数<所在当前页
if(currentIndex<this.ipagination.current){ if (currentIndex < this.ipagination.current) {
this.ipagination.current=currentIndex; this.ipagination.current = currentIndex;
} }
console.log('currentIndex',currentIndex) console.log('currentIndex', currentIndex)
}, },
handleEdit: function (record) { handleEdit: function (record) {
this.$refs.modalForm.edit(record); this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑"; this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
fuzhi: function(record){ fuzhi: function (record) {
record.id='' record.id = ''
record.functionName1=record.functionName+1 record.functionName1 = record.functionName + 1
record.functionEnName1=record.functionEnName+1 record.functionEnName1 = record.functionEnName + 1
record.functionCode1=record.functionCode+1 record.functionCode1 = record.functionCode + 1
this.$refs.modalForm.edit(record); this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制"; this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
fuzhi1: function(record){ fuzhi1: function (record) {
record.id='' record.id = ''
record.rule_no='' record.rule_no = ''
record.rule_code='' record.rule_code = ''
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false;
},
fuzhiProject: function (record) {
record.fuzhi = true;
this.$refs.modalForm.edit(record); this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制"; this.$refs.modalForm.title = "复制";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
handleAdd: function () { handleAdd: function () {
this.$refs.modalForm.add(); this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "新增";
@ -308,11 +312,11 @@ export const JeecgListMixin = {
this.ipagination = pagination; this.ipagination = pagination;
this.loadData(); this.loadData();
}, },
handleToggleSearch(){ handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus; this.toggleSearchStatus = !this.toggleSearchStatus;
}, },
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段) // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
getPopupField(fields){ getPopupField(fields) {
return fields.split(',')[0] return fields.split(',')[0]
}, },
modalFormOk() { modalFormOk() {
@ -321,39 +325,39 @@ export const JeecgListMixin = {
//清空列表选中 //清空列表选中
this.onClearSelected() this.onClearSelected()
}, },
handleDetail:function(record){ handleDetail: function (record) {
this.$refs.modalForm.edit(record); this.$refs.modalForm.edit(record);
this.$refs.modalForm.title="详情"; this.$refs.modalForm.title = "详情";
this.$refs.modalForm.disableSubmit = true; this.$refs.modalForm.disableSubmit = true;
}, },
/* 导出 */ /* 导出 */
handleExportXls2(){ handleExportXls2() {
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams())); let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`; let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`;
window.location.href = url; window.location.href = url;
}, },
handleExportXls(fileName){ handleExportXls(fileName) {
if(!fileName || typeof fileName != "string"){ if (!fileName || typeof fileName != "string") {
fileName = "导出文件" fileName = "导出文件"
} }
let param = this.getQueryParams(); let param = this.getQueryParams();
if(this.selectedRowKeys && this.selectedRowKeys.length>0){ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param['selections'] = this.selectedRowKeys.join(",") param['selections'] = this.selectedRowKeys.join(",")
} }
console.log("导出参数",param) console.log("导出参数", param)
downFile(this.url.exportXlsUrl,param).then((data)=>{ downFile(this.url.exportXlsUrl, param).then((data) => {
if (!data) { if (!data) {
this.$message.warning("文件下载失败") this.$message.warning("文件下载失败")
return return
} }
if (typeof window.navigator.msSaveBlob !== 'undefined') { if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') window.navigator.msSaveBlob(new Blob([data], {type: 'application/vnd.ms-excel'}), fileName + '.xls')
}else{ } else {
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) let url = window.URL.createObjectURL(new Blob([data], {type: 'application/vnd.ms-excel'}))
let link = document.createElement('a') let link = document.createElement('a')
link.style.display = 'none' link.style.display = 'none'
link.href = url link.href = url
link.setAttribute('download', fileName+'.xls') link.setAttribute('download', fileName + '.xls')
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
document.body.removeChild(link); //下载完成移除元素 document.body.removeChild(link); //下载完成移除元素
@ -361,28 +365,28 @@ export const JeecgListMixin = {
} }
}) })
}, },
daochu(fileName){ daochu(fileName) {
if(!fileName || typeof fileName != "string"){ if (!fileName || typeof fileName != "string") {
fileName = "导出文件" fileName = "导出文件"
} }
let param = this.getQueryParams(); let param = this.getQueryParams();
if(this.selectedRowKeys && this.selectedRowKeys.length>0){ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param['selections'] = this.selectedRowKeys.join(",") param['selections'] = this.selectedRowKeys.join(",")
} }
console.log("导出参数",param) console.log("导出参数", param)
downFile(this.url.standards,param).then((data)=>{ downFile(this.url.standards, param).then((data) => {
if (!data) { if (!data) {
this.$message.warning("文件下载失败") this.$message.warning("文件下载失败")
return return
} }
if (typeof window.navigator.msSaveBlob !== 'undefined') { if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') window.navigator.msSaveBlob(new Blob([data], {type: 'application/vnd.ms-excel'}), fileName + '.xls')
}else{ } else {
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) let url = window.URL.createObjectURL(new Blob([data], {type: 'application/vnd.ms-excel'}))
let link = document.createElement('a') let link = document.createElement('a')
link.style.display = 'none' link.style.display = 'none'
link.href = url link.href = url
link.setAttribute('download', fileName+'.xls') link.setAttribute('download', fileName + '.xls')
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
document.body.removeChild(link); //下载完成移除元素 document.body.removeChild(link); //下载完成移除元素
@ -391,7 +395,7 @@ export const JeecgListMixin = {
}) })
}, },
/* 导入 */ /* 导入 */
handleImportExcel(info){ handleImportExcel(info) {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList); console.log(info.file, info.fileList);
} }
@ -399,7 +403,7 @@ export const JeecgListMixin = {
if (info.file.response.success) { if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`); // this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) { if (info.file.response.code === 201) {
let { message, result: { msg, fileUrl, fileName } } = info.file.response let {message, result: {msg, fileUrl, fileName}} = info.file.response
let href = window._CONFIG['domianURL'] + fileUrl let href = window._CONFIG['domianURL'] + fileUrl
this.$warning({ this.$warning({
title: message, title: message,
@ -440,21 +444,21 @@ export const JeecgListMixin = {
} }
}, },
/* 图片预览 */ /* 图片预览 */
getImgView(text){ getImgView(text) {
if(text && text.indexOf(",")>0){ if (text && text.indexOf(",") > 0) {
text = text.substring(0,text.indexOf(",")) text = text.substring(0, text.indexOf(","))
} }
return getFileAccessHttpUrl(text) return getFileAccessHttpUrl(text)
}, },
/* 文件下载 */ /* 文件下载 */
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------ // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
downloadFile(text){ downloadFile(text) {
if(!text){ if (!text) {
this.$message.warning("未知的文件") this.$message.warning("未知的文件")
return; return;
} }
if(text.indexOf(",")>0){ if (text.indexOf(",") > 0) {
text = text.substring(0,text.indexOf(",")) text = text.substring(0, text.indexOf(","))
} }
let url = getFileAccessHttpUrl(text) let url = getFileAccessHttpUrl(text)
window.open(url); window.open(url);

@ -50,13 +50,38 @@
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <span slot="htmlSlot" slot-scope="text, record">
<div v-html="text"></div> <!-- <div v-html="text"></div>-->
</template> <a @click="functionManage(record)">功能</a>
<a-divider type="vertical"/>
<a @click="tablexManage(record)">实体</a>
</span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="fuzhiProject(record)">复制</a>
<a-divider type="vertical"/>
<a @click="fabu(record)">发布</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="chehui(record)">撤回</a>
<a-divider type="vertical"/>
<a @click="bugfankui(record)">BUG反馈</a>
<a-divider type="vertical"/>
<a @click="shenhe(record)">审核</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
@ -71,6 +96,8 @@
</div> </div>
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal> <modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
</a-card> </a-card>
</template> </template>
@ -81,10 +108,14 @@ import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ModulexModal from './modules/ModulexModal' import ModulexModal from './modules/ModulexModal'
import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal";
export default { export default {
name: 'ModulexList', name: 'ModulexList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
BugxModal,
ModulexModal ModulexModal
}, },
data() { data() {
@ -103,12 +134,12 @@ export default {
} }
}, },
{ {
title: '上级模块id', title: '上级模块',
align: "center", align: "center",
dataIndex: 'pid_dictText' dataIndex: 'pid_dictText'
}, },
{ {
title: '项目id', title: '项目',
align: "center", align: "center",
dataIndex: 'projectId_dictText' dataIndex: 'projectId_dictText'
}, },
@ -151,9 +182,9 @@ export default {
title: '发布时间', title: '发布时间',
align: "center", align: "center",
dataIndex: 'publishTime', dataIndex: 'publishTime',
customRender: function (text) { // customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
} // }
}, },
{ {
title: '任务时长', title: '任务时长',
@ -187,8 +218,8 @@ export default {
// dataIndex: 'userRole' // dataIndex: 'userRole'
// }, // },
{ {
title:'关联实体', title: '关联实体',
align:"center", align: "center",
dataIndex: 'relatedBean_dictText' dataIndex: 'relatedBean_dictText'
}, },
// { // {
@ -211,6 +242,14 @@ export default {
align: "center", align: "center",
dataIndex: 'verisonStatus_dictText' dataIndex: 'verisonStatus_dictText'
}, },
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
// width: 147,
scopedSlots: {customRender: 'htmlSlot'}
},
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
@ -221,7 +260,7 @@ export default {
dataIndex: 'action', dataIndex: 'action',
align: "center", align: "center",
fixed: "right", fixed: "right",
width: 147, // width: 147,
scopedSlots: {customRender: 'action'} scopedSlots: {customRender: 'action'}
} }
], ],
@ -246,6 +285,79 @@ export default {
}, },
}, },
methods: { methods: {
shenhe(record) {
getAction('/modulex/modulex/shenhe', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
} else {
this.$message.warning(res.message);
}
})
},
bugfankui: function (record) {
this.$refs.BugxModal.add(record.id);
this.$refs.BugxModal.title = "BUG反馈";
this.$refs.BugxModal.disableSubmit = false;
},
chehui(record) {
getAction('/modulex/modulex/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('/modulex/modulex/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('/modulex/modulex/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('/modulex/modulex/fabu', {id: record.id}).then((res) => {
if (res.success) {
//
this.$message.success(res.result);
this.loadData();
}
})
},
functionManage(record) {
this.$router.push({
path: '/src/views/functionx/FunctionxList',
query: {
moduleid: record.id
}
// query: {id: '123456'}
})
},
tablexManage(record) {
this.$router.push({
path: '/src/views/tablex/TablexList',
//query: {id: '123456'}
})
},
initDictConfig() { initDictConfig() {
}, },
getSuperFieldList() { getSuperFieldList() {

@ -3,86 +3,29 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="BUG编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugCode">-->
<!-- <a-input v-model="model.bugCode" placeholder="请输入BUG编码" disabled></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> <a-form-model-item label="BUG类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="bug_type" placeholder="请选择BUG类型" disabled/> <j-dict-select-tag type="list" v-model="model.type" dictCode="bug_type" placeholder="请选择BUG类型"/>
</a-form-model-item> </a-form-model-item>
</a-col> </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="对应模块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="对应规则id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleId">-->
<!-- <a-input v-model="model.ruleId" placeholder="请输入对应规则id" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugLevel"> <a-form-model-item label="BUG等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugLevel">
<j-dict-select-tag type="list" v-model="model.bugLevel" dictCode="work_level" placeholder="请选择BUG等级" /> <j-dict-select-tag type="list" v-model="model.bugLevel" dictCode="work_level" placeholder="请选择BUG等级"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc"> <a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc">
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述" ></a-input> <a-input v-model="model.pmDesc" placeholder="请输入BUG描述"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic"> <a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic">
<j-image-upload isMultiple v-model="model.bugPic" ></j-image-upload> <j-image-upload isMultiple v-model="model.bugPic"></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </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="submitContent">-->
<!-- <a-input v-model="model.submitContent" placeholder="请输入提交内容" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="提交图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitPic">-->
<!-- <j-image-upload isMultiple v-model="model.submitPic" ></j-image-upload>-->
<!-- </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="BUG状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugStatus">-->
<!-- <j-dict-select-tag type="list" v-model="model.bugStatus" dictCode="" placeholder="请选择BUG状态" />-->
<!-- </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="auditTime">-->
<!-- <j-date placeholder="请选择审核时间" v-model="model.auditTime" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
@ -91,108 +34,106 @@
<script> <script>
import { httpAction, getAction } from '@api/manage' import {httpAction, getAction} from '@api/manage'
import { validateDuplicateValue } from '@/utils/util' import {validateDuplicateValue} from '@/utils/util'
export default {
name: 'BugxForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
moduleId:'',
type:2,
}, export default {
labelCol: { name: 'BugxForm',
xs: { span: 24 }, components: {},
sm: { span: 5 }, props: {
}, //
wrapperCol: { disabled: {
xs: { span: 24 }, type: Boolean,
sm: { span: 16 }, default: false,
}, required: false
confirmLoading: false, }
validatorRules: { },
bugCode: [ data() {
{ required: true, message: '请输入BUG编码!'}, return {
], model: {
type: [ moduleId: '',
{ required: true, message: '请输入BUG类型!'}, type: 2,
], },
projectId: [ labelCol: {
{ required: true, message: '请输入项目id!'}, xs: {span: 24},
], sm: {span: 5},
bugLevel: [ },
{ required: true, message: '请输入BUG等级!'}, wrapperCol: {
], xs: {span: 24},
publishTime: [ sm: {span: 16},
{ required: true, message: '请输入发布时间!'}, },
], confirmLoading: false,
}, validatorRules: {
url: { bugCode: [
add: "/bugx/bugx/add", {required: true, message: '请输入BUG编码!'},
edit: "/bugx/bugx/edit", ],
queryById: "/bugx/bugx/queryById", type: [
sort:'/bugx/bugx/sort' {required: true, message: '请输入BUG类型!'},
} ],
// projectId: [
// {required: true, message: 'id!'},
// ],
bugLevel: [
{required: true, message: '请输入BUG等级!'},
],
// publishTime: [
// {required: true, message: '!'},
// ],
},
url: {
add: "/bugx/bugx/add",
edit: "/bugx/bugx/edit",
queryById: "/bugx/bugx/queryById",
sort: '/bugx/bugx/sort'
} }
}
},
computed: {
formDisabled() {
return this.disabled
}, },
computed: { },
formDisabled(){ created() {
return this.disabled //model
}, this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add(id) {
this.model.moduleId = id;
}, },
created () { edit(record) {
//model this.model = Object.assign({}, record);
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.visible = true;
}, },
methods: { submitForm() {
add (id) { const that = this;
this.model.moduleId=id; //
}, this.$refs.form.validate(valid => {
edit (record) { if (valid) {
this.model = Object.assign({}, record); that.confirmLoading = true;
this.visible = true; let httpurl = '';
}, let method = '';
submitForm () { if (!this.model.id) {
const that = this; httpurl += this.url.add;
// method = 'post';
this.$refs.form.validate(valid => { } else {
if (valid) { httpurl += this.url.edit;
that.confirmLoading = true; method = 'put';
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.result);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
} }
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.result);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
}) })
}, },
}
} }
}
</script> </script>

@ -31,7 +31,6 @@
methods: { methods: {
add (id) { add (id) {
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(id); this.$refs.realForm.add(id);
}) })

@ -4,14 +4,14 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="上级模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid"> <a-form-model-item label="上级模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<!-- <a-input v-model="model.pid" placeholder="请输入上级模块id" ></a-input>--> <!-- <a-input v-model="model.pid" placeholder="请输入上级模块id" ></a-input>-->
<j-dict-select-tag v-model="model.pid" dict-code="modulex,module_name,id" <j-dict-select-tag v-model="model.pid" dict-code="modulex,module_name,id"
placeholder="请输入上级模块id" style="width: 100%" /> placeholder="请输入上级模块" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId"> <a-form-model-item label="项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectId">
<!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>--> <!-- <a-input v-model="model.projectId" placeholder="请输入项目id" ></a-input>-->
<j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id" <j-dict-select-tag v-model="model.projectId" dict-code="projectx,project_name,id"
placeholder="请输入项目id" style="width: 100%" /> placeholder="请输入项目id" style="width: 100%" />
@ -226,6 +226,14 @@
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
if (this.model.fuzhi){
this.model.id = null;
this.model.moduleName = this.model.moduleName + '+1';
this.model.moduleEnName = this.model.moduleEnName + '+1';
this.model.moduleCode = this.model.moduleCode + '+1';
this.model.createTime = null;
}
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm () {

@ -119,7 +119,7 @@
} }
}, },
{ {
title:'项目id', title:'项目',
align:"center", align:"center",
dataIndex: 'projectId_dictText' dataIndex: 'projectId_dictText'
}, },

@ -82,13 +82,15 @@
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
<!-- <div v-html="text"></div>--> <!-- <div v-html="text"></div>-->
<a @click="rolemanage()">角色管理</a> <a @click="rolemanage()">角色</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="modulemanage()">模块管理</a> <a @click="modulemanage()">模块</a>
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="fuzhiProject(record)">复制</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>

@ -5,63 +5,65 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectName"> <a-form-model-item label="项目中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectName">
<a-input v-model="model.projectName" placeholder="请输入项目中文名称" ></a-input> <a-input v-model="model.projectName" placeholder="请输入项目中文名称"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectEnName"> <a-form-model-item label="项目英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectEnName">
<a-input v-model="model.projectEnName" placeholder="请输入项目英文名称" ></a-input> <a-input v-model="model.projectEnName" placeholder="请输入项目英文名称"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCode"> <a-form-model-item label="项目编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCode">
<a-input v-model="model.projectCode" placeholder="请输入项目编码" ></a-input> <a-input v-model="model.projectCode" placeholder="请输入项目编码"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe"> <a-form-model-item label="项目描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDescribe">
<a-input v-model="model.pmDescribe" placeholder="请输入项目描述" ></a-input> <a-input v-model="model.pmDescribe" placeholder="请输入项目描述"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectPic"> <a-form-model-item label="项目图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectPic">
<!-- <a-input v-model="model.projectPic" placeholder="请输入项目图片" ></a-input>--> <!-- <a-input v-model="model.projectPic" placeholder="请输入项目图片" ></a-input>-->
<j-image-upload isMultiple v-model="model.projectPic" ></j-image-upload> <j-image-upload isMultiple v-model="model.projectPic"></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="项目网址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectUrl"> <a-form-model-item label="项目网址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectUrl">
<a-input v-model="model.projectUrl" placeholder="请输入项目网址" ></a-input> <a-input v-model="model.projectUrl" placeholder="请输入项目网址"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="源码地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCodeUrl"> <a-form-model-item label="源码地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectCodeUrl">
<a-input v-model="model.projectCodeUrl" placeholder="请输入源码地址" ></a-input> <a-input v-model="model.projectCodeUrl" placeholder="请输入源码地址"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="数据库名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbName"> <a-form-model-item label="数据库名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbName">
<a-input v-model="model.projectDbName" placeholder="请输入数据库名" ></a-input> <a-input v-model="model.projectDbName" placeholder="请输入数据库名"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="数据地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbUrl"> <a-form-model-item label="数据地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectDbUrl">
<a-input v-model="model.projectDbUrl" placeholder="请输入数据地址" ></a-input> <a-input v-model="model.projectDbUrl" placeholder="请输入数据地址"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开始时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.startTime" style="width: 100%" /> <j-date placeholder="请选择开始时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.startTime"
style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completeTime"> <a-form-model-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completeTime">
<j-date placeholder="请选择完成时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.completeTime" style="width: 100%" /> <j-date placeholder="请选择完成时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.completeTime"
style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="复制来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sourceProjectId"> <a-form-model-item label="复制来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sourceProjectId">
<!-- <a-input v-model="model.sourceProjectId" placeholder="请输入复制来源" ></a-input>--> <!-- <a-input v-model="model.sourceProjectId" placeholder="请输入复制来源" ></a-input>-->
<j-dict-select-tag v-model="model.sourceProjectId" placeholder="请输入复制来源" <j-dict-select-tag v-model="model.sourceProjectId" placeholder="请输入复制来源"
dict-code="projectx,project_name,id"/> dict-code="projectx,project_name,id"/>
</a-form-model-item> </a-form-model-item>
@ -70,19 +72,20 @@
<a-form-model-item label="项目状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectStatus"> <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="请选择性别" :getPopupContainer= "(target) => target.parentNode">-->
<!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" >--> <!-- <a-radio-group v-model="model.projectStatus" placeholder="请选择性别" >-->
<!-- <a-radio value="1">--> <!-- <a-radio value="1">-->
<!-- --> <!-- -->
<!-- </a-radio>--> <!-- </a-radio>-->
<!-- <a-radio value="2">--> <!-- <a-radio value="2">-->
<!-- --> <!-- -->
<!-- </a-radio>--> <!-- </a-radio>-->
<!-- </a-radio-group>--> <!-- </a-radio-group>-->
<j-dict-select-tag type="radio" v-model="model.projectStatus" placeholder="请输入项目状态" dict-code="project_status"/> <j-dict-select-tag type="radio" v-model="model.projectStatus" placeholder="请输入项目状态"
dict-code="project_status"/>
<!-- <a-input-number :min="0" v-model="model.projectStatus" placeholder="请输入项目状态" style="width: 100%" />--> <!-- <a-input-number :min="0" v-model="model.projectStatus" placeholder="请输入项目状态" style="width: 100%" />-->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -93,104 +96,112 @@
<script> <script>
import { httpAction, getAction } from '@/api/manage' import {httpAction, getAction} from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import {validateDuplicateValue} from '@/utils/util'
import JVxeRadioCell from "@comp/JVxeCells/JVxeRadioCell"; import JVxeRadioCell from "@comp/JVxeCells/JVxeRadioCell";
export default { export default {
name: 'ProjectxForm', name: 'ProjectxForm',
components: { components: {
JVxeRadioCell JVxeRadioCell
}, },
props: { props: {
// //
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,
required: false required: false
} }
}, },
data () { data() {
return { return {
model:{ model: {
projectStatus: 1, projectStatus: 1,
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: {span: 24},
sm: { span: 5 }, sm: {span: 5},
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: {span: 24},
sm: { span: 16 }, sm: {span: 16},
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
projectName: [ projectName: [
{ required: true, message: '请输入项目中文名称!'}, {required: true, message: '请输入项目中文名称!'},
], ],
projectEnName: [ projectEnName: [
{ required: true, message: '请输入项目英文名称!'}, {required: true, message: '请输入项目英文名称!'},
], ],
projectCode: [ projectCode: [
{ required: true, message: '请输入项目编码!'}, {required: true, message: '请输入项目编码!'},
], ],
projectStatus: [ projectStatus: [
{ required: true, message: '请输入项目状态!'}, {required: true, message: '请输入项目状态!'},
], ],
}, },
url: { url: {
add: "/projectx/projectx/add", add: "/projectx/projectx/add",
edit: "/projectx/projectx/edit", edit: "/projectx/projectx/edit",
queryById: "/projectx/projectx/queryById" queryById: "/projectx/projectx/queryById"
}
} }
}
},
computed: {
formDisabled() {
return this.disabled
}, },
computed: { },
formDisabled(){ created() {
return this.disabled //model
}, this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
}, },
created () { edit(record) {
//model this.model = Object.assign({}, record);
this.modelDefault = JSON.parse(JSON.stringify(this.model)); if (this.model.fuzhi){
this.model.sourceProjectId = this.model.id;
this.model.id = null;
this.model.projectName = this.model.projectName + '+1';
this.model.projectEnName = this.model.projectEnName + '+1';
this.model.projectCode = this.model.projectCode + '+1';
this.model.createTime = null;
}
this.visible = true;
}, },
methods: { submitForm() {
add () { const that = this;
this.edit(this.modelDefault); //
}, this.$refs.form.validate(valid => {
edit (record) { if (valid) {
this.model = Object.assign({}, record); that.confirmLoading = true;
this.visible = true; let httpurl = '';
}, let method = '';
submitForm () { if (!this.model.id) {
const that = this; httpurl += this.url.add;
// method = 'post';
this.$refs.form.validate(valid => { } else {
if (valid) { httpurl += this.url.edit;
that.confirmLoading = true; method = 'put';
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;
})
} }
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> </script>

@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -48,234 +49,236 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
/** /**
* @Description: BUG管理 * @Description: BUG管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-04-11 * @Date: 2023-04-11
* @Version: V1.0 * @Version: V1.0
*/ */
@Api(tags="BUG管理") @Api(tags = "BUG管理")
@RestController @RestController
@RequestMapping("/bugx/bugx") @RequestMapping("/bugx/bugx")
@Slf4j @Slf4j
public class BugxController extends JeecgController<Bugx, IBugxService> { public class BugxController extends JeecgController<Bugx, IBugxService> {
@Autowired @Autowired
private IBugxService bugxService; private IBugxService bugxService;
@Autowired @Resource
FunctionxMapper functionxMapper; FunctionxMapper functionxMapper;
@Autowired @Resource
ProjectxMapper projectxMapper; ProjectxMapper projectxMapper;
@Autowired @Resource
ModulexMapper modulexMapper; ModulexMapper modulexMapper;
@Autowired @Resource
RulexMapper rulexMapper; RulexMapper rulexMapper;
/**
* 分页列表查询
*
* @param bugx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "BUG管理-分页列表查询")
@ApiOperation(value="BUG管理-分页列表查询", notes="BUG管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Bugx bugx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<Bugx> queryWrapper = QueryGenerator.initQueryWrapper(bugx, req.getParameterMap());
QueryWrapper<Bugx> queryWrapper=new QueryWrapper<>();
queryWrapper.orderByDesc("bug_level");
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
}else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId());
}
if(bugx.getType()!=null){
queryWrapper.eq("type",bugx.getType());
}
if(bugx.getBugStatus()!=null){
queryWrapper.eq("bug_status",bugx.getBugStatus());
}
Page<Bugx> page = new Page<Bugx>(pageNo, pageSize);
IPage<Bugx> pageList = bugxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/** /**
* 添加 * 分页列表查询
* *
* @param bugx * @param bugx
* @return * @param pageNo
*/ * @param pageSize
@AutoLog(value = "BUG管理-添加") * @param req
@ApiOperation(value="BUG管理-添加", notes="BUG管理-添加") * @return
@PostMapping(value = "/add") */
public Result<?> add(@RequestBody Bugx bugx) { @AutoLog(value = "BUG管理-分页列表查询")
QueryWrapper queryWrapper=new QueryWrapper(); @ApiOperation(value = "BUG管理-分页列表查询", notes = "BUG管理-分页列表查询")
String code=null; @GetMapping(value = "/list")
int a=0; public Result<?> queryPageList(Bugx bugx,
//根源是找最终的项目id @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<Bugx> queryWrapper = QueryGenerator.initQueryWrapper(bugx, req.getParameterMap());
QueryWrapper<Bugx> queryWrapper = new QueryWrapper<>();
queryWrapper.orderByDesc("bug_level");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) {
} else {
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users", user.getId());
}
if (bugx.getType() != null) {
queryWrapper.eq("type", bugx.getType());
}
if (bugx.getBugStatus() != null) {
queryWrapper.eq("bug_status", bugx.getBugStatus());
}
Page<Bugx> page = new Page<Bugx>(pageNo, pageSize);
IPage<Bugx> pageList = bugxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param bugx
* @return
*/
@AutoLog(value = "BUG管理-添加")
@ApiOperation(value = "BUG管理-添加", notes = "BUG管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Bugx bugx) {
QueryWrapper<Bugx> queryWrapper = new QueryWrapper<>();
String code = null;
int a = 0;
//根源是找最终的项目id
// if(bugx.getProjectId()!=null){ // if(bugx.getProjectId()!=null){
// queryWrapper.eq("project_id",bugx.getProjectId()); // queryWrapper.eq("project_id",bugx.getProjectId());
// a=bugxService.count(queryWrapper); // a=bugxService.count(queryWrapper);
// code=bugxService.sort(bugx.getProjectId()); // code=bugxService.sort(bugx.getProjectId());
// projectxMapper.upDeBug(bugx.getProjectId()); // projectxMapper.upDeBug(bugx.getProjectId());
// }else // }else
if(bugx.getModuleId()!=null){ if (bugx.getModuleId() != null) {
queryWrapper.eq("module_id",bugx.getModuleId()); queryWrapper.eq("module_id", bugx.getModuleId());
queryWrapper.isNull("function_id"); queryWrapper.isNull("function_id");
a=bugxService.count(queryWrapper); a = bugxService.count(queryWrapper);
Modulex modulex = modulexMapper.selectById(bugx.getModuleId()); Modulex modulex = modulexMapper.selectById(bugx.getModuleId());
code=bugxService.sort(modulex.getProjectId()); code = bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId()); bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(modulex.getManagerUsers()); bugx.setManagerUsers(modulex.getManagerUsers());
rulexMapper.upMstatus(bugx.getModuleId()); rulexMapper.upMstatus(bugx.getModuleId());
}else if(bugx.getFunctionId()!=null){ } else if (bugx.getFunctionId() != null) {
queryWrapper.eq("function_id",bugx.getFunctionId()); queryWrapper.eq("function_id", bugx.getFunctionId());
queryWrapper.isNull("rule_id"); queryWrapper.isNull("rule_id");
a=bugxService.count(queryWrapper); a = bugxService.count(queryWrapper);
Functionx functionx = functionxMapper.selectById(bugx.getFunctionId()); Functionx functionx = functionxMapper.selectById(bugx.getFunctionId());
Modulex modulex = modulexMapper.selectById(functionx.getModuleId()); Modulex modulex = modulexMapper.selectById(functionx.getModuleId());
code=bugxService.sort(modulex.getProjectId()); code = bugxService.sort(modulex.getProjectId());
bugx.setModuleId(functionx.getModuleId()); bugx.setModuleId(functionx.getModuleId());
bugx.setProjectId(modulex.getProjectId()); bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(functionx.getManagerUsers()); bugx.setManagerUsers(functionx.getManagerUsers());
rulexMapper.upFstatus(bugx.getFunctionId()); rulexMapper.upFstatus(bugx.getFunctionId());
}else{ } else {
queryWrapper.eq("rule_id",bugx.getRuleId()); queryWrapper.eq("rule_id", bugx.getRuleId());
a=bugxService.count(queryWrapper); a = bugxService.count(queryWrapper);
Rulex rulex = rulexMapper.selectById(bugx.getRuleId()); Rulex rulex = rulexMapper.selectById(bugx.getRuleId());
Modulex modulex = modulexMapper.selectById(rulex.getModuleId()); Modulex modulex = modulexMapper.selectById(rulex.getModuleId());
bugx.setModuleId(rulex.getModuleId()); bugx.setModuleId(rulex.getModuleId());
bugx.setFunctionId(rulex.getFunctionId()); bugx.setFunctionId(rulex.getFunctionId());
code=bugxService.sort(modulex.getProjectId()); code = bugxService.sort(modulex.getProjectId());
bugx.setProjectId(modulex.getProjectId()); bugx.setProjectId(modulex.getProjectId());
bugx.setManagerUsers(rulex.getManagerUsers()); bugx.setManagerUsers(rulex.getManagerUsers());
rulexMapper.upRstatus(bugx.getRuleId()); rulexMapper.upRstatus(bugx.getRuleId());
} }
if(a>=1){ if (a >= 1) {
return Result.error("当前BUG以提出!!"); return Result.error("当前BUG以提出!!");
} }
//设置BUG编码 //设置BUG编码
if(code==null){ if (code == null) {
bugx.setBugCode("E00001"); bugx.setBugCode("E00001");
}else{ } else {
int i = Integer.parseInt(code.substring(1)); int i = Integer.parseInt(code.substring(1));
i++; i++;
String s = Integer.toString(i); String s = Integer.toString(i);
while(s.length()<5){ while (s.length() < 5) {
s="0"+s; s = "0" + s;
} }
bugx.setBugCode("E"+s); bugx.setBugCode("E" + s);
} }
bugx.setPublishTime(new Date()); bugx.setPublishTime(new Date());
bugxService.save(bugx); bugxService.save(bugx);
return Result.OK("提交BUG成功!"); return Result.OK("提交BUG成功!");
} }
/** /**
* 编辑 * 编辑
* *
* @param bugx * @param bugx
* @return * @return
*/ */
@AutoLog(value = "BUG管理-编辑") @AutoLog(value = "BUG管理-编辑")
@ApiOperation(value="BUG管理-编辑", notes="BUG管理-编辑") @ApiOperation(value = "BUG管理-编辑", notes = "BUG管理-编辑")
@PutMapping(value = "/edit") @PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Bugx bugx) { public Result<?> edit(@RequestBody Bugx bugx) {
if(bugx.getBugStatus()==4){ if (bugx.getBugStatus() == 4) {
return Result.error("已提交过!!"); return Result.error("已提交过!!");
} }
if(bugx.getBugStatus()==2) if (bugx.getBugStatus() == 2)
return Result.error("当前BUG已解决!!"); return Result.error("当前BUG已解决!!");
//提交时就相当于xiugai //提交时就相当于xiugai
bugx.setSubmitTime(new Date()); bugx.setSubmitTime(new Date());
bugx.setBugStatus(4); bugx.setBugStatus(4);
bugxService.updateById(bugx); bugxService.updateById(bugx);
return Result.OK("提交成功!"); return Result.OK("提交成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
* @param id * @param id
* @return * @return
*/ */
@AutoLog(value = "BUG管理-通过id删除") @AutoLog(value = "BUG管理-通过id删除")
@ApiOperation(value="BUG管理-通过id删除", notes="BUG管理-通过id删除") @ApiOperation(value = "BUG管理-通过id删除", notes = "BUG管理-通过id删除")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) { public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
bugxService.removeById(id); bugxService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
* @param ids * @param ids
* @return * @return
*/ */
@AutoLog(value = "BUG管理-批量删除") @AutoLog(value = "BUG管理-批量删除")
@ApiOperation(value="BUG管理-批量删除", notes="BUG管理-批量删除") @ApiOperation(value = "BUG管理-批量删除", notes = "BUG管理-批量删除")
@DeleteMapping(value = "/deleteBatch") @DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.bugxService.removeByIds(Arrays.asList(ids.split(","))); this.bugxService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *
* @param id * @param id
* @return * @return
*/ */
@AutoLog(value = "BUG管理-通过id查询") @AutoLog(value = "BUG管理-通过id查询")
@ApiOperation(value="BUG管理-通过id查询", notes="BUG管理-通过id查询") @ApiOperation(value = "BUG管理-通过id查询", notes = "BUG管理-通过id查询")
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Bugx bugx = bugxService.getById(id); Bugx bugx = bugxService.getById(id);
if(bugx==null) { if (bugx == null) {
return Result.error("未找到对应数据"); return Result.error("未找到对应数据");
} }
return Result.OK(bugx); return Result.OK(bugx);
} }
/** /**
* 导出excel * 导出excel
* *
* @param request * @param request
* @param bugx * @param bugx
*/ */
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Bugx bugx) { public ModelAndView exportXls(HttpServletRequest request, Bugx bugx) {
return super.exportXls(request, bugx, Bugx.class, "BUG管理"); return super.exportXls(request, bugx, Bugx.class, "BUG管理");
} }
/** /**
* 通过excel导入数据 * 通过excel导入数据
* *
* @param request * @param request
* @param response * @param response
* @return * @return
*/ */
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Bugx.class); return super.importExcel(request, response, Bugx.class);
} }
@GetMapping(value = "/shenhe") @GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) { public Result<?> shenhe(@RequestParam(name = "id", required = true) String id) {
return bugxService.shenhe(id); return bugxService.shenhe(id);
} }
@GetMapping(value = "/bohui")
public Result<?> bohui(@RequestParam(name="id",required=true) String id) { @GetMapping(value = "/bohui")
return bugxService.bohui(id); public Result<?> bohui(@RequestParam(name = "id", required = true) String id) {
} return bugxService.bohui(id);
}
} }

@ -57,7 +57,35 @@ public class ModulexController extends JeecgController<Modulex, IModulexService>
return Result.OK(pageList); return Result.OK(pageList);
} }
/** @GetMapping(value = "/fabu")
public Result<?> fabu(@RequestParam(name="id",required=true) String id) {
Modulex byId = modulexService.getById(id);
if (byId.getWorkStatus() != 0){
return Result.error("当前功能已发布!!!");
}else {
byId.setWorkStatus(1);
modulexService.updateById(byId);
return Result.OK("发布成功!!");
}
}
@GetMapping(value = "/kaishi")
public Result<?> kaishi(@RequestParam(name="id",required=true) String id) {
return modulexService.kaishi(id);
}
@GetMapping(value = "/tijiao")
public Result<?> tijiao(@RequestParam(name="id",required=true) String id) {
return modulexService.tijiao(id);
}
@GetMapping(value = "/cehui")
public Result<?> cehui(@RequestParam(name="id",required=true) String id) {
return modulexService.cehui(id);
}
@GetMapping(value = "/shenhe")
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) {
return modulexService.shenhe(id);
}
/**
* 添加 * 添加
* *
* @param modulex * @param modulex

@ -106,16 +106,16 @@ public class Modulex implements Serializable {
private Integer workLevel; private Integer workLevel;
/** /**
* 任务状态 * 任务状态
* 未发布0已发布1开发中2已完成3已审核4DEBUG9默认0 * 未发布0已发布1开发中2已完成3已审核4DEBUG 9默认 0
*/ */
@Excel(name = "任务状态", width = 15) @Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@Dict(dicCode = "work_status") @Dict(dicCode = "work_status")
private Integer workStatus; private Integer workStatus;
/**发布时间*/ /**发布时间*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
private Date publishTime; private Date publishTime;
/** /**
@ -126,15 +126,15 @@ public class Modulex implements Serializable {
@ApiModelProperty(value = "任务时长") @ApiModelProperty(value = "任务时长")
private Double duration; private Double duration;
/**开始时间*/ /**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date startTime; private Date startTime;
/**提交时间*/ /**提交时间*/
@Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "提交时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间") @ApiModelProperty(value = "提交时间")
private Date submitTime; private Date submitTime;
/**实际时长*/ /**实际时长*/

@ -2,6 +2,7 @@ package org.jeecg.modules.modulex.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
/** /**
@ -16,4 +17,12 @@ public interface IModulexService extends IService<Modulex> {
* 得到最大的版本号 * 得到最大的版本号
*/ */
Integer getMaxVersion(Integer verison); Integer getMaxVersion(Integer verison);
Result<?> kaishi(String id);
Result<?> tijiao(String id);
Result<?> cehui(String id);
Result<?> shenhe(String id);
} }

@ -1,5 +1,6 @@
package org.jeecg.modules.modulex.service.impl; package org.jeecg.modules.modulex.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.mapper.ModulexMapper; import org.jeecg.modules.modulex.mapper.ModulexMapper;
import org.jeecg.modules.modulex.service.IModulexService; import org.jeecg.modules.modulex.service.IModulexService;
@ -7,6 +8,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -14,7 +16,7 @@ import java.util.stream.Collectors;
/** /**
* @Description: 模块管理 * @Description: 模块管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-04-10 * @Date: 2023-04-10
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@ -27,4 +29,53 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
public Integer getMaxVersion(Integer verison) { public Integer getMaxVersion(Integer verison) {
return this.list().size(); return this.list().size();
} }
@Override
public Result<?> kaishi(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() != 1) {
return Result.error("当前不处于已发布阶段,无法开始,请先发布");
} else {
byId.setWorkStatus(2);
byId.setStartTime(new Date());
this.updateById(byId);
return Result.OK("任务开始成功");
}
}
@Override
public Result<?> tijiao(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() != 2) {
return Result.error("当前不处于开发中阶段,无法提交");
} else {
byId.setWorkStatus(3);
byId.setSubmitTime(new Date());
this.updateById(byId);
return Result.OK("提交成功!!");
}
}
@Override
public Result<?> cehui(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() == 2) {
return Result.error("正处于开发中");
}
byId.setWorkStatus(2);
this.updateById(byId);
return Result.OK("撤回成功");
}
@Override
public Result<?> shenhe(String id) {
Modulex byId = this.getById(id);
if (byId.getWorkStatus() == 4) {
return Result.error("已审核");
}
byId.setWorkStatus(4);
this.updateById(byId);
return Result.OK("审核通过");
}
} }

@ -88,15 +88,15 @@ public class Projectx implements Serializable {
@ApiModelProperty(value = "数据地址") @ApiModelProperty(value = "数据地址")
private String projectDbUrl; private String projectDbUrl;
/**开始时间*/ /**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "开始时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private Date startTime; private Date startTime;
/**完成时间*/ /**完成时间*/
@Excel(name = "完成时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "完成时间", width = 15, format = "YYYY-MM-DD HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "YYYY-MM-DD HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
@ApiModelProperty(value = "完成时间") @ApiModelProperty(value = "完成时间")
private Date completeTime; private Date completeTime;
/** /**

Loading…
Cancel
Save