Compare commits

..

No commits in common. "06d152aaeb4be45213d0b1e572646ee9d93198f0" and "527aa28a0b91fae1b6f55295e219ae81a664ddae" have entirely different histories.

10 changed files with 37 additions and 132 deletions

View File

@ -19,14 +19,6 @@ public interface SysUserOpenidMapper
*/
public SysUserOpenid selectSysUserOpenidById(Long id);
/**
* openId
*
* @param openId openId
* @return openId
*/
public SysUserOpenid selectSysUserOpenidByOpenId(String openId);
/**
* openId
*

View File

@ -19,14 +19,6 @@ public interface ISysUserOpenidService
*/
public SysUserOpenid selectSysUserOpenidById(Long id);
/**
* openId
*
* @param openId openId
* @return openId
*/
public SysUserOpenid selectSysUserOpenidByOpenId(String openId);
/**
* openId
*

View File

@ -31,16 +31,6 @@ public class SysUserOpenidServiceImpl implements ISysUserOpenidService
return sysUserOpenidMapper.selectSysUserOpenidById(id);
}
/**
* openId
*
* @param openId openId
* @return openId
*/
public SysUserOpenid selectSysUserOpenidByOpenId(String openId) {
return sysUserOpenidMapper.selectSysUserOpenidByOpenId(openId);
}
/**
* openId
*

View File

@ -57,11 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysUserOpenidVo"/>
where id = #{id}
</select>
<select id="selectSysUserOpenidByOpenId" parameterType="String" resultMap="SysUserOpenidResult">
<include refid="selectSysUserOpenidVo"/>
where openId = #{openId}
</select>
<insert id="insertSysUserOpenid" parameterType="SysUserOpenid" useGeneratedKeys="true" keyProperty="id">
insert into sys_user_openid

View File

@ -120,7 +120,7 @@ export default {
//
if (this.fileType) {
const fileName = file.name.split('.');
const fileExt = fileName[fileName.length - 1].toLocaleLowerCase();
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);

View File

@ -15,26 +15,20 @@
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
:class="{ hide: this.fileList.length >= this.limit }"
:class="{hide: this.fileList.length >= this.limit}"
>
<i class="el-icon-plus"></i>
</el-upload>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template>
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
<template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
</div>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
:visible.sync="dialogVisible"
title="预览"
width="800"
@ -61,7 +55,7 @@ export default {
},
// (MB)
fileSize: {
type: Number,
type: Number,
default: 5,
},
// , ['png', 'jpg', 'jpeg']
@ -72,13 +66,8 @@ export default {
//
isShowTip: {
type: Boolean,
default: true,
},
//
fileNameChk: {
type: Boolean,
default: true,
},
default: true
}
},
data() {
return {
@ -92,7 +81,7 @@ export default {
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
fileList: []
};
},
watch: {
@ -100,14 +89,14 @@ export default {
handler(val) {
if (val) {
//
const list = Array.isArray(val) ? val : this.value.split(",");
const list = Array.isArray(val) ? val : this.value.split(',');
//
this.fileList = list.map((item) => {
this.fileList = list.map(item => {
if (typeof item === "string") {
if (item.indexOf(this.baseUrl) === -1 && item.indexOf("http") === -1) {
item = { name: this.baseUrl + item, url: this.baseUrl + item };
if (item.indexOf(this.baseUrl) === -1 && item.indexOf('http') === -1) {
item = { name: this.baseUrl + item, url: this.baseUrl + item };
} else {
item = { name: item, url: item };
item = { name: item, url: item };
}
}
return item;
@ -118,8 +107,8 @@ export default {
}
},
deep: true,
immediate: true,
},
immediate: true
}
},
computed: {
//
@ -134,12 +123,10 @@ export default {
if (this.fileType.length) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name
.slice(file.name.lastIndexOf(".") + 1)
.toLocaleLowerCase();
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
isImg = this.fileType.some((type) => {
if (file.type.toLocaleLowerCase().indexOf(type) > -1) return true;
isImg = this.fileType.some(type => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
@ -148,9 +135,7 @@ export default {
}
if (!isImg) {
this.$modal.msgError(
`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`
);
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
return false;
}
if (this.fileSize) {
@ -160,12 +145,6 @@ export default {
return false;
}
}
if(this.fileNameChk){
if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) {
this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`);
return false;
}
}
this.$modal.loading("正在上传图片,请稍候...");
this.number++;
},
@ -188,8 +167,8 @@ export default {
},
//
handleDelete(file) {
const findex = this.fileList.map((f) => f.name).indexOf(file.name);
if (findex > -1) {
const findex = this.fileList.map(f => f.name).indexOf(file.name);
if(findex > -1) {
this.fileList.splice(findex, 1);
this.$emit("input", this.listToString(this.fileList));
}
@ -223,25 +202,25 @@ export default {
strs += list[i].url.replace(this.baseUrl, "") + separator;
}
}
return strs != "" ? strs.substr(0, strs.length - 1) : "";
},
},
return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};
</script>
<style scoped lang="scss">
// .el-upload--picture-card
::v-deep.hide .el-upload--picture-card {
display: none;
display: none;
}
//
::v-deep .el-list-enter-active,
::v-deep .el-list-leave-active {
transition: all 0s;
transition: all 0s;
}
::v-deep .el-list-enter,
.el-list-leave-active {
opacity: 0;
transform: translateY(0);
::v-deep .el-list-enter, .el-list-leave-active {
opacity: 0;
transform: translateY(0);
}
</style>

View File

@ -1,21 +1,7 @@
<template>
<div class="app-content">
<el-row>
<el-col :sm="24" :lg="24">
<el-result icon="success" title="消息授权成功">
<template slot="extra">
<el-button type="primary" size="medium" round>返回小程序</el-button>
</template>
</el-result>
</el-col>
<el-col :sm="24" :lg="24">
<el-result icon="error" title="消息授权失败" subTitle="请关注公众号并进行网页授权">
<template slot="extra">
<el-button type="primary" size="medium" round>返回小程序</el-button>
</template>
</el-result>
</el-col>
</el-row>
<div>
</div>
</div>
</template>

View File

@ -7,7 +7,6 @@ import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.ShiFouEnum;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
@ -44,7 +43,6 @@ public class ProjectController extends BaseController {
@GetMapping("/findProjectByDept")
public AjaxResult findProjectByDept(Long deptId){
SurProject surProject=new SurProject();
surProject.setProgressVisible(ShiFouEnum.FOU.getCode());
if(deptId==-1){
long roleId= SecurityUtils.getRoleId();
if(5==roleId||6==roleId||7==roleId){
@ -59,12 +57,12 @@ public class ProjectController extends BaseController {
surProject.setDeptId(deptId);
}
List<SurProject> list=isurProjectService.selectSurProjectList(surProject);
//for (SurProject p :list){
for (SurProject p :list){
//DateTime dt1= DateUtil.parse(p.getScheduledStartTime());
//DateTime dt2=DateUtil.parse(p.getPlannedCompletionTime());
//long days= DateUtil.between(dt1,dt2, DateUnit.DAY);
//p.setProjectTimeLimit(days);
//}
}
return success(list);
}

View File

@ -6,9 +6,6 @@ import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysUserOpenid;
import com.ruoyi.system.service.ISysUserOpenidService;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.exception.WxErrorException;
@ -39,9 +36,6 @@ public class WxAuthController extends BaseController {
@Autowired
private WxMpService wxMpService;
@Autowired
private ISysUserOpenidService sysUserOpenidService;
@Anonymous
@GetMapping("/auth")
@ResponseBody
@ -129,24 +123,4 @@ public class WxAuthController extends BaseController {
response.sendRedirect(returnUrl + "&openid=" + openId);
}
/**
* @author JiangYuQi
* @param:
* @return
* url
*/
@Anonymous
@GetMapping("/binding")
public AjaxResult binding(String openId,String msgOpenId) throws Exception {
/*当用户同意授权后将小程序openId和公众号OpenId进行绑定*/
if(StringUtils.isNotBlank(openId)){
SysUserOpenid sysUserOpenid = sysUserOpenidService.selectSysUserOpenidByOpenId(openId);
if(sysUserOpenid!=null){
sysUserOpenid.setMsgOpenId(msgOpenId);
return toAjax(sysUserOpenidService.updateSysUserOpenid(sysUserOpenid));
}
}
return error();
}
}

View File

@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--普通用户查询项目人员-->
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
<where>
sp.isDel = 0
sp.isDel = 0 and sp.progressVisible=0
<if test="deptId != null "> and sp.deptId like concat('%', #{deptId}, '%')</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="projectCode != null and projectCode != ''"> and sp.projectCode = #{projectCode}</if>
@ -79,7 +79,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projiectLevel != null and projiectLevel != ''"> and sp.projiectLevel = #{projiectLevel}</if>
<if test="projectRegional != null and projectRegional != ''"> and sp.projectRegional = #{projectRegional}</if>
<if test="projectAddress != null and projectAddress != ''"> and sp.projectAddress = #{projectAddress}</if>
<if test="progressVisible != null and progressVisible != ''"> and sp.progressVisible = #{progressVisible}</if>
<if test="projectNature != null and projectNature != ''"> and sp.projectNature = #{projectNature}</if>
<if test="licenceNumber != null and licenceNumber != ''"> and sp.licenceNumber = #{licenceNumber}</if>
<if test="projectApproval != null and projectApproval != ''"> and sp.projectApproval = #{projectApproval}</if>