Merge remote-tracking branch 'origin/master'

master
zhc077 2 years ago
commit f96cdd46d3
  1. 17
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  2. 335
      ant-design-vue-jeecg/src/views/functionx/modules/FunctionTemplateList.vue
  3. 78
      ant-design-vue-jeecg/src/views/functionx/modules/MoBanModal.vue
  4. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java
  5. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  6. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
  7. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
  8. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml

@ -39,6 +39,9 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus" v-if="role==1">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus" v-if="role==1">新增</a-button>
<!--待开发功能模块提供思路给你们将模板list全部展示之后传出一个id对应加入-->
<a-button @click="muban" type="primary" icon="plus" v-if="role==1">模板</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('功能管理')">导出</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" v-if="role==1"> <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-if="role==1">
<a-button type="primary" icon="import" >导入</a-button> <a-button type="primary" icon="import" >导入</a-button>
@ -143,6 +146,7 @@
</div> </div>
<functionx-modal ref="modalForm" @ok="modalFormOk"></functionx-modal> <functionx-modal ref="modalForm" @ok="modalFormOk"></functionx-modal>
<mo-ban-modal ref="modalForm2" @valueChange="valueChange" @ok="modalFormOk"></mo-ban-modal>
<bugx-modal ref="modalForm1" @ok="modalFormOk"></bugx-modal> <bugx-modal ref="modalForm1" @ok="modalFormOk"></bugx-modal>
</a-card> </a-card>
</template> </template>
@ -157,13 +161,15 @@
import {filterObj} from "@/utils/util"; import {filterObj} from "@/utils/util";
import store from '@/store' import store from '@/store'
import BugxModal from "./modules/BugxModal"; import BugxModal from "./modules/BugxModal";
import MoBanModal from "./modules/MoBanModal";
export default { export default {
name: 'FunctionxList', name: 'FunctionxList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
FunctionxModal, FunctionxModal,
BugxModal BugxModal,
MoBanModal
}, },
data () { data () {
return { return {
@ -443,7 +449,9 @@
fieldList.push({type:'int',value:'verison',text:'版本号',dictCode:''}) fieldList.push({type:'int',value:'verison',text:'版本号',dictCode:''})
this.superFieldList = fieldList this.superFieldList = fieldList
}, },
valueChange(value){
if (value) this.loadData()
},
loadParameter() { loadParameter() {
if (this.loadRouteType === false) { if (this.loadRouteType === false) {
this.id = this.$route.query.moduleid; this.id = this.$route.query.moduleid;
@ -504,6 +512,11 @@
this.$refs.modalForm1.title = "反馈问题"; this.$refs.modalForm1.title = "反馈问题";
this.$refs.modalForm1.disableSubmit = false; this.$refs.modalForm1.disableSubmit = false;
}, },
muban: function (record) {
this.$refs.modalForm2.add()
this.$refs.modalForm2.title = '模板导入'
this.$refs.modalForm2.disableSubmit = false;
},
} }
} }
</script> </script>

