JeecgBoot 2.4.2 积木报表版本发布,基于SpringBoot的低代码平台

This commit is contained in:
zhangdaiscott
2021-01-23 23:59:31 +08:00
parent e9255f6bcc
commit df75998aae
238 changed files with 4660 additions and 35961 deletions

View File

@ -134,7 +134,7 @@
title: '下拉框_多选',
key: 'select_multiple',
type: JVXETypes.selectMultiple,
width: '180px',
width: '205px',
options: [
{title: 'String', value: 'string'},
{title: 'Integer', value: 'int'},

View File

@ -56,6 +56,7 @@
placeholder="请做出你的选择"
v-model="formData.asyncSelectValue"
dict="sys_depart,depart_name,id"
:pageSize="6"
:async="true">
</j-search-select-tag>
</a-form-item>
@ -130,7 +131,7 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="选择职务">
<j-select-position :buttons="false" :disabled="true" v-model="formData.selectPosition" />
<j-select-position :buttons="false" v-model="formData.selectPosition" />
</a-form-item>
</a-col>
<a-col :span="12">选中值:{{ formData.selectPosition}}</a-col>
@ -362,10 +363,10 @@
<a-col :span="12">
<a-form-item label="特殊查询组件">
<a-row>
<a-col :span="16">
<a-col :span="15">
<j-input v-model="formData.jInput" :type="jInput.type"/>
</a-col>
<a-col :span="3" style="text-align: right;" >查询类型:</a-col>
<a-col :span="4" style="text-align: right;" >查询类型:</a-col>
<a-col :span="5">
<a-select v-model="jInput.type" :options="jInput.options"></a-select>
</a-col>

View File

@ -1,11 +1,14 @@
<template>
<a-card :bordered="false">
<a-form @submit="handleSubmit" :form="form">
<a-row>
<a-col :md="24" :sm="24">
<a-form-item label="Note" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }">
<a-input v-decorator="['note',{rules: [{ required: true, message: 'Please input your note!' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :md="24" :sm="24">
<a-form-item label="Gender" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }">
<a-select v-decorator="['gender',{rules: [{ required: true, message: 'Please select your gender!' }]}]" placeholder="Select a option and change input text above" @change="this.handleSelectChange">
@ -14,11 +17,14 @@
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :md="24" :sm="24">
<a-form-item label="Gender" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }">
<a-cascader :options="areaOptions" @change="onChange" :showSearch="{filter}" placeholder="Please select" />
</a-form-item>
</a-col>
</a-row>
<a-form-item :wrapperCol="{ span: 12, offset: 5 }">
<a-col :md="24" :sm="24">
<a-form-item :wrapperCol="{ span: 12, offset: 5 }">

View File

@ -167,6 +167,9 @@
},
getQueryParams() {
//update--begin--autor:wangshuai-----date:20191204------for清空总条数 teambition JT-113------
this.ipagination.total=0;
//update--end--autor:wangshuai-----date:20191204------for清空总条数 teambition JT-113------
var param = Object.assign({}, this.queryParam);
param.dictId = this.dictId;
param.field = this.getQueryField();

View File

@ -192,12 +192,14 @@
if (res.success) {
let childrenMap = res.result
let fn = (list) => {
list.forEach(data => {
if (this.expandedRowKeys.includes(data.id)) {
data.children = childrenMap[data.id]
fn(data.children)
}
})
if(list&&list.length>0){
list.forEach(data => {
if (this.expandedRowKeys.includes(data.id)) {
data.children = childrenMap[data.id]
fn(data.children)
}
})
}
}
fn(dataList)
}

View File

@ -283,6 +283,12 @@
syncHeadNotic(anntId){
getAction("sys/annountCement/syncNotic",{anntId:anntId})
},
handleDetail:function(record){
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title="详情";
this.$refs.modalForm.disableSubmit = true;
this.$refs.modalForm.disabled = true;
},
}
}
</script>

View File

@ -91,6 +91,7 @@
url: {
list: "/sys/category/rootList",
childList: "/sys/category/childList",
getChildListBatch: "/sys/category/getChildListBatch",
delete: "/sys/category/delete",
deleteBatch: "/sys/category/deleteBatch",
exportXlsUrl: "/sys/category/exportXls",
@ -125,7 +126,6 @@
this.ipagination.current=1
}
this.loading = true
this.expandedRowKeys = []
let params = this.getQueryParams()
return new Promise((resolve) => {
getAction(this.url.list,params).then(res=>{
@ -134,7 +134,9 @@
if(Number(result.total)>0){
this.ipagination.total = Number(result.total)
this.dataSource = this.getDataByResult(res.result.records)
resolve()
//update--begin--autor:lvdandan-----date:20201204------forJT-31 删除成功后默认展开已展开信息
return this.loadDataByExpandedRows(this.dataSource)
//update--end--autor:lvdandan-----date:20201204------forJT-31 删除成功后默认展开已展开信息
}else{
this.ipagination.total=0
this.dataSource=[]
@ -142,6 +144,7 @@
}else{
this.$message.warning(res.message)
}
}).finally(()=>{
this.loading = false
})
})
@ -265,15 +268,9 @@
let that = this;
deleteAction(that.url.delete, {id: record.id}).then((res) => {
if (res.success) {
if (record.pid && record.pid!='0') {
let formData = {pid: record.pid};
that.$message.success(res.message);
that.subExpandedKeys = [];
that.getExpandKeysByPid(record.pid, this.dataSource, this.dataSource)
that.addOk(formData, this.subExpandedKeys.reverse())
} else {
that.loadData();
}
//update--begin--autor:lvdandan-----date:20201204------forJT-31 删除成功后默认展开已展开信息
that.loadData();
//update--end--autor:lvdandan-----date:20201204------forJT-31 删除成功后默认展开已展开信息
} else {
that.$message.warning(res.message);
}
@ -292,6 +289,43 @@
}
}
},
// 根据已展开的行查询数据(用于保存后刷新时异步加载子级的数据)
loadDataByExpandedRows(dataList) {
if (this.expandedRowKeys.length > 0) {
return getAction(this.url.getChildListBatch,{ parentIds: this.expandedRowKeys.join(',') }).then(res=>{
if (res.success && res.result.records.length>0) {
//已展开的数据批量子节点
let records = res.result.records
const listMap = new Map();
for (let item of records) {
let pid = item[this.pidField];
if (this.expandedRowKeys.join(',').includes(pid)) {
let mapList = listMap.get(pid);
if (mapList == null) {
mapList = [];
}
mapList.push(item);
listMap.set(pid, mapList);
}
}
let childrenMap = listMap;
let fn = (list) => {
if(list) {
list.forEach(data => {
if (this.expandedRowKeys.includes(data.id)) {
data.children = this.getDataByResult(childrenMap.get(data.id))
fn(data.children)
}
})
}
}
fn(dataList)
}
})
} else {
return Promise.resolve()
}
},
}

View File

@ -162,7 +162,7 @@
delete: '/sys/position/delete',
deleteBatch: '/sys/position/deleteBatch',
exportXlsUrl: '/sys/position/exportXls',
importExcelUrl: '/sys/position/importExcel',
importExcelUrl: 'sys/position/importExcel',
},
}
},

View File

@ -17,8 +17,8 @@
<a-form-item label="性别">
<a-select v-model="queryParam.sex" placeholder="请选择性别">
<a-select-option value="">请选择</a-select-option>
<a-select-option value="1">男</a-select-option>
<a-select-option value="2">女</a-select-option>
<a-select-option value="1">男</a-select-option>
<a-select-option value="2">女</a-select-option>
</a-select>
</a-form-item>
</a-col>
@ -65,7 +65,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
@ -120,7 +120,7 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)" >编辑</a>
<a-divider type="vertical"/>
@ -155,6 +155,10 @@
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -165,7 +169,8 @@
<!-- table区域-end -->
<user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
<password-modal ref="passwordmodal"></password-modal>
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
<!-- 用户回收站 -->
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
@ -179,7 +184,6 @@
import {putAction,getFileAccessHttpUrl} from '@/api/manage';
import {frozenBatch} from '@/api/api'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import SysUserAgentModal from "./modules/SysUserAgentModal";
import JInput from '@/components/jeecg/JInput'
import UserRecycleBinModal from './modules/UserRecycleBinModal'
import JSuperQuery from '@/components/jeecg/JSuperQuery'
@ -188,7 +192,6 @@
name: "UserList",
mixins: [JeecgListMixin],
components: {
SysUserAgentModal,
UserModal,
PasswordModal,
JInput,
@ -368,6 +371,9 @@
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面可以把datasource中的数据更新一下
}
}
}

View File

