Compare commits

..

No commits in common. '719f14cae86bd4e3f06eb521361f59825f18cbf9' and '366c1c889615dd7293294d0f08f0943d4f3d7f0d' have entirely different histories.

  1. 8
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  2. 227
      ant-design-vue-jeecg/src/views/task/TaskList.vue
  3. 136
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue
  4. 60
      ant-design-vue-jeecg/src/views/task/modules/TaskModal.vue
  5. 84
      ant-design-vue-jeecg/src/views/task/modules/TaskModal__Style#Drawer.vue
  6. 190
      ant-design-vue-jeecg/src/views/taskType/TaskTypeList.vue
  7. 112
      ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeForm.vue
  8. 60
      ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeModal.vue
  9. 84
      ant-design-vue-jeecg/src/views/taskType/modules/TaskTypeModal__Style#Drawer.vue
  10. 173
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java
  11. 90
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java
  12. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/mapper/TaskMapper.java
  13. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/mapper/xml/TaskMapper.xml
  14. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/ITaskService.java
  15. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/service/impl/TaskServiceImpl.java
  16. 174
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/controller/TaskTypeController.java
  17. 64
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/entity/TaskType.java
  18. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/mapper/TaskTypeMapper.java
  19. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/mapper/xml/TaskTypeMapper.xml
  20. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/service/ITaskTypeService.java
  21. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/service/impl/TaskTypeServiceImpl.java

