JeecgBoot 3.1.0 版本发布,基于代码生成器的企业级低代码平台

pull/3455/head
zhangdaiscott 2022-02-24 15:13:05 +08:00
parent 8c143f35f8
commit f8c7ddd223
304 changed files with 40313 additions and 230872 deletions

View File

@ -7,17 +7,16 @@
JEECG BOOT 低代码开发平台(前后端分离版本)
===============
当前最新版本: 3.0发布日期2021-11-01
当前最新版本: 3.1.0发布日期2022-03-01
[![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
[![](https://img.shields.io/badge/Author-北京国炬软件-orange.svg)](http://www.jeecg.com)
[![](https://img.shields.io/badge/Blog-官方博客-blue.svg)](https://jeecg.blog.csdn.net)
[![](https://img.shields.io/badge/version-3.0-brightgreen.svg)](https://github.com/zhangdaiscott/jeecg-boot)
[![](https://img.shields.io/badge/version-3.1.0-brightgreen.svg)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub stars](https://img.shields.io/github/stars/zhangdaiscott/jeecg-boot.svg?style=social&label=Stars)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub forks](https://img.shields.io/github/forks/zhangdaiscott/jeecg-boot.svg?style=social&label=Fork)](https://github.com/zhangdaiscott/jeecg-boot)
<h3 align="center">新年快乐!!!</h3>
项目介绍:
@ -48,8 +47,6 @@ Jeecg-Boot低代码开发平台可以应用在任何J2EE项目的开发中
- 在线演示 [http://boot.jeecg.com](http://boot.jeecg.com)
- 在线演示(VUE3beta版)[http://boot3.jeecg.com](http://boot3.jeecg.com)
- 开发文档: [http://doc.jeecg.com](http://doc.jeecg.com)
- 视频教程 [JeecgBoot入门视频](http://www.jeecg.com/doc/video)
@ -60,6 +57,8 @@ Jeecg-Boot低代码开发平台可以应用在任何J2EE项目的开发中
- 更新日志: [版本日志](http://www.jeecg.com/doc/log)
- VUE3版演示(未正式发布)[http://boot3.jeecg.com](http://boot3.jeecg.com)
交流互动

View File

@ -1,3 +1,6 @@
NODE_ENV=production
VUE_APP_PLATFORM_NAME=JeecgBoot 企业级低代码平台
VUE_APP_SSO=false
# 开启单点登录
VUE_APP_SSO=false
# 开启微应用模式
VUE_APP_QIANKUN=false

View File

@ -1,4 +1,7 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'

View File

@ -1,7 +1,7 @@
Ant Design Jeecg Vue
====
当前最新版本: 3.0.0发布日期2021-11-01
当前最新版本: 3.1.0发布日期20220301
Overview
----

View File

@ -1,6 +1,6 @@
{
"name": "vue-antd-jeecg",
"version": "3.0.0",
"version": "3.1.0",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
@ -44,7 +44,8 @@
"xe-utils": "2.4.8",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"cron-parser": "^2.10.0"
"cron-parser": "^2.10.0",
"qiankun": "^2.5.1"
},
"devDependencies": {
"@babel/polyfill": "^7.2.5",

View File

@ -240,9 +240,7 @@
/* 滚动条优化 end */
</style>
<!-- -->
<script>
window._CONFIG = {};
</script>
<script src="<%= BASE_URL %>static/config.js"></script>
</head>
<body>

View File

@ -0,0 +1,11 @@
/**
* (env)
*/
window._CONFIG = {
//接口父路径
VUE_APP_API_BASE_URL: '',
//单点登录地址
VUE_APP_CAS_BASE_URL: '',
//文件预览路径
VUE_APP_ONLINE_BASE_URL: ''
}

View File

@ -0,0 +1,33 @@
@active-color: #11da75;
ul {
max-height: 700px;
overflow-y: auto;
padding-left: .5rem;
img {
width:64px;
height:64px;
padding: .2rem;
margin: .3rem;
cursor: pointer;
&.active, &:hover {
border: 1px solid @active-color;
border-radius: 2px;
color: #fff;
transition: all .3s;
}
}
li {
list-style: none;
float: left;
text-align: center;
cursor: pointer;
color: #555;
transition: color .3s ease-in-out,background-color .3s ease-in-out;
position: relative;
margin: 3px 0;
border-radius: 4px;
background-color: #fff;
overflow: hidden;
padding: 10px 0 0;
}
}

View File

@ -123,7 +123,17 @@
if(this.async){
if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
console.log("这才请求后台")
getAction(`/sys/dict/loadDictItem/${this.dict}`,{key:this.value}).then(res=>{
//update-begin-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数所以将过滤条件去掉
// TODO 隐患 查询效率问题 还是应该在后台作筛选
let itemDictStr = this.dict
let arr = itemDictStr.split(',')
if(arr && arr.length==4){
// 删除最后一个元素
arr.pop();
itemDictStr = arr.join(',')
}
//update-end-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数所以将过滤条件去掉
getAction(`/sys/dict/loadDictItem/${itemDictStr}`,{key:this.value}).then(res=>{
if(res.success){
let obj = {
key:this.value,

View File

@ -29,6 +29,13 @@
width: 4em;
}
.week {
.list-check-item {
width: 5em;
text-align: left;
}
}
.tip-info {
color: #999
}

View File

@ -1,5 +1,5 @@
<template>
<div class="config-list">
<div class="config-list week">
<a-radio-group v-model="type">
<div class="item">
<a-radio value="TYPE_NOT_SET" class="choice" :disabled="disableChoice"></a-radio>
@ -36,8 +36,8 @@
<a-radio value="TYPE_SPECIFY" class="choice" :disabled="disableChoice"></a-radio>
<div class="list">
<a-checkbox-group v-model="valueList">
<template v-for="i in specifyRange">
<a-checkbox class="list-check-item" :key="`key-${i}`" :value="i" :disabled="type!==TYPE_SPECIFY || disabled">{{i}}</a-checkbox>
<template v-for="(v,k) in WEEK_MAP">
<a-checkbox class="list-check-item" :key="`key-${v}`" :value="v" :disabled="type!==TYPE_SPECIFY || disabled">{{k}}</a-checkbox>
</template>
</a-checkbox-group>
</div>

View File

@ -666,6 +666,7 @@
<div v-else-if="col.type === formTypes.slot" :key="i">
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
<!-- updatesunjianlei date2022-1-17 forbuildProps -->
<slot
:name="(col.slot || col.slotName) || col.key"
:index="rowIndex"
@ -679,6 +680,7 @@
:target="getVM()"
:handleChange="(v)=>handleChangeSlotCommon(v,id,row,col)"
:isNotPass="notPassedIds.includes(col.key+row.id)"
:buildProps="()=>buildProps(row,col)"
/>
</a-tooltip>
</div>
@ -1849,7 +1851,9 @@
}
}
if (edited) {
this.elemValueChange(column.type, {[newValueKey]: newValue}, column, newValue)
// update-begin-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
this.elemValueChange(column.type, {id: rowKey}, column, newValue)
// update-end-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
}
}
}
@ -2012,7 +2016,7 @@
{ title: '', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/ },
{ title: '', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/ },
{ title: '', value: 'm', pattern: /^1[3456789]\d{9}$/ },
{ title: '', value: 'p', pattern: /^[1-9]\d{5}$/ },
{ title: '', value: 'p', pattern: /^[0-9]{6}$/ },
{ title: '', value: 's', pattern: /^[A-Z|a-z]+$/ },
{ title: '', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ },
{ title: '', value: 'z', pattern: /^-?\d+$/ },

View File

@ -143,6 +143,10 @@
}
},
handleEmpty() {
// 禁用时,不允许清空内容
if (this.disabled) {
return
}
this.showText = ''
let destFieldsArr = this.destFields.split(',')
if (destFieldsArr.length === 0) {

View File

@ -103,6 +103,8 @@
<a-col :md="8" :xs="24" style="margin-bottom: 12px;">
<!-- -->
<j-search-select-tag v-if="item.type==='sel_search'" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
<!-- -->
<j-search-select-tag v-else-if="item.type==='list' && item.dictTable" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
<!-- -->
<template v-else-if="item.type==='list_multi'">
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" placeholder="请选择"/>
@ -136,14 +138,14 @@
v-else-if="item.type === 'select-user' || item.type === 'sel_user'"
v-model="item.val"
:buttons="false"
:multiple="false"
:multiple="allowMultiple(item)"
placeholder="请选择用户"
:returnKeys="['id', item.customReturnField || 'username']"
/>
<j-select-depart
v-else-if="item.type === 'select-depart' || item.type === 'sel_depart'"
v-model="item.val"
:multi="false"
:multi="allowMultiple(item)"
placeholder="请选择部门"
:customReturnField="item.customReturnField || 'id'"
/>
@ -331,7 +333,12 @@
let child = { ...item2 }
child.label = child.label || child.text
child.label = data.label + '-' + child.label
child.value = data.value + ',' + child.value
// update--begin--author:sunjianlei-----date:20220121------for【JTC-1167】【表单设计器】高级查询一对一字段查询不好使
// 是否仅包含字段名,不需要拼接子表表名
if (!data.onlyFieldName) {
child.value = data.value + ',' + child.value
}
// update--end--author:sunjianlei-----date:20220121------for【JTC-1167】【表单设计器】高级查询一对一字段查询不好使
child.val = ''
return child
})

View File

@ -1402,7 +1402,7 @@ const fooPatterns = [
{title: '', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/},
{title: '', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/},
{title: '', value: 'm', pattern: /^1[3456789]\d{9}$/},
{title: '', value: 'p', pattern: /^[1-9]\d{5}$/},
{title: '', value: 'p', pattern: /^[0-9]{6}$/},
{title: '', value: 's', pattern: /^[A-Z|a-z]+$/},
{title: '', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/},
{title: '', value: 'z', pattern: /^-?\d+$/},
@ -1442,4 +1442,4 @@ function uniqueValidator(event) {
}
}
return Promise.resolve()
}
}

View File

@ -10,6 +10,7 @@
<a-popconfirm
v-if="showRemove"
:title="`确定要删除这 ${selectedRowIds.length} 项吗?`"
:disabled="disabled"
@confirm="trigger('remove')"
>
<a-button icon="minus" :disabled="disabled"></a-button>

View File

@ -22,7 +22,7 @@
@initComp="initComp"/>
<span style="display: inline-block;height:100%;padding-left:14px" v-if="departIds" >
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ departNames }}</span>
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
</span>
</div>
</template>
@ -98,6 +98,10 @@
},
methods: {
openSelect(){
// disabled 不弹窗
if (this.componentDisabled) {
return
}
this.$refs.innerDepartSelectModal.show()
},
handleEmpty(){

View File

@ -21,7 +21,7 @@
@initComp="initComp"/>
<span style="display: inline-block;height:100%;padding-left:14px" v-if="userIds" >
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ userNames }}</span>
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
</span>
</div>
@ -119,6 +119,10 @@
},
methods: {
openSelect() {
// disabled 不弹窗
if (this.componentDisabled) {
return
}
this.$refs.selectModal.showModal()
},
selectOK(rows, idstr) {

View File

@ -87,6 +87,10 @@
this.$emit('change',this.inputContent)
},
pop(){
// disabled 不弹窗
if (this.disabled) {
return
}
this.visible=true
this.$nextTick(() => {
this.$refs.textarea.focus()

View File

@ -58,7 +58,7 @@
:dataSource="table.dataSource"
:pagination="table.pagination"
:loading="table.loading"
:rowSelection="{fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
:rowSelection="{type:rowSelectionType,fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
@change="handleChangeInTable"
style="min-height: 300px"
:scroll="tableScroll"
@ -171,7 +171,11 @@
computed:{
showSearchFlag(){
return this.queryInfo && this.queryInfo.length>0
}
},
// 行选择框类型,根据是否多选来控制显示为单选框还是多选框
rowSelectionType() {
return this.multi ? 'checkbox' : 'radio'
},
},
methods:{
loadColumnsInfo(){
@ -201,6 +205,12 @@
}
this.table.columns = [...currColumns]
this.initQueryInfo()
} else {
this.$error({
title: '',
content: (<p>Popup<br/>{res.message}</p>),
onOk: () => this.close(),
})
}
})
},
@ -421,6 +431,11 @@
this.table.selectionRows.splice(rowKey_index,1);
}
}
// 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行
if (!this.multi && this.table.selectedRowKeys.length > 1) {
this.table.selectionRows = [this.table.selectionRows.pop()]
this.table.selectedRowKeys = [this.table.selectedRowKeys.pop()]
}
}
}
}

View File

@ -11,11 +11,13 @@
switchFullscreen
cancelText="关闭">
<a-spin tip="Loading..." :spinning="false">
<a-input-search style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" @search="onSearch" />
<a-input-search v-model="searchValue" style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" />
<a-empty v-if="filterTreeData.length===0"></a-empty>
<a-tree
v-else
checkable
:class="treeScreenClass"
:treeData="treeData"
:treeData="filterTreeData"
:checkStrictly="checkStrictly"
@check="onCheck"
@select="onSelect"
@ -24,14 +26,6 @@
:expandedKeys="expandedKeys"
:checkedKeys="checkedKeys">
<template slot="title" slot-scope="{title}">
<span v-if="title.indexOf(searchValue) > -1">
{{title.substr(0, title.indexOf(searchValue))}}
<span style="color: #f50">{{searchValue}}</span>
{{title.substr(title.indexOf(searchValue) + searchValue.length)}}
</span>
<span v-else>{{title}}</span>
</template>
</a-tree>
</a-spin>
<!---->
@ -93,6 +87,18 @@
'fullscreen': this.fullscreen,
}
},
filterTreeData(){
if(!this.searchValue){
return this.treeData
}
let filter = []
this.dataList.forEach((item) => {
if (item.title.includes(this.searchValue)) {
filter.push(Object.assign({}, item, {children: null, isLeaf: true}))
}
})
return filter
},
},
methods:{
show(){
@ -228,22 +234,6 @@
}
}
return parentKey
},
onSearch(value){
const expandedKeys = this.dataList.map((item) => {
if (item.title.indexOf(value) > -1) {
return this.getParentKey(item.key,this.treeData)
}
return null
}).filter((item, i, self) => item && self.indexOf(item) === i)
Object.assign(this, {
expandedKeys,
searchValue: value,
autoExpandParent: true,
})
},
// 根据 checkedKeys 获取 rows
getCheckedRows(checkedKeys) {

View File

@ -28,14 +28,23 @@
</a-col>
<a-col :md="18" :sm="24">
<a-card :bordered="false">
:
<a-input-search
:style="{width:'150px',marginBottom:'15px'}"
placeholder="请输入账号"
v-model="queryParam.username"
@search="onSearch"
></a-input-search>
<a-button @click="searchReset(1)" style="margin-left: 20px" icon="redo"></a-button>
<a-form-model>
<a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row type="flex" :gutter="8">
<a-col :span="18">
<a-input-search
:style="{width:'100%'}"
placeholder="请输入账号"
v-model="queryParam.username"
@search="onSearch"
></a-input-search>
</a-col>
<a-col :span="6">
<a-button @click="searchReset(1)" icon="redo"></a-button>
</a-col>
</a-row>
</a-form-model-item>
</a-form-model>
<!---->
<a-table
ref="table"
@ -133,6 +142,14 @@
form: this.$form.createForm(this),
loading: false,
expandedKeys: [],
labelCol: {
xs: { span: 24 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 10 },
},
}
},
computed: {

View File

@ -28,6 +28,9 @@
</template>
<!-- update-end-author:taoyan date:20201221 for:transition 12 300-500 -->
</div>
<!-- update-begin-author:zyf date:20211129 for:qiankun -->
<div id="content" class="app-view-box"></div>
<!-- update-end-author:zyf date:20211129 for: qiankun -->
</global-layout>
</template>
@ -38,6 +41,7 @@
import { triggerWindowResizeEvent } from '@/utils/util'
import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
import registerApps from "@/qiankun";
const indexKey = '/dashboard/analysis'
@ -92,6 +96,14 @@
this.activePage = currentRoute.fullPath
},
mounted() {
if (process.env.VUE_APP_QIANKUN == 'true') {
//update-begin-author:zyf date:20211129 for:qiankun 注册子应用
if (!window.qiankunStarted) {
window.qiankunStarted = true;
registerApps();
}
//update-end-author:zyf date:20211129 for:qiankun 注册子应用
}
},
watch: {
'$route': function(newRoute) {

View File

@ -149,7 +149,8 @@
<!-- update_begin author:sunjianlei date:20190530 for: -->
<style lang="less">
.ant-menu.ant-menu-root {
// 选中首页的时候不显示背景颜色,只应用于左侧菜单
.sider .ant-menu.ant-menu-root {
& > .ant-menu-item:first-child {
background-color: transparent;

View File

@ -220,7 +220,9 @@
overflow-y: auto;
}
.ant-table-body {
min-width: 800px;
// update-begin---author:sunjianlei Date:20220104 for 【JTC-480】移动端不支持左右拖动需要注释掉此段代码 ------------
//min-width: 800px;
// update-end---author:sunjianlei Date:20220104 for 【JTC-480】移动端不支持左右拖动需要注释掉此段代码 ------------
}
}
.sidemenu {

View File

@ -23,6 +23,7 @@
</template>
<script>
import {getUserList} from '@/api/api'
export default {
name: "SysAnnouncementModal",
components: {
@ -59,6 +60,15 @@
},
methods: {
detail (record) {
//update-begin---author:wangshuai ---date:20220107 for将其它页面传递过来的用户名改成用户真实姓名
if(record.sender){
getUserList({"username":record.sender}).then((res) =>{
if(res.success && res.result.records.length>0){
record.sender = res.result.records[0].realname
}
})
}
//update-end---author:wangshuai ---date:20220107 for将其它页面传递过来的用户名改成用户真实姓名
this.visible = true;
this.record = record;
},

View File

@ -183,10 +183,10 @@
content: ' ?',
onOk() {
return that.Logout({}).then(() => {
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
that.$router.push({ path: '/user/login' });
// update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
//that.$router.push({ path: '/user/login' });
window.location.reload()
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
// update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
}).catch(err => {
that.$message.error({
title: '',
@ -225,17 +225,13 @@
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
searchMethods(value) {
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
//update-begin-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单内部打开在搜索菜单上打开却新开了一个窗口
if (route.meta.internalOrExternal === true) {
window.open(route.meta.url, '_blank')
} else {
if(route.component.includes('layouts/IframePageView')){
this.$router.push(route)
}else{
this.$router.push({ path: route.path })
}
//update-begin-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单无法将Token信息传递过去
if(route.component.includes('layouts/IframePageView')){
this.$router.push(route)
}else{
this.$router.push({ path: route.path })
}
//update-end-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单内部打开在搜索菜单上打开却新开了一个窗口
//update-end-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单无法将Token信息传递过去
this.searchMenuVisible = false
},
// update_end author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题

View File

@ -1,10 +1,10 @@
/** init domain config */
import Vue from 'vue'
//设置全局API_BASE_URL
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
//单点登录地址
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] = window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'

View File

@ -356,7 +356,7 @@ export const constantRouterMap = [
{
// OAuth2 登录路由
path: 'login',
name: 'login',
name: 'oauth2-app-login',
component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login')
},
]

View File

@ -0,0 +1,22 @@
/**
*apps
* @name: -
* @entry: . -
* @container: -
* @activeRule: -
*/
//子应用列表
const _apps = [];
for (const key in process.env) {
if (key.includes('VUE_APP_SUB_')) {
const name = key.split('VUE_APP_SUB_')[1];
const obj = {
name,
entry: process.env[key],
container: '#content',
activeRule: name,
};
_apps.push(obj)
}
}
export const apps = _apps;

View File

@ -0,0 +1,68 @@
/**
* qiankun
*/
import {registerMicroApps, setDefaultMountApp, start, runAfterFirstMounted, addGlobalUncaughtErrorHandler} from 'qiankun';
import {apps} from './apps';
import {getProps, initGlState} from './state';
/**
* apps
*/
function filterApps() {
apps.forEach((item) => {
//主应用需要传递给微应用的数据。
item.props = getProps();
//微应用触发的路由规则
item.activeRule = genActiveRule('/' + item.activeRule);
});
return apps;
}
/**
*
* @param {*} routerPrefix
*/
function genActiveRule(routerPrefix) {
return location => location.pathname.startsWith(routerPrefix);
}
/**
*
*/
function registerApps() {
const _apps = filterApps();
registerMicroApps(_apps,
{
beforeLoad: [
loadApp => {
console.log('before load', loadApp);
}
],
beforeMount: [
mountApp => {
console.log('before mount', mountApp);
}
],
afterMount: [
mountApp => {
console.log('before mount', mountApp);
}
],
afterUnmount: [
unloadApp => {
console.log('after unload', unloadApp);
}
]
});
// 设置默认子应用,与 genActiveRule中的参数保持一致
// setDefaultMountApp();
// 第一个微应用 mount 后需要调用的方法,比如开启一些监控或者埋点脚本。
runAfterFirstMounted(() => console.log(''));
// 添加全局的未捕获异常处理器。
addGlobalUncaughtErrorHandler(event => console.log(event));
// 定义全局状态
initGlState();
//启动qiankun
start({});
}
export default registerApps;

View File

@ -0,0 +1,41 @@
/**
*
*/
import {initGlobalState} from 'qiankun';
import store from '@/store';
import router from '@/router';
import Vue from 'vue';
import {ACCESS_TOKEN} from "@/store/mutation-types"
//定义传入子应用的数据
export function getProps() {
return {
data: {
publicPath: process.env.BASE_URL,
token: Vue.ls.get(ACCESS_TOKEN),
store,
router
}
}
}
/**
* ,使 props
* @param state 穿
*/
export function initGlState(info = {userName: 'admin'}) {
// 初始化state
const actions = initGlobalState(info);
// 设置新的值
actions.setGlobalState(info);
// 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。
actions.onGlobalStateChange((newState, prev) => {
// state: 变更后的状态; prev 变更前的状态
console.info("newState", newState)
for (const key in newState) {
console.info("onGlobalStateChange", key)
}
});
// 将action对象绑到Vue原型上为了项目中其他地方使用方便
Vue.prototype.$actions = actions;
}

View File

@ -3,9 +3,9 @@ import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import permission from './modules/permission'
import enhance from './modules/enhance'
import online from './modules/online'
import permission from './modules/permission'
import getters from './getters'
Vue.use(Vuex)

View File

@ -19,4 +19,12 @@ export function demoFieldDefVal_getAddress(arg) {
arg = ''
}
return ` ${arg}`
}
/** 自定义JS函数示例 */
export function sayHi(name) {
if (!name) {
name = ''
}
return ` ${name}`
}

View File

@ -83,19 +83,19 @@ export function formatDate(value, fmt) {
// 生成首页路由
export function generateIndexRouter(data) {
let indexRouter = [{
path: '/',
name: 'dashboard',
//component: () => import('@/components/layouts/BasicLayout'),
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
meta: { title: '' },
redirect: '/dashboard/analysis',
children: [
...generateChildRouters(data)
]
},{
"path": "*", "redirect": "/404", "hidden": true
}]
let indexRouter = [{
path: '/',
name: 'dashboard',
//component: () => import('@/components/layouts/BasicLayout'),
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
meta: { title: '' },
redirect: '/dashboard/analysis',
children: [
...generateChildRouters(data)
]
},{
"path": "*", "redirect": "/404", "hidden": true
}]
return indexRouter;
}
@ -106,9 +106,9 @@ function generateChildRouters (data) {
for (let item of data) {
let component = "";
if(item.component.indexOf("layouts")>=0){
component = "components/"+item.component;
component = "components/"+item.component;
}else{
component = "views/"+item.component;
component = "views/"+item.component;
}
// eslint-disable-next-line
@ -206,7 +206,7 @@ export function randomNumber() {
}
if (arguments.length === 1) {
let [length] = arguments
// 生成指定长度的随机数字,首位一定不是 0
// 生成指定长度的随机数字,首位一定不是 0
let nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9)))
return parseInt(nums.join(''))
} else if (arguments.length >= 2) {

View File

@ -254,7 +254,7 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="树字典" prop="treeDict">
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="A01" />
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="B01" />
</a-form-model-item>
</a-col>
<a-col :span="12">(v-model){{ formData.treeDict }}</a-col>
@ -410,14 +410,11 @@
<!-- -->
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="省市县级联" prop="areaLinkage2">
<j-area-linkage v-model="formData.areaLinkage2" type="select"/>
</a-form-model-item>
</a-col>
<a-col :span="12">(v-model){{ formData.areaLinkage2 }}</a-col>
<a-form-model-item label="省市县级联" prop="areaLinkage2">
<j-area-linkage v-model="formData.areaLinkage2" type="select" style="float: left"/>
<span style="margin-left: 25px">(v-model){{ formData.areaLinkage2 }}</span>
</a-form-model-item>
</a-row>
<!-- -->
<a-row :gutter="24">
<a-col :span="12">

View File

@ -0,0 +1,231 @@
<template>
<a-card :bordered="false">
<a-row>
<a-col>
<a-switch v-bind="pageSwitchProps" v-model="pageSwitch"/>
</a-col>
<a-col>
<a-table
v-bind="tableProps"
@change="handleTableChange"
style="margin-top: 20px"
>
</a-table>
</a-col>
</a-row>
</a-card>
</template>
<script>
export default {
name: 'TableTotal',
data() {
return {
columns: [
{
title: '#',
width: '180px',
align: 'center',
dataIndex: 'rowIndex',
customRender: function (text, r, index) {
return (text !== '') ? (parseInt(index) + 1) : text
}
},
{
title: '',
dataIndex: 'name',
width: 180,
},
{
title: '',
dataIndex: 'point',
width: 180,
},
{
title: '',
dataIndex: 'level',
width: 180,
},
{
title: '',
dataIndex: 'updateTime',
width: 180,
},
],
/* 分页参数 */
ipagination:{
current: 1,
pageSize: 10,
},
dataSource: [
{ id:"1",name: '', point: 23, level: 3, updateTime: '2019-8-14' },
{ name: '', point: 6, level: 1, updateTime: '2019-8-13' },
{ name: '', point: 53, level: 8, updateTime: '2019-8-12' },
{ name: '', point: 44, level: 5, updateTime: '2019-8-11' },
{ name: '', point: 97, level: 10, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '', point: 33, level: 2, updateTime: '2019-8-10' },
{ name: '鹿', point: 33, level: 2, updateTime: '2019-8-10' },
],
newArr:[],
newDataSource:[],
footerDataSource: [],
pageSwitch:true
}
},
computed:{
// 数据表格的固定属性
tableProps(){
let tableProps = {
size: 'middle',
rowKey:'rowIndex',
columns: this.columns,
scroll: {x: true},
}
let renderFooter = this.footerDataSource.length === 0 ? null : () => this.renderTableFooter(tableProps)
return {
...tableProps,
ref: 'table',
class: 'chart-data-list',
pagination:this.pageSwitch?this.ipagination:false,
columns: this.columns,
dataSource: this.dataSource,
footer: renderFooter,
}
},
pageSwitchProps() {
return {
checkedChildren: '',
unCheckedChildren: '',
style: {
position: 'absolute',
right: '0px',
top: '-10px'
}
}
},
},
mounted() {
// this.tableAddTotalRow(this.columns, this.dataSource)
/*新增分页合计方法*/
this.newDataSource=this.dataSource
this.dataHandling(1,this.ipagination.pageSize)
},
watch:{
//update-begin---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
'pageSwitch':function(val){
if(!val){
this.dataHandling('-1',0)
}else{
this.dataHandling(1,this.ipagination.pageSize)
}
},
'ipagination.current':function(val) {
this.dataHandling(val,this.ipagination.pageSize)
},
//当合计行变化时,绑定滚动条
'footerDataSource': {
async handler(dataSource) {
// 当底部合计行有值,并且显示出来时,再同步滚动条
if (dataSource && dataSource.length > 0) {
await this.$nextTick()
// 同步表与footer滚动
let dom = this.$refs.table.$el.querySelectorAll('.ant-table-body')[0]
let footerDom = this.$refs.footerTable.$el.querySelectorAll('.ant-table-body')[0]
dom.addEventListener(
'scroll',
() => {
footerDom.scrollLeft = dom.scrollLeft
},
true,
)
}
},
//update-end---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
}
},
methods: {
/** 表格增加合计行 */
tableAddTotalRow(columns, dataSource) {
let numKey = 'rowIndex'
let totalRow = { [numKey]: '' }
columns.forEach(column => {
let { key, dataIndex } = column
if (![key, dataIndex].includes(numKey)) {
let total = 0
dataSource.forEach(data => {
total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN
console.log(data[dataIndex], ':', (/^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN))
})
if (Number.isNaN(total)) {
total = '-'
}
totalRow[dataIndex] = total
}
})
dataSource.push(totalRow)
},
handleTableChange(pagination, filters, sorter) {
this.ipagination = pagination;
},
//update-begin---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
/*如果分页走这个方法*/
dataHandling(pageNo,pageSize) {
//根据当前页数和每页显示条数分割数组
let arrs = [];
//如果pageNo不是-1不分页,那么需要对数据进行分页计算
if(pageNo!=-1){
arrs = this.newDataSource.slice((pageNo-1)*pageSize,pageNo*pageSize)
}else{
arrs = this.newDataSource
}
let newDataSource=[];
let newArr= { };
newArr.rowIndex="总计"
let level=0;
let point=0;
//每一项的数值相加
for (let j=0;j<arrs.length;j++){
level+=arrs[j].level;
point+=arrs[j].point;
}
newArr.level=level;
newArr.point=point;
newDataSource.push(newArr);
//给foot底部数组赋值
this.footerDataSource = newDataSource;
},
// 渲染表格底部合计行
renderTableFooter(tableProps) {
let h = this.$createElement
return h('a-table', {
ref: 'footerTable',
props: {
...tableProps,
pagination: false,
dataSource: this.footerDataSource,
showHeader: false,
},
})
//update-end---author:wangshuai ---date:20220209 for[JTC-494]常用示例->表格合计写法改成新的写法------------
}
}
}
</script>
<style scoped lang="less">
/deep/ .chart-data-list .ant-table-footer .ant-table-body{
overflow: hidden !important;
}
/deep/ .ant-table-footer{
padding:0;
}
</style>

View File

@ -37,7 +37,9 @@
visible: false,
bodyStyle:{
padding: "0",
height:(window.innerHeight-150)+"px"
//update-begin---author:wangshuai ---date:20220104 for[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
height:(window.innerHeight-140)+"px"
//update-begin---author:wangshuai ---date:20220104 for[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
},
modalWidth:800,
}

View File

@ -1,6 +1,7 @@
<template>
<a-card title="磁盘监控">
<a-row>
<a-skeleton v-if="loading" active/>
<a-row v-else>
<template v-if="diskInfo && diskInfo.length>0">
<a-col :span="8" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index ">
<dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo>
@ -23,6 +24,7 @@
},
data() {
return {
loading: true,
description: '',
//数据集
diskInfo:[],
@ -32,6 +34,7 @@
}
},
created() {
this.loading = true
getAction(this.url.queryDiskInfo).then((res)=>{
if(res.success){
for(var i=0;i<res.result.length;i++){
@ -39,7 +42,7 @@
}
this.diskInfo = res.result;
}
})
}).finally(() => this.loading = false)
}
}
</script>

View File

@ -1,7 +1,7 @@
<template>
<a-skeleton active :loading="loading" :paragraph="{rows: 17}">
<a-card>
<!-- Radis -->
<!-- Redis -->
<a-row :gutter="8">
<a-col :sm="24" :xl="12">
<area-chart-ty v-bind="memory"/>
@ -41,7 +41,7 @@
millisec: 3000,
// Key 实时数量
key: {
title: 'Radis Key ',
title: 'Redis Key ',
dataSource: [],
y: '',
height: 340,
@ -53,7 +53,7 @@
},
// 内存实时占用情况
memory: {
title: 'Radis KB',
title: 'Redis KB',
dataSource: [],
y: 'KB',
min: 0,

View File

@ -23,12 +23,13 @@
</a-alert>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
<!-- -->
<a-col :md="10" :sm="24">
<template>
<div>
<a-empty v-if="departTree.length===0" description="暂无部门" style="margin-top: 8px;"/>
<template v-else>
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
<span style="user-select: none">
<a-tree
v-if="loading"
v-if="treeLoading"
checkable
multiple
@select="onSelect"
@ -49,7 +50,7 @@
</a-menu>
</a-dropdown>
</template>
</a-col>
</div>
</div>
</a-card>
<!---- author:os_chengtgen -- date:20190827 -- for: =======------>
@ -195,7 +196,7 @@
data() {
return {
iExpandedKeys: [],
loading: true,
treeLoading: true,
autoExpandParent: false,
currFlowId: '',
currFlowName: '',
@ -271,8 +272,10 @@
that.allIds = []
that.iExpandedKeys = []
that.loading = false
//update-begin---author:wangshuai ---date:20220105 for[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
//部门树v-if用到了loading,和上传loading冲突了换一个名称
that.treeLoading = false
//update-end---author:wangshuai ---date:20220105 for[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
queryDepartTreeSync().then((res) => {
if (res.success) {
this.allTreeKeys = [];
@ -288,7 +291,8 @@
}
}
that.$nextTick(()=>{
that.loading = true
//部门树v-if用到了loading,和上传loading冲突了换一个名称
that.treeLoading = true
})
}
})
@ -320,7 +324,8 @@
that.departTreeAll=that.departTree
},
refresh() {
this.loading = true
//部门树v-if用到了loading,和上传loading冲突了换一个名称
this.treeLoading = true
this.loadTree()
},
// 右键操作方法

View File

@ -59,10 +59,13 @@
:loading="loading"
@change="handleTableChange">
<div v-show="queryParam.logType==2" slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">:{{ record.requestParam }}</span></div>
</div>
<template v-if="queryParam.logType==='2'" #expandedRowRender="record">
<div style="margin: 0">
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">:{{ record.requestParam }}</span></div>
</div>
</template>
<!-- -->
<span slot="logContent" slot-scope="text, record">
<j-ellipsis :value="text" :length="40"/>
@ -187,6 +190,10 @@
param['superQueryParams'] = encodeURI(this.superQueryParams)
param['superQueryMatchType'] = this.superQueryMatchType
}
//登录日志没有操作类型
if (this.tabKey === '1') {
param.operateType = ''
}
return filterObj(param);
},
@ -213,7 +220,7 @@
let that=this;
that.queryParam.logType=key;
that.loadData();
that.loadData(1);
},
onDateChange: function (value, dateString) {
console.log(dateString[0],dateString[1]);

View File

@ -47,6 +47,9 @@
:dataSource="dataSource"
:loading="loading"
:rowClassName="getRowClassname">
<template slot="ruleValueText" slot-scope="text,record">
<j-ellipsis :value="text" :length="15"></j-ellipsis>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">
<a-icon type="edit"/>
@ -72,17 +75,21 @@
{
title: '',
dataIndex: 'ruleName',
key: 'ruleName'
key: 'ruleName',
width:150,
},
{
title: '',
dataIndex: 'ruleColumn',
key: 'ruleColumn'
key: 'ruleColumn',
width:150,
},
{
title: '',
dataIndex: 'ruleValue',
key: 'ruleValue'
key: 'ruleValue',
width:150,
scopedSlots: {customRender: "ruleValueText"}
},
{
title: '',

View File

@ -64,6 +64,7 @@
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:scroll="{x:true}"
@change="handleTableChange">
<!-- -->
@ -83,7 +84,7 @@
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item><a @click="executeImmediately(record)"></a></a-menu-item>
<a-menu-item><a @click="executeImmediately(record)"></a></a-menu-item>
<a-menu-item><a @click="handleEdit(record)"></a></a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">

View File

@ -69,6 +69,7 @@
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
<a-icon type="down" />

View File

@ -63,6 +63,7 @@
<a @click="handleOpen(record)"></a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
<a-icon type="down"/>
@ -537,6 +538,7 @@
}
</script>
<style scoped>
@import '~@assets/less/common.less';
/** Button按钮间距 */
.ant-btn {
margin-left: 8px

View File

@ -32,9 +32,9 @@
<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>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import"></a-button>-->
<!-- </a-upload>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">

View File

@ -69,7 +69,12 @@
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<template slot="ruleClassText" slot-scope="text">
<j-ellipsis :value="text" :length="30"></j-ellipsis>
</template>
<template slot="ruleParamsText" slot-scope="text,record">
<j-ellipsis :value="text" :length="30"></j-ellipsis>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical"/>
@ -131,12 +136,14 @@
{
title: '',
align: 'center',
dataIndex: 'ruleClass'
dataIndex: 'ruleClass',
scopedSlots: {customRender: "ruleClassText"}
},
{
title: '',
align: 'center',
dataIndex: 'ruleParams'
dataIndex: 'ruleParams',
scopedSlots: {customRender: "ruleParamsText"}
},
{
title: '',

View File

@ -68,12 +68,14 @@
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
import {getFileAccessHttpUrl} from '@/api/manage';
import {ACCESS_TOKEN} from '@/store/mutation-types'
export default {
name: "SysUserOnlineList",
mixins:[JeecgListMixin, mixinDevice],
components: {},
data () {
let currentToken = this.$ls.get(ACCESS_TOKEN)
return {
description: '线',
queryParam: {
@ -84,7 +86,13 @@
{
title:'',
align:"center",
dataIndex: 'username'
dataIndex: 'username',
customRender: (text,record) => {
if(record.token === currentToken) {
return text + ''
}
return text
},
},{
title:'',
align:"center",

View File

@ -66,7 +66,7 @@
<!-- -->
<div class="table-operator" style="border-top: 5px">
<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-button type="primary" icon="import"></a-button>
</a-upload>
@ -156,6 +156,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>
@ -374,6 +378,10 @@
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
handleAgentSettings(username){
this.$refs.sysUserAgentModal.agentSettings(username);
this.$refs.sysUserAgentModal.title = "用户代理人设置";
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面可以把datasource中的数据更新一下
},

View File

@ -51,11 +51,18 @@
},
handleTreeSelect(selectedKeys, event) {
if (selectedKeys.length > 0 && this.selectedKeys[0] !== selectedKeys[0]) {
this.selectedKeys = [selectedKeys[0]]
let orgCode = event.node.dataRef.orgCode
this.emitInput(orgCode)
//update-begin---author:wangshuai ---date:20220107 for[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
if (selectedKeys.length > 0) {
if(this.selectedKeys[0] !== selectedKeys[0]){
this.selectedKeys = [selectedKeys[0]]
let orgCode = event.node.dataRef.orgCode
this.emitInput(orgCode)
}
}else{
this.selectedKeys = []
this.emitInput("")
}
//update-end---author:wangshuai ---date:20220107 for[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
},
emitInput(orgCode) {

View File

@ -94,7 +94,7 @@
title: '',
width: '15%',
align: 'center',
dataIndex: 'telephone'
dataIndex: 'phone'
},
// {
// title: '手机号',

View File

@ -1,70 +1,16 @@
<template>
<a-card :visible="visible">
<a-form-model ref="form" :model="model">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构名称">
<a-input style="border:0;" placeholder="" v-model="model.departName"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
<a-tree-select
disabled
style="width:100%;border: 0;border: none;outline:none;"
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
:treeData="treeData"
v-model="model.parentId"
placeholder="无">
</a-tree-select>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构编码">
<a-input style="border:0;" placeholder="" v-model="model.orgCode"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构类型">
<a-radio-group :disabled="true" v-model="model.orgCategory" read-only>
<a-radio value="1">
</a-radio>
<a-radio value="2">
</a-radio>
<a-radio value="3">
</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number style="border:0;" v-model="model.departOrder"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="手机号">
<a-input style="border:0;" placeholder="" v-model="model.mobile"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="地址">
<a-input style="border:0;" placeholder="" v-model="model.address"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea style="border:0;" placeholder="" v-model="model.memo"/>
</a-form-model-item>
</a-form-model>
</a-card>
<div :visible="visible">
<a-descriptions size="small" bordered :column="1">
<a-descriptions-item label="机构名称">{{model.departName}}</a-descriptions-item>
<a-descriptions-item label="上级部门"><span>{{model.parentId}}</span></a-descriptions-item>
<a-descriptions-item label="机构编码"><span>{{model.orgCode}}</span></a-descriptions-item>
<a-descriptions-item label="机构类型"><span>{{model.orgCategory}}</span></a-descriptions-item>
<a-descriptions-item label="排序"><span>{{model.departOrder}}</span></a-descriptions-item>
<a-descriptions-item label="手机号"><span>{{model.mobile}}</span></a-descriptions-item>
<a-descriptions-item label="地址"><span>{{model.address}}</span></a-descriptions-item>
<a-descriptions-item label="备注"><span>{{model.memo}}</span></a-descriptions-item>
</a-descriptions>
</div>
</template>
<script>
import { queryIdTree } from '@/api/api'
@ -107,18 +53,70 @@
},
open(record) {
this.visible = true;
this.$nextTick(() => {
this.$refs.form.resetFields()
this.model = Object.assign({}, record)
})
},
//update-begin---author:wangshuai ---date:20220211 for[JTC-174]部门管理界面参考vue3的改改------------
this.model = Object.assign({}, record)
this.model.parentId = this.findTree(this.treeData,record.parentId);
this.model.orgCategory = this.orgCategoryText(record.orgCategory)
//update-end---author:wangshuai ---date:20220211 for[JTC-174]部门管理界面参考vue3的改改------------
},
clearForm() {
this.$refs.form.resetFields();
this.treeData = [];
},
/**
* id
* @param treeList
* @param id id
* @return id
*/
findTree(treeList,id){
for (let i = 0; i < treeList.length; i++) {
let item = treeList[i];
//如果当前id和父id相同则返回部门名称
if (item.key == id) {
return item.title;
}
let children = item.children
//存在子部门进行递归查询
if(children){
let findResult = this.findTree(children, id);
//返回的数据不为空,结束递归,返回结果
if (findResult) {
return findResult
}
}
}
},
/**
*
* @param orgCategory
* @return
*/
orgCategoryText(orgCategory) {
if(orgCategory == 1){
return "公司";
}else if(orgCategory == 2){
return "部门";
}else{
return "岗位";
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
<style scoped lang="less">
.ant-descriptions-view{
border: 1px solid #f0f0f0;
}
/deep/ .ant-descriptions-item-label{
width:180px
}
/deep/ .ant-descriptions-item-content span{
color:#000000d9;
}
/deep/ .ant-descriptions-bordered .ant-descriptions-row{
border-bottom: 1px solid #f0f0f0 !important;
}
/deep/ .ant-descriptions-bordered .ant-descriptions-item-label{
border-right: 1px solid #f0f0f0;
}
</style>

View File

@ -38,7 +38,7 @@
:wrapperCol="wrapperCol"
prop="ruleValue"
label="规则值">
<a-input placeholder="请输入规则值" v-model.trim="model.ruleValue"/>
<a-input placeholder="请输入规则值" v-model="model.ruleValue"/>
</a-form-model-item>
<a-form-model-item

View File

@ -73,7 +73,7 @@
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,onSelect:onSelect}"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange"
>
<!-- update-end author:kangxiaolin date:20190921 for: #513 -->
@ -219,22 +219,12 @@
return str;
},
//--update-begin----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
onSelectChange (selectedRowKeys) {
onSelectChange (selectedRowKeys,selectionRows) {
this.selectedRowKeys = selectedRowKeys;
//update-begin---author:wangshuai ---date:20211227 for全选不好用------------
this.selectionRows = selectionRows;
//update-end---author:wangshuai ---date:20211227 for全选不好用------------
},
onSelect(record, selected){
if(selected == true ){
this.selectionRows.push(record);
}else {
this.selectionRows.forEach(function(item,index,arr){
if(item.id == record.id) {
arr.splice(index, 1);
}
})
}
//--update-end----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
},
searchReset(){
let that = this;
Object.keys(that.queryParam).forEach(function(key){

View File

@ -11,131 +11,42 @@
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="titile"
label="标题">
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgCategory"
label="消息类型">
<a-select
v-model="model.msgCategory"
placeholder="请选择消息类型"
:disabled="disableSubmit"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="1"></a-select-option>
<a-select-option value="2"></a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="startTime"
label="开始时间:">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.startTime" placeholder="请选择开始时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" ></j-date>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="endTime"
label="结束时间"
class="endTime">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss"></j-date>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="优先级">
<a-select
v-model="model.priority"
placeholder="请选择优先级"
:disabled="disableSubmit"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="L"></a-select-option>
<a-select-option value="M"></a-select-option>
<a-select-option value="H"></a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgType"
label="通告类型">
<a-select
v-model="model.msgType"
placeholder="请选择通告类型"
:disabled="disableSubmit"
@change="chooseMsgType"
:getPopupContainer = "(target) => target.parentNode">
<a-select-option value="USER"></a-select-option>
<a-select-option value="ALL"></a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="msgAbstract"
label="摘要">
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
</a-form-model-item>
</a-col>
<a-col :span="24/2">
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="指定用户"
v-if="userType">
<a-select
mode="multiple"
placeholder="请选择用户"
:labelInValue=true
v-model="selectedUser"
@dropdownVisibleChange="selectUserIds"
@change="handleChange"
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row style="width: 100%;">
<a-col :span="24">
<a-form-model-item
:labelCol="labelColX1"
:wrapperCol="wrapperColX1"
label="内容"
class="j-field-content">
<j-editor v-model="model.msgContent"></j-editor>
</a-form-model-item>
</a-col>
</a-row>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgCategory" label="消息类型">
<a-radio-group v-model="model.msgCategory" :disabled="disableSubmit">
<a-radio value="1"></a-radio>
<a-radio value="2"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="titile" label="标题">
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgAbstract" label="摘要">
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime" label="截至日期" class="endTime">
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgType" label="接收用户">
<a-radio-group v-model="model.msgType" :disabled="disableSubmit" @change="chooseMsgType">
<a-radio value="USER"></a-radio>
<a-radio value="ALL"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="指定用户" v-if="userType">
<j-select-multi-user :returnKeys="returnKeys" placeholder="请选择指定用户" v-model="userIds" :trigger-change="true"></j-select-multi-user>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优先级" >
<a-radio-group v-model="model.priority" placeholder="请选择优先级" :disabled="disableSubmit">
<a-radio value="L"></a-radio>
<a-radio value="M"></a-radio>
<a-radio value="H"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item :labelCol="labelColX1" :wrapperCol="wrapperColX1" label="内容" class="j-field-content">
<j-editor v-model="model.msgContent" />
</a-form-model-item>
</a-form-model>
</a-spin>
<select-user-list-modal ref="UserListModal" @choseUser="choseUser"></select-user-list-modal>
</a-modal>
</template>
@ -159,7 +70,7 @@
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
@ -167,11 +78,11 @@
},
labelColX1: {
xs: { span: 24 },
sm: { span: 3 },
sm: { span: 4 },
},
wrapperColX1: {
xs: { span: 24 },
sm: { span: 21 },
sm: { span: 18 },
},
confirmLoading: false,
validatorRules:{
@ -192,7 +103,8 @@
selectedUser:[],
disabled:false,
msgContent:"",
userList:[]
userList:[],
returnKeys:['id', 'id'] //用户选择返回字段
}
},
created () {
@ -208,26 +120,18 @@
this.getUser(record);
},
getUser(record){
//update-begin---author:wangshuai ---date:20211227 for[JTC-191]系统通告参考vue3的来改为单选按钮附默认值------------
record.msgCategory = record.msgCategory?record.msgCategory:"1"
record.msgType = record.msgType?record.msgType:"ALL"
record.priority = record.priority?record.priority:"H"
//update-begin---author:wangshuai ---date:20211227 for[JTC-191]系统通告参考vue3的来改为单选按钮附默认值------------
this.model = Object.assign({}, record);
// 指定用户
if(record&&record.msgType === "USER"){
this.userType = true;
this.userIds = record.userIds;
getAction(this.url.queryByIds,{userIds:this.userIds}).then((res)=>{
if(res.success){
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
var userList=[];
for(var i=0;i<res.result.length;i++){
var user={};
user.label =res.result[i].realname;
user.key=res.result[i].id;
userList.push(user);
}
this.selectedUser=userList;
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
this.$refs.UserListModal.edit(res.result,this.userIds);
}
});
//update-begin---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
this.userIds = record.userIds.substr(0,record.userIds.length-1);
//update-end---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
}
},
close () {
@ -257,7 +161,9 @@
method = 'put';
}
if(this.userType){
this.model.userIds = this.userIds;
//update-begin---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
this.model.userIds = this.userIds+",";
//update-end---author:wangshuai ---date:20220104 for[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
@ -271,7 +177,7 @@
that.confirmLoading = false;
that.close();
})
}else{
return false;
}
@ -286,36 +192,17 @@
resetUser (){
this.userType = false;
this.userIds = [];
this.selectedUser = [];
this.disabled = false;
this.$refs.UserListModal.edit(null,null);
},
selectUserIds() {
this.$refs.UserListModal.add(this.selectedUser,this.userIds);
},
chooseMsgType(value) {
if("USER" == value) {
chooseMsgType(e) {
if("USER" == e.target.value) {
this.userType = true;
} else {
this.userType = false;
this.selectedUser = [];
this.userIds = [];
}
},
// 子modal回调
choseUser:function(userList){
this.selectedUser = [];
this.userIds = [];
for(var i=0;i<userList.length;i++){
//update--begin--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
var user={};
user.label =userList[i].realname;
user.key=userList[i].id;
this.selectedUser.push(user);
//update--end--autor:wangshuai-----date:20200601------for系统公告选人后不能删除------
this.userIds += userList[i].id+","
}
},
startTimeValidate(rule,value,callback){
let endTime = this.model.endTime
if(!value || !endTime){
@ -336,20 +223,6 @@
callback("结束时间需大于开始时间")
}
},
handleChange(userList) {
if (userList) {
this.userIds = [];
var users=[];
for (var i = 0; i < userList.length; i++) {
var user={};
user.id=userList[i].key;
user.realname=userList[i].label;
this.userIds += userList[i].key + ',';
users.push(user);
}
}
this.$refs.UserListModal.edit(users,this.userIds);
}
}
}
</script>

View File

@ -23,7 +23,7 @@
:wrapperCol="wrapperCol"
prop="roleCode"
label="部门角色编码">
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode"/>
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode" :read-only="roleCodeRead"/>
</a-form-model-item>
<a-form-model-item
:labelCol="labelCol"
@ -76,6 +76,7 @@
add: "/sys/sysDepartRole/add",
edit: "/sys/sysDepartRole/edit",
},
roleCodeRead:false //编码时候可以编写
}
},
created () {
@ -87,6 +88,9 @@
edit (record,departId) {
this.departId = departId;
this.model = Object.assign({}, record);
//update-begin---author:wangshuai ---date:20220104 for[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
this.roleCodeRead = !!this.model.roleCode
//update-end---author:wangshuai ---date:20220104 for[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
this.visible = true;
},
close () {

View File

@ -21,7 +21,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="代理人用户名">
<j-select-user-by-dep placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
<j-select-user-by-dep :multi="false" placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
</a-form-item>
<a-form-item
:labelCol="labelCol"

View File

@ -7,7 +7,7 @@
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
style="height: 100%;">
<template slot="title">
<div style="width: 100%;">
@ -30,7 +30,7 @@
<a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
<a-input type="password" placeholder="请输入登录密码" v-model="model.password" />
</a-form-model-item>
<a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
</a-form-model-item>
@ -44,6 +44,10 @@
<a-input placeholder="请输入工号" v-model="model.workNo" />
</a-form-model-item>
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input placeholder="请输入手机号码" v-model="model.phone" />
</a-form-model-item>
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
</a-form-model-item>
@ -99,7 +103,7 @@
:format="dateFormat"
:getCalendarContainer="node => node.parentNode"/>
</a-form-model-item>
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-model="model.sex" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
<a-select-option :value="1"></a-select-option>
@ -111,10 +115,6 @@
<a-input placeholder="请输入邮箱" v-model="model.email" />
</a-form-model-item>
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input placeholder="请输入手机号码" v-model="model.phone" />
</a-form-model-item>
<a-form-model-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
<a-input placeholder="请输入座机" v-model="model.telephone" />
</a-form-model-item>
@ -507,7 +507,7 @@
.drawer-bootom-button {
position: absolute;
bottom: -8px;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
@ -516,4 +516,10 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
/*【JTC-502】 添加用户两个滚动条*/
/deep/ .ant-drawer-body {
padding-bottom: 53px;
}
</style>

View File

@ -2,18 +2,14 @@
<div>
<a-form-model ref="form" :model="model" :rules="validatorRules" class="password-retrieval-form" @keyup.enter.native="nextStep">
<a-form-model-item label="手机" required prop="phone" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
<a-row :gutter="16">
<a-col class="gutter-row" :span="20">
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-col>
</a-row>
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-form-model-item>
<a-form-model-item v-if="show" required prop="captcha" label="验证码" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
<a-row :gutter="16">
<a-col class="gutter-row" :span="12">
<a-input v-model="model.captcha" type="text" placeholder="手机短信验证码">
<a-input @change="captchaChange" v-model="model.captcha" type="text" placeholder="手机短信验证码">
<a-icon slot="prefix" type="code" :style="{ color: 'rgba(0,0,0,.25)'}"/>
</a-input>
</a-col>
@ -158,6 +154,10 @@
}else{
callback()
}
},
//手机号改变事件
captchaChange(val){
this.$refs['form'].validateField("captcha")
}
}

View File

@ -14,6 +14,8 @@ module.exports = {
*/
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
//qiankuan打包时放开
//outputDir: "../dist/main",
// 多入口配置
// pages: {
// index: {
@ -23,7 +25,7 @@ module.exports = {
// }
// },
//打包app时放开该配置
//publicPath:'./',
//publicPath:'/',
configureWebpack: config => {
//生产环境取消 console.log
if (process.env.NODE_ENV === 'production') {
@ -85,6 +87,15 @@ module.exports = {
devServer: {
port: 3000,
// hot: true,
// disableHostCheck: true,
// overlay: {
// warnings: false,
// errors: true,
// },
// headers: {
// 'Access-Control-Allow-Origin': '*',
// },
proxy: {
/* '/api': {
target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统

View File

@ -814,6 +814,13 @@
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.10.5", "@babel/runtime@^7.7.2":
version "7.17.2"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941"
integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/template@^7.10.4":
version "7.10.4"
resolved "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
@ -923,7 +930,7 @@
error-stack-parser "^2.0.0"
string-width "^2.0.0"
"@tinymce/tinymce-vue@^2.1.0":
"@tinymce/tinymce-vue@2.1.0":
version "2.1.0"
resolved "https://registry.npmjs.org/@tinymce/tinymce-vue/-/tinymce-vue-2.1.0.tgz#cac3e935b217a277424f2258f3235824aa3c17c0"
integrity sha512-lDIpeLbkaobS/f00wWaOhGJdiZLdtL0dEDYB4JvqgVeAAoaDFG2PvXXP/kN49xpHpUe8vOdt7xFaN48nrPmsbQ==
@ -6267,6 +6274,13 @@ import-from@^2.1.0:
dependencies:
resolve-from "^3.0.0"
import-html-entry@^1.9.0:
version "1.11.1"
resolved "https://registry.npmjs.org/import-html-entry/-/import-html-entry-1.11.1.tgz#3d8c5977926bdd122ab8e658965c102068b4af8d"
integrity sha512-O7mCUTwKdYU49/LH6nq1adWPnUlZQpKeGWIEcDq07KTcqP/v0jBLEIVc0oE0Mtlw3CEe0eeKGMyhl6LwfXCV7A==
dependencies:
"@babel/runtime" "^7.7.2"
import-local@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
@ -7671,15 +7685,15 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.0, mkdirp@~0.5.1:
minimist "^1.2.5"
moment-timezone@^0.5.31:
version "0.5.33"
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c"
integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==
version "0.5.34"
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c"
integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0":
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
moment@^2.21.0:
@ -9298,6 +9312,17 @@ q@^1.1.2:
resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
qiankun@^2.5.1:
version "2.6.3"
resolved "https://registry.npmjs.org/qiankun/-/qiankun-2.6.3.tgz#00c55a3d6655b2a78b6e0578d70c694cdb662073"
integrity sha512-h1NIokwjdt508HNPcWBdzoYFDJvhbpUUlFSa5dDkpJYVCl55iqqHgdyi1YayinmLmr/9s/zD+WQv+A2mbzkMQw==
dependencies:
"@babel/runtime" "^7.10.5"
import-html-entry "^1.9.0"
lodash "^4.17.11"
single-spa "^5.9.2"
tslib "^1.10.0"
qs@6.7.0:
version "6.7.0"
resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
@ -10127,6 +10152,11 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"
single-spa@^5.9.2:
version "5.9.3"
resolved "https://registry.npmjs.org/single-spa/-/single-spa-5.9.3.tgz#2d151cbb3b273629a5b27b30a3b8ca847dcba4c5"
integrity sha512-qMGraRzIBsodV6569Fob4cQ4/yQNrcZ5Achh3SAQDljmqUtjAZ7BAA7GAyO/l5eizb7GtTmVq9Di7ORyKw82CQ==
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@ -10870,7 +10900,7 @@ tinycolor2@^1.4.1:
resolved "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=
tinymce@^5.3.2:
tinymce@5.4.1:
version "5.4.1"
resolved "https://registry.npmjs.org/tinymce/-/tinymce-5.4.1.tgz#4c101e78cbd22c148d6013f7c66eb0cb480723db"
integrity sha512-eUjwDVCTSHSnFfpzX5TjTHXsGj5gvPQwzo3RFDF374gfK5voHqcRGojvQnu4NtNW1BAb012/KW1tkXBbUrEveg==

View File

@ -1,7 +1,7 @@
Jeecg-Boot 低代码开发平台
===============
当前最新版本: 3.0发布日期2021-11-01
当前最新版本: 3.1.0发布日期20220301
## 后端技术架构

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,63 +0,0 @@
-- 字段长度不规范导致转库错误Specified key was too long; max key length is 767 bytes
ALTER TABLE `rep_demo_dxtj`
MODIFY COLUMN `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键' FIRST;
ALTER TABLE `sys_third_account`
MODIFY COLUMN `third_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录来源' AFTER `third_user_id`;
-- 数据源字典sql整理
DELETE FROM `sys_dict_item` WHERE dict_id ='1209733563293962241';
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733775114702850', '1209733563293962241', 'MySQL5.5', '1', '', 1, 1, 'admin', '2019-12-25 15:13:02', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1334440962954936321', '1209733563293962241', 'MYSQL5.7+', '4', '', 2, 1, 'admin', '2020-12-03 18:16:02', 'admin', '2021-07-15 13:44:29');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733839933476865', '1209733563293962241', 'Oracle', '2', '', 3, 1, 'admin', '2019-12-25 15:13:18', 'admin', '2021-07-15 13:44:08');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733903020003330', '1209733563293962241', 'SQLServer', '3', '', 4, 1, 'admin', '2019-12-25 15:13:33', 'admin', '2021-07-15 13:44:11');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1414837074500976641', '1209733563293962241', 'postgresql', '6', '', 5, 1, 'admin', '2021-07-13 14:40:20', 'admin', '2021-07-15 13:44:15');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1415547541091504129', '1209733563293962241', 'marialDB', '5', '', 6, 1, 'admin', '2021-07-15 13:43:28', 'admin', '2021-07-15 13:44:23');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418049969003089922', '1209733563293962241', '达梦', '7', '', 7, 1, 'admin', '2021-07-22 11:27:13', 'admin', '2021-07-22 11:27:30');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050017053036545', '1209733563293962241', '人大金仓', '8', '', 8, 1, 'admin', '2021-07-22 11:27:25', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050075555188737', '1209733563293962241', '神通', '9', '', 9, 1, 'admin', '2021-07-22 11:27:39', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050110669901826', '1209733563293962241', 'SQLite', '10', '', 10, 1, 'admin', '2021-07-22 11:27:47', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050149475602434', '1209733563293962241', 'DB2', '11', '', 11, 1, 'admin', '2021-07-22 11:27:56', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050209823248385', '1209733563293962241', 'Hsqldb', '12', '', 12, 1, 'admin', '2021-07-22 11:28:11', 'admin', '2021-07-22 11:28:27');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050323111399425', '1209733563293962241', 'Derby', '13', '', 13, 1, 'admin', '2021-07-22 11:28:38', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418117316707590146', '1209733563293962241', 'H2', '14', '', 14, 1, 'admin', '2021-07-22 15:54:50', NULL, NULL);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418491604048449537', '1209733563293962241', '其他数据库', '15', '', 15, 1, 'admin', '2021-07-23 16:42:07', NULL, NULL);
-- 新增 hideTab 字段
ALTER TABLE `sys_permission`
ADD COLUMN `hide_tab` int(2) NULL COMMENT '是否隐藏tab: 0否,1是' AFTER `hidden`;
-- 【online表单】新增 low_app_id 字段
ALTER TABLE `onl_cgform_head`
ADD COLUMN `low_app_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联的应用ID' AFTER `des_form_code`;
-- online老数据,存在字符串类型key值不一致的情况,String改为string
UPDATE onl_cgform_field SET db_type = 'string' where binary db_type = 'String';
-- 积木报表升级
ALTER TABLE `jimu_report`
MODIFY COLUMN `view_count` bigint(15) NULL DEFAULT 0 COMMENT '浏览次数' AFTER `template`;
ALTER TABLE `jimu_report`
MODIFY COLUMN `json_str` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'json字符串' AFTER `type`;
ALTER TABLE `jimu_report_db_field`
ADD COLUMN `search_format` varchar(50) NULL COMMENT '查询时间格式化表达式' AFTER `search_value`;
ALTER TABLE `jimu_report_db_param`
ADD COLUMN `search_format` varchar(50) NULL COMMENT '查询时间格式化表达式' AFTER `dict_code`;
UPDATE jimu_report SET json_str=replace(json_str,'"subtotal":"totalField"','"funcname":"SUM"');
ALTER TABLE `jimu_report`
ADD COLUMN `css_str` text NULL COMMENT 'css增强' AFTER `view_count`,
ADD COLUMN `js_str` text NULL COMMENT 'js增强' AFTER `css_str`;
ALTER TABLE `jimu_report_link`
CHANGE COLUMN `expression` `requirement` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条件' AFTER `link_chart_id`;
ALTER TABLE `jimu_report_db_field`
ADD COLUMN `ext_json` text NULL COMMENT '参数配置' AFTER `search_format`;
ALTER TABLE `jimu_report_db_param`
ADD COLUMN `ext_json` text NULL COMMENT '参数配置' AFTER `search_format`;
ALTER TABLE `jimu_report_db`
MODIFY COLUMN `is_list` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否是列表0否1是 默认0' AFTER `api_method`;

View File

@ -0,0 +1,36 @@
-- 第三方用户表应该加上创建人,创建时间、修改人、修改时间
ALTER TABLE `sys_third_account`
ADD COLUMN `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称' AFTER `third_user_id`,
ADD COLUMN `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期' AFTER `create_by`,
ADD COLUMN `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称' AFTER `create_time`,
ADD COLUMN `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新日期' AFTER `update_by`;
-- 对象存储字段太短
ALTER TABLE `oss_file`
MODIFY COLUMN `url` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件地址' AFTER `file_name`;
-- 地址获取到多个地址, 地址过长导致权限菜单修改失败
ALTER TABLE `sys_role_permission`
MODIFY COLUMN `operate_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作ip' AFTER `operate_date`;
-- 修改 sys_permission 下的两个字段为 tinyint 类型
ALTER TABLE `sys_permission`
MODIFY COLUMN `hidden` tinyint(1) NULL DEFAULT 0 COMMENT '是否隐藏路由: 0否,1是' AFTER `keep_alive`,
MODIFY COLUMN `hide_tab` tinyint(1) NULL DEFAULT NULL COMMENT '是否隐藏tab: 0否,1是' AFTER `hidden`;
-- 默认示例内嵌百度改成jeecg.com官网
UPDATE sys_permission SET name = 'JEECG官方网站' , url = 'http://www.jeecg.com' WHERE id = 'a400e4f4d54f79bf5ce160ae432231af';
-- 菜单名和代码改名 erp风格
UPDATE `sys_permission` SET `parent_id` = '2a470fc0c3954d9dbb61de6d80846549', `name` = '一对多erp风格示例', `url` = '/jeecg/tablist/JeecgOrderDMainList', `component` = 'jeecg/tablist/JeecgOrderDMainList', `component_name` = NULL, `redirect` = NULL, `menu_type` = 1, `perms` = NULL, `perms_type` = NULL, `sort_no` = 2.00, `always_show` = 0, `icon` = NULL, `is_route` = 1, `is_leaf` = 1, `keep_alive` = 0, `hidden` = 0, `description` = NULL, `status` = NULL, `del_flag` = 0, `rule_flag` = 0, `create_by` = 'admin', `create_time` = '2019-02-20 14:45:09', `update_by` = 'admin', `update_time` = '2022-01-17 17:02:51', `internal_or_external` = 0, `hide_tab` = '0' WHERE `id` = '6ad53fd1b220989a8b71ff482d683a5a';
-- 分类字典 列表页 显示数据id
UPDATE sys_category SET code='B01-2-3' WHERE id='1404629269499936770';
UPDATE sys_category SET code='B01-2-2' WHERE id='937fd2e9aa13b8bab1da1ca36d3fd344';
-- 新的表格合计菜单
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `status`, `del_flag`, `rule_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `internal_or_external`, `hide_tab`) VALUES ('1494641317580423169', '2a470fc0c3954d9dbb61de6d80846549', '表格合计News', '/jeecg/tableOrderTotal', 'jeecg/TableOrderTotal', NULL, NULL, 1, NULL, '1', 3.00, 0, NULL, 1, 1, 0, 0, NULL, '1', 0, 0, 'admin', '2022-02-18 19:53:54', 'admin', '2022-02-18 19:55:04', 0, '0');
-- online老数据,存在字符串类型key值不一致的情况,String改为string
UPDATE onl_cgform_field SET db_type = 'string' where binary db_type = 'String';

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-boot-base-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.0</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -37,8 +37,8 @@ public interface IBpmBaseExtAPI {
*/
@PostMapping(value = "/act/process/extActProcess/startMutilProcess")
Result<String> startMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
/**
* 24.
@ -60,8 +60,8 @@ public interface IBpmBaseExtAPI {
*/
@PostMapping(value = "/act/process/extActProcess/startDesFormMutilProcess")
Result<String> startDesFormMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
/**
* 25. 稿online
@ -83,7 +83,7 @@ public interface IBpmBaseExtAPI {
*/
@PostMapping(value = "/act/process/extActProcess/saveMutilProcessDraft")
Result<String> saveMutilProcessDraft(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
}

View File

@ -15,7 +15,8 @@ import java.util.Map;
* OnlineFeign API
*/
@Component
@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_ONLINE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
//@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_ONLINE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
public interface IOnlineBaseExtAPI {
/**

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-boot-base-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.0</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -25,7 +25,7 @@ public interface IBpmBaseExtAPI {
* @return
* @throws Exception
*/
Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,String username, String jsonData) throws Exception;
Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
/**
* 24.
@ -38,7 +38,7 @@ public interface IBpmBaseExtAPI {
* @return
* @throws Exception
*/
Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,String username,String jsonData) throws Exception;
Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
/**
* 25. 稿online
* @param flowCode joa_leave_01
@ -50,6 +50,6 @@ public interface IBpmBaseExtAPI {
* @return
* @throws Exception
*/
Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile,String username,String jsonData) throws Exception;
Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile, String username, String jsonData) throws Exception;
}

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-boot-base</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.0</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-base</artifactId>
<version>3.0</version>
<version>3.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -71,16 +71,16 @@ public class Result<T> implements Serializable {
}
@Deprecated
public static Result<Object> ok() {
Result<Object> r = new Result<Object>();
public static<T> Result<T> ok() {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
return r;
}
@Deprecated
public static Result<Object> ok(String msg) {
Result<Object> r = new Result<Object>();
public static<T> Result<T> ok(String msg) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg);
@ -88,8 +88,8 @@ public class Result<T> implements Serializable {
}
@Deprecated
public static Result<Object> ok(Object data) {
Result<Object> r = new Result<Object>();
public static<T> Result<T> ok(T data) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
@ -103,6 +103,7 @@ public class Result<T> implements Serializable {
return r;
}
@Deprecated
public static<T> Result<T> OK(String msg) {
Result<T> r = new Result<T>();
r.setSuccess(true);
@ -139,12 +140,12 @@ public class Result<T> implements Serializable {
return r;
}
public static Result<Object> error(String msg) {
public static<T> Result<T> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
}
public static Result<Object> error(int code, String msg) {
Result<Object> r = new Result<Object>();
public static<T> Result<T> error(int code, String msg) {
Result<T> r = new Result<T>();
r.setCode(code);
r.setMessage(msg);
r.setSuccess(false);
@ -157,10 +158,11 @@ public class Result<T> implements Serializable {
this.success = false;
return this;
}
/**
* 访
*/
public static Result<Object> noauth(String msg) {
public static<T> Result<T> noauth(String msg) {
return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
}

View File

@ -88,7 +88,7 @@ public class AutoLogAspect {
//设置操作类型
if (dto.getLogType() == CommonConstant.LOG_TYPE_2) {
if (CommonConstant.LOG_TYPE_2 == dto.getLogType()) {
dto.setOperateType(getOperateType(methodName, syslog.operateType()));
}

View File

@ -2,6 +2,7 @@ package org.jeecg.common.aspect;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.core.JsonProcessingException;
@ -18,6 +19,7 @@ import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.util.oConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@ -38,14 +40,14 @@ import java.util.stream.Collectors;
@Component
@Slf4j
public class DictAspect {
@Lazy
@Autowired
private CommonAPI commonAPI;
@Autowired
public RedisTemplate redisTemplate;
// 定义切点Pointcut
@Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..))")
@Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..)) || @annotation(org.jeecg.common.aspect.annotation.AutoDict)")
public void excudeService() {
}
@ -103,7 +105,10 @@ public class DictAspect {
} catch (JsonProcessingException e) {
log.error("json解析失败"+e.getMessage(),e);
}
JSONObject item = JSONObject.parseObject(json);
//update-begin--Author:scott -- Date:20211223 ----for【issues/3303】restcontroller返回json数据后key顺序错乱 -----
JSONObject item = JSONObject.parseObject(json, Feature.OrderedField);
//update-end--Author:scott -- Date:20211223 ----for【issues/3303】restcontroller返回json数据后key顺序错乱 -----
//update-begin--Author:scott -- Date:20190603 ----for解决继承实体字段无法翻译问题------
//for (Field field : record.getClass().getDeclaredFields()) {
// 遍历所有字段把字典Code取出来放到 map 里

View File

@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.jeecg.common.api.CommonAPI;
import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.util.JeecgDataAutorUtils;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.SysPermissionDataRuleModel;
@ -15,6 +16,7 @@ import org.jeecg.common.system.vo.SysUserCacheInfo;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
@ -31,7 +33,7 @@ import java.util.List;
@Component
@Slf4j
public class PermissionDataAspect {
@Lazy
@Autowired
private CommonAPI commonAPI;
@ -47,11 +49,21 @@ public class PermissionDataAspect {
Method method = signature.getMethod();
PermissionData pd = method.getAnnotation(PermissionData.class);
String component = pd.pageComponent();
String requestMethod = request.getMethod();
String requestPath = request.getRequestURI().substring(request.getContextPath().length());
requestPath = filterUrl(requestPath);
log.debug("拦截请求 >> "+requestPath+";请求类型 >> "+requestMethod);
//update-begin-author:taoyan date:20211027 for:JTC-132【online报表权限】online报表带参数的菜单配置数据权限无效
//先判断是否online报表请求
// TODO 参数顺序调整有隐患
if(requestPath.indexOf(UrlMatchEnum.CGREPORT_DATA.getMatch_url())>=0){
// 获取地址栏参数
String urlParamString = request.getParameter(CommonConstant.ONL_REP_URL_PARAM_STR);
if(oConvertUtils.isNotEmpty(urlParamString)){
requestPath+="?"+urlParamString;
}
}
//update-end-author:taoyan date:20211027 for:JTC-132【online报表权限】online报表带参数的菜单配置数据权限无效
log.info("拦截请求 >> {} ; 请求类型 >> {} . ", requestPath, requestMethod);
String username = JwtUtil.getUserNameByToken(request);
//查询数据权限信息
//TODO 微服务情况下也得支持缓存机制
@ -86,6 +98,7 @@ public class PermissionDataAspect {
* @param request
* @return
*/
@Deprecated
private String getJgAuthRequsetPath(HttpServletRequest request) {
String queryString = request.getQueryString();
String requestPath = request.getRequestURI();
@ -106,6 +119,7 @@ public class PermissionDataAspect {
return filterUrl(requestPath);
}
@Deprecated
private boolean moHuContain(List<String> list,String key){
for(String str : list){
if(key.contains(str)){

View File

@ -10,8 +10,8 @@ public enum UrlMatchEnum {
CGFORM_EXCEL_DATA("/online/cgform/api/exportXls/", "/online/cgformList/"),
CGFORM_TREE_DATA("/online/cgform/api/getTreeData/", "/online/cgformList/"),
CGREPORT_DATA("/online/cgreport/api/getColumnsAndData/", "/online/cgreport/"),
CGREPORT_EXCEL_DATA("/online/cgreport/api/exportXls/", "/online/cgreport/");
CGREPORT_EXCEL_DATA("/online/cgreport/api/exportXls/", "/online/cgreport/"),
CGREPORT_EXCEL_DATA2("/online/cgreport/api/exportManySheetXls/", "/online/cgreport/");
UrlMatchEnum(String url, String match_url) {
this.url = url;
@ -47,8 +47,10 @@ public enum UrlMatchEnum {
return null;
}
// public static void main(String[] args) {
public String getMatch_url() {
return match_url;
}
// public static void main(String[] args) {
// /**
// * 比如request真实请求URL: /online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a
// * 转换匹配路由URL后对应配置的菜单路径:/online/cgformList/81fcf7d8922d45069b0d5ba983612d3a

View File

@ -0,0 +1,23 @@
package org.jeecg.common.aspect.annotation;
import java.lang.annotation.*;
/**
*
*
* @Author scott
* @email jeecgos@163.com
* @Date 20220105
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AutoDict {
/**
*
* @return
*/
String value() default "";
}

View File

@ -0,0 +1,33 @@
package org.jeecg.common.aspect.annotation;
import java.lang.annotation.*;
import org.jeecg.common.constant.enums.LowAppAopEnum;
/**
* low_app_id
*
* @Author scott
* @email jeecgos@163.com
* @Date 20220105
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AutoLowApp {
/**
* adddeletedb_import
*
* @return
*/
LowAppAopEnum action();
/**
* cgform
*
* @return
*/
String bizType();
}

View File

@ -77,7 +77,13 @@ public interface CommonConstant {
public static final String PREFIX_USER_TOKEN = "prefix_user_token_";
/** Token缓存时间3600秒即一小时 */
public static final int TOKEN_EXPIRE_TIME = 3600;
/** 登录二维码 */
public static final String LOGIN_QRCODE_PRE = "QRCODELOGIN:";
public static final String LOGIN_QRCODE = "LQ:";
/** 登录二维码token */
public static final String LOGIN_QRCODE_TOKEN = "LQT:";
/**
* 0
@ -91,7 +97,7 @@ public interface CommonConstant {
* 2
*/
public static final Integer MENU_TYPE_2 = 2;
/**通告对象类型USER:指定用户ALL:全体用户)*/
public static final String MSG_TYPE_UESR = "USER";
public static final String MSG_TYPE_ALL = "ALL";
@ -229,6 +235,9 @@ public interface CommonConstant {
public static final String SQL_INDEX_UNIQ_SYS_USER_WORK_NO = "uniq_sys_user_work_no";
/** sys_user 表 phone 唯一键索引 */
public static final String SQL_INDEX_UNIQ_SYS_USER_PHONE = "uniq_sys_user_phone";
/** 达梦数据库升提示。违反表[SYS_USER]唯一性约束 */
public static final String SQL_INDEX_UNIQ_SYS_USER = "唯一性约束";
/** sys_user 表 email 唯一键索引 */
public static final String SQL_INDEX_UNIQ_SYS_USER_EMAIL = "uniq_sys_user_email";
/** sys_quartz_job 表 job_class_name 唯一键索引 */
@ -239,6 +248,8 @@ public interface CommonConstant {
public static final String SQL_INDEX_UNIQ_SYS_ROLE_CODE = "uniq_sys_role_role_code";
/** sys_depart 表 code 唯一键索引 */
public static final String SQL_INDEX_UNIQ_DEPART_ORG_CODE = "uniq_depart_org_code";
/** sys_category 表 code 唯一键索引 */
public static final String SQL_INDEX_UNIQ_CATEGORY_CODE = "idx_sc_code";
/**
* 线
*/
@ -325,4 +336,7 @@ public interface CommonConstant {
/** 系统通告消息状态2=已撤销 */
String ANNOUNCEMENT_SEND_STATUS_2 = "2";
/**ONLINE 报表权限用 从request中获取地址栏后的参数*/
String ONL_REP_URL_PARAM_STR="onlRepUrlParamStr";
}

View File

@ -29,7 +29,7 @@ public class ProvinceCityArea {
public String getCode(String text){
this.initAreaList();
if(areaList!=null || areaList.size()>0){
if(areaList!=null && areaList.size()>0){
for(int i=areaList.size()-1;i>=0;i--){
if(text.indexOf(areaList.get(i).getText())>=0){
return areaList.get(i).getId();
@ -39,6 +39,73 @@ public class ProvinceCityArea {
return null;
}
// update-begin-author:sunjianlei date:20220121 for:【JTC-704】数据导入错误 省市区组件,文件中为北京市,导入后,导为了山西省
/**
* code
* @param texts
* @return code
*/
public String[] getCode(String[] texts) {
if (texts == null || texts.length == 0) {
return null;
}
this.initAreaList();
if (areaList == null || areaList.size() == 0) {
return null;
}
String[] codes = new String[texts.length];
String code = null;
for (int i = 0; i < texts.length; i++) {
String text = texts[i];
Area area;
if (code == null) {
area = getAreaByText(text);
} else {
area = getAreaByPidAndText(code, text);
}
if (area != null) {
code = area.id;
codes[i] = code;
} else {
return null;
}
}
return codes;
}
/**
* textarea
* @param text
* @return
*/
public Area getAreaByText(String text) {
for (Area area : areaList) {
if (text.equals(area.getText())) {
return area;
}
}
return null;
}
/**
* pid area
* @param pCode
* @param text
* @return
*/
public Area getAreaByPidAndText(String pCode, String text) {
this.initAreaList();
if (this.areaList != null && this.areaList.size() > 0) {
for (Area area : this.areaList) {
if (area.getPid().equals(pCode) && area.getText().equals(text)) {
return area;
}
}
}
return null;
}
// update-end-author:sunjianlei date:20220121 for:【JTC-704】数据导入错误 省市区组件,文件中为北京市,导入后,导为了山西省
public void getAreaByCode(String code,List<String> ls){
for(Area area: areaList){
if(area.getId().equals(code)){

View File

@ -0,0 +1,22 @@
package org.jeecg.common.constant.enums;
/**
* LowApp
* @date 2022-1-5
*/
public enum LowAppAopEnum {
/**
*
*/
ADD,
/**
*
*/
DELETE,
/**
* OnlineOnline
*/
CGFORM_DB_IMPORT
}

View File

@ -1,24 +1,20 @@
package org.jeecg.common.constant.enums;
import org.jeecg.common.util.oConvertUtils;
import java.util.List;
/**
*
*
*
*/
public enum RoleIndexConfigEnum {
/**
*
*/
ADMIN("admin1", "dashboard/Analysis2"),
/**
*
*/
TEST("test", "dashboard/Analysis"),
/**
* hr
*/
HR("hr", "dashboard/Analysis1");
ADMIN("admin", "dashboard/Analysis"),
//TEST("test", "dashboard/IndexChart"),
HR("hr", "dashboard/IndexBdc");
//DM("dm", "dashboard/IndexTask"),
/**
*
@ -44,7 +40,7 @@ public enum RoleIndexConfigEnum {
* @param roleCode
* @return
*/
public static RoleIndexConfigEnum getEnumByCode(String roleCode) {
private static RoleIndexConfigEnum getEnumByCode(String roleCode) {
for (RoleIndexConfigEnum e : RoleIndexConfigEnum.values()) {
if (e.roleCode.equals(roleCode)) {
return e;
@ -57,7 +53,7 @@ public enum RoleIndexConfigEnum {
* @param roleCode
* @return
*/
public static String getIndexByCode(String roleCode) {
private static String getIndexByCode(String roleCode) {
for (RoleIndexConfigEnum e : RoleIndexConfigEnum.values()) {
if (e.roleCode.equals(roleCode)) {
return e.componentUrl;
@ -67,11 +63,10 @@ public enum RoleIndexConfigEnum {
}
public static String getIndexByRoles(List<String> roles) {
for (String role : roles) {
for (RoleIndexConfigEnum e : RoleIndexConfigEnum.values()) {
if (e.roleCode.equals(role)) {
return e.componentUrl;
}
String[] rolesArray = roles.toArray(new String[roles.size()]);
for (RoleIndexConfigEnum e : RoleIndexConfigEnum.values()) {
if (oConvertUtils.isIn(e.roleCode,rolesArray)){
return e.componentUrl;
}
}
return null;

View File

@ -180,8 +180,15 @@ public class JeecgController<T, S extends IService<T>> {
//update-end-author:taoyan date:20190528 for:批量插入数据
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error("文件导入失败:" + e.getMessage());
//update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
String msg = e.getMessage();
log.error(msg, e);
if(msg!=null && msg.indexOf("Duplicate entry")>=0){
return Result.error("文件导入失败:有重复数据!");
}else{
return Result.error("文件导入失败:" + e.getMessage());
}
//update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
} finally {
try {
file.getInputStream().close();

View File

@ -25,7 +25,6 @@ import org.jeecg.common.util.oConvertUtils;
import org.springframework.util.NumberUtils;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -145,20 +144,23 @@ public class QueryGenerator {
//区间查询
doIntervalQuery(queryWrapper, parameterMap, type, name, column);
//判断单值 参数带不同标识字符串 走不同的查询
//TODO 这种前后带逗号的支持分割后模糊查询需要否 使多选字段的查询生效
//TODO 这种前后带逗号的支持分割后模糊查询(多选字段查询生效) 示例:,1,3,
if (null != value && value.toString().startsWith(COMMA) && value.toString().endsWith(COMMA)) {
String multiLikeval = value.toString().replace(",,", COMMA);
String[] vals = multiLikeval.substring(1, multiLikeval.length()).split(COMMA);
final String field = oConvertUtils.camelToUnderline(column);
if(vals.length>1) {
queryWrapper.and(j -> {
log.info("---查询过滤器Query规则---field:{}, rule:{}, value:{}", field, "like", vals[0]);
j = j.like(field,vals[0]);
for (int k=1;k<vals.length;k++) {
j = j.or().like(field,vals[k]);
log.info("---查询过滤器Query规则 .or()---field:{}, rule:{}, value:{}", field, "like", vals[k]);
}
//return j;
});
}else {
log.info("---查询过滤器Query规则---field:{}, rule:{}, value:{}", field, "like", vals[0]);
queryWrapper.and(j -> j.like(field,vals[0]));
}
}else {
@ -224,7 +226,7 @@ public class QueryGenerator {
if(parameterMap!=null&& parameterMap.containsKey(ORDER_TYPE)) {
order = parameterMap.get(ORDER_TYPE)[0];
}
log.info("排序规则>>列:" + column + ",排序方式:" + order);
log.debug("排序规则>>列:" + column + ",排序方式:" + order);
if (oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) {
//字典字段,去掉字典翻译文本后缀
if(column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) {
@ -270,10 +272,21 @@ public class QueryGenerator {
if (conditions == null || conditions.size() == 0) {
return;
}
log.info("---高级查询参数-->" + conditions.toString());
// update-begin-author:sunjianlei date:20220119 for: 【JTC-573】 过滤空条件查询,防止 sql 拼接多余的 and
List<QueryCondition> filterConditions = conditions.stream().filter(
rule -> oConvertUtils.isNotEmpty(rule.getField())
&& oConvertUtils.isNotEmpty(rule.getRule())
&& oConvertUtils.isNotEmpty(rule.getVal())
).collect(Collectors.toList());
if (filterConditions.size() == 0) {
return;
}
// update-end-author:sunjianlei date:20220119 for: 【JTC-573】 过滤空条件查询,防止 sql 拼接多余的 and
log.info("---高级查询参数-->" + filterConditions);
queryWrapper.and(andWrapper -> {
for (int i = 0; i < conditions.size(); i++) {
QueryCondition rule = conditions.get(i);
for (int i = 0; i < filterConditions.size(); i++) {
QueryCondition rule = filterConditions.get(i);
if (oConvertUtils.isNotEmpty(rule.getField())
&& oConvertUtils.isNotEmpty(rule.getRule())
&& oConvertUtils.isNotEmpty(rule.getVal())) {
@ -324,7 +337,7 @@ public class QueryGenerator {
//update-end-author:taoyan date:20201228 for: 【高级查询】 oracle 日期等于查询报错
// 如果拼接方式是OR就拼接OR
if (MatchTypeEnum.OR == matchType && i < (conditions.size() - 1)) {
if (MatchTypeEnum.OR == matchType && i < (filterConditions.size() - 1)) {
andWrapper.or();
}
}
@ -457,15 +470,37 @@ public class QueryGenerator {
private static void addQueryByRule(QueryWrapper<?> queryWrapper,String name,String type,String value,QueryRuleEnum rule) throws ParseException {
if(oConvertUtils.isNotEmpty(value)) {
Object temp;
//update-begin--Author:sunjianlei Date:20220104 for【JTC-409】修复逗号分割情况下没有转换类型导致类型严格的数据库查询报错 -------------------
// 针对数字类型字段,多值查询
if(value.indexOf(COMMA)!=-1){
temp = value;
if(value.contains(COMMA)){
Object[] temp = Arrays.stream(value.split(COMMA)).map(v -> {
try {
return QueryGenerator.parseByType(v, type, rule);
} catch (ParseException e) {
e.printStackTrace();
return v;
}
}).toArray();
addEasyQuery(queryWrapper, name, rule, temp);
return;
}
Object temp = QueryGenerator.parseByType(value, type, rule);
addEasyQuery(queryWrapper, name, rule, temp);
//update-end--Author:sunjianlei Date:20220104 for【JTC-409】修复逗号分割情况下没有转换类型导致类型严格的数据库查询报错 -------------------
}
}
switch (type) {
/**
*
* @param value
* @param type
* @param rule
* @return
* @throws ParseException
*/
private static Object parseByType(String value, String type, QueryRuleEnum rule) throws ParseException {
Object temp;
switch (type) {
case "class java.lang.Integer":
temp = Integer.parseInt(value);
break;
@ -490,9 +525,8 @@ public class QueryGenerator {
default:
temp = value;
break;
}
addEasyQuery(queryWrapper, name, rule, temp);
}
return temp;
}
/**
@ -527,12 +561,12 @@ public class QueryGenerator {
* @param rule
* @param value
*/
private static void addEasyQuery(QueryWrapper<?> queryWrapper, String name, QueryRuleEnum rule, Object value) {
public static void addEasyQuery(QueryWrapper<?> queryWrapper, String name, QueryRuleEnum rule, Object value) {
if (value == null || rule == null || oConvertUtils.isEmpty(value)) {
return;
}
name = oConvertUtils.camelToUnderline(name);
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
log.info("---查询过滤器Query规则---field:{}, rule:{}, value:{}",name,rule.getValue(),value);
switch (rule) {
case GT:
queryWrapper.gt(name, value);
@ -555,7 +589,7 @@ public class QueryGenerator {
break;
case IN:
if(value instanceof String) {
queryWrapper.in(name, (Object[])value.toString().split(","));
queryWrapper.in(name, (Object[])value.toString().split(COMMA));
}else if(value instanceof String[]) {
queryWrapper.in(name, (Object[]) value);
}

View File

@ -34,8 +34,8 @@ import org.jeecg.common.util.oConvertUtils;
**/
public class JwtUtil {
// Token过期时间30分钟用户登录过期时间是此时间的两倍以token在reids缓存时间为准
public static final long EXPIRE_TIME = 30 * 60 * 1000;
// Token过期时间2小时用户登录过期时间是此时间的两倍以token在reids缓存时间为准
public static final long EXPIRE_TIME = 2 * 60 * 60 * 1000;
/**
*
@ -155,7 +155,6 @@ public class JwtUtil {
* @param user
* @return
*/
//TODO 急待改造 sckjkdsjsfjdk
public static String getUserSystemData(String key,SysUserCacheInfo user) {
if(user==null) {
user = JeecgDataAutorUtils.loadUserInfo();

View File

@ -39,5 +39,11 @@ public class DictModel implements Serializable{
public String getTitle() {
return this.text;
}
/**
* vue3 Select
*/
public String getLabel() {
return this.text;
}
}

View File

@ -14,6 +14,7 @@ import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.sql.DataSource;
import java.io.ByteArrayInputStream;
import java.io.File;
@ -282,4 +283,39 @@ public class CommonUtils {
return DB_TYPE;
}
/**
*
*
* @param request
* @return
*/
public static String getBaseUrl(HttpServletRequest request) {
//1.【兼容】兼容微服务下的 base path-------
String x_gateway_base_path = request.getHeader("X_GATEWAY_BASE_PATH");
if(oConvertUtils.isNotEmpty(x_gateway_base_path)){
log.info("x_gateway_base_path = "+ x_gateway_base_path);
return x_gateway_base_path;
}
//2.【兼容】SSL认证之后request.getScheme()获取不到https的问题
// https://blog.csdn.net/weixin_34376986/article/details/89767950
String scheme = request.getHeader("X-Forwarded-Scheme");
if(oConvertUtils.isEmpty(scheme)){
scheme = request.getScheme();
}
//3.常规操作
String serverName = request.getServerName();
int serverPort = request.getServerPort();
String contextPath = request.getContextPath();
//返回 host domain
String baseDomainPath = null;
if(80 == serverPort){
baseDomainPath = scheme + "://" + serverName + contextPath ;
}else{
baseDomainPath = scheme + "://" + serverName + ":" + serverPort + contextPath ;
}
log.info("-----Common getBaseUrl----- : " + baseDomainPath);
return baseDomainPath;
}
}

View File

@ -1,6 +1,7 @@
package org.jeecg.common.util;
import io.minio.*;
import io.minio.http.Method;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.filter.FileTypeFilter;
import org.jeecg.common.util.filter.StrAttackFilter;
@ -158,9 +159,11 @@ public class MinioUtil {
public static String getObjectURL(String bucketName, String objectName, Integer expires) {
initMinio(minioUrl, minioName,minioPass);
try{
//update-begin---author:liusq Date:20220121 for获取文件外链报错提示method不能为空导致文件下载和预览失败----
GetPresignedObjectUrlArgs objectArgs = GetPresignedObjectUrlArgs.builder().object(objectName)
.bucket(bucketName)
.expiry(expires).build();
.expiry(expires).method(Method.GET).build();
//update-begin---author:liusq Date:20220121 for获取文件外链报错提示method不能为空导致文件下载和预览失败----
String url = minioClient.getPresignedObjectUrl(objectArgs);
return URLDecoder.decode(url,"UTF-8");
}catch (Exception e){

View File

@ -17,7 +17,7 @@ public class SqlInjectionUtil {
* 线 20200501
*/
private final static String TABLE_DICT_SIGN_SALT = "20200501";
private final static String xssStr = "'|and |exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |;|or |+";
private final static String xssStr = "and |exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |;|or |+|user()";
/*
* sign

View File

@ -25,7 +25,7 @@ public class DbTypeUtils {
dialectMap.put("postgresql", "org.hibernate.dialect.PostgreSQLDialect"); //1 --
dialectMap.put("sqlserver2005", "org.hibernate.dialect.SQLServer2005Dialect");
dialectMap.put("sqlserver", "org.hibernate.dialect.SQLServerDialect"); //1
dialectMap.put("dm", "org.hibernate.dialect.OracleDialect");//达梦数据库 [国产] 1--
dialectMap.put("dm", "org.hibernate.dialect.DmDialect");//达梦数据库 [国产] 1--
dialectMap.put("xugu", "org.hibernate.dialect.HSQLDialect"); //虚谷数据库
dialectMap.put("kingbasees", "org.hibernate.dialect.PostgreSQLDialect"); //人大金仓 [国产] 1
dialectMap.put("phoenix", "org.hibernate.dialect.HSQLDialect"); // Phoenix HBase数据库

View File

@ -258,6 +258,9 @@ public class OssBootUtil {
newBucket = bucket;
}
initOSS(endPoint, accessKeyId, accessKeySecret);
//update-begin---author:liusq Date:20220120 for替换objectName前缀防止key不一致导致获取不到文件----
objectName = OssBootUtil.replacePrefix(objectName,bucket);
//update-end---author:liusq Date:20220120 for替换objectName前缀防止key不一致导致获取不到文件----
OSSObject ossObject = ossClient.getObject(newBucket,objectName);
inputStream = new BufferedInputStream(ossObject.getObjectContent());
}catch (Exception e){
@ -266,14 +269,14 @@ public class OssBootUtil {
return inputStream;
}
/**
*
* @param objectName
* @return
*/
public static InputStream getOssFile(String objectName){
return getOssFile(objectName,null);
}
///**
// * 获取文件流
// * @param objectName
// * @return
// */
//public static InputStream getOssFile(String objectName){
// return getOssFile(objectName,null);
//}
/**
*
@ -285,6 +288,9 @@ public class OssBootUtil {
public static String getObjectURL(String bucketName, String objectName, Date expires) {
initOSS(endPoint, accessKeyId, accessKeySecret);
try{
//update-begin---author:liusq Date:20220120 for替换objectName前缀防止key不一致导致获取不到文件----
objectName = OssBootUtil.replacePrefix(objectName,bucketName);
//update-end---author:liusq Date:20220120 for替换objectName前缀防止key不一致导致获取不到文件----
if(ossClient.doesObjectExist(bucketName,objectName)){
URL url = ossClient.generatePresignedUrl(bucketName,objectName,expires);
return URLDecoder.decode(url.toString(),"UTF-8");
@ -334,5 +340,27 @@ public class OssBootUtil {
return FILE_URL;
}
/**
* key
* @param objectName key
* @param customBucket
* @date 2022-01-20
* @author lsq
* @return
*/
private static String replacePrefix(String objectName,String customBucket){
log.info("------replacePrefix---替换前---objectName:{}",objectName);
if(oConvertUtils.isNotEmpty(staticDomain)){
objectName= objectName.replace(staticDomain+"/","");
}else{
String newBucket = bucketName;
if(oConvertUtils.isNotEmpty(customBucket)){
newBucket = customBucket;
}
String path ="https://" + newBucket + "." + endPoint + "/";
objectName = objectName.replace(path,"");
}
log.info("------replacePrefix---替换后---objectName:{}",objectName);
return objectName;
}
}

View File

@ -1,6 +1,10 @@
package org.jeecg.config;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.jeecg.common.api.CommonAPI;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.util.oConvertUtils;
@ -8,9 +12,7 @@ import org.jeecgframework.dict.service.AutoPoiDictServiceI;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* AutoPoi Excel
@ -25,6 +27,9 @@ import java.util.List;
@Slf4j
@Service
public class AutoPoiDictConfig implements AutoPoiDictServiceI {
final static String EXCEL_SPLIT_TAG = "_";
final static String TEMP_EXCEL_SPLIT_TAG = "---";
@Lazy
@Resource
private CommonAPI commonAPI;
@ -53,7 +58,14 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
}
for (DictModel t : dictList) {
if(t!=null){
dictReplaces.add(t.getText() + "_" + t.getValue());
//update-begin---author:scott Date:20211220 for[issues/I4MBB3]@Excel dicText字段的值有下划线时导入功能不能正确解析---
if(t.getValue().contains(EXCEL_SPLIT_TAG)){
String val = t.getValue().replace(EXCEL_SPLIT_TAG,TEMP_EXCEL_SPLIT_TAG);
dictReplaces.add(t.getText() + EXCEL_SPLIT_TAG + val);
}else{
dictReplaces.add(t.getText() + EXCEL_SPLIT_TAG + t.getValue());
}
//update-end---author:20211220 Date:20211220 for[issues/I4MBB3]@Excel dicText字段的值有下划线时导入功能不能正确解析---
}
}
if (dictReplaces != null && dictReplaces.size() != 0) {

View File

@ -1,5 +1,6 @@
package org.jeecg.config;
import org.jeecg.config.vo.Shiro;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@ -14,6 +15,15 @@ public class JeeccgBaseConfig {
*
*/
private Boolean safeMode = false;
/**
* shiro
*/
private Shiro shiro;
/**
* ()
* @TODO 使, yml
*/
private String signatureSecret = "dd05f1c54d63749eda95f9fa6d49v442a";
public Boolean getSafeMode() {
return safeMode;
@ -22,4 +32,20 @@ public class JeeccgBaseConfig {
public void setSafeMode(Boolean safeMode) {
this.safeMode = safeMode;
}
public String getSignatureSecret() {
return signatureSecret;
}
public void setSignatureSecret(String signatureSecret) {
this.signatureSecret = signatureSecret;
}
public Shiro getShiro() {
return shiro;
}
public void setShiro(Shiro shiro) {
this.shiro = shiro;
}
}

View File

@ -20,11 +20,11 @@ public class StaticConfig {
@Value(value = "${spring.mail.username}")
private String emailFrom;
/**
*
*/
@Value(value = "${jeecg.signatureSecret}")
private String signatureSecret;
// /**
// * 签名密钥串
// */
// @Value(value = "${jeecg.signatureSecret}")
// private String signatureSecret;
/*@Bean

Some files were not shown because too many files have changed in this diff Show More