1.增加查询:按项目名、模块中文名、模块英文名、模块编码、上级模块名、按状态查询、

2.管理中“实体”改为弹窗,同时增加一个“实体字段”的操作,用弹窗的形式显示实体的各个字段(即实体管理中的字段功能
3.规则管理做成固定的,即不随滚动条左右滚动
4.功能模板显示数据
5.“模板”按钮改为“按模板新增”
master
shiji 1 year ago
parent e83170404b
commit 23a0c8e34d
  1. 3
      ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue
  2. 66
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 171
      ant-design-vue-jeecg/src/views/tablex/TablexList.vue
  4. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java

@ -40,7 +40,7 @@
<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对应加入--> <!--待开发功能模块提供思路给你们将模板list全部展示之后传出一个id对应加入-->
<a-button @click="muban" type="primary" icon="plus" v-if="role==1">模板</a-button> <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">
@ -282,6 +282,7 @@
title: '规则管理', title: '规则管理',
align:"center", align:"center",
dataIndex: 'action1', dataIndex: 'action1',
fixed:"right",
width:147, width:147,
scopedSlots: { customRender: 'action1' } scopedSlots: { customRender: 'action1' }
}, },

@ -6,10 +6,35 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="角色名称"> <a-form-item label="模块中文名称">
<j-input v-model="queryParam.moduleName"></j-input> <j-input v-model="queryParam.moduleName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12">
<a-form-item label="模块英文名称">
<j-input v-model="queryParam.moduleEnName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="模块编码">
<j-input v-model="queryParam.moduleCode"></j-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.projectId" dict-code="projectx,project_name,id" 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.pid" dict-code="modulex,module_name,id" placeholder="请选择" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="6" :sm="12">
<a-form-item label="模块状态">
<j-dict-select-tag type="list" v-model="queryParam.status" placeholder="请选择模块状态" dict-code="a_status"/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@ -57,6 +82,8 @@
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="tablexManage(record)">实体</a> <a @click="tablexManage(record)">实体</a>
<a-divider type="vertical"/>
<a @click="viewVid(record)">字段</a>
</span> </span>
@ -119,7 +146,8 @@
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal> <modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal>
<bugx-modal ref="BugxModal"></bugx-modal> <bugx-modal ref="BugxModal"></bugx-modal>
<TablexList ref="TablexList"></TablexList>
<FieldxList ref="FieldxList"></FieldxList>
</a-card> </a-card>
</template> </template>
@ -134,11 +162,15 @@ import {getAction} from "@api/manage";
import BugxModal from "@views/modulex/modules/BugxModal"; import BugxModal from "@views/modulex/modules/BugxModal";
import store from "@/store"; import store from "@/store";
import {filterObj} from "@/utils/util"; import {filterObj} from "@/utils/util";
import FieldxList from "@views/fieldx/FieldxList.vue";
import TablexList from "@views/tablex/TablexList.vue";
export default { export default {
name: 'ModulexList', name: 'ModulexList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
TablexList,
FieldxList,
BugxModal, BugxModal,
ModulexModal ModulexModal
}, },
@ -357,6 +389,22 @@ export default {
} }
}) })
}, },
viewVid(record) {
// console.log(record)
let s = null;
getAction('/tablex/tablex/list', {moduleId: record.id}).then((res) =>{
s=res.result.records
console.log(s)
if (s[0]==null){
this.$message.error("该模块无实体");
}else{
this.$refs.FieldxList.showModal();
this.$refs.FieldxList.edit(s[0]);
this.$refs.FieldxList.disableSubmit = false;
}
})
},
bugfankui: function (record) { bugfankui: function (record) {
this.$refs.BugxModal.add(record.id); this.$refs.BugxModal.add(record.id);
this.$refs.BugxModal.title = "BUG反馈"; this.$refs.BugxModal.title = "BUG反馈";
@ -415,10 +463,13 @@ export default {
}) })
}, },
tablexManage(record) { tablexManage(record) {
this.$router.push({ this.$refs.TablexList.showModal();
path: '/src/views/tablex/TablexList', this.$refs.TablexList.edit(record);
query: {moduleid: record.id,project:this.$route.query.project} this.$refs.TablexList.disableSubmit = false;
}) // this.$router.push({
// path: '/src/views/tablex/TablexList',
// query: {moduleid: record.id,project:this.$route.query.project}
// })
}, },
initDictConfig() { initDictConfig() {
}, },
@ -496,7 +547,8 @@ export default {
param.pageNo = this.ipagination.current; param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize; param.pageSize = this.ipagination.pageSize;
//param.id=this.id; //param.id=this.id;
param.projectId = this.$route.query.project; //!!!!!!!
// param.projectId = this.$route.query.project;
// console.log('paaaaaaaaaaaaaaaaaaaaa') // console.log('paaaaaaaaaaaaaaaaaaaaa')
return filterObj(param); return filterObj(param);
}, },

@ -1,59 +1,66 @@
<template> <template>
<a-card :bordered="false"> <a-modal
<!-- 查询区域 --> width="96%"
title="实体管理"
:visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
:bordered="false">
<!-- &lt;!&ndash; 查询区域 &ndash;&gt;-->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<a-row :gutter="24"> <!-- <a-row :gutter="24">-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<a-form-item label="中文名称"> <!-- <a-form-item label="中文名称">-->
<a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input> <!-- <a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<a-form-item label="英文名称"> <!-- <a-form-item label="英文名称">-->
<a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input> <!-- <a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<a-form-item label="实体状态"> <!-- <a-form-item label="实体状态">-->
<j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" /> <!-- <j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" />-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <!-- <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="searchQuery" icon="search">查询</a-button>-->
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
</span> <!-- </span>-->
</a-col> <!-- </a-col>-->
</a-row> <!-- </a-row>-->
</a-form> <!-- </a-form>-->
</div> <!-- </div>-->
<!-- 查询区域-END --> <!-- &lt;!&ndash; 查询区域-END &ndash;&gt;-->
<!-- 操作按钮区域 --> <!-- &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
<div class="table-operator"> <!-- <div class="table-operator">-->
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</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"> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<a-button type="primary" icon="import">导入</a-button> <!-- <a-button type="primary" icon="import">导入</a-button>-->
</a-upload> <!-- </a-upload>-->
<!-- 高级查询区域 --> <!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> <!--&lt;!&ndash; <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>&ndash;&gt;-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> <!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>-->
</div> <!-- </div>-->
<!-- table区域-begin --> <!-- &lt;!&ndash; table区域-begin &ndash;&gt;-->
<div> <!-- <div>-->
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <!-- <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> <!-- <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> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
</div> <!-- </div>-->
<a-table <a-table
ref="table" ref="table"
@ -89,9 +96,9 @@
</a-button> </a-button>
</template> </template>
<template slot="htmlSlot" slot-scope="text,record"> <!-- <template slot="htmlSlot" slot-scope="text,record">-->
<a @click="viewVid(record)">字段</a> <!-- <a @click="viewVid(record)">字段</a>-->
</template> <!-- </template>-->
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
@ -110,7 +117,7 @@
<tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal> <tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal>
<FieldxList ref="FieldxList"></FieldxList> <FieldxList ref="FieldxList"></FieldxList>
</a-card> </a-modal>
</template> </template>
<script> <script>
@ -136,9 +143,12 @@
data () { data () {
let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>)
return { return {
loadRouteType:false, // loadRouteType:false,
description: '实体表管理页面', description: '实体表管理页面',
moduleid:'',
// //
visible: false,
confirmLoading: false,
columns: [ columns: [
{ {
title: '#', title: '#',
@ -212,14 +222,14 @@
align:"center", align:"center",
dataIndex: 'verison' dataIndex: 'verison'
}, },
{ // {
title: '管理', // title: '',
dataIndex: 'htmlSlot', // dataIndex: 'htmlSlot',
align: "center", // align: "center",
fixed: "right", // fixed: "right",
width: 147, // width: 147,
scopedSlots: {customRender: 'htmlSlot'} // scopedSlots: {customRender: 'htmlSlot'}
}, // },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -261,6 +271,26 @@
}/*在引号中填写返回vue*/ }/*在引号中填写返回vue*/
}); });
}, },
edit(record) {
this.model = Object.assign({}, record);
console.log(this.model)
//console.log(topicid);
this.queryParam.moduleId = this.model.id;
this.tableid = this.model.id
this.tableName=this.model.tableName;
console.log(this.queryParam.moduleId);
this.loadData();
},
showModal() {
this.visible = true;
},
handleOk(e) {
this.visible = false;
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
viewVid(record) { viewVid(record) {
this.$refs.FieldxList.showModal(); this.$refs.FieldxList.showModal();
this.$refs.FieldxList.edit(record); this.$refs.FieldxList.edit(record);
@ -294,16 +324,17 @@
} }
}, },
loadData(arg) { loadData(arg) {
if (!this.url.list) { // if (!this.url.list) {
this.$message.error("请设置url.list属性!"); // this.$message.error("url.list!");
return // return
} // }
// 1 // 1
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1; this.ipagination.current = 1;
} }
this.loadParameter(); this.loadParameter();
var params = this.getQueryParams();// var params = this.getQueryParams();//
console.log(params)
this.loading = true; this.loading = true;
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
if (res.success) { if (res.success) {
@ -334,7 +365,7 @@
param.pageNo = this.ipagination.current; param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize; param.pageSize = this.ipagination.pageSize;
//param.id=this.id; //param.id=this.id;
param.moduleId = this.$route.query.moduleid; // param.moduleId = this.$route.query.moduleid;
return filterObj(param); return filterObj(param);
}, },
searchReset() { searchReset() {

@ -60,7 +60,7 @@ public class FunctionTemplateController extends JeecgController<FunctionTemplate
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<FunctionTemplate> queryWrapper = QueryGenerator.initQueryWrapper(functionTemplate, req.getParameterMap()); // QueryWrapper<FunctionTemplate> queryWrapper = QueryGenerator.initQueryWrapper(functionTemplate, req.getParameterMap());
QueryWrapper<FunctionTemplate> queryWrapper=new QueryWrapper<>(); QueryWrapper<FunctionTemplate> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("modulextype_id",functionTemplate.getModulextypeId()); // queryWrapper.eq("modulextype_id",functionTemplate.getModulextypeId());
if(functionTemplate.getFunctionTemplateName()!=null){ if(functionTemplate.getFunctionTemplateName()!=null){
queryWrapper.like("function_template_name",functionTemplate.getFunctionTemplateName()); queryWrapper.like("function_template_name",functionTemplate.getFunctionTemplateName());
} }

Loading…
Cancel
Save