@ -151,13 +151,13 @@ export default {
title: '项目中文名称',
align: "center",
dataIndex: 'projectName',
customRender: (t) => ellipsis(t)
customRender: (t)=>ellipsis(t)
},
{
title: '项目英文名称',
align: "center",
dataIndex: 'projectEnName',
customRender: (t) => ellipsis(t)
customRender: (t)=>ellipsis(t)
},
{
title: '项目编码',
@ -211,8 +211,8 @@ export default {
}
},
{
title: '复制来源',
align: "center",
title:'复制来源',
align:"center",
dataIndex: 'sourceProjectId_dictText'
},
{

@ -1,227 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="任务名称">
<j-input placeholder="" v-model="queryParam.functionTemplateName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style= "margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('任务管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<task-modal ref="modalForm" @ok="modalFormOk"></task-modal>
</a-card>
</template>
<script>
import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TaskModal from './modules/TaskModal'
export default {
name: 'TaskList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TaskModal
},
data () {
return {
description: '任务管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'中文名称',
align:"center",
dataIndex: 'functionTemplateName'
},
{
title:'责任人',
align:"center",
dataIndex: 'managerUsers'
},
{
title:'任务等级',
align:"center",
dataIndex: 'workLevel'
},
{
title:'任务状态',
align:"center",
dataIndex: 'workStatus'
},
{
title:'发布时间',
align:"center",
dataIndex: 'publishTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'开始时间',
align:"center",
dataIndex: 'startTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'任务时长',
align:"center",
dataIndex: 'duration'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/task/task/list",
delete: "/task/task/delete",
deleteBatch: "/task/task/deleteBatch",
exportXlsUrl: "/task/task/exportXls",
importExcelUrl: "task/task/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'functionTemplateName',text:'中文名称',dictCode:''})
fieldList.push({type:'string',value:'managerUsers',text:'责任人',dictCode:''})
fieldList.push({type:'int',value:'workLevel',text:'任务等级',dictCode:''})
fieldList.push({type:'int',value:'workStatus',text:'任务状态',dictCode:''})
fieldList.push({type:'date',value:'publishTime',text:'发布时间'})
fieldList.push({type:'date',value:'startTime',text:'开始时间'})
fieldList.push({type:'string',value:'duration',text:'任务时长',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,136 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionTemplateName">
<a-input v-model="model.functionTemplateName" placeholder="请输入中文名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="managerUsers">
<a-input v-model="model.managerUsers" placeholder="请输入责任人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workLevel">
<a-input-number :min="1" :max="16" v-model="model.workLevel" placeholder="请输入任务等级" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workStatus">
<a-input-number :min="1" :max="16" v-model="model.workStatus" placeholder="请输入任务状态" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">
<j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开始时间" date-format="yyyy-MM-DD HH:mm:ss" v-model="model.startTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration">
<a-input-number :min="0.1" :max="16" :precision="1" v-model="model.duration" placeholder="请输入任务时长" style="width: 100%"></a-input-number>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell";
export default {
name: 'TaskForm',
components: {
JVxeDateCell
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/task/task/add",
edit: "/task/task/edit",
queryById: "/task/task/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></task-form>
</j-modal>
</template>
<script>
import TaskForm from './TaskForm'
export default {
name: 'TaskModal',
components: {
TaskForm
},
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>

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></task-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 TaskForm from './TaskForm'
export default {
name: 'TaskModal',
components: {
TaskForm
},
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>

@ -1,190 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="类型名称">
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
<j-input placeholder="" v-model="queryParam.typeName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('任务类型管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<task-type-modal ref="modalForm" @ok="modalFormOk"></task-type-modal>
</a-card>
</template>
<script>
import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TaskTypeModal from './modules/TaskTypeModal'
export default {
name: 'TaskTypeList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TaskTypeModal
},
data () {
return {
description: '任务类型管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'类型名称',
align:"center",
dataIndex: 'typeName'
},
{
title:'任务层级',
align:"center",
dataIndex: 'level_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/taskType/taskType/list",
delete: "/taskType/taskType/delete",
deleteBatch: "/taskType/taskType/deleteBatch",
exportXlsUrl: "/taskType/taskType/exportXls",
importExcelUrl: "taskType/taskType/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'typeName',text:'类型名称',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,112 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName">
<a-input v-model="model.typeName" placeholder="请输入类型名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="任务层级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="level">
<j-dict-select-tag v-model="model.level" placeholder="请选择任务层级"
dict-code="task_type_level"/>
</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: 'TaskTypeForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/taskType/taskType/add",
edit: "/taskType/taskType/edit",
queryById: "/taskType/taskType/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);
// console.log('this.model',this.model)
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<task-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></task-type-form>
</j-modal>
</template>
<script>
import TaskTypeForm from './TaskTypeForm'
export default {
name: 'TaskTypeModal',
components: {
TaskTypeForm
},
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>

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<task-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></task-type-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 TaskTypeForm from './TaskTypeForm'
export default {
name: 'TaskTypeModal',
components: {
TaskTypeForm
},
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>

@ -1,173 +0,0 @@
package org.jeecg.modules.task.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import 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.task.entity.Task;
import org.jeecg.modules.task.service.ITaskService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Api(tags="任务管理")
@RestController
@RequestMapping("/task/task")
@Slf4j
public class TaskController extends JeecgController<Task, ITaskService> {
@Autowired
private ITaskService taskService;
/**
* 分页列表查询
*
* @param task
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "任务管理-分页列表查询")
@ApiOperation(value="任务管理-分页列表查询", notes="任务管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Task task,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Task> queryWrapper = QueryGenerator.initQueryWrapper(task, req.getParameterMap());
Page<Task> page = new Page<Task>(pageNo, pageSize);
IPage<Task> pageList = taskService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param task
* @return
*/
@AutoLog(value = "任务管理-添加")
@ApiOperation(value="任务管理-添加", notes="任务管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Task task) {
taskService.save(task);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param task
* @return
*/
@AutoLog(value = "任务管理-编辑")
@ApiOperation(value="任务管理-编辑", notes="任务管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Task task) {
taskService.updateById(task);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "任务管理-通过id删除")
@ApiOperation(value="任务管理-通过id删除", notes="任务管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
taskService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "任务管理-批量删除")
@ApiOperation(value="任务管理-批量删除", notes="任务管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.taskService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "任务管理-通过id查询")
@ApiOperation(value="任务管理-通过id查询", notes="任务管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Task task = taskService.getById(id);
if(task==null) {
return Result.error("未找到对应数据");
}
return Result.OK(task);
}
/**
* 导出excel
*
* @param request
* @param task
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Task task) {
return super.exportXls(request, task, Task.class, "任务管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Task.class);
}
}

@ -1,90 +0,0 @@
package org.jeecg.modules.task.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("task")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="task对象", description="任务管理")
public class Task implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**上级任务id*/
@Excel(name = "上级任务id", width = 15)
@ApiModelProperty(value = "上级任务id")
private String upperId;
/**中文名称*/
@Excel(name = "中文名称", width = 15)
@ApiModelProperty(value = "中文名称")
private String functionTemplateName;
/**责任人*/
@Excel(name = "责任人", width = 15)
@ApiModelProperty(value = "责任人")
private String managerUsers;
/**任务等级*/
@Excel(name = "任务等级", width = 15)
@ApiModelProperty(value = "任务等级")
private Integer workLevel;
/**任务状态*/
@Excel(name = "任务状态", width = 15)
@ApiModelProperty(value = "任务状态")
private Integer workStatus;
/**发布时间*/
@Excel(name = "发布时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "发布时间")
private Date publishTime;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始时间")
private Date startTime;
/**任务时长*/
@Excel(name = "任务时长", width = 15)
@ApiModelProperty(value = "任务时长")
private String duration;
}

@ -1,18 +0,0 @@
package org.jeecg.modules.task.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.task.entity.Task;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface TaskMapper extends BaseMapper<Task> {
}

@ -1,5 +0,0 @@
<?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.task.mapper.TaskMapper">
</mapper>

@ -1,14 +0,0 @@
package org.jeecg.modules.task.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.task.entity.Task;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface ITaskService extends IService<Task> {
}

@ -1,20 +0,0 @@
package org.jeecg.modules.task.service.impl;
import org.jeecg.modules.task.entity.Task;
import org.jeecg.modules.task.mapper.TaskMapper;
import org.jeecg.modules.task.service.ITaskService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 任务管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Service
public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements ITaskService {
}

@ -1,174 +0,0 @@
package org.jeecg.modules.taskType.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import 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.taskType.entity.TaskType;
import org.jeecg.modules.taskType.service.ITaskTypeService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 任务类型管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Api(tags="任务类型管理")
@RestController
@RequestMapping("/taskType/taskType")
@Slf4j
public class TaskTypeController extends JeecgController<TaskType, ITaskTypeService> {
@Autowired
private ITaskTypeService taskTypeService;
/**
* 分页列表查询
*
* @param taskType
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "任务类型管理-分页列表查询")
@ApiOperation(value="任务类型管理-分页列表查询", notes="任务类型管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(TaskType taskType,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TaskType> queryWrapper = QueryGenerator.initQueryWrapper(taskType, req.getParameterMap());
Page<TaskType> page = new Page<TaskType>(pageNo, pageSize);
IPage<TaskType> pageList = taskTypeService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param taskType
* @return
*/
@AutoLog(value = "任务类型管理-添加")
@ApiOperation(value="任务类型管理-添加", notes="任务类型管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody TaskType taskType) {
taskTypeService.save(taskType);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param taskType
* @return
*/
@AutoLog(value = "任务类型管理-编辑")
@ApiOperation(value="任务类型管理-编辑", notes="任务类型管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody TaskType taskType) {
taskTypeService.updateById(taskType);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "任务类型管理-通过id删除")
@ApiOperation(value="任务类型管理-通过id删除", notes="任务类型管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
taskTypeService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "任务类型管理-批量删除")
@ApiOperation(value="任务类型管理-批量删除", notes="任务类型管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.taskTypeService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "任务类型管理-通过id查询")
@ApiOperation(value="任务类型管理-通过id查询", notes="任务类型管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
TaskType taskType = taskTypeService.getById(id);
if(taskType==null) {
return Result.error("未找到对应数据");
}
return Result.OK(taskType);
}
/**
* 导出excel
*
* @param request
* @param taskType
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TaskType taskType) {
return super.exportXls(request, taskType, TaskType.class, "任务类型管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TaskType.class);
}
}

@ -1,64 +0,0 @@
package org.jeecg.modules.taskType.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 任务类型管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("task_type")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="task_type对象", description="任务类型管理")
public class TaskType implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**任务层级*/
@Excel(name = "任务层级", width = 15)
@ApiModelProperty(value = "任务层级")
@Dict(dicCode = "task_type_level")
private Integer level;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private String typeName;
}

@ -1,17 +0,0 @@
package org.jeecg.modules.taskType.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.taskType.entity.TaskType;
/**
* @Description: 任务类型管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface TaskTypeMapper extends BaseMapper<TaskType> {
}

@ -1,5 +0,0 @@
<?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.taskType.mapper.TaskTypeMapper">
</mapper>

@ -1,14 +0,0 @@
package org.jeecg.modules.taskType.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.taskType.entity.TaskType;
/**
* @Description: 任务类型管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface ITaskTypeService extends IService<TaskType> {
}

@ -1,19 +0,0 @@
package org.jeecg.modules.taskType.service.impl;
import org.jeecg.modules.taskType.entity.TaskType;
import org.jeecg.modules.taskType.mapper.TaskTypeMapper;
import org.jeecg.modules.taskType.service.ITaskTypeService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 任务类型管理
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Service
public class TaskTypeServiceImpl extends ServiceImpl<TaskTypeMapper, TaskType> implements ITaskTypeService {
}
Loading…
Cancel
Save