Commit 4e66009b authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents b5a78fab a538cd45
...@@ -153,7 +153,9 @@ export default { ...@@ -153,7 +153,9 @@ export default {
}; };
addobjArr.push(obj); addobjArr.push(obj);
}); });
this.config.columns = [...this.initalArr, ...addobjArr]; let arr1 = this.initalArr.slice(0, 8);
let arr2 = this.initalArr.slice(8);
this.config.columns = [...arr1, ...addobjArr, ...arr2];
this.$forceUpdate(); this.$forceUpdate();
}, },
beforeRender(row) { beforeRender(row) {
...@@ -287,8 +289,17 @@ export default { ...@@ -287,8 +289,17 @@ export default {
{ label: "员工姓名", prop: "staffName", fixed: "left", width: 100 }, { label: "员工姓名", prop: "staffName", fixed: "left", width: 100 },
{ label: "部门", prop: "deptName" }, { label: "部门", prop: "deptName" },
{ label: "出勤天数", prop: "goTimes", formatter: this.formatter }, { label: "应到", prop: "workDays", formatter: this.formatter },
{ label: "实到", prop: "goTimes", formatter: this.formatter },
{
label: "出勤率%",
prop: "attendanceRate",
formatter: (row) => {
return row.attendanceRate
? (Number(row.attendanceRate) * 100).toFixed(2) + "%"
: "--";
},
},
{ {
label: "缺卡次数", label: "缺卡次数",
prop: "morningTimes", prop: "morningTimes",
...@@ -341,16 +352,6 @@ export default { ...@@ -341,16 +352,6 @@ export default {
{ label: "其他(天)", prop: "otherDays" }, { label: "其他(天)", prop: "otherDays" },
{
label: "出勤率%",
prop: "attendanceRate",
formatter: (row) => {
return row.attendanceRate
? (Number(row.attendanceRate) * 100).toFixed(2) + "%"
: "--";
},
},
{ label: "未按规定打卡(含忘记打卡)", prop: "nonCompliancePunch" }, { label: "未按规定打卡(含忘记打卡)", prop: "nonCompliancePunch" },
{ label: "迟到(次)", prop: "lateTimes" }, { label: "迟到(次)", prop: "lateTimes" },
......
...@@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -96,9 +97,11 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -96,9 +97,11 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY); String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid); String userKey = getTokenKey(uuid);
//cacheService.select(portalDb); //cacheService.select(portalDb);
cacheService.select(0); // cacheService.select(0);
String userStr = cacheService.get(userKey); RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(0);
cacheService.select(db); String userStr =redisTemplate.opsForValue().get(userKey);
// String userStr = cacheService.get(userKey);
// cacheService.select(db);
if (StringUtils.isNotEmpty(userStr)) { if (StringUtils.isNotEmpty(userStr)) {
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
//与本地转换 //与本地转换
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment