diff --git a/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue b/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue index 13ebeda..1744012 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue @@ -2704,7 +2704,7 @@ } this.setOneValue(this.popupValues, id, popupValue) // 做单个表单验证 - this.validateOneInput(value, row, column, this.notPassedIds, true, 'change') + this.validateOneInput(popupValue, row, column, this.notPassedIds, true, 'change') // 触发valueChange 事件 this.elemValueChange('input', row, column, value) }, diff --git a/ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue b/ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue index 004fd44..4665b41 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue @@ -11,13 +11,13 @@ :beforeUpload="beforeUpload" :disabled="disabled" :isMultiple="isMultiple" - :showUploadList="isMultiple" + @change="handleChange" @preview="handlePreview" - :class="!isMultiple?'imgupload':''"> - <div :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}"> - <img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/> - <div v-else class="iconp"> + :class="[!isMultiple?'imgupload':'', (!isMultiple && picUrl)?'image-upload-single-over':'' ]"> + <div> + <!--<img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/>--> + <div class="iconp"> <a-icon :type="uploadLoading ? 'loading' : 'plus'" /> <div class="ant-upload-text">{{ text }}</div> </div> @@ -189,7 +189,7 @@ path = '' } let arr = []; - if(!this.isMultiple){ + if(!this.isMultiple && uploadFiles.length>0){ arr.push(uploadFiles[uploadFiles.length-1].response.message) }else{ for(let a=0;a<uploadFiles.length;a++){ @@ -231,8 +231,9 @@ * https://github.com/zhangdaiscott/jeecg-boot/issues/1810 * https://github.com/zhangdaiscott/jeecg-boot/issues/1779 */ - /deep/ .imgupload .ant-upload-select{display:block} - /deep/ .imgupload .ant-upload.ant-upload-select-picture-card{ width:120px;height: 120px;} - /deep/ .imgupload .iconp{padding:32px;} + + /deep/ .imgupload .iconp{padding:20px;} /* update--end--autor:lvdandan-----date:20201016------for:j-image-upload图片组件单张图片详情回显空白*/ + + /deep/ .image-upload-single-over .ant-upload-select{display: none} </style> diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java index 7615966..7522388 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/DataBaseConstant.java @@ -111,4 +111,14 @@ public interface DataBaseConstant { */ public static final String BPM_STATUS_TABLE = "bpm_status"; //*********系统建表标准字段**************************************** + + + /** + * 租户ID 实体字段名 + */ + String TENANT_ID = "tenantId"; + /** + * 租户ID 数据库字段名 + */ + String TENANT_ID_TABLE = "tenant_id"; } diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java index e3a9420..29c4745 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java @@ -6,12 +6,8 @@ import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.exceptions.JWTDecodeException; import com.auth0.jwt.interfaces.DecodedJWT; import com.google.common.base.Joiner; - -import java.util.Date; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - import org.apache.shiro.SecurityUtils; +import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.DataBaseConstant; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.vo.LoginUser; @@ -20,6 +16,10 @@ import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.oConvertUtils; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.util.Date; + /** * @Author Scott * @Date 2018-07-12 14:23 @@ -197,6 +197,14 @@ public class JwtUtil { else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.toLowerCase().equals(DataBaseConstant.BPM_STATUS_TABLE)) { returnValue = "1"; } + //update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量 + else if (key.equals(DataBaseConstant.TENANT_ID) || key.toLowerCase().equals(DataBaseConstant.TENANT_ID_TABLE)){ + returnValue = sysUser.getRelTenantIds(); + if(oConvertUtils.isEmpty(returnValue) || (returnValue!=null && returnValue.indexOf(",")>0)){ + returnValue = SpringContextUtils.getHttpServletRequest().getHeader(CommonConstant.TENANT_ID); + } + } + //update-end-author:taoyan date:20210330 for:多租户ID作为系统变量 if(returnValue!=null){returnValue = returnValue + moshi;} return returnValue; } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java index b90f868..22ce002 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java @@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URLDecoder; + /** * <p> * 用户表 前端控制器 @@ -219,7 +220,7 @@ public class CommonController { File file = new File(filePath); if(!file.exists()){ response.setStatus(404); - throw new RuntimeException("文件不存在.."); + throw new RuntimeException("文件["+imgPath+"]不存在.."); } response.setContentType("application/force-download");// 设置强制下载不打开 response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));