@ -56,6 +56,7 @@
<script>
import pick from 'lodash.pick'
import {addDictItem, editDictItem} from '@/api/api'
import { getAction } from '@api/manage'
export default {
name: "DictItemModal",
@ -154,12 +155,27 @@
this.visible = false;
},
validateItemValue(rule, value, callback){
let param = {
itemValue:value,
dictId:this.dictId,
}
if(this.model.id){
param.id = this.model.id
}
if(value){
let reg=new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
if(reg.test(value)){
callback("数据值不能包含特殊字符!")
}else{
callback()
//update--begin--autor:lvdandan-----date:20201203------forJT-27【数据字典】字典 - 数据值可重复
getAction("/sys/dictItem/dictItemCheck",param).then((res)=>{
if(res.success){
callback()
}else{
callback(res.message);
}
});
//update--end--autor:lvdandan-----date:20201203------forJT-27【数据字典】字典 - 数据值可重复
}
}else{
callback()

View File

@ -75,7 +75,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="授权标识">
<a-input placeholder="多个用逗号分隔, 如: user:list,user:create" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
<a-input placeholder="请输入授权标识, 如: user:list" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
</a-form-item>
<a-form-item
@ -427,4 +427,4 @@
<style scoped>
</style>
</style>

View File

@ -17,14 +17,14 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="角色名称">
<a-input placeholder="请输入角色名称" v-decorator.trim="[ 'roleName', validatorRules.roleName]" />
<a-input placeholder="请输入角色名称" v-decorator="[ 'roleName', validatorRules.roleName]" />
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="角色编码">
<a-input placeholder="请输入角色编码" :disabled="roleDisabled" v-decorator.trim="[ 'roleCode', validatorRules.roleCode]" />
<a-input placeholder="请输入角色编码" :disabled="roleDisabled" v-decorator="[ 'roleCode', validatorRules.roleCode]" />
</a-form-item>
<a-form-item
@ -112,6 +112,8 @@
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
values.roleName = (values.roleName || '').trim()
values.roleCode = (values.roleCode || '').trim()
let formData = Object.assign(this.model, values);
let obj;
console.log(formData)

View File

@ -133,18 +133,30 @@
dbDriverMap: {
// MySQL 数据库
'1': { dbDriver: 'com.mysql.jdbc.Driver' },
//MySQL5.7+ 数据库
'4': { dbDriver: 'com.mysql.cj.jdbc.Driver' },
// Oracle
'2': { dbDriver: 'oracle.jdbc.OracleDriver' },
// SQLServer 数据库
'3': { dbDriver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver' },
// marialDB 数据库
'5': { dbDriver: 'org.mariadb.jdbc.Driver' },
// postgresql 数据库
'6': { dbDriver: 'org.postgresql.Driver' }
},
dbUrlMap: {
// MySQL 数据库
'1': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
//MySQL5.7+ 数据库
'4': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai' },
// Oracle
'2': { dbUrl: 'jdbc:oracle:thin:@127.0.0.1:1521:ORCL' },
// SQLServer 数据库
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' }
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
// SQLServer 数据库
'5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
// SQLServer 数据库
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' }
}
}
},

View File

@ -16,7 +16,7 @@
<template slot="title">
<span>您有多个租户请选择登录租户</span>
</template>
<a-avatar style="backgroundColor:#87d068" icon="gold" />
<a-avatar style="backgroundColor:#87d068" icon="gold" />
</a-tooltip>
<a-select @change="handleTenantChange" :class="{'valid-error':validate_status1=='error'}" placeholder="请选择登录租户" style="margin-left:10px;width: 80%">

View File

@ -3,7 +3,7 @@
<div class="user-login-other">
<span>其他登录方式</span>
<a @click="onThirdLogin('github')" title="github"><a-icon class="item-icon" type="github"></a-icon></a>
<a @click="onThirdLogin('wechat_enterprise')" title="企业微信"><a-icon class="item-icon" type="wechat"></a-icon></a>
<a @click="onThirdLogin('wechat_enterprise')" title="企业微信"> <icon-font class="item-icon" type="icon-qiyeweixin3" /></a>
<a @click="onThirdLogin('dingtalk')" title="钉钉"><a-icon class="item-icon" type="dingding"></a-icon></a>
<a @click="onThirdLogin('wechat_open')" title="微信"><a-icon class="item-icon" type="wechat"></a-icon></a>
</div>
@ -78,9 +78,18 @@
<script>
import { JeecgThirdLoginMixin } from '@views/user/third/JeecgThirdLoginMixin'
import { Icon } from 'ant-design-vue';
const IconFont = Icon.createFromIconfontCN({
// scriptUrl: '//at.alicdn.com/t/font_2316098_umqusozousr.js',
scriptUrl: '/cdn/font-icon/font_2316098_umqusozousr.js',
});
export default {
name: 'thirdLogin',
mixins: [JeecgThirdLoginMixin],
components: {
IconFont,
}
}
</script>