mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 20:35:29 +08:00
JeecgBoot 2.4.2 积木报表版本发布,基于SpringBoot的低代码平台
This commit is contained in:
@ -167,6 +167,9 @@
|
||||
},
|
||||
|
||||
getQueryParams() {
|
||||
//update--begin--autor:wangshuai-----date:20191204------for:清空总条数 teambition JT-113------
|
||||
this.ipagination.total=0;
|
||||
//update--end--autor:wangshuai-----date:20191204------for:清空总条数 teambition JT-113------
|
||||
var param = Object.assign({}, this.queryParam);
|
||||
param.dictId = this.dictId;
|
||||
param.field = this.getQueryField();
|
||||
|
||||
@ -192,12 +192,14 @@
|
||||
if (res.success) {
|
||||
let childrenMap = res.result
|
||||
let fn = (list) => {
|
||||
list.forEach(data => {
|
||||
if (this.expandedRowKeys.includes(data.id)) {
|
||||
data.children = childrenMap[data.id]
|
||||
fn(data.children)
|
||||
}
|
||||
})
|
||||
if(list&&list.length>0){
|
||||
list.forEach(data => {
|
||||
if (this.expandedRowKeys.includes(data.id)) {
|
||||
data.children = childrenMap[data.id]
|
||||
fn(data.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
fn(dataList)
|
||||
}
|
||||
|
||||
@ -283,6 +283,12 @@
|
||||
syncHeadNotic(anntId){
|
||||
getAction("sys/annountCement/syncNotic",{anntId:anntId})
|
||||
},
|
||||
handleDetail:function(record){
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title="详情";
|
||||
this.$refs.modalForm.disableSubmit = true;
|
||||
this.$refs.modalForm.disabled = true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -91,6 +91,7 @@
|
||||
url: {
|
||||
list: "/sys/category/rootList",
|
||||
childList: "/sys/category/childList",
|
||||
getChildListBatch: "/sys/category/getChildListBatch",
|
||||
delete: "/sys/category/delete",
|
||||
deleteBatch: "/sys/category/deleteBatch",
|
||||
exportXlsUrl: "/sys/category/exportXls",
|
||||
@ -125,7 +126,6 @@
|
||||
this.ipagination.current=1
|
||||
}
|
||||
this.loading = true
|
||||
this.expandedRowKeys = []
|
||||
let params = this.getQueryParams()
|
||||
return new Promise((resolve) => {
|
||||
getAction(this.url.list,params).then(res=>{
|
||||
@ -134,7 +134,9 @@
|
||||
if(Number(result.total)>0){
|
||||
this.ipagination.total = Number(result.total)
|
||||
this.dataSource = this.getDataByResult(res.result.records)
|
||||
resolve()
|
||||
//update--begin--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||
return this.loadDataByExpandedRows(this.dataSource)
|
||||
//update--end--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||
}else{
|
||||
this.ipagination.total=0
|
||||
this.dataSource=[]
|
||||
@ -142,6 +144,7 @@
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
@ -265,15 +268,9 @@
|
||||
let that = this;
|
||||
deleteAction(that.url.delete, {id: record.id}).then((res) => {
|
||||
if (res.success) {
|
||||
if (record.pid && record.pid!='0') {
|
||||
let formData = {pid: record.pid};
|
||||
that.$message.success(res.message);
|
||||
that.subExpandedKeys = [];
|
||||
that.getExpandKeysByPid(record.pid, this.dataSource, this.dataSource)
|
||||
that.addOk(formData, this.subExpandedKeys.reverse())
|
||||
} else {
|
||||
that.loadData();
|
||||
}
|
||||
//update--begin--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||
that.loadData();
|
||||
//update--end--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
@ -292,6 +289,43 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
// 根据已展开的行查询数据(用于保存后刷新时异步加载子级的数据)
|
||||
loadDataByExpandedRows(dataList) {
|
||||
if (this.expandedRowKeys.length > 0) {
|
||||
return getAction(this.url.getChildListBatch,{ parentIds: this.expandedRowKeys.join(',') }).then(res=>{
|
||||
if (res.success && res.result.records.length>0) {
|
||||
//已展开的数据批量子节点
|
||||
let records = res.result.records
|
||||
const listMap = new Map();
|
||||
for (let item of records) {
|
||||
let pid = item[this.pidField];
|
||||
if (this.expandedRowKeys.join(',').includes(pid)) {
|
||||
let mapList = listMap.get(pid);
|
||||
if (mapList == null) {
|
||||
mapList = [];
|
||||
}
|
||||
mapList.push(item);
|
||||
listMap.set(pid, mapList);
|
||||
}
|
||||
}
|
||||
let childrenMap = listMap;
|
||||
let fn = (list) => {
|
||||
if(list) {
|
||||
list.forEach(data => {
|
||||
if (this.expandedRowKeys.includes(data.id)) {
|
||||
data.children = this.getDataByResult(childrenMap.get(data.id))
|
||||
fn(data.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
fn(dataList)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return Promise.resolve()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
delete: '/sys/position/delete',
|
||||
deleteBatch: '/sys/position/deleteBatch',
|
||||
exportXlsUrl: '/sys/position/exportXls',
|
||||
importExcelUrl: '/sys/position/importExcel',
|
||||
importExcelUrl: 'sys/position/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
<a-form-item label="性别">
|
||||
<a-select v-model="queryParam.sex" placeholder="请选择性别">
|
||||
<a-select-option value="">请选择</a-select-option>
|
||||
<a-select-option value="1">男性</a-select-option>
|
||||
<a-select-option value="2">女性</a-select-option>
|
||||
<a-select-option value="1">男</a-select-option>
|
||||
<a-select-option value="2">女</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">添加用户</a-button>
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
@ -120,7 +120,7 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a @click="handleEdit(record)" >编辑</a>
|
||||
|
||||
<a-divider type="vertical"/>
|
||||
|
||||
@ -155,6 +155,10 @@
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
|
||||
</a-menu-item>
|
||||
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
@ -165,7 +169,8 @@
|
||||
<!-- table区域-end -->
|
||||
|
||||
<user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
|
||||
<password-modal ref="passwordmodal"></password-modal>
|
||||
|
||||
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
|
||||
|
||||
<!-- 用户回收站 -->
|
||||
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
|
||||
@ -179,7 +184,6 @@
|
||||
import {putAction,getFileAccessHttpUrl} from '@/api/manage';
|
||||
import {frozenBatch} from '@/api/api'
|
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
||||
import SysUserAgentModal from "./modules/SysUserAgentModal";
|
||||
import JInput from '@/components/jeecg/JInput'
|
||||
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
||||
import JSuperQuery from '@/components/jeecg/JSuperQuery'
|
||||
@ -188,7 +192,6 @@
|
||||
name: "UserList",
|
||||
mixins: [JeecgListMixin],
|
||||
components: {
|
||||
SysUserAgentModal,
|
||||
UserModal,
|
||||
PasswordModal,
|
||||
JInput,
|
||||
@ -368,6 +371,9 @@
|
||||
handleChangePassword(username) {
|
||||
this.$refs.passwordmodal.show(username);
|
||||
},
|
||||
passwordModalOk() {
|
||||
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import {addDictItem, editDictItem} from '@/api/api'
|
||||
import { getAction } from '@api/manage'
|
||||
|
||||
export default {
|
||||
name: "DictItemModal",
|
||||
@ -154,12 +155,27 @@
|
||||
this.visible = false;
|
||||
},
|
||||
validateItemValue(rule, value, callback){
|
||||
let param = {
|
||||
itemValue:value,
|
||||
dictId:this.dictId,
|
||||
}
|
||||
if(this.model.id){
|
||||
param.id = this.model.id
|
||||
}
|
||||
if(value){
|
||||
let reg=new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
|
||||
if(reg.test(value)){
|
||||
callback("数据值不能包含特殊字符!")
|
||||
}else{
|
||||
callback()
|
||||
//update--begin--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
|
||||
getAction("/sys/dictItem/dictItemCheck",param).then((res)=>{
|
||||
if(res.success){
|
||||
callback()
|
||||
}else{
|
||||
callback(res.message);
|
||||
}
|
||||
});
|
||||
//update--end--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
|
||||
}
|
||||
}else{
|
||||
callback()
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="授权标识">
|
||||
<a-input placeholder="多个用逗号分隔, 如: user:list,user:create" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
|
||||
<a-input placeholder="请输入授权标识, 如: user:list" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
@ -427,4 +427,4 @@
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
@ -17,14 +17,14 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="角色名称">
|
||||
<a-input placeholder="请输入角色名称" v-decorator.trim="[ 'roleName', validatorRules.roleName]" />
|
||||
<a-input placeholder="请输入角色名称" v-decorator="[ 'roleName', validatorRules.roleName]" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="角色编码">
|
||||
<a-input placeholder="请输入角色编码" :disabled="roleDisabled" v-decorator.trim="[ 'roleCode', validatorRules.roleCode]" />
|
||||
<a-input placeholder="请输入角色编码" :disabled="roleDisabled" v-decorator="[ 'roleCode', validatorRules.roleCode]" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
@ -112,6 +112,8 @@
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
values.roleName = (values.roleName || '').trim()
|
||||
values.roleCode = (values.roleCode || '').trim()
|
||||
let formData = Object.assign(this.model, values);
|
||||
let obj;
|
||||
console.log(formData)
|
||||
|
||||
@ -133,18 +133,30 @@
|
||||
dbDriverMap: {
|
||||
// MySQL 数据库
|
||||
'1': { dbDriver: 'com.mysql.jdbc.Driver' },
|
||||
//MySQL5.7+ 数据库
|
||||
'4': { dbDriver: 'com.mysql.cj.jdbc.Driver' },
|
||||
// Oracle
|
||||
'2': { dbDriver: 'oracle.jdbc.OracleDriver' },
|
||||
// SQLServer 数据库
|
||||
'3': { dbDriver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver' },
|
||||
// marialDB 数据库
|
||||
'5': { dbDriver: 'org.mariadb.jdbc.Driver' },
|
||||
// postgresql 数据库
|
||||
'6': { dbDriver: 'org.postgresql.Driver' }
|
||||
},
|
||||
dbUrlMap: {
|
||||
// MySQL 数据库
|
||||
'1': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
|
||||
//MySQL5.7+ 数据库
|
||||
'4': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai' },
|
||||
// Oracle
|
||||
'2': { dbUrl: 'jdbc:oracle:thin:@127.0.0.1:1521:ORCL' },
|
||||
// SQLServer 数据库
|
||||
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' }
|
||||
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
|
||||
// SQLServer 数据库
|
||||
'5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
|
||||
// SQLServer 数据库
|
||||
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user