@ -0,0 +1,335 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文名称">
<a-input placeholder="中文名称" v-model="queryParam.functionTemplateName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文名称">
<a-input placeholder="英文名称" v-model="queryParam.functionTemplateEnName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="功能类型">
<j-dict-select-tag type="list" v-model="queryParam.functionType" dictCode="function_type" placeholder="请选择功能类型"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="任务状态">
<j-dict-select-tag type="list" v-model="queryParam.workStatus" dictCode="work_status" placeholder="请选择任务状态" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('功能模板管理')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!--&lt;!&ndash; <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>&ndash;&gt;-->
<!--&lt;!&ndash; <a-dropdown v-if="selectedRowKeys.length > 0">&ndash;&gt;-->
<!--&lt;!&ndash; <a-menu slot="overlay">&ndash;&gt;-->
<!--&lt;!&ndash; <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-menu>&ndash;&gt;-->
<!--&lt;!&ndash; <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>&ndash;&gt;-->
<!--&lt;!&ndash; </a-dropdown>&ndash;&gt;-->
<!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
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>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'FunctionTemplateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
},
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: 'modulextypeId_dictText'
},
{
title:'中文名称',
align:"center",
dataIndex: 'functionTemplateName'
},
{
title:'英文名称',
align:"center",
dataIndex: 'functionTemplateEnName'
},
{
title:'功能编码',
align:"center",
dataIndex: 'functionTemplateCode'
},
{
title:'功能类型',
align:"center",
dataIndex: 'functionTemplateType_dictText'
},
{
title:'功能描述',
align:"center",
dataIndex: 'functionTemplateDescribe'
},
{
title:'分析图',
align:"center",
dataIndex: 'diagrams',
scopedSlots: {customRender: 'imgSlot'}
},
// {
// title:'',
// align:"center",
// dataIndex: 'userRole_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'managerUsers_dictText'
// },
{
title:'任务等级',
align:"center",
dataIndex: 'workLevel_dictText'
},
{
title:'任务状态',
align:"center",
dataIndex: 'workStatus_dictText'
},
{
title:'发布时间',
align:"center",
dataIndex: 'publishTime'
},
{
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: 'createBy_dictText'
},
],
url: {
list: "/functiontemplate/functionTemplate/list1",
delete: "/functiontemplate/functionTemplate/delete",
deleteBatch: "/functiontemplate/functionTemplate/deleteBatch",
exportXlsUrl: "/functiontemplate/functionTemplate/exportXls",
importExcelUrl: "functiontemplate/functionTemplate/importExcel",
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
queryParam:{},
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectionRows.length; a++) {
ids += this.selectionRows[a].id + ",";
}
console.log(ids,"------------*****---")
this.$emit('onChangeRowKey',ids)
},
fanhui(){
this.$router.push({
/*返回产品*/
path: '/src/views/moduletype/ModuleTypeList',
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'modulextypeId',text:'模块模板类型id',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateName',text:'中文名称',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateEnName',text:'英文名称',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateCode',text:'功能编码',dictCode:''})
fieldList.push({type:'int',value:'functionTemplateType',text:'功能类型',dictCode:''})
fieldList.push({type:'string',value:'functionTemplateDescribe',text:'功能描述',dictCode:''})
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''})
fieldList.push({type:'sel_user',value:'userRole',text:'用户角色'})
fieldList.push({type:'sel_user',value:'managerUsers',text:'责任人'})
fieldList.push({type:'int',value:'workLevel',text:'任务等级',dictCode:''})
fieldList.push({type:'int',value:'workStatus',text:'任务状态',dictCode:''})
fieldList.push({type:'datetime',value:'publishTime',text:'发布时间'})
fieldList.push({type:'date',value:'startTime',text:'开始时间'})
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''})
this.superFieldList = fieldList
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.type;
// console.log("***********")
this.loadRouteType = true;
}
},
add(){
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.modulextypeId = this.$route.query.type;
return filterObj(param);
},
searchReset() {
this.queryParam=''
this.loadData();
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,78 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<!-- <functionx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></functionx-form>-->
<function-template-list ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @onChangeRowKey="chuancan"></function-template-list>
</j-modal>
</template>
<script>
import FunctionTemplateList from "./FunctionTemplateList";
import {getAction, postAction} from "../../../api/manage";
export default {
name: 'FunctionxModal',
components: {
FunctionTemplateList
},
data () {
return {
title:'',
width:800,
visible: false,
ids:'',
disableSubmit: false,
url:{
add:"/functionx/functionx/muban"
}
}
},
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;
},
chuancan(res){
this.ids=res;
},
handleOk () {
getAction(this.url.add,{id:this.$route.query.moduleid,ids:this.ids}).then((res)=> {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -88,6 +88,31 @@ public class FunctionTemplateController extends JeecgController<FunctionTemplate
IPage<FunctionTemplate> pageList = functionTemplateService.page(page, queryWrapper); IPage<FunctionTemplate> pageList = functionTemplateService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@AutoLog(value = "功能模板管理-分页列表查询")
@ApiOperation(value="功能模板管理-分页列表查询", notes="功能模板管理-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(FunctionTemplate functionTemplate,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<FunctionTemplate> queryWrapper = QueryGenerator.initQueryWrapper(functionTemplate, req.getParameterMap());
QueryWrapper<FunctionTemplate> queryWrapper=new QueryWrapper<>();
if(functionTemplate.getFunctionTemplateName()!=null){
queryWrapper.like("function_template_name",functionTemplate.getFunctionTemplateName());
}
if(functionTemplate.getFunctionTemplateEnName()!=null){
queryWrapper.like("function_template_en_name",functionTemplate.getFunctionTemplateEnName());
}
if(functionTemplate.getWorkStatus()!=null){
queryWrapper.eq("work_status",functionTemplate.getWorkStatus());
}
if(functionTemplate.getFunctionTemplateType()!=null){
queryWrapper.eq("function_template_type",functionTemplate.getFunctionTemplateType());
}
Page<FunctionTemplate> page = new Page<FunctionTemplate>(pageNo, pageSize);
IPage<FunctionTemplate> pageList = functionTemplateService.page(page, queryWrapper);
return Result.OK(pageList);
}
/** /**
* 添加 * 添加

@ -246,5 +246,12 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
} }
@GetMapping(value = "/muban")
public Result<?> muban(@RequestParam(name="id",required=true) String id,@RequestParam(name="ids",required=true) String ids){
return functionxService.muban(id,ids);
}
} }

@ -27,4 +27,6 @@ public interface IFunctionxService extends IService<Functionx> {
Result<?> cehui(String id); Result<?> cehui(String id);
Result<?> shenhe(String id); Result<?> shenhe(String id);
Result<?> muban(String id, String ids);
} }

@ -1,9 +1,12 @@
package org.jeecg.modules.demo.functionx.service.impl; package org.jeecg.modules.demo.functionx.service.impl;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
import org.jeecg.modules.demo.functiontemplate.mapper.FunctionTemplateMapper;
import org.jeecg.modules.demo.functionx.entity.Functionx; import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper; import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.functionx.service.IFunctionxService; import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -24,6 +27,8 @@ public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx
@Autowired @Autowired
FunctionxMapper functionxMapper; FunctionxMapper functionxMapper;
@Autowired
FunctionTemplateMapper functionTemplateMapper;
@Override @Override
public String findModuleCode(String id) { public String findModuleCode(String id) {
@ -133,4 +138,31 @@ public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx
} }
return null; return null;
} }
@Override
public Result<?> muban(String id, String ids) {
//本质上就是添加,id为对应的模块id,然后ids为id集合
System.err.println(id+" "+ids);
String[] split = ids.split(",");
for (String s : split) {
FunctionTemplate functionTemplate = functionTemplateMapper.selectById(s);
Functionx functionx=new Functionx();
if(functionTemplate!=null){
functionx.setFunctionName(functionTemplate.getFunctionTemplateName());
functionx.setFunctionEnName(functionTemplate.getFunctionTemplateEnName());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
//根据id获得当前对应模块的编码,然后截取模板的最后两个字符,拼接成为新的功能编码
functionx.setFunctionCode(functionTemplate.getFunctionTemplateCode());
functionx.setFunctionType(functionTemplate.getFunctionTemplateType());
functionx.setDiagrams(functionTemplate.getDiagrams());
functionx.setPmDescribe(functionTemplate.getFunctionTemplateDescribe());
functionx.setWorkLevel(functionTemplate.getWorkLevel());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
functionx.setModuleId(id);
functionx.setId(null);
functionxMapper.insert(functionx);
}
}
return Result.OK("模板添加成功");
}
} }

@ -63,7 +63,7 @@
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and module_id=#{moduleid} SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and module_id=#{moduleid}
</select> </select>
<select id="duplicateCheckCountSql1" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo"> <select id="duplicateCheckCountSql2" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">
SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id &lt;&gt; #{dataId} and modulextype_id=#{moduleid} SELECT COUNT(*) FROM ${tableName} WHERE ${fieldName} = #{fieldVal} and id &lt;&gt; #{dataId} and modulextype_id=#{moduleid}
</select> </select>
<select id="duplicateCheckCountSqlNoDataId2" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo"> <select id="duplicateCheckCountSqlNoDataId2" resultType="Long" parameterType="org.jeecg.modules.system.model.DuplicateCheckVo">

Loading…
Cancel
Save