mirror of https://github.com/jeecgboot/jeecg-boot
Merge branch 'master' of https://github.com/EightMonth/jeecg-boot
commit
5c4f303a0d
|
@ -88,7 +88,7 @@ Technical documentation
|
|||
- Doc: [http://help.jeecg.com](http://help.jeecg.com)
|
||||
- Newbie guide: [Quick start](http://www.jeecg.com/doc/quickstart) | [video](https://space.bilibili.com/454617261/channel/series) | [Q&A ](http://www.jeecg.com/doc/qa) | [help](http://jeecg.com/doc/help) | [1 minute experience](https://my.oschina.net/jeecg/blog/3083313)
|
||||
- Microservice Development: [Monomer upgrade to microservice](https://help.jeecg.com/java/springcloud/switchcloud/monomer.html)
|
||||
- QQ group : ⑦791696430、⑥730954414、683903138、⑤860162132(full)、④774126647(full)、③816531124(full)、②769925425(full)、①284271917(full)
|
||||
- QQ group : ⑧825232878、⑦791696430、⑥730954414(full)、683903138(full)、⑤860162132(full)、④774126647(full)、③816531124(full)、②769925425(full)、①284271917(full)
|
||||
- Demo : [Vue3](http://boot3.jeecg.com) | [Vue2](http://boot.jeecg.com) | [APP](http://jeecg.com/appIndex)
|
||||
> [please click obtain account password to obtain](http://jeecg.com/doc/demo)
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ Docker快速启动项目
|
|||
- 在线演示 : [Vue3演示](http://boot3.jeecg.com) | [APP演示](http://jeecg.com/appIndex) | [敲敲云零代码](https://qiaoqiaoyun.com)
|
||||
> 演示系统的登录账号密码,请点击 [获取账号密码](http://jeecg.com/doc/demo) 获取
|
||||
>
|
||||
- QQ交流群 : ⑦791696430、⑥730954414、VUE3群683903138、⑤860162132(满)、④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)
|
||||
- QQ交流群 : ⑧825232878、⑦791696430(满)、⑥730954414(满)、683903138(满)、⑤860162132(满)、④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)
|
||||
> ` 提醒:【QQ群是自助服务群,建议给帮助您解决问题的同学发送指定红包,表示感谢!】 `
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
package org.jeecg.modules.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.jeecg.modules.system.entity.SysUser;
|
||||
import org.jeecg.modules.system.entity.SysUserPosition;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.system.vo.SysUserPositionVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 用户职位关系表
|
||||
* @Author: jeecg-boot
|
||||
|
@ -64,7 +65,8 @@ public interface SysUserPositionMapper extends BaseMapper<SysUserPosition> {
|
|||
* @param tenantId
|
||||
* @return
|
||||
*/
|
||||
List<String> getPositionIdByUserTenantId(@Param("userId")String userId, @Param("tenantId")Integer tenantId);
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<String> getPositionIdByUserTenantId(@Param("userId") String userId, @Param("tenantId") Integer tenantId);
|
||||
|
||||
/**
|
||||
* 根据用户id获取用户职位
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
LEFT JOIN sys_position sp ON sup.position_id = sp.id
|
||||
WHERE
|
||||
sup.user_id = #{userId}
|
||||
<if test="tenantId != null and tenantId != 0">
|
||||
AND sp.tenant_id = #{tenantId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--职位列表移除成员-->
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package org.jeecg.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
|
@ -28,7 +26,6 @@ import org.jeecg.common.constant.enums.MessageTypeEnum;
|
|||
import org.jeecg.common.constant.enums.RoleIndexConfigEnum;
|
||||
import org.jeecg.common.desensitization.annotation.SensitiveEncode;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.system.vo.SysUserCacheInfo;
|
||||
import org.jeecg.common.util.*;
|
||||
|
@ -43,9 +40,9 @@ import org.jeecg.modules.system.service.ISysUserService;
|
|||
import org.jeecg.modules.system.vo.SysUserDepVo;
|
||||
import org.jeecg.modules.system.vo.SysUserPositionVo;
|
||||
import org.jeecg.modules.system.vo.UserAvatar;
|
||||
import org.jeecg.modules.system.vo.lowapp.AppExportUserVo;
|
||||
import org.jeecg.modules.system.vo.lowapp.DepartAndUserInfo;
|
||||
import org.jeecg.modules.system.vo.lowapp.DepartInfo;
|
||||
import org.jeecg.modules.system.vo.lowapp.AppExportUserVo;
|
||||
import org.jeecg.modules.system.vo.lowapp.UpdateDepartInfo;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
|
@ -178,8 +175,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
} else {
|
||||
item.setRelTenantIds("");
|
||||
}
|
||||
Integer posTenantId = null;
|
||||
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||
posTenantId = tenantId;
|
||||
}
|
||||
//查询用户职位关系表(获取租户下面的)
|
||||
List<String> positionList = sysUserPositionMapper.getPositionIdByUserTenantId(item.getId(),tenantId);
|
||||
//update-begin---author:wangshuai---date:2023-11-15---for:【QQYUN-7028】用户职务保存后未回显---
|
||||
List<String> positionList = sysUserPositionMapper.getPositionIdByUserTenantId(item.getId(),posTenantId);
|
||||
//update-end---author:wangshuai---date:2023-11-15---for:【QQYUN-7028】用户职务保存后未回显---
|
||||
//update-end---author:wangshuai ---date:20230228 for:[QQYUN-4354]加入更多字段:当前加入时间应该取当前租户的/职位也是当前租户下的------------
|
||||
item.setPost(CommonUtils.getSplitText(positionList,SymbolConstant.COMMA));
|
||||
|
||||
|
@ -929,8 +932,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
relation.setUserId(userId);
|
||||
relation.setTenantId(Integer.valueOf(tenantId));
|
||||
relation.setStatus(CommonConstant.STATUS_1);
|
||||
|
||||
LambdaQueryWrapper sysUserTenantQueryWrapper = new LambdaQueryWrapper<SysUserTenant>()
|
||||
.eq(SysUserTenant::getUserId, userId)
|
||||
.eq(SysUserTenant::getTenantId,Integer.valueOf(tenantId));
|
||||
SysUserTenant tenantPresent = relationMapper.selectOne(sysUserTenantQueryWrapper);
|
||||
if (tenantPresent != null) {
|
||||
tenantPresent.setStatus(CommonConstant.STATUS_1);
|
||||
relationMapper.updateById(tenantPresent);
|
||||
}else{
|
||||
relationMapper.insert(relation);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
||||
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||
|
@ -960,7 +973,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
LambdaQueryWrapper<SysUserTenant> query = new LambdaQueryWrapper<>();
|
||||
query.eq(SysUserTenant::getUserId, userId);
|
||||
//数据库的租户id
|
||||
List<Integer> oldTenantIds = relationMapper.getTenantIdsNoStatus(userId);
|
||||
List<Integer> oldTenantIds = relationMapper.getTenantIdsByUserId(userId);
|
||||
//如果传过来的租户id为空,那么就删除租户
|
||||
if (oConvertUtils.isEmpty(relTenantIds) && CollectionUtils.isNotEmpty(oldTenantIds)) {
|
||||
this.deleteTenantByUserId(userId, null);
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<j-switch v-model:value="formData.${po.fieldName}" <#if po.dictField != 'is_open'>:options="${po.dictField}"</#if> <#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if>></j-switch>
|
||||
<#elseif po.classType =='pca'>
|
||||
<#assign need_pca = true>
|
||||
<j-area-linkage v-model:value="formData.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if> />
|
||||
<j-area-select v-model:value="formData.${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if> />
|
||||
<#elseif po.classType =='markdown'>
|
||||
<#assign need_markdown = true>
|
||||
<j-markdown-editor v-model:value="formData.${autoStringSuffixForModel(po)}" id="${po.fieldName}" placeholder="请输入${po.filedComment}" <#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if>></j-markdown-editor>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
import { TimePicker } from 'ant-design-vue';
|
||||
</#if>
|
||||
<#if need_pca>
|
||||
import JAreaLinkage from '/@/components/Form/src/jeecg/components/JAreaLinkage.vue';
|
||||
import JAreaSelect from '/@/components/Form/src/jeecg/components/JAreaSelect.vue';
|
||||
</#if>
|
||||
<#if need_upload>
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
</#if>
|
||||
<#if po.queryMode=='single'>
|
||||
<#if query_field_no gt 1> </#if><a-col :lg="6">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">
|
||||
<#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
|
||||
<#if po.classType=='sel_search'>
|
||||
<#if query_field_no gt 1> </#if><j-search-select placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" dict="${po.dictTable},${po.dictText},${po.dictField}" />
|
||||
<#elseif po.classType=='sel_user'>
|
||||
<#if query_field_no gt 1> </#if><j-select-user-by-dept placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" />
|
||||
<#if query_field_no gt 1> </#if><j-select-user-by-dept placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" @change="(value)=>handleFormJoinChange('${po.fieldName}',value)"/>
|
||||
<#elseif po.classType=='switch'>
|
||||
<#if query_field_no gt 1> </#if><j-switch placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" <#if po.dictField!= 'is_open'>:options="${po.dictField}"</#if> query />
|
||||
<#elseif po.classType=='sel_depart'>
|
||||
|
@ -32,8 +32,10 @@
|
|||
<#if query_field_no gt 1> </#if><a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" />
|
||||
<#elseif po.classType=='datetime'>
|
||||
<#if query_field_no gt 1> </#if><a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" />
|
||||
<#elseif po.classType=='time'>
|
||||
<#if query_field_no gt 1> </#if><time-picker valueFormat="HH:mm:ss" placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" />
|
||||
<#elseif po.classType=='pca'>
|
||||
<#if query_field_no gt 1> </#if><j-area-linkage v-model:value="queryParam.${po.fieldName}" placeholder="请选择${po.filedComment}" @change="(value) => handleAreaChange('${po.fieldName}', value)" />
|
||||
<#if query_field_no gt 1> </#if><j-area-select v-model:value="queryParam.${po.fieldName}" placeholder="请选择${po.filedComment}" />
|
||||
<#elseif po.classType=='sel_tree'>
|
||||
<#if query_field_no gt 1> </#if><j-tree-select v-model:value="queryParam.${po.fieldName}" placeholder="请选择${po.filedComment}" <#if po.dictText??><#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" <#elseif po.dictText?split(',')[1]??>pidField:"${po.dictText?split(',')[1]}", <#elseif po.dictText?split(',')[3]??>hasChildField:"${po.dictText?split(',')[3]}"</#if> </#if>pidValue="${po.dictField}" />
|
||||
<#elseif po.classType=='popup'>
|
||||
|
@ -60,7 +62,7 @@
|
|||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入${po.filedComment}" v-model:value="queryParam.${po.fieldName}"></a-input>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入${po.filedComment}" v-model:value="queryParam.${po.fieldName}"></a-input>
|
||||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入${po.filedComment}" v-model:value="queryParam.${autoStringSuffixForModel(po)}"></a-input>
|
||||
</#if>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></a-col>
|
||||
|
@ -69,17 +71,45 @@
|
|||
<#if query_field_no gt 1> </#if><a-form-item>
|
||||
<#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
|
||||
<#if po.classType=='date'>
|
||||
<#if query_field_no gt 1> </#if><a-date-picker value-format="YYYY-MM-DD" placeholder="请选择开始时间" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust"/>
|
||||
<#if query_field_no gt 1> </#if><div style="display: flex">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_begin" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-date-picker value-format="YYYY-MM-DD" placeholder="请选择开始日期" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust"/>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-split-cust">~</span>
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_end" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-date-picker value-format="YYYY-MM-DD" placeholder="请选择结束日期" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust"/>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></div>
|
||||
<#elseif po.classType=='time'>
|
||||
<#if query_field_no gt 1> </#if><div style="display: flex">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_begin" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><time-picker value-format="HH:mm:ss" placeholder="请选择开始时间" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust"/>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-split-cust">~</span>
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_end" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><time-picker value-format="HH:mm:ss" placeholder="请选择结束日期" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust"/>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></div>
|
||||
<#elseif po.classType=='datetime'>
|
||||
<#if query_field_no gt 1> </#if><div style="display: flex">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_begin" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-date-picker showTime value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust" />
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-split-cust">~</span>
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_end" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-date-picker showTime value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust" />
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></div>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><div style="display: flex">
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_begin" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入最小值" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust"></a-input>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-split-cust">~</span>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if><span class="query-group-left query-group-split-cust">~</span>
|
||||
<#if query_field_no gt 1> </#if><a-form-item name="${po.fieldName}_end" style="margin-bottom: 0;">
|
||||
<#if query_field_no gt 1> </#if><a-input placeholder="请输入最大值" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust"></a-input>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></div>
|
||||
</#if>
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></a-col>
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
width: 120,
|
||||
fixed:'right'
|
||||
},
|
||||
},
|
||||
|
@ -221,6 +221,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -230,6 +231,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -244,6 +246,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<view>
|
||||
<!--标题和返回-->
|
||||
<cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">${tableVo.ftlDescription}</block>
|
||||
</cu-custom>
|
||||
<!--表单区域-->
|
||||
<view>
|
||||
<form>
|
||||
<#list columns as po><#rt/>
|
||||
<#if po.fieldName !='id'><#rt/>
|
||||
<#if po.classType =='date'>
|
||||
<my-date label="${po.filedComment}:" fields="day" v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}"></my-date>
|
||||
<#elseif po.classType =='datetime'>
|
||||
<my-date label="${po.filedComment}:" v-model="model.${po.fieldName}" placeholder="请输入${po.filedComment}"></my-date>
|
||||
<#else>
|
||||
<view class="cu-form-group">
|
||||
<view class="flex align-center">
|
||||
<view class="title"><text space="ensp">${po.filedComment}:</text></view>
|
||||
<input <#if "int,BigDecimal,double,"?contains(po.fieldDbType)>type="number"</#if> placeholder="请输入${po.filedComment}" v-model="model.${po.fieldName}"/>
|
||||
</view>
|
||||
</view>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
<view class="padding">
|
||||
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit">
|
||||
<text v-if="loading" class="cuIcon-loading2 cuIconfont-spin"></text>提交
|
||||
</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import myDate from '@/components/my-componets/my-date.vue'
|
||||
|
||||
export default {
|
||||
name: "${entityName}Form",
|
||||
components:{ myDate },
|
||||
props:{
|
||||
formData:{
|
||||
type:Object,
|
||||
default:()=>{},
|
||||
required:false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
CustomBar: this.CustomBar,
|
||||
NavBarColor: this.NavBarColor,
|
||||
loading:false,
|
||||
model: {},
|
||||
backRouteName:'index',
|
||||
url: {
|
||||
queryById: "/${entityPackage}/${entityName?uncap_first}/queryById",
|
||||
add: "/${entityPackage}/${entityName?uncap_first}/add",
|
||||
edit: "/${entityPackage}/${entityName?uncap_first}/edit",
|
||||
},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.initFormData();
|
||||
},
|
||||
methods:{
|
||||
initFormData(){
|
||||
if(this.formData){
|
||||
let dataId = this.formData.dataId;
|
||||
this.$http.get(this.url.queryById,{params:{id:dataId}}).then((res)=>{
|
||||
if(res.data.success){
|
||||
console.log("表单数据",res);
|
||||
this.model = res.data.result;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
let myForm = {...this.model};
|
||||
this.loading = true;
|
||||
let url = myForm.id?this.url.edit:this.url.add;
|
||||
this.$http.post(url,myForm).then(res=>{
|
||||
console.log("res",res)
|
||||
this.loading = false
|
||||
this.$Router.push({name:this.backRouteName})
|
||||
}).catch(()=>{
|
||||
this.loading = false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,44 @@
|
|||
<template>
|
||||
<view>
|
||||
<!--标题和返回-->
|
||||
<cu-custom :bgColor="NavBarColor" isBack>
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">${tableVo.ftlDescription}</block>
|
||||
</cu-custom>
|
||||
<!--滚动加载列表-->
|
||||
<mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
|
||||
<view class="cu-list menu">
|
||||
<view class="cu-item" v-for="(item,index) in list" :key="index" @click="goHome">
|
||||
<view class="flex" style="width:100%">
|
||||
<text class="text-lg" style="color: #000;">
|
||||
{{ item.createBy}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
||||
import Mixin from "@/common/mixin/Mixin.js";
|
||||
|
||||
export default {
|
||||
name: '${tableVo.ftlDescription}',
|
||||
mixins: [MescrollMixin,Mixin],
|
||||
data() {
|
||||
return {
|
||||
CustomBar:this.CustomBar,
|
||||
NavBarColor:this.NavBarColor,
|
||||
url: "/${entityPackage}/${entityName?uncap_first}/list",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goHome(){
|
||||
this.$Router.push({name: "index"})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
|
@ -269,6 +269,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -278,6 +279,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -292,6 +294,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -326,13 +329,13 @@
|
|||
}
|
||||
</#if>
|
||||
|
||||
<#if need_pca>
|
||||
<#if need_pca || need_dept_user>
|
||||
/**
|
||||
* 省市区点击事件
|
||||
* form点击事件(以逗号分割)
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
function handleFormJoinChange(key, value) {
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
|
@ -394,7 +397,6 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
|
|
|
@ -212,8 +212,8 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -357,7 +357,8 @@
|
|||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record)
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -367,6 +368,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -381,6 +383,7 @@
|
|||
popConfirm: {
|
||||
title: '确定删除吗?',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -419,6 +419,7 @@
|
|||
popConfirm: {
|
||||
title: '确定删除吗?',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -428,6 +429,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -447,6 +449,7 @@
|
|||
popConfirm: {
|
||||
title: '确定删除吗?',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -498,14 +501,14 @@
|
|||
}
|
||||
</#if>
|
||||
|
||||
<#if need_pca>
|
||||
<#if need_pca || need_dept_user>
|
||||
/**
|
||||
* 省市区点击事件
|
||||
* form点击事件(以逗号分割)
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
queryParam.value[key] = value.join(',');
|
||||
function handleFormJoinChange(key, value) {
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
|
||||
|
@ -551,7 +554,6 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
|
|
|
@ -208,6 +208,7 @@
|
|||
.then(async (res) => {
|
||||
if (res.success) {
|
||||
await getExpandKeysByPid(formData['${pidFieldName}'], unref(treeData));
|
||||
delete formData['children'];
|
||||
emit('ok', {
|
||||
isUpdate: unref(isUpdate),
|
||||
values: { ...formData },
|
||||
|
@ -263,8 +264,8 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -255,6 +255,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -278,6 +279,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
}
|
||||
]
|
||||
|
|
|
@ -125,6 +125,10 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
</#if>
|
||||
<#if po.classType=='pca'>
|
||||
<!--省市区字段回显插槽-->
|
||||
{{ getAreaTextByCode(text) }}
|
||||
</#if>
|
||||
</template>
|
||||
</#if>
|
||||
</#list>
|
||||
|
@ -279,6 +283,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -288,6 +293,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -303,6 +309,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -390,13 +397,13 @@
|
|||
}
|
||||
</#if>
|
||||
|
||||
<#if need_pca>
|
||||
<#if need_pca || need_dept_user>
|
||||
/**
|
||||
* 省市区点击事件
|
||||
* form点击事件(以逗号分割)
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
function handleFormJoinChange(key, value) {
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
|
@ -410,7 +417,6 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
|
|
|
@ -42,6 +42,10 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
</#if>
|
||||
<#if po.classType=='pca'>
|
||||
<!--省市区字段回显插槽-->
|
||||
{{ getAreaTextByCode(text) }}
|
||||
</#if>
|
||||
</template>
|
||||
</#if>
|
||||
</#list>
|
||||
|
@ -138,7 +142,7 @@
|
|||
*/
|
||||
async function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit();
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -227,7 +231,6 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
|
|
|
@ -211,8 +211,8 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<#assign hasOnlyValidate = false>
|
||||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form v-bind="formItemLayout" ref="formRef">
|
||||
<a-form class="antd-modal-form" v-bind="formItemLayout" ref="formRef">
|
||||
<a-row>
|
||||
<#list sub.colums as po>
|
||||
<#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
|
||||
|
@ -186,9 +186,9 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
</#list>
|
||||
|
|
|
@ -264,6 +264,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -273,6 +274,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -287,6 +289,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -238,6 +238,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -247,6 +248,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -261,6 +263,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -276,6 +276,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -290,6 +291,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -374,13 +376,13 @@
|
|||
}
|
||||
</#if>
|
||||
|
||||
<#if need_pca>
|
||||
<#if need_pca || need_dept_user>
|
||||
/**
|
||||
* 省市区点击事件
|
||||
* form点击事件(以逗号分割)
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
function handleFormJoinChange(key, value) {
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
|
@ -394,7 +396,6 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
|
|
|
@ -238,6 +238,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -247,6 +248,7 @@
|
|||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -261,6 +263,7 @@
|
|||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue