commit
2b381cba3b
34 changed files with 2525 additions and 462 deletions
@ -0,0 +1,315 @@ |
||||
<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="BUG类型"> |
||||
<j-dict-select-tag type="list" v-model="queryParam.type" dictCode="bug_type" placeholder="请选择" /> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="BUG状态"> |
||||
<j-dict-select-tag type="list" v-model="queryParam.bugStatus" dictCode="bug_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('BUG管理')">导出</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"v-if="role==2"> |
||||
<a @click="handleEdit(record)">提交</a> |
||||
</span> |
||||
|
||||
|
||||
<span slot="action" slot-scope="text, record" v-if="role==1"> |
||||
<a @click="shenhe(record.id)">审核</a> |
||||
<a-divider type="vertical" /> |
||||
<a @click="bohui(record.id)">驳回</a> |
||||
<a-divider type="vertical" /> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
|
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<bugx-modal ref="modalForm" @ok="modalFormOk"></bugx-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import BugxModal from './modules/BugxModal' |
||||
import {getAction} from "../../api/manage"; |
||||
import store from '@/store' |
||||
export default { |
||||
name: 'BugxList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
BugxModal |
||||
}, |
||||
data () { |
||||
return { |
||||
description: 'BUG管理管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'BUG编码', |
||||
align:"center", |
||||
dataIndex: 'bugCode' |
||||
}, |
||||
{ |
||||
title:'BUG类型', |
||||
align:"center", |
||||
dataIndex: 'type_dictText' |
||||
}, |
||||
{ |
||||
title:'项目编号', |
||||
align:"center", |
||||
dataIndex: 'projectId_dictText' |
||||
}, |
||||
{ |
||||
title:'模块编号', |
||||
align:"center", |
||||
dataIndex: 'moduleId_dictText' |
||||
}, |
||||
{ |
||||
title:'功能编号', |
||||
align:"center", |
||||
dataIndex: 'functionId_dictText' |
||||
}, |
||||
{ |
||||
title:'规则编号', |
||||
align:"center", |
||||
dataIndex: 'ruleId_dictText' |
||||
}, |
||||
{ |
||||
title:'BUG等级', |
||||
align:"center", |
||||
dataIndex: 'bugLevel_dictText' |
||||
}, |
||||
{ |
||||
title:'BUG描述', |
||||
align:"center", |
||||
dataIndex: 'pmDesc' |
||||
}, |
||||
{ |
||||
title:'BUG图片', |
||||
align:"center", |
||||
dataIndex: 'bugPic', |
||||
scopedSlots: {customRender: 'imgSlot'} |
||||
}, |
||||
{ |
||||
title:'发布时间', |
||||
align:"center", |
||||
dataIndex: 'publishTime', |
||||
}, |
||||
{ |
||||
title:'提交内容', |
||||
align:"center", |
||||
dataIndex: 'submitContent' |
||||
}, |
||||
{ |
||||
title:'提交图片', |
||||
align:"center", |
||||
dataIndex: 'submitPic', |
||||
scopedSlots: {customRender: 'imgSlot'} |
||||
}, |
||||
// { |
||||
// title:'责任人', |
||||
// align:"center", |
||||
// dataIndex: 'managerUsers' |
||||
// }, |
||||
{ |
||||
title:'BUG状态', |
||||
align:"center", |
||||
dataIndex: 'bugStatus_dictText' |
||||
}, |
||||
{ |
||||
title:'提交时间', |
||||
align:"center", |
||||
dataIndex: 'submitTime', |
||||
|
||||
}, |
||||
{ |
||||
title:'审核时间', |
||||
align:"center", |
||||
dataIndex: 'auditTime', |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/bugx/bugx/list", |
||||
delete: "/bugx/bugx/delete", |
||||
deleteBatch: "/bugx/bugx/deleteBatch", |
||||
exportXlsUrl: "/bugx/bugx/exportXls", |
||||
importExcelUrl: "bugx/bugx/importExcel", |
||||
shenhe:'bugx/bugx/shenhe', |
||||
bohui:'bugx/bugx/bohui', |
||||
loginrole:'functionx/functionx/loginrole', |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
role:'' |
||||
} |
||||
}, |
||||
created() { |
||||
let usercode = store.getters.userInfo.id |
||||
this.loginrole(usercode) |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
loginrole(id){ |
||||
getAction(this.url.loginrole,{id:id}).then((res)=>{ |
||||
if (res.success) { |
||||
//重新计算分页问题 |
||||
this.role=res.result; |
||||
|
||||
} |
||||
}) |
||||
}, |
||||
shenhe(id){ |
||||
getAction(this.url.shenhe,{id:id}).then((res)=>{ |
||||
if (res.success) { |
||||
//重新计算分页问题 |
||||
this.$message.success(res.result); |
||||
this.loadData(); |
||||
}else{ |
||||
this.$message.warning(res.message); |
||||
} |
||||
}) |
||||
}, |
||||
bohui(id){ |
||||
getAction(this.url.bohui,{id:id}).then((res)=>{ |
||||
if (res.success) { |
||||
//重新计算分页问题 |
||||
this.$message.success(res.result); |
||||
this.loadData(); |
||||
} |
||||
}) |
||||
}, |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'bugCode',text:'BUG编码',dictCode:''}) |
||||
fieldList.push({type:'int',value:'type',text:'BUG类型',dictCode:''}) |
||||
fieldList.push({type:'string',value:'projectId',text:'项目id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'moduleId',text:'对应模块id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'functionId',text:'对应功能id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'ruleId',text:'对应规则id',dictCode:''}) |
||||
fieldList.push({type:'int',value:'bugLevel',text:'BUG等级',dictCode:''}) |
||||
fieldList.push({type:'string',value:'pmDesc',text:'BUG描述',dictCode:''}) |
||||
fieldList.push({type:'string',value:'bugPic',text:'BUG图片',dictCode:''}) |
||||
fieldList.push({type:'date',value:'publishTime',text:'发布时间'}) |
||||
fieldList.push({type:'string',value:'submitContent',text:'提交内容',dictCode:''}) |
||||
fieldList.push({type:'string',value:'submitPic',text:'提交图片',dictCode:''}) |
||||
fieldList.push({type:'string',value:'managerUsers',text:'责任人',dictCode:''}) |
||||
fieldList.push({type:'int',value:'bugStatus',text:'BUG状态',dictCode:''}) |
||||
fieldList.push({type:'date',value:'submitTime',text:'提交时间'}) |
||||
fieldList.push({type:'date',value:'auditTime',text:'审核时间'}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,194 @@ |
||||
<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="BUG编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugCode">--> |
||||
<!-- <a-input v-model="model.bugCode" placeholder="请输入BUG编码" ></a-input>--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="BUG类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.type" dictCode="" placeholder="请选择BUG类型" />--> |
||||
<!-- </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="对应模块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-form-model-item label="BUG等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugLevel">--> |
||||
<!-- <a-input-number v-model="model.bugLevel" placeholder="请输入BUG等级" style="width: 100%" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc">--> |
||||
<!-- <j-dict-select-tag type="list" v-model="model.pmDesc" dictCode="" placeholder="请选择BUG描述" />--> |
||||
<!-- </a-form-model-item>--> |
||||
<!-- </a-col>--> |
||||
<!-- <a-col :span="24">--> |
||||
<!-- <a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic">--> |
||||
<!-- <j-image-upload isMultiple v-model="model.bugPic" ></j-image-upload>--> |
||||
<!-- </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="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-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'BugxForm', |
||||
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: { |
||||
bugCode: [ |
||||
{ required: true, message: '请输入BUG编码!'}, |
||||
], |
||||
type: [ |
||||
{ 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" |
||||
} |
||||
} |
||||
}, |
||||
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.result); |
||||
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="关闭"> |
||||
<bugx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bugx-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import BugxForm from './BugxForm' |
||||
export default { |
||||
name: 'BugxModal', |
||||
components: { |
||||
BugxForm |
||||
}, |
||||
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"> |
||||
<bugx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bugx-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 BugxForm from './BugxForm' |
||||
|
||||
export default { |
||||
name: 'BugxModal', |
||||
components: { |
||||
BugxForm |
||||
}, |
||||
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,198 @@ |
||||
<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="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-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/> |
||||
</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="对应模块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-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等级" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc"> |
||||
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic"> |
||||
<j-image-upload isMultiple v-model="model.bugPic" ></j-image-upload> |
||||
</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="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-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'BugxForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
functionId:'', |
||||
type:2, |
||||
|
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
bugCode: [ |
||||
{ required: true, message: '请输入BUG编码!'}, |
||||
], |
||||
type: [ |
||||
{ 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 |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.model.functionId=id; |
||||
}, |
||||
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.result); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,61 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<bugx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bugx-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import BugxForm from './BugxForm' |
||||
export default { |
||||
name: 'BugxModal', |
||||
components: { |
||||
BugxForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.visible=true |
||||
|
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(id); |
||||
}) |
||||
}, |
||||
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,198 @@ |
||||
<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="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-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/> |
||||
</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="对应模块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-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等级" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc"> |
||||
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic"> |
||||
<j-image-upload isMultiple v-model="model.bugPic" ></j-image-upload> |
||||
</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="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-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'BugxForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
moduleId:'', |
||||
type:2, |
||||
|
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
bugCode: [ |
||||
{ required: true, message: '请输入BUG编码!'}, |
||||
], |
||||
type: [ |
||||
{ 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 |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.model.moduleId=id; |
||||
}, |
||||
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.result); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,61 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<bugx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bugx-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import BugxForm from './BugxForm' |
||||
export default { |
||||
name: 'BugxModal', |
||||
components: { |
||||
BugxForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.visible=true |
||||
|
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(id); |
||||
}) |
||||
}, |
||||
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,199 @@ |
||||
<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="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-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/> |
||||
</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="对应模块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-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等级" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pmDesc"> |
||||
<a-input v-model="model.pmDesc" placeholder="请输入BUG描述" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="BUG图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bugPic"> |
||||
<j-image-upload isMultiple v-model="model.bugPic" ></j-image-upload> |
||||
</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="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-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'BugxForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
ruleId:'', |
||||
type:3, |
||||
|
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
bugCode: [ |
||||
{ required: true, message: '请输入BUG编码!'}, |
||||
], |
||||
type: [ |
||||
{ 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 |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.model.ruleId=id; |
||||
console.log(this.model.ruleId) |
||||
}, |
||||
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.result); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,61 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<bugx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bugx-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import BugxForm from './BugxForm' |
||||
export default { |
||||
name: 'BugxModal', |
||||
components: { |
||||
BugxForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.visible=true |
||||
|
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(id); |
||||
}) |
||||
}, |
||||
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,281 @@ |
||||
package org.jeecg.modules.demo.bugx.controller; |
||||
|
||||
import java.util.Arrays; |
||||
import java.util.Date; |
||||
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.bugx.entity.Bugx; |
||||
import org.jeecg.modules.demo.bugx.service.IBugxService; |
||||
|
||||
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.jeecg.modules.demo.functionx.entity.Functionx; |
||||
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper; |
||||
import org.jeecg.modules.demo.rulex.entity.Rulex; |
||||
import org.jeecg.modules.demo.rulex.mapper.RulexMapper; |
||||
import org.jeecg.modules.modulex.entity.Modulex; |
||||
import org.jeecg.modules.modulex.mapper.ModulexMapper; |
||||
import org.jeecg.modules.projectx.entity.Projectx; |
||||
import org.jeecg.modules.projectx.mapper.ProjectxMapper; |
||||
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: BUG管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="BUG管理") |
||||
@RestController |
||||
@RequestMapping("/bugx/bugx") |
||||
@Slf4j |
||||
public class BugxController extends JeecgController<Bugx, IBugxService> { |
||||
@Autowired |
||||
private IBugxService bugxService; |
||||
@Autowired |
||||
FunctionxMapper functionxMapper; |
||||
@Autowired |
||||
ProjectxMapper projectxMapper; |
||||
@Autowired |
||||
ModulexMapper modulexMapper; |
||||
@Autowired |
||||
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 |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "BUG管理-添加") |
||||
@ApiOperation(value="BUG管理-添加", notes="BUG管理-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody Bugx bugx) { |
||||
QueryWrapper queryWrapper=new QueryWrapper(); |
||||
String code=null; |
||||
int a=0; |
||||
//根源是找最终的项目id
|
||||
// if(bugx.getProjectId()!=null){
|
||||
// queryWrapper.eq("project_id",bugx.getProjectId());
|
||||
// a=bugxService.count(queryWrapper);
|
||||
// code=bugxService.sort(bugx.getProjectId());
|
||||
// projectxMapper.upDeBug(bugx.getProjectId());
|
||||
// }else
|
||||
if(bugx.getModuleId()!=null){ |
||||
queryWrapper.eq("module_id",bugx.getModuleId()); |
||||
queryWrapper.isNull("function_id"); |
||||
a=bugxService.count(queryWrapper); |
||||
Modulex modulex = modulexMapper.selectById(bugx.getModuleId()); |
||||
code=bugxService.sort(modulex.getProjectId()); |
||||
bugx.setProjectId(modulex.getProjectId()); |
||||
bugx.setManagerUsers(modulex.getManagerUsers()); |
||||
rulexMapper.upMstatus(bugx.getModuleId()); |
||||
}else if(bugx.getFunctionId()!=null){ |
||||
queryWrapper.eq("function_id",bugx.getFunctionId()); |
||||
queryWrapper.isNull("rule_id"); |
||||
a=bugxService.count(queryWrapper); |
||||
Functionx functionx = functionxMapper.selectById(bugx.getFunctionId()); |
||||
Modulex modulex = modulexMapper.selectById(functionx.getModuleId()); |
||||
code=bugxService.sort(modulex.getProjectId()); |
||||
bugx.setModuleId(functionx.getModuleId()); |
||||
bugx.setProjectId(modulex.getProjectId()); |
||||
bugx.setManagerUsers(functionx.getManagerUsers()); |
||||
rulexMapper.upFstatus(bugx.getFunctionId()); |
||||
}else{ |
||||
queryWrapper.eq("rule_id",bugx.getRuleId()); |
||||
a=bugxService.count(queryWrapper); |
||||
Rulex rulex = rulexMapper.selectById(bugx.getRuleId()); |
||||
Modulex modulex = modulexMapper.selectById(rulex.getModuleId()); |
||||
bugx.setModuleId(rulex.getModuleId()); |
||||
bugx.setFunctionId(rulex.getFunctionId()); |
||||
code=bugxService.sort(modulex.getProjectId()); |
||||
bugx.setProjectId(modulex.getProjectId()); |
||||
bugx.setManagerUsers(rulex.getManagerUsers()); |
||||
rulexMapper.upRstatus(bugx.getRuleId()); |
||||
} |
||||
if(a>=1){ |
||||
return Result.error("当前BUG以提出!!"); |
||||
} |
||||
//设置BUG编码
|
||||
if(code==null){ |
||||
bugx.setBugCode("E00001"); |
||||
}else{ |
||||
int i = Integer.parseInt(code.substring(1)); |
||||
i++; |
||||
String s = Integer.toString(i); |
||||
while(s.length()<5){ |
||||
s="0"+s; |
||||
} |
||||
bugx.setBugCode("E"+s); |
||||
} |
||||
bugx.setPublishTime(new Date()); |
||||
bugxService.save(bugx); |
||||
return Result.OK("提交BUG成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param bugx |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "BUG管理-编辑") |
||||
@ApiOperation(value="BUG管理-编辑", notes="BUG管理-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody Bugx bugx) { |
||||
if(bugx.getBugStatus()==4){ |
||||
return Result.error("已提交过!!"); |
||||
} |
||||
if(bugx.getBugStatus()==2) |
||||
return Result.error("当前BUG已解决!!"); |
||||
//提交时就相当于xiugai
|
||||
bugx.setSubmitTime(new Date()); |
||||
bugx.setBugStatus(4); |
||||
bugxService.updateById(bugx); |
||||
return Result.OK("提交成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "BUG管理-通过id删除") |
||||
@ApiOperation(value="BUG管理-通过id删除", notes="BUG管理-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
||||
bugxService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "BUG管理-批量删除") |
||||
@ApiOperation(value="BUG管理-批量删除", notes="BUG管理-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.bugxService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "BUG管理-通过id查询") |
||||
@ApiOperation(value="BUG管理-通过id查询", notes="BUG管理-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
||||
Bugx bugx = bugxService.getById(id); |
||||
if(bugx==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(bugx); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param bugx |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Bugx bugx) { |
||||
return super.exportXls(request, bugx, Bugx.class, "BUG管理"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, Bugx.class); |
||||
} |
||||
|
||||
@GetMapping(value = "/shenhe") |
||||
public Result<?> shenhe(@RequestParam(name="id",required=true) String id) { |
||||
return bugxService.shenhe(id); |
||||
} |
||||
@GetMapping(value = "/bohui") |
||||
public Result<?> bohui(@RequestParam(name="id",required=true) String id) { |
||||
return bugxService.bohui(id); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,131 @@ |
||||
package org.jeecg.modules.demo.bugx.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: BUG管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("bugx") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="bugx对象", description="BUG管理") |
||||
public class Bugx 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; |
||||
/**BUG编码*/ |
||||
@Excel(name = "BUG编码", width = 15) |
||||
@ApiModelProperty(value = "BUG编码") |
||||
private java.lang.String bugCode; |
||||
/**BUG类型*/ |
||||
@Excel(name = "BUG类型", width = 15) |
||||
@ApiModelProperty(value = "BUG类型") |
||||
@Dict(dicCode = "bug_type") |
||||
private java.lang.Integer type; |
||||
/**项目id*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
@Dict(dicText = "project_code",dicCode = "id",dictTable = "projectx") |
||||
private java.lang.String projectId; |
||||
/**对应模块id*/ |
||||
@Excel(name = "对应模块id", width = 15) |
||||
@ApiModelProperty(value = "对应模块id") |
||||
@Dict(dicText = "module_code",dicCode = "id",dictTable = "modulex") |
||||
private java.lang.String moduleId; |
||||
/**对应功能id*/ |
||||
@Excel(name = "对应功能id", width = 15) |
||||
@ApiModelProperty(value = "对应功能id") |
||||
@Dict(dicText = "function_code",dicCode = "id",dictTable = "functionx") |
||||
private java.lang.String functionId; |
||||
/**对应规则id*/ |
||||
@Excel(name = "对应规则id", width = 15) |
||||
@ApiModelProperty(value = "对应规则id") |
||||
@Dict(dicText = "rule_code",dicCode = "id",dictTable = "rulex") |
||||
private java.lang.String ruleId; |
||||
/**BUG等级*/ |
||||
@Excel(name = "BUG等级", width = 15) |
||||
@ApiModelProperty(value = "BUG等级") |
||||
@Dict(dicCode = "work_level") |
||||
private java.lang.Integer bugLevel; |
||||
/**BUG描述*/ |
||||
@Excel(name = "BUG描述", width = 15) |
||||
@ApiModelProperty(value = "BUG描述") |
||||
private java.lang.String pmDesc; |
||||
/**BUG图片*/ |
||||
@Excel(name = "BUG图片", width = 15) |
||||
@ApiModelProperty(value = "BUG图片") |
||||
private java.lang.String bugPic; |
||||
/**发布时间*/ |
||||
@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) |
||||
@ApiModelProperty(value = "提交内容") |
||||
private java.lang.String submitContent; |
||||
/**提交图片*/ |
||||
@Excel(name = "提交图片", width = 15) |
||||
@ApiModelProperty(value = "提交图片") |
||||
private java.lang.String submitPic; |
||||
/**责任人*/ |
||||
@Excel(name = "责任人", width = 15) |
||||
@ApiModelProperty(value = "责任人") |
||||
private java.lang.String managerUsers; |
||||
/**BUG状态*/ |
||||
@Excel(name = "BUG状态", width = 15) |
||||
@ApiModelProperty(value = "BUG状态") |
||||
@Dict(dicCode = "bug_status") |
||||
private java.lang.Integer bugStatus; |
||||
/**提交时间*/ |
||||
@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, 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 auditTime; |
||||
} |
@ -0,0 +1,35 @@ |
||||
package org.jeecg.modules.demo.bugx.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.bugx.entity.Bugx; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: BUG管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface BugxMapper extends BaseMapper<Bugx> { |
||||
|
||||
@Select("select bug_code from bugx where project_id=#{code} order by bug_code desc limit 0,1") |
||||
String sort(String code); |
||||
|
||||
@Update("update bugx set bug_status=2,audit_time=#{date} where id=#{id}") |
||||
void shenhe(@Param("id") String id, @Param("date") Date date); |
||||
|
||||
@Update("update bugx set bug_status=1,audit_time=null where id=#{id}") |
||||
void bohui(@Param("id") String id, @Param("date") Date date); |
||||
|
||||
@Update("update rulex set work_status=4 where id=#{ruleId}") |
||||
void upRstatus(String ruleId); |
||||
@Update("update modulex set work_status=4 where id=#{ruleId}") |
||||
void upMstatus(String ruleId); |
||||
@Update("update functionx set work_status=4 where id=#{ruleId}") |
||||
void upFstatus(String ruleId); |
||||
} |
@ -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.bugx.mapper.BugxMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,20 @@ |
||||
package org.jeecg.modules.demo.bugx.service; |
||||
|
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.modules.demo.bugx.entity.Bugx; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: BUG管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IBugxService extends IService<Bugx> { |
||||
|
||||
String sort(String code); |
||||
|
||||
Result<?> shenhe(String id); |
||||
|
||||
Result<?> bohui(String id); |
||||
} |
@ -0,0 +1,57 @@ |
||||
package org.jeecg.modules.demo.bugx.service.impl; |
||||
|
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.modules.demo.bugx.entity.Bugx; |
||||
import org.jeecg.modules.demo.bugx.mapper.BugxMapper; |
||||
import org.jeecg.modules.demo.bugx.service.IBugxService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: BUG管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-04-11 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class BugxServiceImpl extends ServiceImpl<BugxMapper, Bugx> implements IBugxService { |
||||
|
||||
@Autowired |
||||
BugxMapper bugxMapper; |
||||
@Override |
||||
public String sort(String code) { |
||||
return bugxMapper.sort(code); |
||||
} |
||||
|
||||
@Override |
||||
public Result<?> shenhe(String id) { |
||||
Bugx bugx = bugxMapper.selectById(id); |
||||
if(bugx.getBugStatus()==4){ |
||||
if(bugx.getRuleId()!=null){ |
||||
bugxMapper.upRstatus(bugx.getRuleId()); |
||||
}else if(bugx.getFunctionId()!=null){ |
||||
baseMapper.upFstatus(bugx.getFunctionId()); |
||||
}else { |
||||
baseMapper.upMstatus(bugx.getModuleId()); |
||||
} |
||||
bugxMapper.shenhe(id,new Date()); |
||||
return Result.OK("审核通过!!"); |
||||
}else if(bugx.getBugStatus()==2){ |
||||
return Result.error("已审核过!!!"); |
||||
} |
||||
else{ |
||||
return Result.error("请先提交!!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public Result<?> bohui(String id) { |
||||
bugxMapper.bohui(id,new Date()); |
||||
return Result.OK("驳回!!"); |
||||
} |
||||
} |
Loading…
Reference in new issue