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

This commit is contained in:
zhangdaiscott
2022-02-24 15:13:05 +08:00
parent 84218c7fee
commit 9a3deba51b
304 changed files with 40313 additions and 230872 deletions

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标签 不知道为什么加上后 页面路由切换的时候即1及菜单切到2及菜单的时候 两个菜单页面会同时出现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: 解决外部链接打开失败的问题